8d93fb95 by weimo934

feat(jzd):界址点

1 parent d2e7a54e
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 <div class="table"> 8 <div class="table">
9 <table border="1"> 9 <table border="1">
10 <tr> 10 <tr>
11 <td><input type="checkbox" @click="allcheck"/></td> 11 <td><input type="checkbox" @click="allcheck" v-model="isCheckAll"/></td>
12 <td>界址点号</td> 12 <td>界址点号</td>
13 <td>顺序号</td> 13 <td>顺序号</td>
14 <td>X坐标值</td> 14 <td>X坐标值</td>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 <td>界址点类型</td> 17 <td>界址点类型</td>
18 </tr> 18 </tr>
19 <tr v-for="(item,index) in jzdlist" :key="index"> 19 <tr v-for="(item,index) in jzdlist" :key="index">
20 <td><input type="checkbox" v-model="item.isCheck"/></td> 20 <td><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td>
21 <td><input type="text" class="formInput" v-model="item.jzdh" readonly="readonly"/></td> 21 <td><input type="text" class="formInput" v-model="item.jzdh" readonly="readonly"/></td>
22 <td><input type="text" class="formInput" v-model="item.sxh" readonly="readonly"/></td> 22 <td><input type="text" class="formInput" v-model="item.sxh" readonly="readonly"/></td>
23 <td><input type="text" class="formInput" v-model="item.xzbz" :readonly="item.iszb"/></td> 23 <td><input type="text" class="formInput" v-model="item.xzbz" :readonly="item.iszb"/></td>
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
94 props: {}, 94 props: {},
95 data() { 95 data() {
96 return { 96 return {
97 isCheckAll: false,
97 centerDialogVisible: false, 98 centerDialogVisible: false,
98 jblx: [ 99 jblx: [
99 { 100 {
...@@ -191,7 +192,6 @@ ...@@ -191,7 +192,6 @@
191 // 该标识码继承过来 192 // 该标识码继承过来
192 let bsm = '401044005bad0557d5e3787239d8e18e'; 193 let bsm = '401044005bad0557d5e3787239d8e18e';
193 queryjzd(bsm).then(res => { 194 queryjzd(bsm).then(res => {
194 debugger
195 for (let i = 0; i < res.result.length; i++) { 195 for (let i = 0; i < res.result.length; i++) {
196 res.result[i]['isCheck'] = false; 196 res.result[i]['isCheck'] = false;
197 res.result[i]['iszb'] = 'readonly'; 197 res.result[i]['iszb'] = 'readonly';
...@@ -202,16 +202,27 @@ ...@@ -202,16 +202,27 @@
202 }) 202 })
203 }, 203 },
204 methods: { 204 methods: {
205 changeAll(e) {
206 if (!e.target.checked){
207 console.log("11111")
208 this.isCheckAll = false;
209 return
210 }
211 for (let item of this.jzdlist) {
212 if (!item.isCheck) {
213 this.isCheckAll = false;
214 return
215 }
216 }
217 this.isCheckAll = true;
218 },
205 allcheck(value) { 219 allcheck(value) {
206 for (let item of this.jzdlist) { 220 for (let item of this.jzdlist) {
207 item.isCheck = value.target.checked; 221 item.isCheck = value.target.checked;
208 } 222 }
209 }, 223 },
210 oneExit() { 224 oneExit() {
211 console.log("oneExit......")
212 console.log(this.jzdlist)
213 for (let item of this.jzdlist) { 225 for (let item of this.jzdlist) {
214 console.log(item)
215 if (item.isCheck) { 226 if (item.isCheck) {
216 item.iszb = false; 227 item.iszb = false;
217 item.jbisdisabled = false; 228 item.jbisdisabled = false;
...@@ -225,7 +236,16 @@ ...@@ -225,7 +236,16 @@
225 this.centerDialogVisible = true; 236 this.centerDialogVisible = true;
226 } 237 }
227 }, 238 },
228 computed: {}, 239 computed: {
240 isCheckAll: function () {
241 for (let item of this.jzdlist) {
242 if (!item.isCheck) {
243 return false;
244 }
245 }
246 return false;
247 }
248 },
229 watch: {}, 249 watch: {},
230 } 250 }
231 </script> 251 </script>
......