update 国内\海外标准非管理员用户新增\编辑跳转入库变更流程
This commit is contained in:
@@ -217,7 +217,7 @@ import {
|
||||
collectionDomesticStandard,
|
||||
cancelCollectionDomesticStandard
|
||||
} from '../../../api/standardRegulationLibraryApi'
|
||||
import { StandardSource, StandardSystemTreeNodeType, YesOrNoEnum } from '../../../enums/commonEnums'
|
||||
import { OperationType, StandardSource, StandardSystemTreeNodeType, YesOrNoEnum } from '../../../enums/commonEnums'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||
import DomesticSystemTreeModal from './modules/DomesticSystemTreeModal.vue'
|
||||
import SelectionDomesticStandardDrawer from './modules/SelectionDomesticStandardDrawer.vue'
|
||||
@@ -291,8 +291,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 () {
|
||||
@@ -643,6 +650,40 @@ export default {
|
||||
// 销毁这个提示
|
||||
modalLoading.destroy()
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 新增-非管理员用户跳转流程发起页面,不能修改操作类型
|
||||
*/
|
||||
handleAdd () {
|
||||
if (!this.isAdmin) {
|
||||
this.$router.push({
|
||||
path: '/workCenter/StandardEntryOrChangeProcess',
|
||||
query: {
|
||||
source: StandardSource.DOMESTIC.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.DOMESTIC.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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,12 +217,13 @@ import {
|
||||
configOverseasStandard,
|
||||
removeOverseasStandard
|
||||
} from '../../../api/standardRegulationLibraryApi'
|
||||
import { StandardSource, StandardSystemTreeNodeType, YesOrNoEnum } from '../../../enums/commonEnums'
|
||||
import { OperationType, StandardSource, StandardSystemTreeNodeType, YesOrNoEnum } from '../../../enums/commonEnums'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||
import OverseasStandardModal from './modules/OverseasStandardModal.vue'
|
||||
import OverseasSystemTreeModal from './modules/OverseasSystemTreeModal.vue'
|
||||
import SelectionOverseasStandardDrawer from './modules/SelectionOverseasStandardDrawer.vue'
|
||||
import { postDownFile } from '../../../api/manage.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'OverseasStandardList',
|
||||
@@ -291,8 +292,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 () {
|
||||
@@ -644,6 +652,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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user