Skip to content

Commit

Permalink
fix 表单bug , 准备加入动态列 动态高级查询
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Nov 6, 2018
1 parent 97189af commit 9499a54
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
10 changes: 6 additions & 4 deletions src/components/FormDesigner/GenerateForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default {
}
}
},
getData () {
return new Promise((resolve, reject) => {
Expand All @@ -98,17 +99,18 @@ export default {
},
refresh () {
this.$nextTick(() => {
this.$refs.generateForm.resetFields()
console.log(222)
});
for(let key in this.models){
console.log(key)
this.models[key] = ""
}
}
},
watch: {
value: {
deep: true,
handler (val) {
console.log(JSON.stringify(val))
this.$refs.generateForm.clearValidate()
this.models = {...this.models, ...val}
}
},
Expand Down
18 changes: 10 additions & 8 deletions src/views/Archive/person_edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
:total="listQuery.totalCount" style="margin-top:5px">
</el-pagination>

<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="80%">
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="80%" >


<generate-form
Expand Down Expand Up @@ -149,17 +149,18 @@ export default {
},
created() {
this.fetchData(this.listQuery);
this.getObj();
this.fetchData(this.listQuery)
this.getObj()
GetFormDetail("Person").then(res => {
this.jsonData = JSON.parse(res.data.formJson);
})
},
mounted() {
GetFormDetail("Person").then(res => {
this.jsonData = JSON.parse(res.data.formJson);
});
document.addEventListener("click", e => {
console.log(e.target);
console.log(this.$refs.test_input.$el);
// console.log(e.target);
// console.log(this.$refs.test_input.$el);
if (!this.$refs.test_input.$el.contains(e.target)) {
//
}
Expand Down Expand Up @@ -217,6 +218,7 @@ export default {
})
})
},
Edit(id) {
this.Clear = false,
Expand Down

0 comments on commit 9499a54

Please sign in to comment.