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