[update] 修改bug78191
This commit is contained in:
@@ -30,6 +30,8 @@ const cancelCollectStandard = (params) => postAction('/personal/lawsStandardColl
|
||||
const shareStandard = (params) => postAction('/personal/lawsStandardSharing/enterprise/add', params)
|
||||
// 查询是否有查看详情的权限
|
||||
const isCanLookDetail = (params) => getAction('/laws/standard/enterprise/detailPermission', params)
|
||||
// 企标级别映射列表获取
|
||||
const getStandardGradeClassification = (params) => getAction('/sys/lawsGrade/list', params)
|
||||
|
||||
// 企标详情-获取更新记录
|
||||
const detailGetUpdateRecord = (params) => getAction('/laws/standard/enterprise/getUpdateRecordList', params)
|
||||
@@ -74,6 +76,7 @@ export {
|
||||
cancelCollectStandard,
|
||||
shareStandard,
|
||||
isCanLookDetail,
|
||||
getStandardGradeClassification,
|
||||
|
||||
detailGetUpdateRecord,
|
||||
detailSubmitQuestion,
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<!-- 7, 多选组织机构 -->
|
||||
<j-select-depart v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value"
|
||||
v-model="formInline[item.dbFieldName]"
|
||||
:disabled="innerDisabledField.includes(item.dbFieldName)"
|
||||
:multi="true"
|
||||
:backDepart="true"
|
||||
:treeOpera="true" />
|
||||
@@ -153,12 +154,13 @@ import JMultiSelectTag from '../dict/JMultiSelectTag'
|
||||
import UploadFile from '../UploadFile'
|
||||
// 选择标准选择器
|
||||
import StandardSelection from '../selection/StandardSelection'
|
||||
import { FieldType, StandardProperty } from '../../enums/commonEnums'
|
||||
import { FieldType, StandardGradeClassify, StandardProperty } from '../../enums/commonEnums'
|
||||
import JMultipleDatePicker from '../JMultipleDatePicker'
|
||||
import UserSelection from '../selection/UserSelection'
|
||||
import { getAction } from '../../api/manage.js'
|
||||
import { getFormDictTreeList } from '../../api/api.js'
|
||||
import TreeSelection from '../selection/TreeSelection'
|
||||
import { getStandardGradeClassification } from '../../api/enterpriseStandardLibraryApi'
|
||||
|
||||
export default {
|
||||
name: 'AddForm',
|
||||
@@ -264,6 +266,16 @@ export default {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// 如果是企标就获取企标级别映射数据
|
||||
if (this.flag === '3') {
|
||||
getStandardGradeClassification().then(res => {
|
||||
if (res.success) {
|
||||
this.standardGradeClassification = res.result
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
FieldType,
|
||||
@@ -277,13 +289,45 @@ export default {
|
||||
ruleList: [],
|
||||
uploadName: '',
|
||||
optionsData: {}, // 用接口获取到的下拉数据
|
||||
excludeStandardNumbers: '' // 不包含的标准号
|
||||
excludeStandardNumbers: '', // 不包含的标准号
|
||||
standardGradeClassification: [], // 企标级别映射
|
||||
innerDisabledField: [] // 内部不可编辑字段
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 国内、海外的零部件名称、适用认证、适用车型和标准性质关联,准入标准必填,非准入标准不必填
|
||||
'formInline.standard_property' () {
|
||||
this.handleDomesticSpecialCheck()
|
||||
},
|
||||
// 标准等级分类改变后授权部门需要自动带出
|
||||
'formInline.grade_classification' (val) {
|
||||
if (val && this.flag === '3') {
|
||||
if (val === StandardGradeClassify.ZERO_LEVEL.value) {
|
||||
// 选的是0级,授权部门带出不可编辑
|
||||
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '0').deptIds
|
||||
if (!this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField.push('auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
||||
// 选的是1级
|
||||
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds
|
||||
if (this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.TWO_LEVEL.value) {
|
||||
// 选的是2级
|
||||
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds
|
||||
if (this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept')
|
||||
}
|
||||
} else if (val === StandardGradeClassify.THREE_LEVEL.value) {
|
||||
// 选的是3级,授权部门带出不可编辑
|
||||
this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
|
||||
if (!this.innerDisabledField.includes('auth_dept')) {
|
||||
this.innerDisabledField.push('auth_dept')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -119,8 +119,28 @@ export const InventoryType = {
|
||||
COMPARISON_ITEM: { text: '对比项', value: '2' }
|
||||
}
|
||||
|
||||
// 标准等级分类
|
||||
export const StandardGradeClassify = {
|
||||
ZERO_LEVEL: { text: '0级', value: '1' },
|
||||
ONE_LEVEL: { text: '1级', value: '2' },
|
||||
TWO_LEVEL: { text: '2级', value: '3' },
|
||||
THREE_LEVEL: { text: '3级', value: '4' }
|
||||
}
|
||||
|
||||
// 流程key,获取人员信息前需要获取流程定义id,传这里的名字到WorkCenterMixin的getFlowDefinition方法中
|
||||
export const ProcessKey = {
|
||||
// 企标立项/变更计划
|
||||
ES_INIT_CHANGE: { text: 'es-init-change', value: 'es-init-change' },
|
||||
// 年度制修订-各部门主动上报
|
||||
ES_ANNUAL_REPORT: { text: 'es-annual-report', value: 'es-annual-report' },
|
||||
// 年度制修订-标准化部门主动发起
|
||||
ES_ANNUAL_INIT: { text: 'es-annual-init', value: 'es-annual-init' },
|
||||
// 标准法规入库/变更流程
|
||||
FB_ENTRY_CHANGE: { text: 'fb-entry-change', value: 'fb-entry-change' }
|
||||
}
|
||||
|
||||
// 标准性质
|
||||
export const StandardProperty = {
|
||||
admittance: { text: '准入性', value: 'SN001' },
|
||||
recommendation: { text: '推荐性', value: 'SN002' }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user