chenrui 8 kuukautta sitten
vanhempi
commit
6d3efab691

+ 14 - 9
src/views/easyPassManagement/homepageCarouselImg/edit.vue

@@ -290,8 +290,10 @@ export default {
             this.chooseDealerList = res.data.dealerList
           }
           _this.$refs.imageSet.setFileList(res.data.imageUrl)
-          _this.form = res.data
-          _this.form.time = [res.data.bannerStartDate, res.data.bannerEndDate]
+          _this.$nextTick(() => {
+            _this.form = res.data
+            _this.form.time = [res.data.bannerStartDate, res.data.bannerEndDate]
+          })
         }
       })
     },
@@ -301,6 +303,7 @@ export default {
       if (_this.form.contentType === 'LINK') {
         _this.form.content = _this.form.contentLink
       }
+      console.log('11111111111:', _this.form)
       // 验证组件必填项
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
@@ -353,13 +356,6 @@ export default {
     },
     // 重置
     resetSearchForm () {
-      this.$refs.imageSet.setFileList('')
-      if (this.contentType === 'VIDEO') {
-        this.$refs.videoSet.setFileList('')
-      }
-      if (this.contentType === 'IMAGE_CONTENT') {
-        this.$refs.editor.setHtml('')
-      }
       this.form = {
         bannerSn: undefined, // 轮播图sn
         bannerName: '', // 轮播图名称
@@ -375,6 +371,15 @@ export default {
         contentLink: '',
         state: 'UNPUBLISH'
       }
+      if (this.$refs.imageSet) {
+        this.$refs.imageSet.setFileList('')
+      }
+      if (this.form.contentType === 'VIDEO' && this.$refs.videoSet) {
+        this.$refs.videoSet.setFileList('')
+      }
+      if (this.form.contentType === 'IMAGE_CONTENT') {
+        this.$refs.editor.setHtml('')
+      }
       this.isDisabled = false
       if (this.$refs.ruleForm) {
         this.$refs.ruleForm.resetFields()

+ 4 - 1
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -472,6 +472,7 @@ export default {
             // 获取产品列表 有分页
             this.$refs.chooseProductList.pageInit()
           } else {
+            const _this = this
             this.$confirm({
               title: '提示',
               content: res.data,
@@ -484,7 +485,9 @@ export default {
                 }
               },
               onOk () {
-                console.log('知道了')
+                _this.showProModal = false
+                // 获取产品列表 有分页
+                _this.$refs.chooseProductList.pageInit()
               }
             })
           }