魏志佳 5 年之前
父节点
当前提交
be5bb7ef49
共有 2 个文件被更改,包括 40 次插入24 次删除
  1. 20 20
      src/views/modules/BatchCreate/TouTiaoBatch.vue
  2. 20 4
      src/views/modules/BatchCreate/newCreate.vue

+ 20 - 20
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -70,13 +70,13 @@
                 <span class="OptinItem">
                     <a-tooltip>
                         <template slot="title" :getPopupContainer='getPopupContainer'>
-                        点我就可以批量启动、暂停、删除你的选择哦~
+                            这里可以批量启动、暂停、删除你的选择哦~
                         </template>
                         <a-button type="link" @click="changeSelectStatus">批量操作</a-button>
                     </a-tooltip>
                 </span>
                 <span class="OptinItem">
-                    <a-select  style="width: 120px" @change="optChange" placeholder="" :disabled='selectDisable'>
+                    <a-select  style="width: 120px" @change="optChange" placeholder="请选择状态" :disabled='selectedRowKeys.length<=0'>
                         <a-select-option value="open" >
                             启动
                         </a-select-option>
@@ -154,21 +154,22 @@
                     <span slot="planStatus" slot-scope="text,record">
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
-                    <a-popover placement="right">
-                        <template slot="content">
-                        <p>Content</p>
-                        <p>Content</p>
-                        </template>
-                        <template slot="title">
-                        <span>Title</span>
-                        </template>
-                        <!-- <a-button>Right</a-button> -->
-                        <span slot="createImg" slot-scope="text,record">
-                            <!-- <a-switch size="default" :checked=text  @change="switchChange(text,record)"/> -->
+                   
+                    <span slot="createImg" slot-scope="text,record">
+                        <!-- <a-switch size="default" :checked=text  @change="switchChange(text,record)"/> -->
+                        <a-popover placement="right">
+                            <template slot="content">
+                                <!-- {{record.videoId_dictText}}  -->
+                                <video :src="record.videoId_dictText" style="width:250px" controls autoplay muted ></video>
+                            </template>
+                            <template slot="title">
+                            <!-- <span>Title</span> -->
+                            </template>
+                            <!-- <a-button>Right</a-button> -->
                             <img :src="record.imageId_dictText" alt="" style="width:100px">
-                        </span>
-                    </a-popover>
-                    
+                        </a-popover>
+                        
+                    </span>
                     <!-- <span slot="options" slot-scope="record">
                         <a href="javascript:;" style="margin-right:10px">编辑</a>
                         <a href="javascript:;" v-if="tabkey=='plan'" @click="copyPlan(record)">复制</a>
@@ -884,8 +885,7 @@ export default {
         },
         //批量操作的确定按钮
         isOkHandle(){
-            this.selectDisable=true;
-          
+            console.log(this.optValue&&this.selectedRowKeys.length>0)
             if(this.optValue&&this.selectedRowKeys.length>0){
                 
                 if(this.optValue=='pause'){   
@@ -922,8 +922,8 @@ export default {
 
                 }
               
-                this.selectedRows=[];
-                this.selectedRowKeys=[];
+                // this.selectedRows=[];
+                // this.selectedRowKeys=[];
                 this.optValue=undefined;
             }
             

+ 20 - 4
src/views/modules/BatchCreate/newCreate.vue

@@ -352,17 +352,25 @@
         <!-- <div class="moduler-title">计划名称</div> -->
         <div class="opt">
           <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
-          <a-button type="primary" style="margin-right:15px" @click="goSave">保存并关闭</a-button>
+          <a-button type="primary" style="margin-right:15px" @click="goSave" :loading="loading">保存并关闭</a-button>
         </div>
       </div>
     </a-form>
       <div class="infoModal">
-         <a-modal v-model="visible" title="提示"  @ok="handleOk">
+         <a-modal v-model="visible" title="提示"  @ok="handleOk" :keyboard='false' :maskClosable='false'>
             <ul>
               <li v-for="(item,index) in errorInfo" :key="index">
                   <span>第{{index+1}}条:</span>{{item.message}}
               </li>
             </ul>
+            <template slot="footer">
+              <a-button key="back" @click="handleCancel">
+                返回本页
+              </a-button>
+              <a-button key="submit" type="primary"  @click="handleOk">
+                返回头条批量页面
+              </a-button>
+            </template>
           </a-modal>
       </div>
   </div>
@@ -452,6 +460,7 @@
 
         errorInfo:[],
         visible:false,
+        loading:false,
       }
     },
     components: {
@@ -459,7 +468,13 @@
     },
     methods: {
       handleOk(e) {
-        // console.log(e);
+          this.$router.replace('/modules/BatchCreate/TouTiaoBatch')
+          this.$bus.$emit('remove', '/modules/BatchCreate/newCreate')
+          localStorage.removeItem('groupInfo')
+          localStorage.removeItem('planInfo')
+          localStorage.removeItem('accountInfo')
+      },
+      handleCancel(e) {
         this.visible = false;
       },
       handleClose(removedTag) {
@@ -588,7 +603,7 @@
               var params = {
                 ...values
               }
-
+              this.loading=true;
               // params.thirdIndustryId = params.thirdIndustryId.pop()
               var dataCreatives = this.$refs.material.HorizontalLargeImageListBig.concat(
                 this.$refs.material.HorizontalLargeImageListHeng,
@@ -627,6 +642,7 @@
                   console.log(res)
                   if (res.success) {
                     this.errorInfo=res.data;
+                    this.loading=false;
                     this.visible=true;
                     // res.data.forEach((item)=>{
                     //   this.$message.error(item.message)