[update] 修改bug81852
This commit is contained in:
@@ -237,6 +237,8 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|||||||
import { previewPdf } from '@/utils/previewPdf'
|
import { previewPdf } from '@/utils/previewPdf'
|
||||||
import { kkFilePreview } from '@/utils/kkFilePreview'
|
import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||||
import { getFileInfo } from '@api/api'
|
import { getFileInfo } from '@api/api'
|
||||||
|
import { OperationType, StandardSource } from '../../../enums/commonEnums'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseStandardList',
|
name: 'EnterpriseStandardList',
|
||||||
@@ -305,6 +307,15 @@ export default {
|
|||||||
mounted () {
|
mounted () {
|
||||||
this.initTreeData()
|
this.initTreeData()
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
// 当前用户是否管理员
|
||||||
|
isAdmin () {
|
||||||
|
const adminRoleList = window._CONFIG.adminRoleCode.split(',')
|
||||||
|
const userRoleList = this.userInfo.roleCode.split(',')
|
||||||
|
return userRoleList.some(tt => adminRoleList.includes(tt))
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取左侧树数据
|
// 获取左侧树数据
|
||||||
initTreeData (params) {
|
initTreeData (params) {
|
||||||
@@ -383,6 +394,18 @@ export default {
|
|||||||
this.mouseInNodeKey = null
|
this.mouseInNodeKey = null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 管理员直接新增企标到企标库,非管理员新增跳转到企标制修订发起页面
|
||||||
|
handleAdd () {
|
||||||
|
if (!this.isAdmin) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/workCenter/enterpriseStandardRevision/enterpriseStandardRevisionFlow'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$refs.modalForm.add()
|
||||||
|
this.$refs.modalForm.title = this.$t('newlyAdded')
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 重置查询
|
* 重置查询
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user