clay : 退回做了一半 #31
|
|
@ -70,7 +70,7 @@ export default {
|
||||||
this.$set(user, "color", "#0bbd87")
|
this.$set(user, "color", "#0bbd87")
|
||||||
}
|
}
|
||||||
//审批处理中
|
//审批处理中
|
||||||
if (state === 'process') {
|
if (state === 'running') {
|
||||||
this.$set(user, "icon", "el-icon-loading")
|
this.$set(user, "icon", "el-icon-loading")
|
||||||
this.$set(user, "color", "#f78f5f")
|
this.$set(user, "color", "#f78f5f")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<!--显示退回节点弹出框-->
|
<!--显示退回节点弹出框-->
|
||||||
<div v-if="type === 4" style="margin-bottom: 10px">
|
<div v-if="type === 4" style="margin-bottom: 10px">
|
||||||
<span>回退节点:</span>
|
<span>回退节点:</span>
|
||||||
<el-select v-if="userTaskOption.length >0 " v-model="backNode" slot="prepend" placeholder="选择要回退到的节点">
|
<el-select v-if="userTaskOption.length >0 " v-model="rollBackId" slot="prepend" placeholder="选择要回退到的节点">
|
||||||
<el-option v-for="(option,index) in userTaskOption" :key="index"
|
<el-option v-for="(option,index) in userTaskOption" :key="index"
|
||||||
:label="option.label" :value="option.value"/>
|
:label="option.label" :value="option.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div slot="tip" class="el-upload__tip">添加图片 {{ sizeTip }}</div>
|
<div slot="tip" class="el-upload__tip">添加图片 {{ sizeTip }}</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-dialog :visible.sync="dialogVisible" center append-to-body>
|
<el-dialog :visible.sync="dialogVisible" center append-to-body>
|
||||||
<div>
|
<div>
|
||||||
<img width="100%" :src="dialogImageUrl" alt="" style="z-index: 3435">
|
<img width="100%" :src="dialogImageUrl" alt="" style="z-index: 3435">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -140,7 +140,7 @@ export default {
|
||||||
authorization: localStorage.getItem("token")
|
authorization: localStorage.getItem("token")
|
||||||
},
|
},
|
||||||
context: null,
|
context: null,
|
||||||
backNode: null,
|
rollBackId: null,
|
||||||
dialogImageUrl: '',
|
dialogImageUrl: '',
|
||||||
dialogVisible: false
|
dialogVisible: false
|
||||||
};
|
};
|
||||||
|
|
@ -196,7 +196,7 @@ export default {
|
||||||
deleteFile(file.id).then(res => {
|
deleteFile(file.id).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
this.$message.success("删除成功")
|
this.$message.success("删除成功")
|
||||||
this.fileList.splice( this.fileList.findIndex((item)=>item.id===file.id),1)
|
this.fileList.splice(this.fileList.findIndex((item) => item.id === file.id), 1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -222,7 +222,8 @@ export default {
|
||||||
})
|
})
|
||||||
let data = {
|
let data = {
|
||||||
context: this.context,
|
context: this.context,
|
||||||
attachments: fileList
|
attachments: fileList,
|
||||||
|
rollBackId: this.rollBackId,
|
||||||
}
|
}
|
||||||
this.$emit("ok", data, this.type)
|
this.$emit("ok", data, this.type)
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ export default {
|
||||||
//获取角色信息
|
//获取角色信息
|
||||||
getRole() {
|
getRole() {
|
||||||
getRole().then(res => {
|
getRole().then(res => {
|
||||||
console.log('系统角色',res.data);
|
|
||||||
this.roleList= res.data.map(function (val){
|
this.roleList= res.data.map(function (val){
|
||||||
return {roleId:val.value,roleName:val.label}
|
return {roleId:val.value,roleName:val.label}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ export default new Vuex.Store({
|
||||||
runningList: [],
|
runningList: [],
|
||||||
endList: [],
|
endList: [],
|
||||||
noTakeList: [],
|
noTakeList: [],
|
||||||
|
refuseList: [],
|
||||||
|
passList: [],
|
||||||
design:{},
|
design:{},
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
|
|
||||||
|
|
@ -32,20 +32,26 @@ export default {
|
||||||
dom() {
|
dom() {
|
||||||
return this.$store.state.design.process;
|
return this.$store.state.design.process;
|
||||||
},
|
},
|
||||||
viewer(){
|
viewer() {
|
||||||
return this.$store.state.diagramMode === 'viewer'
|
return this.$store.state.diagramMode === 'viewer'
|
||||||
},
|
},
|
||||||
preview(){
|
preview() {
|
||||||
return this.$store.state.preview;
|
return this.$store.state.preview;
|
||||||
},
|
},
|
||||||
runningList(){
|
runningList() {
|
||||||
return this.$store.state.runningList
|
return this.$store.state.runningList
|
||||||
},
|
},
|
||||||
endList(){
|
endList() {
|
||||||
return this.$store.state.endList
|
return this.$store.state.endList
|
||||||
},
|
},
|
||||||
noTakeList(){
|
noTakeList() {
|
||||||
return this.$store.state.noTakeList
|
return this.$store.state.noTakeList
|
||||||
|
},
|
||||||
|
refuseList() {
|
||||||
|
return this.$store.state.refuseList
|
||||||
|
},
|
||||||
|
passList() {
|
||||||
|
return this.$store.state.passList
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render(h, ctx) {
|
render(h, ctx) {
|
||||||
|
|
@ -63,17 +69,19 @@ export default {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
if (node.props && this.viewer && !this.preview) {
|
if (node.props && this.viewer && !this.preview) {
|
||||||
let headerBgc = '#ff943e'
|
let headerBgc = '#ff943e'
|
||||||
if (this.runningList.includes(node.id)) {
|
if (this.runningList.includes(node.id)) {
|
||||||
headerBgc = '#1e90ff'
|
headerBgc = '#1e90ff'
|
||||||
}
|
} else if (this.endList.includes(node.id)) {
|
||||||
else if (this.endList.includes(node.id)) {
|
headerBgc = '#20b2aa'
|
||||||
headerBgc = '#20b2aa'
|
} else if (this.noTakeList.includes(node.id)) {
|
||||||
}
|
headerBgc = '#909399'
|
||||||
else if (this.noTakeList.includes(node.id)) {
|
} else if (this.refuseList.includes(node.id)) {
|
||||||
headerBgc = '#909399'
|
headerBgc = '#f56c6c'
|
||||||
}
|
} else if (this.passList.includes(node.id)) {
|
||||||
node.props.headerBgc = headerBgc
|
headerBgc = '#ff943e'
|
||||||
|
}
|
||||||
|
node.props.headerBgc = headerBgc
|
||||||
}
|
}
|
||||||
if (this.isPrimaryNode(node)) {
|
if (this.isPrimaryNode(node)) {
|
||||||
//普通业务节点
|
//普通业务节点
|
||||||
|
|
@ -97,7 +105,7 @@ export default {
|
||||||
//插入添加分支/条件的按钮
|
//插入添加分支/条件的按钮
|
||||||
branchItems.unshift(h('div', {'class': {'add-branch-btn': true}}, [
|
branchItems.unshift(h('div', {'class': {'add-branch-btn': true}}, [
|
||||||
h('el-button', {
|
h('el-button', {
|
||||||
'class': {'add-branch-btn-el': !this.viewer},
|
'class': {'add-branch-btn-el': !this.viewer},
|
||||||
props: {size: 'small', round: true},
|
props: {size: 'small', round: true},
|
||||||
on: {click: () => this.addBranchNode(node)},
|
on: {click: () => this.addBranchNode(node)},
|
||||||
domProps: {
|
domProps: {
|
||||||
|
|
@ -160,7 +168,7 @@ export default {
|
||||||
this.nodeMap.set(nodeItem.id, nodeItem)
|
this.nodeMap.set(nodeItem.id, nodeItem)
|
||||||
this.parentMap.set(nodeItem.parentId, nodeItem)
|
this.parentMap.set(nodeItem.parentId, nodeItem)
|
||||||
})
|
})
|
||||||
}catch (e){
|
} catch (e) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//id映射到map,用来向上遍历
|
//id映射到map,用来向上遍历
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadFormConfig(formItems) {
|
loadFormConfig(formItems) {
|
||||||
console.log(formItems)
|
|
||||||
formItems.forEach(item => {
|
formItems.forEach(item => {
|
||||||
console.log(item.perm === 'E',item,"item")
|
|
||||||
if (item.name === 'SpanLayout') {
|
if (item.name === 'SpanLayout') {
|
||||||
this.loadFormConfig(item.props.items)
|
this.loadFormConfig(item.props.items)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -98,11 +96,8 @@ export default {
|
||||||
if (this.isPreview) {
|
if (this.isPreview) {
|
||||||
this.$set(item, 'perm', this.model)
|
this.$set(item, 'perm', this.model)
|
||||||
}
|
}
|
||||||
console.log(item.perm === 'E',item,"item")
|
|
||||||
if (item.perm === 'E') {
|
if (item.perm === 'E') {
|
||||||
console.log("进去了")
|
|
||||||
if (item.props.required) {
|
if (item.props.required) {
|
||||||
console.log("开始制作权限了")
|
|
||||||
this.$set(this.rules, item.id, [{
|
this.$set(this.rules, item.id, [{
|
||||||
type: item.valueType === 'Array' ? 'array' : undefined,
|
type: item.valueType === 'Array' ? 'array' : undefined,
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -112,7 +107,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.rules)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log(this.operationList)
|
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -120,22 +119,18 @@ export default {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// let operationListNew = []
|
// let operationListNew = []
|
||||||
console.log(this.operationList.length, "sdjshjdhasjds")
|
|
||||||
for (let i = 0;i<this.operationList.length;i++) {
|
for (let i = 0;i<this.operationList.length;i++) {
|
||||||
let operationNew = this.initOperationFun(this.operationList[i])
|
let operationNew = this.initOperationFun(this.operationList[i])
|
||||||
console.log(operationNew, "sdjshjdhasjds")
|
|
||||||
let userList = []
|
let userList = []
|
||||||
for (let user of operationNew.userInfo) {
|
for (let user of operationNew.userInfo) {
|
||||||
let userNew = this.initUser(user)
|
let userNew = this.initUser(user)
|
||||||
userList.push(userNew)
|
userList.push(userNew)
|
||||||
}
|
}
|
||||||
console.log(userList, "userList")
|
|
||||||
operationNew.userInfo = userList
|
operationNew.userInfo = userList
|
||||||
// operationListNew.push(operationNew)
|
// operationListNew.push(operationNew)
|
||||||
// this.operationList.push(operationNew)
|
// this.operationList.push(operationNew)
|
||||||
this.operationList[i] = operationNew
|
this.operationList[i] = operationNew
|
||||||
}
|
}
|
||||||
console.log(this.operationList, "operationListNew")
|
|
||||||
},
|
},
|
||||||
//获取到对应附件的地址
|
//获取到对应附件的地址
|
||||||
getAttachmentList(attachments, image) {
|
getAttachmentList(attachments, image) {
|
||||||
|
|
@ -160,7 +155,7 @@ export default {
|
||||||
this.$set(user, "color", "#0bbd87")
|
this.$set(user, "color", "#0bbd87")
|
||||||
}
|
}
|
||||||
//审批处理中
|
//审批处理中
|
||||||
if (state === 'process') {
|
if (state === 'running') {
|
||||||
this.$set(user, "icon", "el-icon-loading")
|
this.$set(user, "icon", "el-icon-loading")
|
||||||
this.$set(user, "color", "#f78f5f")
|
this.$set(user, "color", "#f78f5f")
|
||||||
}
|
}
|
||||||
|
|
@ -176,7 +171,6 @@ export default {
|
||||||
return user;
|
return user;
|
||||||
},
|
},
|
||||||
initOperationFun(operation) {
|
initOperationFun(operation) {
|
||||||
console.log("开始处理内容了")
|
|
||||||
let state = operation.state
|
let state = operation.state
|
||||||
let type = operation.operation
|
let type = operation.operation
|
||||||
//创建节点
|
//创建节点
|
||||||
|
|
@ -196,7 +190,7 @@ export default {
|
||||||
this.$set(operation, "color", "#c0c4cc")
|
this.$set(operation, "color", "#c0c4cc")
|
||||||
}
|
}
|
||||||
//审批处理中
|
//审批处理中
|
||||||
if (state === 'process') {
|
if (state === 'running') {
|
||||||
this.$set(operation, "icon", "el-icon-loading")
|
this.$set(operation, "icon", "el-icon-loading")
|
||||||
this.$set(operation, "color", "#f78f5f")
|
this.$set(operation, "color", "#f78f5f")
|
||||||
this.$set(operation, "remark", operation.userInfo.name + ' (处理中)')
|
this.$set(operation, "remark", operation.userInfo.name + ' (处理中)')
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="node">
|
<div class="node">
|
||||||
<!-- 并行分支选择后右侧出现操作面板,占时不需要 <div class="node-body" @click="$emit('selected')">-->
|
<!-- 并行分支选择后右侧出现操作面板,占时不需要 <div class="node-body" @click="$emit('selected')">-->
|
||||||
<div class="node-body" @click="$emit('selected')">
|
<div v-if="designStart()" class="node-body" @click="$emit('selected')">
|
||||||
<div class="node-body-left" @click.stop="$emit('leftMove')" v-if="level > 1 && designStart() ">
|
<div class="node-body-left" @click.stop="$emit('leftMove')" v-if="level > 1 && designStart() ">
|
||||||
<i class="el-icon-arrow-left"></i>
|
<i class="el-icon-arrow-left"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="node-footer">
|
<div class="node-footer">
|
||||||
<div class="btn">
|
<div class="btn" :style="(designStart() ? '' : 'height:0px')">
|
||||||
<insert-button v-if="designStart()" @insertNode="type => $emit('insertNode', type)"></insert-button>
|
<insert-button v-if="designStart()" @insertNode="type => $emit('insertNode', type)"></insert-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,8 @@ export default {
|
||||||
that.$store.state.runningList = data.runningList;
|
that.$store.state.runningList = data.runningList;
|
||||||
that.$store.state.endList = data.endList;
|
that.$store.state.endList = data.endList;
|
||||||
that.$store.state.noTakeList = data.noTakeList;
|
that.$store.state.noTakeList = data.noTakeList;
|
||||||
|
that.$store.state.refuseList = data.refuseList;
|
||||||
|
that.$store.state.passList = data.passList;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
console.log(data, "获取到的结果数据")
|
console.log(data, "获取到的结果数据")
|
||||||
})
|
})
|
||||||
|
|
@ -144,7 +146,6 @@ export default {
|
||||||
formData: {},
|
formData: {},
|
||||||
formItems: [],
|
formItems: [],
|
||||||
processList: [],
|
processList: [],
|
||||||
operationList: [],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
@ -152,6 +153,8 @@ export default {
|
||||||
this.$store.state.runningList = [];
|
this.$store.state.runningList = [];
|
||||||
this.$store.state.endList = [];
|
this.$store.state.endList = [];
|
||||||
this.$store.state.noTakeList = [];
|
this.$store.state.noTakeList = [];
|
||||||
|
this.$store.state.refuseList = [];
|
||||||
|
this.$store.state.passList = [];
|
||||||
this.$store.state.diagramMode = "viewer";
|
this.$store.state.diagramMode = "viewer";
|
||||||
this.$store.state.preview = false;
|
this.$store.state.preview = false;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -172,11 +172,12 @@ export default {
|
||||||
that.taskData = res.data;
|
that.taskData = res.data;
|
||||||
that.$store.state.design = that.taskData;
|
that.$store.state.design = that.taskData;
|
||||||
that.$store.state.userTaskOption = that.taskData.userTaskOption;
|
that.$store.state.userTaskOption = that.taskData.userTaskOption;
|
||||||
|
|
||||||
|
console.log(that.taskData.userTaskOption,"that.taskData.userTaskOption")
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitTask() {
|
submitTask() {
|
||||||
console.log("wqeqwqewqe")
|
|
||||||
this.$refs.taskViewForm.validate(valid =>{
|
this.$refs.taskViewForm.validate(valid =>{
|
||||||
if (valid){
|
if (valid){
|
||||||
let params = {
|
let params = {
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,6 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
validate(call) {
|
validate(call) {
|
||||||
console.log("我被调用了")
|
|
||||||
this.$refs.initiateForm.validate(call);
|
this.$refs.initiateForm.validate(call);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,8 @@ export default {
|
||||||
that.$store.state.runningList = data.runningList;
|
that.$store.state.runningList = data.runningList;
|
||||||
that.$store.state.endList = data.endList;
|
that.$store.state.endList = data.endList;
|
||||||
that.$store.state.noTakeList = data.noTakeList;
|
that.$store.state.noTakeList = data.noTakeList;
|
||||||
|
that.$store.state.refuseList = data.refuseList;
|
||||||
|
that.$store.state.passList = data.passList;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -143,13 +145,14 @@ export default {
|
||||||
formData: {},
|
formData: {},
|
||||||
formItems: [],
|
formItems: [],
|
||||||
processList: [],
|
processList: [],
|
||||||
operationList: [],
|
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.state.design = this.taskData;
|
this.$store.state.design = this.taskData;
|
||||||
this.$store.state.runningList = [];
|
this.$store.state.runningList = [];
|
||||||
this.$store.state.endList = [];
|
this.$store.state.endList = [];
|
||||||
this.$store.state.noTakeList = [];
|
this.$store.state.noTakeList = [];
|
||||||
|
this.$store.state.refuseList = [];
|
||||||
|
this.$store.state.passList = [];
|
||||||
this.$store.state.diagramMode = "viewer";
|
this.$store.state.diagramMode = "viewer";
|
||||||
this.$store.state.preview = false;
|
this.$store.state.preview = false;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,7 @@ export default {
|
||||||
taskId: this.taskId,
|
taskId: this.taskId,
|
||||||
formData : JSON.stringify(that.taskData.formData)
|
formData : JSON.stringify(that.taskData.formData)
|
||||||
}
|
}
|
||||||
console.log(params,"需要提交的数据")
|
|
||||||
completeTask(params).then(res =>{
|
completeTask(params).then(res =>{
|
||||||
console.log(res)
|
|
||||||
that.$parent.approveOpen = false
|
that.$parent.approveOpen = false
|
||||||
that.$parent.getList()
|
that.$parent.getList()
|
||||||
that.$message.success(res.msg)
|
that.$message.success(res.msg)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue