0feaffa7 by renchao@pashanhoo.com

style:登记薄字段前端的转换

1 parent 190f34d8
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-10-19 16:57:33
* @LastEditTime: 2023-10-20 10:17:28
-->
<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,20 @@
};
},
methods: {
getLable (prop, label) {
let ztObj = {
0: '否',
1: '是'
}
if (['sfygdj', 'sfczjzhxz'].includes(prop)) {
return ztObj[label]
} else if (prop == 'dyrlx') {
let arr = this.dictData['A36'].filter(item => item.dcode === label)
return arr[0].dname;
} else {
return label
}
},
openPrint () {
this.render = true;
setTimeout(() => {
......
<!--
* @Description:
* @Autor: miaofang
* @LastEditTime: 2023-10-19 16:13:55
* @LastEditTime: 2023-10-20 10:17:47
-->
<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,20 @@
}
},
methods: {
/**
* @description: openPrint
* @author: miaofang
*/
getLable (prop, label) {
let ztObj = {
0: '否',
1: '是'
}
if (['sfygdj', 'sfczjzhxz'].includes(prop)) {
return ztObj[label]
} else if (prop == 'dyrlx') {
let arr = this.dictData['A36'].filter(item => item.dcode === label)
return arr[0].dname;
} else {
return label
}
},
openPrint () {
this.render = true;
setTimeout(() => {
......