8f874e2c by 杨威

字段校对

1 parent b397629f
......@@ -52,7 +52,7 @@
<li>
<el-select class="formSelect percent30" v-model="items.pzyt">
<el-option
v-for="item in pzytList"
v-for="item in $store.state.tdytList"
:key="item.dm"
:label="item.mc"
:value="item.dm"
......@@ -63,7 +63,7 @@
<li>
<el-select class="formSelect percent30" v-model="items.sjyt">
<el-option
v-for="item in sjytList"
v-for="item in $store.state.tdytList"
:key="item.dm"
:label="item.mc"
:value="item.dm"
......@@ -113,10 +113,10 @@
<li>
<el-select class="formSelect percent30" v-model="items.dj1">
<el-option
v-for="item in djList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in $store.state.tddjList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
......@@ -124,10 +124,10 @@
<li>
<el-select class="formSelect percent30" v-model="items.dj2">
<el-option
v-for="item in djList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in $store.state.tddjList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
......@@ -145,10 +145,10 @@
<div class="title">
<el-select class="formSelect" v-model="items.qlxz">
<el-option
v-for="item in compareList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in $store.state.qlxzList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
......@@ -176,14 +176,6 @@ export default {
},
data() {
return {
pzytList:[],
sjytList:[],
djList:[],
compareList: [
{label: "=", value: "="},
{label: "<=", value: "<="},
{label: ">=", value: ">="},
],
countList: [
{
id: Math.random(),
......@@ -201,26 +193,12 @@ export default {
tdsyjssj: "",
},
],
outNum:0
};
},
created(){
this.getDicData()
},
methods: {
//获取字典数据
getDicData(){
getDdicByMC("土地用途")
.then((res) => {
this.pzytList = res.result;
this.sjytList = res.result;
})
.catch((error) => {});
getDdicByMC("土地等级")
.then((res) => {
this.djList = res.result;
})
.catch((error) => {});
},
//外层操作
handleClick(id, ind, type) {
if (type === "add") {
......@@ -239,12 +217,14 @@ export default {
dj2: "",
tdsyjssj: "",
});
this.outNum++
} else {
this.countList.forEach((item, index) => {
if (index == ind && this.countList.length > 1) {
this.countList.splice(index, 1);
}
});
this.outNum--
}
this.hasBorderOrNot();
},
......@@ -283,9 +263,14 @@ export default {
tempNum++;
}
});
//判断外层是否没有增加,如果没有增加,则不能删除当前外层
if(ind == 0 && this.outNum == 0){
}else{
this.countList.splice(tempIndex, tempNum);
}
}
}
this.hasBorderOrNot();
},
//判断是否显示边框
......