From 39a6e2d4cbbc789955400ffd2352514a8fe4c188 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 19 八月 2024 14:05:18 +0800 Subject: [PATCH] 整合代码 --- Source/plt-web/plt-web-ui/src/views/system/role/index.vue | 2 Source/plt-web/plt-web-ui/src/views/systemModule/systemConfig/index.vue | 13 Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js | 75 +++++ Source/plt-web/plt-web-ui/src/views/systemModule/mangeModel/index.vue | 13 Source/plt-web/plt-web-ui/src/views/system/department/index.vue | 1 Source/plt-web/plt-web-ui/src/views/system/password/index.vue | 2 Source/plt-web/plt-web-ui/src/views/systemModule/operateType/index.vue | 13 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue | 122 +++++--- Source/plt-web/plt-web-ui/src/views/systemModule/businessModel/index.vue | 13 Source/plt-web/plt-web-ui/src/views/systemModule/systemMonitor/index.vue | 13 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue | 562 +++++++++++++++++++++++++++++++++++++-- 11 files changed, 743 insertions(+), 86 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js index f5ef82f..2c93f95 100644 --- a/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js +++ b/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js @@ -9,7 +9,7 @@ }); } -// 鍒楄〃鏌ヨ +// 鍒涘缓 export function addLifeCycle(params) { return request({ url: "/api/btmTypeController/addBtmType", @@ -17,3 +17,76 @@ data:params }); } + +// 淇敼 +export function updateLifeCycle(params) { + return request({ + url: "/api/btmTypeController/updateBtmType", + method: "put", + data:params + }); +} + +// 鍒犻櫎 +export function deleteBtmType(params) { + return request({ + url: "/api/btmTypeController/deleteBtmType", + method: "delete", + data:params + }); +} + +// 鍒涘缓瑙嗗浘 +export function createView() { + return request({ + url: "/api/btmTypeController/createView", + method: "post", + }); +} + +// 瀵煎叆 +export function expData (params) { + return request({ + url: '/api/btmTypeController/expData', + method: 'get', + headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, + responseType: 'blob', + params + }) +} + +// 鏌ョ湅浣跨敤鑼冨洿 +export function getUsedBtmLinkList(params) { + return request({ + url: "/api/btmTypeController/getUsedBtmLinkList", + method: "get", + params + }); +} + +// 涓�鑷存�ф鏌� +export function checkBtmConsistency(params) { + return request({ + url: "/api/btmTypeController/checkBtmConsistency", + method: "get", + params + }); +} + +// 淇 +export function executeRepair(params) { + return request({ + url: "/api/btmTypeController/executeRepair", + method: "post", + data:params + }); +} + +// 鏌ョ湅绱㈠紩 +export function getIndexByCondition(params) { + return request({ + url: "/api/btmTypeController/getIndexByCondition", + method: "get", + params + }); +} diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue index c5bcb1c..6d4bb28 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue @@ -1,5 +1,5 @@ <template> - <el-container> + <el-container v-loading="createViewLoading"> <el-aside> <basic-container> <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> @@ -18,7 +18,7 @@ type="primary" @click="createViewClickHandler">鍒涘缓瑙嗗浘 </el-button> <el-button class="miniBtn" icon="el-icon-circle-plus-outline" plain size="small" - type="primary" @click="checkClickHandler">鍒涘缓绱㈠紩 + type="primary" @click="indexClickHandler">鍒涘缓绱㈠紩 </el-button> <el-button icon="el-icon-menu" plain size="small" style="width: 82px;text-align: center;padding-left: 1px" type="primary" @click="checkClickHandler">涓�鑷存�ф鏌� @@ -29,12 +29,12 @@ <el-button class="smallBtn" plain size="small" type="danger" @click="checkClickHandler">鍒犻櫎鍏ㄩ儴绫诲瀷 </el-button> - <el-button class="smallBtn" plain size="small" type="primary">鏌ョ湅浣跨敤鑼冨洿 + <el-button class="smallBtn" plain size="small" type="primary" @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿 </el-button> </div> <!-- 宸︿晶鏍� --> <div style="height: calc(100vh - 330px);"> - <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> + <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> <span slot-scope="{ node, data }" class="el-tree-node__label"> <span style="font-size: 15px"> <i class="el-icon-s-promotion"></i> @@ -178,7 +178,13 @@ <el-input v-model="form.name"></el-input> </el-form-item> <el-form-item label="缁ф壙鑷細"> - <el-input v-model="form.fName" :readOnly="title === 'edit'"></el-input> + <div style="display: flex;gap: 5px;align-items: center"> + <el-input v-model="form.fName" :readOnly="true"></el-input> + <el-button :disabled="title === 'add'" plain size="small" style="margin-left: 5px;height: 30px" + type="success" + @click="inheritClickHandler">閫夋嫨 + </el-button> + </div> </el-form-item> <el-form-item label="瀹炵幇绫伙細"> <el-input v-model="form.implClass"></el-input> @@ -189,22 +195,24 @@ </div> <div class="centerForm"> <el-form-item label="鐗堟湰瑙勫垯锛�" label-width="110px" prop="revLevel"> - <el-select v-model="form.revLevel"> + <el-select v-model="form.revLevel" @change="revLevelChange"> <el-option label="涓嶅彲淇" value="0"></el-option> <el-option label="閲囩敤涓�绾х増鏈鐞�" value="1"></el-option> <el-option label="閲囩敤浜岀骇鐗堟湰绠$悊" value="2"></el-option> </el-select> </el-form-item> - <el-form-item v-if="form.revLevel !== '0'" label="鐗堟湰鍙疯鍒欙細" label-width="110px" prop="revisionRuleName"> + <el-form-item v-if="form.revLevel !== '0'" label="鐗堟湰鍙疯鍒欙細" label-width="110px" prop="revisionRuleId"> <div style="display: flex;gap: 5px;align-items: center"> <el-input v-model="form.revisionRuleId" :readOnly="true"></el-input> - <el-button plain size="small" style="margin-left: 5px;height: 30px" type="success" + <el-button :disabled="form.inputRevisionFlag" plain size="small" style="margin-left: 5px;height: 30px" + type="success" @click="versionAddHandler">娣诲姞 </el-button> <el-switch v-model="form.inputRevisionFlag" active-text="鎵嬪伐杈撳叆" - style="width: 300px"> + style="width: 300px" + @change="form.revisionRuleId = ''"> </el-switch> </div> </el-form-item> @@ -215,7 +223,7 @@ </el-select> </el-form-item> <el-form-item v-if="form.revLevel !== '0' && form.revLevel !== '1'" label="鐗堟鍙疯鍒欙細" label-width="110px" - prop="revLevel"> + prop="versionRule"> <el-select v-model="form.versionRule" clearable> <el-option label="1.2.3..." value="0"></el-option> <el-option label="a.b.c..." value="1"></el-option> @@ -274,7 +282,8 @@ <h3>灞炴�ф睜鍒楄〃</h3> <avue-crud :data="dialogAttrData" - :option="dialogAttrOption"> + :option="dialogAttrOption" + @row-del="dialogBottomAttrDel"> <template slot="menuLeft"> <el-button icon="el-icon-plus" size="small" type="primary" @click="addDialogClickHandler">鍒涘缓</el-button> </template> @@ -317,6 +326,7 @@ </span> </el-dialog> + <!-- 鐗堟湰鍙疯鍒欓�夋嫨 --> <el-dialog v-dialogDrag :visible.sync="dialogVersionVisible" @@ -372,21 +382,193 @@ </el-dialog> + <!-- 缁ф壙鑷� --> + <el-dialog + v-dialogDrag + :visible.sync="dialogInheritVisible" + append-to-body="true" + class="avue-dialog" + title="缁ф壙涓氬姟绫诲瀷" + width="30%" + @close="inheritClose" + > + <avue-tree ref="inheritTree" v-model="treeForm" :data="inheritTreeData" :option="inheritTreeOption" + @node-click="inheritNodeClick"> + <span slot-scope="{ node, data }" class="el-tree-node__label"> + <span style="font-size: 15px"> + <i class="el-icon-s-promotion"></i> + {{ (node || {}).label }} + </span> + </span> + </avue-tree> + <span slot="footer" class="dialog-footer"> + <el-button @click="inheritClose">鍙� 娑�</el-button> + <el-button type="primary" @click="inheritSaveClickHandler">纭� 瀹�</el-button> + </span> + </el-dialog> + + <!-- 瀵煎叆 --> + <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" + @updata="getTreeList"></upload-file> + + <!-- 鏌ョ湅浣跨敤鑼冨洿 --> + <el-dialog + v-dialogDrag + :visible.sync="checkViewVisible" + append-to-body="true" + class="avue-dialog" + title="鏌ョ湅浣跨敤鑼冨洿" + width="60%" + > + <avue-crud + ref="checkViewCrud" + :data="checkViewData" + :option="checkViewOption" + :table-loading="checkViewLoading" + @search-change="checkHandleSearch" + @search-reset="checkHandleReset" + > + </avue-crud> + </el-dialog> + + <!-- 涓�鑷存�ф鏌� --> + <el-dialog + v-dialogDrag + :visible.sync="conCheckVisible" + append-to-body="true" + class="avue-dialog" + title="涓�鑷存�ф鏌�" + width="60%" + > + <avue-crud + :data="conCheckData" + :option="conCheckOption" + :table-loading="conCheckLoading"> + </avue-crud> + <span slot="footer" class="dialog-footer"> + <el-button @click="conCheckVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="repairClickHandler">淇� 澶�</el-button> + </span> + </el-dialog> + + <!-- 涓�鑷存�ф鏌� --> + <el-dialog + v-dialogDrag + :visible.sync="indexVisible" + append-to-body="true" + class="avue-dialog" + title="绱㈠紩淇℃伅" + width="60%" + > + + </el-dialog> + </el-container> </template> <script> import basicOption from '@/util/basic-option' -import {getBizTypes, addLifeCycle} from "@/api/modeling/businessType/api" +import { + getBizTypes, + addLifeCycle, + updateLifeCycle, + deleteBtmType, + createView, + expData, + getUsedBtmLinkList, + checkBtmConsistency, + executeRepair, + getIndexByCondition +} from "@/api/modeling/businessType/api" import {gridAttribute} from "@/api/modeling/attributePool/api"; import func from "@/util/func"; -import {getVersionRuleAllList} from "@/api/modeling/version/api"; +import {getUsedVersionRuleList, getVersionRuleAllList} from "@/api/modeling/version/api"; import {gridLifeCycle} from "@/api/modeling/lifeCycle/api"; export default { name: "index", data() { return { + indexVisible:false, + conDefaultCheckData: [], // 淇濈暀涓婁釜鎺ュ彛杩斿洖鐨勬暟鎹� + conCheckLoading: false, + conCheckOption: { + ...basicOption, + menu: false, + addBtn: false, + index: false, + selection: false, + refreshBtn: false, + column: [ + { + label: '绫诲瀷鍚�', + prop: 'id', + }, + { + label: '鎿嶄綔', + prop: 'methods', + }, + { + label: '鐘舵��', + prop: 'status', + } + ] + }, + conCheckData: [], + conCheckVisible: false, + checkViewVisible: false, + checkViewData: [], + checkViewDataSearch: [], + checkViewLoading: false, + checkViewOption: { + ...basicOption, + addBtn: false, + menu: false, + searchMenuSpan: 8, + refreshBtn: false, + selection: false, + column: [ + { + label: '鍚嶇О', + prop: 'name', + sortable: true, + }, + { + label: '鏉ユ簮', + prop: 'source', + sortable: true, + search: true + }, + { + label: '璇存槑', + prop: 'description', + } + ] + }, + tipList: [ + "瀵煎叆涓氬姟鍚嶇О涓嶅彲涓虹┖涓旈摼鎺ョ被鍨嬪悕绉板彧鑳戒负鑻辨枃瀛楁瘝", + "瀵煎叆鐨勬枃浠跺寘鎷睘鎬с�佷笟鍔$被鍨嬨�佺敓鍛藉懆鏈熺瓑鏂囦欢", + "涓婁紶鐨勬枃浠朵负鍘嬬缉鏂囦欢锛屼笖鍘嬬缉鏍煎紡浠呰兘涓簔ip鏍煎紡" + ], + upFileType: ['zip'], + fileUrl: 'api/linkTypeController/impData', + createViewLoading: false, // 鍒涘缓瑙嗗浘 + versionAddFlag: false, + treeForm: {}, + inheritNodeRow: {}, + inheritTreeOption: { + height: 'auto', + defaultExpandAll: false, + menu: false, + addBtn: false, + props: { + label: 'id', + value: 'id', + children: 'children' + } + }, + inheritTreeData: [], + dialogInheritVisible: false, dialogLifeDefalutData: [], // 鏌ヨ閲嶇疆榛樿鏁版嵁 lifeType: '', dialogLifeTable: [], @@ -513,6 +695,12 @@ sortable: true, }, { + + prop: 'btmTypeId', + label: '涓氬姟绫诲瀷', + sortable: true + }, + { label: '灞炴�х被鍨�', prop: 'attributeDataType', sortable: true, @@ -552,7 +740,7 @@ sortable: true }, { - prop: 'attrDataType', + prop: 'attributeDataType', label: '灞炴�х被鍨�', sortable: true }, @@ -576,8 +764,9 @@ description: '', // 鎻忚堪 revLevel: '', // 鐗堟湰瑙勫垯 revisionRuleId: '',// 鐗堟湰鍙疯鍒� - inputRevisionFlag: false, // 鎵嬪伐杈撳叆 - versionRule: '', // 鐗堟鍙疯鍒� + inputRevisionFlag: false, // 鎵嬪伐杈撳叆, + delimiter: '', // 鍒嗛殧绗� + versionRule: '0', // 鐗堟鍙疯鍒� lifeCycleId: '', // 鐢熷懡鍛ㄦ湡 subLifeCycleId: '', // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛�, apNameArray: "", // 灞炴�ф睜鍒楄〃鈥欙紝鈥樺垎闅� @@ -585,16 +774,22 @@ nodeRow: {}, treeOption: { height: 'auto', - defaultExpandAll: false, + defaultExpandedKeys: ['topNode'], menu: false, addBtn: false, props: { - label: 'id', + label: 'TreeName', value: 'id', children: 'children' } }, - treeData: [], + treeData: [ + { + TreeName: '涓氬姟绫诲瀷鏍�', + id: 'topNode', + children: [] + } + ], descriptionOption: { labelStyle: 'text-align:center;width:100px;', contentStyle: 'max-width:200px;text-align:center;word-break;break-all;' @@ -609,27 +804,73 @@ created() { this.getTreeList(); }, + mounted() { + }, methods: { //鏍戣〃鏌ヨ getTreeList() { getBizTypes().then(res => { const data = res.data.data.map(item => { - return item.attributes; + this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣 + item.attributes.TreeName = item.attributes.id; + return item.attributes; // 杩斿洖澶勭悊鍚庣殑 attributes }); - this.treeData = data; - }) + this.treeData[0].children = data; + console.log(this.treeData); + this.inheritTreeData = data; + }); + }, + + // 澶勭悊鏍戝舰缁撴瀯 + processChildren(item) { + if (item.children && item.children.length > 0) { + item.attributes.children = item.children.map(child => { + child.attributes.TreeName = child.attributes.id; + this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐� + return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes + }); + } }, // 鏍戠偣鍑� nodeClick(row) { - this.attrData = JSON.parse(row.attributes); + this.attrData = row.attributes ? JSON.parse(row.attributes) : []; this.nodeRow = row; }, // 鍒涘缓鎸夐挳 addClickHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇烽�夋嫨瑕佹坊鍔犵殑鑺傜偣'); + return; + } this.title = 'add'; + this.form.fName = this.nodeRow.id === 'topNode' ? "" : this.nodeRow.id; + console.log(this.nodeRow); + this.form.inputRevisionFlag = JSON.parse(this.form.inputRevisionFlag); // 瀛楃涓瞗alse杞崲涓哄竷灏斿�� this.visible = true; + }, + + // 鍏抽棴缁ф壙瀵硅瘽妗� + inheritClose() { + this.dialogInheritVisible = false; + this.$refs.inheritTree.setCurrentKey(null); // 鍙栨秷褰撳墠閫変腑鐨勮妭鐐� + }, + + // 缁ф壙鎸夐挳 + inheritClickHandler() { + this.dialogInheritVisible = true; + }, + + // 缁ф壙鏍戣鐐瑰嚮 + inheritNodeClick(row) { + this.inheritNodeRow = row; + }, + + // 缁ф壙鏍戜繚瀛� + inheritSaveClickHandler() { + this.form.fName = this.inheritNodeRow.id; + this.dialogInheritVisible = false; }, // 瀵硅瘽妗� 灞炴�ф睜鍒楄〃澧炲姞鎸夐挳 @@ -742,6 +983,11 @@ this.dialogAttrData.push(...newItems); this.attrPollDialogVisible = false; } + }, + + // 灞炴�ф睜鍒犻櫎 + dialogBottomAttrDel(form, index) { + this.dialogAttrData.splice(index, 1); }, // 鐗堟湰瑙勫垯绠$悊娣诲姞 @@ -885,28 +1131,282 @@ callback(); // 楠岃瘉閫氳繃 }, + // 娓呯┖琛ㄥ崟 + resetForm() { + const form = { + id: '', // 绫诲瀷鍚嶇О + name: '', // 鏍囩 + fName: '', // 缁ф壙鑷� + implClass: '', // 瀹炵幇绫� + description: '', // 鎻忚堪 + revLevel: '', // 鐗堟湰瑙勫垯 + revisionRuleId: '',// 鐗堟湰鍙疯鍒� + inputRevisionFlag: 'false', // 鎵嬪伐杈撳叆 + delimiter: '', // 鍒嗛殧绗� + versionRule: '0', // 鐗堟鍙疯鍒� + lifeCycleId: '', // 鐢熷懡鍛ㄦ湡 + subLifeCycleId: '', // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛�, + apNameArray: "", // 灞炴�ф睜鍒楄〃鈥欙紝鈥樺垎闅� + }; + this.dialogLifeTable = []; // 灏嗙敓鍛藉懆鏈熻〃鏍肩疆绌� + this.dialogAttrData = []; // 灏嗗睘鎬ф睜琛ㄦ牸缃┖ + this.form = {...form}; + this.$refs.form.clearValidate(); + }, + + // 鏂板缂栬緫瀵硅瘽妗嗗彇娑� + addDialogClose() { + this.resetForm(); + this.visible = false; + }, + + // 鐗堟湰瑙勫垯鍒囨崲 缃┖鍏朵粬鏉′欢 + revLevelChange() { + this.form.versionRule = ""; + this.form.inputRevisionFlag = false; + this.form.delimiter = ""; + this.form.versionRule = "0"; + this.form.revisionRuleId = ""; + }, + // 鏂板缂栬緫淇濆瓨 addDialogSavaHandler() { - console.log(this.form) + if (!this.form.inputRevisionFlag && (!this.form.revisionRuleId || this.form.revisionRuleId === "")) { + this.$message.error('璇锋鏌ョ増鏈彿瑙勫垯涓嶈兘涓虹┖'); + return; + } + this.form.subLifeCycleId = this.dialogLifeTable ? this.dialogLifeTable.map(item => item.id).join(',') : ""; + this.form.apNameArray = this.dialogAttrData ? this.dialogAttrData.map(item => item.id).join(',') : ""; this.$refs.form.validate((valid) => { + const saveFunction = this.title === 'add' ? addLifeCycle : updateLifeCycle; if (valid) { - addLifeCycle(this.form).then(res => { - console.log(res); + if (this.form.revLevel === 0) { + this.form.versionRule = ""; + } + saveFunction(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTreeList(); + this.resetForm(); + this.visible = false; + } }) } else { return false; } }); + }, - this.$refs.form.validate((valid) => { - if (valid) { - } else { - return false; + // 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢 + editClickHandler() { + /** + * id 鍚嶇О + * name 鏍囩 + * implClass 瀹炵幇绫� + * fName 缁ф壙鑷� + * description 鎻忚堪 + * revLevel 鐗堟湰瑙勫垯 + * revisionRuleId 鐗堟湰鍙疯鍒� + * inputRevisionFlag 鎵嬪伐杈撳叆 + * delimiter 鍒嗛殧绗� + * versionRule 鐗堟鍙疯鍒� + * lifeCycleId 鐢熷懡鍛ㄦ湡 + * lifeCycleIds 鐢熷懡鍛ㄦ湡鍒楄〃 + * attributes 灞炴�ф睜鍒楄〃 + */ + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + return; + } + if (this.nodeRow.id === 'topNode') { + this.$message.error('璇烽�夋嫨瀛愯妭鐐硅繘琛屼慨鏀�') + return; + } + this.form = {...this.nodeRow}; + this.form.inputRevisionFlag = JSON.parse(this.form.inputRevisionFlag); // 瀛楃涓瞗alse杞崲涓哄竷灏斿�� + // this.form.fName = this.nodeRow.id === 'topNode' ? "" : this.nodeRow.id; + this.dialogLifeTable = (this.nodeRow.lifeCycleIds && this.nodeRow.lifeCycleIds.trim()) + ? this.nodeRow.lifeCycleIds.split(',').map(item => ({id: item.trim()})) + : []; + this.dialogAttrData = this.nodeRow.attributes ? JSON.parse(this.nodeRow.attributes) : []; + this.title = 'edit'; + this.visible = true; + console.log(this.form); + }, + + // 鍒犻櫎鎸夐挳 + deleteClickHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + return; + } + ; + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + const {id, oid, ts} = this.nodeRow; + const obj = {id, oid, ts}; + deleteBtmType(obj).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTreeList(); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + + // 鍒涘缓瑙嗗浘 + createViewClickHandler() { + this.createViewLoading = true; + createView().then(res => { + if (res.data.code === 200) { + this.createViewLoading = false; + this.$message.success(res.data.obj); } + }).catch(err => { + this.createViewLoading = false; + }) + }, + + // 瀵煎嚭 + exportClickHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + return; + } + let name = this.nodeRow.id; + expData({name: name}).then(res => { + func.downloadFileByBlobHandler(res); + this.$message.success('瀵煎嚭鎴愬姛'); + }).catch(err => { + this.$message.error(err); + }); + }, + + // 瀵煎叆 + upLoadClickHandler() { + this.$refs.upload.visible = true; + }, + + // 鏌ョ湅浣跨敤鑼冨洿鎸夐挳 + checkViewClickHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒'); + return; + } + getUsedBtmLinkList({btmName: this.nodeRow.id}).then(res => { + if (res.data.code === 200) { + this.checkViewVisible = true; + const data = res.data.data.map(item => { + return{ + name:this.nodeRow.id, + source:item + } + }); + this.checkViewData = data; + this.checkViewDataSearch = data; + } + }) + }, + + // 鏌ョ湅浣跨敤鑼冨洿鏌ヨ + checkHandleSearch(params, done) { + const {source} = params; + + if (!params.source) { + this.checkViewData = this.checkViewDataSearch; + return done(); + } + ; + + this.checkViewData = this.checkViewDataSearch.filter(item => { + return item.source && item.source.includes(source); }); - } + done(); + }, + + // 鏌ョ湅浣跨敤鑼冨洿閲嶇疆 + checkHandleReset() { + this.checkViewData = this.checkViewDataSearch; + }, + + // 涓�鑷存�ф鏌ユ寜閽偣鍑� + checkClickHandler(){ + checkBtmConsistency().then(res =>{ + if(res && res.data && res.data.data){ + this.conCheckVisible = true; + this.conCheckLoading = true; + if(res.data.code === 200){ + const data = res.data.data[0]; + this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹� + this.conCheckLoading = false; + const outputData = []; + Object.entries(data).forEach(([id, methods]) => { + let action; + + switch (methods) { + case '_CREATE': + action = '鍒涘缓琛�'; + break; + case '_ADD': + action = '澧炲姞鍒�'; + break; + case '_DROP': + action = '绉婚櫎鍒�'; + break; + default: + action = '鏈煡'; + } + outputData.push({ + id: id, + methods: action, + status: '鏈慨澶�' + }) + }) + this.conCheckData = outputData; + } + }else { + this.$message.success(res.data.msg); + } + }) + }, + + // 淇涓�鑷存�ф鏌� + repairClickHandler() { + const params = this.conDefaultCheckData; + executeRepair(params).then(res => { + if (res.data.obj) { + this.$message.success('淇鎴愬姛'); + this.conCheckData = []; + } else { + this.$message.error('淇澶辫触锛岃閲嶆柊灏濊瘯锛�'); + } + this.conCheckVisible = false; + }) + }, + + // 鍒涘缓绱㈠紩鎸夐挳鐐瑰嚮 + indexClickHandler(){ + if(func.isEmptyObject(this.nodeRow)){ + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + return; + } + const params = { + "conditionMap[typename]":this.nodeRow.id + } + getIndexByCondition(params).then(res => { + console.log(res); + }) + } } } </script> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue index aa5e091..48bc0df 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue @@ -714,12 +714,24 @@ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); return; } - deleteLink(this.nodeRow).then(res => { - if (res.data.code === 200) { - this.$message.success('鍒犻櫎鎴愬姛'); - this.getTreeList(); - } - }) + ; + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteLink(this.nodeRow).then(res => { + if (res.data.code === 200) { + this.$message.success('鍒犻櫎鎴愬姛'); + this.getTreeList(); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); }, // 鍒涘缓鎸夐挳 @@ -762,58 +774,62 @@ // 涓�鑷存�ф鏌� checkClickHandler() { - this.conCheckVisible = true; - this.conCheckLoading = true; checkLinkType().then(res => { - if (res.data.code === 200) { - const data = res.data.data; - this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹� - this.conCheckLoading = false; + if (res && res.data && res.data.data) { + this.conCheckVisible = true; + this.conCheckLoading = true; + if (res.data.code === 200) { + const data = res.data.data; + this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹� + this.conCheckLoading = false; - const outputData = []; + const outputData = []; - data.forEach(item => { - Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => { - methodsArray.forEach(methods => { - // 鍒ゆ柇鍓嶇紑 - const action = methods.startsWith('F_') ? '绉婚櫎form绔笟鍔$被鍨�' : '绉婚櫎to绔笟鍔$被鍨�'; - const detail = methods.split('_')[1]; // 鑾峰彇 _ 鍚庨潰鐨勫唴瀹� - outputData.push({ - id: id, - methods: `${action}:${detail}`, - status: '鏈慨澶�' + data.forEach(item => { + Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => { + methodsArray.forEach(methods => { + // 鍒ゆ柇鍓嶇紑 + const action = methods.startsWith('F_') ? '绉婚櫎form绔笟鍔$被鍨�' : '绉婚櫎to绔笟鍔$被鍨�'; + const detail = methods.split('_')[1]; // 鑾峰彇 _ 鍚庨潰鐨勫唴瀹� + outputData.push({ + id: id, + methods: `${action}:${detail}`, + status: '鏈慨澶�' + }); }); }); - }); - // 澶勭悊 dbCheckMap - Object.entries(item.dbCheckMap).forEach(([id, methods]) => { - const splitMethods = methods.split('('); - // 鍒ゆ柇绗竴涓鍙峰墠闈㈢殑鍊� - if (splitMethods[0].startsWith('_ADD')) { - outputData.push({ - id: id, - methods: '澧炲姞鍒�(' + splitMethods[1].slice(0, -1) + ')', // 缁撴潫浣嶇疆鍑忓幓)鐨勫瓧绗� - status: '鏈慨澶�' - }); - } else if (splitMethods[0].startsWith('_CREATE')) { - outputData.push({ - id: id, - methods: '鍒涘缓琛�(' + splitMethods[1].slice(0, -1) + ')', - status: '鏈慨澶�' - }); - } else if (splitMethods[0].startsWith('_DROP')) { - outputData.push({ - id: id, - methods: '绉婚櫎鍒�(' + splitMethods[1].slice(0, -1) + ')', - status: '鏈慨澶�' - }); - } else { - this.$message.error("涓嶆敮鎸佺殑 dbCheckMap 绫诲瀷锛� " + methods) - } + // 澶勭悊 dbCheckMap + Object.entries(item.dbCheckMap).forEach(([id, methods]) => { + const splitMethods = methods.split('('); + // 鍒ゆ柇绗竴涓鍙峰墠闈㈢殑鍊� + if (splitMethods[0].startsWith('_ADD')) { + outputData.push({ + id: id, + methods: '澧炲姞鍒�(' + splitMethods[0].slice(0, -1) + ')', // 缁撴潫浣嶇疆鍑忓幓)鐨勫瓧绗� + status: '鏈慨澶�' + }); + } else if (splitMethods[0].startsWith('_CREATE')) { + outputData.push({ + id: id, + methods: '鍒涘缓琛�(' + splitMethods[0].slice(0, -1) + ')', + status: '鏈慨澶�' + }); + } else if (splitMethods[0].startsWith('_DROP')) { + outputData.push({ + id: id, + methods: '绉婚櫎鍒�(' + splitMethods[0].slice(0, -1) + ')', + status: '鏈慨澶�' + }); + } else { + this.$message.error("涓嶆敮鎸佺殑 dbCheckMap 绫诲瀷锛� " + methods) + } + }); }); - }); - this.conCheckData = outputData; + this.conCheckData = outputData; + } + } else { + this.$message.success(res.data.msg); } }).catch(err => { this.$message.error(err); @@ -822,11 +838,11 @@ // 淇涓�鑷存�ф鏌� repairClickHandler() { - console.log(this.conDefaultCheckData) const params = this.conDefaultCheckData[0]; repairTable(params).then(res => { if (func.isEmptyObject(res.data.obj[0])) { this.$message.success('淇鎴愬姛'); + this.conCheckData = []; } else { this.$message.error('淇澶辫触锛岃閲嶆柊灏濊瘯锛�'); } @@ -842,6 +858,8 @@ this.createViewLoading = false; this.$message.success(res.data.obj); } + }).catch(err => { + this.createViewLoading = false; }) }, diff --git a/Source/plt-web/plt-web-ui/src/views/system/department/index.vue b/Source/plt-web/plt-web-ui/src/views/system/department/index.vue index c8f755e..e71ddd1 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/department/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/department/index.vue @@ -101,6 +101,7 @@ delBtn: false, gridBtn: false, highlightCurrentRow: true, + calcHeight: -60, column: column }, tableLoading: false, diff --git a/Source/plt-web/plt-web-ui/src/views/system/password/index.vue b/Source/plt-web/plt-web-ui/src/views/system/password/index.vue index df6103c..06f2980 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/password/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/password/index.vue @@ -59,10 +59,10 @@ option: { ...basicOption, selection: false, - calcHeight: -60, menuWidth: 150, editBtn: false, delBtn: false, + calcHeight: -60, column: [ { label: '绛栫暐鍚嶇О', diff --git a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue index ab98e39..80a085f 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue @@ -89,8 +89,8 @@ ...basicOption, dialogTop: 0, dialogWidth: '30%', + column: column, calcHeight: -60, - column: column }, page: { currentPage: 1, diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/businessModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/businessModel/index.vue new file mode 100644 index 0000000..54b19c1 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModule/businessModel/index.vue @@ -0,0 +1,13 @@ +<template> + +</template> + +<script> +export default { + name: "index" +} +</script> + +<style scoped> + +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/mangeModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/mangeModel/index.vue new file mode 100644 index 0000000..82a0b37 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModule/mangeModel/index.vue @@ -0,0 +1,13 @@ +<template> + +</template> + +<script> +export default { +name: "index" +} +</script> + +<style scoped> + +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/operateType/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/operateType/index.vue new file mode 100644 index 0000000..54b19c1 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModule/operateType/index.vue @@ -0,0 +1,13 @@ +<template> + +</template> + +<script> +export default { + name: "index" +} +</script> + +<style scoped> + +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/systemConfig/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/systemConfig/index.vue new file mode 100644 index 0000000..54b19c1 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModule/systemConfig/index.vue @@ -0,0 +1,13 @@ +<template> + +</template> + +<script> +export default { + name: "index" +} +</script> + +<style scoped> + +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/systemMonitor/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/systemMonitor/index.vue new file mode 100644 index 0000000..54b19c1 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModule/systemMonitor/index.vue @@ -0,0 +1,13 @@ +<template> + +</template> + +<script> +export default { + name: "index" +} +</script> + +<style scoped> + +</style> -- Gitblit v1.9.3