From 404966637eda6881a0f17683c5aacc7c1c34aed8 Mon Sep 17 00:00:00 2001 From: 田源 <tianyuan@vci-tech.com> Date: 星期四, 16 一月 2025 16:18:34 +0800 Subject: [PATCH] 增加操作类型 --- Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue | 102 ++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 76 insertions(+), 26 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue index 16b6cb2..a5dbc5f 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue @@ -16,19 +16,49 @@ > <template slot="menuLeft" slot-scope="scope"> - <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button> - <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">鍒犻櫎</el-button> - <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">鏌ョ湅浣跨敤鑼冨洿</el-button> - <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">涓嬭浇瀵煎叆妯℃澘 + <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" + @click="rowSaveHandlerClick"> + <icon-show :name="permissionList.addBtn.source"></icon-show> + 鍒涘缓 </el-button> - <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadUser">瀵煎叆</el-button> - <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadHandler">瀵煎嚭</el-button> + <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" + @click="allDelHandler"> + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 + </el-button> + <el-button v-if="permissionList.viewTheScopeBtn" class="button-custom-icon" plain size="small" + type="primary" + @click="chekView"> + <icon-show :name="permissionList.viewTheScopeBtn.source"></icon-show> + 鏌ョ湅浣跨敤鑼冨洿 + </el-button> + <el-button v-if="permissionList.downloadImportTemplateBtn" class="button-custom-icon" plain size="small" + type="primary" @click="downloadTemplateHandler"> + <icon-show :name="permissionList.downloadImportTemplateBtn.source"></icon-show> + 涓嬭浇瀵煎叆妯℃澘 + </el-button> + <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" + @click="uploadUser"> + <icon-show :name="permissionList.importBtn.source"></icon-show> + 瀵煎叆 + </el-button> + <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" + @click="downloadHandler"> + <icon-show :name="permissionList.exportBtn.source"></icon-show> + 瀵煎嚭 + </el-button> </template> <template slot="menu" slot-scope="scope"> - <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫 + <el-button v-if="permissionList.editBtn" size="small" type="text" + @click="editBtnClick(scope.row)"> + <icon-show :name="permissionList.editBtn.source"></icon-show> + 缂栬緫 </el-button> - <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎 + <el-button v-if="permissionList.delBtn" size="small" type="text" + @click="rowDeleteHandler(scope.row)"> + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 </el-button> </template> @@ -41,13 +71,13 @@ :visible.sync="dialogVisible" append-to-body="true" class="avue-dialog" - width="70%" + width="1000px" @close="dialogClose" > - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small"> <el-row> <el-col :span="12"> - <el-form-item label="鍚嶇О锛�" prop="id"> + <el-form-item label="鏋氫妇鍚嶇О锛�" prop="id"> <el-input v-model="form.id"></el-input> </el-form-item> </el-col> @@ -58,7 +88,7 @@ </el-col> <el-col :span="12"> <el-form-item label="绫诲瀷锛�"> - <el-select v-model="form.enumValueDataType" placeholder="璇烽�夋嫨绫诲瀷"> + <el-select v-model="form.enumValueDataType" placeholder="璇烽�夋嫨绫诲瀷" style="width: 376px;"> <el-option label="String" value="String"></el-option> <el-option label="Integer" value="Integer"></el-option> </el-select> @@ -66,7 +96,8 @@ </el-col> <el-col :span="12"> <el-form-item label="闀垮害锛�"> - <el-input-number v-model="form.length" :max="999" :min="1" label="鎻忚堪鏂囧瓧"></el-input-number> + <el-input-number v-model="form.length" :max="999" :min="1" label="鎻忚堪鏂囧瓧" + style="width: 376px;"></el-input-number> </el-form-item> </el-col> <el-col :span="24"> @@ -82,10 +113,9 @@ </el-col> </el-row> </el-form> - <span slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="rowSaveHandler">纭� 瀹�</el-button> + <el-button size="small" type="primary" @click="rowSaveHandler">纭� 瀹�</el-button> + <el-button size="small" @click="dialogVisible = false">鍙� 娑�</el-button> </span> </el-dialog> @@ -106,7 +136,6 @@ @search-change="checkHandleSearch" @search-reset="checkHandleReset" > - </avue-crud> </el-dialog> @@ -116,9 +145,10 @@ </basic-container> </el-main> - <el-aside width="30%"> + <el-aside width="35%"> <basic-container> - <el-descriptions :column="1" border size="medium" style="margin-bottom: 20px" title="鏋氫妇淇℃伅"> + <el-descriptions :column="1" :labelStyle="{width:'150px'}" border size="medium" style="margin-bottom: 20px" + title="鏋氫妇淇℃伅"> <el-descriptions-item> <template slot="label"> 鍚嶇О @@ -169,6 +199,7 @@ downloadEnumTemplate } from "@/api/modeling/enumType/api"; import func from "@/util/func"; +import {mapGetters} from "vuex"; import {deleteUser} from "@/api/system/user/api"; export default { @@ -183,6 +214,8 @@ refreshBtn: false, selection: false, index: false, + header: false, + calcHeight: -40, column: [ { label: '鏋氫妇椤瑰悕绉�', @@ -246,11 +279,13 @@ calcHeight: 50, refreshBtn: false, selection: false, + dialogWidth: 500, column: [ { label: '鏋氫妇椤瑰悕', prop: 'name', sortable: true, + span: 24, rules: [ { required: true, @@ -263,6 +298,7 @@ label: '鏋氫妇鍊�', prop: 'value', sortable: true, + span: 24, rules: [ { required: true, @@ -274,13 +310,13 @@ { label: '鎻忚堪', prop: 'description', - sortable: true, + span: 24 }, ] }, rules: { id: [ - {required: true, message: '璇疯緭鍏ユ灇涓鹃」鍚�', trigger: 'blur'}, + {required: true, message: '璇疯緭鍏ユ灇涓惧悕绉�', trigger: 'blur'}, {validator: this.validateEnglishOnly, trigger: 'blur'} ], }, @@ -295,11 +331,12 @@ tableData: [], option: { ...basicOption, - calcHeight: -60, + calcHeight: -40, searchMenuSpan: 8, addBtn: false, editBtn: false, delBtn: false, + menuWidth: 160, column: [ { label: '鏋氫妇鍚嶇О', @@ -316,6 +353,7 @@ label: '杩斿洖绫诲瀷', prop: 'enumValueDataTypeText', sortable: true, + width: 130 } ] }, @@ -325,7 +363,22 @@ lastIndex: null } }, + created() { + console.log(this.$route); + }, computed: { + ...mapGetters(["permission"]), + permissionList() { + return { + addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), + delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), + editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), + exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), + importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), + downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].DOWNLOAD, false), + viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].SEARCH, false), + }; + }, lastItem() { return this.selectList.length > 0 ? this.selectList[this.selectList.length - 1] : {}; }, @@ -342,7 +395,6 @@ this.tableData = data; this.tableLoading = false; }).catch(err => { - this.$message.error(err) }); }, @@ -381,7 +433,7 @@ this.lastIndex = newIndex; }, () => { - this.selectList = []; + this.selectList = [row]; } ); }, @@ -658,7 +710,6 @@ func.downloadFileByBlobHandler(res); this.$message.success('瀵煎嚭鎴愬姛'); }).catch(err => { - this.$message.error(err); }) }, @@ -668,7 +719,6 @@ func.downloadFileByBlobHandler(res); this.$message.success('涓嬭浇鎴愬姛'); }).catch(err => { - this.$message.error(err); }) }, -- Gitblit v1.9.3