From e358d69fc18870584dd2d9f531910b7838ea27d9 Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期四, 02 一月 2025 09:58:53 +0800 Subject: [PATCH] 调整行点击后的回调 --- Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue | 74 ++++++++++++++----------------------- 1 files changed, 28 insertions(+), 46 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue index cfbe5d6..cdbf72a 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue @@ -9,19 +9,19 @@ @selection-change="selectChange" @row-click="rowClickHandler"> <template slot="menuLeft" slot-scope="scope"> - <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓</el-button> - <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭 + <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓</el-button> + <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆 </el-button> - <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆 + <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭 </el-button> - <el-button icon="el-icon-view" plain size="small" type="primary" + <el-button v-if="permissionList.viewTheScopeBtn" icon="el-icon-view" plain size="small" type="primary" @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿 </el-button> </template> <template slot="menu" slot-scope="scope"> - <el-button icon="el-icon-edit" size="small" type="text" @click="editClickHandler(scope.row)">缂栬緫 + <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="text" @click="editClickHandler(scope.row)">缂栬緫 </el-button> - <el-button icon="el-icon-delete" size="small" type="text" @click="delClickHandler(scope.row)">鍒犻櫎 + <el-button v-if="permissionList.delBtn" icon="el-icon-delete" size="small" type="text" @click="delClickHandler(scope.row)">鍒犻櫎 </el-button> </template> </avue-crud> @@ -32,12 +32,12 @@ :visible.sync="visible" append-to-body="true" class="avue-dialog" - width="40%" + width="800px" @close="visibleCloseHandler" > - <el-form ref="form" :model="form" :rules="rules" label-width="95px"> + <el-form ref="form" size="small" :model="form" :rules="rules" label-width="95px"> <el-row> - <el-col :span="12"> + <el-col :span="24"> <el-form-item label="鍚嶇О锛�" prop="id"> <el-input v-model="form.id"></el-input> </el-form-item> @@ -80,8 +80,8 @@ </el-row> </el-form> <span slot="footer" class="dialog-footer"> - <el-button @click="visibleCloseHandler">鍙� 娑�</el-button> <el-button type="primary" @click="addSaveHandler">纭� 瀹�</el-button> + <el-button @click="visibleCloseHandler">鍙� 娑�</el-button> </span> </el-dialog> @@ -122,6 +122,7 @@ } from "@/api/modeling/version/api"; import func from "@/util/func"; import basicOption from "@/util/basic-option"; +import {mapGetters} from "vuex"; export default { name: "index", @@ -189,6 +190,7 @@ searchMenuSpan: 8, refreshBtn: false, selection: false, + header:false, column: [ { label: '鍚嶇О', @@ -271,6 +273,19 @@ selectList: [], lastIndex: null, } + }, + 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), + viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].viewTheScope, false), + }; + }, }, created() { this.getTableList(); @@ -416,7 +431,6 @@ this.checkViewData = this.checkViewDataSearch; return done(); } - ; this.checkViewData = this.checkViewDataSearch.filter(item => { return item.source && item.source.includes(source); @@ -446,7 +460,7 @@ this.lastIndex = newIndex; }, () => { - this.selectList = []; + this.selectList = [row]; } ); }, @@ -460,40 +474,8 @@ .el-scrollbar__wrap { overflow: auto !important; } - - .headerCon { - .el-button { - width: 82px; - } + .el-input-number--small { + width: 100%; } } - -.headerCon { - display: flex; - flex-wrap: wrap; - margin-bottom: 5px; - - .el-button + .el-button { - margin-left: 5px; - } - - .el-button { - margin-top: 5px; - } -} - -.headerCon > .el-button:nth-child(4) { - margin-left: 0; -} - -.headerCon > .el-button:nth-child(7) { - margin-left: 0; -} - -.smallBtn { - width: 82px; - text-align: center; - padding-left: 4.5px; -} - </style> -- Gitblit v1.9.3