update 征求意见修改前、修改后、修改理由添加弹框展示详情功能

This commit is contained in:
赵霄
2023-12-08 10:46:09 +08:00
parent a88bf0ee70
commit f6d5563c17
4 changed files with 91 additions and 22 deletions
@@ -54,9 +54,10 @@
:scroll="{x: '100%'}"
@change="handleTableChange">
<!--修改前的跳转标准详情-->
<template v-slot:standardDetail="{text, record}">
<a-button type="primary" @click="toDetailPage">{{ $t('docTool.split.clickToView') }}</a-button>
<!--修改前、修改后、修改理由弹框显示内容-->
<template v-slot:modalDetail="{text, record}">
<div class="table-text" @click="showContent(text)" v-if="text">{{ text }}</div>
<div v-else>{{ global.emptyLine }}</div>
</template>
<template v-slot:file="{text}">
@@ -64,6 +65,8 @@
</template>
</j-table>
</div>
<text-content-modal ref="textContentModal" />
</internal-detail-page>
</template>
@@ -75,10 +78,11 @@ import JTable from '../../../components/jero/JTable'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import { queryAskForAdviceDetail } from '../../../api/businessSupport'
import { StandardSource } from '../../../enums/commonEnums'
import TextContentModal from './modules/TextContentModal'
export default {
name: 'AskForAdviceDetail',
components: { JTable, FileEcho, InternalDetailPage },
components: { JTable, FileEcho, InternalDetailPage, TextContentModal },
mixins: [JeroListMixin],
data () {
return {
@@ -118,21 +122,21 @@ export default {
align: 'center',
width: 180,
dataIndex: 'modificationBefore',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'modalDetail' }
},
{ // 修改后
title: this.$t('workCenter.enStandardChange.afterUpdate'),
align: 'center',
width: 180,
dataIndex: 'modificationAfter',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'modalDetail' }
},
{ // 修改理由
title: this.$t('workCenter.enStandardChange.updateReason'),
align: 'center',
width: 180,
dataIndex: 'modificationReason',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'modalDetail' }
}
]
},
@@ -304,6 +308,9 @@ export default {
this.$openPageNewSheet({
path, query
})
},
showContent (text) {
this.$refs.textContentModal.open(text)
}
}
}
@@ -0,0 +1,42 @@
<template>
<j-modal
:title="$t('view')"
:visible="visible"
:width="1000"
:footer="false"
switchFullscreen
@cancel="handleCancel">
<div class="text-content">{{ content }}</div>
</j-modal>
</template>
<script>
export default {
name: 'TextContentModal',
data () {
return {
visible: false,
content: null
}
},
methods: {
open (text) {
this.content = text
this.visible = true
},
handleCancel () {
this.visible = false
this.content = null
}
}
}
</script>
<style scoped lang="less">
.text-content {
max-height: calc(100vh - 200px - 55px);
overflow: auto;
margin: 0 -24px;
padding: 0 24px;
}
</style>