Переглянути джерело

Merge branch 'develop_yh48-1' of jianguan-web/jg-ocs-html into develop_yh48_2

李磊 8 місяців тому
батько
коміт
eadc5f8770

+ 4 - 4
src/config/router.config.js

@@ -3692,8 +3692,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '促销产品',
-              icon: 'file-ppt'
-              // permission: 'M_promotionalProducts'
+              icon: 'file-ppt',
+              permission: 'M_promoProduct'
             },
             hideChildrenInMenu: true,
             children: [
@@ -3704,8 +3704,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '促销产品列表',
                   icon: 'file-ppt',
-                  hidden: true
-                  // permission: 'M_promoProductList'
+                  hidden: true,
+                  permission: 'M_promoProductList'
                 }
               }
             ]

+ 20 - 10
src/views/easyPassManagement/homepageCarouselImg/edit.vue

@@ -115,7 +115,7 @@
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item label="内容" prop="contentEditor" v-show="form.contentType =='IMAGE_CONTENT'">
+              <a-form-model-item label="内容" class="contentBox" v-show="form.contentType =='IMAGE_CONTENT'">
                 <editor
                   v-show="!isDisabled"
                   id="carouselImageEdit-editor"
@@ -125,7 +125,7 @@
                   :cache="false"></editor>
                 <div style="border:1px solid #efefef;border-radius:8px;padding:10px 20px;" v-if="isDisabled" v-html="form.content"></div>
               </a-form-model-item>
-              <a-form-model-item label="上传视频" prop="content" v-show="form.contentType =='VIDEO'">
+              <a-form-model-item label="上传视频" prop="content" v-if="form.contentType =='VIDEO'">
                 <Upload
                   class="upload"
                   id="carouselImageEdit-videoSet"
@@ -223,8 +223,7 @@ export default {
         imageUrl: [{ required: true, message: '请选择要上传的封面图片', trigger: 'change' }],
         contentType: [{ required: true, message: '请选择内容类型', trigger: 'change' }],
         content: [{ required: true, message: '请选择视频展示', trigger: ['blur', 'change'] }],
-        contentLink: [{ required: true, message: '请输入跳转链接', trigger: ['blur', 'change'] }],
-        contentEditor: [{ required: true, message: '请输入图文内容', trigger: ['blur', 'change'] }]
+        contentLink: [{ required: true, message: '请输入跳转链接', trigger: ['blur', 'change'] }]
       }
     }
   },
@@ -303,7 +302,6 @@ export default {
             _this.form.contentEditor = res.data.content
             _this.form.time = [res.data.bannerStartDate, res.data.bannerEndDate]
           })
-          console.log('22222222222222:', _this.form)
         }
       })
     },
@@ -314,9 +312,8 @@ export default {
         _this.form.content = _this.form.contentLink
       }
       if (_this.form.contentType === 'IMAGE_CONTENT') {
-        _this.form.content = _this.form.contentEditor
+        _this.form.content = _this.form.contentEditor ? _this.form.contentEditor : _this.form.content
       }
-      console.log('11111111111:', _this.form)
       // 验证组件必填项
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
@@ -334,6 +331,10 @@ export default {
         }
         _this.form.dealerSnList = _this.chooseDealerList.map(con => con.dealerSn)
       }
+      if (_this.form.contentType === 'IMAGE_CONTENT' && !_this.form.contentEditor) {
+        _this.$message.warning('请输入图文内容!')
+        return
+      }
       _this.form.bannerSn = _this.$route.params.sn || undefined
       var formData = JSON.parse(JSON.stringify(_this.form))
       delete formData.time
@@ -364,9 +365,6 @@ export default {
     //  文本编辑器
     editorChange (html, text) {
       this.form.contentEditor = html
-      if (html) {
-        this.$refs.ruleForm.clearValidate('contentEditor')
-      }
     },
     // 重置
     resetSearchForm () {
@@ -457,6 +455,18 @@ export default {
         z-index: 0;
       }
     }
+    //图文必填标志显示
+  .contentBox {
+      /deep/.ant-form-item-label label::before{
+        display:inline-block;
+        margin-right: 4px;
+        color: #f5222d !important;
+        font-size: 12px;
+        font-family: SimSun, sans-serif;
+        line-height: 1;
+        content: '*';
+      }
+    }
     .buyerBox{
       border:1px solid #d9d9d9;
       margin-top:10px;

+ 2 - 2
src/views/easyPassManagement/promotionalActivities/list.vue

@@ -108,14 +108,14 @@
                 type="link"
                 class="button-warning"
                 :id="'promotion-abandon-btn-'+record.id"
-                v-if="(record.promoState=='HAVE_RELEASE') && $hasPermissions('B_promoActivitiesAbandon')"
+                v-if="record.promoState=='HAVE_RELEASE'&&record.dealerOpenFlag=='0'&& $hasPermissions('B_promoActivitiesAbandon')"
                 @click="handleAbandon(record)">废弃</a-button>
               <a-button
                 size="small"
                 type="link"
                 class="button-warning"
                 :id="'promotion-img-btn-'+record.id"
-                v-if="(record.promoState=='HAVE_RELEASE') && $hasPermissions('B_promoActivitiesImg')"
+                v-if="record.promoState=='HAVE_RELEASE'&&record.dealerOpenFlag=='0'&& $hasPermissions('B_promoActivitiesImg')"
                 @click="handleSet(record)">轮播图</a-button>
               <a-button
                 size="small"