20d9701f by 杨威
2 parents 92474a4e 8e704487
......@@ -8,25 +8,37 @@
<div class="table">
<table border="1">
<tr>
<td class="cz"><input type="checkbox" @click="allcheck" v-model="isCheckAll"/></td>
<td class="jzdh">界址点号</td>
<td class="sxh">顺序号</td>
<td class="xzbz">X坐标值</td>
<td class="yzbz">Y坐标值</td>
<td class="jblx">界标类型</td>
<td class="jzdlx">界址点类型</td>
<th class="cz">
<el-checkbox @change="allcheck" v-model="isCheckAll"></el-checkbox>
</th>
<th class="">界址点号</th>
<th class="">顺序号</th>
<th class="">X坐标值</th>
<th class="">Y坐标值</th>
<th class="">界标类型</th>
<th class="">界址点类型</th>
</tr>
<tr v-if="jzdlist.length==0">
<td colspan="7"><span class="nodata">暂无数据</span></td>
</tr>
<tr v-for="(item,index) in jzdlist" :key="index" v-else>
<td class="cz"><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td>
<td class="jzdh"><input type="text" class="formInput" v-model="item.jzdh" readonly="readonly"/></td>
<td class="sxh"><input type="text" class="formInput" v-model="item.sxh" readonly="readonly"/></td>
<td class="xzbz"><input type="text" class="formInput" v-model="item.xzbz" :readonly="item.iszb"
@keydown="oninput"/></td>
<td class="yzbz"><input tepe="text" class="formInput" v-model="item.yzbz" :readonly="item.iszb"
@keydown="oninput"/></td>
<td class="cz">
<el-checkbox v-model="item.isCheck" @change="changeAll"></el-checkbox>
</td>
<td class="jzdh">
<el-input v-model="item.jzdh" readonly></el-input>
</td>
<td class="sxh">
<el-input class="" v-model="item.sxh" readonly></el-input>
</td>
<td class="xzbz">
<el-input class="" v-model="item.xzbz" :readonly="item.iszb" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"
@keydown="oninput"></el-input>
</td>
<td class="yzbz">
<el-input class="" v-model="item.yzbz" :readonly="item.iszb" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"
@keydown="oninput"></el-input>
</td>
<td class="jblx">
<el-select v-model="item.jblx" :disabled="item.jzdisdisabled">
<el-option
......@@ -191,7 +203,7 @@
})
},
save() {
if(this.jzdlist.length === 0){
if (this.jzdlist.length === 0) {
Message.info("至少填写一条界址点信息")
return
}
......@@ -215,7 +227,7 @@
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null
},
changeAll(e) {
if (!e.target.checked) {
if (!e) {
this.isCheckAll = false;
return
}
......@@ -229,7 +241,7 @@
},
allcheck(value) {
for (let item of this.jzdlist) {
item.isCheck = value.target.checked;
item.isCheck = value;
}
},
oneExit() {
......@@ -316,18 +328,10 @@
background-color: #fff;
font-size: 14px;
width: 100%;
.formInput {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
cursor: text;
}
th{
height: 36px;
}
td {
text-align: center;
height: 36px;
......@@ -337,7 +341,7 @@
cursor: pointer;
}
.plxg {
.el-select{
.el-select {
float: left;
}
}
......@@ -349,11 +353,12 @@
color: #b2b2b2;
}
}
.cz {
width: 50px;
}
/*
.jzdh {
width: 120px;
}
......@@ -376,7 +381,7 @@
.jzdlx {
width: 180px
}
}*/
.dialog-footer {
text-align: center;
......
......@@ -8,25 +8,35 @@
<div class="table">
<table border="1">
<tr>
<td class="cz"><input type="checkbox" @click="allcheck" v-model="isCheckAll"/></td>
<td class="qdh">起始点号</td>
<td class="zdh">终止点号</td>
<td class="jzjj">界址间距(m)</td>
<td class="jzxlx">界址线类型</td>
<td class="jzxwz">界址线位置</td>
<td class="jxxz">界限性质</td>
<td class="sm">说明</td>
<th class="cz">
<el-checkbox @change="allcheck" v-model="isCheckAll"></el-checkbox>
</th>
<th class="">起始点号</th>
<th class="">终止点号</th>
<th class="">界址间距(m)</th>
<th class="">界址线类型</th>
<th class="">界址线位置</th>
<th class="">界限性质</th>
<th class="">说明</th>
</tr>
<tr v-if="jzxlist.length==0">
<td colspan="8"><span class="nodata">暂无数据</span></td>
</tr>
<tr v-for="(item,index) in jzxlist" :key="index" v-else>
<td class="cz"><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td>
<td class="qsd"><input type="text" class="formInput" v-model="item.qdh" readonly="readonly"/></td>
<td class="zzd"><input type="text" class="formInput" v-model="item.zdh" readonly="readonly"/></td>
<td class="jzdj"><input type="text" class="formInput" v-model="item.jzjj"
:readonly="item.jjisdisabled"/></td>
<td class="jzxlx">
<td class="">
<el-checkbox v-model="item.isCheck" @change="changeAll"></el-checkbox>
</td>
<td class="">
<el-input v-model="item.qdh" readonly="readonly"></el-input>
</td>
<td class="">
<el-input v-model="item.zdh" readonly="readonly"></el-input>
</td>
<td class="">
<el-input v-model="item.jzjj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"
:readonly="item.jjisdisabled"></el-input>
</td>
<td class="">
<el-select v-model="item.jzxlb" :disabled="item.jzxisdisabled">
<el-option
v-for="i in jzxlx"
......@@ -36,7 +46,7 @@
></el-option>
</el-select>
</td>
<td class="jzxwz">
<td class="">
<el-select v-model="item.jzxwz" :disabled="item.jzxisdisabled">
<el-option
v-for="i in jzxwz"
......@@ -46,7 +56,7 @@
></el-option>
</el-select>
</td>
<td class="jxxz">
<td class="">
<el-select v-model="item.jxxz" :disabled="item.jzxisdisabled">
<el-option
v-for="i in jxxz"
......@@ -56,8 +66,8 @@
></el-option>
</el-select>
</td>
<td class="sm">
<input type="text" class="formInput" v-model="item.sm" readonly="readonly"/>
<td class="">
<el-input v-model="item.sm" readonly="readonly"></el-input>
</td>
</tr>
</table>
......@@ -261,7 +271,7 @@
})
},
save() {
if(this.jzxlist.length === 0){
if (this.jzxlist.length === 0) {
Message.info("至少填写一条界址线信息")
return
}
......@@ -284,7 +294,8 @@
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null
},
changeAll(e) {
if (!e.target.checked) {
console.log(e,"单选")
if (!e) {
this.isCheckAll = false;
return
}
......@@ -297,8 +308,10 @@
this.isCheckAll = true;
},
allcheck(value) {
debugger
console.log(value,'全选')
for (let item of this.jzxlist) {
item.isCheck = value.target.checked;
item.isCheck = value;
}
},
oneExit() {
......@@ -368,20 +381,13 @@
background-color: #fff;
font-size: 14px;
width: 100%;
.formInput {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
cursor: text;
}
}
table:hover {
cursor: pointer;
}
th {
height: 36px;
}
td {
text-align: center;
height: 36px;
......@@ -401,6 +407,8 @@
width: 50px;
}
/*
.qsd {
width: 150px;
}
......@@ -423,7 +431,7 @@
.jxxz {
width: 150px;
}
}*/
.sm {
width: 150px;
......@@ -433,8 +441,9 @@
text-align: center;
margin-top: 20px;
}
.plxg{
.el-select{
.plxg {
.el-select {
float: left;
}
}
......