e26089d2 by weimo934

feat(fg):添加分割后表单

1 parent 06f8233f
......@@ -31,11 +31,94 @@
</tr>
</table>
</div>
<div class="fgh">
<span>分割后宗地:</span>
<table border="1">
<tr>
<td>操作</td>
<td>行政区</td>
<td>地籍区</td>
<td>地籍子区</td>
<td>土地特征码</td>
<td>项目名称</td>
<td>幢信息</td>
</tr>
<tr v-for="(item,index) in fghData" :key="index">
<td @click="delRow(index)">-</td>
<td>
<el-select v-model="item.xzqbsm" @change="changeXzq(item.xzqbsm)">
<el-option
v-for="i in xzq"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
<td>
<el-select v-model="item.djqbsm" @change="changeDjq(item.djqbsm)">
<el-option
v-for="i in djq"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
<td>
<el-select v-model="item.djzqbsm">
<el-option
v-for="i in djzq"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
<td>
<el-select v-model="item.zdtzmbsm">
<el-option
v-for="i in tdtzm"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
<td>
<input type="text" v-model="item.xmmc" class="formInput"/>
</td>
<td>
<input type="text" v-model="item.zxx" class="formInput"/>
</td>
</tr>
<tr>
<td @click="addRow">+</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<query-data @getData="getData" :centerDialogVisible.sync="centerDialogVisible" @close="close"></query-data>
<div class="header-button">
<el-button type="primary" @click="save">保存</el-button>
</div>
</div>
</template>
<script>
import {
getAllList,
getListByXzqbsm,
getListByPbsm,
getDdicByMC
} from "./../../../../api/common";
import {getQjZdjbxxDetailById} from './../../../../api/zd'
import QueryData from './../../../../components/queryData/queryData'
export default {
......@@ -45,14 +128,89 @@
data() {
return {
centerDialogVisible: false,
bgqData: {}
bgqData: {},
xzq: [],
djq: [],
djzq: [],
tdtzm: [],
Data: {
xzqbsm: '',
djqbsm: '',
djzqbsm: '',
zdtzmbsm: '',
zmmc: '',
zxx: ''
},
fghData: [],
}
},
created() {
},
mounted() {
this.getXzqList();
this.getzdtzm();
},
methods: {
save() {
console.log("save........")
},
getJbxx(id) {
getQjZdjbxxDetailById(id).then(res => {
this.Data = res.result
})
},
getzdtzm() {
getDdicByMC('宗地(宗海)特征码').then(res => {
this.tdtzm = res.result
})
},
getXzqList() {
getAllList()
.then((res) => {
console.log(res)
this.xzq = res.result;
})
.catch((error) => {
});
},
changeXzq(id) {
this.djq = [];
this.djzq = [];
getListByXzqbsm(id)
.then((res) => {
if (res.result == null) {
this.djq = null;
} else {
this.djq = res.result;
}
})
.catch((error) => {
});
},
changeDjq(item) {
this.djzq = [];
if (item == null) {
} else {
console.log(item);
getListByPbsm(item)
.then((res) => {
if (res.result == null) {
this.djzq = null;
} else {
this.djzq = res.result;
}
})
.catch((error) => {
});
}
},
addRow() {
this.fghData.push(this.Data)
},
delRow(index) {
this.fghData.splice(index, 1)
},
close: function () {
this.centerDialogVisible = false;
},
......@@ -68,7 +226,14 @@
},
},
computed: {},
watch: {},
watch: {
bgqData: {
handler: function (item) {
this.getJbxx(item.glbsm)
},
deep: true
}
},
}
</script>
<style scoped lang="less">
......@@ -109,5 +274,12 @@
.noData {
color: #b2b2b2;
}
.fgh{
margin-top: 20px;
}
.header-button {
margin-top: 20px;
text-align: center;
}
}
</style>
......