fix 80566

This commit is contained in:
赵霄
2024-01-15 11:08:17 +08:00
parent 83dcd43936
commit 841cd06113
6 changed files with 49 additions and 18 deletions
+6
View File
@@ -6,6 +6,12 @@
</template> </template>
<!-- 如果是普通插槽,直接使用$slots渲染 --> <!-- 如果是普通插槽,直接使用$slots渲染 -->
<slot v-for="(_, slotName) in $slots" :name="slotName" :slot="slotName" /> <slot v-for="(_, slotName) in $slots" :name="slotName" :slot="slotName" />
<!--默认的插槽-->
<template v-slot:text="text">
{{ text || text === 0 ? text : global.emptyLine }}
</template>
<!-- 表格扩展插槽 --> <!-- 表格扩展插槽 -->
<div slot="expandedRowRender" slot-scope="record, index" style="margin: 0"> <div slot="expandedRowRender" slot-scope="record, index" style="margin: 0">
<!-- 如果表单会依赖某个字段变化就需要加判断,循环判断extraForm中的表单 --> <!-- 如果表单会依赖某个字段变化就需要加判断,循环判断extraForm中的表单 -->
+4
View File
@@ -48,6 +48,10 @@ const i18n = new VueI18n({
} }
}) })
Vue.prototype.global = {
emptyLine: '—'
}
Vue.use(Storage, { Vue.use(Storage, {
namespace: 'pro__', // key prefix namespace: 'pro__', // key prefix
name: 'ls', // name variable Vue.[ls] or this.[$ls], name: 'ls', // name variable Vue.[ls] or this.[$ls],
@@ -130,35 +130,40 @@ export default {
dataIndex: 'standardNumber', dataIndex: 'standardNumber',
title: this.$t('standardNumber'), title: this.$t('standardNumber'),
width: 150, width: 150,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 标准名称 // 标准名称
{ {
dataIndex: 'standardName', dataIndex: 'standardName',
title: this.$t('standardName'), title: this.$t('standardName'),
width: 150, width: 150,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 条款号 // 条款号
{ {
dataIndex: 'termNum', dataIndex: 'termNum',
title: this.$t('noMatchTracking.clauseNumber'), title: this.$t('noMatchTracking.clauseNumber'),
width: 150, width: 150,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 条款名称 // 条款名称
{ {
title: this.$t('noMatchTracking.clauseName'), title: this.$t('noMatchTracking.clauseName'),
width: 150, width: 150,
dataIndex: 'termName', dataIndex: 'termName',
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 问题类型 // 问题类型
{ {
dataIndex: 'assessResults_dictText', dataIndex: 'assessResults_dictText',
title: this.$t('noMatchTracking.problemTypes'), title: this.$t('noMatchTracking.problemTypes'),
width: 150, width: 150,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 相关项目 // 相关项目
@@ -166,22 +171,24 @@ export default {
title: this.$t('noMatchTracking.relevantProject'), title: this.$t('noMatchTracking.relevantProject'),
width: 150, width: 150,
dataIndex: 'projectName', dataIndex: 'projectName',
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 设计工程师 // 设计工程师
{ {
dataIndex: 'engineerId_dictText', dataIndex: 'engineerId_dictText',
title: this.$t('noMatchTracking.designEngineer'), title: this.$t('noMatchTracking.designEngineer'),
width: 120, width: 120,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 预计整改完成日期 // 预计整改完成日期
{ {
dataIndex: 'expectedTime', dataIndex: 'expectedTime',
title: this.$t('noMatchTracking.estimatedDateOfCompletionOfRectification'), title: this.$t('noMatchTracking.estimatedDateOfCompletionOfRectification'),
width: 180, width: 180,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
} }
], ],
dataSource: [], dataSource: [],
@@ -83,6 +83,7 @@
<div class="table-text" v-if="!!text" @click="handleShowContentDetail(text)"> <div class="table-text" v-if="!!text" @click="handleShowContentDetail(text)">
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }} {{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
</div> </div>
<div v-else>{{ global.emptyLine }}</div>
</template> </template>
</z-expand-table> </z-expand-table>
</div> </div>
@@ -194,14 +195,16 @@ export default {
dataIndex: 'termNumber', dataIndex: 'termNumber',
title: this.$t('projectCompliance.standardNumberClauseNumber'), title: this.$t('projectCompliance.standardNumberClauseNumber'),
width: 150, width: 150,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 标准名称/条款名称 // 标准名称/条款名称
{ {
dataIndex: 'termName', dataIndex: 'termName',
title: this.$t('projectCompliance.standardNameClauseName'), title: this.$t('projectCompliance.standardNameClauseName'),
width: 160, width: 160,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 条款内容 // 条款内容
{ {
@@ -216,14 +219,16 @@ export default {
title: this.$t('projectCompliance.evaluator'), title: this.$t('projectCompliance.evaluator'),
dataIndex: 'previousNodeHandler', dataIndex: 'previousNodeHandler',
width: 150, width: 150,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
// 评估结果 // 评估结果
{ {
title: this.$t('projectCompliance.evaluationResult'), title: this.$t('projectCompliance.evaluationResult'),
dataIndex: 'evaluationFeedback_dictText', dataIndex: 'evaluationFeedback_dictText',
width: 150, width: 150,
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
} }
], ],
dataSource: [], dataSource: [],
@@ -133,7 +133,8 @@
:extra-form="extraForm" :extra-form="extraForm"
:all-disabled="true"> :all-disabled="true">
<template v-slot:content="{text}"> <template v-slot:content="{text}">
<div class="table-text" v-if="!!text" @click="handleShowContentDetail(text)">{{text }}</div> <div class="table-text" v-if="!!text" @click="handleShowContentDetail(text)">{{ text }}</div>
<div v-else>{{ global.emptyLine }}</div>
</template> </template>
</z-expand-table> </z-expand-table>
</div> </div>
@@ -677,12 +678,13 @@ export default {
next({ path: '/noMobile' }) next({ path: '/noMobile' })
} }
next() next()
}, }
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import '~../../../assets/less/common.less'; @import '~../../../assets/less/common.less';
.content-detail-text { .content-detail-text {
height: calc(100% - 54px); height: calc(100% - 54px);
margin-top: 54px; margin-top: 54px;
@@ -53,6 +53,10 @@
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="false"> :pagination="false">
<!--默认的插槽-->
<template v-slot:text="text">
{{ text || text === 0 ? text : global.emptyLine }}
</template>
</a-table> </a-table>
</div> </div>
@@ -159,19 +163,22 @@ export default {
title: this.$t('standardNumber'), title: this.$t('standardNumber'),
width: 180, width: 180,
dataIndex: 'standardNumber', dataIndex: 'standardNumber',
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
{ // 标准名称 { // 标准名称
title: this.$t('standardName'), title: this.$t('standardName'),
width: 180, width: 180,
dataIndex: 'standardName', dataIndex: 'standardName',
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
}, },
{ // 采购理由 { // 采购理由
title: this.$t('procurement.reasonForPurchase'), title: this.$t('procurement.reasonForPurchase'),
width: 380, width: 380,
dataIndex: 'purchaseReason', dataIndex: 'purchaseReason',
align: 'center' align: 'center',
scopedSlots: { customRender: 'text' }
} }
], ],
dataSource: [], dataSource: [],