style:登记薄查询字典转换
Showing
3 changed files
with
59 additions
and
20 deletions
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-03 08:59:06 | ||
5 | */ | ||
6 | import store from '@/store' | ||
1 | export function getSjlx (level) { | 7 | export function getSjlx (level) { |
2 | const resultMap = { | 8 | const resultMap = { |
3 | 1: '系统数据', | 9 | 1: '系统数据', |
... | @@ -5,4 +11,16 @@ export function getSjlx (level) { | ... | @@ -5,4 +11,16 @@ export function getSjlx (level) { |
5 | 3: '补录数据', | 11 | 3: '补录数据', |
6 | } | 12 | } |
7 | return resultMap[level] || resultMap.default; | 13 | return resultMap[level] || resultMap.default; |
14 | } | ||
15 | |||
16 | export function getDictLeabel (level, code) { | ||
17 | const resultMap = store.getters.dictData[code] | ||
18 | const desiredObject = resultMap.find(obj => obj.dcode === level); | ||
19 | |||
20 | if (desiredObject) { | ||
21 | const desiredName = desiredObject.dname; | ||
22 | return desiredName | ||
23 | } else { | ||
24 | return '' | ||
25 | } | ||
8 | } | 26 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -4,7 +4,7 @@ class data extends filter { | ... | @@ -4,7 +4,7 @@ class data extends filter { |
4 | constructor() { | 4 | constructor() { |
5 | super() | 5 | super() |
6 | } | 6 | } |
7 | columns() { | 7 | columns () { |
8 | return { | 8 | return { |
9 | //空列值个数 | 9 | //空列值个数 |
10 | emptycolNum: 3, | 10 | emptycolNum: 3, |
... | @@ -26,9 +26,10 @@ class data extends filter { | ... | @@ -26,9 +26,10 @@ class data extends filter { |
26 | ], | 26 | ], |
27 | JSYDSYQ: [ | 27 | JSYDSYQ: [ |
28 | 28 | ||
29 | { prop:"cz", | 29 | { |
30 | label:"操作", | 30 | prop: "cz", |
31 | render: (h, scope) => { | 31 | label: "操作", |
32 | render: (h, scope) => { | ||
32 | return ( | 33 | return ( |
33 | <div> | 34 | <div> |
34 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.openDialog(scope.row) }}>登记薄</el-button> | 35 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.openDialog(scope.row) }}>登记薄</el-button> |
... | @@ -144,8 +145,9 @@ class data extends filter { | ... | @@ -144,8 +145,9 @@ class data extends filter { |
144 | ], | 145 | ], |
145 | FDCQ2: [ | 146 | FDCQ2: [ |
146 | 147 | ||
147 | { prop:"cz", | 148 | { |
148 | label:"操作" | 149 | prop: "cz", |
150 | label: "操作" | ||
149 | }, | 151 | }, |
150 | { | 152 | { |
151 | prop: "qszt", | 153 | prop: "qszt", |
... | @@ -283,8 +285,9 @@ class data extends filter { | ... | @@ -283,8 +285,9 @@ class data extends filter { |
283 | ], | 285 | ], |
284 | NYDSYQ: [ | 286 | NYDSYQ: [ |
285 | 287 | ||
286 | { prop:"cz", | 288 | { |
287 | label:"操作" | 289 | prop: "cz", |
290 | label: "操作" | ||
288 | }, | 291 | }, |
289 | { | 292 | { |
290 | prop: "qszt", | 293 | prop: "qszt", |
... | @@ -412,9 +415,9 @@ class data extends filter { | ... | @@ -412,9 +415,9 @@ class data extends filter { |
412 | }, | 415 | }, |
413 | ], | 416 | ], |
414 | DYAQ: [ | 417 | DYAQ: [ |
415 | 418 | { | |
416 | { prop:"cz", | 419 | prop: "cz", |
417 | label:"操作" | 420 | label: "操作" |
418 | }, | 421 | }, |
419 | { | 422 | { |
420 | prop: "qszt", | 423 | prop: "qszt", |
... | @@ -423,6 +426,19 @@ class data extends filter { | ... | @@ -423,6 +426,19 @@ class data extends filter { |
423 | { | 426 | { |
424 | prop: "dybdclx", | 427 | prop: "dybdclx", |
425 | label: "抵押不动产类型", | 428 | label: "抵押不动产类型", |
429 | render: (h, scope) => { | ||
430 | return ( | ||
431 | <div> | ||
432 | <span v-show={scope.row.dybdclx == '1'}>土地</span> | ||
433 | <span v-show={scope.row.dybdclx == '2'}>土地和房屋</span> | ||
434 | <span v-show={scope.row.dybdclx == '3'}>林地和林木</span> | ||
435 | <span v-show={scope.row.dybdclx == '4'}>土地和在建建筑物</span> | ||
436 | <span v-show={scope.row.dybdclx == '5'}>海域</span> | ||
437 | <span v-show={scope.row.dybdclx == '6'}>海域和构筑物</span> | ||
438 | <span v-show={scope.row.dybdclx == '7'}>其它</span> | ||
439 | </div> | ||
440 | ) | ||
441 | } | ||
426 | }, | 442 | }, |
427 | { | 443 | { |
428 | prop: "djlxmc", | 444 | prop: "djlxmc", |
... | @@ -572,8 +588,9 @@ class data extends filter { | ... | @@ -572,8 +588,9 @@ class data extends filter { |
572 | ], | 588 | ], |
573 | DYIQ: [ | 589 | DYIQ: [ |
574 | 590 | ||
575 | { prop:"cz", | 591 | { |
576 | label:"操作" | 592 | prop: "cz", |
593 | label: "操作" | ||
577 | }, | 594 | }, |
578 | { | 595 | { |
579 | prop: "qszt", | 596 | prop: "qszt", |
... | @@ -666,8 +683,9 @@ class data extends filter { | ... | @@ -666,8 +683,9 @@ class data extends filter { |
666 | ], | 683 | ], |
667 | YGDJ: [ | 684 | YGDJ: [ |
668 | 685 | ||
669 | { prop:"cz", | 686 | { |
670 | label:"操作" | 687 | prop: "cz", |
688 | label: "操作" | ||
671 | }, | 689 | }, |
672 | { | 690 | { |
673 | prop: "qszt", | 691 | prop: "qszt", |
... | @@ -792,8 +810,9 @@ class data extends filter { | ... | @@ -792,8 +810,9 @@ class data extends filter { |
792 | ], | 810 | ], |
793 | CFDJ: [ | 811 | CFDJ: [ |
794 | 812 | ||
795 | { prop:"cz", | 813 | { |
796 | label:"操作" | 814 | prop: "cz", |
815 | label: "操作" | ||
797 | }, | 816 | }, |
798 | { | 817 | { |
799 | prop: "qszt", | 818 | prop: "qszt", |
... | @@ -903,8 +922,9 @@ class data extends filter { | ... | @@ -903,8 +922,9 @@ class data extends filter { |
903 | ], | 922 | ], |
904 | YYDJ: [ | 923 | YYDJ: [ |
905 | 924 | ||
906 | { prop:"cz", | 925 | { |
907 | label:"操作" | 926 | prop: "cz", |
927 | label: "操作" | ||
908 | }, | 928 | }, |
909 | { | 929 | { |
910 | prop: "qszt", | 930 | prop: "qszt", | ... | ... |
... | @@ -59,7 +59,7 @@ | ... | @@ -59,7 +59,7 @@ |
59 | 59 | ||
60 | <script> | 60 | <script> |
61 | import { datas } from "./qlxxFormData.js"; | 61 | import { datas } from "./qlxxFormData.js"; |
62 | import { getSjlx } from "@/utils/dictionary.js"; | 62 | import { getSjlx, getDictLeabel } from "@/utils/dictionary.js"; |
63 | import { getDiyaqList } from "@/api/registerBook.js"; | 63 | import { getDiyaqList } from "@/api/registerBook.js"; |
64 | export default { | 64 | export default { |
65 | data () { | 65 | data () { |
... | @@ -94,6 +94,7 @@ | ... | @@ -94,6 +94,7 @@ |
94 | this.tableData = res.result; | 94 | this.tableData = res.result; |
95 | this.tableData.forEach((item) => { | 95 | this.tableData.forEach((item) => { |
96 | item.sjlx = getSjlx(item.sjlx); | 96 | item.sjlx = getSjlx(item.sjlx); |
97 | item.dybdclx = getDictLeabel(item.dybdclx, 'A27') | ||
97 | }); | 98 | }); |
98 | if (this.tableData.length < datas.columns().emptycolNum) { | 99 | if (this.tableData.length < datas.columns().emptycolNum) { |
99 | this.emptycolNum = | 100 | this.emptycolNum = | ... | ... |
-
Please register or sign in to post a comment