Compare commits
No commits in common. "2bed6ea74c597c95a08f136ea3e2c2ff0dedd906" and "b9e45dd82c8a8e848e507a46623fb50b90aa9a5b" have entirely different histories.
2bed6ea74c
...
b9e45dd82c
|
|
@ -51,6 +51,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
validate(call) {
|
validate(call) {
|
||||||
|
console.log("我被触发了")
|
||||||
let success = true
|
let success = true
|
||||||
this.$refs.form.validate(valid => {
|
this.$refs.form.validate(valid => {
|
||||||
success = valid
|
success = valid
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form ref="formView" class="process-form" label-position="top" :rules="rules" :model="_value">
|
<el-form class="process-form" label-position="top" :rules="rules" :model="_value">
|
||||||
<div v-for="(item, index) in formItems" :key="item.name + index">
|
<div v-for="(item, index) in formItems" :key="item.name + index">
|
||||||
<el-form-item v-if="item.name !== 'SpanLayout' && item.name !== 'Description'"
|
<el-form-item v-if="item.name !== 'SpanLayout' && item.name !== 'Description'"
|
||||||
:prop="item.id" :label="item.title">
|
:prop="item.id" :label="item.title">
|
||||||
|
|
@ -62,35 +62,8 @@ export default {
|
||||||
this.loadFormConfig(this.formItems)
|
this.loadFormConfig(this.formItems)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
validate(call) {
|
|
||||||
console.log("我被执行了")
|
|
||||||
|
|
||||||
let success = true
|
|
||||||
this.$refs.formView.validate(valid => {
|
|
||||||
success = valid
|
|
||||||
if(valid){
|
|
||||||
//校验成功再校验内部
|
|
||||||
for (let i = 0; i < this.formItems.length; i++) {
|
|
||||||
if (this.formItems[i].name === 'TableList'){
|
|
||||||
let formRef = this.$refs[`sub-item_${this.formItems[i].id}`]
|
|
||||||
if (formRef && Array.isArray(formRef) && formRef.length > 0){
|
|
||||||
formRef[0].validate(subValid => {
|
|
||||||
success = subValid
|
|
||||||
})
|
|
||||||
if (!success){
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
call(success)
|
|
||||||
});
|
|
||||||
},
|
|
||||||
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 +71,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 +82,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.rules)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,13 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.init();
|
this.init();
|
||||||
getTaskInfo(taskId).then(res => {
|
getTaskInfo(taskId).then(res => {
|
||||||
|
let data = res.data
|
||||||
|
data.formItems.map(item => {
|
||||||
|
if (item.props.required) {
|
||||||
|
item.props.required = !item.props.required
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
})
|
||||||
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;
|
||||||
|
|
@ -176,20 +183,15 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitTask() {
|
submitTask() {
|
||||||
console.log("wqeqwqewqe")
|
let params = {
|
||||||
this.$refs.taskViewForm.validate(valid =>{
|
taskId: this.selectTask.taskId,
|
||||||
if (valid){
|
formData: JSON.stringify(this.taskData.formData)
|
||||||
let params = {
|
};
|
||||||
taskId: this.selectTask.taskId,
|
completeTask(params).then(res => {
|
||||||
formData: JSON.stringify(this.taskData.formData)
|
this.approveOpen = false;
|
||||||
};
|
this.getList();
|
||||||
completeTask(params).then(res => {
|
this.$message.success(res.msg);
|
||||||
this.approveOpen = false;
|
});
|
||||||
this.getList();
|
|
||||||
this.$message.success(res.msg);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
showCommentBox() {
|
showCommentBox() {
|
||||||
this.commentInfo = {
|
this.commentInfo = {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<script src="../../api/processInstance.js"></script>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-table :data="tableData"
|
<el-table :data="tableData"
|
||||||
|
|
@ -89,7 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import FormRenderView from '@/views/common/form/FormRenderView'
|
import FormRenderView from '@/views/common/form/FormRender'
|
||||||
import ProcessDiagramViewer from "../admin/layout/ProcessDiagramViewer";
|
import ProcessDiagramViewer from "../admin/layout/ProcessDiagramViewer";
|
||||||
import {getInitiatedInstanceList, getInitiatedInstanceInfo} from "@/api/processInstance";
|
import {getInitiatedInstanceList, getInitiatedInstanceInfo} from "@/api/processInstance";
|
||||||
import {timeLength} from '@/utils/date'
|
import {timeLength} from '@/utils/date'
|
||||||
|
|
@ -133,6 +134,7 @@ export default {
|
||||||
that.$store.state.endList = data.endList;
|
that.$store.state.endList = data.endList;
|
||||||
that.$store.state.noTakeList = data.noTakeList;
|
that.$store.state.noTakeList = data.noTakeList;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
console.log(data, "获取到的结果数据")
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue