8d93fb95 by weimo934

feat(jzd):界址点

1 parent d2e7a54e
......@@ -8,7 +8,7 @@
<div class="table">
<table border="1">
<tr>
<td><input type="checkbox" @click="allcheck"/></td>
<td><input type="checkbox" @click="allcheck" v-model="isCheckAll"/></td>
<td>界址点号</td>
<td>顺序号</td>
<td>X坐标值</td>
......@@ -17,7 +17,7 @@
<td>界址点类型</td>
</tr>
<tr v-for="(item,index) in jzdlist" :key="index">
<td><input type="checkbox" v-model="item.isCheck"/></td>
<td><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td>
<td><input type="text" class="formInput" v-model="item.jzdh" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.sxh" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.xzbz" :readonly="item.iszb"/></td>
......@@ -94,6 +94,7 @@
props: {},
data() {
return {
isCheckAll: false,
centerDialogVisible: false,
jblx: [
{
......@@ -191,7 +192,6 @@
// 该标识码继承过来
let bsm = '401044005bad0557d5e3787239d8e18e';
queryjzd(bsm).then(res => {
debugger
for (let i = 0; i < res.result.length; i++) {
res.result[i]['isCheck'] = false;
res.result[i]['iszb'] = 'readonly';
......@@ -202,16 +202,27 @@
})
},
methods: {
changeAll(e) {
if (!e.target.checked){
console.log("11111")
this.isCheckAll = false;
return
}
for (let item of this.jzdlist) {
if (!item.isCheck) {
this.isCheckAll = false;
return
}
}
this.isCheckAll = true;
},
allcheck(value) {
for (let item of this.jzdlist) {
item.isCheck = value.target.checked;
}
},
oneExit() {
console.log("oneExit......")
console.log(this.jzdlist)
for (let item of this.jzdlist) {
console.log(item)
if (item.isCheck) {
item.iszb = false;
item.jbisdisabled = false;
......@@ -225,7 +236,16 @@
this.centerDialogVisible = true;
}
},
computed: {},
computed: {
isCheckAll: function () {
for (let item of this.jzdlist) {
if (!item.isCheck) {
return false;
}
}
return false;
}
},
watch: {},
}
</script>
......