From cafa9ae77da5ae18db0336a353a79a639b7cc299 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 17 八月 2025 10:32:46 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/mdmweb
---
src/views/wel/shemi.vue | 103 +++++++++++++++++++++++++++++++++++++++------------
1 files changed, 78 insertions(+), 25 deletions(-)
diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index bef2816..dc80391 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -22,7 +22,7 @@
</el-col>
<el-col :span="6">
<el-select v-model="search.nodeType" placeholder="璇疯緭鍏ヨ妭鐐圭被鍨�" clearable>
- <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/>
+ <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/>formApprove.
</el-select>
</el-col>
<el-col :span="6">
@@ -46,7 +46,8 @@
<!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="涓嬪彂" title="涓嬪彂"></el-button> -->
<!-- 鏇挎崲 -->
<el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,')>-1" icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="鏇挎崲" title="鏇挎崲"></el-button>
- <!-- <el-icon><Switch /></el-icon> -->
+ <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1 && !row.isLocked" icon="el-icon-lock" type="primary" @click="locked(row,true)" placeholder="閿佸畾" title="閿佸畾"></el-button>
+ <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1 && row.isLocked" icon="el-icon-unlock" type="primary" @click="locked(row,false)" placeholder="瑙i攣" title="瑙i攣"></el-button>
</template>
</avue-crud>
<!-- 鏂板鑺傜偣 -->
@@ -65,9 +66,9 @@
</el-dialog>
<avue-tabs :option="tabsOption" @change="tabsHandleChange" style="margin-top: 30px;" v-if="isShowTabs"></avue-tabs>
<avue-form v-if="tabsType == 'tab1'" :option="tabsFormOption" v-model="tabsForm"></avue-form>
- <span v-else-if="tabsType == 'tab2'">鐗堟湰淇℃伅</span>
+ <!--<span v-else-if="tabsType == 'tab2'">鐗堟湰淇℃伅</span>-->
<template v-else-if="tabsType == 'tab3'">
- <div v-html="convertToHtml(fileContent)"></div>
+ <div v-html="convertToHtml(fileContent)" class="convertToHtml"></div>
</template>
<template v-else-if="tabsType == 'tab4'">
<avue-crud :addBtn="false" :option="tabsFormOption4" :data="tabsForm4" ref="crud4" @selection-change="selectionChange">
@@ -91,10 +92,10 @@
<el-drawer title="鏇挎崲" append-to-body v-model="todolistModel" size="100%" class="code-box">
<div class="approve-box">
<div class="left">
- <TodolistLeft :row="row" @selection-change="todoSelectionChange" />
+ <TodolistLeft :row="row" :replaceDataId="replaceDataId" :drawingNo="drawingNo" :processNo="processNo" :processEdition="processEdition" @selection-change="todoSelectionChange" />
</div>
<div class="right">
- <TodolistRightTop :row="row" />
+ <TodolistRightTop :row="row" :name="name" />
<avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleSubmit" />
</div>
</div>
@@ -113,6 +114,9 @@
data() {
let rejectText = '椹冲洖';//+this.row.categoryName;
return {
+ drawingNo: '',
+ processNo: '',
+ processEdition: '',
replaceDataId: "",
formApprove: {
title: '',
@@ -161,7 +165,6 @@
rules: [
{
validator: (rule, value, callback) => {
- console.log('-------',this.formApprove)
if (value === '' && this.formApprove.approve !== 'Y') {
callback(new Error('璇疯緭鍏ュ娉�'));
} else {
@@ -208,22 +211,22 @@
icon: 'el-icon-info',
label: '鑺傜偣淇℃伅',
prop: 'tab1',
- }, {
+ }/*, {
icon: 'el-icon-warning',
label: '鐗堟湰淇℃伅',
prop: 'tab2',
- }]
+ }*/]
},
tabsOption2: {
column: [{
icon: 'el-icon-info',
label: '鑺傜偣淇℃伅',
prop: 'tab1',
- }, {
+ },/* {
icon: 'el-icon-warning',
label: '鐗堟湰淇℃伅',
prop: 'tab2',
- }, {
+ }, */{
icon: 'el-icon-warning',
label: '鏂囦欢鍐呭',
prop: 'tab3'
@@ -260,25 +263,25 @@
prop: 'createTime',
disabled: true,
placeholder: " "
- },
+ },/*
{
label: '鑺傜偣鎻忚堪',
prop: 'description',
disabled: true,
placeholder: " "
- },
+ },*/
{
label: '淇敼鏃堕棿',
prop: 'updateTime',
disabled: true,
placeholder: " "
- },
+ }/*,
{
label: '澶囨敞',
prop: 'remark',
disabled: true,
placeholder: " "
- }
+ }*/
]
},
tabsForm: {},
@@ -410,7 +413,7 @@
return '';
}
}
- },
+ },/*
{
label: '鐗堟',
prop: 'processEdition',
@@ -425,16 +428,16 @@
{
label: '鎻忚堪',
prop: 'abc'
- },
+ },*/
{
label: '绫诲瀷',
prop: 'nodeTypeName'
- },
+ },/*
{
label: '璁惧',
prop: 'machineCode'
},
-
+ */
{
label: '閿佸畾鐘舵��',
prop: 'isLocked',
@@ -457,25 +460,30 @@
//闈炵▼搴忚妭鐐�
return '';
}else{
- if(value==0||value==null){
+ if(value==0||value==-1){
return '鏈惎鍔�';
}else if(value == 1){
return '瀹℃壒涓�';
}else if(value == 2){
return '宸查�氳繃';
}else{
- return '鏈畾涔�';
+ return '';
}
}
},
- },
+ },/*
{
label: '娴嬭瘯绋嬪簭',
prop: 'abc'
- },
+ },*/
{
label: '鍒涘缓浜�',
prop: 'createUserName',
+ width: '180'
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
width: '180'
}
],
@@ -622,12 +630,34 @@
},
methods: {
+ locked(row, isLock) {
+ row.isLocked == isLock
+ this.$confirm(`鏄惁${isLock ? '閿佸畾' : '瑙i攣'}`, {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+
+ axios({
+ url: isLock ? '/blade-mdm/program/node/lock' : '/blade-mdm/flow/lock/start-unlock',
+ method: 'post',
+ params: {id: row.id,node: row.id}
+ }).then(res => {
+ if(res.data.code == 200) {
+ this.$message({type: 'success',message: '鎿嶄綔鎴愬姛!'});
+ }else {
+ this.$message({type: 'success',message: res.data.msg});
+ }
+ });
+ });
+ },
handleSubmit(form, done) {
//鍙戣捣绋嬪簭鏇挎崲娴佺▼
var obj = {
title: this.formApprove.title,
nodeId: this.id,
tempInstanceId: this.replaceDataId,
+ comment: this.formApprove.comment,
assignee: this.formApprove.assignee
}
axios({
@@ -686,12 +716,31 @@
}).then(
resp => {
this.row = row;
- this.replaceDataId = resp.data.data;
+ this.replaceDataId = resp.data.data.processInstanceId;
+ this.processNo = resp.data.data.processNo;
+ this.processEdition = resp.data.data.processEdition;
+ this.drawingNo = resp.data.data.drawingNo;
+ this.formApprove.title = resp.data.data.name + "鏇挎崲";
+ this.getHandler(); //鑾峰彇澶勭悊浜�
this.todolistModel = true;
});
},
+ getHandler() { //鑾峰彇澶勭悊浜�
+ axios({
+ url: '/blade-mdm/flow/replace/default-assignees',
+ method: 'get',
+ params: {drawingNo: this.drawingNo}
+ }).then(
+ resp => {
+ if(resp.data.code == 200) {
+ this.formApprove.assignee = resp.data.data.checkerId;
+ }else {
+ this.$message.success(resp.msg);
+ }
+ });
+ },
convertToHtml(text) {
- return text.replace(/\r\n/g, '<br>');
+ return text.replace(/\n/g, '<br>');
},
removeHasChildren(treeData) { //鏌ヨ鏃跺�欎娇鐢紝鍒犳帀hasChildren
return treeData.map(node => {
@@ -1153,6 +1202,10 @@
flex: 1;
}
}
+.convertToHtml {
+ background-color: #fffee1;
+ padding: 6px 12px;
+}
</style>
<style>
.highlight-row {
--
Gitblit v1.9.3