|
@@ -135,8 +135,8 @@
|
|
|
id="productInfoEdit-productMsg"
|
|
|
v-model="form.productMsg"
|
|
|
ref="productMsg"
|
|
|
- :fileSize="0.25"
|
|
|
- @change="changeHomeImage"
|
|
|
+ @change="changeImage"
|
|
|
+ :maxNums="5"
|
|
|
listType="picture-card" ></Upload>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
@@ -279,8 +279,8 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
const data = res.data
|
|
|
this.form = Object.assign(this.form, data)
|
|
|
- console.log(this.form)
|
|
|
this.form.productType = [ this.form.productTypeSn1, this.form.productTypeSn2, this.form.productTypeSn3 ]
|
|
|
+ this.$refs.productMsg.setFileList(res.data.productMsg)
|
|
|
this.$refs.editor.setHtml(res.data.description)
|
|
|
this.$refs.otherDesc.setHtml(res.data.otherDesc)
|
|
|
} else {
|
|
@@ -320,8 +320,8 @@ export default {
|
|
|
this.$router.push({ path: '/productManagement/productInfo/list' })
|
|
|
},
|
|
|
// 产品图片上传
|
|
|
- changeHomeImage (file) {
|
|
|
- this.form.homeImage = file
|
|
|
+ changeImage (file) {
|
|
|
+ this.form.productMsg = file
|
|
|
},
|
|
|
// 产品说明 文本编辑器
|
|
|
editorDescriptionChange (html, text) {
|
|
@@ -365,6 +365,9 @@ export default {
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
+ vm.$refs.productMsg.setFileList('')
|
|
|
+ vm.$refs.editor.setHtml('')
|
|
|
+ vm.$refs.otherDesc.setHtml('')
|
|
|
vm.$refs.ruleForm.resetFields()
|
|
|
vm.getProductBrand()
|
|
|
vm.getProductType()
|