Commit 7122fa86 by lanyulei Committed by GitHub

Merge pull request #44 from lanyulei/dev

Dev
parents ddf3759c d6ad63cf
...@@ -197,22 +197,24 @@ export default { ...@@ -197,22 +197,24 @@ export default {
} }
} }
if (this.rules[genList[i].model]) { if (!this.preview) {
this.rules[genList[i].model] = [...this.rules[genList[i].model], ...genList[i].rules.map(item => { if (this.rules[genList[i].model]) {
if (item.pattern) { this.rules[genList[i].model] = [...this.rules[genList[i].model], ...genList[i].rules.map(item => {
return { ...item, pattern: eval(item.pattern) } if (item.pattern) {
} else { return { ...item, pattern: eval(item.pattern) }
return { ...item } } else {
} return { ...item }
})] }
} else { })]
this.rules[genList[i].model] = [...genList[i].rules.map(item => { } else {
if (item.pattern) { this.rules[genList[i].model] = [...genList[i].rules.map(item => {
return { ...item, pattern: eval(item.pattern) } if (item.pattern) {
} else { return { ...item, pattern: eval(item.pattern) }
return { ...item } } else {
} return { ...item }
})] }
})]
}
} }
} }
} }
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
currentNode.hideTpls.indexOf(tplItem.id)===-1" currentNode.hideTpls.indexOf(tplItem.id)===-1"
:key="tplIndex" :key="tplIndex"
:ref="'generateForm-'+tplItem.id" :ref="'generateForm-'+tplItem.id"
:preview="currentNode.hideTpls===undefined ||
currentNode.hideTpls===null ||
currentNode.hideTpls.indexOf(tplItem.id)===-1?false:true"
:remote="remoteFunc" :remote="remoteFunc"
:data="tplItem.form_structure" :data="tplItem.form_structure"
:disabled="currentNode.readonlyTpls===undefined || :disabled="currentNode.readonlyTpls===undefined ||
...@@ -154,7 +157,6 @@ export default { ...@@ -154,7 +157,6 @@ export default {
'form_data': [] 'form_data': []
} }
// 绑定流程任务 // 绑定流程任务
console.log(this.processStructureValue.process)
this.ruleForm.tasks = this.processStructureValue.process.task === undefined ? [] : this.processStructureValue.process.task this.ruleForm.tasks = this.processStructureValue.process.task === undefined ? [] : this.processStructureValue.process.task
// 追加节点任务 // 追加节点任务
if (this.processStructureValue.nodes[this.active].task !== undefined && this.processStructureValue.nodes[this.active].task.length > 0) { if (this.processStructureValue.nodes[this.active].task !== undefined && this.processStructureValue.nodes[this.active].task.length > 0) {
......
...@@ -67,9 +67,12 @@ ...@@ -67,9 +67,12 @@
currentNode.hideTpls.indexOf(tplItem.form_structure.id)===-1" currentNode.hideTpls.indexOf(tplItem.form_structure.id)===-1"
:key="tplIndex" :key="tplIndex"
:ref="'generateForm-'+tplItem.id" :ref="'generateForm-'+tplItem.id"
:preview="currentNode.writeTpls===undefined || :preview="(currentNode.hideTpls!==undefined &&
currentNode.hideTpls!==null &&
currentNode.hideTpls.indexOf(tplItem.form_structure.id)!==-1) ||
(currentNode.writeTpls===undefined ||
currentNode.writeTpls===null || currentNode.writeTpls===null ||
currentNode.writeTpls.indexOf(tplItem.form_structure.id)===-1?true:false" currentNode.writeTpls.indexOf(tplItem.form_structure.id)===-1)?true:false"
:remote="remoteFunc" :remote="remoteFunc"
:value="tplItem.form_data" :value="tplItem.form_data"
:data="tplItem.form_structure" :data="tplItem.form_structure"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment