feat(jzd,jzx):界址点、线
Showing
2 changed files
with
52 additions
and
33 deletions
| ... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
| 55 | center> | 55 | center> |
| 56 | <div class="plxg"> | 56 | <div class="plxg"> |
| 57 | <div> | 57 | <div> |
| 58 | <span class=""> 界标类型:</span> | 58 | <span class="batchlx"> 界标类型:</span> |
| 59 | <el-select v-model="batchJzd.jblx"> | 59 | <el-select v-model="batchJzd.jblx"> |
| 60 | <el-option | 60 | <el-option |
| 61 | v-for="i in jblx" | 61 | v-for="i in jblx" |
| ... | @@ -66,7 +66,7 @@ | ... | @@ -66,7 +66,7 @@ |
| 66 | </el-select> | 66 | </el-select> |
| 67 | </div> | 67 | </div> |
| 68 | <div> | 68 | <div> |
| 69 | <span>界址点类型:</span> | 69 | <span class="batchlx">界址点类型:</span> |
| 70 | <el-select v-model="batchJzd.jzdlx"> | 70 | <el-select v-model="batchJzd.jzdlx"> |
| 71 | <el-option | 71 | <el-option |
| 72 | v-for="i in jzdlx" | 72 | v-for="i in jzdlx" |
| ... | @@ -163,22 +163,28 @@ | ... | @@ -163,22 +163,28 @@ |
| 163 | mounted() { | 163 | mounted() { |
| 164 | // 该标识码继承过来 | 164 | // 该标识码继承过来 |
| 165 | let bsm = '401044005bad0557d5e3787239d8e18e'; | 165 | let bsm = '401044005bad0557d5e3787239d8e18e'; |
| 166 | queryjzd(bsm).then(res => { | 166 | this.getData(bsm) |
| 167 | for (let i = 0; i < res.result.length; i++) { | ||
| 168 | res.result[i]['isCheck'] = false; | ||
| 169 | res.result[i]['iszb'] = 'readonly'; | ||
| 170 | res.result[i]['jzdisdisabled'] = true; | ||
| 171 | } | ||
| 172 | this.jzdlist = res.result; | ||
| 173 | console.log("=====================================") | ||
| 174 | console.log(this.jzdlist) | ||
| 175 | }) | ||
| 176 | }, | 167 | }, |
| 177 | methods: { | 168 | methods: { |
| 169 | getData(bsm) { | ||
| 170 | queryjzd(bsm).then(res => { | ||
| 171 | for (let i = 0; i < res.result.length; i++) { | ||
| 172 | res.result[i]['isCheck'] = false; | ||
| 173 | res.result[i]['iszb'] = 'readonly'; | ||
| 174 | res.result[i]['jzdisdisabled'] = true; | ||
| 175 | } | ||
| 176 | this.jzdlist = res.result; | ||
| 177 | }) | ||
| 178 | }, | ||
| 178 | save() { | 179 | save() { |
| 179 | console.log("保存...."); | 180 | console.log("保存...."); |
| 180 | jzdsingleModify(this.jzdlist).then(res => { | 181 | jzdsingleModify(this.jzdlist).then(res => { |
| 181 | console.log(res) | 182 | console.log(res) |
| 183 | if (res.success) { | ||
| 184 | Message.success("保存成功") | ||
| 185 | } else { | ||
| 186 | Message.error(res.message) | ||
| 187 | } | ||
| 182 | }) | 188 | }) |
| 183 | for (let item of this.jzdlist) { | 189 | for (let item of this.jzdlist) { |
| 184 | if (item.isCheck) { | 190 | if (item.isCheck) { |
| ... | @@ -192,12 +198,10 @@ | ... | @@ -192,12 +198,10 @@ |
| 192 | e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null | 198 | e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null |
| 193 | }, | 199 | }, |
| 194 | changeAll(e) { | 200 | changeAll(e) { |
| 195 | console.log(e) | ||
| 196 | if (!e.target.checked) { | 201 | if (!e.target.checked) { |
| 197 | this.isCheckAll = false; | 202 | this.isCheckAll = false; |
| 198 | return | 203 | return |
| 199 | } | 204 | } |
| 200 | this.batch.bsms.length = 0; | ||
| 201 | for (let item of this.jzdlist) { | 205 | for (let item of this.jzdlist) { |
| 202 | if (!item.isCheck) { | 206 | if (!item.isCheck) { |
| 203 | this.isCheckAll = false; | 207 | this.isCheckAll = false; |
| ... | @@ -222,13 +226,13 @@ | ... | @@ -222,13 +226,13 @@ |
| 222 | }, | 226 | }, |
| 223 | batchExit() { | 227 | batchExit() { |
| 224 | console.log("批量修改") | 228 | console.log("批量修改") |
| 225 | let flag=false; | 229 | let flag = false; |
| 226 | for (let item of this.jzdlist){ | 230 | for (let item of this.jzdlist) { |
| 227 | if (item.isCheck){ | 231 | if (item.isCheck) { |
| 228 | flag=true; | 232 | flag = true; |
| 229 | } | 233 | } |
| 230 | } | 234 | } |
| 231 | if (flag){ | 235 | if (flag) { |
| 232 | this.centerDialogVisible = true; | 236 | this.centerDialogVisible = true; |
| 233 | } else { | 237 | } else { |
| 234 | Message.info("请勾选要修改的数据") | 238 | Message.info("请勾选要修改的数据") |
| ... | @@ -293,4 +297,8 @@ | ... | @@ -293,4 +297,8 @@ |
| 293 | table:hover { | 297 | table:hover { |
| 294 | cursor: pointer; | 298 | cursor: pointer; |
| 295 | } | 299 | } |
| 300 | |||
| 301 | .batchlx { | ||
| 302 | text-align: center; | ||
| 303 | } | ||
| 296 | </style> | 304 | </style> | ... | ... |
| ... | @@ -65,7 +65,7 @@ | ... | @@ -65,7 +65,7 @@ |
| 65 | width="30%" | 65 | width="30%" |
| 66 | center> | 66 | center> |
| 67 | <div class="plxg"> | 67 | <div class="plxg"> |
| 68 | <div> | 68 | <div class="batchlx"> |
| 69 | <span class=""> 界址线类型:</span> | 69 | <span class=""> 界址线类型:</span> |
| 70 | <el-select v-model="batchJzx.jzxlx"> | 70 | <el-select v-model="batchJzx.jzxlx"> |
| 71 | <el-option | 71 | <el-option |
| ... | @@ -76,7 +76,7 @@ | ... | @@ -76,7 +76,7 @@ |
| 76 | ></el-option> | 76 | ></el-option> |
| 77 | </el-select> | 77 | </el-select> |
| 78 | </div> | 78 | </div> |
| 79 | <div> | 79 | <div class="batchlx"> |
| 80 | <span>界址线位置:</span> | 80 | <span>界址线位置:</span> |
| 81 | <el-select v-model="batchJzx.jzxwz"> | 81 | <el-select v-model="batchJzx.jzxwz"> |
| 82 | <el-option | 82 | <el-option |
| ... | @@ -87,8 +87,8 @@ | ... | @@ -87,8 +87,8 @@ |
| 87 | ></el-option> | 87 | ></el-option> |
| 88 | </el-select> | 88 | </el-select> |
| 89 | </div> | 89 | </div> |
| 90 | <div> | 90 | <div class="batchlx"> |
| 91 | <span>界线性质:</span> | 91 | <span class="">界线性质:</span> |
| 92 | <el-select v-model="batchJzx.jxxz"> | 92 | <el-select v-model="batchJzx.jxxz"> |
| 93 | <el-option | 93 | <el-option |
| 94 | v-for="i in jxxz" | 94 | v-for="i in jxxz" |
| ... | @@ -229,22 +229,28 @@ | ... | @@ -229,22 +229,28 @@ |
| 229 | mounted() { | 229 | mounted() { |
| 230 | // 该标识码继承过来 | 230 | // 该标识码继承过来 |
| 231 | let bsm = '044dc12648a1f41374679281da63e93b'; | 231 | let bsm = '044dc12648a1f41374679281da63e93b'; |
| 232 | queryjzx(bsm).then(res => { | 232 | this.getData(bsm) |
| 233 | for (let i = 0; i < res.result.length; i++) { | ||
| 234 | res.result[i]['isCheck'] = false; | ||
| 235 | res.result[i]['jjisdisabled'] = 'readonly'; | ||
| 236 | res.result[i]['jzxisdisabled'] = true; | ||
| 237 | } | ||
| 238 | this.jzxlist = res.result; | ||
| 239 | console.log("================================") | ||
| 240 | console.log(this.jzxlist) | ||
| 241 | }) | ||
| 242 | }, | 233 | }, |
| 243 | methods: { | 234 | methods: { |
| 235 | getData(bsm) { | ||
| 236 | queryjzx(bsm).then(res => { | ||
| 237 | for (let i = 0; i < res.result.length; i++) { | ||
| 238 | res.result[i]['isCheck'] = false; | ||
| 239 | res.result[i]['jjisdisabled'] = 'readonly'; | ||
| 240 | res.result[i]['jzxisdisabled'] = true; | ||
| 241 | } | ||
| 242 | this.jzxlist = res.result; | ||
| 243 | }) | ||
| 244 | }, | ||
| 244 | save() { | 245 | save() { |
| 245 | console.log("保存...."); | 246 | console.log("保存...."); |
| 246 | jzxsingleModify(this.jzxlist).then(res => { | 247 | jzxsingleModify(this.jzxlist).then(res => { |
| 247 | console.log(res) | 248 | console.log(res) |
| 249 | if (res.success) { | ||
| 250 | Message.success("保存成功") | ||
| 251 | } else { | ||
| 252 | Message.error(res.message) | ||
| 253 | } | ||
| 248 | }) | 254 | }) |
| 249 | for (let item of this.jzxlist) { | 255 | for (let item of this.jzxlist) { |
| 250 | if (item.isCheck) { | 256 | if (item.isCheck) { |
| ... | @@ -357,4 +363,9 @@ | ... | @@ -357,4 +363,9 @@ |
| 357 | table:hover { | 363 | table:hover { |
| 358 | cursor: pointer; | 364 | cursor: pointer; |
| 359 | } | 365 | } |
| 366 | |||
| 367 | .batchlx { | ||
| 368 | //text-align: justify; | ||
| 369 | justify-content: space-between; | ||
| 370 | } | ||
| 360 | </style> | 371 | </style> | ... | ... |
-
Please register or sign in to post a comment