|
@@ -283,7 +283,18 @@ export default {
|
|
|
const data = res.data
|
|
|
this.form = Object.assign(this.form, data)
|
|
|
this.form.productType = [ this.form.productTypeSn1, this.form.productTypeSn2, this.form.productTypeSn3 ]
|
|
|
- this.$refs.productMsg.setFileList(res.data.productMsg)
|
|
|
+ if (res.data.productPicList && res.data.productPicList.length > 0) {
|
|
|
+ let str = ''
|
|
|
+ res.data.productPicList.map(item => {
|
|
|
+ if (item.imageUrl) {
|
|
|
+ str += item.imageUrl + ','
|
|
|
+ }
|
|
|
+ })
|
|
|
+ str = str.substr(0, str.length - 1)
|
|
|
+ this.$refs.productMsg.setFileList(str)
|
|
|
+ } else {
|
|
|
+ this.$refs.productMsg.setFileList('')
|
|
|
+ }
|
|
|
this.$refs.editor.setHtml(res.data.description)
|
|
|
this.$refs.otherDesc.setHtml(res.data.otherDesc)
|
|
|
} else {
|
|
@@ -303,6 +314,14 @@ export default {
|
|
|
if (valid) {
|
|
|
const form = JSON.parse(JSON.stringify(_this.form))
|
|
|
form.id = _this.$route.params.id ? _this.$route.params.id : undefined
|
|
|
+ form.productPicList = []
|
|
|
+ if (form.productMsg) {
|
|
|
+ const arr = form.productMsg.split(',')
|
|
|
+ arr.map(item => {
|
|
|
+ form.productPicList.push({ imageUrl: item })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ delete form.productMsg
|
|
|
delete form.productType
|
|
|
delete form.updateDate
|
|
|
_this.spinning = true
|