From 4cf67af090dbed353f1ddf3bd3ba5e0f854c0020 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期四, 28 十一月 2024 12:09:05 +0800 Subject: [PATCH] 业务类型、状态池添加图标,数据授权页面 --- Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue | 95 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 90 insertions(+), 5 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue index f3955f1..9334a69 100644 --- a/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue @@ -19,7 +19,7 @@ </el-aside> <el-main> - <basic-container> + <basic-container cardBodyStyle="padding-bottom:0;"> <avue-crud ref="crud" :data="data" @@ -34,9 +34,26 @@ <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">鏌ョ湅鎺堟潈缁撴灉</el-button> </template> </avue-crud> - <div> - <data-view key="dataView"></data-view> + <div style="margin-top: 15px;"> + <data-view key="dataView" :btmNode="nodeRow" :data="viewData" :readOnly="true" :height="clientHeight-260-220"></data-view> </div> + <!-- 鏂板 && 缂栬緫 --> + <el-dialog + v-dialogDrag + :title="title === 'add' ? '鍒涘缓' : '淇敼'" + :visible.sync="visible" + append-to-body="true" + class="avue-dialog" + width="70%" + @close="addDialogClose"> + <div> + <data-view key="editView" :btmNode="nodeRow" :data="viewData" :readOnly="false" :height="clientHeight-340"></data-view> + </div> + <span slot="footer" class="dialog-footer"> + <el-button size="small" type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button> + <el-button size="small" @click="addDialogClose">鍙� 娑�</el-button> + </span> + </el-dialog> <!-- 鏌ョ湅鎺堟潈缁撴灉 --> <el-dialog v-dialogDrag @@ -70,11 +87,13 @@ import {getTypeActionByType} from "@/api/authority/ui/typeAction"; import func from "@/util/func"; import {getUsedEnumList} from "@/api/modeling/enumType/api"; +import {deleteTemplate, saveTemplate, updateTemplate} from "@/api/queryTemplate/queryDefine"; export default { name: "index", components:{dataView}, data:function (){ return{ + clientHeight:Math.max(document.body.clientHeight,700), treeOption: { height: 'auto', defaultExpandAll: true, @@ -92,7 +111,7 @@ selectList: [], option: { ...basicOption, - height:260, + height:280, addBtn: false, editBtn: false, delBtn: false, @@ -116,6 +135,10 @@ ] }, data: [], + viewData:{}, + title: '', + visible: false, + form:{} } }, created() { @@ -164,10 +187,17 @@ this.selectList = [row]; } ); + this.getViewData(row) }, // 閫夋嫨妗� selectChange(row) { this.selectList = row; + }, + //鑾峰彇涓嬫柟鏁版嵁 + getViewData(row){ + this.viewData={ + oid:row.plOId + }; }, // 鏌ョ湅鎺堟潈缁撴灉 chekView() { @@ -206,7 +236,62 @@ done(); }, - + //鍒涘缓 + addHandler(){ + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇烽�夋嫨瑕佹坊鍔犵殑鑺傜偣'); + return; + } + this.title = 'add'; + this.visible = true; + }, + //淇敼 + editHandler(){ + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + return; + } + this.title = 'edit'; + this.visible = true; + }, + // 鏂板缂栬緫淇濆瓨 + addDialogSavaHandler() { + saveTemplate(this.viewData).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + this.addDialogClose(); + } + }) + }, + // 鏂板缂栬緫瀵硅瘽妗嗗彇娑� + addDialogClose() { + this.visible = false; + }, + //鍒犻櫎 + delHandler(){ + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇烽�夋嫨鏁版嵁'); + return; + } + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteTemplate({name:this.templateForm}).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, // 鏌ョ湅浣跨敤鑼冨洿閲嶇疆 checkHandleReset() { this.checkViewData = this.checkViewDataSearch; -- Gitblit v1.9.3