字段校对
Showing
2 changed files
with
22 additions
and
37 deletions
... | @@ -52,7 +52,7 @@ | ... | @@ -52,7 +52,7 @@ |
52 | <li> | 52 | <li> |
53 | <el-select class="formSelect percent30" v-model="items.pzyt"> | 53 | <el-select class="formSelect percent30" v-model="items.pzyt"> |
54 | <el-option | 54 | <el-option |
55 | v-for="item in pzytList" | 55 | v-for="item in $store.state.tdytList" |
56 | :key="item.dm" | 56 | :key="item.dm" |
57 | :label="item.mc" | 57 | :label="item.mc" |
58 | :value="item.dm" | 58 | :value="item.dm" |
... | @@ -63,7 +63,7 @@ | ... | @@ -63,7 +63,7 @@ |
63 | <li> | 63 | <li> |
64 | <el-select class="formSelect percent30" v-model="items.sjyt"> | 64 | <el-select class="formSelect percent30" v-model="items.sjyt"> |
65 | <el-option | 65 | <el-option |
66 | v-for="item in sjytList" | 66 | v-for="item in $store.state.tdytList" |
67 | :key="item.dm" | 67 | :key="item.dm" |
68 | :label="item.mc" | 68 | :label="item.mc" |
69 | :value="item.dm" | 69 | :value="item.dm" |
... | @@ -113,10 +113,10 @@ | ... | @@ -113,10 +113,10 @@ |
113 | <li> | 113 | <li> |
114 | <el-select class="formSelect percent30" v-model="items.dj1"> | 114 | <el-select class="formSelect percent30" v-model="items.dj1"> |
115 | <el-option | 115 | <el-option |
116 | v-for="item in djList" | 116 | v-for="item in $store.state.tddjList" |
117 | :key="item.value" | 117 | :key="item.bsm" |
118 | :label="item.label" | 118 | :label="item.mc" |
119 | :value="item.value" | 119 | :value="item.bsm" |
120 | > | 120 | > |
121 | </el-option> | 121 | </el-option> |
122 | </el-select> | 122 | </el-select> |
... | @@ -124,10 +124,10 @@ | ... | @@ -124,10 +124,10 @@ |
124 | <li> | 124 | <li> |
125 | <el-select class="formSelect percent30" v-model="items.dj2"> | 125 | <el-select class="formSelect percent30" v-model="items.dj2"> |
126 | <el-option | 126 | <el-option |
127 | v-for="item in djList" | 127 | v-for="item in $store.state.tddjList" |
128 | :key="item.value" | 128 | :key="item.bsm" |
129 | :label="item.label" | 129 | :label="item.mc" |
130 | :value="item.value" | 130 | :value="item.bsm" |
131 | > | 131 | > |
132 | </el-option> | 132 | </el-option> |
133 | </el-select> | 133 | </el-select> |
... | @@ -145,10 +145,10 @@ | ... | @@ -145,10 +145,10 @@ |
145 | <div class="title"> | 145 | <div class="title"> |
146 | <el-select class="formSelect" v-model="items.qlxz"> | 146 | <el-select class="formSelect" v-model="items.qlxz"> |
147 | <el-option | 147 | <el-option |
148 | v-for="item in compareList" | 148 | v-for="item in $store.state.qlxzList" |
149 | :key="item.value" | 149 | :key="item.bsm" |
150 | :label="item.label" | 150 | :label="item.mc" |
151 | :value="item.value" | 151 | :value="item.bsm" |
152 | > | 152 | > |
153 | </el-option> | 153 | </el-option> |
154 | </el-select> | 154 | </el-select> |
... | @@ -176,14 +176,6 @@ export default { | ... | @@ -176,14 +176,6 @@ export default { |
176 | }, | 176 | }, |
177 | data() { | 177 | data() { |
178 | return { | 178 | return { |
179 | pzytList:[], | ||
180 | sjytList:[], | ||
181 | djList:[], | ||
182 | compareList: [ | ||
183 | {label: "=", value: "="}, | ||
184 | {label: "<=", value: "<="}, | ||
185 | {label: ">=", value: ">="}, | ||
186 | ], | ||
187 | countList: [ | 179 | countList: [ |
188 | { | 180 | { |
189 | id: Math.random(), | 181 | id: Math.random(), |
... | @@ -201,26 +193,12 @@ export default { | ... | @@ -201,26 +193,12 @@ export default { |
201 | tdsyjssj: "", | 193 | tdsyjssj: "", |
202 | }, | 194 | }, |
203 | ], | 195 | ], |
196 | outNum:0 | ||
204 | }; | 197 | }; |
205 | }, | 198 | }, |
206 | created(){ | 199 | created(){ |
207 | this.getDicData() | ||
208 | }, | 200 | }, |
209 | methods: { | 201 | methods: { |
210 | //获取字典数据 | ||
211 | getDicData(){ | ||
212 | getDdicByMC("土地用途") | ||
213 | .then((res) => { | ||
214 | this.pzytList = res.result; | ||
215 | this.sjytList = res.result; | ||
216 | }) | ||
217 | .catch((error) => {}); | ||
218 | getDdicByMC("土地等级") | ||
219 | .then((res) => { | ||
220 | this.djList = res.result; | ||
221 | }) | ||
222 | .catch((error) => {}); | ||
223 | }, | ||
224 | //外层操作 | 202 | //外层操作 |
225 | handleClick(id, ind, type) { | 203 | handleClick(id, ind, type) { |
226 | if (type === "add") { | 204 | if (type === "add") { |
... | @@ -239,12 +217,14 @@ export default { | ... | @@ -239,12 +217,14 @@ export default { |
239 | dj2: "", | 217 | dj2: "", |
240 | tdsyjssj: "", | 218 | tdsyjssj: "", |
241 | }); | 219 | }); |
220 | this.outNum++ | ||
242 | } else { | 221 | } else { |
243 | this.countList.forEach((item, index) => { | 222 | this.countList.forEach((item, index) => { |
244 | if (index == ind && this.countList.length > 1) { | 223 | if (index == ind && this.countList.length > 1) { |
245 | this.countList.splice(index, 1); | 224 | this.countList.splice(index, 1); |
246 | } | 225 | } |
247 | }); | 226 | }); |
227 | this.outNum-- | ||
248 | } | 228 | } |
249 | this.hasBorderOrNot(); | 229 | this.hasBorderOrNot(); |
250 | }, | 230 | }, |
... | @@ -283,9 +263,14 @@ export default { | ... | @@ -283,9 +263,14 @@ export default { |
283 | tempNum++; | 263 | tempNum++; |
284 | } | 264 | } |
285 | }); | 265 | }); |
266 | //判断外层是否没有增加,如果没有增加,则不能删除当前外层 | ||
267 | if(ind == 0 && this.outNum == 0){ | ||
268 | |||
269 | }else{ | ||
286 | this.countList.splice(tempIndex, tempNum); | 270 | this.countList.splice(tempIndex, tempNum); |
287 | } | 271 | } |
288 | } | 272 | } |
273 | } | ||
289 | this.hasBorderOrNot(); | 274 | this.hasBorderOrNot(); |
290 | }, | 275 | }, |
291 | //判断是否显示边框 | 276 | //判断是否显示边框 | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment