feat(jzd,jzx):批量修改去除默认选项
Showing
2 changed files
with
130 additions
and
88 deletions
... | @@ -55,46 +55,43 @@ | ... | @@ -55,46 +55,43 @@ |
55 | title="批量修改" | 55 | title="批量修改" |
56 | :visible.sync="centerDialogVisible" | 56 | :visible.sync="centerDialogVisible" |
57 | width="30%" | 57 | width="30%" |
58 | > | 58 | > |
59 | <div class="plxg"> | 59 | <div class="plxg"> |
60 | <div> | 60 | <table> |
61 | <span class="batchlx"> 界标类型:</span> | 61 | <tr> |
62 | <el-select v-model="batchJzd.jblx"> | 62 | <th> 界标类型:</th> |
63 | <el-option | 63 | <td> |
64 | v-for="i in jblx" | 64 | <el-select v-model="batchJzd.jblx"> |
65 | :key="i.key" | 65 | <el-option |
66 | :label="i.label" | 66 | v-for="i in jblx" |
67 | :value="i.value" | 67 | :key="i.key" |
68 | ></el-option> | 68 | :label="i.label" |
69 | </el-select> | 69 | :value="i.value" |
70 | </div> | 70 | ></el-option> |
71 | <div> | 71 | </el-select> |
72 | <span class="batchlx">界址点类型:</span> | 72 | </td> |
73 | <el-select v-model="batchJzd.jzdlx"> | 73 | </tr> |
74 | <el-option | 74 | <tr> |
75 | v-for="i in jzdlx" | 75 | <th>界址点类型:</th> |
76 | :key="i.key" | 76 | <td> |
77 | :label="i.label" | 77 | <el-select v-model="batchJzd.jzdlx"> |
78 | :value="i.value" | 78 | <el-option |
79 | ></el-option> | 79 | v-for="i in jzdlx" |
80 | </el-select> | 80 | :key="i.key" |
81 | </div> | 81 | :label="i.label" |
82 | 82 | :value="i.value" | |
83 | ></el-option> | ||
84 | </el-select> | ||
85 | </td> | ||
86 | </tr> | ||
87 | </table> | ||
88 | </div> | ||
89 | <div class="dialog-footer"> | ||
90 | <el-button @click="centerDialogVisible = false">取 消</el-button> | ||
91 | <el-button type="primary" @click="jzdbatchsave">确 定</el-button> | ||
83 | </div> | 92 | </div> |
84 | <span slot="footer" class="dialog-footer"> | ||
85 | <el-button @click="centerDialogVisible = false">取 消</el-button> | ||
86 | <el-button type="primary" @click="jzdbatchsave">确 定</el-button> | ||
87 | </span> | ||
88 | </el-dialog> | 93 | </el-dialog> |
89 | </div> | 94 | </div> |
90 | <!-- | ||
91 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> | ||
92 | |||
93 | <el-button type="primary" @click="oneExit">编辑</el-button> | ||
94 | <el-button type="primary" @click="save">保存</el-button> | ||
95 | <el-button type="primary" @click="batchExit">批量修改</el-button> | ||
96 | <el-button type="primary" class="saveBtn" @click="save">保存</el-button> | ||
97 | </div> --> | ||
98 | </div> | 95 | </div> |
99 | </template> | 96 | </template> |
100 | 97 | ||
... | @@ -164,8 +161,8 @@ | ... | @@ -164,8 +161,8 @@ |
164 | jzdlist: [], | 161 | jzdlist: [], |
165 | batchJzd: { | 162 | batchJzd: { |
166 | bsms: [], | 163 | bsms: [], |
167 | jblx: '1', | 164 | jblx: '', |
168 | jzdlx: '1' | 165 | jzdlx: '' |
169 | } | 166 | } |
170 | } | 167 | } |
171 | }, | 168 | }, |
... | @@ -174,12 +171,16 @@ | ... | @@ -174,12 +171,16 @@ |
174 | }, | 171 | }, |
175 | mounted() { | 172 | mounted() { |
176 | let bsm = this.$store.state.zdbsm | 173 | let bsm = this.$store.state.zdbsm |
177 | this.bsm=bsm; | 174 | this.bsm = bsm; |
178 | this.getData(bsm) | 175 | this.getData(bsm) |
179 | }, | 176 | }, |
180 | methods: { | 177 | methods: { |
178 | result() { | ||
179 | this.batchJzd.jblx = ''; | ||
180 | this.batchJzd.jzdlx = ''; | ||
181 | }, | ||
181 | getData(bsm) { | 182 | getData(bsm) { |
182 | queryjzd({glBsm:bsm}).then(res => { | 183 | queryjzd({glBsm: bsm}).then(res => { |
183 | for (let i = 0; i < res.result.length; i++) { | 184 | for (let i = 0; i < res.result.length; i++) { |
184 | res.result[i]['isCheck'] = false; | 185 | res.result[i]['isCheck'] = false; |
185 | res.result[i]['iszb'] = 'readonly'; | 186 | res.result[i]['iszb'] = 'readonly'; |
... | @@ -269,8 +270,11 @@ | ... | @@ -269,8 +270,11 @@ |
269 | computed: {}, | 270 | computed: {}, |
270 | watch: { | 271 | watch: { |
271 | "$store.state.zdbsm": function (bsm) { | 272 | "$store.state.zdbsm": function (bsm) { |
272 | this.bsm=bsm | 273 | this.bsm = bsm |
273 | this.getData(bsm) | 274 | this.getData(bsm) |
275 | }, | ||
276 | centerDialogVisible() { | ||
277 | this.result(); | ||
274 | } | 278 | } |
275 | }, | 279 | }, |
276 | } | 280 | } |
... | @@ -289,7 +293,6 @@ | ... | @@ -289,7 +293,6 @@ |
289 | height: 50px; | 293 | height: 50px; |
290 | position: fixed; | 294 | position: fixed; |
291 | bottom: 0; | 295 | bottom: 0; |
292 | right: ; | ||
293 | text-align: center; | 296 | text-align: center; |
294 | background-color: #ffffff; | 297 | background-color: #ffffff; |
295 | .saveBtn { | 298 | .saveBtn { |
... | @@ -328,7 +331,11 @@ | ... | @@ -328,7 +331,11 @@ |
328 | table:hover { | 331 | table:hover { |
329 | cursor: pointer; | 332 | cursor: pointer; |
330 | } | 333 | } |
331 | 334 | .plxg { | |
335 | .el-select{ | ||
336 | float: left; | ||
337 | } | ||
338 | } | ||
332 | .batchlx { | 339 | .batchlx { |
333 | text-align: center; | 340 | text-align: center; |
334 | } | 341 | } |
... | @@ -366,4 +373,8 @@ | ... | @@ -366,4 +373,8 @@ |
366 | width: 180px | 373 | width: 180px |
367 | } | 374 | } |
368 | 375 | ||
376 | .dialog-footer { | ||
377 | text-align: center; | ||
378 | margin-top: 20px; | ||
379 | } | ||
369 | </style> | 380 | </style> | ... | ... |
... | @@ -67,47 +67,54 @@ | ... | @@ -67,47 +67,54 @@ |
67 | title="批量修改" | 67 | title="批量修改" |
68 | :visible.sync="centerDialogVisible" | 68 | :visible.sync="centerDialogVisible" |
69 | width="30%" | 69 | width="30%" |
70 | > | 70 | > |
71 | <div class="plxg"> | 71 | <div class="plxg"> |
72 | <div class="batchlx"> | 72 | <table> |
73 | <span class=""> 界址线类型:</span> | 73 | <tr> |
74 | <el-select v-model="batchJzx.jzxlx"> | 74 | <th>界址线类型:</th> |
75 | <el-option | 75 | <td> |
76 | v-for="i in jzxlx" | 76 | <el-select v-model="batchJzx.jzxlx"> |
77 | :key="i.key" | 77 | <el-option |
78 | :label="i.label" | 78 | v-for="i in jzxlx" |
79 | :value="i.value" | 79 | :key="i.key" |
80 | ></el-option> | 80 | :label="i.label" |
81 | </el-select> | 81 | :value="i.value" |
82 | </div> | 82 | ></el-option> |
83 | <div class="batchlx"> | 83 | </el-select> |
84 | <span>界址线位置:</span> | 84 | </td> |
85 | <el-select v-model="batchJzx.jzxwz"> | 85 | </tr> |
86 | <el-option | 86 | <tr> |
87 | v-for="i in jzxwz" | 87 | <th>界址线位置:</th> |
88 | :key="i.key" | 88 | <td> |
89 | :label="i.label" | 89 | <el-select v-model="batchJzx.jzxwz"> |
90 | :value="i.value" | 90 | <el-option |
91 | ></el-option> | 91 | v-for="i in jzxwz" |
92 | </el-select> | 92 | :key="i.key" |
93 | </div> | 93 | :label="i.label" |
94 | <div class="batchlx"> | 94 | :value="i.value" |
95 | <span class="">界线性质:</span> | 95 | ></el-option> |
96 | <el-select v-model="batchJzx.jxxz"> | 96 | </el-select> |
97 | <el-option | 97 | </td> |
98 | v-for="i in jxxz" | 98 | </tr> |
99 | :key="i.key" | 99 | <tr> |
100 | :label="i.label" | 100 | <th>界线性质:</th> |
101 | :value="i.value" | 101 | <td> |
102 | ></el-option> | 102 | <el-select v-model="batchJzx.jxxz"> |
103 | </el-select> | 103 | <el-option |
104 | </div> | 104 | v-for="i in jxxz" |
105 | 105 | :key="i.key" | |
106 | :label="i.label" | ||
107 | :value="i.value" | ||
108 | ></el-option> | ||
109 | </el-select> | ||
110 | </td> | ||
111 | </tr> | ||
112 | </table> | ||
113 | </div> | ||
114 | <div class="dialog-footer"> | ||
115 | <el-button @click="centerDialogVisible = false">取 消</el-button> | ||
116 | <el-button type="primary" @click="jzxbatchsave">确 定</el-button> | ||
106 | </div> | 117 | </div> |
107 | <span slot="footer" class="dialog-footer"> | ||
108 | <el-button @click="centerDialogVisible = false">取 消</el-button> | ||
109 | <el-button type="primary" @click="jzxbatchsave">确 定</el-button> | ||
110 | </span> | ||
111 | </el-dialog> | 118 | </el-dialog> |
112 | </div> | 119 | </div> |
113 | </div> | 120 | </div> |
... | @@ -222,9 +229,9 @@ | ... | @@ -222,9 +229,9 @@ |
222 | jzxlist: [], | 229 | jzxlist: [], |
223 | batchJzx: { | 230 | batchJzx: { |
224 | bsms: [], | 231 | bsms: [], |
225 | jzxlx: '250200', | 232 | jzxlx: '', |
226 | jzxwz: '1', | 233 | jzxwz: '', |
227 | jxxz: '600001' | 234 | jxxz: '' |
228 | } | 235 | } |
229 | } | 236 | } |
230 | }, | 237 | }, |
... | @@ -233,10 +240,15 @@ | ... | @@ -233,10 +240,15 @@ |
233 | }, | 240 | }, |
234 | mounted() { | 241 | mounted() { |
235 | let bsm = this.$store.state.zdbsm | 242 | let bsm = this.$store.state.zdbsm |
236 | this.bsm=bsm; | 243 | this.bsm = bsm; |
237 | this.getData(bsm) | 244 | this.getData(bsm) |
238 | }, | 245 | }, |
239 | methods: { | 246 | methods: { |
247 | result() { | ||
248 | this.batchJzx.jzxlx = ''; | ||
249 | this.batchJzx.jzxwz = ''; | ||
250 | this.batchJzx.jxxz = ''; | ||
251 | }, | ||
240 | getData(bsm) { | 252 | getData(bsm) { |
241 | queryjzx(bsm).then(res => { | 253 | queryjzx(bsm).then(res => { |
242 | for (let i = 0; i < res.result.length; i++) { | 254 | for (let i = 0; i < res.result.length; i++) { |
... | @@ -295,7 +307,6 @@ | ... | @@ -295,7 +307,6 @@ |
295 | 307 | ||
296 | }, | 308 | }, |
297 | batchExit() { | 309 | batchExit() { |
298 | console.log("批量修改") | ||
299 | let flag = false; | 310 | let flag = false; |
300 | for (let item of this.jzxlist) { | 311 | for (let item of this.jzxlist) { |
301 | if (item.isCheck) { | 312 | if (item.isCheck) { |
... | @@ -328,8 +339,11 @@ | ... | @@ -328,8 +339,11 @@ |
328 | computed: {}, | 339 | computed: {}, |
329 | watch: { | 340 | watch: { |
330 | "$store.state.zdbsm": function (bsm) { | 341 | "$store.state.zdbsm": function (bsm) { |
331 | this.bsm=bsm; | 342 | this.bsm = bsm; |
332 | this.getData(bsm) | 343 | this.getData(bsm) |
344 | }, | ||
345 | centerDialogVisible() { | ||
346 | this.result(); | ||
333 | } | 347 | } |
334 | }, | 348 | }, |
335 | } | 349 | } |
... | @@ -378,29 +392,46 @@ | ... | @@ -378,29 +392,46 @@ |
378 | height: 100px; | 392 | height: 100px; |
379 | } | 393 | } |
380 | } | 394 | } |
395 | |||
381 | .cz { | 396 | .cz { |
382 | width: 50px; | 397 | width: 50px; |
383 | } | 398 | } |
399 | |||
384 | .qsd { | 400 | .qsd { |
385 | width: 150px; | 401 | width: 150px; |
386 | } | 402 | } |
403 | |||
387 | .zzd { | 404 | .zzd { |
388 | width: 150px; | 405 | width: 150px; |
389 | } | 406 | } |
407 | |||
390 | .jzdj { | 408 | .jzdj { |
391 | width: 150px; | 409 | width: 150px; |
392 | } | 410 | } |
411 | |||
393 | .jzxlx { | 412 | .jzxlx { |
394 | width: 180px; | 413 | width: 180px; |
395 | } | 414 | } |
415 | |||
396 | .jzxwz { | 416 | .jzxwz { |
397 | width: 150px; | 417 | width: 150px; |
398 | } | 418 | } |
419 | |||
399 | .jxxz { | 420 | .jxxz { |
400 | width: 150px; | 421 | width: 150px; |
401 | } | 422 | } |
423 | |||
402 | .sm { | 424 | .sm { |
403 | width: 150px; | 425 | width: 150px; |
404 | } | 426 | } |
405 | 427 | ||
428 | .dialog-footer { | ||
429 | text-align: center; | ||
430 | margin-top: 20px; | ||
431 | } | ||
432 | .plxg{ | ||
433 | .el-select{ | ||
434 | float: left; | ||
435 | } | ||
436 | } | ||
406 | </style> | 437 | </style> | ... | ... |
-
Please register or sign in to post a comment