From 9c81ab87188929f98abfd56eb3d0aa13e0077990 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 14 九月 2025 19:42:01 +0800
Subject: [PATCH] 删除无用代码
---
src/views/wel/shemi.vue | 178 ++++++++++++++++++++---------------------------------------
1 files changed, 60 insertions(+), 118 deletions(-)
diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index f5f0449..fdd59b0 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -1,7 +1,7 @@
<template>
<basic-container>
<div class="norightmenu" v-if="!isSearch">
- <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
+ <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud0"
v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
<template #search>
@@ -14,20 +14,20 @@
<el-checkbox value="3" label="鍋忕" />
</el-checkbox-group>
</el-col>
- <el-col :span="6" class="search-data-flex">
+ <el-col :span="4" class="search-data-flex">
<span class="search-data-title">闆剁粍浠跺彿:</span>
- <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
+ <el-select v-model="searchTreeData.drawingNo" clearable filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
:remote-method="remoteMethod" :loading="searchLoading">
<el-option v-for="item in drawingNoList" :key="item.value" :label="item.label"
:value="item.value" /></el-select>
</el-col>
- <el-col :span="8" class="search-data-flex">
+ <el-col :span="6" class="search-data-flex">
<span class="search-data-title">鏃堕棿鑼冨洿:</span>
<el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="createTimeChange" /><!--:disabled-date="disabledDate" 涓嶉渶瑕佺鐢ㄦ棩鏈�-->
</el-col>
- <el-col :span="4" class="search-data-flex">
+ <el-col :span="6" class="search-data-flex">
<el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right"
style="margin-right: 6px;">
<Search />
@@ -36,37 +36,28 @@
style="margin-right: 6px;">
<Delete />
</el-icon>娓呯┖</el-button>
+ <el-button type="danger" @click="refresh('crud0')">閲嶇疆琛ㄦ牸</el-button>
</el-col>
</el-row>
</template>
- <!-- <template #menu-left>
- <el-button :size="size" type="primary" @click="showAdd()">鏂板鏍硅妭鐐�</el-button>
- </template> -->
+
<template #name="{ row }">
<span>{{ row.name }}</span>
- <!-- <el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="淇敼" @click="showEdit(row)" title="淇敼"></el-button>
- <el-button :size="size" text v-if="row.nodeType != 10" icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="鍒犻櫎" title="鍒犻櫎"></el-button>
- <el-button :size="size" text v-if="row.nodeType != 60 && row.nodeType != 70" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="鏂板瀛愮骇" title="鏂板瀛愮骇"></el-button>
- <el-button :size="size" text v-if="row.nodeType == 60 || row.nodeType == 50" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="鏂囦欢涓婁紶" title="鏂囦欢涓婁紶"></el-button> -->
- <!-- 娑夊瘑缃戞墠鏈� -->
- <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="鍗囩増" title="鍗囩増"></el-button> -->
- <!-- 宸ユ帶缃戞墠鏈� -->
- <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="涓嬪彂" title="涓嬪彂"></el-button> -->
-
- <!-- 鏇挎崲 v-if="permission.auto_dispatch"-->
- <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
+
+ <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="鏇挎崲" title="鏇挎崲"></el-button>
- <el-button :size="size" text
- v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"
- icon="el-icon-lock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
- <el-button :size="size" text
- v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
- icon="el-icon-unlock" type="primary" @click="showUnLockDlg(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
+ <!---->
+ <el-button icon="el-icon-unlock" class="treebtn" v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"text type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
+
+ <el-button icon="el-icon-lock" class="treebtn" :size="size" text
+ v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
+ type="primary" @click="showUnLockDlg(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
+
</template>
</avue-crud>
</div>
<div class="norightmenu" v-else>
- <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
+ <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud1"
v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
<template #search>
@@ -81,18 +72,18 @@
</el-col>
<el-col :span="4" class="search-data-flex">
<span class="search-data-title">闆剁粍浠跺彿:</span>
- <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
+ <el-select v-model="searchTreeData.drawingNo" clearable filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
:remote-method="remoteMethod" :loading="searchLoading">
<el-option v-for="item in drawingNoList" :key="item.value" :label="item.label"
:value="item.value" /></el-select>
</el-col>
- <el-col :span="8" class="search-data-flex">
+ <el-col :span="6" class="search-data-flex">
<span class="search-data-title">鏃堕棿鑼冨洿:</span>
<el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="createTimeChange" /><!--:disabled-date="disabledDate" 涓嶉渶瑕佺鐢ㄦ棩鏈�-->
</el-col>
- <el-col :span="6" class="search-data-flex">
+ <el-col :span="8" class="search-data-flex">
<el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right"
style="margin-right: 6px;">
<Search />
@@ -101,6 +92,7 @@
style="margin-right: 6px;">
<Delete />
</el-icon>娓呯┖</el-button>
+ <el-button type="danger" @click="refresh('crud1')">閲嶇疆琛ㄦ牸</el-button>
</el-col>
</el-row>
</template>
@@ -111,14 +103,14 @@
<span>{{ row.name }}</span>
<!-- 鏇挎崲 v-if="permission.auto_dispatch"-->
- <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
+ <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="鏇挎崲" title="鏇挎崲"></el-button>
- <el-button :size="size" text
+ <el-button class="treebtn" :size="size" text
v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"
- icon="el-icon-lock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
- <el-button :size="size" text
+ icon="el-icon-unlock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
+ <el-button class="treebtn" :size="size" text
v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
- icon="el-icon-unlock" type="primary" @click="showUnLockDlg(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
+ icon="el-icon-lock" type="primary" @click="showUnLockDlg(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
</template>
</avue-crud>
</div>
@@ -189,7 +181,10 @@
</template>
<script>
+
+import { Delete, Edit, Search, Share, Upload ,Lock,Unlock} from '@element-plus/icons-vue'
import debounce from 'lodash/debounce';
+
import { ElMessage } from 'element-plus';
import TodolistLeft from './components/TodolistLeft.vue';
import TodolistRightTop from './components/TodolistRightTop.vue';
@@ -202,6 +197,7 @@
data() {
let rejectText = '椹冲洖';//+this.row.categoryName;
return {
+ size:'large',//鏍戦噷鎸夐挳鐨勫昂瀵�
isSearch: null,
treeSearchLoad: false,
drawingNoList: [],
@@ -472,12 +468,18 @@
disabled:true,
labelWidth: "120",
},
-
{
label: '閿佸畾鍘熷洜',
prop: 'remark',
type: "textarea",
disabled:true,
+ labelWidth: "120",
+ span: 24,
+ },
+ {
+ label: '瑙i攣鍘熷洜',
+ prop: 'unlockReason',
+ type: "textarea",
labelWidth: "120",
span: 24,
}
@@ -770,7 +772,6 @@
return time.getTime() > today.getTime() || time.getTime() < threeMonthsAgo.getTime();//
},
createTimeChange(value) {
- console.log('createTimeChange', value)
this.searchTreeData.createTimeBegin = value[0];
this.searchTreeData.createTimeEnd = value[1];
},
@@ -801,6 +802,15 @@
this.drawingNoList = drawingNoList;
});
},
+ refresh(refname){
+ this.treeData=[];
+ //this.$refs[refname].doLayout();
+ this.$refs[refname].refreshTable();
+ let curS = this.isSearch;
+ this.isSearch = null;
+ this.onLoad();
+ this.isSearch = !curS
+ },
showLockDlg(row){
//this.lockForm = row;
this.lockForm.id = row.id;
@@ -817,11 +827,11 @@
this.unlockForm.id = row.id;
this.unlockForm.name = row.name
this.unlockForm.remark = row.remark;
+ this.unlockForm.unlockReason='';
this.unlockForm.parentId = row.parentId;
this.unlockBox = true;
},
lockSubmit(row,done) {
- //console.log(row,done)
//閿佸畾鎻愪氦
this.$confirm('鏄惁閿佸畾', {
confirmButtonText: '纭畾',
@@ -829,11 +839,10 @@
type: 'warning',
}).then(() => {
axios.post('/blade-mdm/program/node/lock',qs.stringify(this.lockForm)).then(res=>{
- console.log('res',res.data)
if (res.data.code == 200) {
this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛!' });
this.addLocalTreeNode(this.lockForm.parentId);
-
+ this.lockBox = false;
} else {
this.$message({ type: 'error', message: res.data.msg });
}
@@ -856,13 +865,14 @@
axios({
url: '/blade-mdm/flow/lock/start-unlock',
method: 'post',
- params: {nodeId: row.id }
+ params: {nodeId: row.id,unlockReason:row.unlockReason }
}).then(res => {
if (res.data.code == 200) {
this.$message({ type: 'success', message: '瑙i攣娴佺▼宸插惎鍔�!' });
this.addLocalTreeNode(row.parentId);
+ this.unlockBox = false;
} else {
- this.$message({ type: 'success', message: res.data.msg });
+ this.$message({ type: 'error', message: res.data.msg });
}
});
done();
@@ -894,34 +904,9 @@
done();
this.todolistModel = false;
}).catch(error => {
- window.console.log('haha', error);
done();
});
- // if(this.row.taskDefinitionKey === 'programmingTask') {
- // // if(this.applist.length !== 1) {
- // // done();
- // // return this.$message.success('璇烽�夋嫨1涓▼搴�');
- // // }
- // }
- // approve({
- // ...this.formApprove,
- // taskId: this.row.taskId,
- // processInstanceId: this.row.processInstanceId,
- // // programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
- // }).then(res => {
- // if(res.data.code !== 200) {
- // this.$message.error(res.data.msg);
- // done();
- // return;
- // }
- // this.$message.success('瀹℃壒鎴愬姛');
- // this.approveBox = false;
- // this.onLoad(this.page, this.query);
- // done();
- // }).catch(err => {
- // done();
- // console.error(err);
- // });
+
},
todoSelectionChange(applist) {
this.applist = applist;
@@ -1001,7 +986,6 @@
return treeData.map(node => {
if (node.children && node.children.length > 0) {
this.defaultExpandedKeys.push(node.id);
- console.log('>>>>>>>>', this.defaultExpandedKeys)
node.children = this.removeHasChildren(node.children);
}
if (node.children.length > 0) {
@@ -1014,10 +998,10 @@
});
},
searchTree() {
- if (this.searchTreeData.programStatus.length == 0 || this.searchTreeData.drawingNo == ""){
+ if (this.searchTreeData.programStatus.length == 0 || !this.searchTreeData.drawingNo){
this.$message.warning('璇疯緭鍏ョ▼搴忕姸鎬佸拰闆剁粍浠跺彿杩涜鎼滅储');
return;
- }
+ }
this.treeSearchLoad = true;
this.isSearch = !this.isSearch
@@ -1037,7 +1021,6 @@
};
// this.option.defaultExpandAll = true;
let treeData = this.removeHasChildren(res.data.data);
- console.log('treeData', treeData)
this.option = Object.assign({},this.option,{defaultExpandedKeys: this.defaultExpandedKeys,lazy: true,defaultExpandAll: true});
setTimeout(() => {
this.treeSearchLoad = false;
@@ -1194,7 +1177,7 @@
this.tabsOption = this.tabsOption1;
} else {
this.tabsOption = this.tabsOption2;
- //鑾峰彇鏂囦欢list
+ //鑾峰彇鏂囦欢鍐呭
this.getFile(row.id);
//鑾峰彇鍘嗗彶璁板綍
this.getHistory(row.id);
@@ -1229,7 +1212,7 @@
getFile(id) { //鏌ョ湅鏂囦欢鍐呭
this.loading = true;
axios({
- url: '/blade-mdm/program/ncfile/content-by-nodeid',
+ url: '/blade-mdm/program/node/content-by-nodeid',
method: 'get',
params: { nodeId: id },
}).then(
@@ -1277,50 +1260,7 @@
this.modalBox = true;
this.modalForm = row;
},
- showDel(row) {
- this.$confirm('灏嗕細鍒犻櫎璇ヨ妭鐐瑰強鍏跺瓙鑺傜偣锛屾槸鍚︾‘璁ゅ垹闄�?', {
- confirmButtonText: '鏄�',
- cancelButtonText: '鍚�',
- type: 'warning',
- }).then(() => {
- //璋冪敤鎺ュ彛
- this.loading = true;
- axios({
- url: '/blade-mdm/program/node/remove',
- method: 'post',
- params: { id: row.id },
- }).then(
- res => {
- this.loading = false;
- this.addLocalTreeNode(row.parentId);
- }
- );
- })
- },
- showAdd(row) { //鏂板瀛愯妭鐐�
- if (!row) {
- this.modalTitle = "鏂板鏍硅妭鐐�";
- this.modalForm.nodeType = this.nodeTypeList[0].dictKey;
- this.modalForm.parentId = 0;
- } else {
- if (row.nodeType == 60) { //绋嬪簭鍖�
- return;
- }
- var defalutNodeType = ""; //涓嬩竴绾ц妭鐐圭被鍨�
- for (var i = 0; i < this.nodeTypeList.length; i++) {
- if (row.nodeType == this.nodeTypeList[i].dictKey) {
- defalutNodeType = this.nodeTypeList[i + 1].dictKey;
- }
- }
- this.modalTitle = "鏂板瀛愯妭鐐�";
- this.selectedColumn.nodeType = defalutNodeType;
- this.selectedColumn.parentId = row.id;
- this.selectedColumn.name = "";
- this.selectedColumn.id = "";
- this.modalForm = this.selectedColumn;
- }
- this.modalBox = true;
- },
+
modalSubmit(row, done) { //鏂板瀛愯妭鐐逛繚瀛�/淇敼
if (this.modalTitle == "淇敼") {
var url = "/blade-mdm/program/node/update";
@@ -1382,7 +1322,6 @@
this.uploadmodalBox = false;
},
treeLoad(tree, treeNode, resolve) {
- console.log('tree', tree, treeNode, this.option)
this.loading = true;
var obj = { parentId: tree.id }
@@ -1470,6 +1409,9 @@
</script>
<style lang="scss">
+.treebtn {
+ font-size:16px;
+}
.norightmenu .avue-crud .avue-crud__header {
display: none !important;
}
--
Gitblit v1.9.3