update 标签管理可配模块数据字典字段处理
This commit is contained in:
@@ -34,6 +34,8 @@ const editDomesticStandard = (params) => postAction('/laws/standard/domestic/com
|
||||
const getDomesticStandardNoSystem = (params) => getAction('/laws/standard/common/getStandardRightBox', params)
|
||||
// 国内标准-获取详情信息
|
||||
const getDomesticStandardDetail = (params) => getAction('/laws/standard/domestic/getByIdAndModule', params)
|
||||
// 国内标准-获取更新记录
|
||||
const getDomesticStandardUpdateRecord = (params) => getAction('/laws/standard/domestic/getUpdateRecordList', params)
|
||||
|
||||
// 海外标准-获取查询条件
|
||||
const getOverseasStandardSearchForm = (params) => getAction('/laws/standard/overseas/getQueryCondition', params)
|
||||
@@ -63,6 +65,7 @@ export {
|
||||
editDomesticStandard,
|
||||
getDomesticStandardNoSystem,
|
||||
getDomesticStandardDetail,
|
||||
getDomesticStandardUpdateRecord,
|
||||
|
||||
// 海外标准
|
||||
getOverseasStandardSearchForm,
|
||||
|
||||
@@ -6,9 +6,13 @@ import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import store from '@/store'
|
||||
import { isHasPermission } from '../utils/hasPermission.js'
|
||||
import { FieldType } from '../enums/commonEnums.js'
|
||||
|
||||
let importModalLoading
|
||||
|
||||
// 需要数据字段翻译的属性类型
|
||||
const NEED_DICT_FIELD_TYPE = [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]
|
||||
|
||||
export const ConfigurableTableMixin = {
|
||||
data () {
|
||||
return {
|
||||
@@ -96,6 +100,7 @@ export const ConfigurableTableMixin = {
|
||||
this.getTableHeaderFunc(params).then(res => {
|
||||
if (res.success) {
|
||||
this.columns = this.dealColumns(res.result || [])
|
||||
console.log(this.columns)
|
||||
this.isTrue = false
|
||||
this.$nextTick(() => {
|
||||
this.isTrue = true
|
||||
@@ -112,12 +117,7 @@ export const ConfigurableTableMixin = {
|
||||
const tempColumns = []
|
||||
columns.forEach(item => {
|
||||
// 可点击项加入插槽
|
||||
// 标准编号和标准名称可以跳转详情页
|
||||
if (item.dbFieldName === 'standard_number' || item.dbFieldName === 'standard_name') {
|
||||
item.scopedSlots = {
|
||||
customRender: 'detailClick'
|
||||
}
|
||||
} else if (item.urlClick === 'true') {
|
||||
if (item.urlClick === 'true') {
|
||||
item.scopedSlots = {
|
||||
customRender: 'urlClick'
|
||||
}
|
||||
@@ -126,7 +126,11 @@ export const ConfigurableTableMixin = {
|
||||
item.sorter = item.sortFlag === 1
|
||||
item.width = 215
|
||||
item.title = item.dbFieldTxt
|
||||
item.dataIndex = item.dbFieldName
|
||||
if (NEED_DICT_FIELD_TYPE.includes(item.fieldShowType)) {
|
||||
item.dataIndex = item.dbFieldName + '_dictText'
|
||||
} else {
|
||||
item.dataIndex = item.dbFieldName
|
||||
}
|
||||
// 在各自页面写此页面需要使用插槽的字段
|
||||
if (this.tableSlotField && this.tableSlotField.includes(item.dbFieldName)) {
|
||||
item.scopedSlots = {
|
||||
|
||||
@@ -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)
|
||||
},
|
||||
/**
|
||||
* 提交问题
|
||||
|
||||
+23
-9
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user