修改登簿前端接口对应数据读取问题
Showing
3 changed files
with
70 additions
and
61 deletions
| ... | @@ -18,7 +18,11 @@ | ... | @@ -18,7 +18,11 @@ |
| 18 | </tr> | 18 | </tr> |
| 19 | <!-- 第一行表头 --> | 19 | <!-- 第一行表头 --> |
| 20 | <tr class="one"> | 20 | <tr class="one"> |
| 21 | <th v-for="(item, index) in ths" :key="index" :class="[item.class, item.type == '临时' ? 'linshiIcon' : '']"> | 21 | <th |
| 22 | v-for="(item, index) in ths" | ||
| 23 | :key="index" | ||
| 24 | :class="[item.class, item.type == '临时' ? 'linshiIcon' : '']" | ||
| 25 | > | ||
| 22 | <div class="icon" v-if="item.type == '临时'">正在办理</div> | 26 | <div class="icon" v-if="item.type == '临时'">正在办理</div> |
| 23 | {{ item.type }} | 27 | {{ item.type }} |
| 24 | </th> | 28 | </th> |
| ... | @@ -35,10 +39,14 @@ | ... | @@ -35,10 +39,14 @@ |
| 35 | <td> | 39 | <td> |
| 36 | {{ item.label }} | 40 | {{ item.label }} |
| 37 | </td> | 41 | </td> |
| 38 | <td v-for="(item1, index1) in showTableData" :key="index1" :class="[ | 42 | <td |
| 39 | item1.qszt == '2' ? 'lishi' : '', | 43 | v-for="(item1, index1) in showTableData" |
| 40 | item1.qszt == '0' ? 'linshi' : '', | 44 | :key="index1" |
| 41 | ]"> | 45 | :class="[ |
| 46 | item1.qszt == '2' ? 'lishi' : '', | ||
| 47 | item1.qszt == '0' ? 'linshi' : '', | ||
| 48 | ]" | ||
| 49 | > | ||
| 42 | {{ item1[item.prop] }} | 50 | {{ item1[item.prop] }} |
| 43 | </td> | 51 | </td> |
| 44 | </tr> | 52 | </tr> |
| ... | @@ -53,7 +61,7 @@ import { datas } from "./jsydsyq"; | ... | @@ -53,7 +61,7 @@ import { datas } from "./jsydsyq"; |
| 53 | import { getJsydsyqList } from "@/api/zhcx.js"; | 61 | import { getJsydsyqList } from "@/api/zhcx.js"; |
| 54 | export default { | 62 | export default { |
| 55 | name: "jsydsyq", | 63 | name: "jsydsyq", |
| 56 | data () { | 64 | data() { |
| 57 | return { | 65 | return { |
| 58 | checkList: ["临时", "现势", "历史"], | 66 | checkList: ["临时", "现势", "历史"], |
| 59 | tableData: [], | 67 | tableData: [], |
| ... | @@ -62,84 +70,85 @@ export default { | ... | @@ -62,84 +70,85 @@ export default { |
| 62 | columns: [], | 70 | columns: [], |
| 63 | title: "建设用地使用权、宅基地使用权登记信息", | 71 | title: "建设用地使用权、宅基地使用权登记信息", |
| 64 | emptyData: { | 72 | emptyData: { |
| 65 | ssywh: '', | 73 | ssywh: "", |
| 66 | dah: '', | 74 | dah: "", |
| 67 | ywh: '', | 75 | ywh: "", |
| 68 | bdcdyh: "", | 76 | bdcdyh: "", |
| 69 | zl: "", | 77 | zl: "", |
| 70 | qlrlx: '', | 78 | qlrlx: "", |
| 71 | qlrmc: "", | 79 | qlrmc: "", |
| 72 | qlrzjzl: "", | 80 | qlrzjzl: "", |
| 73 | qlrzjhm: "", | 81 | qlrzjhm: "", |
| 74 | gyfs: "", | 82 | gyfs: "", |
| 75 | mj: null, | 83 | mj: null, |
| 76 | qlxz: '', | 84 | qlxz: "", |
| 77 | ytmc: "", | 85 | ytmc: "", |
| 78 | syqqzsj: null, | 86 | syqqzsj: null, |
| 79 | tdsyqx: null, | 87 | tdsyqx: null, |
| 80 | qdjg: null, | 88 | qdjg: null, |
| 81 | djyy: '', | 89 | djyy: "", |
| 82 | bdcqzh: null, | 90 | bdcqzh: null, |
| 83 | djsj: '', | 91 | djsj: "", |
| 84 | dbr: '', | 92 | dbr: "", |
| 85 | fj: "", | 93 | fj: "", |
| 86 | qllxmc: "", | 94 | qllxmc: "", |
| 87 | djlxmc: '', | 95 | djlxmc: "", |
| 88 | qszt: "", | 96 | qszt: "", |
| 89 | } | 97 | }, |
| 90 | }; | 98 | }; |
| 91 | }, | 99 | }, |
| 92 | async created () { | 100 | async created() { |
| 101 | var Sldy = this.$parent._data.unitData[0]; | ||
| 93 | // 清空值 | 102 | // 清空值 |
| 94 | this.tableData = []; | 103 | this.tableData = []; |
| 95 | this.ths = []; | 104 | this.ths = []; |
| 96 | this.columns = datas.columns(); | 105 | this.columns = datas.columns(); |
| 97 | let res = await getJsydsyqList({ | 106 | let res = await getJsydsyqList({ |
| 98 | bdcdyid: "2b33851f4edfd468ceef4d68c370bd41", | 107 | bdcdyid: Sldy.bdcdyid, |
| 99 | qllx: "A03", | 108 | qllx: Sldy.qllx, |
| 100 | qszt: ["1"] | 109 | qszt: [], |
| 101 | }) | 110 | }); |
| 102 | let resList = res.result.result ? res.result.result : [] | 111 | let resList = res.result.result ? res.result.result : []; |
| 103 | if (resList.length < 3) { | 112 | if (resList.length < 3) { |
| 104 | let num = 3 - resList.length | 113 | let num = 3 - resList.length; |
| 105 | for (let i = 0; i < num; i++) { | 114 | for (let i = 0; i < num; i++) { |
| 106 | resList.push(this.emptyData) | 115 | resList.push(this.emptyData); |
| 107 | } | 116 | } |
| 108 | } | 117 | } |
| 109 | let detail = resList | 118 | let detail = resList; |
| 110 | detail.length > 0 && detail.forEach((item) => { | 119 | detail.length > 0 && |
| 111 | this.tableData.push(item); | 120 | detail.forEach((item) => { |
| 112 | if (item.qszt == "0") { | 121 | this.tableData.push(item); |
| 113 | this.ths.push({ | 122 | if (item.qszt == "0") { |
| 114 | type: "临时", | 123 | this.ths.push({ |
| 115 | qllxmc: item.qllxmc, | 124 | type: "临时", |
| 116 | djlxmc: item.djlxmc, | 125 | qllxmc: item.qllxmc, |
| 117 | prop: "linshi", | 126 | djlxmc: item.djlxmc, |
| 118 | class: "linshi", | 127 | prop: "linshi", |
| 119 | }); | 128 | class: "linshi", |
| 120 | } else if (item.qszt == "1") { | 129 | }); |
| 121 | this.ths.push({ | 130 | } else if (item.qszt == "1") { |
| 122 | type: "现势", | 131 | this.ths.push({ |
| 123 | qllxmc: item.qllxmc, | 132 | type: "现势", |
| 124 | djlxmc: item.djlxmc, | 133 | qllxmc: item.qllxmc, |
| 125 | prop: "xianshi", | 134 | djlxmc: item.djlxmc, |
| 126 | class: "xianshi", | 135 | prop: "xianshi", |
| 127 | }); | 136 | class: "xianshi", |
| 128 | } else if (item.qszt == "2") { | 137 | }); |
| 129 | this.ths.push({ | 138 | } else if (item.qszt == "2") { |
| 130 | type: "历史", | 139 | this.ths.push({ |
| 131 | qllxmc: item.qllxmc, | 140 | type: "历史", |
| 132 | djlxmc: item.djlxmc, | 141 | qllxmc: item.qllxmc, |
| 133 | prop: "lishi", | 142 | djlxmc: item.djlxmc, |
| 134 | class: "lishi", | 143 | prop: "lishi", |
| 135 | }); | 144 | class: "lishi", |
| 136 | } | 145 | }); |
| 137 | }); | 146 | } |
| 147 | }); | ||
| 138 | this.showTableData = this.tableData; | 148 | this.showTableData = this.tableData; |
| 139 | }, | 149 | }, |
| 140 | methods: { | 150 | methods: { |
| 141 | checkChange () { | 151 | checkChange() {}, |
| 142 | }, | ||
| 143 | }, | 152 | }, |
| 144 | }; | 153 | }; |
| 145 | </script> | 154 | </script> |
| ... | @@ -181,7 +190,7 @@ export default { | ... | @@ -181,7 +190,7 @@ export default { |
| 181 | width: 100%; | 190 | width: 100%; |
| 182 | } | 191 | } |
| 183 | 192 | ||
| 184 | .xxTable>tr:first-child th { | 193 | .xxTable > tr:first-child th { |
| 185 | width: 140px; | 194 | width: 140px; |
| 186 | } | 195 | } |
| 187 | 196 | ||
| ... | @@ -194,7 +203,7 @@ export default { | ... | @@ -194,7 +203,7 @@ export default { |
| 194 | border-spacing: 1px; | 203 | border-spacing: 1px; |
| 195 | width: 100%; | 204 | width: 100%; |
| 196 | 205 | ||
| 197 | tr>th { | 206 | tr > th { |
| 198 | background: #464c5b; | 207 | background: #464c5b; |
| 199 | color: #fff; | 208 | color: #fff; |
| 200 | font-size: 16px; | 209 | font-size: 16px; |
| ... | @@ -263,11 +272,11 @@ export default { | ... | @@ -263,11 +272,11 @@ export default { |
| 263 | width: 140px; | 272 | width: 140px; |
| 264 | } | 273 | } |
| 265 | 274 | ||
| 266 | >tr:nth-child(odd) td { | 275 | > tr:nth-child(odd) td { |
| 267 | background: #f2f2f2; | 276 | background: #f2f2f2; |
| 268 | } | 277 | } |
| 269 | 278 | ||
| 270 | >tr:nth-child(even) td { | 279 | > tr:nth-child(even) td { |
| 271 | background: #f9f9f9; | 280 | background: #f9f9f9; |
| 272 | } | 281 | } |
| 273 | 282 | ||
| ... | @@ -275,7 +284,7 @@ export default { | ... | @@ -275,7 +284,7 @@ export default { |
| 275 | color: #fe9400; | 284 | color: #fe9400; |
| 276 | } | 285 | } |
| 277 | 286 | ||
| 278 | tr>td.lishi { | 287 | tr > td.lishi { |
| 279 | color: #7f7f7f; | 288 | color: #7f7f7f; |
| 280 | } | 289 | } |
| 281 | } | 290 | } | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -254,7 +254,7 @@ export default { | ... | @@ -254,7 +254,7 @@ export default { |
| 254 | }, | 254 | }, |
| 255 | loadView(view) { | 255 | loadView(view) { |
| 256 | return (r) => | 256 | return (r) => |
| 257 | require.ensure([], () => r(require(`./components/${view}.vue`))); | 257 | require.ensure([], () => r(require(`./components/${view}.vue`))); |
| 258 | }, | 258 | }, |
| 259 | loadViewSlsq() { | 259 | loadViewSlsq() { |
| 260 | return (r) => | 260 | return (r) => | ... | ... |
-
Please register or sign in to post a comment