Compare commits

..

No commits in common. "2bed6ea74c597c95a08f136ea3e2c2ff0dedd906" and "b9e45dd82c8a8e848e507a46623fb50b90aa9a5b" have entirely different histories.

4 changed files with 21 additions and 47 deletions

View File

@ -51,6 +51,7 @@ export default {
},
methods: {
validate(call) {
console.log("我被触发了")
let success = true
this.$refs.form.validate(valid => {
success = valid

View File

@ -1,5 +1,5 @@
<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">
<el-form-item v-if="item.name !== 'SpanLayout' && item.name !== 'Description'"
:prop="item.id" :label="item.title">
@ -62,35 +62,8 @@ export default {
this.loadFormConfig(this.formItems)
},
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) {
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 +71,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 +82,6 @@ export default {
}
}
})
console.log(this.rules)
}
}
}

View File

@ -169,6 +169,13 @@ export default {
let that = this;
this.init();
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.$store.state.design = that.taskData;
that.$store.state.userTaskOption = that.taskData.userTaskOption;
@ -176,9 +183,6 @@ export default {
});
},
submitTask() {
console.log("wqeqwqewqe")
this.$refs.taskViewForm.validate(valid =>{
if (valid){
let params = {
taskId: this.selectTask.taskId,
formData: JSON.stringify(this.taskData.formData)
@ -188,8 +192,6 @@ export default {
this.getList();
this.$message.success(res.msg);
});
}
})
},
showCommentBox() {
this.commentInfo = {

View File

@ -1,3 +1,4 @@
<script src="../../api/processInstance.js"></script>
<template>
<div>
<el-table :data="tableData"
@ -89,7 +90,7 @@
</template>
<script>
import FormRenderView from '@/views/common/form/FormRenderView'
import FormRenderView from '@/views/common/form/FormRender'
import ProcessDiagramViewer from "../admin/layout/ProcessDiagramViewer";
import {getInitiatedInstanceList, getInitiatedInstanceInfo} from "@/api/processInstance";
import {timeLength} from '@/utils/date'
@ -133,6 +134,7 @@ export default {
that.$store.state.endList = data.endList;
that.$store.state.noTakeList = data.noTakeList;
this.loading = false;
console.log(data, "获取到的结果数据")
})
},