6528b17e by renchao@pashanhoo.com

Merge branch 'dev'

2 parents 39d0902b 248f1b5f
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:27:25
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,25 @@ ...@@ -138,6 +142,25 @@
138 }; 142 };
139 }, 143 },
140 methods: { 144 methods: {
145 getLable (prop, label) {
146 const ztObj = {
147 0: '否',
148 1: '是'
149 };
150
151 const strategies = {
152 sfygdj: (label) => ztObj[label] || label,
153 sfczjzhxz: (label) => ztObj[label] || label,
154 dyrlx: (label) => {
155 let arr = this.dictData['A36'].filter(item => item.dcode === label);
156 return arr.length > 0 ? arr[0].dname : label;
157 },
158 default: (label) => label
159 };
160
161 const strategy = strategies[prop] || strategies.default;
162 return strategy(label);
163 },
141 openPrint () { 164 openPrint () {
142 this.render = true; 165 this.render = true;
143 setTimeout(() => { 166 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:28:07
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,25 @@ ...@@ -155,10 +155,25 @@
155 } 155 }
156 }, 156 },
157 methods: { 157 methods: {
158 /** 158 getLable (prop, label) {
159 * @description: openPrint 159 const ztObj = {
160 * @author: miaofang 160 0: '否',
161 */ 161 1: '是'
162 };
163
164 const strategies = {
165 sfygdj: (label) => ztObj[label] || label,
166 sfczjzhxz: (label) => ztObj[label] || label,
167 dyrlx: (label) => {
168 let arr = this.dictData['A36'].filter(item => item.dcode === label);
169 return arr.length > 0 ? arr[0].dname : label;
170 },
171 default: (label) => label
172 };
173
174 const strategy = strategies[prop] || strategies.default;
175 return strategy(label);
176 },
162 openPrint () { 177 openPrint () {
163 this.render = true; 178 this.render = true;
164 setTimeout(() => { 179 setTimeout(() => {
......