feat: 标准库
This commit is contained in:
@@ -613,39 +613,6 @@
|
||||
:disabled="formdisableflag"
|
||||
></custom-textarea>
|
||||
</template>
|
||||
<template v-else-if="field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.selVal === 'ROLELIST'">
|
||||
<template v-if="field.attrField === 'XMPGJS'">
|
||||
<custom-role-tree
|
||||
:key="field.attrField"
|
||||
:config="field"
|
||||
v-model="sarStandardsInfoEO[field.attrField]"
|
||||
:disabled="formdisableflag"
|
||||
:data-model="sarStandardsInfoEO"
|
||||
:isRoleHierarchy="false"
|
||||
roleHierarchyName="VSE,FO,工程师"
|
||||
></custom-role-tree>
|
||||
</template>
|
||||
<template v-else-if="field.attrField === 'ZRBM'">
|
||||
<custom-org
|
||||
:key="field.attrField"
|
||||
:config="field"
|
||||
:zNodes="orgData"
|
||||
v-model="sarStandardsInfoEO[field.attrField]"
|
||||
:disabled="formdisableflag"
|
||||
:data-model="sarStandardsInfoEO"
|
||||
@on-checked="onChecked"
|
||||
></custom-org>
|
||||
</template>
|
||||
<template v-else>
|
||||
<custom-org
|
||||
:key="field.attrField"
|
||||
:config="field"
|
||||
:zNodes="orgData"
|
||||
v-model="sarStandardsInfoEO[field.attrField]"
|
||||
:disabled="formdisableflag"
|
||||
:data-model="sarStandardsInfoEO"></custom-org>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="field.attrType === 'SEL_OPTION'">
|
||||
<custom-select
|
||||
:key="field.attrField"
|
||||
@@ -1431,6 +1398,15 @@ export default {
|
||||
KCCVPPSCN: '',
|
||||
DYBXH: '',
|
||||
DYMC: '',
|
||||
CYSD:'',
|
||||
CLLX:'',
|
||||
NYLX:'',
|
||||
SYCPX:'',
|
||||
SYRZ:'',
|
||||
ZRBM:'',
|
||||
ZRGCS:'',
|
||||
WSSMR:'',
|
||||
TXLB:'',
|
||||
}, // 标准新增过程中用到的对象
|
||||
currentFileList: '', // 当前操作的是哪个FormItem的上传
|
||||
isList: [
|
||||
@@ -2656,10 +2632,8 @@ export default {
|
||||
// 验证标准号是否唯一
|
||||
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
||||
if (flag) {
|
||||
debugger
|
||||
// 时间格式修改
|
||||
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
||||
console.log(nowstandinfo)
|
||||
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
|
||||
nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss')
|
||||
}
|
||||
@@ -2689,8 +2663,6 @@ export default {
|
||||
sarStandAttrObj[item.attrField] = nowstandinfo[item.attrField]
|
||||
})
|
||||
nowstandinfo['sarStandAttrEOStr'] = JSON.stringify(sarStandAttrObj).replace(/"/g, "'")
|
||||
console.log(formFieldList)
|
||||
console.log(nowstandinfo)
|
||||
this.$http.postData(this.addOrUPdateFlag === 1 ? 'sarStandardsInfo/sar-standards-info/addarStandardsInfo' : 'sarStandardsInfo/sar-standards-info/updateSarStandardsInfo', nowstandinfo, {
|
||||
_this: this
|
||||
}, res => {
|
||||
@@ -3615,28 +3587,69 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
resolveFormFieldList (isEdit) {
|
||||
const data = this.formFieldListData
|
||||
this.formFieldList = data.map((item) => {
|
||||
if (item.attrType === 'SEL_OPTION' || item.attrType === 'SEL_OPTS') {
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions[item.selVal]
|
||||
resolveFormFieldList (isEdit) {
|
||||
const data = this.formFieldListData
|
||||
this.formFieldList = data.map((item) => {
|
||||
if (item.attrType === 'SEL_OPTION' || item.attrType === 'SEL_OPTS') {
|
||||
if(item.attrField === 'WSSMR'){
|
||||
const options = [
|
||||
{label:"署名人1",value:"1"},{label:"署名人2",value:"2"}
|
||||
]
|
||||
return Object.assign({}, item, {
|
||||
options: options
|
||||
})
|
||||
}else if(item.attrField === 'CYSD'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["WSCYSD"]
|
||||
})
|
||||
}else if(item.attrField === 'CLLX'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["ENERGYTYPES"]
|
||||
})
|
||||
}else if(item.attrField === 'NYLX'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["NYLXCLASS"]
|
||||
})
|
||||
}else if(item.attrField === 'SYCPX'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["SYCPXCLASS"]
|
||||
})
|
||||
}else if(item.attrField === 'SYRZ'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["SYRZCLASS"]
|
||||
})
|
||||
}else if(item.attrField === 'ZRBM'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["ZRBMCLASS"]
|
||||
})
|
||||
}else if(item.attrField === 'ZRGCS'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["ZRGCSCLASS"]
|
||||
})
|
||||
}else if(item.attrField === 'TXLB'){
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions["TXLBCLASS"]
|
||||
})
|
||||
}else {
|
||||
return Object.assign({}, item, {
|
||||
options: this.allSelectOptions[item.selVal]
|
||||
})
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
// 处理时间格式的数据
|
||||
data.forEach(item => {
|
||||
if (item.attrType === 'DATE_PICKER') {
|
||||
const date = this.sarStandardsInfoEO[item.attrField] ? new Date(this.sarStandardsInfoEO[item.attrField]) : ''
|
||||
this.$set(this.sarStandardsInfoEO, item.attrField, date)
|
||||
} else {
|
||||
this.$set(this.sarStandardsInfoEO, item.attrField, this.sarStandardsInfoEO[item.attrField] || '')
|
||||
}
|
||||
})
|
||||
this.resolveFormFieldListRules(isEdit)
|
||||
},
|
||||
// 处理时间格式的数据
|
||||
data.forEach(item => {
|
||||
if (item.attrType === 'DATE_PICKER') {
|
||||
const date = this.sarStandardsInfoEO[item.attrField] ? new Date(this.sarStandardsInfoEO[item.attrField]) : ''
|
||||
this.$set(this.sarStandardsInfoEO, item.attrField, date)
|
||||
} else {
|
||||
this.$set(this.sarStandardsInfoEO, item.attrField, this.sarStandardsInfoEO[item.attrField] || '')
|
||||
}
|
||||
})
|
||||
this.resolveFormFieldListRules(isEdit)
|
||||
},
|
||||
/**
|
||||
* 生成校验规则
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user