update 标签管理可配模块数据字典字段处理

This commit is contained in:
赵霄
2023-09-14 16:37:55 +08:00
parent da909e3f41
commit 9de2b8074f
5 changed files with 50 additions and 25 deletions
@@ -26,7 +26,7 @@
<div class="detail-page-part-form" v-if="index !== 3">
<div class="detail-page-part-form-item" v-for="formItem in form[part]" :key="formItem.id">
<label>{{ formItem.dbFieldTxt }}</label>
<span>{{ detailData[formItem.dbFieldName] }}</span>
<span>{{ detailData[needDictFieldList.includes(formItem.fieldShowType) ? formItem.dbFieldName + '_dictText' : formItem.dbFieldName] }}</span>
</div>
</div>
<!-- 过程稿件特殊处理-->
@@ -60,7 +60,7 @@
</a-spin>
<!-- 更新记录-->
<upload-record-modal ref="uploadRecordModal" />
<update-record-modal ref="uploadRecordModal" />
<!-- 提交问题-->
<submit-question-modal ref="submitQuestionModal" />
<!-- 分享选人-->
@@ -72,9 +72,9 @@
<script>
import '@assets/less/common.less'
import { TagsTypeEnums } from '../../../enums/commonEnums'
import { FieldType, TagsTypeEnums } from '../../../enums/commonEnums'
import { getDomesticStandardFormModal, shareDomesticStandard, getDomesticStandardDetail } from '../../../api/standardRegulationLibraryApi'
import UploadRecordModal from './modules/UploadRecordModal.vue'
import UpdateRecordModal from './modules/UpdateRecordModal.vue'
import SubmitQuestionModal from './modules/SubmitQuestionModal.vue'
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
import StandardResolutionSheetModal from './modules/StandardResolutionSheetModal.vue'
@@ -97,7 +97,7 @@ const DomesticApi = {
export default {
name: 'StandardDetailPage',
components: { UploadRecordModal, SubmitQuestionModal, UserSelectModal, StandardResolutionSheetModal },
components: { UpdateRecordModal, SubmitQuestionModal, UserSelectModal, StandardResolutionSheetModal },
data () {
return {
loading: false,
@@ -115,7 +115,9 @@ export default {
draft_for_comment: [],
// 草案
draft: []
}
},
// 需要数据字段翻译的属性类型
needDictFieldList: [FieldType.USER_SINGLE.value, FieldType.ORGAN_SINGLE.value, FieldType.STANDARD_MORE.value, FieldType.ORGAN_MORE.value, FieldType.OPTION_SINGLE.value, FieldType.OPTION_MORE.value, FieldType.TREE.value]
}
},
computed: {
@@ -185,7 +187,7 @@ export default {
* 更新记录
*/
handleOpenUpdateRecord () {
this.$refs.uploadRecordModal.open()
this.$refs.uploadRecordModal.open(this.$route.query.standardNumber)
},
/**
* 提交问题
@@ -7,9 +7,11 @@
:confirm-loading="confirmLoading"
@cancel="handleCancel">
<div class="record-item" v-for="record in recordList" :key="record">
{{ record }}
</div>
<a-spin :spinning="confirmLoading">
<div class="record-item" v-for="record in recordList" :key="record.id">
{{ record.content }}
</div>
</a-spin>
<template v-slot:footer>
<a-button @click="handleCancel">{{ $t('close') }}</a-button>
@@ -18,22 +20,34 @@
</template>
<script>
import { getDomesticStandardUpdateRecord } from '../../../../api/standardRegulationLibraryApi.js'
export default {
name: 'UploadRecordModal',
name: 'UpdateRecordModal',
data () {
return {
width: 800,
visible: false,
confirmLoading: false,
recordList: [
'111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
'222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222'
]
recordList: []
}
},
methods: {
open () {
open (standardNumber) {
this.visible = true
this.initRecord(standardNumber)
},
initRecord (standardNumber) {
this.confirmLoading = true
getDomesticStandardUpdateRecord({standardNumber}).then(res => {
if (res.success) {
this.recordList = res.result || []
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
},
handleCancel () {
this.visible = false
@@ -512,13 +512,15 @@ export default {
/**
* 跳转详情页
* @param id
* @param standardNumber
*/
toDetailPage ({ id }) {
toDetailPage ({ id, standard_number: standardNumber }) {
this.$openPageNewSheet({
path: '/standardRegulationLibrary/DomesticStandardDetail',
query: {
id,
type: TagsTypeEnums.DOMESTIC_LIST.value
type: TagsTypeEnums.DOMESTIC_LIST.value,
standardNumber
}
})
}