【update】-重汽海外 点击标准名称修改成预览文件

This commit is contained in:
fengchenchen
2024-01-28 19:16:57 +08:00
parent 67f1e1f0ae
commit 91ec6a7d07
@@ -168,6 +168,8 @@
</a>
<a v-else @click="operationClick(operationList[0],record)">
<div class="operate-btn">
<!-- 查看图标-->
<i class="iconfont icon-link operate-btn-icon" v-if="operationList[0].text === $t('view')" />
<!-- 编辑图标-->
<i class="iconfont icon-bianji operate-btn-icon" v-if="operationList[0].text === $t('edit')" />
<!-- 分享图标-->
@@ -184,6 +186,8 @@
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
<a @click="operationClick(operation,record)">
<div class="operate-btn">
<!-- 查看图标-->
<i class="iconfont icon-link operate-btn-icon" v-if="operation.text === $t('view')" />
<!-- 编辑图标-->
<i class="iconfont icon-bianji operate-btn-icon" v-if="operation.text === $t('edit')" />
<!-- 分享图标-->
@@ -341,8 +345,15 @@ export default {
}
},
computed: {
...mapGetters(['userInfo']),
importExcelUrl () {
return `${window._CONFIG.domianURL}/${this.url.importExcelUrl}`
},
// 当前用户是否管理员
isAdmin () {
const adminRoleList = window._CONFIG.adminRoleCode.split(',')
const userRoleList = this.userInfo.roleCode.split(',')
return userRoleList.some(tt => adminRoleList.includes(tt))
}
},
created () {
@@ -796,6 +807,40 @@ export default {
// 销毁这个提示
modalLoading.destroy()
})
},
/**
* 新增-非管理员用户跳转流程发起页面,不能修改操作类型
*/
handleAdd () {
if (!this.isAdmin) {
this.$router.push({
path: '/workCenter/StandardEntryOrChangeProcess',
query: {
source: StandardSource.OVERSEAS.value, // 海外标准
operateType: OperationType.ENTRY.value // 入库
}
})
return
}
this.$refs.modalForm.add()
this.$refs.modalForm.title = this.$t('newlyAdded')
this.$refs.modalForm.disableSubmit = false
},
handleEdit (record) {
if (!this.isAdmin) {
this.$router.push({
path: '/workCenter/StandardEntryOrChangeProcess',
query: {
source: StandardSource.OVERSEAS.value, // 海外标准
operateType: OperationType.CHANGE.value, // 变更
standardId: record.id // 标准id
}
})
return
}
this.$refs.modalForm.edit(record)
this.$refs.modalForm.title = this.$t('edit')
this.$refs.modalForm.disableSubmit = false
}
}
}