瀏覽代碼

'wzj修改'

魏志佳 4 年之前
父節點
當前提交
c3e2daa123

+ 181 - 147
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -12,14 +12,14 @@
                 <a-button type='primary'  slot="tabBarExtraContent" @click="goBatch">
                    + 头条批量创建
                 </a-button>
-                
+
             </a-tabs>
         </div>
         </keep-alive>
         <div class="topOptions">
             <span class="OptinItem topOpt">
                 <!-- <Treeselect :appId.sync="accountID" :multiple="false" request="2,4" reqUrl='/ctop/projectMember/getProjectAccountByUserId' ref="treeSelect" style="margin-bottom:8px " /> -->
-                
+
                 <a-tree-select
                     show-search
                     allow-clear
@@ -28,12 +28,12 @@
                     style="width: 60%"
                     :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                     :tree-data="treeData"
-                    placeholder="请选择具体账户"                   
+                    placeholder="请选择具体账户"
                     :filterOption='filterOption'
                     treeNodeFilterProp='title'
-                    @change='accountIDChange'                  
+                    @change='accountIDChange'
                 >
-                    
+
                 </a-tree-select>
             </span>
             <span class="OptinItem">
@@ -127,7 +127,7 @@
             <div class="table">
                 <a-table
                 :columns="columns"
-                :data-source="data"               
+                :data-source="data"
                 :rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
                 bordered
                 :pagination="ipagination"
@@ -137,7 +137,7 @@
                     <template slot="name" slot-scope="text,record">
                         <a href="javascript:;" @click="goNextPage(text)">
                             <editableCell :text="text" slotName='name' @change="onCellChange(record.key, 'name', $event)" />
-                        </a>                       
+                        </a>
                     </template>
                     <span slot="budget" slot-scope="text,record">
                        <editableCell :text="text" slotName='budget' @change="onCellChange(record.key, 'budget', $event)" />
@@ -154,6 +154,21 @@
                     <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)"/> -->
+                            <img :src="record.imageId_dictText" alt="" style="width:100px">
+                        </span>
+                    </a-popover>
+                    
                     <!-- <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>
@@ -179,7 +194,7 @@
         <!-- 出价的模态框 -->
         <div class="batchModal" >
             <a-modal v-model="offerPriceVisiable" :title="'批量修改'+ModalTitle" @ok="modifyChangeOk" width='55%' id="batchModal" >
-                <div id="batchModal">                
+                <div id="batchModal">
                     <div class="selectePlan">已选{{}}个广告计划</div>
                     <div class="modifyRules">
                         <span class="rules">修改规则:</span>
@@ -192,7 +207,7 @@
                             </a-radio-button>
                         </a-radio-group>
                         <span class="totalPrice" v-if="modifyRulesValue=='total'"><span>{{ModalTitle=='出价'?'出价:':'总预算:'}}</span>
-                            
+
                             <a-input-number :min="0" v-model="inputValue" :step="0.1" @change="totalbudgetChange" size="small"  /> 元
                         </span>
                     </div>
@@ -213,12 +228,12 @@
                             </span>
                             <span slot="currentCost" slot-scope="currentCost">{{ currentCost | decimalsHandle }}</span>
                             <span slot="budget" slot-scope="text">
-                                
+
                                 <span >日预算:{{  text | decimalsHandle }}</span>
                             </span>
                             <span slot="bid" slot-scope="text" >
                                 <span >oCPM: {{text | decimalsHandle}}</span>
-                                
+
                             </span>
                         </a-table>
                     </div>
@@ -243,7 +258,7 @@
                     </a-select>
                 </p>
             </div>
-            
+
         </a-modal>
     </div>
 </template>
@@ -416,7 +431,7 @@ const planColumns = [
 ];
 const ideaColumns = [
   {
-    title: '状态',
+    title: '开关',
     dataIndex: 'createStatus',
     key: 'status',
     align: 'center',
@@ -429,29 +444,45 @@ const ideaColumns = [
     //     align: 'center',
     //     scopedSlots: { customRender: 'options' }
     //   },
-  {
-    title: '创意ID',
-    dataIndex: 'id',
-    key: 'id',
-    align: 'center',
-  },
-  {
+    {
+        title: '创意',
+        dataIndex: 'createImg',
+        key: 'createImg',
+        align: 'center',
+        width:120,
+        scopedSlots: { customRender: 'createImg' }
+    },
+ 
+  /*{
     title: '广告创意',
     dataIndex: 'img',
     key: 'img',
     align: 'center',
-  },
+  },*/
   {
     title: '创意标题',
     dataIndex: 'title',
     key: 'title',
     align: 'center',
   },
-  {
+   {
+    title: '创意ID',
+    dataIndex: 'id',
+    key: 'id',
+    align: 'center',
+  },
+  /*{
     title: '创意方式',
     dataIndex: 'iaID',
     key: 'idaID',
     align: 'center',
+  },*/
+  {
+    title: '创意状态',
+    dataIndex: 'status_dictText',
+    key: 'status_dictText',
+    align: 'center',
+    scopedSlots: { customRender: 'status_dictText' }
   },
   {
     title: '账户',
@@ -460,26 +491,27 @@ const ideaColumns = [
     align: 'center',
   },
   {
-    title: '投放时间',
-    dataIndex: 'LaunchTime',
-    key: 'LaunchTime',
+    title: '所属计划',
+    dataIndex: 'planId_dictText',
+    key: 'planId_dictText',
     align: 'center',
-    scopedSlots: { customRender: 'LaunchTime' }
+    scopedSlots: { customRender: 'planId_dictText' }
   },
+  
   {
+    title: '创建时间',
+    dataIndex: 'creativeCreateTime',
+    key: 'creativeCreateTime',
+    align: 'center',
+    scopedSlots: { customRender: 'creativeCreateTime' }
+  },
+ /* {
     title: '投放位置',
     dataIndex: 'LaunchPosition',
     key: 'LaunchPosition',
     align: 'center',
     scopedSlots: { customRender: 'LaunchPosition' }
-  },
-  {
-    title: '所属计划',
-    dataIndex: 'planId_dictText',
-    key: 'planId_dictText',
-    align: 'center',
-    scopedSlots: { customRender: 'planId_dictText' }
-  },
+  },*/
 ];
 
 
@@ -516,12 +548,12 @@ export default {
             columns,
             selectedRowKeys:[],
             selectedRows:[],
-           
+
             editID:0,
             //批量修改里的表格
             typeValue,
             modifyTableData:[
-                
+
             ],
             modifyTableCol,
             modifyTableloading:false,
@@ -536,7 +568,7 @@ export default {
               campaignList: "/ctop/byteDanceCampaign/list",
               planList: "/ctop/byteDanceAdvertisePlan/list",
               creativeList: "/ctop/byteDanceCreative/list",
-              
+
 
             },
 
@@ -573,7 +605,7 @@ export default {
 
         },
         // table里的函数
-        
+
         // table里的函数在上
 
         accountIDChange(val){
@@ -589,7 +621,7 @@ export default {
 
             this.search();
         },
-        
+
         filterOption(input, option){
             console.log(input, option)
             return (
@@ -600,11 +632,11 @@ export default {
         callback(key) {
             console.log(key);
             this.tabkey=key;
-           
+
             // this.columns=[];
             if(key=='group'){
-                this.columns=columns;              
-            }else if(key=='plan'){                              
+                this.columns=columns;
+            }else if(key=='plan'){
                 this.columns=planColumns;
             }else if(key=='idea'){
                 this.columns=ideaColumns;
@@ -613,7 +645,7 @@ export default {
             if(this.accountID){
                 this.tabkey=key;
                 this.loading=true
-                if(key=='group'){         
+                if(key=='group'){
                     let params = {};
                     this.refreshCampaignList({
                         accountId:this.accountID,
@@ -623,7 +655,7 @@ export default {
                         endDate:this.dateString[1],
                         pageNo:this.ipagination.current
                     });
-                }else if(key=='plan'){               
+                }else if(key=='plan'){
                     this.getplanList({
                         accountId:this.accountID,
                         name:this.optionId,
@@ -632,7 +664,7 @@ export default {
                         endDate:this.dateString[1],
                         pageNo:this.ipagination.current
                     })
-   
+
                 }else if(key=='idea'){
                     let params = {};
                       this.refreshCreativeList({
@@ -645,7 +677,7 @@ export default {
                       });
                 }
             }
-            
+
         },
         //跳转到批量页面
         goBatch(){
@@ -675,7 +707,7 @@ export default {
         //查询按钮事件
         search(){
             // console.log(this.accountID,this.dateString,this.statusValue,this.optionId);
-             
+
             if(this.accountID){
                 this.loading=true
                 if(this.tabkey=='group'){
@@ -712,8 +744,8 @@ export default {
             }else{
                 this.$message.error('请选择账户后重试')
             }
-            
-            
+
+
             // postAction('',{
 
             // }).then((res)=>{
@@ -737,10 +769,10 @@ export default {
         },
         //状态改变
         switchChange(text,record){
-            
+
             console.log(text,record);
             let recordData=JSON.parse(JSON.stringify(record))
-            
+
            if(this.tabkey=='group'){
                let ids=record.id;
                let status=text?'disable':'enable';
@@ -763,14 +795,14 @@ export default {
                    }
                })
            }else if(this.tabkey=='plan'){
-               
+
                 if(text){
-                    recordData.toutiaoStatus='AD_STATUS_DISABLE';                  
+                    recordData.toutiaoStatus='AD_STATUS_DISABLE';
                 }else{
                     recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
                 }
                 this.batchEditHttp('status',[recordData])
-           
+
            }else if(this.tabkey=='idea'){
                let ids=record.id;
                let status=text?'disable':'enable';
@@ -795,7 +827,7 @@ export default {
                    }
                })
            }
-           
+
         },
 
 
@@ -816,7 +848,7 @@ export default {
                 }else{
                         ids+=`,${item.id}`
                 }
-                
+
             })
             let status=''
             if(this.optValue=='pause'){
@@ -860,10 +892,10 @@ export default {
                     if(this.tabkey=='group'){
                         console.log(this.selectedRows);
                         this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
-                        
+
                     }else if(this.tabkey=='plan'){
                         console.log(0)
-                        if(this.selectedRowKeys.length>0){                       
+                        if(this.selectedRowKeys.length>0){
                             this.selectedRows.forEach((item)=>{
                                 item.toutiaoStatus='AD_STATUS_DISABLE'
                             })
@@ -872,13 +904,13 @@ export default {
                         this.batchEditHttp('status',this.selectedRows)
                     }else if(this.tabkey=='idea'){
                         this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
-                    }               
-                    
+                    }
+
                 }else if(this.optValue=='open'){
                     if(this.tabkey=='group'){
                         this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
                     }else if(this.tabkey=='plan'){
-                        if(this.selectedRowKeys.length>0){                       
+                        if(this.selectedRowKeys.length>0){
                             this.selectedRows.forEach((item)=>{
                                 item.toutiaoStatus='AD_STATUS_DELIVERY_OK'
                             })
@@ -886,8 +918,8 @@ export default {
                         this.batchEditHttp('status',this.selectedRows)
                     }else if(this.tabkey=='idea'){
                          this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
-                    }    
-                  
+                    }
+
                 }
               
                 this.selectedRows=[];
@@ -903,7 +935,7 @@ export default {
                      if(this.tabkey=='group'){
                          this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
                     }else if(this.tabkey=='plan'){
-                        if(this.selectedRowKeys.length>0){                        
+                        if(this.selectedRowKeys.length>0){
                             this.selectedRows.forEach((item)=>{
                                 item.toutiaoStatus='AD_STATUS_DELETE'
                             })
@@ -912,11 +944,11 @@ export default {
                         this.$message.success('删除成功');
                     }else if(this.tabkey=='idea'){
                         this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
-                    }    
-                    
+                    }
+
                 }
-           
-            
+
+
 
         },
         //取消删除
@@ -953,9 +985,9 @@ export default {
                     })
                     // console.log(this.xiugaiData)
                 }
-                
+
             }else if(this.typeValue=='出价'){
-                if(e.target.value ){                   
+                if(e.target.value ){
                     this.xiugaiData.forEach((item)=>{
                         if(item.id==record.id){
                             item.bid==e.target.value*1
@@ -990,7 +1022,7 @@ export default {
             this.offerPriceVisiable = false;
             console.log(this.inputValue);
             if(this.modifyRulesValue=='separately'){
-                
+
                 let batchArr=[...this.xiugaiData];
                 let changeZiduan=''
                 if(this.typeValue=='预算'){
@@ -1013,13 +1045,13 @@ export default {
                     })
                     this.batchEditHttp('budget',batchArr)
                 }
-                
+
             }
-            
+
             this.modifyTableData=[];
             this.selectedRowKeys=[]
-            
-            
+
+
         },
         batchEditHttp(type,params){
             postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
@@ -1065,27 +1097,69 @@ export default {
 
         onCellChange(key, dataIndex, value) {
             console.log(key, dataIndex, value)
-            const dataSource = [...this.data];
-            const target = dataSource.find(item => item.key === key);
-            if (target) {
-                target[dataIndex] = value;
-                console.log(target)
-                //单独修改预算
-                if(this.tabkey=='group'){
-                    if(dataIndex=='name'){
-                        postAction('/ctop/byteDanceCampaign/edit',{
-                            accountId:this.accountID,
-                            id:key,
-                            campaignName:value,
-                        }).then((res)=>{
+            
+                const dataSource = [...this.data];
+                const target = dataSource.find(item => item.key === key);
+                if (target) {
+                    target[dataIndex] = value;
+                    console.log(target)
+                    //单独修改预算
+                    if(this.tabkey=='group'){
+                        if(dataIndex=='name'){
+                            postAction('/ctop/byteDanceCampaign/edit',{
+                                accountId:this.accountID,
+                                id:key,
+                                campaignName:value,
+                            }).then((res)=>{
+                                console.log(res);
+                                if(res.success){
+                                    this.data=dataSource
+                                    this.$message.success(res.message)
+                                }else{
+                                    this.$message.error(res.message)
+                                    this.data=[];
+                                    this.refreshCampaignList({
+                                        accountId:this.accountID,
+                                        name:this.optionId,
+                                        status:this.statusValue,
+                                        startDate:this.dateString[0],
+                                        endDate:this.dateString[1],
+                                        pageNo:this.ipagination.current
+                                    })
+                                }
+                            })
+                        }else if(dataIndex=='budget'){
+                            postAction('/ctop/byteDanceCampaign/edit',{
+                                accountId:this.accountID,
+                                id:key,
+                                budget:value,
+                            }).then((res)=>{
+                                console.log(res);
+                                if(res.success){
+                                    // this.data = dataSource;
+                                    target[dataIndex] = value;
+                                    this.$message.success({
+                                        content:res.message,
+                                        duration:2
+                                    })
+                                }else{
+                                    this.$message.error({
+                                        content:res.message,
+                                        duration:2
+                                    })
+                                }
+                            })
+                        }
+
+                    }else if(this.tabkey=='plan'){
+                        postAction('/ctop/byteDanceAdvertisePlan/edit',target).then((res)=>{
                             console.log(res);
                             if(res.success){
-                                this.data=dataSource
-                                this.$message.success(res.message)
+                                this.data = dataSource;                      
+                                this.$message.success('修改成功!')
                             }else{
-                                this.$message.error(res.message)
-                                this.data=[];
-                                this.refreshCampaignList({
+                                this.$message.error(res.message);
+                                this.getplanList({
                                     accountId:this.accountID,
                                     name:this.optionId,
                                     status:this.statusValue,
@@ -1095,53 +1169,13 @@ export default {
                                 })
                             }
                         })
-                    }else if(dataIndex=='budget'){
-                        postAction('/ctop/byteDanceCampaign/edit',{
-                            accountId:this.accountID,
-                            id:key,
-                            budget:value,
-                        }).then((res)=>{
-                            console.log(res);
-                            if(res.success){
-                                // this.data = dataSource;
-                                target[dataIndex] = value;
-                                this.$message.success({
-                                    content:res.message,
-                                    duration:2
-                                })
-                            }else{
-                                this.$message.error({
-                                    content:res.message,
-                                    duration:2
-                                })
-                            }
-                        })
+                    }else if(this.tabkey=='idea'){
+
                     }
-                    
-                }else if(this.tabkey=='plan'){                   
-                    postAction('/ctop/byteDanceAdvertisePlan/edit',target).then((res)=>{
-                        console.log(res);
-                        if(res.success){
-                            this.data = dataSource;                      
-                            this.$message.success('修改成功!')
-                        }else{
-                            this.$message.error(res.message);
-                            this.getplanList({
-                                accountId:this.accountID,
-                                name:this.optionId,
-                                status:this.statusValue,
-                                startDate:this.dateString[0],
-                                endDate:this.dateString[1],
-                                pageNo:this.ipagination.current
-                            })
-                        }
-                    })
-                }else if(this.tabkey=='idea'){
+
 
                 }
-                
-                
-            }
+            
             console.log(this.data)
         },
 
@@ -1182,13 +1216,13 @@ export default {
                 this.data=[]
                 console.log(res)
                 if(res.success){
-                    
+
                     this.ipagination.total = res.result.total
                     this.loading = false
                     res.result.records.forEach((item)=>{
                         item.key=item.id
                     })
-                    
+
                     this.data = res.result.records;
                     console.log(this.data)
                     this.selectedRowKeys=[];
@@ -1221,14 +1255,14 @@ export default {
                     // console.log(res);
                     if(res.result){
                         res.result.forEach((element,index) => {
-                        if(element){                  
-                            this.treeData.push({});                    
+                        if(element){
+                            this.treeData.push({});
                             this.treeData[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
                             this.treeData[index].value='project'+element.project.projectId;
                             this.treeData[index].key=element.project.projectId;
                             this.treeData[index].mediaId=element.project.mediaId;
                             this.treeData[index].children=[];
-                                                
+
                             if(element.account.length){
                             element.account.forEach((ele,i)=>{
                                 this.treeData[index].children.push({});
@@ -1236,12 +1270,12 @@ export default {
                                 this.treeData[index].children[i].value=ele.accountId;
                                 this.treeData[index].children[i].key=ele.accountId;
                             })
-                                
-                            }                           
-                        }      
+
+                            }
+                        }
                         });
                         // console.log(this.treeData)
-                        
+
                     }
             }
             })
@@ -1249,7 +1283,7 @@ export default {
     },
     mounted() {
         console.log(this);
-      
+
         // let params = {}
         // // this.dateString=[moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
         // //初始

+ 4 - 1
src/views/modules/BatchCreate/crowedPackage.vue

@@ -619,7 +619,10 @@ export default {
             }
             
         }
-    }
+    },
+    mounted() {
+        
+    },
 }
 </script>
 <style lang="scss">

+ 2 - 2
src/views/modules/BatchCreate/editableCell.vue

@@ -10,7 +10,7 @@
         </div>
         <div v-else class="editable-cell-text-wrapper">
           <span v-if="slotName=='budget'">{{ value*1? `日预算:${value*1}` :value }}</span>
-          <span v-if="slotName=='bid'">{{ value*1? `日出价:${value*1}` :value }}</span>
+          <span v-if="slotName=='bid'">{{ value*1? `${value*1}` :value }}</span>
           <span v-if="slotName=='name'">{{value}}</span>
           <a-icon type="edit" class="editable-cell-icon" @click="edit" />
         </div>
@@ -40,7 +40,7 @@
             blurChange(e) {
               console.log(e)
               const value = e.target.value;
-              if(this.slotName=='groupBudget'){
+              if(this.slotName=='budget'){
                 if(this.value*1){
                   if(value*1 && value*1>300 &&value*1<9999999.99){
                     this.value = value;

+ 15 - 28
src/views/modules/BatchCreate/newCreate.vue

@@ -177,7 +177,7 @@
             </div>
             <div class="input-item">
               <a-form-item>
-                <a-input placeholder="请输入2-10个字的应用名," :maxLength='10' v-decorator="['appName']" />
+                <a-input placeholder="请输入2-10个字的应用名," :maxLength='10' v-decorator="['appName', {rules:validationRules.name}]" />
               </a-form-item>
             </div>
           </div>
@@ -357,8 +357,7 @@
       </div>
     </a-form>
       <div class="infoModal">
-         <a-modal v-model="visible" title="提示
-         "  @ok="handleOk">
+         <a-modal v-model="visible" title="提示"  @ok="handleOk">
             <ul>
               <li v-for="(item,index) in errorInfo" :key="index">
                   <span>第{{index+1}}条:</span>{{item.message}}
@@ -424,14 +423,21 @@
         form: this.$form.createForm(this),
         positionvalue: undefined,
         validationRules: {
-          url: [{
+          url: [         
+            {          
               required: true,
-              message: '下载链接必须填写',
-            },
-            {
               validator: this.validateURL,
             },
           ],
+          name:[{
+            required: true,
+            message:'应用名必须填写',
+          }],
+          bid:[{
+            required: true,
+            message:'出价信息必须填写',
+            // validator: this.validateBid,
+          }]
         },
         createType: undefined, //创意分类的页面
         createOptions: [], //创意分类的数组
@@ -577,23 +583,6 @@
           )
 
           console.log(dataCreatives, this.$refs.material.titleData)
-
-          //   "inventoryType": ["", "按媒体指定位置"],
-          //   "smartInventory": "类型数字:是否优选广告位 0,1",
-          //   "sceneInventory": "场景广告位",
-          //   "adKeywords": ["单个最多10个字符", "最多20个", "创意标签"],
-          //   "thirdIndustryId": "10,数字类型,创意分类",   最后id
-          //   "creativeDisplayMode": "创意展现方式:CREATIVE_DISPLAY_MODE_CTR(优选)CREATIVE_DISPLAY_MODE_RANDOM(轮播)",
-          //   "trackUrl": "展示监测链接",
-          //   "actionTrackUrl": "点击监测链接",
-          //   "videoPlayEffectiveTrackUrl": "视频有效播放监测链接",
-          //   "videoPlayDoneTrackUrl": "视频播放完毕监测链接",
-          //   "videoPlayTrackUrl": "视频播放监测链接",
-          //   "isCommentDisable": "数字类型 是否关闭评论0 开启 1关闭",
-          //   "closeVideoDetail": "数字类型,是否关闭视频详情页落地页 0,1",
-          //   "generateDerivedAd": "数字类型,是否开启衍生计划 0,1 默认0不开启",
-          //   "source": "广告来源 landType=app &&downloadType=EXTERNAL_URL 时必填",
-          //   "appName": "应用名 当计划 download_type为DOWNLOAD_URL时, 必填"
           this.form.validateFieldsAndScroll((err, values) => {
             if (!err) {
               var params = {
@@ -620,10 +609,8 @@
                   values.smartInventory=1;                 
                 } else if (this.adposition == 'inventoryTypes') {
                   values.inventoryType=this.checkedList
-                } else if (this.adposition == 'sceneInventorys') {
-                  
-                  values.sceneInventory=this.sceneInventory
-                  
+                } else if (this.adposition == 'sceneInventorys') {                 
+                  values.sceneInventory=this.sceneInventory                 
                 }
                 values.adKeywords=this.createTipList;
 

+ 112 - 100
src/views/modules/BatchCreate/newPlan.vue

@@ -234,93 +234,99 @@
                   
                 </a-radio-group>
               </a-form-item>
-              <!-- 应用推广下的转化目标 -->
-              <div v-if="isShowConversionTarget&&groupInfo.landingType=='APP'">
-                <div class="row-item">
-                  <div class="hint-item"></div>
-                  <div class="label-item">
-                    <div class="text-item">转化跟踪方式</div>
-                    <div class="required-item"></div>
-                  </div>
-                  <div class="input-item">
-                    <a-form-item>
-                      <a-radio-group v-model="convertType"   @change="convertTypeChange">
-                        <a-radio-button v-for="item in convertList" :key="item.convert_type" v-show="item.external_actions.length>0" :value='item.convert_type' >
-                          {{item.convert_name}}</a-radio-button>
-                      </a-radio-group>                     
-                    </a-form-item>
-                  </div>
-                </div>
-                <div class="row-item" v-if="convertType">
-                  <div class="hint-item"></div>
-                  <div class="label-item">
-                    <div class="text-item">选择转化目标</div>
-                    <div class="required-item"></div>
-                  </div>
-                  <div class="input-item">
-                    <a-form-item>
-                      <a-radio-group                       
-                        v-show="convertType=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'"
-                        @change="externalActionsChange"
-                      > 
-                        <a-radio-button v-for="item in currentConvertType.external_actions" :key="item.external_action" :value="item.external_action">
-                          {{item.external_name}}</a-radio-button>
-                      </a-radio-group>
-                      <a-select  style="width: 335px" v-show="convertType=='AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD'"  @change="APIChange">
-                        <a-select-option v-for="item in currentConvertType.external_actions" :key="item.external_action" :value='item.external_action'>
-                          {{item.external_name}}
-                        </a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </div>
-                </div>
-              </div>
-              <!--  线索收集下的转化目标 -->
-              <div v-if="isShowConversionTarget&&groupInfo.landingType=='LINK'">
-                <div class="row-item">
-                  <div class="hint-item"></div>
-                  <div class="label-item">
-                    <div class="text-item">转化跟踪方式</div>
-                    <div class="required-item"></div>
-                  </div>
-                  <div class="input-item">
-                    <a-form-item>
-                      <a-radio-group v-model="convertType"   @change="convertTypeChange">
-                        <a-radio-button v-for="item in convertList" :key="item.convert_type" v-show="item.external_actions.length>0" :value='item.convert_type' >
-                          {{item.convert_name}}</a-radio-button>
-                      </a-radio-group>                     
-                    </a-form-item>
-                  </div>
-                </div>
-                <div class="row-item" v-if="convertType">
-                  <div class="hint-item"></div>
-                  <div class="label-item">
-                    <div class="text-item">选择转化目标</div>
-                    <div class="required-item"></div>
-                  </div>
-                  <div class="input-item">
-                    <a-form-item>
-                      <!-- <a-radio-group                       
-                        v-show="convertType=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'"
-                        @change="externalActionsChange"
-                      > 
-                        <a-radio-button v-for="item in currentConvertType.external_a
-                        ctions" :key="item.external_action" :value="item.external_action">
-                          {{item.external_name}}</a-radio-button>
-                      </a-radio-group> -->
-                      <a-select  style="width: 335px" v-show="convertType=='AD_CONVERT_SOURCE_TYPE_INTERNAL'"  @change="APIChange" placeholder="请选择转化目标">
-                        <a-select-option v-for="item in currentConvertType.external_actions" :key="item.external_action" :value='item.external_action'>
-                          {{item.external_name}}
-                        </a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </div>
-                </div>
+              
+
+              <div >
+                
               </div>
+             
+              
               
             </div>
           </div>
-          <div class="row-item" v-show="getFormData('downloadType')=='DOWNLOAD_URL'">
+          <!-- 应用推广下的转化目标 -->
+          <div class="row-item" v-if="isShowConversionTarget&&groupInfo.landingType=='APP'">
+            <div class="hint-item"></div>
+            <div class="label-item">
+              <div class="text-item">转化跟踪方式</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+              <a-form-item>
+                <a-radio-group v-model="convertType"   @change="convertTypeChange">
+                  <a-radio-button v-for="item in convertList" :key="item.convert_type" v-show="item.external_actions.length>0" :value='item.convert_type' >
+                    {{item.convert_name}}</a-radio-button>
+                </a-radio-group>                     
+              </a-form-item>
+            </div>
+          </div>
+          <div class="row-item"  v-if="isShowConversionTarget&&groupInfo.landingType=='APP'&&convertType">
+            <div class="hint-item"></div>
+            <div class="label-item">
+              <div class="text-item">选择转化目标</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+              <a-form-item>
+                <a-radio-group                       
+                  v-show="convertType=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'"
+                  @change="externalActionsChange"
+                > 
+                  <a-radio-button v-for="item in currentConvertType.external_actions" :key="item.external_action" :value="item.external_action">
+                    {{item.external_name}}</a-radio-button>
+                </a-radio-group>
+                <a-select  style="width: 335px" v-show="convertType=='AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD'"  @change="APIChange">
+                  <a-select-option v-for="item in currentConvertType.external_actions" :key="item.external_action" :value='item.external_action'>
+                    {{item.external_name}}
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </div>
+          </div>
+           <!--  线索收集下的转化目标 -->
+          
+          <div class="row-item" v-if="isShowConversionTarget&&groupInfo.landingType=='LINK'">
+            <div class="hint-item"></div>
+            <div class="label-item">
+              <div class="text-item">转化跟踪方式</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+              <a-form-item>
+                <a-radio-group v-model="convertType"   @change="convertTypeChange">
+                  <a-radio-button v-for="item in convertList" :key="item.convert_type" :value='item.convert_type' >
+                    {{item.name}}</a-radio-button>
+                </a-radio-group>                     
+              </a-form-item>
+            </div>
+          </div>
+          <div class="row-item"  v-if="isShowConversionTarget&&groupInfo.landingType=='LINK'&&convertType">
+            <div class="hint-item"></div>
+            <div class="label-item">
+              <div class="text-item">选择转化目标</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+              <a-form-item>
+                <!-- <a-radio-group                       
+                  v-show="convertType=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'"
+                  @change="externalActionsChange"
+                > 
+                  <a-radio-button v-for="item in currentConvertType.external_a
+                  ctions" :key="item.external_action" :value="item.external_action">
+                    {{item.external_name}}</a-radio-button>
+                </a-radio-group> -->
+                <a-select  style="width: 335px" v-show="convertType=='AD_CONVERT_SOURCE_TYPE_INTERNAL'&&currentConvertType.external_actions.length>0"  @change="APIChange" placeholder="请选择转化目标">
+                  <a-select-option v-for="item in currentConvertType.external_actions"   :key="item.external_action" :value='item.external_action'>
+                    {{item.external_name}}
+                  </a-select-option>
+                </a-select>
+                <span v-show="currentConvertType.external_actions.length==0">暂无数据,可去后台新建</span>
+              </a-form-item>
+            </div>
+          </div>
+         
+          <div class="row-item" v-if="getFormData('downloadType')=='DOWNLOAD_URL'">
             <div class="hint-item"></div>
             <div class="label-item">
               <div class="text-item">应用包名</div>
@@ -890,22 +896,22 @@ export default {
           })).then(res=>{
             console.log(res)
             if(res.success){
-              if(res.result.data){
-                  res.result.data.list.forEach((item)=>{
-                    if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'){
-                      item.convert_name='普通应用下载'
-                    }
-                    if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_SDK'){
-                      item.convert_name='应用下载SDK'
-                    }
-                    if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD'){
-                      item.convert_name='应用下载API'
-                    }
-                    if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_INTERNAL'){
-                      item.convert_name='线索通'
-                    }
-                  })
-              }
+              // if(res.result.data){
+              //     res.result.data.list.forEach((item)=>{
+              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_NORMAL_APP_DOWNLOAD'){
+              //         item.convert_name='普通应用下载'
+              //       }
+              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_SDK'){
+              //         item.convert_name='应用下载SDK'
+              //       }
+              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_APP_DOWNLOAD'){
+              //         item.convert_name='应用下载API'
+              //       }
+              //       if(item.convert_type=='AD_CONVERT_SOURCE_TYPE_INTERNAL'){
+              //         item.convert_name='线索通'
+              //       }
+              //     })
+              // }
               this.convertList=[];
               this.convertList=res.result.data.list;
               this.isShowConversionTarget = true
@@ -1128,7 +1134,12 @@ export default {
                       this.$router.replace(`/modules/BatchCreate/newCreate`)
                     },2000)
                   }else{
-                    this.$message.error(res.message)
+                    if(res.message='convert_id is required'){
+                        this.$message.error('转化方式必须选择!')
+                    }else{
+                      this.$message.error(res.message)
+                    }
+                    
                   }
                  
                 } else {
@@ -1137,6 +1148,7 @@ export default {
               })
             }else{
               console.log(err)
+              this.$message.error(err)
             }
           })
         }

+ 2 - 2
vue.config.js

@@ -57,7 +57,7 @@ module.exports = {
     proxy: {
       '/jeecg-boot': {
         // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
@@ -67,7 +67,7 @@ module.exports = {
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目 
         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目 
-        target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
 
 
         ws: false,