[update] 市场法规清单

This commit is contained in:
lideqin
2024-07-04 16:13:29 +08:00
parent c7ae6e2006
commit 465a56c497
3 changed files with 27 additions and 5 deletions
+4
View File
@@ -16,6 +16,10 @@ window._CONFIG.onlyOfficeUrl = 'http://10.0.10.87:8083'
window._CONFIG.onlyOfficeDownloadFileUrl = 'http://localhost:8184/sys/common/download'
// 管理员角色code,英文逗号拼接
window._CONFIG.adminRoleCode = 'admin,BZGLY'
// 超级管理员code
window._CONFIG.superAdminRoleCode = 'superAdmin'
// 法规管理员code
window._CONFIG.regulationAdminRoleCode = 'regulationAdmin'
// 水印配置
window._CONFIG.watermarkConfig = {
color: 'rgba(180, 180, 180, 0.2)',
@@ -1,7 +1,7 @@
<template>
<internal-detail-page :title="$route.query.title" :content-padding="0" :loading="loading">
<!-- 标题右侧按钮 -->
<template v-if="ids.length <= 1" v-slot:titleRightCustom>
<template v-if="ids.length <= 1 && isCanLookHistory" v-slot:titleRightCustom>
<!-- 历史版本 -->
<a-button type="primary" ghost @click="clickHistoryVersion">{{ $t('standardRegulationLibrary.marketRegulationsList.historicalVersion') }}</a-button>
</template>
@@ -122,6 +122,7 @@ export default {
components: { InternalDetailPage, FileEcho, JTable, HistoryVersionModal },
computed: {
...mapGetters(['defaultHeight']),
...mapGetters(['userInfo']),
yScrollHeight () {
/**
* 前几个使用变量是为了配合iframe嵌套,算出页面显示范围的高度
@@ -130,6 +131,13 @@ export default {
* 54px:表头行的高度
*/
return `calc(100vh - ${this.defaultHeight['user-info-height']} - ${this.defaultHeight['breadcrumb-height']} - ${this.defaultHeight.oneLineSearchHeight} - ${this.defaultHeight.oneLineOperationHeight} - 48px - 48px - 54px - ${this.isBackTitle ? '56px' : '0px'})`
},
// 是否可以查看历史版本,当前用户是否是法规管理员或超级管理员
isCanLookHistory () {
const superAdminRoleCode = window._CONFIG.superAdminRoleCode
const regulationAdminRoleCode = window._CONFIG.regulationAdminRoleCode
const userRoleList = this.userInfo.roleCode.split(',')
return userRoleList.includes(superAdminRoleCode) || userRoleList.includes(regulationAdminRoleCode)
}
},
data () {
@@ -1,7 +1,7 @@
<template>
<internal-detail-page :title="$route.query.title" :content-padding="0" :loading="loading">
<!-- 标题右侧按钮 -->
<template v-if="model.manifest.id" v-slot:titleRightCustom>
<!-- 标题右侧按钮 只允许法规管理员和超级管理员查看历史版本 -->
<template v-if="model.manifest.id && isCanLookHistory" v-slot:titleRightCustom>
<!-- 历史版本 -->
<a-button type="primary" ghost @click="clickHistoryVersion">{{ $t('standardRegulationLibrary.marketRegulationsList.historicalVersion') }}</a-button>
</template>
@@ -40,7 +40,7 @@
:wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.customName')"
:maxLength="200"
v-decorator="['customName', validatorRules.customName]" />
v-decorator="['customColumnName', validatorRules.customColumnName]" />
</a-form-item>
</a-col>
<!-- 驾驶位置 -->
@@ -265,6 +265,16 @@ export default {
},
importExcelUrl: function () {
return `${window._CONFIG.domianURL}/${this.url.importExcelUrl}`
},
computed: {
...mapGetters(['userInfo']),
// 是否可以查看历史版本,当前用户是否是法规管理员或超级管理员
isCanLookHistory () {
const superAdminRoleCode = window._CONFIG.superAdminRoleCode
const regulationAdminRoleCode = window._CONFIG.regulationAdminRoleCode
const userRoleList = this.userInfo.roleCode.split(',')
return userRoleList.includes(superAdminRoleCode) || userRoleList.includes(regulationAdminRoleCode)
}
}
},
data () {
@@ -520,7 +530,7 @@ export default {
})
}
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model.manifest, 'country', 'manifestNo', 'customName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file'))
this.form.setFieldsValue(pick(this.model.manifest, 'country', 'manifestNo', 'customColumnName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file'))
})
marketRegulationDetailListById(param).then(res => {
if (res.success) {