特殊类型回填处理

This commit is contained in:
a0049873 2022-07-11 16:43:23 +08:00
parent b37b3cafb9
commit 29087301b4
3 changed files with 21 additions and 4 deletions

View File

@ -423,12 +423,20 @@ export default {
this.submitFrom.infoList.push(obj) this.submitFrom.infoList.push(obj)
}, },
submitData () { submitData () {
console.log('编辑11111111111===============>', this.putOnTheShelfList)
const arr = [] const arr = []
this.putOnTheShelfList.map(item => { this.putOnTheShelfList.map(item => {
item.children.map(child => { item.children.map(child => {
if (child.children) { if (child.children) {
if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') { if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') {
arr.push(child.name) arr.push(child.name)
if (this.submitFrom.infoList.filter(value => value.attrType === child.name).length === 0) {
this.submitFrom.infoList.push({
attrType: child.name,
attrValue: child.note1,
delFlag: 0
})
}
} }
child.children.map(val => { child.children.map(val => {
arr.push(val.name) arr.push(val.name)
@ -483,6 +491,15 @@ export default {
attrValue: val.note1, attrValue: val.note1,
delFlag: 0 delFlag: 0
}) })
} else {
if (this.submitFrom.infoList.filter(value => value.attrType === val.name).length === 0) {
this.submitFrom.infoList.push({
attrType: val.name,
attrValue: val.note1,
delFlag: 0,
note2: val.note2 || null
})
}
} }
break break
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 14:55:19 * @Date: 2022-07-08 14:55:19
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-11 15:39:31 * @LastEditTime: 2022-07-11 16:34:10
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -68,14 +68,13 @@ export default {
} }
}, },
handleChange (file, fileList) { handleChange (file, fileList) {
console.log(file, fileList)
if (file.status === 'success') { if (file.status === 'success') {
if (file.response.msg === 'success') { if (file.response.msg === 'success') {
this.$message({ this.$message({
message: file.name + '上传成功', message: file.name + '上传成功',
type: 'success' type: 'success'
}) })
// this.data.note1 = file.response.data console.log(file, fileList)
this.$emit('changeInfoList', { this.$emit('changeInfoList', {
attrType: this.title, attrType: this.title,
attrValue: file.response.data, attrValue: file.response.data,

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:54:50 * @Date: 2022-07-08 09:54:50
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-11 15:00:24 * @LastEditTime: 2022-07-11 16:18:00
* @Description: 多条数据特殊处理 * @Description: 多条数据特殊处理
--> -->
<template> <template>
@ -111,6 +111,7 @@ export default {
} }
}, },
created () { created () {
console.log('特殊处理=============>', this.showData)
if (this.configure.name === '计费标准信息' || this.configure.name === '常见问题') { if (this.configure.name === '计费标准信息' || this.configure.name === '常见问题') {
if (this.showData.children[0].note1) { if (this.showData.children[0].note1) {
this.data = JSON.parse(this.showData.children[0].note1) this.data = JSON.parse(this.showData.children[0].note1)