feat: There is no way the, TO optimize the query
This commit is contained in:
@@ -2757,69 +2757,74 @@ export default {
|
||||
window.open(routeUrl.href, '_blank')
|
||||
},
|
||||
// 编辑标准属性
|
||||
selectStandardPro(item, state) {
|
||||
this.id = item.id
|
||||
this.collectId = item.collectId
|
||||
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))
|
||||
if (this.sarStandardsInfoEO.standSystem) {
|
||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||
}
|
||||
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) => {
|
||||
if (item.attrInfoMap[key]) {
|
||||
this.$set(this.sarStandardsInfoEO, key, item.attrInfoMap[key] === '[]' ? '' : item.attrInfoMap[key])
|
||||
}
|
||||
})
|
||||
const dynamicFormField = this.sarStandardsInfoEO
|
||||
this.sarStandardsInfoEO.EOPSSRQ = this.$moment(this.sarStandardsInfoEO.EOPSSRQ).isValid() ? 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 = this.sarStandardsInfoEO[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
|
||||
// 追加用户名称和部门名称和SVPPS名称
|
||||
// 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
|
||||
})
|
||||
selectStandardPro(row, state) {
|
||||
this.id = row.id
|
||||
this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoUpdateById', {id: row.id}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
const item = res.data || {}
|
||||
this.collectId = item.collectId
|
||||
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))
|
||||
if (this.sarStandardsInfoEO.standSystem) {
|
||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||
}
|
||||
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) => {
|
||||
if (item.attrInfoMap[key]) {
|
||||
this.$set(this.sarStandardsInfoEO, key, item.attrInfoMap[key] === '[]' ? '' : item.attrInfoMap[key])
|
||||
}
|
||||
})
|
||||
const dynamicFormField = this.sarStandardsInfoEO
|
||||
this.sarStandardsInfoEO.EOPSSRQ = this.$moment(this.sarStandardsInfoEO.EOPSSRQ).isValid() ? 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 = this.sarStandardsInfoEO[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
|
||||
// 追加用户名称和部门名称和SVPPS名称
|
||||
// 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
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改过程中,将resId 修改成 attid
|
||||
|
||||
+67
-62
@@ -2669,71 +2669,76 @@ export default {
|
||||
window.open(routeUrl.href, '_blank')
|
||||
},
|
||||
// 编辑
|
||||
selectStandardPro (item, state) {
|
||||
this.drawerTitle = '修改企业标准'
|
||||
this.modalshowflag = true
|
||||
this.resolveFormFieldList(true)
|
||||
this.$nextTick(() => {
|
||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||
const [displayLocation] = values
|
||||
const dynamicFormField = this.sarBussionessStandEO
|
||||
const formFieldList = this.formFieldList
|
||||
formFieldList.forEach((field) => {
|
||||
displayLocation.forEach((location) => {
|
||||
let value = dynamicFormField[field.attrField]
|
||||
let valueName = ''
|
||||
if (value && typeof value === 'number') {
|
||||
value = this.$dateFormat(value, 'yyyy-MM-dd')
|
||||
}
|
||||
field['value'] = value
|
||||
// 追加用户名称和部门名称
|
||||
if (field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS') {
|
||||
let attrFieldName = field.attrField + 'Name'
|
||||
valueName = dynamicFormField[attrFieldName]
|
||||
}
|
||||
field['valueName'] = valueName
|
||||
if (field.showRegionId === location.value) {
|
||||
if (!location.child) {
|
||||
location['child'] = []
|
||||
selectStandardPro (row, state) {
|
||||
this.$http.get('lawss/sarBussionessStand/getStandInfoUpdateById', {id: row.id}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
const item = res.data || {}
|
||||
this.drawerTitle = '修改企业标准'
|
||||
this.modalshowflag = true
|
||||
this.resolveFormFieldList(true)
|
||||
this.$nextTick(() => {
|
||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||
const [displayLocation] = values
|
||||
const dynamicFormField = this.sarBussionessStandEO
|
||||
const formFieldList = this.formFieldList
|
||||
formFieldList.forEach((field) => {
|
||||
displayLocation.forEach((location) => {
|
||||
let value = dynamicFormField[field.attrField]
|
||||
let valueName = ''
|
||||
if (value && typeof value === 'number') {
|
||||
value = this.$dateFormat(value, 'yyyy-MM-dd')
|
||||
}
|
||||
field['value'] = value
|
||||
// 追加用户名称和部门名称
|
||||
if (field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS') {
|
||||
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.sarBussionessStandEO = JSON.parse(JSON.stringify(item))
|
||||
this.sarBussionessStandEO["XCSJBUSS"] = this.dateFormatter()
|
||||
this.standStatus = JSON.parse(JSON.stringify(this.sarBussionessStandEO.standStatus))
|
||||
let subClass = item.standSubclass
|
||||
this.sarBussionessStandEO.standSubclass = subClass
|
||||
if (this.sarBussionessStandEO.issueTime != null && this.sarBussionessStandEO.issueTime !== '') {
|
||||
this.sarBussionessStandEO.issueTime = new Date(this.sarBussionessStandEO.issueTime)
|
||||
}
|
||||
if (this.sarBussionessStandEO.putTime != null && this.sarBussionessStandEO.putTime !== '') {
|
||||
this.sarBussionessStandEO.putTime = new Date(this.sarBussionessStandEO.putTime)
|
||||
}
|
||||
Object.keys(item.attrInfoMap || {}).forEach((key) => {
|
||||
if (item.attrInfoMap[key]) {
|
||||
// this.sarStandardsInfoEO[key] = item.attrInfoMap[key]
|
||||
this.$set(this.sarBussionessStandEO, key, item.attrInfoMap[key])
|
||||
}
|
||||
})
|
||||
this.sarBussionessStandEO['id'] = item.id
|
||||
if (state === 'show') {
|
||||
this.formdisableflag = true
|
||||
} else {
|
||||
// this.standGeneraSelectChange() // 负责细类初始化
|
||||
// this.getOrgTreeSource()
|
||||
this.addOrUPdateFlag = 2
|
||||
this.formdisableflag = false
|
||||
this.saveOldNum = item.standCode // 记录修改之前的标准编号
|
||||
this.saveOldReplaceNum = item.replaceStandNum // 记录修改之前的代替标准编号
|
||||
// let selectNode = this.getTreeNameByid(this.sarBussionessStandEO.responsibleUnit)
|
||||
this.sarBussionessStandEO.orgName = item.responsibleUnitShow
|
||||
}
|
||||
location['child'].push(field)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.dynamicFormField = displayLocation
|
||||
this.loading = false
|
||||
})
|
||||
this.sarBussionessStandEO = JSON.parse(JSON.stringify(item))
|
||||
this.sarBussionessStandEO["XCSJBUSS"] = this.dateFormatter()
|
||||
this.standStatus = JSON.parse(JSON.stringify(this.sarBussionessStandEO.standStatus))
|
||||
let subClass = item.standSubclass
|
||||
this.sarBussionessStandEO.standSubclass = subClass
|
||||
if (this.sarBussionessStandEO.issueTime != null && this.sarBussionessStandEO.issueTime !== '') {
|
||||
this.sarBussionessStandEO.issueTime = new Date(this.sarBussionessStandEO.issueTime)
|
||||
}
|
||||
if (this.sarBussionessStandEO.putTime != null && this.sarBussionessStandEO.putTime !== '') {
|
||||
this.sarBussionessStandEO.putTime = new Date(this.sarBussionessStandEO.putTime)
|
||||
}
|
||||
Object.keys(item.attrInfoMap || {}).forEach((key) => {
|
||||
if (item.attrInfoMap[key]) {
|
||||
// this.sarStandardsInfoEO[key] = item.attrInfoMap[key]
|
||||
this.$set(this.sarBussionessStandEO, key, item.attrInfoMap[key])
|
||||
}
|
||||
})
|
||||
this.sarBussionessStandEO['id'] = item.id
|
||||
if (state === 'show') {
|
||||
this.formdisableflag = true
|
||||
} else {
|
||||
// this.standGeneraSelectChange() // 负责细类初始化
|
||||
// this.getOrgTreeSource()
|
||||
this.addOrUPdateFlag = 2
|
||||
this.formdisableflag = false
|
||||
this.saveOldNum = item.standCode // 记录修改之前的标准编号
|
||||
this.saveOldReplaceNum = item.replaceStandNum // 记录修改之前的代替标准编号
|
||||
// let selectNode = this.getTreeNameByid(this.sarBussionessStandEO.responsibleUnit)
|
||||
this.sarBussionessStandEO.orgName = item.responsibleUnitShow
|
||||
}
|
||||
})
|
||||
},
|
||||
// 部门树结构,通过id,查出对应的树节点
|
||||
getTreeNameByid (treeid) {
|
||||
|
||||
@@ -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