update 国内\海外标准非管理员用户新增\编辑跳转入库变更流程
This commit is contained in:
@@ -217,7 +217,7 @@ import {
|
|||||||
collectionDomesticStandard,
|
collectionDomesticStandard,
|
||||||
cancelCollectionDomesticStandard
|
cancelCollectionDomesticStandard
|
||||||
} from '../../../api/standardRegulationLibraryApi'
|
} 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 UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||||
import DomesticSystemTreeModal from './modules/DomesticSystemTreeModal.vue'
|
import DomesticSystemTreeModal from './modules/DomesticSystemTreeModal.vue'
|
||||||
import SelectionDomesticStandardDrawer from './modules/SelectionDomesticStandardDrawer.vue'
|
import SelectionDomesticStandardDrawer from './modules/SelectionDomesticStandardDrawer.vue'
|
||||||
@@ -291,8 +291,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
importExcelUrl () {
|
importExcelUrl () {
|
||||||
return `${window._CONFIG.domianURL}/${this.url.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 () {
|
created () {
|
||||||
@@ -643,6 +650,40 @@ export default {
|
|||||||
// 销毁这个提示
|
// 销毁这个提示
|
||||||
modalLoading.destroy()
|
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,
|
configOverseasStandard,
|
||||||
removeOverseasStandard
|
removeOverseasStandard
|
||||||
} from '../../../api/standardRegulationLibraryApi'
|
} 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 UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||||
import OverseasStandardModal from './modules/OverseasStandardModal.vue'
|
import OverseasStandardModal from './modules/OverseasStandardModal.vue'
|
||||||
import OverseasSystemTreeModal from './modules/OverseasSystemTreeModal.vue'
|
import OverseasSystemTreeModal from './modules/OverseasSystemTreeModal.vue'
|
||||||
import SelectionOverseasStandardDrawer from './modules/SelectionOverseasStandardDrawer.vue'
|
import SelectionOverseasStandardDrawer from './modules/SelectionOverseasStandardDrawer.vue'
|
||||||
import { postDownFile } from '../../../api/manage.js'
|
import { postDownFile } from '../../../api/manage.js'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OverseasStandardList',
|
name: 'OverseasStandardList',
|
||||||
@@ -291,8 +292,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
importExcelUrl () {
|
importExcelUrl () {
|
||||||
return `${window._CONFIG.domianURL}/${this.url.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 () {
|
created () {
|
||||||
@@ -644,6 +652,40 @@ export default {
|
|||||||
// 销毁这个提示
|
// 销毁这个提示
|
||||||
modalLoading.destroy()
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+50
-16
@@ -79,7 +79,7 @@
|
|||||||
<a-form-model-item class="item-model" prop="source">
|
<a-form-model-item class="item-model" prop="source">
|
||||||
<j-dict-select-tag class="box-input"
|
<j-dict-select-tag class="box-input"
|
||||||
v-model="formInline.source"
|
v-model="formInline.source"
|
||||||
:disabled="disabled || disabledFieldList.includes('source')"
|
:disabled="disabled || disabledFieldList.includes('source') || isFromList"
|
||||||
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
|
:placeholder="$t('pleaseSelect')+$t('standardSelect.source')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false"
|
:triggerChange="false"
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<a-form-model-item class="item-model" prop="operateType">
|
<a-form-model-item class="item-model" prop="operateType">
|
||||||
<j-dict-select-tag class="box-input"
|
<j-dict-select-tag class="box-input"
|
||||||
v-model="formInline.operateType"
|
v-model="formInline.operateType"
|
||||||
:disabled="disabled || disabledFieldList.includes('operateType')"
|
:disabled="disabled || disabledFieldList.includes('operateType') || isFromList"
|
||||||
:placeholder="$t('pleaseSelect')+$t('log.operationType')"
|
:placeholder="$t('pleaseSelect')+$t('log.operationType')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false"
|
:triggerChange="false"
|
||||||
@@ -105,6 +105,7 @@
|
|||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<!--循环生成表单部分-->
|
||||||
<template v-for="(item, index) in val">
|
<template v-for="(item, index) in val">
|
||||||
<div :key="index"
|
<div :key="index"
|
||||||
class="box-title-text form-flex-item"
|
class="box-title-text form-flex-item"
|
||||||
@@ -442,15 +443,6 @@ export default {
|
|||||||
const subTitle = this.$route.query.taskName || FGEntryChangeProcessNode.initiate.text
|
const subTitle = this.$route.query.taskName || FGEntryChangeProcessNode.initiate.text
|
||||||
return `${this.$t('flowCenter')}${this.$route.meta.title}(${subTitle})`
|
return `${this.$t('flowCenter')}${this.$route.meta.title}(${subTitle})`
|
||||||
},
|
},
|
||||||
// 不可编辑的字段
|
|
||||||
disabledFieldList () {
|
|
||||||
// 标准法规变更
|
|
||||||
if (this.formInline.operateType === OperationType.CHANGE.value) {
|
|
||||||
// 标准编号,被代替标准号,被引用标准号,标准类别,年代号
|
|
||||||
return ['standard_name', 'replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number']
|
|
||||||
}
|
|
||||||
return ['replaced_by_standard_number', 'referenced_standard']
|
|
||||||
},
|
|
||||||
// 不能包含当前标准的字段
|
// 不能包含当前标准的字段
|
||||||
excludeStandardFields () {
|
excludeStandardFields () {
|
||||||
if (this.formInline.operateType === OperationType.CHANGE.value) {
|
if (this.formInline.operateType === OperationType.CHANGE.value) {
|
||||||
@@ -461,6 +453,24 @@ export default {
|
|||||||
// 流程key
|
// 流程key
|
||||||
processKey () {
|
processKey () {
|
||||||
return ProcessKey.FB_ENTRY_CHANGE.value
|
return ProcessKey.FB_ENTRY_CHANGE.value
|
||||||
|
},
|
||||||
|
// 是否从列表页来,如果是,来源和操作类型不可修改
|
||||||
|
isFromList () {
|
||||||
|
return this.$route.query.source && this.$route.query.operateType
|
||||||
|
},
|
||||||
|
// 不可编辑的字段
|
||||||
|
disabledFieldList () {
|
||||||
|
// 变更且从标准编辑处跳转
|
||||||
|
if (this.isFromList && this.$route.query.operateType === OperationType.CHANGE.value) {
|
||||||
|
// 标准名称,被代替标准号,被引用标准号,标准类别,年代号
|
||||||
|
return ['standard_number_temp', 'standard_name', 'replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number']
|
||||||
|
}
|
||||||
|
// 标准法规变更
|
||||||
|
if (this.formInline.operateType === OperationType.CHANGE.value) {
|
||||||
|
// 标准名称,被代替标准号,被引用标准号,标准类别,年代号
|
||||||
|
return ['standard_name', 'replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number']
|
||||||
|
}
|
||||||
|
return ['replaced_by_standard_number', 'referenced_standard']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -479,8 +489,34 @@ export default {
|
|||||||
this.initProcessData()
|
this.initProcessData()
|
||||||
} else {
|
} else {
|
||||||
this.currentNode = FGEntryChangeProcessNode.initiate.value
|
this.currentNode = FGEntryChangeProcessNode.initiate.value
|
||||||
// 默认选中国内
|
// 处理非管理员从国内/海外标准模块进入发起页面,不可修改来源和操作类型
|
||||||
this.initDomesticStandardForm()
|
if (this.$route.query.source && this.$route.query.operateType) {
|
||||||
|
this.formInline = {
|
||||||
|
source: this.$route.query.source,
|
||||||
|
operateType: this.$route.query.operateType
|
||||||
|
}
|
||||||
|
switch (this.$route.query.source) {
|
||||||
|
// 国内标准
|
||||||
|
case StandardSource.DOMESTIC.value:
|
||||||
|
this.initDomesticStandardForm()
|
||||||
|
if (this.$route.query.standardId) {
|
||||||
|
this.initDomesticFormData(this.$route.query.standardId)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
// 海外标准
|
||||||
|
case StandardSource.OVERSEAS.value:
|
||||||
|
this.initOverseasStandardForm()
|
||||||
|
if (this.$route.query.standardId) {
|
||||||
|
this.initOverseasFormData(this.$route.query.standardId)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 默认选中国内
|
||||||
|
this.initDomesticStandardForm()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 获取按钮清单
|
// 获取按钮清单
|
||||||
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode)
|
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode)
|
||||||
@@ -573,7 +609,6 @@ export default {
|
|||||||
module: StandardSource.DOMESTIC.value,
|
module: StandardSource.DOMESTIC.value,
|
||||||
type: 2 // 2是新增;1是详情
|
type: 2 // 2是新增;1是详情
|
||||||
}
|
}
|
||||||
this.formInline = {}
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getDomesticStandardFormModal(params).then(res => {
|
getDomesticStandardFormModal(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -605,7 +640,6 @@ export default {
|
|||||||
module: StandardSource.OVERSEAS.value,
|
module: StandardSource.OVERSEAS.value,
|
||||||
type: 2 // 2是新增;1是详情
|
type: 2 // 2是新增;1是详情
|
||||||
}
|
}
|
||||||
this.formInline = {}
|
|
||||||
getOverseasStandardForm(params).then(res => {
|
getOverseasStandardForm(params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.formList = res.result || {}
|
this.formList = res.result || {}
|
||||||
@@ -726,6 +760,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleSourceChange () {
|
handleSourceChange () {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
|
this.formInline = {}
|
||||||
switch (this.formInline.source) {
|
switch (this.formInline.source) {
|
||||||
case StandardSource.DOMESTIC.value:
|
case StandardSource.DOMESTIC.value:
|
||||||
await this.initDomesticStandardForm()
|
await this.initDomesticStandardForm()
|
||||||
@@ -987,7 +1022,6 @@ export default {
|
|||||||
getDomesticStandardDocumentInfo({ id, type: 2 }).then(res => {
|
getDomesticStandardDocumentInfo({ id, type: 2 }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// 处理树结构多选回显
|
// 处理树结构多选回显
|
||||||
console.log(this.da)
|
|
||||||
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
||||||
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
||||||
const data = res.result || {}
|
const data = res.result || {}
|
||||||
|
|||||||
Reference in New Issue
Block a user