6528b17e by renchao@pashanhoo.com

Merge branch 'dev'

2 parents 39d0902b 248f1b5f
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-10-19 16:57:33
* @LastEditTime: 2023-10-20 10:27:25
-->
<template>
<div class="tableBox">
......@@ -74,7 +74,7 @@
<el-link v-if="['zxywh', 'ywh'].includes(item.prop)"
@click="handleSelectYwh(row, row[item.prop])"
type="primary">{{ row[item.prop] }}</el-link>
<span v-if="!['qszt','ywh', 'zxywh' ].includes(item.prop)">{{ row[item.prop] }}</span>
<span v-if="!['qszt','ywh', 'zxywh' ].includes(item.prop)">{{ getLable(item.prop,row[item.prop]) }}</span>
</p>
<el-tooltip
......@@ -96,6 +96,7 @@
</template>
<script>
import Router from '@/router'
import { mapGetters } from "vuex";
import { datas } from "../qlxxFormData.js";
import { ywPopupDialog } from "@/utils/popup.js";
import printTemplate from "../components/printTemplate.vue";
......@@ -128,6 +129,9 @@
default: () => []
},
},
computed: {
...mapGetters(["dictData"]),
},
data () {
return {
qsztList: datas.columns().qsztList,
......@@ -138,6 +142,25 @@
};
},
methods: {
getLable (prop, label) {
const ztObj = {
0: '否',
1: '是'
};
const strategies = {
sfygdj: (label) => ztObj[label] || label,
sfczjzhxz: (label) => ztObj[label] || label,
dyrlx: (label) => {
let arr = this.dictData['A36'].filter(item => item.dcode === label);
return arr.length > 0 ? arr[0].dname : label;
},
default: (label) => label
};
const strategy = strategies[prop] || strategies.default;
return strategy(label);
},
openPrint () {
this.render = true;
setTimeout(() => {
......
<!--
* @Description:
* @Autor: miaofang
* @LastEditTime: 2023-10-19 16:13:55
* @LastEditTime: 2023-10-20 10:28:07
-->
<template>
<div class="djxxTable">
......@@ -95,7 +95,7 @@
item.prop !== 'fj' &&
!judge(item.label)
">
{{ row[item.prop] }}
{{ getLable(item.prop,row[item.prop]) }}
</span>
<div class="many" v-if="judge(item.label)">
<div
......@@ -155,10 +155,25 @@
}
},
methods: {
/**
* @description: openPrint
* @author: miaofang
*/
getLable (prop, label) {
const ztObj = {
0: '否',
1: '是'
};
const strategies = {
sfygdj: (label) => ztObj[label] || label,
sfczjzhxz: (label) => ztObj[label] || label,
dyrlx: (label) => {
let arr = this.dictData['A36'].filter(item => item.dcode === label);
return arr.length > 0 ? arr[0].dname : label;
},
default: (label) => label
};
const strategy = strategies[prop] || strategies.default;
return strategy(label);
},
openPrint () {
this.render = true;
setTimeout(() => {
......