style:登记薄字段前端的转换
Showing
2 changed files
with
36 additions
and
8 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-10-19 16:57:33 | 4 | * @LastEditTime: 2023-10-20 10:17:28 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="tableBox"> | 7 | <div class="tableBox"> |
... | @@ -74,7 +74,7 @@ | ... | @@ -74,7 +74,7 @@ |
74 | <el-link v-if="['zxywh', 'ywh'].includes(item.prop)" | 74 | <el-link v-if="['zxywh', 'ywh'].includes(item.prop)" |
75 | @click="handleSelectYwh(row, row[item.prop])" | 75 | @click="handleSelectYwh(row, row[item.prop])" |
76 | type="primary">{{ row[item.prop] }}</el-link> | 76 | type="primary">{{ row[item.prop] }}</el-link> |
77 | <span v-if="!['qszt','ywh', 'zxywh' ].includes(item.prop)">{{ row[item.prop] }}</span> | 77 | <span v-if="!['qszt','ywh', 'zxywh' ].includes(item.prop)">{{ getLable(item.prop,row[item.prop]) }}</span> |
78 | </p> | 78 | </p> |
79 | 79 | ||
80 | <el-tooltip | 80 | <el-tooltip |
... | @@ -96,6 +96,7 @@ | ... | @@ -96,6 +96,7 @@ |
96 | </template> | 96 | </template> |
97 | <script> | 97 | <script> |
98 | import Router from '@/router' | 98 | import Router from '@/router' |
99 | import { mapGetters } from "vuex"; | ||
99 | import { datas } from "../qlxxFormData.js"; | 100 | import { datas } from "../qlxxFormData.js"; |
100 | import { ywPopupDialog } from "@/utils/popup.js"; | 101 | import { ywPopupDialog } from "@/utils/popup.js"; |
101 | import printTemplate from "../components/printTemplate.vue"; | 102 | import printTemplate from "../components/printTemplate.vue"; |
... | @@ -128,6 +129,9 @@ | ... | @@ -128,6 +129,9 @@ |
128 | default: () => [] | 129 | default: () => [] |
129 | }, | 130 | }, |
130 | }, | 131 | }, |
132 | computed: { | ||
133 | ...mapGetters(["dictData"]), | ||
134 | }, | ||
131 | data () { | 135 | data () { |
132 | return { | 136 | return { |
133 | qsztList: datas.columns().qsztList, | 137 | qsztList: datas.columns().qsztList, |
... | @@ -138,6 +142,20 @@ | ... | @@ -138,6 +142,20 @@ |
138 | }; | 142 | }; |
139 | }, | 143 | }, |
140 | methods: { | 144 | methods: { |
145 | getLable (prop, label) { | ||
146 | let ztObj = { | ||
147 | 0: '否', | ||
148 | 1: '是' | ||
149 | } | ||
150 | if (['sfygdj', 'sfczjzhxz'].includes(prop)) { | ||
151 | return ztObj[label] | ||
152 | } else if (prop == 'dyrlx') { | ||
153 | let arr = this.dictData['A36'].filter(item => item.dcode === label) | ||
154 | return arr[0].dname; | ||
155 | } else { | ||
156 | return label | ||
157 | } | ||
158 | }, | ||
141 | openPrint () { | 159 | openPrint () { |
142 | this.render = true; | 160 | this.render = true; |
143 | setTimeout(() => { | 161 | setTimeout(() => { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: miaofang | 3 | * @Autor: miaofang |
4 | * @LastEditTime: 2023-10-19 16:13:55 | 4 | * @LastEditTime: 2023-10-20 10:17:47 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="djxxTable"> | 7 | <div class="djxxTable"> |
... | @@ -95,7 +95,7 @@ | ... | @@ -95,7 +95,7 @@ |
95 | item.prop !== 'fj' && | 95 | item.prop !== 'fj' && |
96 | !judge(item.label) | 96 | !judge(item.label) |
97 | "> | 97 | "> |
98 | {{ row[item.prop] }} | 98 | {{ getLable(item.prop,row[item.prop]) }} |
99 | </span> | 99 | </span> |
100 | <div class="many" v-if="judge(item.label)"> | 100 | <div class="many" v-if="judge(item.label)"> |
101 | <div | 101 | <div |
... | @@ -155,10 +155,20 @@ | ... | @@ -155,10 +155,20 @@ |
155 | } | 155 | } |
156 | }, | 156 | }, |
157 | methods: { | 157 | methods: { |
158 | /** | 158 | getLable (prop, label) { |
159 | * @description: openPrint | 159 | let ztObj = { |
160 | * @author: miaofang | 160 | 0: '否', |
161 | */ | 161 | 1: '是' |
162 | } | ||
163 | if (['sfygdj', 'sfczjzhxz'].includes(prop)) { | ||
164 | return ztObj[label] | ||
165 | } else if (prop == 'dyrlx') { | ||
166 | let arr = this.dictData['A36'].filter(item => item.dcode === label) | ||
167 | return arr[0].dname; | ||
168 | } else { | ||
169 | return label | ||
170 | } | ||
171 | }, | ||
162 | openPrint () { | 172 | openPrint () { |
163 | this.render = true; | 173 | this.render = true; |
164 | setTimeout(() => { | 174 | setTimeout(() => { | ... | ... |
-
Please register or sign in to post a comment