clay : 退回做了一半 #31
|
|
@ -70,7 +70,7 @@ export default {
|
|||
this.$set(user, "color", "#0bbd87")
|
||||
}
|
||||
//审批处理中
|
||||
if (state === 'process') {
|
||||
if (state === 'running') {
|
||||
this.$set(user, "icon", "el-icon-loading")
|
||||
this.$set(user, "color", "#f78f5f")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<!--显示退回节点弹出框-->
|
||||
<div v-if="type === 4" style="margin-bottom: 10px">
|
||||
<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"
|
||||
:label="option.label" :value="option.value"/>
|
||||
</el-select>
|
||||
|
|
@ -140,7 +140,7 @@ export default {
|
|||
authorization: localStorage.getItem("token")
|
||||
},
|
||||
context: null,
|
||||
backNode: null,
|
||||
rollBackId: null,
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false
|
||||
};
|
||||
|
|
@ -222,7 +222,8 @@ export default {
|
|||
})
|
||||
let data = {
|
||||
context: this.context,
|
||||
attachments: fileList
|
||||
attachments: fileList,
|
||||
rollBackId: this.rollBackId,
|
||||
}
|
||||
this.$emit("ok", data, this.type)
|
||||
this.visible = false;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ export default {
|
|||
//获取角色信息
|
||||
getRole() {
|
||||
getRole().then(res => {
|
||||
console.log('系统角色',res.data);
|
||||
this.roleList= res.data.map(function (val){
|
||||
return {roleId:val.value,roleName:val.label}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ export default new Vuex.Store({
|
|||
runningList: [],
|
||||
endList: [],
|
||||
noTakeList: [],
|
||||
refuseList: [],
|
||||
passList: [],
|
||||
design:{},
|
||||
},
|
||||
mutations: {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,12 @@ export default {
|
|||
noTakeList() {
|
||||
return this.$store.state.noTakeList
|
||||
},
|
||||
refuseList() {
|
||||
return this.$store.state.refuseList
|
||||
},
|
||||
passList() {
|
||||
return this.$store.state.passList
|
||||
},
|
||||
},
|
||||
render(h, ctx) {
|
||||
this.nodeMap.clear()
|
||||
|
|
@ -66,12 +72,14 @@ export default {
|
|||
let headerBgc = '#ff943e'
|
||||
if (this.runningList.includes(node.id)) {
|
||||
headerBgc = '#1e90ff'
|
||||
}
|
||||
else if (this.endList.includes(node.id)) {
|
||||
} else if (this.endList.includes(node.id)) {
|
||||
headerBgc = '#20b2aa'
|
||||
}
|
||||
else if (this.noTakeList.includes(node.id)) {
|
||||
} else if (this.noTakeList.includes(node.id)) {
|
||||
headerBgc = '#909399'
|
||||
} else if (this.refuseList.includes(node.id)) {
|
||||
headerBgc = '#f56c6c'
|
||||
} else if (this.passList.includes(node.id)) {
|
||||
headerBgc = '#ff943e'
|
||||
}
|
||||
node.props.headerBgc = headerBgc
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,9 +88,7 @@ export default {
|
|||
});
|
||||
},
|
||||
loadFormConfig(formItems) {
|
||||
console.log(formItems)
|
||||
formItems.forEach(item => {
|
||||
console.log(item.perm === 'E',item,"item")
|
||||
if (item.name === 'SpanLayout') {
|
||||
this.loadFormConfig(item.props.items)
|
||||
} else {
|
||||
|
|
@ -98,11 +96,8 @@ export default {
|
|||
if (this.isPreview) {
|
||||
this.$set(item, 'perm', this.model)
|
||||
}
|
||||
console.log(item.perm === 'E',item,"item")
|
||||
if (item.perm === 'E') {
|
||||
console.log("进去了")
|
||||
if (item.props.required) {
|
||||
console.log("开始制作权限了")
|
||||
this.$set(this.rules, item.id, [{
|
||||
type: item.valueType === 'Array' ? 'array' : undefined,
|
||||
required: true,
|
||||
|
|
@ -112,7 +107,6 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
console.log(this.rules)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.operationList)
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -120,22 +119,18 @@ export default {
|
|||
break
|
||||
}
|
||||
// let operationListNew = []
|
||||
console.log(this.operationList.length, "sdjshjdhasjds")
|
||||
for (let i = 0;i<this.operationList.length;i++) {
|
||||
let operationNew = this.initOperationFun(this.operationList[i])
|
||||
console.log(operationNew, "sdjshjdhasjds")
|
||||
let userList = []
|
||||
for (let user of operationNew.userInfo) {
|
||||
let userNew = this.initUser(user)
|
||||
userList.push(userNew)
|
||||
}
|
||||
console.log(userList, "userList")
|
||||
operationNew.userInfo = userList
|
||||
// operationListNew.push(operationNew)
|
||||
// this.operationList.push(operationNew)
|
||||
this.operationList[i] = operationNew
|
||||
}
|
||||
console.log(this.operationList, "operationListNew")
|
||||
},
|
||||
//获取到对应附件的地址
|
||||
getAttachmentList(attachments, image) {
|
||||
|
|
@ -160,7 +155,7 @@ export default {
|
|||
this.$set(user, "color", "#0bbd87")
|
||||
}
|
||||
//审批处理中
|
||||
if (state === 'process') {
|
||||
if (state === 'running') {
|
||||
this.$set(user, "icon", "el-icon-loading")
|
||||
this.$set(user, "color", "#f78f5f")
|
||||
}
|
||||
|
|
@ -176,7 +171,6 @@ export default {
|
|||
return user;
|
||||
},
|
||||
initOperationFun(operation) {
|
||||
console.log("开始处理内容了")
|
||||
let state = operation.state
|
||||
let type = operation.operation
|
||||
//创建节点
|
||||
|
|
@ -196,7 +190,7 @@ export default {
|
|||
this.$set(operation, "color", "#c0c4cc")
|
||||
}
|
||||
//审批处理中
|
||||
if (state === 'process') {
|
||||
if (state === 'running') {
|
||||
this.$set(operation, "icon", "el-icon-loading")
|
||||
this.$set(operation, "color", "#f78f5f")
|
||||
this.$set(operation, "remark", operation.userInfo.name + ' (处理中)')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="node">
|
||||
<!-- 并行分支选择后右侧出现操作面板,占时不需要 <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() ">
|
||||
<i class="el-icon-arrow-left"></i>
|
||||
</div>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -133,6 +133,8 @@ export default {
|
|||
that.$store.state.runningList = data.runningList;
|
||||
that.$store.state.endList = data.endList;
|
||||
that.$store.state.noTakeList = data.noTakeList;
|
||||
that.$store.state.refuseList = data.refuseList;
|
||||
that.$store.state.passList = data.passList;
|
||||
this.loading = false;
|
||||
console.log(data, "获取到的结果数据")
|
||||
})
|
||||
|
|
@ -144,7 +146,6 @@ export default {
|
|||
formData: {},
|
||||
formItems: [],
|
||||
processList: [],
|
||||
operationList: [],
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
|
@ -152,6 +153,8 @@ export default {
|
|||
this.$store.state.runningList = [];
|
||||
this.$store.state.endList = [];
|
||||
this.$store.state.noTakeList = [];
|
||||
this.$store.state.refuseList = [];
|
||||
this.$store.state.passList = [];
|
||||
this.$store.state.diagramMode = "viewer";
|
||||
this.$store.state.preview = false;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -172,11 +172,12 @@ export default {
|
|||
that.taskData = res.data;
|
||||
that.$store.state.design = that.taskData;
|
||||
that.$store.state.userTaskOption = that.taskData.userTaskOption;
|
||||
|
||||
console.log(that.taskData.userTaskOption,"that.taskData.userTaskOption")
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
submitTask() {
|
||||
console.log("wqeqwqewqe")
|
||||
this.$refs.taskViewForm.validate(valid =>{
|
||||
if (valid){
|
||||
let params = {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@ export default {
|
|||
});
|
||||
},
|
||||
validate(call) {
|
||||
console.log("我被调用了")
|
||||
this.$refs.initiateForm.validate(call);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,6 +132,8 @@ export default {
|
|||
that.$store.state.runningList = data.runningList;
|
||||
that.$store.state.endList = data.endList;
|
||||
that.$store.state.noTakeList = data.noTakeList;
|
||||
that.$store.state.refuseList = data.refuseList;
|
||||
that.$store.state.passList = data.passList;
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
|
|
@ -143,13 +145,14 @@ export default {
|
|||
formData: {},
|
||||
formItems: [],
|
||||
processList: [],
|
||||
operationList: [],
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.state.design = this.taskData;
|
||||
this.$store.state.runningList = [];
|
||||
this.$store.state.endList = [];
|
||||
this.$store.state.noTakeList = [];
|
||||
this.$store.state.refuseList = [];
|
||||
this.$store.state.passList = [];
|
||||
this.$store.state.diagramMode = "viewer";
|
||||
this.$store.state.preview = false;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -51,9 +51,7 @@ export default {
|
|||
taskId: this.taskId,
|
||||
formData : JSON.stringify(that.taskData.formData)
|
||||
}
|
||||
console.log(params,"需要提交的数据")
|
||||
completeTask(params).then(res =>{
|
||||
console.log(res)
|
||||
that.$parent.approveOpen = false
|
||||
that.$parent.getList()
|
||||
that.$message.success(res.msg)
|
||||
|
|
|
|||
Loading…
Reference in New Issue