Commit c4a2854e1ba133429ec9acb3e51db435503ddc74

Authored by 648540858
1 parent d679a9fc

修复添加/修改节点页面的BUG

web_src/src/components/dialog/catalogEdit.vue
@@ -12,25 +12,22 @@ @@ -12,25 +12,22 @@
12 > 12 >
13 <div id="shared" style="margin-top: 1rem;margin-right: 100px;"> 13 <div id="shared" style="margin-top: 1rem;margin-right: 100px;">
14 <el-form ref="form" :rules="rules" :model="form" label-width="140px" > 14 <el-form ref="form" :rules="rules" :model="form" label-width="140px" >
  15 +<!-- <el-form-item >-->
  16 +<!-- 建议的类型:-->
  17 +<!-- <br/>-->
  18 +<!-- &emsp;&emsp;行政区划(可选2位/4位/6位/8位/10位数字,例如:130432,表示河北省邯郸市广平县)-->
  19 +<!-- <br/>-->
  20 +<!-- &emsp;&emsp;业务分组(第11、12、13位215,例如:34020000002150000001)-->
  21 +<!-- <br/>-->
  22 +<!-- &emsp;&emsp;虚拟组织(第11、12、13位216,例如:34020000002160000001)-->
  23 +<!-- </el-form-item>-->
15 <el-form-item label="节点编号" prop="id" > 24 <el-form-item label="节点编号" prop="id" >
16 - <el-tooltip class="item" effect="dark" content="" placement="top-start">  
17 - <div slot="content">  
18 - 建议的类型:  
19 - <br/>  
20 - &emsp;&emsp;行政区划(可选2位/4位/6位/8位/10位数字,例如:130432,表示河北省邯郸市广平县)  
21 - <br/>  
22 - &emsp;&emsp;业务分组(第11、12、13位215,例如:34020000002150000001)  
23 - <br/>  
24 - &emsp;&emsp;虚拟组织(第11、12、13位216,例如:34020000002160000001)  
25 - </div>  
26 - <el-input v-model="form.id" :disabled="isEdit"></el-input>  
27 - </el-tooltip> 25 + <el-input v-model="form.id" :disabled="isEdit" clearable></el-input>
28 </el-form-item> 26 </el-form-item>
29 <el-form-item label="节点名称" prop="name"> 27 <el-form-item label="节点名称" prop="name">
30 <el-input v-model="form.name" clearable></el-input> 28 <el-input v-model="form.name" clearable></el-input>
31 </el-form-item> 29 </el-form-item>
32 30
33 -  
34 <el-form-item> 31 <el-form-item>
35 <div style="float: right;"> 32 <div style="float: right;">
36 <el-button type="primary" @click="onSubmit" >确认</el-button> 33 <el-button type="primary" @click="onSubmit" >确认</el-button>
@@ -65,13 +62,14 @@ export default { @@ -65,13 +62,14 @@ export default {
65 }, 62 },
66 rules: { 63 rules: {
67 name: [{ required: true, message: "请输入名称", trigger: "blur" }], 64 name: [{ required: true, message: "请输入名称", trigger: "blur" }],
68 - id: [{ required: true, message: "请输入id", trigger: "blur" }] 65 + id: [{ required: true, message: "请输入ID", trigger: "blur" }]
69 }, 66 },
70 }; 67 };
71 }, 68 },
72 methods: { 69 methods: {
73 openDialog: function (isEdit, id, name, parentId, callback) { 70 openDialog: function (isEdit, id, name, parentId, callback) {
74 console.log("parentId: " + parentId) 71 console.log("parentId: " + parentId)
  72 + console.log(this.form)
75 this.isEdit = isEdit; 73 this.isEdit = isEdit;
76 this.form.id = id; 74 this.form.id = id;
77 this.form.name = name; 75 this.form.name = name;
@@ -105,8 +103,14 @@ export default { @@ -105,8 +103,14 @@ export default {
105 }); 103 });
106 }, 104 },
107 close: function () { 105 close: function () {
  106 + this.isEdit = false;
  107 + this.form.id = null;
  108 + this.form.name = null;
  109 + this.form.platformId = null;
  110 + this.form.parentId = null;
  111 + this.callback = null;
108 this.showDialog = false; 112 this.showDialog = false;
109 - this.$refs.form.resetFields(); 113 + console.log(this.form)
110 }, 114 },
111 }, 115 },
112 }; 116 };