feat: There is no way the, TO optimize the query
This commit is contained in:
@@ -2576,75 +2576,80 @@ export default {
|
||||
window.open(routeUrl.href, '_blank')
|
||||
},
|
||||
// 编辑标准属性
|
||||
selectStandardPro(item, state) {
|
||||
selectStandardPro(row, state) {
|
||||
// this.sarStandardsInfoEO.country=JSON.parse(item.country );
|
||||
|
||||
// console.log(this.sarStandardsInfoEO.country);
|
||||
|
||||
this.addOrUPdateFlag = 2
|
||||
this.modalshowtitle = '编辑海外标准'
|
||||
this.modalshowflag = true
|
||||
this.resolveFormFieldList(item.isRelateAccess)
|
||||
this.$nextTick(() => {
|
||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||
const [displayLocation] = values
|
||||
const formFieldList = this.formFieldList
|
||||
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||
if (item.country !== undefined && item.country !== null && item.country !== '') {
|
||||
this.sarStandardsInfoEO.country = item.country.split(",");
|
||||
}
|
||||
this.sarStandardsInfoEO.standSort = item.standSort
|
||||
if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') {
|
||||
this.sarStandardsInfoEO.putTime = this.sarStandardsInfoEO.putTime.replace(new RegExp(/-/gm), '/')
|
||||
this.sarStandardsInfoEO.putTime = new Date(this.sarStandardsInfoEO.putTime)
|
||||
}
|
||||
Object.keys(item.attrInfoMap || {}).forEach((key) => {
|
||||
item.attrInfoMap[key] = item.attrInfoMap[key] === null ? '' : item.attrInfoMap[key]
|
||||
if (item.attrInfoMap[key] || item.attrInfoMap[key] === '') {
|
||||
this.$set(this.sarStandardsInfoEO, key, item.attrInfoMap[key] === '[]' ? '' : item.attrInfoMap[key])
|
||||
this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoUpdateById', {id: row.id}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
const item = res.data || {}
|
||||
this.addOrUPdateFlag = 2
|
||||
this.modalshowtitle = '编辑海外标准'
|
||||
this.modalshowflag = true
|
||||
this.resolveFormFieldList(item.isRelateAccess)
|
||||
this.$nextTick(() => {
|
||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||
const [displayLocation] = values
|
||||
const formFieldList = this.formFieldList
|
||||
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||
if (item.country !== undefined && item.country !== null && item.country !== '') {
|
||||
this.sarStandardsInfoEO.country = item.country.split(",");
|
||||
}
|
||||
})
|
||||
const dynamicFormField = this.sarStandardsInfoEO
|
||||
|
||||
this.sarStandardsInfoEO.EOPSSRQ = this.sarStandardsInfoEO.EOPSSRQ !== 'N/A' && this.sarStandardsInfoEO.EOPSSRQ !== 'TBD' ? this.$moment(this.sarStandardsInfoEO.EOPSSRQ) : this.sarStandardsInfoEO.EOPSSRQ
|
||||
this.sarStandardsInfoEO['id'] = item.id
|
||||
this.standState = JSON.parse(JSON.stringify(this.sarStandardsInfoEO.standState))
|
||||
formFieldList.forEach((field) => {
|
||||
displayLocation.forEach((location) => {
|
||||
let value = dynamicFormField[field.attrField]
|
||||
let valueName = ''
|
||||
if (value && field.attrType === 'DATE_PICKER') {
|
||||
value = this.$moment(value).format('YYYY-MM-DD')
|
||||
}
|
||||
if (field.attrField === 'CYCVPPSBM') {
|
||||
this.defaultCheckedKeys1 = [value]
|
||||
}
|
||||
if (field.attrField === 'KCCVPPSBM') {
|
||||
this.defaultCheckedKeys2 = [value]
|
||||
}
|
||||
if (field.attrField === 'DYBXH') {
|
||||
this.defaultCheckedKeys3 = [value]
|
||||
}
|
||||
field['value'] = value
|
||||
// 追加用户名称和部门名称
|
||||
if (field.selVal === 'ROLELIST' || field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS' || field.attrField === 'XMPGJS') {
|
||||
let attrFieldName = field.attrField + 'Name'
|
||||
valueName = dynamicFormField[attrFieldName]
|
||||
}
|
||||
field['valueName'] = valueName
|
||||
if (field.showRegionId === location.value) {
|
||||
if (!location.child) {
|
||||
location['child'] = []
|
||||
}
|
||||
location['child'].push(field)
|
||||
this.sarStandardsInfoEO.standSort = item.standSort
|
||||
if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') {
|
||||
this.sarStandardsInfoEO.putTime = this.sarStandardsInfoEO.putTime.replace(new RegExp(/-/gm), '/')
|
||||
this.sarStandardsInfoEO.putTime = new Date(this.sarStandardsInfoEO.putTime)
|
||||
}
|
||||
Object.keys(item.attrInfoMap || {}).forEach((key) => {
|
||||
item.attrInfoMap[key] = item.attrInfoMap[key] === null ? '' : item.attrInfoMap[key]
|
||||
if (item.attrInfoMap[key] || item.attrInfoMap[key] === '') {
|
||||
this.$set(this.sarStandardsInfoEO, key, item.attrInfoMap[key] === '[]' ? '' : item.attrInfoMap[key])
|
||||
}
|
||||
})
|
||||
const dynamicFormField = this.sarStandardsInfoEO
|
||||
|
||||
this.sarStandardsInfoEO.EOPSSRQ = this.sarStandardsInfoEO.EOPSSRQ !== 'N/A' && this.sarStandardsInfoEO.EOPSSRQ !== 'TBD' ? this.$moment(this.sarStandardsInfoEO.EOPSSRQ) : this.sarStandardsInfoEO.EOPSSRQ
|
||||
this.sarStandardsInfoEO['id'] = item.id
|
||||
this.standState = JSON.parse(JSON.stringify(this.sarStandardsInfoEO.standState))
|
||||
formFieldList.forEach((field) => {
|
||||
displayLocation.forEach((location) => {
|
||||
let value = dynamicFormField[field.attrField]
|
||||
let valueName = ''
|
||||
if (value && field.attrType === 'DATE_PICKER') {
|
||||
value = this.$moment(value).format('YYYY-MM-DD')
|
||||
}
|
||||
if (field.attrField === 'CYCVPPSBM') {
|
||||
this.defaultCheckedKeys1 = [value]
|
||||
}
|
||||
if (field.attrField === 'KCCVPPSBM') {
|
||||
this.defaultCheckedKeys2 = [value]
|
||||
}
|
||||
if (field.attrField === 'DYBXH') {
|
||||
this.defaultCheckedKeys3 = [value]
|
||||
}
|
||||
field['value'] = value
|
||||
// 追加用户名称和部门名称
|
||||
if (field.selVal === 'ROLELIST' || field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS' || field.attrField === 'XMPGJS') {
|
||||
let attrFieldName = field.attrField + 'Name'
|
||||
valueName = dynamicFormField[attrFieldName]
|
||||
}
|
||||
field['valueName'] = valueName
|
||||
if (field.showRegionId === location.value) {
|
||||
if (!location.child) {
|
||||
location['child'] = []
|
||||
}
|
||||
location['child'].push(field)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.dynamicFormField = displayLocation
|
||||
this.loading = false
|
||||
})
|
||||
this.dynamicFormField = displayLocation
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
// 查询二级菜单
|
||||
selectChildMenu(row) {
|
||||
|
||||
Reference in New Issue
Block a user