9dff21d8 by 田浩浩

修改登簿前端接口对应数据读取问题

1 parent 57e07d33
......@@ -18,7 +18,11 @@
</tr>
<!-- 第一行表头 -->
<tr class="one">
<th v-for="(item, index) in ths" :key="index" :class="[item.class, item.type == '临时' ? 'linshiIcon' : '']">
<th
v-for="(item, index) in ths"
:key="index"
:class="[item.class, item.type == '临时' ? 'linshiIcon' : '']"
>
<div class="icon" v-if="item.type == '临时'">正在办理</div>
{{ item.type }}
</th>
......@@ -35,10 +39,14 @@
<td>
{{ item.label }}
</td>
<td v-for="(item1, index1) in showTableData" :key="index1" :class="[
item1.qszt == '2' ? 'lishi' : '',
item1.qszt == '0' ? 'linshi' : '',
]">
<td
v-for="(item1, index1) in showTableData"
:key="index1"
:class="[
item1.qszt == '2' ? 'lishi' : '',
item1.qszt == '0' ? 'linshi' : '',
]"
>
{{ item1[item.prop] }}
</td>
</tr>
......@@ -53,7 +61,7 @@ import { datas } from "./jsydsyq";
import { getJsydsyqList } from "@/api/zhcx.js";
export default {
name: "jsydsyq",
data () {
data() {
return {
checkList: ["临时", "现势", "历史"],
tableData: [],
......@@ -62,84 +70,85 @@ export default {
columns: [],
title: "建设用地使用权、宅基地使用权登记信息",
emptyData: {
ssywh: '',
dah: '',
ywh: '',
ssywh: "",
dah: "",
ywh: "",
bdcdyh: "",
zl: "",
qlrlx: '',
qlrlx: "",
qlrmc: "",
qlrzjzl: "",
qlrzjhm: "",
gyfs: "",
mj: null,
qlxz: '',
qlxz: "",
ytmc: "",
syqqzsj: null,
tdsyqx: null,
qdjg: null,
djyy: '',
djyy: "",
bdcqzh: null,
djsj: '',
dbr: '',
djsj: "",
dbr: "",
fj: "",
qllxmc: "",
djlxmc: '',
djlxmc: "",
qszt: "",
}
},
};
},
async created () {
async created() {
var Sldy = this.$parent._data.unitData[0];
// 清空值
this.tableData = [];
this.ths = [];
this.columns = datas.columns();
let res = await getJsydsyqList({
bdcdyid: "2b33851f4edfd468ceef4d68c370bd41",
qllx: "A03",
qszt: ["1"]
})
let resList = res.result.result ? res.result.result : []
bdcdyid: Sldy.bdcdyid,
qllx: Sldy.qllx,
qszt: [],
});
let resList = res.result.result ? res.result.result : [];
if (resList.length < 3) {
let num = 3 - resList.length
let num = 3 - resList.length;
for (let i = 0; i < num; i++) {
resList.push(this.emptyData)
resList.push(this.emptyData);
}
}
let detail = resList
detail.length > 0 && detail.forEach((item) => {
this.tableData.push(item);
if (item.qszt == "0") {
this.ths.push({
type: "临时",
qllxmc: item.qllxmc,
djlxmc: item.djlxmc,
prop: "linshi",
class: "linshi",
});
} else if (item.qszt == "1") {
this.ths.push({
type: "现势",
qllxmc: item.qllxmc,
djlxmc: item.djlxmc,
prop: "xianshi",
class: "xianshi",
});
} else if (item.qszt == "2") {
this.ths.push({
type: "历史",
qllxmc: item.qllxmc,
djlxmc: item.djlxmc,
prop: "lishi",
class: "lishi",
});
}
});
let detail = resList;
detail.length > 0 &&
detail.forEach((item) => {
this.tableData.push(item);
if (item.qszt == "0") {
this.ths.push({
type: "临时",
qllxmc: item.qllxmc,
djlxmc: item.djlxmc,
prop: "linshi",
class: "linshi",
});
} else if (item.qszt == "1") {
this.ths.push({
type: "现势",
qllxmc: item.qllxmc,
djlxmc: item.djlxmc,
prop: "xianshi",
class: "xianshi",
});
} else if (item.qszt == "2") {
this.ths.push({
type: "历史",
qllxmc: item.qllxmc,
djlxmc: item.djlxmc,
prop: "lishi",
class: "lishi",
});
}
});
this.showTableData = this.tableData;
},
methods: {
checkChange () {
},
checkChange() {},
},
};
</script>
......@@ -181,7 +190,7 @@ export default {
width: 100%;
}
.xxTable>tr:first-child th {
.xxTable > tr:first-child th {
width: 140px;
}
......@@ -194,7 +203,7 @@ export default {
border-spacing: 1px;
width: 100%;
tr>th {
tr > th {
background: #464c5b;
color: #fff;
font-size: 16px;
......@@ -263,11 +272,11 @@ export default {
width: 140px;
}
>tr:nth-child(odd) td {
> tr:nth-child(odd) td {
background: #f2f2f2;
}
>tr:nth-child(even) td {
> tr:nth-child(even) td {
background: #f9f9f9;
}
......@@ -275,7 +284,7 @@ export default {
color: #fe9400;
}
tr>td.lishi {
tr > td.lishi {
color: #7f7f7f;
}
}
......
......@@ -254,7 +254,7 @@ export default {
},
loadView(view) {
return (r) =>
require.ensure([], () => r(require(`./components/${view}.vue`)));
require.ensure([], () => r(require(`./components/${view}.vue`)));
},
loadViewSlsq() {
return (r) =>
......