Browse Source

'提交一下修改'

魏志佳 4 years ago
parent
commit
84afc07e11

+ 1 - 1
src/views/modules/Statistics/KSAccountReport.vue

@@ -1341,7 +1341,7 @@ export default {
           }
       }else if(typeof val =='string'){
             return val
-        }
+      }
       else{
         return 0
       }    

+ 40 - 0
src/views/modules/autoLaunch/autoLaunchList.vue

@@ -0,0 +1,40 @@
+<template>
+
+        <component v-bind:is="currentTabComponent">
+
+        </component>
+    
+    
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+export default {
+    name:'index',
+    data() {
+        return {
+            currentTabComponent:'strategyList',
+            currentStrategyId:'',
+            currentPlanId:'',
+            currentGroupId:'',
+        }
+    },
+    components:{   
+        strategyList: () => import('./strategyList'), 
+        planList: () => import('./planList'), 
+        groupList: () => import('./groupList'), 
+        previewStrategy: () => import('./previewStrategy'), 
+        
+    },
+
+    mounted(){
+       this.currentTabComponent='strategyList' 
+    },
+    beforeDestroy() {
+        this.currentTabComponent='strategyList' 
+    },
+   
+}
+
+</script>

+ 5 - 5
src/views/modules/autoLaunch/radioCheck.vue

@@ -65,7 +65,7 @@ export default {
     methods: {
         //单选多选的事件
         radioCheckChange(e,item){
-            console.log(e.target,item,!item.disabled);
+            // console.log(e.target,item,!item.disabled);
             
             this.currentSelect=e.target.value;
             if(!item.disabled){
@@ -78,11 +78,11 @@ export default {
                         this.selectValue.splice(0,1)
                     }
                     
-                    if(this.selectValue.indexOf(e.target.value)==-1){
-                        this.selectValue.push(e.target.value)
-                    }else if(this.selectValue.indexOf(e.target.value)>-1){
+                    if(this.selectValue.indexOf(item.value)==-1){
+                        this.selectValue.push(item.value)
+                    }else if(this.selectValue.indexOf(item.value)>-1){
                         this.selectValue=this.selectValue.filter((item)=>{
-                            return item!=e.target.value
+                            return item!=item.value
                         })  
                     }
 

+ 13 - 0
src/views/modules/autoLaunch/createStrategy.vue

@@ -340,6 +340,19 @@ export default {
     this.strategyName ='[策略]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
 
     
+    this.$nextTick(()=>{
+      if(this.$parent.strategyInfo.accountId){
+          this.form.setFieldsValue(
+            {
+              ...this.$parent.strategyInfo
+            }
+          )
+          this.accountId=this.$parent.strategyInfo.accountId
+          this.strategyName=this.$parent.strategyInfo.strategyName
+      }
+    })
+
+    
   },
 }
 </script>

+ 965 - 0
src/views/modules/autoLaunch/groupList.vue

@@ -0,0 +1,965 @@
+<template>
+    <div class="toutiaoBatch">
+        <div>
+            <p class="breadcrumb">
+                <a-breadcrumb style="display:block;width:100%">
+                    <a-breadcrumb-item ><span class="muen" @click="goStrategyList()">策略列表</span></a-breadcrumb-item>
+                    <a-breadcrumb-item><span class="muen" @click="goPlanList()">计划列表</span></a-breadcrumb-item>
+                    <a-breadcrumb-item>组列表</a-breadcrumb-item>
+                </a-breadcrumb>
+            </p>
+        </div>
+        
+        <div class="toolbox-automate-rules-create-content_title"><h3>广告组</h3></div>
+        
+        <div class="topOptions">
+            
+            <span class="OptinItem">
+                <a-select  style="width: 200px" v-model="groupStatus" @change="statusChange" placeholder="请选择组状态">
+                    <a-select-option value="" >
+                        不限
+                    </a-select-option>
+                   <a-select-option :value="1" >
+                        投放中
+                    </a-select-option>
+                    <!-- <a-select-option value="2" >
+                        超预算
+                    </a-select-option>
+                    <a-select-option value="3">
+                        余额不足
+                    </a-select-option> -->
+                    <a-select-option :value="0">
+                        已关停
+                    </a-select-option>
+                </a-select>
+            </span>
+
+            <span class="OptinItem">
+                <a-input-search placeholder="组名称" v-model="groupName" style="width: 300px"  />
+            </span>
+            <span class="OptinItem">
+                <a-input-search placeholder="组ID" v-model="groupId" style="width: 300px"  />
+            </span>
+           
+            <span class="optionBtn">
+                <a-button type='primary' @click="search" class="searchBtn">查询</a-button>
+                <!-- <a-button type='default' @click="reset">重置</a-button> -->
+            </span>
+        </div>
+        <div class="tableArea">
+            <div class="tableOption">
+                <span class="OptinItem">
+                    <a-tooltip>
+                        <template slot="title" >
+                            这里可以批量启动、暂停、删除你的选择哦~
+                        </template>
+                        <!-- <a-button type="link" @click="changeSelectStatus">批量操作</a-button> -->
+                        <span >批量操作:</span>
+                    </a-tooltip>
+                </span>
+                <span class="OptinItem">
+                    <a-select  style="width: 120px" @change="optChange" v-model="optValue" placeholder="请选择批量操作" :disabled='selectedRowKeys.length<=0'>
+                        <a-select-option value="open" >
+                            启动
+                        </a-select-option>
+                        <a-select-option value="pause">
+                            暂停
+                        </a-select-option>
+                        <a-select-option value="delete">
+                            删除
+                        </a-select-option>
+                    </a-select>
+                </span>
+                 <span class="OptinItem">
+                    <a-popconfirm
+                        title="确定要删除选择的内容吗?"
+                        ok-text="删除"
+                        cancel-text="取消"
+                        @confirm="confirm"
+                        @cancel="cancel"
+                        v-if="optValue=='delete'"
+                    >
+                        <a-button type='primary' @click="isOkHandle" class="ok">确定</a-button>
+                    </a-popconfirm>
+                    <a-button type='primary' @click="isOkHandle" class="ok" v-else>确定</a-button>
+
+                 </span>
+                
+            </div>
+            <div class="table">
+                <a-table
+                    :columns="columns"
+                    :data-source="data"
+                    :rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
+                    bordered
+                    :pagination="ipagination"
+                    :loading="loading"
+                    @change="sort"
+                    :scroll="{'x':scrollX}"
+                    
+                >
+                   
+                    <span slot="campaignStatus" slot-scope="text,record">
+                        <a-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>    
+                        
+                    </span>
+
+                    <span slot="createStatus" slot-scope="text,record">
+                         <a-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>
+                        
+                    </span>
+                    <span slot="planStatus" slot-scope="text,record">
+                        <a-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>
+                        
+                    </span>
+                   
+                    <span slot="createImg" slot-scope="text,record">
+                        
+                        <a-popover placement="right">
+                            <template slot="content">
+                                
+                                <video :src="record.videoId_dictText" style="width:250px" controls  ></video>
+                            </template>
+                            <template slot="title">
+                           
+                            </template>
+                            
+                            <img :src="record.imageId_dictText" alt="" style="width:100px">
+                        </a-popover>
+                        
+                    </span>
+                    
+                    <span slot="parentGroup" slot-scope="text">
+                        <a href="javascript:;" >{{text}}</a>
+                    </span>
+                    <span slot="parentPlan" slot-scope="text">
+                        <a href="javascript:;" >{{text}}</a>
+                    </span>
+                    <span slot="time" slot-scope="text,record">
+                        {{record.startTime}}至{{record.endTime}}
+                    </span>
+                    
+                </a-table>
+            </div>
+        </div>
+        
+       
+              
+    <!-- </a-spin> -->
+    </div>
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+// import { JeecgListMixin } from '@/mixins/ipagination'
+// import editableCell from './editableCell'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+import qs from 'qs'
+let typeValue='预算'
+
+
+
+const groupColumns = [
+  {
+    title: '开关',
+    dataIndex: 'campaignStatus',
+    key: 'campaignStatus',
+    align: 'center',
+    scopedSlots: { customRender: 'campaignStatus' },
+    fixed: 'left' ,
+  },
+  {
+    title: '广告组名称',
+    dataIndex: 'name',
+    key: 'name',
+    align: 'center',
+    scopedSlots: { customRender: 'name' },
+    fixed: 'left' ,
+  },
+  {
+    title: '广告组ID',
+    dataIndex: 'namde',
+    key: 'namde',
+    align: 'center',
+    scopedSlots: { customRender: 'namde' },
+    fixed: 'left' ,
+  },
+  
+  {
+    title: '所属计划',
+    dataIndex: 'campaignCreateTime',
+    key: 'campaignCreateTime',
+    align: 'center',
+    scopedSlots: { customRender: 'campaignCreateTime' },   
+  },
+  {
+    title: '状态',
+    dataIndex: 'campaignCreateTime',
+    key: 'campaignCreateTime',
+    align: 'center',
+    scopedSlots: { customRender: 'campaignCreateTime' },    
+  },
+ 
+];
+
+const publicColumns = [
+    {
+          title: '消耗(元)',
+          dataIndex: 'cost',
+          width:150,
+          tip: '广告在投放期间的花费总额',
+          align: 'center',
+          scopedSlots: { customRender: 'cost' },
+          sorter: () => {}
+        },
+        {
+          title: '封面曝光数',
+          dataIndex: 'photoShow',
+          tip: '广告在瀑布流被观看次数',
+          align: 'center',       
+          scopedSlots: { customRender: 'photoShow' },
+          sorter:() => {}
+        },
+        {
+          title: '封面点击数',
+          dataIndex: 'photoClick',
+          tip: '用户点击封面进入视频播放页的次数(数据会进行反作弊去重)',
+          align: 'center',
+        
+          scopedSlots: { customRender: 'photoClick' },
+          sorter: () => {}
+        },
+        {
+          title: '素材曝光数',
+          dataIndex: 'aClick',
+          tip: '用户进入视频播放页观看的次数(数据会进行反作弊去重)',
+          align: 'center',
+       
+          scopedSlots: { customRender: 'aClick' },
+          sorter:() => {}
+        },
+        {
+          title: '行为数',
+          dataIndex: 'bClick',
+          tip: '用户在视频播放页单击转化按钮的次数/展示数*100%',
+          align: 'center',
+        
+          scopedSlots: { customRender: 'bClick' },
+          sorter:() => {}
+        },
+        {
+          title: '封面点击率',
+          dataIndex: 'clickRate',
+          tip: '封面点击数占封面展示数百分比',
+          align: 'center',    
+          scopedSlots: { customRender: 'clickRate' },
+          sorter:() => {}
+        },
+        {
+          title: '行为率',
+          dataIndex: 'bClickRate',
+          tip: '行为数占素材曝光数百分比',
+          align: 'center',    
+          scopedSlots: { customRender: 'bClickRate' },
+          sorter:() => {}
+        },
+        {
+          title: '平均千次封面曝光花费(元)',
+          dataIndex: 'cpm',
+          tip: '花费/封面曝光数*1000',
+          align: 'center',    
+          scopedSlots: { customRender: 'cpm' },
+          sorter:() => {}
+        },
+        {
+          title: '平均封面点击单价(元)',
+          dataIndex: 'cpc',
+          tip: '花费/封面点击数',
+          align: 'center',    
+          scopedSlots: { customRender: 'cpc' },
+          sorter:() => {}
+        },
+        {
+          title: '平均行为单价(元)',
+          dataIndex: 'cpb',
+          tip: '总花费/行为数',
+          align: 'center',    
+          scopedSlots: { customRender: 'cpb' },
+          sorter:() => {}
+        },
+        {
+          title: '激活数',
+          dataIndex: 'active',
+          tip: '广告主回传的应用激活次数',
+          align: 'center',    
+          scopedSlots: { customRender: 'active' },
+          sorter:() => {}
+        },
+        {
+          title: '激活单价',
+          dataIndex: 'activeCost',
+          tip: '花费/激活数',
+          align: 'center',    
+          scopedSlots: { customRender: 'activeCost' },
+          sorter:() => {}
+        },
+        {
+          title: '下载完成激活率',
+          dataIndex: 'activeRate',
+          tip: '激活数/安卓下载完成数',
+          align: 'center',    
+          scopedSlots: { customRender: 'activeRate' },
+          sorter:() => {}
+        },
+        {
+          title: '注册数',
+          dataIndex: 'register',
+          tip: '付费金额/当日消耗',
+          align: 'center',    
+          scopedSlots: { customRender: 'register' },
+          sorter:() => {}
+        },
+        {
+          title: '注册成本',
+          dataIndex: 'activeRegisterCost',
+          tip: '当日消耗/当日回传注册数',
+          align: 'center',    
+          scopedSlots: { customRender: 'activeRegisterCost' },
+          sorter:() => {}
+        },
+        {
+          title: '注册率',
+          dataIndex: 'activeRegisterRate',
+          tip: '当日回传注册数/当日激活数',
+          align: 'center',    
+          scopedSlots: { customRender: 'activeRegisterRate' },
+          sorter:() => {}
+        },
+        {
+            title: '次留数',
+            dataIndex: 'nextDayOpen',
+            tip: '前一日激活用户在次日继续访问的PV',
+            align: 'center',    
+            scopedSlots: { customRender: 'nextDayOpen' },
+            sorter:() => {}
+        },
+        
+        {
+            title: '次留率',
+            dataIndex: 'nextDayOpenRate',
+            tip: '前一日激活用户在次日继续访问的PV/前一日激活数',
+            align: 'center',    
+            scopedSlots: { customRender: 'nextDayOpenRate' },
+            sorter:() => {}
+        },
+]
+
+export default {
+    name:'group-list',
+    components: {
+        // editableCell,
+        Treeselect,
+    },
+    // mixins: [JeecgListMixin],
+    data() {
+        return {
+            groupId:'',
+            groupName:'',
+            groupStatus:undefined,
+            scrollX:3500,
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                //   pageSizeOptions: ['10', '20', '30'],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条"
+                },
+                showQuickJumper: true,
+                showSizeChanger:true,
+                pageSizeOptions: ['10', '30', '50'],
+                total: 0,
+                onChange: (current, pageSize) => {
+                    // 切换分页时的回调,
+                    // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                    this.ipagination.current = current;
+                    this.ipagination.pageSize= pageSize;
+                }
+            },
+            currentGroup:{},
+            currentPlan:{},           
+
+            spinning:false,
+            moment,
+           
+            accountID:undefined,
+            openID:undefined,
+            treeData:[],
+            // account:'',//媒体账号
+            optionId:'',//input输入的id或关键词
+            statusValue:undefined,
+            dateValue:[],//日期选择框选择
+            dateString:[],//--我赋值的是dateString
+            tabkey:'group',//tab选中的页
+            selectDisable:true,
+            optValue:'',//操作设置的值 删除 暂停 开启
+            visible: false,//出价里的弹出框
+            
+            
+           
+            //主页的表格
+            data:[],
+            columns:[...strategyColumns,...publicColumns],
+            selectedRowKeys:[],
+            selectedRows:[],
+            loading:false,
+            editID:0,
+            
+
+
+            
+            url: {
+                campaignList: "/ctop/byteDanceCampaign/list",
+                planList: "/kuaishou/batch/getUnitList",
+                creativeList: "/ctop/byteDanceCreative/list",
+          
+                strategyList:'/jeecg-boot/kuaishouStrategy/list'
+
+            },
+
+
+            xiugaiData:[],//存分别修改时候的数组
+        }
+    },
+    computed: {
+        rowSelection(){
+            return {
+                onChange: (selectedRowKeys, selectedRows) => {
+                    // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
+                    this.selectedRowKeys=selectedRowKeys;
+                    this.selectedRows=selectedRows;
+                },
+                onSelect: (record, selected, selectedRows) => {
+                    // console.log(record, selected, selectedRows);
+                    this.modifyTableData=selectedRows;
+
+                    this.selectedRows=selectedRows;
+                },
+                onSelectAll: (selected, selectedRows, changeRows) => {
+                    // console.log(selected, selectedRows, changeRows);
+                    this.modifyTableData=selectedRows
+                    this.selectedRows=selectedRows;
+                },
+            }
+
+        },
+    },
+    methods: {
+        goStrategyList(){
+            this.$parent.currentTabComponent='strategyList';
+            this.$parent.currentStrategyId='';
+            this.$parent.currentPlanId='';
+            this.$parent.currentGroupId='';
+
+        },
+        goPlanList(){
+            this.$parent.currentTabComponent='strategyList';
+            this.$parent.currentGroupId='';
+
+        },
+        
+        
+
+       
+        //状态改变
+        statusChange(value){
+            console.log(value);
+
+        },
+        //日期改变
+        dateChange(date, dateString) {
+            console.log(date, dateString);
+            this.dateString=dateString;
+        },
+        disabledDate(current) {
+            // console.log(current)
+            return current && current > moment().subtract(1, 'day')
+        },
+        
+        //查询按钮事件
+        search(){
+           this.getGroupList() 
+        },
+        //点击分页
+        sort(pagination, filters, sorter, { currentDataSource }){
+            
+            this.ipagination.current=pagination.current;
+
+            this.ipagination.pageSize=pagination.pageSize;
+            this.search()
+        },
+      
+        //状态改变
+        switchChange(text,record){
+            // this.spinning=true;
+            console.log(text,record);
+            let recordData=JSON.parse(JSON.stringify(record))
+            record.spin=true;
+            if(this.tabkey=='group'){
+                let ids=record.id;
+                let status=text?'disable':'enable';
+                postAction('/ctop/byteDanceCampaign/editStatus',qs.stringify({
+                    accountId:this.accountID,
+                    ids:`${ids}`,
+                    status:status,
+                })).then((res)=>{
+                    //    console.log(res);
+                        // this.spinning=false;
+                        record.spin=false;
+                    if(res.success){
+                        this.refreshCampaignList({
+                                accountId:this.accountID,
+                                name:this.optionId,
+                                status:this.statusValue,
+                                startDate:this.dateString[0],
+                                endDate:this.dateString[1],
+                                pageNo:this.ipagination.current,
+                                pageSize:this.ipagination.pageSize,
+                                
+                            })
+                        this.$message.success(res.message)
+                    }else{
+                        this.$message.error(res.message)
+                    }
+                })
+            }else if(this.tabkey=='plan'){
+
+                if(text){
+                    recordData.optStatus='AD_STATUS_DISABLE';
+                }else{
+                    recordData.optStatus='AD_STATUS_ENABLE'
+                }
+                this.batchEditHttp('status',[recordData])
+
+            }
+        },
+
+
+        //改变批量操作的按钮
+        changeSelectStatus(){
+            this.selectDisable=false;
+        },
+        //批量操作下的启动 删除 暂停
+        optChange(value){
+            // console.log(value)
+            this.optValue=value;
+        },
+        editGroupStatus(url){
+            let ids='';
+            this.selectedRows.forEach((item,index)=>{
+                if(index==0){
+                    ids=`${item.id}`
+                }else{
+                        ids+=`,${item.id}`
+                }
+
+            })
+            let status=''
+            if(this.optValue=='pause'){
+                status='disable'
+            }else if(this.optValue=='open'){
+                status='enable'
+            }else if(this.optValue=='delete'){
+                status='delete'
+            }
+            postAction(url,qs.stringify({
+                accountId:this.accountID,
+                ids,
+                status,
+            })).then((res)=>{
+                console.log(res);
+                // this.loading=false
+                this.optValue=undefined;
+                if(res.success){
+                    this.$message.success(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,
+                        pageSize:this.ipagination.pageSize,
+                    })
+                }else{
+                    this.loading=false
+                    // if(this.selectedRows.length>0){
+                    //     this.selectedRows.forEach(item=>{
+                    //         item.spin=false;
+                    //     })
+                    // }
+                    this.selectedRowKeys=[];
+                    this.selectedRows=[];
+                    this.optValue=undefined;
+                    this.$message.error(res.message)
+                }
+                
+                
+                
+            })
+        },
+        //批量操作的确定按钮
+        isOkHandle(){
+            console.log(this.optValue&&this.selectedRowKeys.length>0)
+            if(this.optValue&&this.selectedRowKeys.length>0){
+                // this.selectedRows.forEach(item=>{
+                //     item.spin=true;
+                // })
+            
+                if(this.optValue=='pause'){   
+                    this.loading=true;
+                    if(this.tabkey=='group'){
+                        console.log(this.selectedRows);                       
+                        this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
+
+                    }else if(this.tabkey=='plan'){
+                        // console.log(0)
+                        this.loading=true;
+                        if(this.selectedRowKeys.length>0){
+                            this.selectedRows.forEach((item)=>{
+                                item.optStatus='AD_STATUS_DISABLE'
+                            })
+                        }
+                        console.log(0)
+                        this.batchEditHttp('status',this.selectedRows)
+                    }else if(this.tabkey=='idea'){
+                        this.loading=true;
+                        this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
+                    }
+
+                }else if(this.optValue=='open'){
+                    this.loading=true;
+                    if(this.tabkey=='group'){
+                        this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
+                    }else if(this.tabkey=='plan'){
+                        if(this.selectedRowKeys.length>0){
+                            this.selectedRows.forEach((item)=>{
+                                item.optStatus='AD_STATUS_ENABLE'
+                            })
+                        }
+                        this.batchEditHttp('status',this.selectedRows)
+                    }else if(this.tabkey=='idea'){
+                         this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
+                    }
+
+                }
+              
+                // this.selectedRows=[];
+                // this.selectedRowKeys=[];
+                
+            }
+            
+        },
+        //确定删除
+        confirm(e) {
+            // console.log(e);
+                this.loading=true;
+                if(this.optValue=='delete'){
+                    
+                     if(this.tabkey=='group'){
+                         this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
+                    }else if(this.tabkey=='plan'){
+                        if(this.selectedRowKeys.length>0){
+                            this.selectedRows.forEach((item)=>{
+                                item.optStatus='AD_STATUS_DELETE'
+                            })
+                        }
+                        this.batchEditHttp('status',this.selectedRows)
+                        this.$message.success('删除成功');
+                    }else if(this.tabkey=='idea'){
+                        this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
+                    }
+
+                }
+
+
+
+        },
+        //取消删除
+        cancel(e) {
+            // console.log(e);
+            // this.$message.error('删除成功');
+        },
+
+        getGroupList(){
+
+            getAction(this.url.strategyList,{
+                planId:this.$parent.currentPlanId,
+                groupId:this.groupId,
+                groupName:this.groupName,
+                groupStatus:this.groupStatus==undefined?'':this.groupStatus,               
+                pageNo:this.ipagination.current,
+                pageSize:this.ipagination.pageSize
+            }).then((res)=>{
+                this.data=[]
+                console.log(res)
+                this.loading = false
+                if(res.success){
+
+                    this.ipagination.total = res.result.total
+                    
+                    res.result.records.forEach((item)=>{
+                        item.key=item.id
+                    })
+
+                    this.data = res.result.records.map(item=>{
+
+                        return {
+                            ...item,
+                            spin:false
+                        }
+                    });
+                    // console.log(this.data)
+                    this.selectedRowKeys=[];
+                }
+            })
+        },
+        
+    },
+    mounted() {
+       
+    },
+    
+    activated() {
+        // this.accountHttp()
+    },
+    beforeDestroy() {
+       
+       
+
+    },
+    filters: {
+        toPercentage(val) {
+            if(val){
+                if(typeof val != 'string'){
+                    return (val * 100).toFixed(2) + '%'
+                }else{
+                    return val
+                }
+            }else if(typeof val =='string'){
+                    return val
+                }
+            else{
+                return 0
+            }
+        },
+        //保留两位小数并且变成货币格式
+        decimalsHandle(val){
+
+            if(val && typeof val !='string'){
+                if(val>=0){
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0=str[0].split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return handleResult+'.'+str[1]
+                }else{
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0=str[0].substr(1).split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return '-'+handleResult+'.'+str[1]
+                }
+
+            }else if(typeof val =='string'){
+                return val
+            }
+            else{
+                return 0
+            }
+        },
+        //变成货币格式
+        formatCurrency(val){
+            if((val||val==0)&& typeof val !='string'){
+                let numberStr = val.toString()
+                let str = numberStr.split('').reverse()
+                for (let i = 0; i < str.length; i++) {
+                    if ((i + 1) % 4 === 0) {
+                    str.splice(i, 0, ',')
+                    }
+                }
+                str.reverse()
+                let handleResult = ''
+                for (let j = 0; j < str.length; j++) {
+                    handleResult += str[j]
+                }
+                return handleResult
+            }else if(typeof val =='string'){
+                    return val
+            }
+            else{
+                return '-'
+            }
+
+        }
+    }
+}
+</script>
+<style lang="scss">
+    #closeIcon{
+         color: #0E74D2;
+    }
+    .toutiaoBatch{
+        .ant-tag .anticon-close {      
+            color: #1890ff;        
+        }
+        .ant-tag .anticon-close:hover{      
+            color: rgba(0, 0, 0, 0.85);    
+        }
+
+    }
+    
+    .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+        background-color: #fff;
+        color: #333;
+    }
+    #batchModal{
+        .rules,.totalPrice{
+            font-weight: 600;
+        }
+
+        .selectePlan{
+            font-size: 14px;
+            font-weight: 700;
+            color: #333;
+            padding: 20px 0;
+        }
+        .totalPrice{
+            margin-left: 20px;
+        }
+        .modifyTable{
+            margin-top: 20px;
+            width: 100%;
+            height: 400px;
+            overflow: auto;
+            font-weight: 600;
+        }
+    }
+    #copyModal{
+        .ant-modal-header{
+            text-align: center;
+        }
+        .copyTip{
+            font-size: 12px;
+            color: #999;
+        }
+        .copyName{
+            width: 118px;
+            display: inline-block;
+            text-align: right;
+            .copyKeyStart{
+                color: red;
+            }
+        }
+        // font-weight: 600;
+    }
+</style>
+<style lang="scss" scoped>
+.toutiaoBatch{
+    .breadcrumb{
+            height: 22px;
+            font-size: 12px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #000000;
+            line-height: 22px;
+        }
+    background-color: #fff;
+    padding: 10px 20px;
+    position: relative;
+    width: 100%;
+    .OptinItem{
+        display: inline-block;
+        margin-right: 15px;
+        .ok{
+            margin-right: 15px;
+        }
+    }
+    .OptinItem:first-child{
+        margin-right: 10px;
+    }
+    .topOptions{
+        padding: 15px 0;
+        .topOpt{
+            width: 100%;
+            margin-bottom: 10px;
+        }
+    }
+    .optionBtn{
+        // display: inline-block;
+        float: right;
+        .searchBtn{
+            margin-right: 10px;
+        }
+    }
+    .tableArea{
+        .tableOption{
+            padding: 20px 0;
+        }
+    }
+    .toolbox-automate-rules-create-content_title {
+        background-color: #fff;
+        display: flex;
+        flex-flow: row nowrap;
+        justify-content: flex-start;
+        align-items: center;
+        margin-bottom: 28px;
+        h3 {
+            font-size: 22px;
+            margin: 0;
+            font-weight: 400;
+            height: 30px;
+            line-height: 30px;
+        }
+    }
+
+}
+
+</style>

+ 2 - 0
src/views/modules/autoLaunch/index.vue

@@ -18,12 +18,14 @@ export default {
             isEdit:false,
             strategyInfo:{},
             accountInfo:{},
+            previewStrategyInfo:{},
         }
     },
     components:{   
         createStrategy: () => import('./createStrategy'), 
         setDirectional: () => import('./setDirectional'), 
         setCreate: () => import('./setCreate'), 
+        previewStrategy: () => import('./previewStrategy'), 
         
     },
 

File diff suppressed because it is too large
+ 1008 - 0
src/views/modules/autoLaunch/planList.vue


+ 861 - 0
src/views/modules/autoLaunch/previewStrategy.vue

@@ -0,0 +1,861 @@
+
+<style lang="scss" scoped>
+.previewStrategy{
+    .moduler {
+         .opt {
+            text-align: right;
+        }
+        width: 100%;
+        background: #fff;
+        margin-bottom: 16px;
+        position: relative;
+        padding: 32px 24px 48px 32px;
+        // border-radius: 4px;
+        // box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
+        .moduler-title {
+        display: flex;
+        align-items: center;
+        font-size: 22px;
+        margin-bottom: 20px;
+        }
+        .extraClass{
+            .row-item {
+                margin-bottom: 20px;
+            }
+            
+        }
+        .row-item {
+        display: flex;
+        justify-content: flex-start;
+        align-items: center;
+        margin-bottom: 25px;
+        }
+        .row-item:last-of-type {
+        margin-bottom: 0;
+        }
+        .row-item .hint-item {
+        width: 24px;
+        min-width: 24px;
+        align-self: flex-start;
+        line-height: 20px;
+        height: 20px;
+        margin-top: 9px;
+        }
+        .row-item .label-item {
+        position: relative;
+        align-items: flex-start;
+        align-self: flex-start;
+        line-height: 20px;
+        height: 20px;
+        margin-top: 10px;
+        width: 80px;
+        min-width: 80px;
+        .text-item {
+            font-size: 14px;
+            width: 60px;
+        }
+        }
+        .row-item .required-item {
+        width: 4px;
+        height: 4px;
+        border-radius: 2px;
+        background: #f45858;
+        position: absolute;
+        right: 10px;
+        top: 50%;
+        transform: translateY(-50%);
+        }
+        .row-item .input-item {
+        min-width: 480px;
+        position: relative;
+        // height: 35px;
+        .tip {
+            font-size: 12px;
+            color: tomato;
+        }
+        }
+        .adName{
+        display: flex;
+        .nameList{
+            width: 90%;
+        }
+        .item{
+            display: inline-block;
+            width: 30%;
+            margin-left: 15px;
+            margin-bottom: 10px;
+        }
+        }
+    }
+     .toolbox-automate-rules-create-body {
+        margin: 16px 0 16px ;
+        padding: 32px 32px 16px;
+        background-color: #fff;
+        border-radius: 4px;
+    }
+    .toolbox-automate-rules-create-content_title {
+        background-color: #fff;
+        display: flex;
+        flex-flow: row nowrap;
+        justify-content: flex-start;
+        align-items: center;
+        margin-bottom: 28px;
+        h3 {
+            font-size: 22px;
+            margin: 0;
+            font-weight: 400;
+            height: 30px;
+            line-height: 30px;
+        }
+    }
+    .toolbox-automate-rules-create-content {
+        padding-left: 28px;
+    }
+    ul,li{
+        margin: 0;
+        padding: 0;
+    }
+   
+    width: 100%;
+    .topBody{
+        width: 100%;
+        background: #FFFFFF;
+        margin-bottom: 12px;
+        padding: 20px;
+        box-sizing: border-box;
+        .breadcrumb{
+            height: 22px;
+            font-size: 12px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #000000;
+            line-height: 22px;
+        }
+        .bottom{
+            display: flex;
+            position: relative;
+            justify-content: space-between;
+            // padding: 20px;
+            .orderIcon{
+                width: 28px;
+                height: 28px;
+                margin-right: 15px;
+                img{
+                    width: 100%;
+                }
+            }
+            .tip{
+                .greet{
+                    width: 300px;
+                    height: 28px;
+                    font-size: 20px;
+                    font-family: PingFangSC-Medium, PingFang SC;
+                    font-weight: 500;
+                    color: rgba(0, 0, 0, 0.85);
+                    line-height: 28px;
+                    margin-bottom: 5px;
+                }
+                .descPosition{
+                    
+                    font-size: 14px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: rgba(0, 0, 0, 0.45);
+                    overflow: hidden;
+                    margin-bottom: 0;
+                    li{
+                        height: 22px;
+                        line-height: 22px;
+                        margin-top:3px ;
+                    }
+                    span{
+                        width: 250px;
+                        display: inline-block;
+                    }
+                }
+
+            }
+            .optBody{
+                width: 200px;
+                flex-shrink:0;
+                // justify-content: flex-end;
+                text-align: right;
+                .btnBody{
+                    margin-bottom: 10px;
+                }
+                .orderInfo{
+                    display: flex;
+                    justify-content: space-between;
+                    text-align: right;
+                    p{
+                        margin-bottom: 0;
+                    }
+                    
+                    .markName{                        
+                        height: 22px;
+                        font-size: 14px;
+                        font-family: PingFangSC-Regular, PingFang SC;
+                        font-weight: 400;
+                        color: rgba(0, 0, 0, 0.45);
+                        line-height: 22px;
+                    }
+                    .big{                                               
+                        height: 28px;
+                        font-size: 20px;
+                        font-family: PingFangSC-Regular, PingFang SC;
+                        font-weight: 400;
+                        color: rgba(0, 0, 0, 0.85);
+                        line-height: 28px;
+                    }
+                }
+
+            }
+        }
+
+    }
+    .section{
+        background: white;
+        padding:20px ;
+        .breadcrumb{
+            height: 22px;
+            font-size: 12px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #000000;
+            line-height: 22px;
+        }
+        .sectionBody{
+            
+            p{
+                margin-bottom: 0;
+            }
+            .section-item{
+                background: white;
+                margin-bottom: 20px;
+            }
+            .tabBox{
+                padding: 15px 20px 0;
+                display: flex;
+                flex-wrap: wrap;
+                position: relative;
+                .search-item{
+                    margin-bottom: 12px;
+                    width: 30%;
+                }
+                .opt-item{
+                    position: absolute;
+                    right: 20px;
+                    top: 16px;
+                }
+            }
+            .sectionHead{
+                padding: 15px 20px;
+                // height: 24px;
+                font-size: 16px;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: rgba(0, 0, 0, 0.85);
+                line-height: 24px;
+                border-bottom: 1px solid  #E9E9E9;;
+                .allOrder{
+                    float: right;
+                }
+            }
+            .section-box{
+                margin-top: 30px;
+                padding: 20px 20px;
+                border: 1px solid #E9E9E9;
+                .description{
+                    margin-top: 10px;
+                    .time{
+                        height: 32px;
+                        line-height: 32px;
+                    }
+                }
+                ul{
+                    display: flex;
+                    flex-wrap: wrap;
+                    // justify-content: space-around;
+                }
+                li{
+                    
+                    width: 30%;
+                    height: 22px;
+                    font-size: 14px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: rgba(0, 0, 0, 0.85);
+                    line-height: 22px;
+                    text-align: left;
+                    margin-bottom: 15px;
+                }
+                .top{
+                    margin-bottom: 25px;
+                }
+                .bottom{
+                    h4{
+                        
+                        font-size: 15px;
+                        font-family: PingFangSC-Medium, PingFang SC;
+                        font-weight: 600;
+                        color: rgba(0, 0, 0, 0.85);
+                        margin-bottom: 25px;
+                    }
+                }
+                .shenhe{
+                    width: 6px;
+                    height: 6px;
+                    display: inline-block;
+                    background: #52C41A;
+                    border-radius: 50%;
+                    position: relative;
+                    top: -2px;
+
+                }
+                .wancheng{
+                    width: 6px;
+                    height: 6px;
+                     display: inline-block;
+                    background: #1890FF;
+                    border-radius: 50%;
+                    // margin-right: 3px;
+                    position: relative;
+                    top: -2px;
+                }
+                .bohui{
+                    width: 6px;
+                    height: 6px;
+                    display: inline-block;
+                    background: #F5222D;
+                    border-radius: 50%;
+                    position: relative;
+                    top: -2px;
+                }
+            }
+            
+        }
+    }
+}
+.videoBox{
+   
+    height: 240px;
+}
+.imgBox{
+    width: 90%;
+}
+.videomarterialInfo{
+    position: relative;
+    height: 800px;
+}
+.marterialInfo{
+    overflow: auto;   
+    height: 800px;
+    position: relative;
+    p{margin-bottom: 0;}
+    ul,li{
+        margin: 0;
+        padding: 0;
+    }
+    .info-item{
+        margin-bottom: 20px;
+        display: flex;
+        // justify-content: center;
+        align-items: flex-start;
+        span{
+            display: inline-block;
+            width: 70px;
+            text-align: left;
+            flex-shrink: 0;
+        }
+        .ant-tag{
+            width: auto;
+            min-width: 50px;
+            text-align: center;
+        }
+    }
+    .info{
+        ul{
+            width: 100%;
+            display: flex;
+            justify-content: space-between;
+            flex-wrap: wrap;
+        }
+        li{
+            width: 33.3%;
+            margin-bottom: 20px;
+        }
+        margin-bottom: 0;
+    }
+    // .btnBody{
+    //     width: 100%;
+    //     height: 80px;
+    //     position: relative;
+    // }
+    .bottom-btn{
+        width: 100%; 
+        text-align: center;
+        position: absolute;
+        bottom: 0px;
+        left: 0;
+        // margin-top: 20px;
+
+    }
+    .scriptbottom-btn{
+        width: 100%; 
+        // height: 60px;  
+        line-height: 60px;   
+        text-align: center;
+        position: absolute;
+        bottom: 0px;
+        left: 0;
+       
+    }
+}
+</style>
+
+<style lang="less">
+    .previewStrategy{
+        .ant-timeline-item-head{
+            background: rgb(240,242,245);
+        }
+        .muen{
+            cursor: pointer;
+        }
+        .muen:hover{
+            color: #1890ff;
+        }
+    }
+    
+    
+</style>
+<template>
+    <div class="previewStrategy ">   
+        <a-spin :spinning="spinning">
+        <div class="toolbox-automate-rules-create-body">
+            <div class="toolbox-automate-rules-create-content_title"><h3>策略预览</h3></div>
+            <div class="toolbox-automate-rules-create-content">
+                
+                    <a-table
+                        size="middle"
+                        :columns="columns"
+                        :dataSource="data"
+                        id="outTable"
+                        :pagination="ipagination"
+                        :loading="loading"
+                        @change="sort"
+                        style="word-break: break-all;"
+                        :bordered='true'
+                        >
+                        <div slot="materialStatus" slot-scope="text" >
+                            <span class="wancheng" v-if="text==7"> </span>
+                            <span class="bohui" v-else-if="text==6||text==3"> </span>
+                            <span class="shenhe" v-else> </span>
+                            {{text | handlerMaterialStatus}}
+                        </div>
+                        <div slot="scriptStatus" slot-scope="text,record">
+                            <span v-if="record.materialStatus==0&&role=='design'">-</span>
+                            <a href="javascript:;" v-if="record.materialStatus==0&&role=='designLeader'"  @click="scriptAssign(record)">指派</a>
+                            <span v-else>
+                                    <a href="javascript:;" @click="scriptViewDetails(record)">{{record.planName}}</a>
+                            </span>
+                        </div>
+                        <div slot="videoStatus" slot-scope="text,record">
+                            <span v-if="record.materialStatus==0&&role=='design'">-</span>
+                            <a href="javascript:;" v-if="record.materialStatus==0&&role=='designLeader'"  @click="videoAssign(record)">指派</a>
+                            <span v-else>
+                                    <a href="javascript:;" @click="viewDetails(record)">{{record.clipName}}</a>
+                            </span>
+                        </div>
+                        <div slot="operator" slot-scope="text,record">                            
+                            <a href="javascript:;" @click="goDetail(record)">查看详情</a>
+                        </div>
+
+                    </a-table>
+
+                    <a-drawer
+                    title="视频详情"
+                    width="800"
+                    :placement="placement"
+                    :closable="false"
+                    :visible="visible"
+                    @close="onClose"
+                    >
+                        <a-tabs
+                        default-active-key="1"
+                        tab-position="top"
+                        :style="{ height: '200px' }"
+                        @prevClick="callback"
+                        @nextClick="callback"
+                        >
+                            <a-tab-pane v-for="i in 30" :key="i" :tab="`Tab-${i}`">  </a-tab-pane>
+                        </a-tabs>
+                        <a-spin :spinning="visibleLoading">                            
+                        <div class="marterialInfo videomarterialInfo">
+                            <div class="info-item">
+                                <span>素材类型:</span>
+                                <p>{{ currentVideo.videoStatus | handlerVideoStatus }}</p>
+                            </div> 
+                            <div class="info-item">
+                                <span>视频预览:</span>
+                               <div class="videoBox">
+                                    <video style="height:100%" :src="currentVideo.url" controls v-if="currentVideo.url"></video>
+                                    <img :src="defaultPic" alt="" style="width:100px;margin:0 10px 8px 0" v-else>
+                                </div> 
+                            </div>
+                            <div class="info-item">
+                                <span>封面预览:</span>
+                                <div class="imgBox">
+                                    <div >
+                                        <template v-if="currentVideo.imgList&&currentVideo.imgList.length">
+                                            <img  alt="" style="width:100px;margin:0 10px 8px 0" v-for="(item,index) in currentVideo.imgList"  :key='index' :src="item"> 
+                                        </template>
+                                        <span v-else>暂无封面</span>
+                                    </div>
+
+                                </div>
+                            </div>
+                            
+                            <div class="info-item" >
+                                <span>创意标题:</span>
+                                <p>
+                                   
+                                </p>
+                            </div>
+                            <div class="info-item" >
+                                <span>广告语:</span>
+                                <p>
+                                   
+                                </p>
+                            </div>
+                            <div class="info-item" >
+                                <span>行动号召:</span>
+                                <p>
+                                   
+                                </p>
+                            </div>
+                            <div class="info-item" >
+                                <span>监测链接</span>
+                                <p>
+                                   
+                                </p>
+                            </div>
+                           
+                           
+                            <div class="bottom-btn">
+                                <a-button type='default' @click="onClose">关闭</a-button>
+                            </div>
+                         
+                            
+                        </div>
+                        </a-spin>
+                    </a-drawer>
+            </div>
+        </div>
+        <div class="moduler">
+                    <!-- <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="saveHandler" :loading="saveLoading">确认创建</a-button>
+            </div>
+        </div>  
+    </a-spin>     
+        
+    </div>
+</template>
+
+<script>
+import moment from 'moment';
+import qs from 'qs'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+import Vue from 'vue'
+import {ACCESS_TOKEN} from "@/store/mutation-types"
+import BMF from 'browser-md5-file'
+import { fileCheck, fileCheckImage, fileEdit, fileEditAll,orderFileInsert} from '@/api/actor'
+import uploadFile from '@/components/uploadFile.vue'
+import { closeAllVideoFun, stopOtherVideo } from '@/utils/videoControl'
+import UploadToAli from '@femessage/upload-to-ali'
+import { mapGetters } from 'vuex'
+import TrendVue from '../../../components/Trend/Trend.vue';
+
+let listColumns=[
+    {
+        title: '广告组',
+        dataIndex: 'materialName',
+        align: 'center',        
+        key: 'materialName',
+        scopedSlots: { customRender: 'materialName' }
+    },
+    {
+        title: '所属计划',
+        dataIndex: 'materialId',
+        align: 'center',        
+        key: 'tag',
+        scopedSlots: { customRender: 'materialId' }
+    },
+    {
+        title: '优化目标',
+        dataIndex: 'materialStatus',
+        align: 'center',        
+        key: 'materialStatus',
+        scopedSlots: { customRender: 'materialStatus' }
+    },
+    {
+        title: '出价',
+        dataIndex: 'scriptStatus',
+        align: 'center',        
+        key: 'scriptStatus',
+        scopedSlots: { customRender: 'scriptStatus' }
+    },
+     {
+        title: '深度优化目标',
+        dataIndex: 'videoStatus',
+        align: 'center',        
+        key: 'videoStatus',
+        width:250,
+        scopedSlots: { customRender: 'videoStatus' }
+    },
+    {
+        title: '深度优化出价',
+        dataIndex: 'orderTitle',
+        align: 'center',        
+        key: 'orderTitle',
+        scopedSlots: { customRender: 'orderTitle' }
+    },
+    {
+        title: '广告位置',
+        dataIndex: 'position',
+        align: 'center',        
+        key: 'position',
+        scopedSlots: { customRender: 'position' }
+    },
+    {
+        title: '创意',
+        dataIndex: 'operator',
+        align: 'center',        
+        key: 'operator',
+        scopedSlots: { customRender: 'operator' }
+    },
+   
+]
+
+
+export default {
+    name:'preview-strategy',
+    
+    data() {
+        
+        return {
+            spinning:false,
+            currentVideo:{},
+            visible: false,
+            visibleLoading:false,
+            placement: 'right',
+            loading:false,
+            data:[],
+            columns:[...listColumns],
+            url:{
+                assgin:'/platform/designer/assign',
+                scriptDetail:'/platform/material/scriptDetail',
+                videoDetail:'/platform/material/videoDetail',
+                scriptAccept:'/platform/material/script/accept',
+                scriptReject:'/platform/material/script/reject',
+                videoAccept:'/platform/material/video/accept',
+                videoReject:'/platform/material/video/reject',
+            },     
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                //   pageSizeOptions: ['10', '20', '30'],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条"
+                },
+                showQuickJumper: true,
+                showSizeChanger:true,
+                pageSizeOptions: ['10', '30', '50'],
+                total: 0,
+                onChange: (current, pageSize) => {
+                    // 切换分页时的回调,
+                    // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                    this.ipagination.current = current;
+                    this.ipagination.pageSize= pageSize;
+                }
+            }, 
+        }
+    },
+    methods: {
+        goDetail(record){
+            consoel.log(record);
+            this.visible=true;
+        },
+        callback(val) {
+            console.log(val);
+        },
+        onClose() {
+            this.visible = false;
+        },
+
+        sort(pagination, filters, sorter, { currentDataSource }){
+        
+            this.ipagination.current=pagination.current;
+
+            this.ipagination.pageSize=pagination.pageSize;
+            this.materialHttp(this.activeKey)
+        },
+        // 请求列表
+        getListHttp(type){
+            this.loading=true;           
+            this.data=[];
+            let  params=this.handlerParams(type)
+            params={
+                ...params,
+                pageNo:this.ipagination.current,
+                pageSize:this.ipagination.pageSize
+            }
+            getAction('/platform/material/listByRole',params).then(res=>{
+                console.log(res);
+                if(res.success){
+                    this.loading=false;   
+                    this.data=res.result.list;
+                    this.ipagination.total=res.result.total;
+
+                }
+            })
+        },
+
+        
+
+        saveHandler(){
+             this.$refs.ruleForm.validate(valid=> {
+                if (valid) {
+                    // this.form.rulesList=this.rulesList;
+                    console.log(valid,this.form);
+                    
+                    this.saveLoading=true;
+
+                        if(this.currentRuleId){
+                            let ruleList=this.form.ruleList.filter(item=>{
+                                return !item.groupId
+                            })
+                            console.log(ruleList)
+                            if(ruleList.length>0){
+                                postAction(this.url.createRuleGroup,{
+                                    templateId:this.currentRuleId,
+                                    ruleList
+                                }).then(res=>{
+                                    console.log(res);
+                                    this.saveLoading=false;
+                                    if(res.success){
+                                        
+                                        this.$router.push('/earlyWarningRules/index')
+                                        this.$bus.$emit('remove', `/earlyWarningRules/configRules?id=${this.currentRuleId}`)
+                                    }else{
+                                        this.$message.error(res.message)
+                                    }
+                                    
+                                })
+                            }else{
+                                this.$router.push('/earlyWarningRules/index')
+                                this.$bus.$emit('remove', `/earlyWarningRules/configRules?id=${this.currentRuleId}`)
+                            }
+                            
+                        }else{
+                            postAction(this.url.creativeTemplate,this.form).then(res=>{
+                                console.log(res);
+                                this.saveLoading=false;
+                                if(res.success){
+                                    this.$router.push('/earlyWarningRules/index')
+                                    this.$bus.$emit('remove', '/earlyWarningRules/configRules')
+                                }else{
+                                    this.$message.error(res.message)
+                                }
+                                    
+                            
+                            })
+                        }
+                    
+                    
+                    
+                } else {
+                    console.log('error submit!!');
+                    this.$message.error('请按提示填写必填项目!')
+                    return false;
+                }
+            });
+        },
+
+        goBack() {
+             this.$router.push('/earlyWarningRules/index')
+            this.$bus.$emit('remove', '/earlyWarningRules/configRules')
+           
+        },
+
+
+    },
+    mounted(){
+        
+    },
+    activated() {
+        
+    },
+    filters:{
+        handlerMaterialStatus(val){
+            let str='';
+            switch(val){
+                
+                case 0:
+                    str= '待指派'
+                    break;
+                case 1:
+                    str= '脚本待上传'
+                    break;
+                case 2:
+                    str= '脚本待审核'
+                    break;
+                case 3:
+                    str= '脚本被驳回'
+                    break;
+                case 4:
+                    str= '视频待上传'
+                    break;
+                case 5:
+                    str= '视频待审核'
+                    break;
+                case 6:
+                    str= '视频被驳回'
+                    break;
+                case 7:
+                    str= '物料已完结'
+                    break;
+                default:
+                    str='出错了'
+                    break;
+            }
+            return str
+        },
+        handlerVideoStatus(val){
+            let str='';
+            switch(val){
+                
+                case 0:
+                    str= '待上传'
+                    break;
+                case 1:
+                    str= '待审核'
+                    break;
+                case 2:
+                    str= '被驳回'
+                    break;
+                case 3:
+                    str= '已审核'
+                    break;
+                default:
+                    str='出错了'
+                    break;
+            }
+            return str
+        },
+        
+    },
+
+}
+</script>

+ 364 - 54
src/views/modules/autoLaunch/setDirectional.vue

@@ -13,7 +13,23 @@
         <div class="moduler">
                 <div class="moduler-title">目标应用</div>
                 <div class="ad-range">
-                    <div class="row-item" v-if="strategyInfo.marketingGoal=='2'">
+                    <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="sysType" @change="sysTypeChange">
+                                <a-radio-button :value="1">安卓</a-radio-button>
+                                <a-radio-button :value="2">IOS</a-radio-button>
+                                </a-radio-group>
+                            </a-form-item>
+                        
+                        </div>
+                    </div>
+                    <div class="row-item" v-if="strategyInfo.marketingGoal=='2'||strategyInfo.marketingGoal=='7'">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">选择应用</div>
@@ -23,7 +39,7 @@
                             <a-form-item>
                                 <a-select v-decorator="['appIds', { rules: [{ required: true, message: '请选择目标应用' }] }]" showSearch allowClear
                                     placeholder="选择应用目标" optionFilterProp="children" style="width: 500px"  mode='multiple' :maxTagCount='1'
-                                   :filterOption="filterOption">
+                                   :filterOption="filterOption" @change="appIdChange">
                                     <!-- <a-select-option value="0">请选择目标应用</a-select-option> -->
                                     <a-select-option v-for="appModel in appList" :key="appModel.appId" :value="appModel.appId">
                                         {{ appModel.appName }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}&#12288;&#12288;&#12288;{{
@@ -52,10 +68,10 @@
                         
                         </div>
                     </div>
-                    <div class="row-item" v-if="strategyInfo.marketingGoal == '3'">
+                    <div class="row-item" v-if="strategyInfo.marketingGoal == '3'||strategyInfo.marketingGoal == '4'||strategyInfo.marketingGoal == '5'">
                         <div class="hint-item"></div>
                         <div class="label-item">
-                        <div class="text-item">{{strategyInfo.marketingGoal == 3 ? ' ' : '链接'}}</div>
+                        <div class="text-item">链接</div>
                         <!-- <div class="required-item"></div> -->
                         </div>
                         <div class="input-item">
@@ -84,8 +100,19 @@
              
         </div>
         <div class="moduler">
-            <div class="moduler-title">用户定向</div>
-            <div class="ad-range">
+            <div class="moduler-title">用户定向
+            <div style="margin-left:30px;position:relative;top:-2px">
+                <a-radio-group v-model="useDirectional" @change="useDirectionalChange">
+                    <a-radio :value="1">
+                        不使用定向
+                    </a-radio>
+                    <a-radio :value="0">
+                        使用定向包
+                    </a-radio>
+                </a-radio-group>
+            </div>
+            </div>
+            <div class="ad-range" v-if="useDirectional==1">
                     <div class="row-item">
                         <div class="hint-item"></div>
                             <div class="label-item">
@@ -173,7 +200,7 @@
                                     <a-radio-button value="3">同时定向排除</a-radio-button>                           
                                 </a-radio-group>
                             </a-form-item>
-                            <div class="dingxiang_paichu" v-if="getFormData('customCrowd')!='0'" style="width:60%">
+                            <div class="dingxiang_paichu" v-if="getFormData('customCrowd')&&getFormData('customCrowd')!='0'" style="width:60%">
                                     <a-tabs v-model="tabKey" @change="retargetTabChange"  >
                                         <a-tab-pane key="1" tab="定向池" v-if="getFormData('customCrowd')!='2'">
                                             <a-table
@@ -218,6 +245,29 @@
                     
                     
             </div>
+            <div class="ad-range2" v-if="useDirectional==0">
+                <div style="position:relative" class="ad-range2-title">
+                    <span>当前选择模板数量:{{directionalCheckedList.length}}</span>
+                    <!-- <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
+                    <span>点击全选</span>
+                    </a-checkbox>    -->
+                </div>
+                
+                <a-spin :spinning="directionalSpinning">   
+                <div class="title-list"> 
+                        
+                    <a-checkbox-group v-model="directionalCheckedList" @change="directionalChange">
+                        <div class="title-item" v-for="(item,index) in directionalList" :key='index'>
+                        <label>
+                            <a-checkbox :value='item.id'>
+                                {{item.templateName+'_('+item.id+')'}}
+                            </a-checkbox>
+                        </label>
+                        </div>
+                    </a-checkbox-group>             
+                </div>
+                </a-spin>
+            </div>
         </div>
         
         <div class="moduler">
@@ -497,7 +547,7 @@
                         <div style="width: 400px; margin-top: 24px;" class="inventoryTypes" v-show="adposition=='inventoryTypes'">
                             <div class="inventory-tags-lists-header">
                                 <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
-                            </a-checkbox>
+                                </a-checkbox>
                             <div class="inventory-tags-lists-name"><strong>APP名称</strong></div>
                             </div>
                             <div class="inventory-tags-lists-container">
@@ -507,30 +557,72 @@
                         
                         </div>
                     </div>
-                    <div class="row-item">
+                    <div class="row-item" v-if="siteList.length">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">下载详情</div>
                         <!-- <div class="required-item"></div> -->
                         </div>
+                        <div class="input-item" >
+                            <div  v-for="(item,index) in siteList" :key="index" :style="index==(siteList.length-1)?{'margin-bottom':'0px'}:{'margin-bottom':'20px'}">
+                                <a-form-item>
+                                <a-select
+                                    v-model="item.siteId"
+                                    showSearch
+                                    allowClear
+                                    placeholder="选择应用下载详情页"
+                                    optionFilterProp="children"
+                                    :filterOption="filterOption"
+                                    style="width:400px"
+                                    >
+                                    <a-select-option v-for="appModel in item.siteList" :key="appModel.siteId" :value="appModel.siteId">
+                                        {{ appModel.name }}
+                                    </a-select-option>
+                                    
+                                </a-select>
+                                <span style="margin-left:30px;display:inline-block">
+                                        {{'appId:'+item.appId}}
+                                </span>
+                                </a-form-item>
+                            </div>
+                            
+
+                        </div>
+                    </div>
+                    <div class="row-item">
+                        <div class="hint-item"></div>
+                        <div class="label-item">
+                        <div class="text-item">点击监测链接</div>
+                        <!-- <div class="required-item"></div> -->
+                        <!-- http://ptd.yoyuan.com.cn/apk/download/1119929/YouYuan_1119929.apk -->
+                        </div>
                         <div class="input-item">
                         <a-form-item>
-                            <a-input v-decorator="['videoPlayTrackUrl', {rules:[ {          
-                            required: getFormData('bidType')=='10',
-                            validator: this.validateURL,
-                            },]}]" />
+                            <a-input v-decorator="['clickTrackUrl', {rules:validationRules.url}]" />
                         </a-form-item>
                         </div>
                     </div>
                     <div class="row-item">
                         <div class="hint-item"></div>
                         <div class="label-item">
-                        <div class="text-item">监测链接</div>
+                        <div class="text-item">开始播放监测链接</div>
                         <!-- <div class="required-item"></div> -->
                         </div>
                         <div class="input-item">
                         <a-form-item>
-                            <a-input v-decorator="['videoPlayTrackUrl', {rules:validationRules.url}]" />
+                            <a-input v-decorator="['impressionUrl', {rules:validationRules.url}]" />
+                        </a-form-item>
+                        </div>
+                    </div>
+                    <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-input v-decorator="['actionbarClickUrl', {rules:validationRules.url}]" />
                         </a-form-item>
                         </div>
                     </div>
@@ -544,9 +636,9 @@
             <div class="moduler">
                 <!-- <div class="moduler-title">计划名称</div> -->
                 <div class="opt">
-                <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
+                <a-button type="default" style="margin-right:15px" @click="goBack">上一步</a-button>
                 
-                <a-button type="primary" @click="goNext"  :loading="goNextloading">下一步</a-button>
+                <a-button type="primary" @click="goNext"  :loading="goNextloading">前往预览</a-button>
                 </div>
             </div>
         
@@ -594,7 +686,31 @@
               {{item.convert_name}}</a-select-option>
           </a-select>
         </a-form-item>
-      </a-modal>
+    </a-modal>
+
+    <a-modal v-model="useDirectionalVisible" title="选择定向包" @ok="selectDirectionalOk" width='600px' height='500px'>
+        <div style="position:relative">
+            <span>当前选择模板数量:{{directionalCheckedList.length}}</span>
+            <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
+               <span>点击全选</span>
+            </a-checkbox>   
+        </div>
+        
+        <a-spin :spinning="directionalSpinning">   
+        <div class="title-list"> 
+                  
+            <a-checkbox-group v-model="directionalCheckedList" @change="directionalChange">
+                <div class="title-item" v-for="(item,index) in directionalList" :key='index'>
+                <label>
+                    <a-checkbox :value='item.id'>
+                        {{item.templateName+'_('+item.id+')'}}
+                    </a-checkbox>
+                </label>
+                </div>
+            </a-checkbox-group>             
+        </div>
+        </a-spin>
+    </a-modal>
 
   </div>
 </template>
@@ -602,11 +718,12 @@
 <script>
 import moment from 'moment'
 import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
-import radioCheck from './radioCheck';
+import radioCheck from './components/radioCheck';
 import linkMultiSelect from './components/linkMultiSelect'
 import singleLayersSelecte from './components/singleLayerSelecte'
 import scheduleTime from '@/components/formComponents/toutiaoTime'
 import qs from 'qs'
+import { filter } from 'vue/types/umd';
 var str = ""
 for (let i = 0; i < 7*24; i++) {
  str+='0'
@@ -725,6 +842,15 @@ export default {
     },
     data() {
         return {
+            sysType:1,
+            indeterminateDirectional:false,
+            checkAllDirectional:false,
+
+            directionalList:[],
+            directionalSpinning:false,
+            directionalCheckedList:[],
+            useDirectional:1,
+            siteList:[],
             tabKey:'1',
             adposition:1,
             groupTypeData:null,
@@ -736,6 +862,7 @@ export default {
             strategyInfo:{},
             accountInfo:{},
             appList: [],
+            appListAll:[],
             dateRange: [moment(), moment()],
             scheduleTime: '',
             scheduleTimeData:str,
@@ -818,7 +945,7 @@ export default {
                 }],
             },
 
-            
+            useDirectionalVisible:false,
         }
     },
     watch: {
@@ -862,8 +989,59 @@ export default {
                     }),
                 };
             },
-        },
+    },
     methods: {
+        directionalChange(checkedList) {
+            // console.log(checkedList)
+            this.indeterminateDirectional = !!checkedList.length && checkedList.length < this.directionalList.length;
+            this.checkAllDirectional = checkedList.length === this.directionalList.length;
+        },
+        onCheckAllDirectionalChange(e) {
+            console.log(e)
+            let valueOption=[];
+            valueOption=this.directionalList.map(item=>{
+                return item.id
+            })
+            Object.assign(this, {
+                directionalCheckedList: e.target.checked ? valueOption : [],
+                indeterminateDirectional: false,
+                checkAllDirectional: e.target.checked,
+            });
+        },
+        selectDirectionalOk(e){
+            this.useDirectionalVisible=false 
+        },
+        useDirectionalChange(e){
+            console.log(e);
+            if(e.target.value==0){
+                // this.useDirectionalVisible=true;
+                this.getUserDirectional()
+            }
+        },  
+        // 获取定向包
+        getUserDirectional(){
+            getAction('/kuaishou/batch/getDirectionalTemplate',{
+                accountId:this.accountInfo.value
+            }).then(res=>{
+                console.log(res);
+                this.directionalList=res.result
+            })
+        },
+        appIdChange(val){
+            console.log(val)
+            this.siteList=[]
+            if(val.length){
+                val.forEach(item=>{
+                    this.siteList.push({
+                        siteList:[], 
+                        appId:item,
+                        siteId:''
+                    })
+
+                })
+                this.getPageList(val)
+            }
+        },
         disabledDate(current) {
            
             return current && current < moment().subtract(1, 'day')
@@ -917,6 +1095,8 @@ export default {
                 checkAll: e.target.checked,
                 });
             },
+
+
             customCrowdChange(e){
                 console.log(e);
                 if(e.target.value=='1' || e.target.value=='2'){
@@ -999,17 +1179,16 @@ export default {
         handleOk(e) {
             this.visible=false;
             this.$router.push({path:'/LaunchHousekeeper/setProjectCreate'})
-            
-            
+
         },
         handleCancel(e) {
             this.visible = false;
         },
         // 直达链接是否启用
         useOpenUrlChange(){
-        this.form.setFieldsValue({
-            openUrl:''
-        })
+            this.form.setFieldsValue({
+                openUrl:''
+            })
         },
         
         //获取表单的某一个属性值
@@ -1018,12 +1197,12 @@ export default {
         },
         dateChange(date, dateString) {
         // console.log(date,dateString)
-        this.form.getFieldDecorator('beginTime')
-        this.form.getFieldDecorator('endTime')
-        this.form.setFieldsValue({
-            beginTime: date[0].format('YYYY-MM-DD HH:mm'),
-            endTime:  date[1].format('YYYY-MM-DD HH:mm'),
-        })
+            this.form.getFieldDecorator('beginTime')
+            this.form.getFieldDecorator('endTime')
+            this.form.setFieldsValue({
+                beginTime: date[0].format('YYYY-MM-DD HH:mm'),
+                endTime:  date[1].format('YYYY-MM-DD HH:mm'),
+            })
         },
         
         
@@ -1073,8 +1252,9 @@ export default {
     
         
         goBack() {
-        this.$router.replace('/modules/LaunchHousekeeper/LaunchHousekeeperList')
-        this.$bus.$emit('remove', '/LaunchHousekeeper/setProjectDirectional')
+            // this.$router.replace('/autoLaunch/autoLaunchList')
+            // this.$bus.$emit('remove', '/autoLaunch/newStrategy')
+            this.$parent.currentTabComponent='createStrategy'
         },
         
         // 保存并新建创意
@@ -1084,7 +1264,7 @@ export default {
             this.form.validateFields((err, values) => {
                 if (!err) {
 
-                    
+                    this.goNextloading=true;
                     if(this.district!='NONE'){
                         values.district=this.district
                     }
@@ -1104,6 +1284,13 @@ export default {
                     }else{
                         values.scheduleTime=''
                     }
+
+                    values.siteId=this.siteList.map(item=>{
+                        return {
+                            appId:item.appId,
+                            siteId:item.siteId
+                        }
+                    })
                     // 投放时间的值
                     if(this.getFormData('scheduleType')=='SCHEDULE_FROM_NOW'){
                         values.beginTime=this.dateRange[0].format('YYYY-MM-DD');
@@ -1117,11 +1304,33 @@ export default {
                     values.agesRange=this.agesRange
                     values.region=this.region
                     values.convertId=this.convertId
-                    values.excludePopulation=this.excludeSelectedKeys
-                    values.population=this.incluedSelectedKeys
+                    values.excludePopulation=this.excludeSelectedKeys.map(item=>{
+                        return item.id
+                    })
+                    values.population=this.incluedSelectedKeys.map(item=>{
+                        return item.id
+                    })
+                    values.strategyState='1'
                     console.log('Received values of form: ', values)
-                    let params=[];
-                
+                    let params={
+                        ...values,
+                        ...this.strategyInfo
+                    }
+                    if(this.useDirectional==0){
+                        values.templateId=this.directionalCheckedList
+                    }
+                    
+                    this.$parent.currentTabComponent='previewStrategy'
+                    // postAction('/kuaishouStrategy/add',params).then(res=>{
+                    //     console.log(res)
+                    //     this.goNextloading=false
+                    //     if(res.success){
+                    //         // this.$router.replace('/autoLaunch/autoLaunchList')
+                    //         // this.$bus.$emit('remove', '/autoLaunch/newStrategy')
+                    //         // this.$parent.strategyInfo={}
+                            
+                    //     }
+                    // })
 
                 
                 }else{
@@ -1139,24 +1348,26 @@ export default {
             params.accountId = localStorage.getItem('accountId')
             getAction('/kuaishou/batch/getAppList', params).then(res => {
             if (res.success) {
-                this.appList = res.result.map((item, index) => {
-                return {
-                    ...item,
-                    key: index
-                }
+                this.appListAll = res.result.map((item, index) => {
+                    return {
+                        ...item,
+                        key: index
+                    }
                 })
+                // if(this.sysType==1){
+                //     this.appList=this.appListAll.filter(item=>{
+                //         return  item.platform==1||item.platform==2
+                //     })
+                // }else if(this.sysType==2){
+                //      this.appList=this.appListAll.filter(item=>{
+                //         return  item.platform==3||item.platform==4
+                //     })
+                // }
             }
             })
         },
 
-        getPlatForm(appId) {
-            if (appId) {
-                var data = this.appList.filter(item => {
-                    return item.appId == appId
-                })
-                return data[0].platform
-            }
-        },
+        
 
         convertChange() {
             this.convertId = ""
@@ -1177,11 +1388,32 @@ export default {
             }
             })
         },
+        sysTypeChange(e){
+            console.log(e.target.value);
+            // if(this.sysType==1){
+            //     this.appList=this.appListAll.filter(item=>{
+            //         return  (item.platform==1 || item.platform==2)
+            //     })
+            // }else if(this.sysType==2){
+            //         this.appList=this.appListAll.filter(item=>{
+            //         return  (item.platform==3||item.platform==4)
+            //     })
+            // }
+        },
+        getPlatForm(appId) {
+            if (appId) {
+                var data = this.appList.filter(item => {
+                    return item.appId == appId
+                })
+                return data[0].platform
+            }
+        },
         showConvert() {
             this.convertChange()
             if (this.strategyInfo.marketingGoal == 2) {
                 if (this.getData('appIds')) {
-                    this.convert = true
+                    this.convert = true;
+
                     if (this.getPlatForm(this.getData('appId')) == 1 || this.getPlatForm(this.getData('appId')) == 2) {
                         this.convertType = '3'
                     } else {
@@ -1197,6 +1429,25 @@ export default {
             }
             this.getConvertList()
         },
+
+        getPageList(appId) {
+            if(appId.length){
+                appId.forEach((item,index)=>{
+                    getAction('/kuaishou/batch/getPageList', {
+                        accountId: this.accountInfo.value,
+                        appId: item,
+                        viewComp: 7,
+                    }).then((res) => {
+                        if (res.success) {
+                            this.siteList[index].siteList = res.result
+                        }
+                    })
+                })
+                
+            }
+            
+        },
+
     },
     
     mounted() {
@@ -1299,9 +1550,29 @@ export default {
   .ant-btn-danger {
     background-color: #ff4d4f !important; 
   }
+    .ant-checkbox-group{
+        width: 100%;
+    }
+  
 }
 
-
+// 标题选择
+    // .title-list {
+    //     width: calc(100% + 48px);
+    //     margin: 16px -24px;
+    //     margin-bottom: 0;
+    //     padding: 10px  30px;
+    //     background: #f9f9f9;
+    //     height: 363px;
+    //     border: 1px solid #eaeaea;
+    //     overflow: scroll;
+    //     overflow-x: hidden;
+    //     margin-top: 10px;
+    // }
+    // .title-list .title-item{
+    //     height: 32px;
+    //     line-height: 32px;
+    // }
 .ant-tooltip-inner,
 .ant-tooltip,
 .ant-tooltip-arrow::before {
@@ -1410,6 +1681,45 @@ export default {
     padding: 32px 24px 48px 32px;
     border-radius: 4px;
     box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
+    .ad-range2{
+        width: 680px;
+        padding: 5px 32px;
+        .ad-range2-title{
+            background: #f9f9f9;
+            // line-height: 32px;
+            // height: 32px;
+            padding: 15px 15px;
+            border: 1px solid #eaeaea;
+            border-bottom: 0;
+        }
+        .quanxuanDirectional{
+            // padding: 0 8px;
+            position: absolute;
+            right: 10px;
+            top: 15px;
+            color: #1890ff;
+        }
+         .title-list {
+            // width: calc(100% + 48px);
+            width: 100%;
+            margin: 0;
+            margin-bottom: 0;
+            padding: 0;
+            background: #fff;
+            height: 363px;
+            border: 1px solid #eaeaea;
+            overflow: scroll;
+            overflow-x: hidden;
+            // margin-top: 10px;
+        }
+        .title-list .title-item{
+            padding: 10px  30px;
+            width: 100%;
+            // height: 32px;
+            // line-height: 32px;
+            // border-bottom: 1px solid #eaeaea;
+        }
+    }
     .moduler-title {
       display: flex;
       align-items: center;

File diff suppressed because it is too large
+ 1049 - 0
src/views/modules/autoLaunch/strategyList.vue


+ 1 - 1
src/views/modules/workBench/designLeader/platForm.vue

@@ -239,7 +239,7 @@ export default {
             let params={
                 design:this.userInfo.id,
                 pageNo:this.currentPage,
-                pageSize:10,
+                pageSize:8,
             }
             getAction('/platform/order/listByCreatorOrDesignLeader',params).then(res=>{
                 console.log(res);

+ 51 - 15
src/views/modules/workBench/materialList.vue

@@ -620,11 +620,13 @@
                                 </p>
                             </div>
                             <div class="info-item info">
-                                <ul>
+                                <ul style="position:relative">
                                    
                                     <li><span>编导:</span> {{ currentVideo.planName }} </li>
                                     <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
-                                    <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>                                    
+                                    <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>   
+                                     <!-- v-if="role=='designLeader'&&currentVideo.videoStatus==0" -->
+                                 <a-button type='link' style="margin-left:15px;position:absolute;top:-6px;right:0" @click="updataPeople" v-if="role=='designLeader'&&currentVideo.videoStatus==0">重新指派</a-button>                                 
                                 </ul>
                             </div>
                             <div class="info-item" v-if="currentVideo.videoStatus==2">
@@ -667,8 +669,11 @@
                                 <p>{{currentScript.materialName}}</p>
                             </div>
                             <div class="info-item">
-                                <span>编导:</span>
-                                <p>{{currentScript.planName}}</p>
+                                <span style="height: 32px;line-height: 32px;">编导:</span>
+                                <p style="height:32px;line-height:32px">
+                                    {{currentScript.planName}}
+                                    <a-button type='link' style="margin-left:15px" @click="updataPeople" v-if="role=='designLeader'&&currentScript.scriptStatus==0">重新指派</a-button>
+                                </p>
                             </div>
                             <div class="info-item" v-if="currentScript.scriptStatus==2">
                                 <span>驳回理由:</span>
@@ -734,6 +739,7 @@
                             <a-button key="back" @click="quxiao">取消</a-button>
                             <a-button type="primary"  @click="handleOk" :loading="loadingElse">确定</a-button>
                         </template>
+                        <a-spin :spinning='assignVisibleLoading'>
                         <a-form-model ref="ruleForm" :rules="rules"  :model="formPerson" :label-col="labelCol" :wrapper-col="wrapperCol">
 
                             <a-form-model-item  label="编导" ref="plan"  prop="plan">
@@ -742,7 +748,7 @@
                                     showSearch
                                     optionFilterProp="children"
                                     :filterOption="filterOption"
-
+                                    :disabled="currentMaterial.materialStatus>=4"
                                 >
                                 <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
                                 </a-select>
@@ -771,7 +777,7 @@
                                 </a-select>
                             </a-form-model-item>
                         </a-form-model>
-
+                        </a-spin>
                     </a-modal>
                 </div>
             </div>
@@ -911,6 +917,7 @@ export default {
             
         ]
         return {
+            assignVisibleLoading:false,
             visibleLoading:false,
 
             loadingElse2:false,
@@ -1059,18 +1066,33 @@ export default {
         },
         handleOk(e) {
             console.log(e);
+
             this.$refs.ruleForm.validate(valid => {
                 if (valid) {
                     this.loadingElse=true;
-                    postAction(this.url.assgin,{
-                        id:this.currentMaterial.materialId,
-                        ...this.formPerson
-                    }).then(res=>{
-                        this.loadingElse=false;
-                        this.assignVisible = false;
-                        this.$message.success(res.message);
-                        this.materialHttp(this.activeKey)
-                    })
+
+                    if(this.currentMaterial.clip&&this.currentMaterial.plan&&this.currentMaterial.shot){
+                        postAction('/platform/designer/assignAgain',{
+                            id:this.currentMaterial.materialId,
+                            ...this.formPerson
+                        }).then(res=>{
+                            this.loadingElse=false;
+                            this.assignVisible = false;
+                            this.$message.success(res.message);
+                            this.materialHttp(this.activeKey)
+                        })
+                    }else{
+                        postAction(this.url.assgin,{
+                            id:this.currentMaterial.materialId,
+                            ...this.formPerson
+                        }).then(res=>{
+                            this.loadingElse=false;
+                            this.assignVisible = false;
+                            this.$message.success(res.message);
+                            this.materialHttp(this.activeKey)
+                        })
+                    }
+                    
                 } else {
                     console.log('error submit!!');
                     return false;
@@ -1103,11 +1125,25 @@ export default {
             this.assignVisible=true;
             this.getProjectId(record.projectId)
         },
+        updataPeople(){
+             this.formPerson={
+                plan:this.currentMaterial.plan,
+                shot:this.currentMaterial.shot,
+                clip:this.currentMaterial.clip,
+            },
+         
+            this.assignVisible=true;
+            this.scriptVisible=false;
+            this.visible=false;
+            this.assignVisibleLoading=true;
+            this.getProjectId(this.currentMaterial.projectId)
+        },
         getProjectId(id) {
             this.ascription=[];
             getAction('/ctop/projectMember/getMemberList', {
                 projectId: id,
             }).then((res) => {
+                this.assignVisibleLoading=false;
                 if (res.code == 0) {
                     this.ascription = res.result.filter((item) => {
                         if (

+ 44 - 11
src/views/modules/workBench/orderDetail.vue

@@ -804,6 +804,8 @@
                                     <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
                                     <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>                                    
                                 </ul>
+                                <!-- v-if="role=='designLeader'&&currentVideo.videoStatus==0" -->
+                                 <a-button type='link' style="margin-left:15px;position:relative;top:-6px" @click="updataPeople" v-if="role=='designLeader'&&currentVideo.videoStatus==0">重新指派</a-button>
                             </div>
                             <div class="info-item" v-if="currentVideo.videoStatus==2">
                                 <span>驳回理由:</span>
@@ -843,8 +845,11 @@
                                 <p>{{currentScript.materialName}}</p>
                             </div>
                             <div class="info-item">
-                                <span>编导:</span>
-                                <p>{{currentScript.planName}}</p>
+                                <span style="height: 32px;line-height: 32px;">编导:</span>
+                                <p style="height:32px;line-height:32px">
+                                    {{currentScript.planName}}
+                                    <a-button type='link' style="margin-left:15px" @click="updataPeople" v-if="role=='designLeader'&&currentScript.scriptStatus==0">重新指派</a-button>
+                                </p>
                             </div>
                             <div class="info-item" v-if="currentScript.scriptStatus==2">
                                 <span>驳回理由:</span>
@@ -911,10 +916,12 @@
 
                 <!-- 指派 -->
                  <a-modal v-model="assignVisible" title="物料指派"  width='600px'>
+                    
                         <template slot="footer">
                             <a-button key="back" @click="quxiao">取消</a-button>
                             <a-button type="primary"  @click="handleOk" :loading="loadingElse">确定</a-button>
                         </template>
+                    <a-spin :spinning='assignVisibleLoading'>
                         <a-form-model ref="ruleForm" :rules="rules"  :model="formPerson" :label-col="labelCol" :wrapper-col="wrapperCol">
 
                             <a-form-model-item  label="编导" ref="plan"  prop="plan">
@@ -923,7 +930,7 @@
                                     showSearch
                                     optionFilterProp="children"
                                     :filterOption="filterOption"
-
+                                    :disabled="currentMaterial.materialStatus>=4"
                                 >
                                 <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
                                 </a-select>
@@ -952,7 +959,7 @@
                                 </a-select>
                             </a-form-model-item>
                         </a-form-model>
-
+                    </a-spin>
                 </a-modal>
                 <a-modal v-model="videoRejectVisiable" title="视频驳回"  width='600px'>
                      <template slot="footer">
@@ -1118,6 +1125,7 @@ export default {
     },
     data() {
         return {
+            assignVisibleLoading:false,
             visibleLoading:false,
              rules: {
                 
@@ -1290,6 +1298,7 @@ export default {
             getAction('/ctop/projectMember/getMemberList', {
                 projectId: id,
             }).then((res) => {
+                this.assignVisibleLoading=false
                 if (res.code == 0) {
                     this.ascription = res.result.filter((item) => {
                         if (
@@ -1335,22 +1344,46 @@ export default {
             this.assignVisible=true;
             this.getProjectId(record.projectId)
         },
+        updataPeople(){
+             this.formPerson={
+                plan:this.currentMaterial.plan,
+                shot:this.currentMaterial.shot,
+                clip:this.currentMaterial.clip,
+            },
+            this.scriptVisible=false;
+            this.visible=false;
+            this.assignVisible=true;
+            this.assignVisibleLoading=true;
+            this.getProjectId(this.currentMaterial.projectId)
+        },
         handleOk(e) {
             console.log(e);
-          
             this.$refs.ruleForm.validate(valid => {
                 if (valid) {
+                    console.log(this.formPerson)
                     this.loadingElse=true;
-                    postAction(this.url.assgin,{
-                        id:this.currentMaterial.id ,
-                        ...this.formPerson
-                    }).then(res=>{                       
+                    if(this.currentMaterial.clip&&this.currentMaterial.plan&&this.currentMaterial.shot){
+                        postAction('/platform/designer/assignAgain',{
+                            id:this.currentMaterial.id,
+                            ...this.formPerson
+                        }).then(res=>{
                             this.loadingElse=false;
                             this.assignVisible = false;
                             this.$message.success(res.message);
                             this.materialHttp(this.activeKey)
-                        
-                    })
+                        })
+                    }else{
+                        postAction(this.url.assgin,{
+                            id:this.currentMaterial.id,
+                            ...this.formPerson
+                        }).then(res=>{
+                            this.loadingElse=false;
+                            this.assignVisible = false;
+                            this.$message.success(res.message);
+                            this.materialHttp(this.activeKey)
+                        })
+                    }
+                   
                 } else {
                     console.log('error submit!!');
                     return false;

+ 1 - 1
src/views/modules/workBench/orderList.vue

@@ -299,7 +299,7 @@
     <div class="orderDetail ">
         
         <div class="section">
-             <p class="breadcrumb">
+            <p class="breadcrumb">
                 <a-breadcrumb style="display:block;width:100%">
                     <a-breadcrumb-item ><span class="muen" @click="goPlantForm()">工作台</span></a-breadcrumb-item>
                     <a-breadcrumb-item>订单列表</a-breadcrumb-item>