平台件 新增图片修改
This commit is contained in:
+21
-16
@@ -219,22 +219,27 @@
|
||||
this.queryForm.brandText = this.queryForm.brandText
|
||||
}
|
||||
let file = []
|
||||
getAction('sys/common/getFileInfos', { id: this.queryForm.brandLabel }).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
res.result.forEach((item =>{
|
||||
file.push({
|
||||
name : item.fileName,
|
||||
uid : item.id,
|
||||
url : item.url
|
||||
})
|
||||
}))
|
||||
console.log(file)
|
||||
this.fileList = file
|
||||
} else {
|
||||
// this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
if(this.queryForm.brandLabel){
|
||||
let list = this.queryForm.brandLabel.split(',')
|
||||
list.forEach((item => {
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
res.result.forEach((item =>{
|
||||
file.push({
|
||||
name : item.fileName,
|
||||
uid : item.id,
|
||||
url : window._CONFIG['domianURL']+'/sys/split/file/getImage?fileUrl='+item.url
|
||||
})
|
||||
}))
|
||||
console.log(file)
|
||||
this.fileList = file
|
||||
} else {
|
||||
// this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
}))
|
||||
}
|
||||
} else {
|
||||
this.queryForm = {}
|
||||
}
|
||||
|
||||
+37
-27
@@ -732,18 +732,23 @@
|
||||
},
|
||||
handleChange({ fileList }) {
|
||||
this.fileList = fileList;
|
||||
console.log(this.fileList)
|
||||
let filelist = []
|
||||
let filelistId = []
|
||||
this.fileList.forEach((item => {
|
||||
filelist.push(item.response)
|
||||
}))
|
||||
console.log(filelist,'111')
|
||||
filelist.forEach((item => {
|
||||
filelistId.push(item.result.id)
|
||||
}))
|
||||
this.formInline.brandLabel = filelistId.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
let file = []
|
||||
console.log(this.fileList)
|
||||
this.fileList.forEach((item => {
|
||||
if (item.response) {
|
||||
file.push(item.response.result)
|
||||
} else {
|
||||
file.push(item)
|
||||
}
|
||||
}))
|
||||
console.log(file)
|
||||
file.forEach((item => {
|
||||
filelistId.push(item.id || item.uid)
|
||||
}))
|
||||
console.log(filelistId,'111')
|
||||
this.formInline.brandLabel = filelistId.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
getFirstLevelDutyTerritory() {
|
||||
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||
@@ -769,22 +774,27 @@
|
||||
value.dutyDepart = value.dutyDepart.split(',')
|
||||
}
|
||||
let file = []
|
||||
getAction('sys/common/getFileInfos', { id: value.brandLabel }).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
res.result.forEach((item =>{
|
||||
file.push({
|
||||
name : item.fileName,
|
||||
uid : item.id,
|
||||
url : item.url
|
||||
})
|
||||
}))
|
||||
console.log(file)
|
||||
this.fileList = file
|
||||
} else {
|
||||
// this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
if(value.brandLabel){
|
||||
let list = value.brandLabel.split(',')
|
||||
list.forEach((item => {
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
res.result.forEach((item =>{
|
||||
file.push({
|
||||
name : item.fileName,
|
||||
uid : item.id,
|
||||
url : window._CONFIG['domianURL']+'/sys/split/file/getImage?fileUrl='+item.url
|
||||
})
|
||||
}))
|
||||
console.log(file)
|
||||
this.fileList = file
|
||||
} else {
|
||||
// this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
}))
|
||||
}
|
||||
this.formInline = value
|
||||
console.log(this.formInline)
|
||||
this.formInline = { ...this.formInline }
|
||||
|
||||
Reference in New Issue
Block a user