Jelajahi Sumber

合并提交

zhuxinbo 4 tahun lalu
induk
melakukan
cb6c01cbe7
49 mengubah file dengan 20602 tambahan dan 10253 penghapusan
  1. 3 0
      debug.log
  2. 9053 9053
      public/color.less
  3. 12 1
      src/App.vue
  4. 2 1
      src/components/DatePicker.vue
  5. 29 3
      src/components/layouts/TabLayout.vue
  6. 3 3
      src/components/menu/SideMenu.vue
  7. 7 7
      src/components/tools/setting.js
  8. 38 11
      src/components/uploadFile.vue
  9. 1 0
      src/theme/demo.less
  10. 812 266
      src/views/modules/BatchCreate/TouTiaoBatch.vue
  11. 219 0
      src/views/modules/BatchCreate/components/Treeselect.vue
  12. 993 0
      src/views/modules/BatchCreate/components/material.vue
  13. 10 7
      src/views/modules/BatchCreate/crowedPackage.vue
  14. 210 93
      src/views/modules/BatchCreate/directedPackage.vue
  15. 27 5
      src/views/modules/BatchCreate/editableCell.vue
  16. 20 21
      src/views/modules/BatchCreate/linkMultiSelect.vue
  17. 907 0
      src/views/modules/BatchCreate/newCreate.vue
  18. 817 170
      src/views/modules/BatchCreate/newDirectedPackage.vue
  19. 465 0
      src/views/modules/BatchCreate/newGroup.vue
  20. 1412 0
      src/views/modules/BatchCreate/newPlan.vue
  21. 45 29
      src/views/modules/BatchCreate/radioCheck.vue
  22. 244 167
      src/views/modules/BatchCreate/singleLayerSelecte.vue
  23. 336 0
      src/views/modules/BatchCreate/toutiaoTime.vue
  24. 13 3
      src/views/modules/Statistics/accountMaterStatistics.vue
  25. 13 10
      src/views/modules/Statistics/accountReport.vue
  26. 894 0
      src/views/modules/Statistics/effectReport.vue
  27. 9 1
      src/views/modules/Statistics/materialStatistics.vue
  28. 1 2
      src/views/modules/Statistics/mediaReport.vue
  29. 257 184
      src/views/modules/Statistics/refuseData.vue
  30. 1362 0
      src/views/modules/Statistics/xiaoshouStatistics.vue
  31. 159 0
      src/views/modules/advertiser/KuaishouLoginList.vue
  32. 11 0
      src/views/modules/advertiser/ProjectList.vue
  33. 56 20
      src/views/modules/advertiser/ProjectMemberList.vue
  34. 162 0
      src/views/modules/advertiser/ProjectTransferRecordAuditList.vue
  35. 155 0
      src/views/modules/advertiser/ProjectTransferRecordInitiatedList.vue
  36. 87 3
      src/views/modules/advertiser/UserAllocationList.vue
  37. 15 36
      src/views/modules/advertiser/modules/BindAccountLoginModal.vue
  38. 53 33
      src/views/modules/advertiser/modules/ProjectModal.vue
  39. 154 0
      src/views/modules/advertiser/modules/ProjectTransferRecordModal.vue
  40. 59 25
      src/views/modules/kuaishouapp/account/accountIndex.vue
  41. 67 13
      src/views/modules/kuaishouapp/account/advertisingGroup.vue
  42. 87 29
      src/views/modules/kuaishouapp/account/editGroup.vue
  43. 32 11
      src/views/modules/kuaishouapp/account/editGroupNew.vue
  44. 0 1
      src/views/modules/kuaishouapp/account/originality.vue
  45. 46 13
      src/views/modules/kuaishouapp/account/stepForm/Step2.vue
  46. 247 12
      src/views/modules/kuaishouapp/account/stepForm/Step3.vue
  47. 11 6
      src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue
  48. 980 0
      src/views/modules/material/supplierMaterial.vue
  49. 7 14
      vue.config.js

+ 3 - 0
debug.log

@@ -20,3 +20,6 @@
 [0716/000711.615:ERROR:exception_snapshot_win.cc(98)] thread ID 18896 not found in process
 [0716/000711.616:ERROR:process_reader_win.cc(123)] NtOpenThread: {无法访问} 过程已请求访问一对象,但未给访问权限。 (0xc0000022)
 [0716/000711.617:ERROR:exception_snapshot_win.cc(98)] thread ID 15368 not found in process
+[0727/154120.269:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
+[0727/173939.302:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
+[0729/144506.169:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0

File diff ditekan karena terlalu besar
+ 9053 - 9053
public/color.less


+ 12 - 1
src/App.vue

@@ -1,7 +1,7 @@
 <template>
   <a-locale-provider :locale="locale">
     <div id="app">
-      <router-view/>
+      <router-view />
     </div>
   </a-locale-provider>
 </template>
@@ -40,4 +40,15 @@
   #app {
     height: 100%;
   }
+
+  body {
+    -webkit-user-select: text !important;
+  }
+
+  * {
+    -webkit-user-select: text !important;
+    -moz-user-select: text !important;
+    -ms-user-select: text !important;
+    user-select: text !important;
+  }
 </style>

+ 2 - 1
src/components/DatePicker.vue

@@ -6,6 +6,7 @@
     <a-range-picker v-clickoutside="handleClose"
       v-model="dateValue"
       style="width:250px;"
+      :allowClear=false
       :open="openOptions"
       :disabled-date="disabledDate"
       :openChange="openChange"
@@ -113,7 +114,7 @@ export default {
   data() {
     return {
       moment,
-      dateValue: [],
+      dateValue: [moment(),moment()],
       type: 0,
       pickOptions
       // pickOptions:JSON.parse(JSON.stringify(pickOptions))

+ 29 - 3
src/components/layouts/TabLayout.vue

@@ -92,8 +92,19 @@
       this.pageList.push(this.$route)
       this.linkList.push(this.$route.fullPath)
       this.activePage = this.$route.fullPath
-    },
-    mounted() {
+
+      if(!this.linkList.includes("/account/stepForm")){
+          
+          localStorage.removeItem("step")
+          localStorage.removeItem("campaignId")
+          localStorage.removeItem("pans")
+          localStorage.removeItem("pansKey")
+          localStorage.removeItem("appId")
+      }
+      if(!this.linkList.includes("/account/advertisingGroup")&&!this.linkList.includes("/account/stepForm")){
+          localStorage.removeItem("advertisingGroup")
+          localStorage.removeItem("advertisingGroupKey")
+      }
     },
     watch: {
       '$route': function(newRoute) {
@@ -120,7 +131,22 @@
         } else if (this.linkList.indexOf(newRoute.fullPath) >= 0) {
           let oldIndex = this.linkList.indexOf(newRoute.fullPath)
           let oldPositionRoute = this.pageList[oldIndex]
-          this.pageList.splice(oldIndex, 1, Object.assign({},newRoute,{meta:oldPositionRoute.meta}))
+          this.pageList.splice(oldIndex, 1, Object.assign({}, newRoute, {meta: oldPositionRoute.meta}))
+        }
+        if(!this.linkList.includes("/account/stepForm")){
+          localStorage.removeItem("step")
+          localStorage.removeItem("campaignId")
+          localStorage.removeItem("pans")
+          localStorage.removeItem("pansKey")
+          localStorage.removeItem("appId")
+        }
+        if(!this.linkList.includes("/account/advertisingGroup")&&!this.linkList.includes("/account/stepForm")){
+          localStorage.removeItem("advertisingGroup")
+          localStorage.removeItem("advertisingGroupKey")
+        }
+        if(!this.linkList.includes("/account/originality")&&!this.linkList.includes("/account/stepForm")){
+          localStorage.removeItem("originality")
+          localStorage.removeItem("originalityKey")
         }
       },
       'activePage': function(key) {

+ 3 - 3
src/components/menu/SideMenu.vue

@@ -150,9 +150,9 @@
     & > .ant-menu-item:first-child {
       background-color: transparent;
 
-      & > a, & > a:hover {
-        color: rgba(0, 0, 0, 0.65);
-      }
+    //   & > a, & > a:hover {
+    //     color: rgba(0, 0, 0, 0.65);
+    //   }
 
       &.ant-menu-item-selected {
         & > a, & > a:hover {

+ 7 - 7
src/components/tools/setting.js

@@ -62,11 +62,11 @@ const updateTheme = primaryColor => {
 
   if (!lessNodesAppended) {
     // insert less.js and color.less
-    const lessStyleNode = document.createElement('link');
-    const lessConfigNode = document.createElement('script');
-    const lessScriptNode = document.createElement('script');
-    lessStyleNode.setAttribute('rel', 'stylesheet/less');
-    lessStyleNode.setAttribute('href', '/color.less');
+    // const lessStyleNode = document.createElement('link');
+    // const lessConfigNode = document.createElement('script');
+    // const lessScriptNode = document.createElement('script');
+    // lessStyleNode.setAttribute('rel', 'stylesheet/less');
+    // lessStyleNode.setAttribute('href', '/color.less');
     lessConfigNode.innerHTML = `
       window.less = {
         async: true,
@@ -80,7 +80,7 @@ const updateTheme = primaryColor => {
       buildIt();
       lessScriptNode.onload = null;
     };
-    document.body.appendChild(lessStyleNode);
+    // document.body.appendChild(lessStyleNode);
     document.body.appendChild(lessConfigNode);
     document.body.appendChild(lessScriptNode);
     lessNodesAppended = true;
@@ -91,7 +91,7 @@ const updateTheme = primaryColor => {
 
 const updateColorWeak = colorWeak => {
   // document.body.className = colorWeak ? 'colorWeak' : '';
-  colorWeak ? document.body.classList.add('colorWeak') : document.body.classList.remove('colorWeak')
+//   colorWeak ? document.body.classList.add('colorWeak') : document.body.classList.remove('colorWeak')
 };
 
 export {updateTheme, colorList, updateColorWeak}

+ 38 - 11
src/components/uploadFile.vue

@@ -6,8 +6,8 @@
   <div class="upload-file">
     <a-upload name="file" :multiple="multiple" list-type="picture-card" class="avatar-uploader"
       action="https://media-1301855440.cos.ap-chongqing.myqcloud.com/" :before-upload="beforeUpload"
-      @change="handleChange" :accept="uploadType+'/*'" :file-list="fileList" :remove="removeFile"
-      @preview="handlePreview" :disabled="loadingElse||disabled">
+      @change="handleChange" :accept="uploadType+'/'+(uploadType=='image'?'jpeg,image/jpg':'mp4')" :file-list="fileList"
+      :remove="removeFile" @preview="handlePreview" :disabled="loadingElse||disabled">
       <div v-if="uploadType=='image'?fileList.length < fileCount:fileList.length<1">
         <a-progress v-if='loadingElse' :percent="percent" :show-info="false" />
         <div class="ant-upload-text">
@@ -15,6 +15,7 @@
         </div>
       </div>
     </a-upload>
+    <div style="color:red">{{uploadType=='image'?'请上传jpg格式的图片,并且大小在2m之内':'请上传mp4格式,大小在100m之内'}}</div>
     <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
       <img alt="example" style="width: 100%" :src="previewImage" v-if="uploadType=='image'" />
       <video :src="previewImage" v-else style="width: 100%" controls="controls">您的浏览器不支持 video 标签。</video>
@@ -41,6 +42,7 @@
     SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9',
   });
   var i = 0
+  const oneKB = 1024
 
   function getBase64(file) {
     return new Promise((resolve, reject) => {
@@ -87,7 +89,23 @@
       value: {
         type: [String, Array],
         required: true
-      }
+      },
+      size: {
+        type: Number,
+        default () {
+          if (this.uploadType == 'image') {
+            return 2048
+          } else {
+            return 102400
+          }
+        }
+      },
+      onOversize: {
+        type: Function,
+        default () {
+          alert(`请选择${this.size}KB内的文件!`)
+        }
+      },
     },
     data() {
       return {
@@ -177,15 +195,24 @@
       beforeUpload(file) {
         this.percent = 0
         this.loadingElse = true
-        this.checkFile(file).then(res => {
-          this.cosUpload(file)
-
-        }).catch(() => {
+        const fileOvesize = (file.size > this.size * oneKB)
+        console.log(fileOvesize)
+        if (fileOvesize) {
+          this.onOversize()
           this.loadingElse = false
-        })
-        return new Promise(function (resolve, reject) {
-          reject()
-        })
+          return
+        } else {
+          this.checkFile(file).then(res => {
+            this.cosUpload(file)
+
+          }).catch(() => {
+            this.loadingElse = false
+          })
+          return new Promise(function (resolve, reject) {
+            reject()
+          })
+
+        }
 
       },
       clearAll() {

+ 1 - 0
src/theme/demo.less

@@ -5,6 +5,7 @@
 
 body{
   background-color: #f7f7f7;
+  -webkit-user-select: text;
 }
 img{
   border-radius: 4px;

File diff ditekan karena terlalu besar
+ 812 - 266
src/views/modules/BatchCreate/TouTiaoBatch.vue


+ 219 - 0
src/views/modules/BatchCreate/components/Treeselect.vue

@@ -0,0 +1,219 @@
+<style lang="scss" scoped>
+  .select-project {
+    width: 70%;
+  }
+</style>
+<template>
+  <div class="select-project">
+    <treeselect :multiple="multiple" :disable-branch-nodes="!multiple" :options="options" 
+      placeholder="请选择项目以及账户" v-model="value" :value-consists-of="valueConsistsOf" :auto-load-root-options="false"
+      @select="update" @input="emitValue" :limit="2"  :default-options="true" :limitText="
+        count => {
+          return '隐藏' + count + '条'
+        }
+      " noChildrenText="该项目下暂无账号" :noOptionsText="showLoading" />
+  </div>
+</template>
+
+<script>
+  //   @open="getParticipateList"
+  // import the component
+  import Treeselect from '@riophae/vue-treeselect'
+  // import the styles
+  import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+  import {
+    LOAD_CHILDREN_OPTIONS
+  } from '@riophae/vue-treeselect'
+
+  import {
+    getAction,
+    postAction
+  } from '@/api/manage'
+  import {
+    mapGetters
+  } from 'vuex'
+  // We just use `setTimeout()` here to simulate an async operation
+  // instead of requesting a real API server for demo purpose.
+  let called = false
+  export default {
+    data: () => ({
+      value: null,
+      valueConsistsOf: 'LEAF_PRIORITY',
+      options: [],
+      showLoading: 'loading...'
+    }),
+    props: {
+      //是否多选
+      multiple: {
+        type: Boolean,
+        default () {
+          return true
+        }
+      },
+      //判断媒体类型
+      request: {
+        type: String,
+        default () {
+          return '1,3'
+        }
+      },
+      //一级请求接口
+      reqUrl: {
+        type: String,
+        default () {
+          return '/ctop/projectMember/participateList'
+        }
+
+      }
+    },
+    components: {
+      Treeselect
+    },
+    watch: {
+      $route(n, o) {},
+    //   appId: {
+    //     handler(n, o) {
+    //       console.log(n)
+    //       if (n.length == 0) {
+    //         if (this.multiple) {
+    //           this.value = []
+    //         } else {
+    //           this.value = ''
+    //         }
+    //       }
+    //     },
+    //     deep: true
+    //   }
+    },
+    methods: {
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      update(node, id) {
+          console.log(node)
+        // getAction('/ctop/userAllocation/getAccountListByProjectId', {
+        //   projectId: node.id
+        // }).then(res => {
+        //   // console.log(res)
+        //   if (res.code == 0) {
+        //     if (res.result.length > 0) {
+        //       node.children = res.result.map(item => {
+        //         return {
+        //           id: item.accountId,
+        //           label: item.userName + '         ' + item.authName
+        //         }
+        //       })
+        //     } else {
+
+        //     }
+        //   } else {
+        //     new Error('Failed to load options: network error.')
+        //   }
+        // })
+      },
+      emitValue() {
+        this.$emit('update:appId', this.value)
+      },
+      loadOptions({
+        action,
+        parentNode,
+        callback
+      }) {
+        // Typically, do the AJAX stuff here.
+        // Once the server has responded,
+        // assign children options to the parent node & call the callback.
+        if (action === LOAD_CHILDREN_OPTIONS) {
+          getAction('/ctop/userAllocation/getAccountListByProjectId', {
+            projectId: parentNode.id
+          }).then(res => {
+            if (res.code == 0) {
+              if (res.result.length > 0) {
+                parentNode.children = res.result.map(item => {
+                  return {
+                    id: item.accountId,
+                    label: item.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.authName
+                  }
+                })
+                callback()
+              } else {
+                parentNode.children = []
+                callback()
+              }
+            } else {
+              callback(new Error('Failed to load options: network error.'))
+            }
+          })
+        }
+      },
+      getParticipateList() {
+        //我参与的
+        //   toutiaoParticipateList
+        // getAction(this.reqUrl, {
+        //   userId: this.userInfo().id
+        // }).then(res => {
+        //   if (res.code == 0) {
+        //     if (res.result.length > 0) {
+        //       var arr = this.request.split(',')
+        //       var dataTwo = []
+        //       var data = res.result.filter(item => {
+        //         return item.mediaId == arr[0]
+        //       })
+        //       if (arr.length > 1) {
+        //         dataTwo = res.result.filter(item => {
+        //           return item.mediaId == arr[1]
+        //         })
+        //       }
+        //       var allData = data.concat(dataTwo)
+        //       this.options = allData.map(item => {
+        //         return {
+        //           id: item.projectId,
+        //           label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item
+        //             .advertiserName,
+        //           children: null
+        //         }
+        //       })
+        //     }else{
+        //         this.showLoading = '暂无数据'
+        //     }
+
+        //   }
+        // })
+        this.options=[];
+        this.accountID=undefined;
+            getAction('/ctop/projectMember/getProjectAccountByUserId', {}).then(res => {
+                if(res.success){
+                    // console.log(res);
+                    if(res.result){
+                        res.result.forEach((element,index) => {
+                        if(element){                  
+                            this.options.push({});                    
+                            this.options[index].label=element.project.projectName +'_('+ element.project.advertiserName +')';
+                            this.options[index].id='project'+element.project.projectId;
+                            this.options[index].key=element.project.projectId;
+                            this.options[index].mediaId=element.project.mediaId;
+                            this.options[index].children=[];
+                                                
+                            if(element.account.length){
+                            element.account.forEach((ele,i)=>{
+                                this.options[index].children.push({});
+                                this.options[index].children[i].label=ele.userName+'_'+ele.authName;
+                                this.options[index].children[i].id=ele.accountId;
+                                this.options[index].children[i].key=ele.accountId;
+                            })
+                                
+                            }                           
+                        }      
+                        });
+                        // console.log(this.options)
+                        
+                    }
+                }
+            })
+        
+
+      },
+    },
+
+    mounted() {
+      this.getParticipateList()
+    }
+  }
+</script>

+ 993 - 0
src/views/modules/BatchCreate/components/material.vue

@@ -0,0 +1,993 @@
+<template>
+  <div class="input-item material-creat">
+    <a-form-item>
+      <a-radio-group v-model="materialType" @change="materialTypeChange" style="margin-bottom: 32px;">
+        <!-- <a-badge :count="HorizontalLargeImageListBig.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+          <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
+        </a-badge> -->
+        <a-badge :count="HorizontalLargeImageListShu.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+          <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
+        </a-badge>
+        <a-badge :count="HorizontalLargeImageListHeng.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+          <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
+        </a-badge>
+        <!-- <a-badge :count="HorizontalLargeImageListZu.length" :numberStyle="{backgroundColor: '#52c41a'} "
+          v-if="creativeType=='customCreativity'">
+          <a-radio-button value="CREATIVE_IMAGE_MODE_GROUP">组图</a-radio-button>
+        </a-badge> -->
+        <!-- <a-badge :count="HorizontalLargeImageListSmall.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+          <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL">小图</a-radio-button>
+        </a-badge> -->
+        <!-- <a-badge :count="HorizontalLargeImageListBigShu.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+          <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
+        </a-badge> -->
+      </a-radio-group>
+      <div class="bui-tabs-scroll">
+        <a-layout
+          :style="{ height: '600px',width:'700px',border:'1px solid #ccc',overflow:'auto',padding:'0 15px 10px'}">
+          <a-layout-content style="padding:10px;">
+            <div :style="{ marginBottom: '16px' }">
+              <a-button @click="addCreative()" :disabled="count&&materialType!=undefined">添加创意</a-button>
+              <span style="color:black;margin-left:10px"
+                v-if="creativeType == 'customCreativity'">{{countMany}}/10</span>
+              <span style="color:black;margin-left:10px" v-else>{{countMany}}/12</span>
+            </div>
+            <a-row>
+              <a-col :span="24" v-for="(item,index) of HorizontalLargeImageList" :key="index">
+                <a-card title :ref="item">
+                  <a-icon type="close" style="float:right;cursor: pointer;" @click="deleteCreative(index)" />
+                  <div style="clear:both"></div>
+                  <div class="dynamically_add_form_item">
+                    <a-form-item class label="素材选择" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                      <!-- <upload-to-ali v-model="item.vadioUrl" :customDomain="customDomain" preview :region="region"
+                        :bucket="bucket"
+                        :accept="materialType=='CREATIVE_IMAGE_MODE_VIDEO'||materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'?acceptVideo:acceptImage"
+                        :size="102400" :accessKeyId="accessKeyId" :accessKeySecret="accessKeySecret"></upload-to-ali> -->
+                      <!-- <uploadFile :value.sync="item.vadioUrl" :fileCount="1"
+                        :uploadType="materialType=='CREATIVE_IMAGE_MODE_VIDEO'||materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'?'video':'image'" />
+                         -->
+                      <a
+                        @click="getVideoList(item)">{{materialType=='CREATIVE_IMAGE_MODE_VIDEO'||materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'?'选择视频':'选择图片'}}</a>
+                      <div>
+                        <!-- {{materialType}} -->
+                        <video :src="item.videoUrl" style="width:300px"
+                          v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO'&&item.videoUrl"></video>
+                        <video :src="item.videoUrl" style="width:120px"
+                          v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'&&item.videoUrl"></video>
+                      </div>
+                    </a-form-item>
+
+                    <a-form-item label="封面上传" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                      v-if="(materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'||materialType=='CREATIVE_IMAGE_MODE_VIDEO')">
+                      <!-- <upload-to-ali v-model="item.imageUrl" :customDomain="customDomain" preview :region="region"
+                        :bucket="bucket" :accept="acceptImage" :size="102400" :accessKeyId="accessKeyId"
+                        :accessKeySecret="accessKeySecret"></upload-to-ali> -->
+                      <a @click="getImageList(item)" v-if="item.imageUrl==''">选择图片</a>
+                      <img :src="item.imageUrl" alt="" v-else style="width:120px">
+                    </a-form-item>
+
+                    <a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                      v-if="creativeType == 'customCreativity'">
+                      <a-input v-model="item.text" style="width:400px" class="rending" @change="judge(item)"></a-input>
+                    </a-form-item>
+                    <a-form-item label="动态词包" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                      v-if="creativeType == 'customCreativity'">
+                      <a-tag v-for="(itemTag,indexTag) of tags" :key="indexTag" v-show="indexTag<item.many"
+                        @click="getChange(item,itemTag,index)">{{itemTag.name}}</a-tag>
+                      <span @click="showElseClick(item)">{{item.showElse?"更多":"收起"}}</span>
+                    </a-form-item>
+
+                  </div>
+                </a-card>
+              </a-col>
+            </a-row>
+          </a-layout-content>
+        </a-layout>
+      </div>
+    </a-form-item>
+    <div v-if="creativeType == 'proceduralCreativity'">
+
+      <div style="display:block;font-size: 22px;margin-bottom: 20px;">程序化创意标题</div>
+      <a-button @click="addTitle" class="row-item">添加创意标题</a-button>
+      <br />
+      <div v-for="(item,index) of titleData" :key="index">
+        <a-input style="width:55%;margin-bottom:20px" v-model="item.text" class="rending-all" @change="judge(item)">
+        </a-input>
+        <a-icon type="delete" style="margin-left:20px;cursor: pointer;" v-show="titleData.length>1"
+          @click="tetleDetele(index)" />
+        <br />
+        <a-tag style="margin-bottom:10px" v-for="(itemTag,indexTag) of tags" :key="indexTag"
+          @click="getChangeAllTitle(item,itemTag,index)">
+          {{itemTag.name}}</a-tag>
+      </div>
+    </div>
+    <!-- 创建大图横图创意 -->
+
+    <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemal" @ok="handleOkShow" :width="1000" :height='500'>
+      <div >
+
+     
+      <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
+      <ul v-if="dataSource.length>0" :style="{height:materialType == 'CREATIVE_IMAGE_MODE_VIDEO'?'200px':'380px'}">
+        <a-checkbox-group v-model="checkVideo" @change="onChangeVideo" style="width:100%">
+          <li v-for="(item,index) of dataSource" :key="index" class="chouzhen" >
+
+            <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
+                  您的浏览器不支持 video 标签。
+                </video> -->
+            <a-checkbox :value="item" style="width:100%;position:absolute;z-index: 100;right:0;top:0;">
+
+              <video v-if="materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || materialType ==
+          'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'" class="video" :src="item.videoUrl" controls="controls"
+                style="width:100%;margin-left: -8px;">
+                您的浏览器不支持 video 标签。
+              </video>
+              <img v-else :src="item.imageUrl" alt="" style="width:100%;margin-left: -8px;">
+            </a-checkbox>
+            <!-- <a @click="matemalVideo(item,index)" style="position:absolute;z-index: 100;right:56px;bottom: 5px;">查看视频</a> -->
+          </li>
+        </a-checkbox-group>
+      </ul>
+      <div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
+        <img
+          src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+          alt="" v-if="!loadingVideoList" />
+        <img v-else src="@/views/modules/material/loading.gif" />
+      </div>
+
+      <!-- <ul class="actor-photo-list">
+          <a-checkbox-group v-model="checkArr" style="width:100%;  display: flex;padding-left: 0;"
+            @change="onChangeCheck">
+            <li v-for="(item, index) of dataSource" :key="index">
+              <a-checkbox :value="item" style="position:absolute;z-index:100;padding-right:30px">
+
+              </a-checkbox>
+            </li>
+          </a-checkbox-group>
+        </ul> -->
+      <div style="text-align:right">
+        <a-pagination size="small" :showTotal="ipagination.showTotal" style="float:right" v-if="dataSource.length > 0"
+          showQuickJumper :pageSize.sync="ipagination.pageSize" :total="ipagination.total" v-model="ipagination.current"
+          @change="getDataSource" />
+      </div>
+       </div>
+
+    </a-modal>
+    <a-modal :maskClosable="false" title="选择素材" v-model="visibleMatemalImage" @ok="handleOkShowImage" :width="1000">
+      <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
+      <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0;">
+        <a-checkbox-group v-model="checkVideo" @change="onChangeVideo" style="width:100%">
+          <li v-for="(item,index) of dataSource" :key="index" class="chouzhen" style="height:350px">
+
+            <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
+                  您的浏览器不支持 video 标签。
+                </video> -->
+            <a-checkbox :value="item" style="width:100%;position:absolute;z-index: 100;right:0;top:0;">
+
+              <img :src="item.imageUrl" alt="" style="width:100%;margin-left: -8px;">
+            </a-checkbox>
+            <!-- <a @click="matemalVideo(item,index)" style="position:absolute;z-index: 100;right:56px;bottom: 5px;">查看视频</a> -->
+          </li>
+        </a-checkbox-group>
+      </ul>
+      <div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
+        <img
+          src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+          alt="" v-if="!loadingVideoList" />
+        <img v-else src="@/views/modules/material/loading.gif" />
+      </div>
+
+      <!-- <ul class="actor-photo-list">
+          <a-checkbox-group v-model="checkArr" style="width:100%;  display: flex;padding-left: 0;"
+            @change="onChangeCheck">
+            <li v-for="(item, index) of dataSource" :key="index">
+              <a-checkbox :value="item" style="position:absolute;z-index:100;padding-right:30px">
+
+              </a-checkbox>
+            </li>
+          </a-checkbox-group>
+        </ul> -->
+      <div style="text-align:right">
+        <a-pagination size="small" :showTotal="ipagination.showTotal" style="float:right" v-if="dataSource.length > 0"
+          showQuickJumper :pageSize.sync="ipagination.pageSize" :total="ipagination.total" v-model="ipagination.current"
+          @change="getDataSource" />
+      </div>
+    </a-modal>
+    <a-modal title="查看视频" v-model="visibleVideo" :width="300" :footer="null">
+      <video class="video" :src="videoUrlShow" controls="controls" style="width:100%">
+        您的浏览器不支持 video 标签。
+      </video>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+  import uploadFile from '@/components/uploadFile.vue'
+  import {
+    postAction,
+    getAction,
+    getPackage
+  } from '@/api/manage'
+  import {
+    stopOtherVideo,
+    closeAllVideoFun
+  } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+  import moment from 'moment'
+  import AFormItem from 'ant-design-vue/es/form/FormItem'
+  import $ from 'jquery'
+  import qs from 'qs'
+  export default {
+    name: 'BaseForm',
+    props: {
+      accountId: {
+        default () {
+          return ''
+        }
+      },
+      creativeType: {
+        type: String,
+        default () {
+          return 'customCreativity'
+        }
+      }
+    },
+    components: {
+      AFormItem,
+      //   UploadToAli,
+      uploadFile
+    },
+    data() {
+      return {
+        visibleMatemal: false,
+        visibleVideo: false,
+        videoUrlShow: "",
+        dataSource: [],
+        loadingVideoList: false,
+        time: [],
+        checkVideo: [],
+        labelCol: {
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 5
+          }
+        },
+        wrapperCol: {
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 16
+          }
+        },
+        visibleMatemalImage: false,
+        accessKeyId: 'LTAIbNbqWzSOklQV',
+        accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
+        bucket: 'ctop-media',
+        region: 'oss-cn-beijing',
+        acceptImage: 'image/jpeg,image/png',
+        acceptVideo: 'video/mpeg,video/mp4',
+        customDomain: '',
+        form: this.$form.createForm(this),
+        url: {
+          userAllocationList: '/template/allocation/list',
+          insertUrl: '/template/creative/insert',
+          industryListUrl: '/template/bytedance/industry/list',
+          campaignListUrl: '/template/campaign/list',
+          budgetTemplateListUrl: '/template/budget/list',
+          deliverytargetTemplateListUrl: '/template/deliverytarget/list',
+          userorentationTemplateListUrl: '/template/userorentation/list',
+          deliverytargetTemplateGetUrl: '/template/deliveryTarget/get',
+          convertList: 'template/convert/list'
+        },
+        materialType: 'CREATIVE_IMAGE_MODE_VIDEO',
+        // 创建大图横图创意
+        createLargeImageCreativeCon: true,
+        HorizontalLargeImageList: [],
+        HorizontalLargeImageListBig: [],
+        HorizontalLargeImageListHeng: [],
+        HorizontalLargeImageListShu: [],
+        HorizontalLargeImageListZu: [],
+        HorizontalLargeImageListSmall: [],
+        HorizontalLargeImageListBigShu: [],
+        horizonImageUrlColl: [], // 大图横图图片素材集合
+        horizonImageCreativeTextColl: [], // 创意标题集合
+        itemIndex: null,
+        tags: [],
+        range: null,
+        countTag: 0,
+        titleData: [{
+          text: '',
+          creativeWordIds: [],
+          showElse: true,
+          titleMany: 0
+        }],
+        nowItem: null,
+        ipagination: {
+          current: 1,
+          pageSize: 5,
+          //   pageSizeOptions: ['10', '20', '30'],
+          showTotal: (total, range) => {
+            return range[0] + '-' + range[1] + ' 共' + total + '条'
+          },
+          showQuickJumper: true,
+          //   showSizeChanger: true,
+          total: 0,
+          onChange: current => {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current
+          }
+        },
+        isImg:false,
+      }
+    },
+    methods: {
+      getDataSource(page, pageSize) {
+        console.log(this.isImg)
+        this.ipagination.current = page
+        var params = {}
+        params.accountId = "1649600126891015"
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = page
+        if (this.time.length > 0) {
+          params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+          params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        }
+        if ((this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
+          'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL')&&!this.isImg) {
+          if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
+            params.type = 2
+          } else {
+            params.type = 1
+          }
+          this.showVideoList('/bytedance/batch/getVideoList', params)
+        } else if(this.isImg){
+          console.log(this.isImg)
+          this.showVideoList('/bytedance/batch/getImageList', params)
+        }
+      },
+      getImageList(item) {
+        this.checkVideo = []
+        this.nowItem = item
+        this.visibleMatemalImage = true
+
+        this.ipagination.current = 1
+
+        this.isImg=true;
+        var params = {}
+        params.accountId = '1649600126891015'
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+        if (this.time.length > 0) {
+          params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+          params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        }
+        this.showVideoList('/bytedance/batch/getImageList', params)
+      },
+      onChangeVideo() {
+        if (this.checkVideo.length > 1) {
+          this.checkVideo.shift()
+        }
+      },
+      matemalVideo(item, index) {
+        this.visibleVideo = true
+        this.videoUrlShow = item.url
+      },
+      handleOkShow() {
+        this.visibleMatemal = false
+        if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
+          'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
+
+          this.nowItem.videoId = this.checkVideo[0].id
+          this.nowItem.videoUrl = this.checkVideo[0].videoUrl
+        } else {
+          this.nowItem.imageId = this.checkVideo[0].id
+          this.nowItem.imageUrl = this.checkVideo[0].imageUrl
+        }
+      },
+      handleOkShowImage() {
+        this.visibleMatemalImage = false
+        this.nowItem.imageId = this.checkVideo[0].id
+        this.nowItem.imageUrl = this.checkVideo[0].imageUrl
+      },
+      getVideoList(item) {
+        this.checkVideo = []
+        this.nowItem = item
+        this.visibleMatemal = true
+        this.isImg=false
+        this.ipagination.current = 1
+        var params = {}
+        params.accountId = '1649600126891015'
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+        if (this.time.length > 0) {
+          params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+          params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        }
+        if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO' || this.materialType ==
+          'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
+          if (this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO') {
+            params.type = 2
+          } else {
+            params.type = 1
+          }
+
+          this.showVideoList('/bytedance/batch/getVideoList', params)
+        } else {
+          this.showVideoList('/bytedance/batch/getImageList', params)
+        }
+
+      },
+      showVideoList(url, params) {
+        this.dataSource = []
+        this.loadingVideoList = true
+
+        getAction(url, params).then(res => {
+          if (res.success) {
+            this.dataSource = res.result.records
+            this.ipagination.total = res.result.total
+            this.loadingVideoList = false
+          } else {
+            this.loadingVideoList = false
+          }
+        })
+      },
+      judge(item) {
+        var re = /{(.*?)}/g
+        var array = []
+        var temp
+        while ((temp = re.exec(item.text))) {
+          array.push(temp[1])
+        }
+        console.log(array)
+        item.countTag = array.length
+      },
+      getChange(item, tag, index) {
+        this.judge(item)
+        if (item.text == '') {
+          item.countTag = 0
+        }
+        if (item.countTag >= 2) {
+          this.$message.error('最多插入两条词包')
+          // item.countTag = 2
+          return
+        }
+        var node = document.getElementsByClassName('rending')[index]
+        var v = '{' + tag.name + '}'
+
+        if (document.selection) {
+          //IE
+          node.focus()
+          var sel = document.selection.createRange()
+          sel.text = v
+          sel.select()
+          item.creativeWordIds.push(tag.creative_word_id)
+        } else if (node.selectionStart || node.selectionStart == '0') {
+          //MOZILLA/GOOGLE
+          var startPos = node.selectionStart
+          var endPos = node.selectionEnd
+          var restoreTop = node.scrollTop
+          node.value = node.value.substring(0, startPos) + v + node.value.substring(endPos, node.value.length)
+          if (restoreTop > 0) {
+            node.scrollTop = restoreTop
+          }
+          item.text = node.value
+          item.creativeWordIds.push(tag.creative_word_id)
+          node.focus()
+          node.selectionStart = startPos + v.length
+          node.selectionEnd = startPos + v.length
+        } else {
+          //OTHER
+          node.value += v
+          item.creativeWordIds.push(tag.creative_word_id)
+          item.text = node.value
+          node.focus()
+        }
+      },
+      getChangeAllTitle(item, tag, index) {
+        this.judge(item)
+        if (item.text == '') {
+          item.countTag = 0
+        }
+        if (item.countTag >= 2) {
+          this.$message.error('最多插入两条词包')
+          // item.countTag = 2
+          return
+        }
+        var node = document.getElementsByClassName('rending-all')[index]
+        var v = '{' + tag.name + '}'
+        item.creativeWordIds.push(tag.creative_word_id)
+        if (document.selection) {
+          //IE
+          node.focus()
+          var sel = document.selection.createRange()
+          sel.text = v
+          sel.select()
+        } else if (node.selectionStart || node.selectionStart == '0') {
+          //MOZILLA/GOOGLE
+          var startPos = node.selectionStart
+          var endPos = node.selectionEnd
+          var restoreTop = node.scrollTop
+          node.value = node.value.substring(0, startPos) + v + node.value.substring(endPos, node.value.length)
+          if (restoreTop > 0) {
+            node.scrollTop = restoreTop
+          }
+          item.text = node.value
+          node.focus()
+          node.selectionStart = startPos + v.length
+          node.selectionEnd = startPos + v.length
+        } else {
+          //OTHER
+          node.value += v
+          item.text = node.value
+          node.focus()
+        }
+      },
+      showElseClick(item) {
+        item.showElse = !item.showElse
+        if (!item.showElse) {
+          item.many = this.tags.length
+        } else {
+          item.many = 3
+        }
+      },
+      materialTypeChange() {
+        let type = this.materialType
+        if (type === 'CREATIVE_IMAGE_MODE_SMALL') {
+          // this.createLargeImageCreativeCon = false
+          this.showLargeImage = false
+          this.showLargeVerticalImage = false
+          this.showHorizonVideo = false
+          this.showVerticalVideo = false
+          this.showGroupImage = false
+          this.showSmallImage = true
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListSmall
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_LARGE') {
+          // this.createLargeImageCreativeCon = true
+          this.showLargeImage = false
+          this.showLargeVerticalImage = false
+          this.showHorizonVideo = false
+          this.showVerticalVideo = false
+          this.showGroupImage = false
+          this.showSmallImage = false
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListBig
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_GROUP') {
+          // this.createLargeImageCreativeCon = false
+          this.showLargeImage = false
+          this.showLargeVerticalImage = false
+          this.showHorizonVideo = false
+          this.showVerticalVideo = false
+          this.showGroupImage = true
+          this.showSmallImage = false
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListZu
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_VIDEO') {
+          // this.createLargeImageCreativeCon = false
+          this.showLargeImage = false
+          this.showLargeVerticalImage = false
+          this.showHorizonVideo = true
+          this.showVerticalVideo = false
+          this.showGroupImage = false
+          this.showSmallImage = false
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListShu
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_LARGE_VERTICAL') {
+          // this.createLargeImageCreativeCon = false
+          this.showLargeImage = false
+          this.showLargeVerticalImage = true
+          this.showHorizonVideo = false
+          this.showVerticalVideo = false
+          this.showGroupImage = false
+          this.showSmallImage = false
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListBigShu
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
+          // this.createLargeImageCreativeCon = false
+          this.showLargeImage = false
+          this.showLargeVerticalImage = false
+          this.showHorizonVideo = false
+          this.showVerticalVideo = true
+          this.showGroupImage = false
+          this.showSmallImage = false
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListHeng
+        }
+      },
+      //   创建大图横图创意
+      addCreative() {
+        let type = this.materialType
+        this.getTags()
+        if (type === 'CREATIVE_IMAGE_MODE_SMALL') {
+          this.HorizontalLargeImageListSmall.push({
+            ImageMode: type,
+            imageUrl: '',
+            imageId: '',
+            text: '',
+            creativeWordIds: [],
+            vadioUrl: '',
+            videoId: '',
+            multiple: [],
+            countTag: 0,
+            many: 3,
+            showElse: true
+          })
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListSmall
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_LARGE') {
+          this.HorizontalLargeImageListBig.push({
+            imageMode: type,
+            imageUrl: '',
+            imageId: '',
+            text: '',
+            creativeWordIds: [],
+            vadioUrl: '',
+            videoId: '',
+            multiple: [],
+            countTag: 0,
+            many: 3,
+            showElse: true
+          })
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListBig
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_GROUP') {
+          this.HorizontalLargeImageListZu.push({
+            creativeType: this.creativeType,
+            imageMode: type,
+            imageUrl: '',
+            imageId: '',
+            text: '',
+            creativeWordIds: [],
+            vadioUrl: '',
+            videoId: '',
+            multiple: [],
+            countTag: 0,
+            many: 3,
+            showElse: true
+          })
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListZu
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_VIDEO') {
+          this.HorizontalLargeImageListShu.push({
+            creativeType: this.creativeType,
+            imageMode: type,
+            imageUrl: '',
+            imageId: '',
+            text: '',
+            creativeWordIds: [],
+            vadioUrl: '',
+            videoId: '',
+            multiple: [],
+            countTag: 0,
+            many: 3,
+            showElse: true
+          })
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListShu
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_LARGE_VERTICAL') {
+          this.HorizontalLargeImageListBigShu.push({
+            creativeType: this.creativeType,
+            imageMode: type,
+            imageUrl: '',
+            imageId: '',
+            text: '',
+            creativeWordIds: [],
+            vadioUrl: '',
+            videoId: '',
+            multiple: [],
+            countTag: 0,
+            many: 3,
+            showElse: true
+          })
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListBigShu
+        }
+        if (type === 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL') {
+          this.HorizontalLargeImageListHeng.push({
+            creativeType: this.creativeType,
+            imageMode: type,
+            imageUrl: '',
+            imageId: '',
+            text: '',
+            creativeWordIds: [],
+            vadioUrl: '',
+            videoId: '',
+            multiple: [],
+            countTag: 0,
+            many: 3,
+            showElse: true
+          })
+          this.HorizontalLargeImageList = this.HorizontalLargeImageListHeng
+        }
+      },
+      deleteCreative(index) {
+        console.log(index)
+        console.log(this.HorizontalLargeImageList)
+        this.HorizontalLargeImageList.splice(index, 1)
+      },
+      getTags() {
+        // let accountInfo = localStorage.getItem('accountInfo')
+        // console.log(groupInfo)
+
+        getAction('/bytedance/batch/creative/words/get', {
+          accountId: '1649600126891015'
+        }).then(res => {
+          if (res.code == '0') {
+            this.tags = res.creative_word
+          } else {
+            this.tags = []
+          }
+        })
+      },
+      addTitle() {
+        this.titleData.push({
+          text: '',
+          creativeWordIds: [],
+          titleMany: 0,
+          creativeWordIds: []
+        })
+      },
+      tetleDetele(index) {
+        this.titleData.splice(index, 1)
+      }
+    },
+    created: function () {
+      this.$nextTick(() => {
+        this.getTags()
+      })
+    },
+    watch: {
+      creativeType: function (n, o) {
+        console.log(n, o)
+        this.HorizontalLargeImageListBig = []
+        this.HorizontalLargeImageListHeng = []
+        this.HorizontalLargeImageListShu = []
+        this.HorizontalLargeImageListZu = []
+        this.HorizontalLargeImageListSmall = []
+        this.HorizontalLargeImageListBigShu = []
+        this.HorizontalLargeImageList = []
+      },
+      materialType: function (n, o) {
+        this.materialTypeChange()
+      },
+      visibleVideo(n, o) {
+        if (!n) {
+          closeAllVideoFun()
+        }
+      },
+      time(n, o) {
+        console.log(n)
+        if (n.length > 0) {
+          var params = {}
+          params.accountId = "1649600126891015"
+          params.pageSize = this.ipagination.pageSize
+          params.pageNo = 1
+          params.startDate = moment(n[0]).format('YYYY-MM-DD')
+          params.endDate = moment(n[1]).format('YYYY-MM-DD')
+          this.showVideoList('/bytedance/batch/getVideoList', params)
+        } else {
+          var params = {}
+          params.accountId = "1649600126891015"
+          params.pageSize = this.ipagination.pageSize
+          params.pageNo = 1
+          this.ipagination.current = 1
+          this.showVideoList('/bytedance/batch/getVideoList', params)
+        }
+      },
+    },
+    computed: {
+      count: function () {
+        var bool
+        if (this.creativeType == 'customCreativity') {
+          bool =
+            this.HorizontalLargeImageListBig.length +
+            this.HorizontalLargeImageListHeng.length +
+            this.HorizontalLargeImageListShu.length +
+            this.HorizontalLargeImageListZu.length +
+            this.HorizontalLargeImageListSmall.length +
+            this.HorizontalLargeImageListBigShu.length >=
+            10 ?
+            true :
+            false
+        } else {
+          if (
+            this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL' ||
+            this.materialType == 'CREATIVE_IMAGE_MODE_VIDEO'
+          ) {
+            bool = this.HorizontalLargeImageListHeng.length + this.HorizontalLargeImageListShu.length >= 12 ? true :
+              false
+          } else {
+            bool =
+              this.HorizontalLargeImageListBig.length +
+              this.HorizontalLargeImageListZu.length +
+              this.HorizontalLargeImageListSmall.length +
+              this.HorizontalLargeImageListBigShu.length >=
+              10 ?
+              true :
+              false
+          }
+        }
+        return bool
+      },
+      countMany: function () {
+        var bool =
+          this.HorizontalLargeImageListBig.length +
+          this.HorizontalLargeImageListHeng.length +
+          this.HorizontalLargeImageListShu.length +
+          this.HorizontalLargeImageListZu.length +
+          this.HorizontalLargeImageListSmall.length +
+          this.HorizontalLargeImageListBigShu.length
+        return bool
+      },
+      vadioMany: function () {
+        var bool = this.HorizontalLargeImageListHeng.length + this.HorizontalLargeImageListShu.length
+        return bool
+      },
+      imgMany: function () {
+        var bool =
+          this.HorizontalLargeImageListBig.length +
+          this.HorizontalLargeImageListZu.length +
+          this.HorizontalLargeImageListSmall.length +
+          this.HorizontalLargeImageListBigShu.length
+        return bool
+      }
+    }
+  }
+</script>
+
+
+<style lang="scss">
+  .material-creat {
+    .ant-layout {
+      background: white;
+    }
+
+    .ant-scroll-number {
+      z-index: 1000;
+    }
+  }
+
+  .dynamically_add_form_item {
+    .ant-form-item-label {
+      width: auto !important;
+    }
+
+    .ant-form-item-control-wrapper {
+      width: auto !important;
+    }
+  }
+</style>
+<style lang="scss" scoped>
+  ul,
+  li {
+    margin: 0;
+    padding: 0;
+  }
+
+  .moduler {
+    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;
+    }
+
+    .row-item {
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      margin-bottom: 32px;
+    }
+
+    .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: 5px;
+    }
+
+    .row-item .label-item {
+      position: relative;
+      align-items: flex-start;
+      align-self: flex-start;
+      line-height: 20px;
+      height: 20px;
+      margin-top: 7px;
+      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;
+      }
+
+      .inventory-tags-lists-header {
+        background-color: #F8F9FA;
+        border: 1px solid #E4E9ED;
+        height: 36px;
+        line-height: 33px;
+        border-radius: 4px 4px 0 0;
+        font-weight: bold;
+        display: flex;
+      }
+
+      .inventory-tags-lists-container {
+        border: 1px solid #E4E9ED;
+        margin-top: -1px;
+        height: 100%;
+        padding: 4px 0px;
+        border-radius: 0 0 4px 4px;
+      }
+
+      .inventory-tags-lists-item {
+        width: 100%;
+        height: 37px;
+        line-height: 37px;
+        padding-left: 12px;
+        padding-right: 12px;
+        display: flex;
+        font-size: 14px;
+        color: #333;
+      }
+    }
+  }
+
+  .opt {
+    text-align: right;
+  }
+  ul{
+    overflow:auto;
+    padding-left:0
+  }
+  .chouzhen {
+    border-style: solid;
+    border-width: 1px;
+    border-color: #e4e4e4;
+    width: calc(20% - 10px);
+    padding: 10px;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+    background: #fff;
+    position: relative;
+    z-index: 99;
+    float: left
+  }
+</style>

+ 10 - 7
src/views/modules/BatchCreate/crowedPackage.vue

@@ -452,7 +452,7 @@ export default {
             console.log(this.accountId)
         },
         treeSearch(){
-            console.log(arguments);
+            // console.log(arguments);
         },
         treeSelect(){
             // console.log(arguments);
@@ -466,16 +466,16 @@ export default {
         },
         //日期改变
         dateChange(date, dateString) {
-            console.log(date, dateString);
+            // console.log(date, dateString);
             this.dateValue=date;
         },
         //按名字搜索
         onSearch(value) {
-            console.log(value);
+            // console.log(value);
         },
         //批量操作
         batchChange(val){
-            console.log(val)
+            // console.log(val)
             this.batchValue=val
         },
         //查询按钮
@@ -511,7 +511,7 @@ export default {
         },
         //匹配类型
         matchChange(val){
-            console.log(val)
+            // console.log(val)
         },
         //上传人群包--选择已有的人群分组
         showGroupPage(){
@@ -525,7 +525,7 @@ export default {
         },
  
         filterOption(input, option){
-            console.log(input, option)
+            // console.log(input, option)
             return (
                 option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
                 );
@@ -619,7 +619,10 @@ export default {
             }
             
         }
-    }
+    },
+    mounted() {
+        
+    },
 }
 </script>
 <style lang="scss">

+ 210 - 93
src/views/modules/BatchCreate/directedPackage.vue

@@ -1,32 +1,64 @@
 <template>
     <div class="directionalPackage">
-        <div class="tableBOX">
-            <div class="tableOpt">
-                <a-button class="search" type='primary' @click="openDirectionalPackage">新建定向包</a-button>
+        <!-- <div class="topOptions">
+           
+                <span class="OptinItem topOpt">               
+                    <a-tree-select
+                        show-search
+                        allow-clear
+                        dropdownMatchSelectWidth
+                        v-model="accountID"
+                        style="width: 60%"
+                        :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                        :tree-data="treeData"
+                        placeholder="请选择具体账户"                   
+                        :filterOption='filterOption'
+                        treeNodeFilterProp='title'
+                        @change='accountIDChange'                  
+                    >
+                        
+                    </a-tree-select>
+                </span>
+                <span class="timepcik">
 
-             
-                <a-button class="addCol" type='primary' @click="addcolumns">自定义列</a-button>
+                </span>
+                <span class="optionBtn">
+                    <a-button type='primary' @click="search" class="searchBtn">查询</a-button>
+                    
+                </span>
+        </div> -->
+        <div class="tableBOX">
+           
+            <div class="newOpt">
+                    <a-button class="search" type='primary' @click="openDirectionalPackage">新建定向包</a-button>
             </div>
             <div class="tableArea">
                 <a-table 
-                :columns="columns" 
-                :data-source="dataSource" 
-                :row-selection="rowSelection" 
-                bordered
+                    :columns="columns" 
+                    :data-source="dataSource" 
+                    :pagination="ipagination"
+                    bordered
+                    @change="sort"
+                    size='middle'
                 >
-                    <template slot="campaignName" slot-scope="text,record">                                       
-                        <editableCell :text="text" slotName='campaignName' @change="onCellChange(record.key, 'campaignName', $event)" />                       
-                    </template>
-                    <span slot="groupBudget" slot-scope="text,record">
-                       <editableCell :text="text" slotName='groupBudget' @change="onCellChange(record.key, 'groupBudget', $event)" /> 
+                    
+                    <span slot="landingType" slot-scope="text">
+                        <span v-if="text=='EXTERNAL'">落地页</span>
+                        <span v-if="text=='APP_ANDROID'">应用下载-安卓</span>
+                        <span v-if="text=='APP_IOS'">应用下载-IOS</span>
+                        <span v-if="text=='AWEME'">抖音推广</span>                       
+                    </span>
+                    <span slot="deliveryRange" slot-scope="text">
+                        <span v-if="text=='DEFAULT'">默认</span>
+                        <span v-if="text=='UNION'">穿山甲</span>                     
                     </span>
                     
                     <span slot="operation" slot-scope="text,record">
-                        <a href="javascript:;" style="margin-right:10px">推送</a>
+                        <a href="javascript:;" style="margin-right:10px" @click="editDirectedPackage(record.id)">编辑</a>
                         <a-popconfirm
                             v-if="dataSource.length"
                             title="确定要删除吗?"
-                            @confirm="() => onDelete(record.key)"
+                            @confirm="() => onDelete(record)"
                         >
                             <a href="javascript:;">删除</a>
                         </a-popconfirm>        
@@ -49,44 +81,45 @@
 <script>
 import moment from 'moment';
 import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+import { JeecgListMixin } from '@/mixins/ipagination'
+import qs from 'qs'
 const columns = [
   {
     title: '定向包名称',
-    dataIndex: 'userName',
+    dataIndex: 'name',
     align: 'center',
-    key:'userName',
-    scopedSlots: { customRender: 'userName' }
+    key:'name',
+    scopedSlots: { customRender: 'name' }
   },
   {
     title: '定向描述',
-    dataIndex: 'department',
+    dataIndex: 'description',
     align: 'center', 
-    key: 'department',
-    scopedSlots: { customRender: 'department' }
+    key: 'description',
+    scopedSlots: { customRender: 'description' }
   },
   {
     title: '定向包类型',
-    dataIndex: 'roleName',
-    align: 'center',
-    
-    key: 'roleName',
-    scopedSlots: { customRender: 'roleName' }
+    dataIndex: 'landingType',
+    align: 'center',   
+    key: 'landingType',
+    scopedSlots: { customRender: 'landingType' }
   },
   
   {
     title: '投放范围',
-    dataIndex: 'cost',
+    dataIndex: 'deliveryRange',
     align: 'center',
-    scopedSlots: { customRender: 'cost' },
-    sorter:()=>{}
+    scopedSlots: { customRender: 'deliveryRange' },
+   
   },
-  {
-    title: '关联计划',
-    dataIndex: 'accountName',
-    align: 'center',
-    scopedSlots: { customRender: 'accountName' },
-    
-  },   
+    // {
+    //     title: '关联计划',
+    //     dataIndex: 'accountName',
+    //     align: 'center',
+    //     scopedSlots: { customRender: 'accountName' },
+        
+    // },   
   {
     title: '操作',
     dataIndex: 'operation',
@@ -98,65 +131,130 @@ const columns = [
 
 
 export default {
+    mixins: [JeecgListMixin],
     data() {
         return {
              //主页的表格
-            dataSource:[
-                {
-                    userName:'人群纠错包1',
-                    department:'运算',
-                    roleName:'2020-6-10',
-                    cost:16897546322,
-                    accountName:'伊对-01',
-                    status:true,
-                    key:0
-                },
-                {
-                    userName:'人群纠错包2',
-                    department:'运算',
-                    roleName:'2020-6-10',
-                    cost:16897322,
-                    accountName:'伊对-02',
-                    status:false,
-                    key:1
-                },
-                {
-                    userName:'人群纠错包3',
-                    department:'运算',
-                    roleName:'2020-6-10',
-                    cost:16322,
-                    accountName:'伊对-03',
-                    status:true,
-                    key:2
-                },
-            ],
+            dataSource:[],
             columns,
-            selectedRowKeys:[],
-            rowSelection:{
-                onChange: (selectedRowKeys, selectedRows) => {
-                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-                    console.log(selectedRowKeys);
-                    this.selectedRowKeys=selectedRowKeys;
-                },
-                onSelect: (record, selected, selectedRows) => {
-                    console.log(record, selected, selectedRows);
-                    
-                },
-                onSelectAll: (selected, selectedRows, changeRows) => {
-                    console.log(selected, selectedRows, changeRows);
-                    
-                },
-            },
+            accountID:undefined,
+            treeData:[],
+            userId:''
         }
     }, 
     methods: {
         openDirectionalPackage(){
             this.$router.push({path:'/BatchCreate/newDirectedPackage'})
         },
-        //自定义列
-        addcolumns(){
+        filterOption(input, option){
+            console.log(input, option)
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+        },
+        accountIDChange(val){
+            console.log(val);
+            let currentData=this.treeData.filter((item)=>{
+                return item.value==val
+            })
+            console.log(currentData);
+            if(currentData.length>0){
+                this.accountID=undefined;
+                this.openID=val
+            }
+        },
+        //请求项目和账户内容
+        accountHttp(){
+            this.treeData=[];
+            this.accountID=undefined;
+            getAction('/ctop/projectMember/getProjectAccountByUserId', {}).then(res => {
+            if(res.success){
+                    // console.log(res);
+                if(res.result){
+                    res.result.forEach((element,index) => {
+                    if(element){                  
+                        this.treeData.push({});                    
+                        this.treeData[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
+                        this.treeData[index].value='project'+element.project.projectId;
+                        this.treeData[index].key=element.project.projectId;
+                        this.treeData[index].mediaId=element.project.mediaId;
+                        this.treeData[index].children=[];
+                                            
+                        if(element.account.length){
+                        element.account.forEach((ele,i)=>{
+                            this.treeData[index].children.push({});
+                            this.treeData[index].children[i].title=ele.userName+'_'+ele.authName;
+                            this.treeData[index].children[i].value=ele.accountId;
+                            this.treeData[index].children[i].key=ele.accountId;
+                        })
+                            
+                        }                           
+                    }      
+                    });
+                    // console.log(this.treeData)
+                    
+                }
+            }
+            })
+        },
+        sort(pagination, filters, sorter, { currentDataSource }){
+            console.log(pagination, filters, sorter)           
+            // this.ipagination.current=pagination.current;
+            getAction('/ctop/audiencePackage/queryByUserId',{
+                userId:this.userId,
+                pageNo:this.ipagination.current
+            }).then((res)=>{
+                console.log(res);
+                this.dataSource=res.result.records;
+                this.ipagination.total=res.result.total
+            })
+        },
+        search(){
+            this.dataSource=[];
+            if(this.accountID){
+                
+            }else{
+                this.$message.error('请先选择账户!')
+            }
+        },
+        onDelete(record){
+            console.log(record);
+            let params=qs.stringify({
+                id:record.id
+            })
+            postAction('/ctop/audiencePackage/delete',params).then((res)=>{
+                console.log(res);
+                if(res.success){
+                    this.getTableList()
+                }else{
+                    this.$message.error('删除失败,请稍后重试!')
+                }
+            })
+        },
+        editDirectedPackage(id){
+            this.$router.push(`/BatchCreate/newDirectedPackage?id=${id}`)
+        },
+        getTableList(){
+            getAction('/ctop/audiencePackage/queryByUserId',{
+                userId:this.userId
+            }).then((res)=>{
+                console.log(res);
+                this.dataSource=res.result.records;
+                this.ipagination.total=res.result.total
+            })
+        },
+    },
+    watch:{
 
-        }
+    },
+    mounted() {
+         this.accountHttp();
+
+         let userinfo=localStorage.getItem('pro__Login_Userinfo')
+         if(userinfo){
+             this.userId=JSON.parse(userinfo).value.id
+         }
+        this.getTableList()
     },
     filters: {
         toPercentage(val) {
@@ -252,19 +350,38 @@ export default {
 
 <style lang="scss" scoped>
 .directionalPackage{
-    .tableBOX{
-        background: #fff;
+    .topOptions{
         padding: 15px 15px;
-        .tableOpt{
+        background-color: #fff;
+        margin-bottom: 15px;
+        .topOpt{
+            width: 100%;
             margin-bottom: 10px;
-            .search{
-                margin-right: 15px;
-            }
-            .addCol{
-                float:right;
+        }
+    
+        .search{
+            margin-right: 15px;
+        }
+        .addCol{
+            float:right;
 
+        }
+        .optionBtn{
+            // display: inline-block;
+            float: right;
+            .searchBtn{
+                margin-right: 10px;
             }
         }
+    }
+    .tableBOX{
+        background: #fff;
+        padding: 15px 15px;
+        
+        
+        .newOpt{
+            margin-bottom: 10px;
+        }
         
     }
 

+ 27 - 5
src/views/modules/BatchCreate/editableCell.vue

@@ -2,15 +2,16 @@
     <div class="myedit">
         <div class="editable-cell">
         <div v-if="editable" class="editable-cell-input-wrapper">
-          <a-input :value="value" @change="handleChange" @pressEnter="check" /><a-icon
+          <a-input v-model="value" @blur="blurChange" @change="handleChange" @pressEnter="check" /><a-icon
             type="check"
             class="editable-cell-icon-check"
             @click="check"
           />
         </div>
         <div v-else class="editable-cell-text-wrapper">
-          {{ value*1? `日预算:${value*1}` :value }}
-          
+          <span v-if="slotName=='budget'">{{ value*1? `日预算:${value*1}` :value }}</span>
+          <span v-if="slotName=='bid'">{{ value*1? `${value*1}` :value }}</span>
+          <span v-if="slotName=='name'">{{value}}</span>
           <a-icon type="edit" class="editable-cell-icon" @click="edit" />
         </div>
       </div>
@@ -27,11 +28,19 @@
               editable: false,
             };
         },
+        watch:{
+          text:{
+            handler(n,o){
+              this.value=n
+            },
+            deep:true
+          }
+        },
         methods: {
-            handleChange(e) {
+            blurChange(e) {
               console.log(e)
               const value = e.target.value;
-              if(this.slotName=='groupBudget'){
+              if(this.slotName=='budget'){
                 if(this.value*1){
                   if(value*1 && value*1>300 &&value*1<9999999.99){
                     this.value = value;
@@ -41,9 +50,22 @@
                 }else{
                   this.value='不限'
                 }    
+              }else if(this.slotName=='bid'){
+                if(this.value*1){
+                  if(value*1 && value*1>0.1 &&value*1<9999999.99){
+                    this.value = value;
+                  }else{
+                    this.$message.error('请输入0.1-9999999.99的数')
+                  }
+                }else{
+                  this.value='不限'
+                }   
               }
               
             },
+            handleChange(e){
+              console.log(e)
+            },
             check() {
               this.editable = false;
               this.$emit('change', this.value);

+ 20 - 21
src/views/modules/BatchCreate/linkMultiSelect.vue

@@ -22,7 +22,7 @@
     </div>
 
     <div class="rightBox">
-      <div class="title">已选<a-button class="clear" type="link" @click="clearAll">清空</a-button></div>
+      <div class="title">已选<a-button class="clearAllBtn" type="link" @click="clearAll">清空</a-button></div>
       <div class="linkMulti_list">
           <div class="selectBox1">
             <span class="selectListitem" v-for="(item,index) in checkedShowList" :key='index'>{{item.name}}<a-icon type="close" id="close" @click="deleteItem(item)" /></span>
@@ -73,7 +73,7 @@
           
           let childrensArr = Array.from(this.$refs.mycheckBox.children)
           setTimeout(() => {
-            console.log(val, index)
+            // console.log(val, index)
             // console.log(val.data.checked)
             if (index == 1 || this.clickKey == 1) {
                 this.$refs.mycheckBox.style.width = '100%'
@@ -82,7 +82,7 @@
                         parentCode:val.data.code,
                         level:this.maxLayers
                     }).then((res)=>{
-                        console.log(res);
+                        // console.log(res);
                         if(res.success){
                             if(res.data.length>0){
                                 res.data.forEach((item,index)=>{
@@ -91,15 +91,14 @@
                                     item.checked=val.data.checked;
                                     item.indeterminates=false;
                                 })
-                                console.log(this.checkedShowList)
+                                // console.log(this.checkedShowList)
                                 this.checkedShowList.forEach((ele)=>{
                                   res.data.forEach((item)=>{
                                       if(ele.code==item.code){
                                             item.checked=true;
                                             return
                                         }
-                                  })
-                                        
+                                  })        
                                 })
                                 this.listArr3 = []
                                 this.title3 = ''
@@ -134,7 +133,7 @@
                         parentCode:val.data.code,
                         level:this.maxLayers
                     }).then((res)=>{
-                        console.log(res);
+                        // console.log(res);
                         if(res.success){
                             if(res.data.length>0){
                                 res.data.forEach((item,index)=>{
@@ -193,7 +192,7 @@
                         parentCode:val.data.code,
                         level:this.maxLayers
                     }).then((res)=>{
-                        console.log(res);
+                        // console.log(res);
                         if(res.success){
                             if(res.data.length>0){
                                 res.data.forEach((item,index)=>{
@@ -231,7 +230,7 @@
                     this.listArr2.forEach((ele,i)=>{                       
                       if(ele.code==val.data.parentCode){
                           ind=i
-                          console.log(ind)
+                          // console.log(ind)
                       }                                           
                     })      
                     if(ind>-1){
@@ -243,7 +242,7 @@
                     this.listArr1.forEach((element,num)=>{                        
                       if(element.code==this.listArr2[ind].parentCode){
                           z=num
-                          console.log(ind)
+                          // console.log(ind)
                       }
                         
                     })      
@@ -287,7 +286,7 @@
                     this.listArr2.forEach((element,num)=>{
                         if(item.code==this.listArr3[ind].parentCode){
                             ind=num
-                            console.log(ind)
+                            // console.log(ind)
                         }                        
                     })    
                     if(ind>-1){
@@ -304,7 +303,7 @@
                             
                             if(item.code==this.listArr2[ind].parentCode){
                                 z=num
-                                console.log(z)
+                                // console.log(z)
                             }
                             
                         })      
@@ -321,7 +320,7 @@
              
             }
           }, 100)
-
+          this.$emit('getSelectedArr',val.checkList)
 
         })
       },
@@ -347,7 +346,7 @@
       
       
       deleteItem(item){
-          console.log(item);
+          // console.log(item);
           let val='';
           this.checkedShowList.forEach((ele,index)=>{
               if(ele.code==item.code){
@@ -366,7 +365,7 @@
               })  
           }
           if(item.level==2){
-              console.log('------------------------------------');
+              // console.log('------------------------------------');
               let childList=this.checkedShowList.filter((element,index) => {
                   return element.parentCode==item.parentCode;
               });
@@ -423,7 +422,7 @@
       },
 
       getCheckedList(val){
-        console.log(val);
+        // console.log(val);
         if(val.curLayerNum==1){
           if(val.checkList.length>0){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
@@ -522,7 +521,7 @@
             this.checkedShowList=this.checkedShowList.filter((item)=>{
               return item.parentCode!=val.currentList[0].parentCode
             })
-            console.log(this.checkedShowList)
+            // console.log(this.checkedShowList)
             val.checkList.forEach((ele)=>{
               var result = this.checkedShowList.some(item => {
                 if(item.code == ele){
@@ -538,7 +537,7 @@
               }
              
             })
-            console.log(this.checkedShowList)
+            // console.log(this.checkedShowList)
           }else if(val.checkList.length==0){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
               return item.parentCode!=val.currentList[0].parentCode
@@ -570,7 +569,7 @@
                 parentCode:0,
                 level:this.maxLayers
             }).then((res)=>{
-                console.log(res);
+                // console.log(res);
                 if(res.success){
                     res.data.forEach((item,index)=>{
                         item.value=item.code
@@ -662,9 +661,9 @@
       padding: 0 15px;
       border-bottom: 1px solid #ccc;
       position: relative;
-      .clear{
+      .clearAllBtn{
           position: absolute;
-          top: 0px;
+          top: 3px;
           right: 0;
       }
     }

+ 907 - 0
src/views/modules/BatchCreate/newCreate.vue

@@ -0,0 +1,907 @@
+<template>
+  <div class="newCreate">
+    <a-form :form="form">
+      <div class="moduler">
+        <div class="moduler-title">计划名称</div>
+        <div class="adName">
+          <span>广告计划名称:</span> 
+          <div class="nameList">
+            <strong v-for="item in planInfo" :key="item.id" class="item">{{item.name+'('+item.id+')'}}</strong>
+          </div>
+        </div>
+      </div>
+
+      <!-- 设置投放位置 -->
+      <div class="moduler">
+        <div class="moduler-title">设置投放位置</div>
+        <div class="ad-range">
+          <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="adposition" @change="adPositionChange">
+                  <a-radio-button value="smartInventorys">优选广告位</a-radio-button>
+                  <a-radio-button value="inventoryTypes">按媒体指定位置</a-radio-button>
+                  <a-radio-button value="sceneInventorys">按场景指定位置</a-radio-button>
+                </a-radio-group>
+              </a-form-item>
+              <div style="width: 400px; margin-top: 24px;" v-show="adposition=='inventoryTypes'">
+                <div class="inventory-tags-lists-header">
+                  <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
+                  </a-checkbox>
+                  <div class="inventory-tags-lists-name"><strong>APP名称</strong></div>
+                </div>
+                <div class="inventory-tags-lists-container">
+                  <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" />
+                </div>
+              </div>
+              <div style="width: 400px; margin-top: 24px;" v-show="adposition=='sceneInventorys'">
+                <div class="inventory-tags-lists-header">
+                  <div class="inventory-tags-lists-name" style="padding-left:15px"><strong>位置选择</strong></div>
+                </div>
+                <div class="inventory-tags-lists-container">
+                  <a-radio-group  v-model=sceneInventory>
+                    <a-radio :style="radioStyle" value="VIDEO_SCENE">沉浸式竖版视频场景广告位</a-radio>
+                    <a-radio :style="radioStyle" value="FEED_SCENE">信息流场景广告位</a-radio>
+                    <a-radio :style="radioStyle" value="TAIL_SCENE">视频后贴和尾帧场景广告位</a-radio>
+                  </a-radio-group>
+                </div>
+              </div>
+            </div>
+          </div>
+
+        </div>
+      </div>
+      <!-- 制作创意 -->
+      <div class="moduler">
+        <div class="moduler-title">制作创意</div>
+        <div class="ad-range">
+          <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-decorator="['creativeWay', { initialValue:'customCreativity' }]">
+                  <a-radio-button value="proceduralCreativity">程序化创意</a-radio-button>
+                  <a-radio-button value="customCreativity">自定义创意</a-radio-button>
+                </a-radio-group>
+              </a-form-item>
+            </div>
+          </div>
+
+          <div class="row-item" v-if="getFormData('creativeWay')=='proceduralCreativity'">
+            <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-decorator="['creativeWay', { initialValue:'DEFAULT' }]">
+                  <a-radio-button value="proceduralCreativity">自定义上传</a-radio-button>
+                  <a-tooltip>
+                    <template slot="title">暂未开启该功能</template>
+                    <a-radio-button value="customCreativity" :disabled="true">选择程序化创意包</a-radio-button>
+                  </a-tooltip>
+                </a-radio-group>
+              </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>
+                <p v-if="getFormData('creativeWay')=='customCreativity'">创意个数: <strong>{{}}/10</strong></p>
+                <p v-else>
+                  <span>图片创意个数: <strong>{{}}/10</strong></span>
+                  <span>视频创意个数: <strong>{{}}/6</strong></span>
+                </p>
+                <div class="bui-tabs-scroll">
+                  <a-tabs
+                    :style="{ height: '500px',width:'700px',border:'1px solid #ccc',overflow:'auto',padding:'0 15px 10px'}">
+                    <a-tab-pane v-for="i in 10" :key="i" :tab="`Tab-${i}`">
+                      <div class="no">
+                      </div>
+                      <a-button type='primary' @click="addCreate">
+                        <a-icon type="plus" />添加创意
+                      </a-button>
+                    </a-tab-pane>
+                  </a-tabs>
+                </div>
+              </a-form-item>
+            </div> -->
+            <material ref="material" :creativeType="getFormData('creativeWay')"></material>
+          </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-radio-group v-decorator="['deliveryRange', { initialValue:'DEFAULT' }]">
+                  <a-radio-button value="DEFAULT">不开启</a-radio-button>
+                  <a-radio-button value="UNION">开启抖音主页</a-radio-button>
+                </a-radio-group>
+              </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="['webUrl', {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-select v-decorator="[
+                'actionText', // 给表单赋值或拉取表单时,该input对应的key
+                { rules: [{ required: true, message: '请选择剪辑!' }] }
+              ]" showSearch style="width: 480px">
+                  <a-select-option :value="item" v-for="(item,i) in actionTextList" :key="i">
+                    {{item}}
+                  </a-select-option>
+                </a-select>
+              </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 placeholder="请输入2-10个字的应用名," :maxLength='10' v-decorator="['appName', {rules:validationRules.name}]" />
+              </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 placeholder="请输入2-12个字的副标题," :maxLength='12' v-decorator="['advancedCreativeTitle']" />
+              </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-radio-group v-decorator="['isCommentDisable', { initialValue:0 }]">
+                  <a-radio-button :value="0">关闭</a-radio-button>
+                  <a-radio-button :value="1">开启</a-radio-button>
+                </a-radio-group>
+              </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-radio-group v-decorator="['creativeDisplayMode', { initialValue:'CREATIVE_DISPLAY_MODE_CTR' }]">
+                  <a-radio-button value="CREATIVE_DISPLAY_MODE_CTR">优选模式</a-radio-button>
+                  <a-radio-button value="CREATIVE_DISPLAY_MODE_RANDOM">轮播模式</a-radio-button>
+                </a-radio-group>
+              </a-form-item>
+            </div>
+          </div>
+
+        </div>
+      </div>
+      <!-- 创意分类 -->
+      <div class="moduler">
+        <div class="moduler-title">创意分类</div>
+        <div class="ad-range">
+          <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-cascader :options="createOptions" :fieldNames="fieldNames"
+                  placeholder="请选择创意分类" @change="createChange" />
+              </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-model="createTip" @keyup.enter="onSubmit"></a-input>
+                <div v-if="createTipList.length>0">
+                  <template v-for="(tag, index) in createTipList">
+                    <a-tooltip v-if="tag.length > 20" :key="tag" :title="tag">
+                      <a-tag :key="tag" :closable="index !== 0" :afterClose="() => handleClose(tag)">
+                        {{ `${tag.slice(0, 20)}...` }}
+                      </a-tag>
+                    </a-tooltip>
+                    <a-tag v-else :key="tag" :closable="true" :afterClose="() => handleClose(tag)">
+                      {{ tag }}
+                    </a-tag>
+                  </template>
+                </div> -->
+
+
+                 <a-select mode="tags" style="width: 100%" placeholder="按空格生成标签" v-model="createTipList" :token-separators="[' ']" >
+                  
+                </a-select>
+              </a-form-item>
+            </div>
+          </div>
+
+        </div>
+      </div>
+      <!-- 监测链接 -->
+      <div class="moduler">
+        <div class="moduler-title">监测链接</div>
+        <div class="ad-range">
+          <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="['trackUrl']" />
+              </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="['actionTrackUrl']" />
+              </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="['videoPlayTrackUrl']" />
+              </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="['videoPlayDoneTrackUrl']" />
+              </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="['videoPlayEffectiveTrackUrl']" />
+              </a-form-item>
+            </div>
+          </div>
+
+
+        </div>
+      </div>
+
+      <div class="moduler">
+        <!-- <div class="moduler-title"></div> -->
+        <div>
+          当前账户:
+          <strong>{{accountInfo.title}}</strong>
+        </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="danger" style="margin-right:15px" @click="goSave" :loading="loading">立即创建</a-button>
+        </div>
+      </div>
+    </a-form>
+      <div class="infoModal">
+         <a-modal v-model="visible" title="提示"  @ok="handleOk" :keyboard='false' :maskClosable='false'>
+            <ul>
+              <li v-for="(item,index) in errorInfo" :key="index">
+                  <span>第{{index+1}}条:</span>{{item.message}}
+              </li>
+            </ul>
+            <template slot="footer">
+              <a-button key="back" @click="handleCancel">
+                返回本页
+              </a-button>
+              <a-button key="submit" type="primary"  @click="handleOk">
+                返回头条批量页面
+              </a-button>
+            </template>
+          </a-modal>
+      </div>
+  </div>
+</template>
+
+<script>
+  import moment from 'moment'
+  import {
+    getAction,
+    postAction,
+    downFile,
+    downFilePost
+  } from '@/api/manage'
+  import material from './components/material'
+
+  import qs from 'qs'
+  const plainOptions = [{
+      value: 'INVENTORY_FEED',
+      label: '今日头条'
+    },
+    {
+      value: 'INVENTORY_VIDEO_FEED',
+      label: '西瓜视频'
+    },
+    {
+      value: 'INVENTORY_AWEME_FEED',
+      label: '抖音'
+    },
+    {
+      value: 'INVENTORY_HOTSOON_FEED',
+      label: '抖音火山版'
+    },
+    {
+      value: 'INVENTORY_UNION_SLOT',
+      label: '穿山甲'
+    },
+  ];
+
+  export default {
+    data() {
+      return {
+        planInfo: {},
+        groupInfo: {},
+        accountInfo: {},
+        createTip: "",
+        createTipList: [],
+        actionTextList: [],
+        radioStyle: {
+          display: 'block',
+          height: '30px',
+          lineHeight: '30px',
+          padding: '0 15px'
+        },
+        checkedList: [],
+        indeterminate: false,
+        checkAll: false,
+        plainOptions,
+        form: this.$form.createForm(this),
+        positionvalue: undefined,
+        validationRules: {
+          url: [         
+            {          
+              required: true,
+              validator: this.validateURL,
+            },
+          ],
+          name:[{
+            required: true,
+            message:'应用名必须填写',
+          }],
+          bid:[{
+            required: true,
+            message:'出价信息必须填写',
+            // validator: this.validateBid,
+          }]
+        },
+        createType: undefined, //创意分类的页面
+        createOptions: [], //创意分类的数组
+        fieldNames: {
+          label: 'name',
+          value: 'id',
+          children: 'children'
+        },
+        thirdIndustryId:undefined,
+        adposition:'smartInventorys',
+        sceneInventory:'VIDEO_SCENE',
+
+        errorInfo:[],
+        visible:false,
+        loading:false,
+      }
+    },
+    components: {
+      material
+    },
+    methods: {
+      handleChange(){
+        console.log(this.createTipList)
+      },
+      handleOk(e) {
+          this.visible=false;
+          this.$router.push('/modules/BatchCreate/TouTiaoBatch')
+          this.$bus.$emit('remove', '/modules/BatchCreate/newCreate')
+          localStorage.removeItem('groupInfo')
+          localStorage.removeItem('planInfo')
+          localStorage.removeItem('accountInfo')
+      },
+      handleCancel(e) {
+        this.visible = false;
+      },
+      handleClose(removedTag) {
+        const tags = this.createTipList.filter(tag => tag !== removedTag)
+        this.createTipList = tags
+      },
+      onSubmit() {
+        //   this.createTip
+        if (this.createTip != '') {
+          console.log(this.createTip.split(/\s+/))
+          if (this.createTipList.length > 20) {
+            this.$message.error('最多只能建立20个创意标签')
+          } else {
+            this.createTipList.push(...this.createTip.split(/\s+/))
+          }
+          this.createTip = ''
+        }
+      },
+      onChange(checkedList) {
+        this.indeterminate = !!checkedList.length && checkedList.length < plainOptions.length;
+        this.checkAll = checkedList.length === plainOptions.length;
+      },
+      onCheckAllChange(e) {
+        let valueOption = [];
+        this.plainOptions.forEach((item) => {
+          valueOption.push(item.value)
+        })
+        Object.assign(this, {
+          checkedList: e.target.checked ? valueOption : [],
+          indeterminate: false,
+          checkAll: e.target.checked,
+        });
+      },
+      // tab切换
+      tabcallback() {
+
+      },
+      // 添加创意
+      addCreate() {
+
+      },
+      createChange(value){
+        console.log(value);
+        this.thirdIndustryId=value[2]
+        //  this.form.getFieldDecorator('thirdIndustryId')
+         
+        //  this.form.setFieldsValue({
+        //    thirdIndustryId:value[2]
+        // });
+        console.log(this.form.getFieldsValue())
+      },
+      // //获取表单的某一个属性值
+      getFormData(className) {
+        return this.form.getFieldValue(className)
+      },
+      // 广告位置选择改变
+      adPositionChange(val) {
+        console.log(val)
+        // if (val.target.value == 'smartInventorys') {
+        //   this.form.setFieldsValue({
+        //     smartInventory: 1,
+        //     inventoryType: [],
+        //   })
+        // } else if (val.target.value == 'inventoryTypes') {
+        //   this.form.setFieldsValue({
+        //     smartInventory: 0,
+        //     inventoryType: this.checkedList,
+        //   })
+        // } else if (val.target.value == 'sceneInventorys') {
+        //   this.form.setFieldsValue({
+        //     smartInventory: 0,
+        //     inventoryType: [],
+        //   })
+        //   console.log(this.getFormData('sceneInventory'))
+        // }
+
+      },
+      // 注册表单的字段
+      initFormValue() {
+        // this.form.getFieldDecorator('inventoryType')
+        // this.form.getFieldDecorator('smartInventory')
+        // this.form.getFieldDecorator('thirdIndustryId')
+        // this.form.getFieldDecorator('sceneInventory')
+      },
+      // 验证网址
+      IsURL(res) {
+        //   var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/
+        var strRegex =
+          /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+(.+[A-Za-z0-9-~\/])+$/
+        var re = new RegExp(strRegex)
+        // console.log(re.test(res))
+        if (re.test(res)) {
+          return true
+        } else {
+          return false
+        }
+      },
+      validateURL(rule, value, callback) {
+        // console.log(rule, value, callback);
+
+        if (this.IsURL(value)) {
+          callback()
+        } else if (value && !this.IsURL(value)) {
+          callback('链接地址无法访问,请正确输入')
+        } else {
+          //     callback('下载链接必须填写')
+        }
+      },
+      goBack() {
+        this.$router.replace('/modules/BatchCreate/TouTiaoBatch')
+        this.$bus.$emit('remove', '/modules/BatchCreate/newCreate')
+      },
+      goSave() {
+        this.$nextTick(() => {
+          var dataCreatives = this.$refs.material.HorizontalLargeImageListBig.concat(
+            this.$refs.material.HorizontalLargeImageListHeng,
+            this.$refs.material.HorizontalLargeImageListShu,
+            this.$refs.material.HorizontalLargeImageListZu,
+            this.$refs.material.HorizontalLargeImageListSmall,
+            this.$refs.material.HorizontalLargeImageListBigShu
+          )
+
+          console.log(dataCreatives, this.$refs.material.titleData)
+          this.form.validateFieldsAndScroll((err, values) => {
+            if (!err) {
+              var params = {
+                ...values
+              }
+              this.loading=true;
+              // params.thirdIndustryId = params.thirdIndustryId.pop()
+              var dataCreatives = this.$refs.material.HorizontalLargeImageListBig.concat(
+                this.$refs.material.HorizontalLargeImageListHeng,
+                this.$refs.material.HorizontalLargeImageListShu,
+                this.$refs.material.HorizontalLargeImageListZu,
+                this.$refs.material.HorizontalLargeImageListSmall,
+                this.$refs.material.HorizontalLargeImageListBigShu
+              )
+              console.log('Received values of form: ', values)
+              console.log(dataCreatives)
+              if (this.getFormData('creativeWay') == 'proceduralCreativity') {
+                //   params.titles = this.titleData
+                params.titles = this.$refs.material.titleData
+              }
+                values.thirdIndustryId=this.thirdIndustryId;
+
+                if (this.adposition == 'smartInventorys') {
+                  values.smartInventory=1;                 
+                } else if (this.adposition == 'inventoryTypes') {
+                  values.inventoryType=this.checkedList
+                } else if (this.adposition == 'sceneInventorys') {                 
+                  values.sceneInventory=this.sceneInventory                 
+                }
+                values.adKeywords=this.createTipList;
+
+                let adIds=[];
+                this.planInfo.forEach(item=>{
+                    adIds.push(item.id)
+                })
+                postAction('/bytedance/batch/create/creative', {
+                  accountId:this.accountInfo.value,
+                  adIds,
+                  ...values,
+                  creatives: dataCreatives
+                }).then((res) => {
+                  console.log(res)
+                  if (res.success) {
+                    this.errorInfo=res.data;
+                    this.loading=false;
+                    this.visible=true;
+                    // res.data.forEach((item)=>{
+                    //   this.$message.error(item.message)
+                    // })
+                  } else {
+                    this.loading=false;
+                  }
+                })
+            } else {
+
+              console.log(err)
+            }
+          })
+
+        })
+      },
+      
+    },
+    mounted() {
+      this.initFormValue();
+
+      getAction('/bytedance/batch/industry/list').then(res => {
+        this.createOptions = res.data
+
+      })
+
+      this.$bus.$emit('remove', '/modules/BatchCreate/newPlan')
+      let planInfo = localStorage.getItem('planInfo')
+     
+      if (planInfo) {
+        this.planInfo = JSON.parse(planInfo)
+      }
+      
+      console.log(this.planInfo)
+      let groupInfo = localStorage.getItem('groupInfo')
+   
+      if (groupInfo) {
+        this.groupInfo = JSON.parse(groupInfo)
+      }
+      let accountInfo = localStorage.getItem('accountInfo')
+ 
+      if (accountInfo) {
+        this.accountInfo = JSON.parse(accountInfo)
+      }
+
+      getAction('/bytedance/batch/action/text', {
+        accountId: "1649600126891015",
+        landType: "APP"
+      }).then(res => {
+        if (res.code == '0') {
+          this.actionTextList = res.data
+        } else {
+          this.actionTextList = []
+        }
+
+      })
+    },
+  }
+</script>
+
+<style lang="scss">
+.newCreate{
+  .ant-btn-danger {
+    background-color: #ff4d4f !important; 
+  }
+}
+
+  .ant-tooltip-inner,
+  .ant-tooltip,
+  .ant-tooltip-arrow::before {
+    background-color: #fff;
+    color: #333;
+  }
+
+  .ant-tooltip-inner {
+    span {
+      display: block;
+
+    }
+  }
+
+  .ant-tooltip {
+    max-width: 450px;
+  }
+
+  .newCreate {
+    .ant-radio-button-wrapper {
+      min-width: 80px;
+      text-align: center;
+    }
+
+    .ant-form-item {
+      -webkit-box-sizing: border-box;
+      box-sizing: border-box;
+      margin: 0;
+      padding: 0;
+      color: rgba(0, 0, 0, 0.65);
+      font-size: 14px;
+      font-variant: tabular-nums;
+      line-height: 1.5;
+      list-style: none;
+      -webkit-font-feature-settings: 'tnum';
+      font-feature-settings: 'tnum';
+      vertical-align: top;
+    }
+
+    .directedBody {
+      .ant-form-item {
+        margin-bottom: 20px;
+      }
+    }
+
+    .ant-checkbox-wrapper,
+    .ant-checkbox-group-item {
+      display: block;
+      padding: 5px 15px;
+    }
+
+    .ant-checkbox-wrapper:first-child {
+      padding: 0 15px 5px;
+    }
+  }
+</style>
+<style lang="scss" scoped>
+  .newCreate {
+    font-family: PingFangSC-Regular, tahoma, arial, 'Hiragino Sans GB', 'Microsoft yahei', sans-serif;
+    color: #333;
+
+    ul,
+    li {
+      margin: 0;
+      padding: 0;
+    }
+
+    .moduler {
+      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;
+      }
+
+      .row-item {
+        display: flex;
+        justify-content: flex-start;
+        align-items: center;
+        margin-bottom: 32px;
+      }
+
+      .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: 5px;
+      }
+
+      .row-item .label-item {
+        position: relative;
+        align-items: flex-start;
+        align-self: flex-start;
+        line-height: 20px;
+        height: 20px;
+        margin-top: 7px;
+        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;
+        }
+
+        .inventory-tags-lists-header {
+          background-color: #F8F9FA;
+          border: 1px solid #E4E9ED;
+          height: 36px;
+          line-height: 33px;
+          border-radius: 4px 4px 0 0;
+          font-weight: bold;
+          display: flex;
+        }
+
+        .inventory-tags-lists-container {
+          border: 1px solid #E4E9ED;
+          margin-top: -1px;
+          height: 100%;
+          padding: 4px 0px;
+          border-radius: 0 0 4px 4px;
+        }
+
+        .inventory-tags-lists-item {
+          width: 100%;
+          height: 37px;
+          line-height: 37px;
+          padding-left: 12px;
+          padding-right: 12px;
+          display: flex;
+          font-size: 14px;
+          color: #333;
+        }
+      }
+    }
+
+    .opt {
+      text-align: right;
+    }
+    .adName{
+      display: flex;
+      .nameList{
+        width: 90%;
+      }
+      .item{
+        display: inline-block;
+        width: 30%;
+        margin-left: 15px;
+        margin-bottom: 10px;
+      }
+    }
+  }
+</style>

File diff ditekan karena terlalu besar
+ 817 - 170
src/views/modules/BatchCreate/newDirectedPackage.vue


+ 465 - 0
src/views/modules/BatchCreate/newGroup.vue

@@ -0,0 +1,465 @@
+<template>
+    <div class="newGroup">
+        <div class="steps">
+            <!-- <a-steps direction="vertical" :current="0">
+                <a-step title="广告组" description="推广目的" />
+                <a-step title="广告计划"  description="所属广告组  投放范围  投放目标 用户定向 预算与出价 计划名称" />
+                <a-step title="广告创意" description="设置投放位置 制作创意 创意分类 监测链接" />
+            </a-steps> -->
+        </div>
+        
+        <div class="currentOPt">
+            <div class="currentAccount">
+                选择账号: 
+                <a-tree-select
+                    show-search
+                    allow-clear
+                    dropdownMatchSelectWidth
+                    v-model="accountID"
+                    style="width: 60%"
+                    :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                    :tree-data="treeData"
+                    placeholder="请选择具体账户"                   
+                    :filterOption='filterOption'
+                    treeNodeFilterProp='title'
+                    @change='accountIDChange'                  
+                >
+                    
+                </a-tree-select>
+            </div>
+            <div class="tabBody">
+                <a-tabs default-active-key="create" @change="tabChange">
+                    <a-tab-pane key="create" tab="新建广告组">
+                        <a-form :form="form">
+                            <a-form-item label="推广目的" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+                                <a-radio-group   v-decorator="['landingType',{initialValue:'APP' }]" @change="landingTypeChange">
+                                    <a-radio-button value="APP">应用推广</a-radio-button>
+                                    <a-radio-button value="LINK">销售线索收集</a-radio-button>                                   
+                                </a-radio-group>
+                            </a-form-item>
+                            <a-form-item label="广告主预算" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+                                <a-radio-group  v-decorator="['budgetMode',{initialValue:'BUDGET_MODE_INFINITE' }]">
+                                    <a-radio-button value="BUDGET_MODE_INFINITE">不限</a-radio-button>
+                                    <a-radio-button value="BUDGET_MODE_DAY">指定日预算</a-radio-button>                                   
+                                </a-radio-group>
+                            </a-form-item>
+                            <a-form-item v-if="getFormData('budgetMode')=='BUDGET_MODE_DAY'" label="日预算" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+                                <a-input-number  :max="9999999.99" :step="1"  v-decorator="['budget',{initialValue:1000 }]" @change="budgetChange" @blur='budgetBlur' />
+                                <span class="tip" v-if="getFormData('budget')<1000">预算不少于1000.00元,不超过9999999.99元,请正确输入</span>
+                            </a-form-item>
+                            <a-form-item label="广告主名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+                               <a-input   v-decorator="['campaignName', { rules: [{ required: true ,message: '广告组名称必须填写'}] }]" />
+                            </a-form-item>
+                            <a-form-item label="广告组状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+                               <a-radio-group  v-decorator="['operation',{initialValue:'enable' }]">
+                                    <a-radio-button value="enable">开</a-radio-button>
+                                    <a-radio-button value="disable">关</a-radio-button>                                   
+                                </a-radio-group>
+                            </a-form-item>
+                           
+                        </a-form>
+                    </a-tab-pane>
+                    <a-tab-pane key="exist" tab="选择已有广告组" forceRender>
+                        <div class="selectedExist">
+                            <a-input v-model="selectedCampaignValue" class="input" placeholder="请输入广告组id或名称" @change="selectedCampaign">
+                                <a-icon slot="addonAfter" type="search" />
+                            </a-input>
+                            <div class="campaign-have-list">
+                                <div class="campaign-have-header">列表</div>
+                                <div class="hasAccountID" v-if="accountID">
+                                    <a-spin :spinning="spinning">
+                                        <ul v-if="campaignHaveList.length>0">
+                                            <li class="ad-d-flex ad-d-flex-between" v-for="(item,index) in campaignHaveList" :key="index" @click="goPlan(item)">
+                                                <span class="info">{{item.name}}</span>
+                                                <span class="landing-type">信息流_{{item.landingType_dictText}}</span>
+                                            </li>
+                                        </ul>
+                                        <div v-else class="noAccountID">
+                                            暂无数据
+                                        </div>
+                                    </a-spin>
+                                </div>
+                                <div class="noAccountID" v-else>
+                                    选择账户后,才能选择已有广告组
+                                </div>
+                                
+                            </div>
+                            <div class="fenye" v-if="totalPage">
+                                <a-pagination :current='currentPage' size='small' :total='totalPage' :pageSize='10' @change="pageNoChange" />
+                            </div>
+                        </div>
+                        
+                        
+                    </a-tab-pane>
+                
+                </a-tabs>
+            </div>
+            <div class="creatBody">
+                <a-button type='default' class="goback" @click="goback">返回</a-button>
+                <a-button type='danger' @click="nextHandle" :loading='nextLoading'>创建并下一步</a-button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+import qs from 'qs'
+const formItemLayout = {
+  labelCol: { span: 2 },
+  wrapperCol: { span: 8 },
+};
+
+export default {
+    data() {
+        return {
+            nextLoading:false,
+            tabKey:'create',
+            accountID:undefined,
+            treeData:[],
+            formItemLayout,
+            form: this.$form.createForm(this),
+            selectedCampaignValue:undefined,
+            spinning:false,
+            campaignHaveList:[],
+            currentPage:1,
+            totalPage:0
+        }
+    },
+    methods: {
+        tabChange(key){
+            console.log(key);
+            this.tabKey=key;
+            
+        },
+        accountIDChange(val){
+            console.log(val,this.accountID);
+            let currentData=this.treeData.filter((item)=>{
+                return item.value==val
+            })
+            // console.log(currentData);
+            if(currentData.length>0){
+                this.accountID=undefined;
+                this.openID=val
+            }
+            this.getExsitGroupList();
+            console.log(this.treeData)
+            this.treeData.forEach((item)=>{
+                item.children.forEach(ele=>{
+                    if(ele.value==val){
+                        let accountInfo=JSON.stringify(ele)
+                        localStorage.setItem('accountInfo',accountInfo)
+                    }
+                })
+            })
+        },
+        getExsitGroupList(){
+            this.spinning=true;
+            getAction('/ctop/byteDanceCampaign/list',{
+                accountId:this.accountID,
+                pageNo:this.currentPage,
+                name:this.selectedCampaignValue
+            }).then(res=>{
+                console.log(res)
+                if(res.success){
+                    this.spinning=false;
+                    this.totalPage=res.result.total;
+                    this.campaignHaveList=res.result.records;
+                }
+            })
+        },
+        filterOption(input, option){
+            console.log(input, option)
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+        },
+         //请求项目和账户内容
+        accountHttp(){
+            this.treeData=[];
+            this.accountID=undefined;
+            getAction('/ctop/projectMember/getProjectAccountByUserId', {}).then(res => {
+            if(res.success){
+                    // console.log(res);
+                    if(res.result){
+                        res.result.forEach((element,index) => {
+                        if(element){                  
+                            this.treeData.push({});                    
+                            this.treeData[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
+                            this.treeData[index].value='project'+element.project.projectId;
+                            this.treeData[index].key=element.project.projectId;
+                            this.treeData[index].mediaId=element.project.mediaId;
+                            this.treeData[index].children=[];
+                                                
+                            if(element.account.length){
+                            element.account.forEach((ele,i)=>{
+                                this.treeData[index].children.push({});
+                                this.treeData[index].children[i].title=ele.userName+'_'+ele.authName;
+                                this.treeData[index].children[i].value=ele.accountId;
+                                this.treeData[index].children[i].key=ele.accountId;
+                            })
+                                
+                            }                           
+                        }      
+                        });
+                        // console.log(this.treeData)
+                        
+                    }
+            }
+            })
+        },
+
+
+        //获取表单的某一个属性值
+        getFormData(className) {
+            return this.form.getFieldValue(className)
+        },
+        //推广目的改变
+        landingTypeChange(e){
+            console.log(e.target)
+            if(e.target.value=='APP'){
+                this.form.setFieldsValue({
+                    campaignName:`应用推广_${moment().format('MM_DD_HH:SS')}`
+                })
+            }else if(e.target.value=='LINK'){
+                this.form.setFieldsValue({
+                    campaignName:`销售线索收集_${moment().format('MM_DD_HH:SS')}`
+                })
+            }
+        },
+        //预算改变
+        budgetChange(val){
+            console.log(val)  
+            var strRegex = /^[0-9](.)+$/
+            var re = new RegExp(strRegex)
+            // console.log(re.test(res))
+            if (re.test(val)) {
+                return true
+            } else {
+                // return false
+                this.$message.error('请勿输入非数字!')
+                // let num = val.splice(val.length-2,1)
+                // this.form.setFieldsValue({
+                //     budget:1000
+                // })
+            }          
+        },
+        budgetBlur(e){
+            console.log(e.target.value)
+
+            if(e.target.value==0){
+                this.form.setFieldsValue({
+                    budget:1000.0
+                })
+            }
+        },
+        nextHandle(){
+           if(this.accountID){
+                this.form.validateFields((err, values) => {
+                    if (!err) {
+                        this.nextLoading=true;
+                        console.log('Received values of form: ', values);
+                       if(values.budgetMode== "BUDGET_MODE_DAY" && (values.budget<1000||values.budget>9999999.99 )){
+                            this.$message.error('日预算不少于1000.00元,不超过9999999.99元,请正确输入')
+                        }else{
+                             postAction('/ctop/byteDanceCampaign/add',qs.stringify({
+                                accountId:this.accountID,
+                                ...values
+                            })).then(res=>{
+                                console.log(res)
+                                if(res.success){
+                                    this.nextLoading=false;
+                                    this.$message.success('广告组创建成功,1s后将跳转到新建计划页面');
+                                    values.id=res.campaign_id;
+                                    values.accountId=this.accountID
+                                    let groupInfo=JSON.stringify(values)
+                                    localStorage.setItem('groupInfo',groupInfo)
+                                    setTimeout(() => {
+                                        this.$router.push('/modules/BatchCreate/newPlan')
+                                    },1000);                                
+                                }else{
+                                    this.nextLoading=false;
+                                    this.$message.error(res.message) 
+                                }
+                            })
+                        }
+                    }else{
+                        console.log(err)
+                    }
+                });
+           }else{
+               this.$message.error('请选择具体的账户')
+           }
+            
+        },
+        goback(){
+            this.$router.push('/modules/BatchCreate/TouTiaoBatch')
+            this.$bus.$emit('remove', '/modules/BatchCreate/newGroup')
+        },
+
+        selectedCampaign(e){
+            // console.log(e.target.value,this.selectedCampaignValue);
+            if(this.accountID){
+                this.getExsitGroupList();
+            }else{
+                this.$message.warning('请选择账户后重试!')
+                this.selectedCampaignValue=undefined;
+            }
+        },
+        goPlan(item){
+            console.log(item)
+            let groupInfo=JSON.stringify(item)
+            localStorage.setItem('groupInfo',groupInfo)
+            this.$router.replace(`/modules/BatchCreate/newPlan`)
+        },
+        //分页页码改变
+        pageNoChange(){
+
+        }
+    },
+    mounted() {
+        this.accountHttp();
+        let name=this.getFormData('landingType')
+        if(name=='APP'){
+            this.form.setFieldsValue({
+                campaignName:`应用推广_${moment().format('MM_DD_HH:SS')}`
+            })
+        }else{
+            this.form.setFieldsValue({
+                campaignName:`销售线索收集_${moment().format('MM_DD_HH:SS')}`
+            })
+        }
+    },
+    // beforeCreate() {
+    //     this.form = this.$form.createForm(this, { name: 'validate_other' });
+    // },
+}
+</script>
+<style lang="scss">
+.newGroup{
+  .ant-btn-danger {
+    background-color: #ff4d4f !important; 
+  }
+}
+</style>
+<style lang="scss" scoped>
+.newGroup{
+    ul, li {
+        list-style: none;
+        padding: 0;
+        margin: 0;
+    }
+    // background: rgb(249,249,249);
+
+    // padding: 20px; 
+    .currentOPt{             
+        .currentAccount{
+            height: 70px;
+            padding: 20px 30px;
+            background: #fff;
+            margin-bottom: 20px;
+        }
+        .tabBody{
+            background: #fff;
+            margin-bottom: 20px;
+            padding: 20px 30px;
+            .tip{
+                font-size: 12px;
+                color: tomato;
+                display: block;
+                margin-top: 5px;
+                height: 20px;
+                line-height: 20px;
+                
+            }
+            .selectedExist{
+                width: 600px;
+                .input{
+                    margin-bottom:16px ;
+                }
+                .campaign-have-list{
+                    font-family: PingFangSC-Regular;
+                    font-size: 14px;
+                    color: #333;
+                    border: 1px solid #DADFE3;
+                    border-radius: 4px;
+                    margin-bottom: 16px;
+                    height: 388px;
+                    .campaign-have-header {
+                        height: 38px;
+                        width: 100%;
+                        padding-left: 13px;
+                        line-height: 38px;
+                        background: #f8f9fa;
+                        border-radius: 4px 4px 0px 0px;
+                        border-bottom: 1px solid #DADFE3;
+                    }
+                    .campaign-have-list ul {
+                        width: 100%;
+                        height: 350px;
+                        padding-top: 6px;
+                        
+                    }
+                    li{
+                        padding: 6px 10px;
+                        cursor: pointer;
+                    }
+                    li:hover{
+                        background: #EDF1F5;
+                    }
+                    .ad-d-flex-between {
+                        justify-content: space-between !important;
+                    }
+
+                    .ad-d-flex, .ad-btn {
+                        display: flex;
+                        align-items: center;
+                    }
+                    .byted-loading-v {
+                        position: absolute;
+                        top: 0;
+                        right: 0;
+                        bottom: 0;
+                        left: 0;
+                        z-index: 996;
+                        background-color: hsla(0,0%,96%,.9);
+                    }
+                    .info{
+                        width: 60%;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                    }
+                    .landing-type {
+                        color: #999;
+                        font-size: 12px;
+                        white-space: nowrap;
+                    }
+                }
+                .noAccountID{
+                    font-size: 14px;
+                    text-align: center;
+                    color: #999;
+                    line-height: 388px;
+                }
+                .fenye{
+                    height: 60px;
+                    padding-top: 12px;
+                    text-align: right;
+                }
+            }
+        }
+        .creatBody{
+            background: #fff;
+            margin-bottom: 20px;
+            padding: 20px 30px;
+            text-align: right;
+            .goback{
+                margin-right: 20px;
+            }
+        }
+    }
+}
+</style>

File diff ditekan karena terlalu besar
+ 1412 - 0
src/views/modules/BatchCreate/newPlan.vue


+ 45 - 29
src/views/modules/BatchCreate/radioCheck.vue

@@ -27,56 +27,70 @@ export default {
         }
     },
    
-    props:['checkArr'],
+    props:['checkArr','selectArr'],
     watch:{
         checkArr:{
             handler(n,o){
-                // console.log(n==o)
+                // console.log(n,o)
+                this.selectValue=[];
+                let i=0;
                 this.checkArr.forEach((item,index)=>{
-                    if(!item.disabled){
+                    // console.log(item)
+                    if(item.disabled==false){
+                        i++;
                         this.selectValue[0]=item.value;
                         // console.log(this.selectValue)
-                    }else if(item.disabled==false){
-                        this.selectValue[0]='';
                     }else if(item.disabled==undefined){
-                        this.selectValue[0]='';
+                        if(item.checked){
+                            this.selectValue.push(item.value)
+                        }
+                        
                     }
                 })
-                 console.log(this.selectValue)
+                if(this.selectValue.length==0){
+                    this.selectValue=[''];
+                }
+                if(i==3){
+                    this.selectValue[0]='';
+                }
+                // console.log(this.selectValue)
+                this.$emit('getSonValue',this.selectValue)
             },
             deep:true,
             // immediate: true
 
-        }
+        },
+        
     },
     methods: {
         //单选多选的事件
         radioCheckChange(e,item){
-            console.log(e.target,item);
+            console.log(e.target,item,!item.disabled);
+            
             this.currentSelect=e.target.value;
             if(!item.disabled){
 
-            if(e.target.value=='' || this.selectValue.length==0 ){
-                this.selectValue=[''];
-            }else{
-                if(this.selectValue.indexOf('')>-1){
-                    let i=this.selectValue.indexOf('');
-                    this.selectValue.splice(0,1)
-                }
-                
-                if(this.selectValue.indexOf(e.target.value)==-1){
-                    this.selectValue.push(e.target.value)
+                if(e.target.value=='' || this.selectValue.length==0 ){
+                    this.selectValue=[''];
                 }else{
-                    this.selectValue=this.selectValue.filter((item)=>{
-                        return item!=e.target.value
-                    })  
-                }
+                    if(this.selectValue.indexOf('')>-1){
+                        let i=this.selectValue.indexOf('');
+                        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){
+                        this.selectValue=this.selectValue.filter((item)=>{
+                            return item!=e.target.value
+                        })  
+                    }
 
-                if(this.selectValue.length==0){
-                    this.selectValue=[''];
+                    if(this.selectValue.length==0){
+                        this.selectValue=[''];
+                    }
+                    
                 }
-                
-            }
             // console.log(this.currentSelect,this.selectValue);
             }
             this.$emit('getSonValue',this.selectValue)
@@ -84,9 +98,11 @@ export default {
     },
     mounted() {
         // this.selectValue=[]
+        // console.log(this.checkArr)
         this.checkArr.forEach((item,index)=>{
-            if(!item.disabled){
-                this.selectValue[0]=item
+            
+            if(item.disabled&&item.disabled!=undefined){
+                this.selectValue[0]=item.value
             }else{
                 this.selectValue=['']
             }

+ 244 - 167
src/views/modules/BatchCreate/singleLayerSelecte.vue

@@ -1,192 +1,269 @@
 <template>
-    <div class="singleLayersSelecte">
-        <div class="selectBox">
-            <div class="selectLeft">
-                <div class="title">{{title}}</div>
-                <div class="selectBox1">
-                    <span class="selectLists">
-                        <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange" > 全选 </a-checkbox>
-                    </span> 
-                    <a-checkbox-group v-model="checkedList" :options="plainOptions" @change="checkGroupChange" class="selectList" ></a-checkbox-group>
-                </div>
-            </div>
-            <div class="selectRight">
-                <div class="title">已选<a-button class="clear" type="link" @click="clearAll">清空</a-button></div>
-                <div class="selectBox1">
-                    <span class="selectListitem" v-for="(item,index) in checkedShowList" :key='index'>{{item}}<a-icon type="close" id="close" @click="deleteItem(item)" /></span>
-                </div>
-            </div>
+  <div class="singleLayersSelecte">
+    <div class="selectBox">
+      <div class="selectLeft">
+        <div class="title">{{title}}</div>
+        <div class="selectBox1">
+          <span class="selectLists">
+            <a-checkbox
+              :indeterminate="indeterminate"
+              :checked="checkAll"
+              @change="onCheckAllChange"
+            >全选</a-checkbox>
+          </span>
+          <a-checkbox-group
+            v-model="checkedList"
+            :options="plainOptions"
+            @change="checkGroupChange"
+            class="selectList"
+          ></a-checkbox-group>
         </div>
+      </div>
+      <div class="selectRight">
+        <div class="title">
+          已选
+          <a-button class="clearAllBtn" type="link" @click="clearAll">清空</a-button>
+        </div>
+        <div class="selectBox1">
+          <span class="selectListitem" v-for="(item,index) in checkedShowList" :key="index">
+            {{item}}
+            <a-icon type="close" id="close" @click="deleteItem(item)" />
+          </span>
+        </div>
+      </div>
     </div>
+  </div>
 </template>
 
 <script>
-import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
 // const plainOptions = ['Apple', 'Pear', 'Orange','44','550','9982','5525'];
 // const defaultCheckedList = ['Apple', 'Orange'];
-    export default {
-        data() {
-            return {
-               //选择框
-                checkedList: [],
-                checkedShowList:[],
-                indeterminate: false,
-                checkAll: false,
-                plainOptions:[],
-                valueOptions:[],
-            }
+export default {
+  data() {
+    return {
+      //选择框
+      checkedList: [],
+      checkedShowList: [],
+      indeterminate: false,
+      checkAll: false,
+      plainOptions: [],
+      valueOptions: [],
+    }
+  },
+  watch: {
+    checkedList: {        
+        handler(n,o){
+            
+                this.$emit('getCheckedList', this.checkedList)
+            
         },
-        watch: {
-            checkedList:{
-                handler(n,o){
-                    if(n!=o){                      
-                        this.$emit('getCheckedList',n)            
-                    }
-                },
-                deep:true,
-                immediate:true,
-            }
+        deep: true,
+        immediate: true,
+    },
+    listArr:{
+        handler(n,o){
+            this.plainOptions = this.listArr
+            this.listArr.forEach((item) => {
+                    this.valueOptions.push(item.value)
+            })
         },
-        props:['title','listArr'],
-        methods: {
-                //手机品牌多选的事件
-            checkGroupChange(checkedList) {
+        deep: true,
+        immediate: true,
+    },
+    checked: {
+        handler(n, o) {     
+            
+                this.checkedList=[]
                 this.checkedShowList=[];
-                console.log(checkedList)
-                this.indeterminate = !!checkedList.length && checkedList.length < this.plainOptions.length;
-                this.checkAll = checkedList.length === this.plainOptions.length;
-                checkedList.forEach((ele,i)=>{
-                    this.plainOptions.forEach((item,index)=>{
-                        if(item.value==ele){
-                            this.checkedShowList.push(item.label)
-                        }
-                    })
+                this.plainOptions = this.listArr
+                this.listArr.forEach((item) => {
+                    this.valueOptions.push(item.value)
                 })
-                
-            },
-            onCheckAllChange(e) {
-                Object.assign(this, {
-                    checkedList: e.target.checked ? this.valueOptions : [],
-                    indeterminate: false,
-                    checkAll: e.target.checked,                  
-                });
-                this.checkedList.forEach((ele,i)=>{
-                    this.plainOptions.forEach((item,index)=>{
-                        if(item.value==ele){
-                            this.checkedShowList.push(item.label)
-                        }
+                 if (this.checked.length) {
+                    this.checkedList = this.checked;
+                    // console.log(this.checkedList,this.plainOptions)
+                    this.checkedList.forEach((ele, i) => {
+                        this.plainOptions.forEach((item, index) => {
+                            if (item.value == ele) {
+                                this.checkedShowList.push(item.label)
+                            }
+                        })
                     })
-                })
-            },
+                    this.indeterminate = !!this.checkedList.length && this.checkedList.length < this.plainOptions.length
+                    this.checkAll = this.checkedList.length === this.plainOptions.length
+                   
+                }             
+                                     
+        },
+        deep: true,
+        immediate: true,
+    },
+  },
+  props: ['title', 'listArr', 'checked'],
+  methods: {
+    //手机品牌多选的事件
+    checkGroupChange(checkedList) {
+        this.checkedShowList = []
+        // console.log(checkedList)
+        this.indeterminate = !!checkedList.length && checkedList.length < this.plainOptions.length
+        this.checkAll = checkedList.length === this.plainOptions.length
+        checkedList.forEach((ele, i) => {
+            this.plainOptions.forEach((item, index) => {
+            if (item.value == ele) {
+                this.checkedShowList.push(item.label)
+            }
+            })
+        })
+            //  this.$emit('getCheckedList', this.checkedList)
 
+    },
+    onCheckAllChange(e) {
+    // console.log(e.target.checked,this.valueOptions)
+      Object.assign(this, {
+        checkedList: e.target.checked ? this.valueOptions : [],
+        indeterminate: false,
+        checkAll: e.target.checked,
+      })
+      this.checkedList.forEach((ele, i) => {
+        this.plainOptions.forEach((item, index) => {
+          if (item.value == ele) {
+            this.checkedShowList.push(item.label)
+          }
+        })
+      })
+      if (!e.target.checked) {
+        this.checkedShowList = []
+      }
+      // console.log(this.checkedList)
+        // this.$emit('getCheckedList', this.checkedList)
 
+    },
 
-            deleteItem(item){
-                console.log(item);
-                let val='';
-                this.plainOptions.forEach((ele,index)=>{
-                    if(ele.label==item){
-                        val=ele.value
-                    }
-                })
-                this.checkedList=this.checkedList.filter((element,index) => {
-                    return element!=val
-                });
-                this.checkedShowList=this.checkedShowList.filter((element,index) => {
-                    return element!=item
-                });
-                if(this.checkedList.length==0){
-                    this.indeterminate=false
-                    this.checkAll=false
-                }
-            },
+    deleteItem(item) {
+      // console.log(item)
+      let val = ''
+      this.plainOptions.forEach((ele, index) => {
+        if (ele.label == item) {
+          val = ele.value
+        }
+      })
+      this.checkedList = this.checkedList.filter((element, index) => {
+        return element != val
+      })
+      this.checkedShowList = this.checkedShowList.filter((element, index) => {
+        return element != item
+      })
+      if (this.checkedList.length == 0) {
+        this.indeterminate = false
+        this.checkAll = false
+      }
+            // this.$emit('getCheckedList', this.checkedList)
 
-            clearAll(){
-                this.checkedList=[];
-                this.indeterminate=false;
-                this.checkAll=false;
-                this.checkedShowList=[];
-            },
+    },
 
-            
-        },
-        mounted() {
-            this.plainOptions=this.listArr;
-            this.listArr.forEach((item)=>{
-                this.valueOptions.push(item.value)
-            })
-        },
-    }
+    clearAll() {
+      this.checkedList = []
+      this.indeterminate = false
+      this.checkAll = false
+      this.checkedShowList = []
+        // this.$emit('getCheckedList', this.checkedList)
+
+    },
+  },
+  mounted() {
+    this.plainOptions = this.listArr
+    this.listArr.forEach((item) => {
+      this.valueOptions.push(item.value)
+    })
+    
+    // if (this.checked.length) {
+    //     this.checkedList = this.checked
+    //     this.checkedList.forEach((ele, i) => {
+    //         this.plainOptions.forEach((item, index) => {
+    //         if (item.value == ele) {
+    //             this.checkedShowList.push(item.label)
+    //         }
+    //         })
+    //     })
+    //     this.indeterminate = !!this.checkedList.length && this.checkedList.length < this.plainOptions.length
+    //     this.checkAll = this.checkedList.length === this.plainOptions.length
+    // }else{
+    //     this.checkedList = []
+    // }
+    
+    
+  },
+}
 </script>
 
 <style lang="scss" scoped>
-.singleLayersSelecte{
-    margin-top: 20px;
-        .selectBox{
-        display: flex;
-        .title{
-            background: #f9f9f9;
-            font-size: 14px;
-            font-weight: 700;
-            padding:0 15px;
-            border-bottom: 1px solid #ddd;
-            text-align: left;
-            position: relative;
-            border-radius: 5px 5px 0 0;
-            .clear{
-                position: absolute;
-                top: 5px;
-                right: 0;
-            }
-        }
-        .selectLeft{
-            width: 40%;
-            margin-right: 2%;
-            border: 1px solid #ddd;
-            border-radius: 5px;
-        }
-        .selectRight{
-            width: 20%;
-            border: 1px solid #ddd;
-            border-radius: 5px;
-        }
-        .selectBox1{
-            height: 250px;
-            overflow: auto;
-            
-            .selectList{                      
-                display: block;
-                width: 100%;
-                // padding: 0 15px;
-                // padding: 3px 0;
-            }
-            .selectLists{
-                display: block;
-                width: 100%;
-                padding: 0 15px;
-            }
-            .selectLists:hover{
-                background-color: rgba(0,0,0,.1);
-            }
-            .selectListitem{
-                display: block;
-                height: 25px;
-                line-height: 25px;
-                background-color: #eee;
-                border-radius: 5px;
-                padding: 0 10px;
-                margin: 8px 10px;
-                position: relative;
-                #close{
-                    font-size: 12px;
-                    position: absolute;
-                    right: 10px;
-                    top: 5px;
-                    cursor: pointer;
-                }
-            }
-        }
+.singleLayersSelecte {
+  margin-top: 20px;
+  .selectBox {
+    display: flex;
+    .title {
+      background: #f9f9f9;
+      font-size: 14px;
+      font-weight: 700;
+      padding: 0 15px;
+      border-bottom: 1px solid #ddd;
+      text-align: left;
+      position: relative;
+      border-radius: 5px 5px 0 0;
+      .clearAllBtn{
+        position: absolute;
+        top: 3px;
+        right: 0;
+      }
+    }
+    .selectLeft {
+      width: 40%;
+      margin-right: 2%;
+      border: 1px solid #ddd;
+      border-radius: 5px;
+    }
+    .selectRight {
+      width: 20%;
+      border: 1px solid #ddd;
+      border-radius: 5px;
+    }
+    .selectBox1 {
+      height: 250px;
+      overflow: auto;
 
+      .selectList {
+        display: block;
+        width: 100%;
+        // padding: 0 15px;
+        // padding: 3px 0;
+      }
+      .selectLists {
+        display: block;
+        width: 100%;
+        padding: 0 15px;
+      }
+      .selectLists:hover {
+        background-color: rgba(0, 0, 0, 0.1);
+      }
+      .selectListitem {
+        display: block;
+        height: 25px;
+        line-height: 25px;
+        background-color: #eee;
+        border-radius: 5px;
+        padding: 0 10px;
+        margin: 8px 10px;
+        position: relative;
+        #close {
+          font-size: 12px;
+          position: absolute;
+          right: 10px;
+          top: 5px;
+          cursor: pointer;
+        }
+      }
     }
+  }
 }
 </style>

+ 336 - 0
src/views/modules/BatchCreate/toutiaoTime.vue

@@ -0,0 +1,336 @@
+<template>
+  <div class="calendar">
+    <table class="time_table table" v-on:mouseleave="mouseleave">
+      <thead>
+        <tr>
+          <th rowspan="2" style="width:120px">日期/时间(时)</th>
+        </tr>
+        <tr>
+          <th class="unselectable" colspan="2" v-for="(num, index) in numData" :key="index" style="width:50px">{{ num }}</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr v-for="(options, index) in timeData" :key="index">
+          <th scope="row">{{ options.date }}</th>
+          <td v-for="(timeItem, key) in options.time" :key="key" style="width:15px"
+            :class="[{ active_select: timeItem.isSelected, active_select_move: timeItem.show }]"
+            v-on:mousedown="mousedown(index, key)" v-on:mouseover="mouseover(index, key)"
+            v-on:mouseup="mouseup(index, key)" @click="showOne(index, key)"></td>
+        </tr>
+      </tbody>
+    </table>
+  </div>
+</template>
+<script>
+  var arr = []
+  for (let i = 0; i < 48; i++) {
+    arr.push(i / 2)
+  }
+  export default {
+    name: 'calendar-table',
+    props: {
+      scheduleTime: {
+        type: String,
+        default () {
+          var str = ''
+          for (let i = 0; i < 7 * 48; i++) {
+            str += '0'
+          }
+          return str
+        }
+      }
+    },
+    data() {
+      return {
+        show: false,
+        numData: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, ],
+        // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, ],
+        dateTime: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
+        timeData: [{
+            date: '周一',
+            time: []
+          },
+          {
+            date: '周二',
+            time: []
+          },
+          {
+            date: '周三',
+            time: []
+          },
+          {
+            date: '周四',
+            time: []
+          },
+          {
+            date: '周五',
+            time: []
+          },
+          {
+            date: '周六',
+            time: []
+          },
+          {
+            date: '周日',
+            time: []
+          }
+        ],
+        selectFlag: false,
+        max: {
+          x: 0,
+          y: 0
+        },
+        dataString: ''
+      }
+    },
+    methods: {
+      // handleClose(item) {
+      //   var index = Math.floor(item / 24)
+      //   var key = item % 7
+      //   if (this.timeData[index].time[key].value == false) {
+      //     if (this.timeData[index].time[key].isSelected) {
+      //       this.timeData[index].time[key].isSelected = false
+      //     } else {
+      //       this.$set(this.timeData[index].time[key], 'isSelected', true)
+      //     }
+      //   }
+      // },
+      showOne(index, key) {
+        //   this.timeData[index].time[key].isSelected = !this.timeData[index].time[key].isSelected
+      },
+      mousedown: function (index, key) {
+        this.selectStart = []
+        this.selectFlag = true
+        if (this.timeData[index].time[key].value == false) {
+          if (this.timeData[index].time[key].isSelected) {
+            this.timeData[index].time[key].isSelected = false
+          } else {
+            this.$set(this.timeData[index].time[key], 'isSelected', true)
+          }
+        }
+        this.selectStart.push({
+          index: index,
+          key: key
+        })
+      },
+      mouseover: function (index, key) {
+        // x 垂直方向  y 水平方向
+        if (this.selectFlag) {
+          if (index >= this.max.x) {
+            this.max.x = index
+          }
+          if (key >= this.max.y) {
+            this.max.y = key
+          }
+          var start = {
+            x: this.selectStart[0].index,
+            y: this.selectStart[0].key
+          }
+          var end = {
+            x: index,
+            y: key
+          }
+          for (var i = end.x; i <= this.max.x; i++) {
+            for (var j = end.y; j <= this.max.y; j++) {
+              this.$set(this.timeData[i].time[j], 'isSelected', false)
+            }
+          }
+          /* 渲染选中的区域 */
+          // for (var i = start.x; i <= end.x; i++) {
+          //   for (var j = start.y; j <= end.y; j++) {
+          //     // this.$set(this.timeData[i].time[j], 'isSelected', true)
+          //     this.$set(this.timeData[i].time[j], 'show', true)
+          //   }
+          // }
+          for (var i = start.x; i <= end.x; i++) {
+            for (var j = start.y; j <= end.y; j++) {
+              this.$set(this.timeData[i].time[j], 'isSelected', true)
+            }
+          }
+        }
+      },
+      mouseup: function (index, key) {
+        var start = {
+          x: this.selectStart[0].index,
+          y: this.selectStart[0].key
+        }
+        var end = {
+          x: index,
+          y: key
+        }
+        /* 渲染选中的区域 */
+        var data = []
+        var arr = []
+        //   for (let i = 0; i < this.timeData.length; i++) {
+        //     for (let j = 0; j < this.timeData[i].time.length; j++) {
+        //       this.timeData[i].time[j].show = false
+        //     }
+        //   }
+        arr = data.concat(
+          this.timeData[0].time,
+          this.timeData[1].time,
+          this.timeData[2].time,
+          this.timeData[3].time,
+          this.timeData[4].time,
+          this.timeData[5].time,
+          this.timeData[6].time
+        )
+        this.dataString = arr.map(item => {
+          if (item.isSelected) {
+            return 1
+          } else {
+            return 0
+          }
+        })
+        console.log(this.dataString.join(''))
+        this.$emit('update:scheduleTime', this.dataString.join(''))
+        this.selectFlag = false
+        this.max = {
+          x: 0,
+          y: 0
+        }
+      },
+      mouseleave: function () {
+        this.selectFlag = false
+      },
+      setItemDate(sum) {
+        let i = sum
+        if (i < 24) {
+          return '周一' + i + ':00~' + (i + 1) + ':00'
+        } else if (i < 48 && i >= 24) {
+          return '周二' + (i - 24) + ':00~' + (i - 23) + ':00'
+        } else if (i < 72 && i >= 48) {
+          return '周三' + (i - 48) + ':00~' + (i - 47) + ':00'
+        } else if (i < 96 && i >= 72) {
+          return '周四' + (i - 72) + ':00~' + (i - 71) + ':00'
+        } else if (i < 120 && i >= 96) {
+          return '周五' + (i - 96) + ':00~' + (i - 95) + ':00'
+        } else if (i < 144 && i >= 120) {
+          return '周六' + (i - 120) + ':00~' + (i - 119) + ':00'
+        } else {
+          return '周日' + (i - 144) + ':00~' + (i - 143) + ':00'
+        }
+      },
+      init() {
+        var str = this.scheduleTime
+        var arr = str.split('')
+        this.timeData = [{
+            date: '周一',
+            time: []
+          },
+          {
+            date: '周二',
+            time: []
+          },
+          {
+            date: '周三',
+            time: []
+          },
+          {
+            date: '周四',
+            time: []
+          },
+          {
+            date: '周五',
+            time: []
+          },
+          {
+            date: '周六',
+            time: []
+          },
+          {
+            date: '周日',
+            time: []
+          }
+        ]
+        for (let i = 0; i < arr.length; i++) {
+          if (i < 48) {
+            this.timeData[0].time.push({
+              isSelected: arr[i] == 1 ? true : false,
+              move: false,
+              value: false
+            })
+          } else if (i < 96 && i >= 48) {
+            this.timeData[1].time.push({
+              isSelected: arr[i] == 1 ? true : false,
+              move: false,
+              value: false
+            })
+          } else if (i < 144 && i >= 96) {
+            this.timeData[2].time.push({
+              isSelected: arr[i] == 1 ? true : false,
+              move: false,
+              value: false
+            })
+          } else if (i < 192 && i >= 144) {
+            this.timeData[3].time.push({
+              isSelected: arr[i] == 1 ? true : false,
+              move: false,
+              value: false
+            })
+          } else if (i < 240 && i >= 192) {
+            this.timeData[4].time.push({
+              isSelected: arr[i] == 1 ? true : false,
+              move: false,
+              value: false
+            })
+          } else if (i < 288 && i >= 240) {
+            this.timeData[5].time.push({
+              isSelected: arr[i] == 1 ? true : false,
+              move: false,
+              value: false
+            })
+          } else {
+            this.timeData[6].time.push({
+              isSelected: arr[i] == 1 ? true : false,
+              move: false,
+              value: false
+            })
+          }
+        }
+      }
+    },
+    watch: {
+      scheduleTime: {
+        immediate: true, // immediate选项可以开启首次赋值监听
+        handler(newVal, oldVal) {
+          this.init()
+        }
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  .time_table {
+    border: 1px solid #ccc;
+    border-collapse: collapse;
+  }
+
+  .time_table th,
+  .time_table td {
+    border: 1px solid #ccc;
+    text-align: center;
+  }
+
+  .time_table .unselectable {
+    width: 5px !important;
+    height: 30px;
+  }
+
+  .active_select {
+    background: cornflowerblue;
+  }
+
+  .active_select_move {
+    background: aqua;
+  }
+
+  * {
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+  }
+</style>

+ 13 - 3
src/views/modules/Statistics/accountMaterStatistics.vue

@@ -85,7 +85,7 @@ th div {
             size="middle"
             :customRow="rowClick"
             :loading="loading"
-            :scroll="{ x: 2000 }"
+            :scroll="{ x: 2400 }"
           >
             <div slot="url" slot-scope="url">
               <video class="video" :src="url" controls="controls" style="height:200px;width:112.5px">
@@ -149,6 +149,16 @@ const columns = [
     width: 150
   },
   {
+    title: '视频md5',
+    dataIndex: 'signature',
+    key: 'signature',
+    align: 'center',
+    scopedSlots: { customRender: 'signature' },
+    fixed: 'left',
+    width: 250
+  },
+  
+  {
     title: '花费',
     dataIndex: 'cost',
     key: 'cost',
@@ -213,7 +223,7 @@ const columns = [
     key: 'impression1kCost',
     scopedSlots: { customRender: 'impression1kCost' },
     align: 'center',
-    sorter: (a, b) => a.impression1kCost - b.impression1kCost
+    sorter: (a, b) => a.impression1kCost - b.impression1kCost,
   },
   {
     title: '平均封面点击单价(元)',
@@ -221,7 +231,7 @@ const columns = [
     key: 'photoClickCost',
     scopedSlots: { customRender: 'photoClickCost' },
     align: 'center',
-    sorter: (a, b) => a.photoClickCost - b.photoClickCost
+    sorter: (a, b) => a.photoClickCost - b.photoClickCost,
   },
   {
     title: '平均行为单价(元)',

+ 13 - 10
src/views/modules/Statistics/accountReport.vue

@@ -794,17 +794,20 @@ export default {
                             this.tabconvertNum.huanbi.y.push(0)  
                         }
                      }else{
-                        this.tabClick.yesterday.y.push(item.click)
-                        this.tabCost.yesterday.y.push(item.cost) 
-                        this.tabShowNum.yesterday.y.push(item.showNum)   
-                        this.tabDiscountCost.yesterday.y.push(item.discountCost)   
-                        this.tabconvertNum.yesterday.y.push(item.convertNum);
+                       if(item.afterData){
+                          this.tabClick.yesterday.y.push(item.afterData.click)
+                          this.tabCost.yesterday.y.push(item.afterData.cost) 
+                          this.tabShowNum.yesterday.y.push(item.afterData.showNum)   
+                          this.tabDiscountCost.yesterday.y.push(item.afterData.discountCost)   
+                          this.tabconvertNum.yesterday.y.push(item.afterData.convertNum);
+                          
+                          this.tabClick.x.push(item.afterData.statHour)
+                          this.tabCost.x.push(item.afterData.statHour) 
+                          this.tabShowNum.x.push(item.afterData.statHour)   
+                          this.tabDiscountCost.x.push(item.afterData.statHour)   
+                          this.tabconvertNum.x.push(item.afterData.statHour);
+                       }
                         
-                        this.tabClick.x.push(item.statHour)
-                        this.tabCost.x.push(item.statHour) 
-                        this.tabShowNum.x.push(item.statHour)   
-                        this.tabDiscountCost.x.push(item.statHour)   
-                        this.tabconvertNum.x.push(item.statHour);
                      } 
                   }else if(item.statDate){
                     //  console.log('date')

+ 894 - 0
src/views/modules/Statistics/effectReport.vue

@@ -0,0 +1,894 @@
+<template>
+  <div class="effectPage">
+    <div class="moduler">
+      <a-select mode="multiple"
+      style="width: 460px;margin-right:30px"
+      v-model="projectValue"
+      placeholder="请选择具体项目"
+      :filter-option="filterOption"
+      option-filter-prop="children"
+      :maxTagCount=4
+      @change="projectChange">
+        <a-select-option v-for="item in projectData" :key="item.projectId">
+          {{ item.projectName }}
+        </a-select-option>
+      </a-select>     
+      <a-range-picker v-model="dateRange" @change="dateChange" style="width:200px" />      
+      <div class="opt">
+        <a-button type='primary' @click="search">查询</a-button>
+      </div>
+    </div>
+    <div class="moduler">
+        <a-tabs v-model="tabKey" @change="tabKeyChange">
+            <a-tab-pane :key="1" tab="项目"></a-tab-pane>
+            <a-tab-pane :key="2" tab="账户"> </a-tab-pane>
+            <a-tab-pane :key="3" tab="广告计划"> </a-tab-pane>
+            <a-tab-pane :key="4" tab="广告组"> </a-tab-pane>
+            <a-tab-pane :key="5" tab="广告创意"> </a-tab-pane>
+        </a-tabs>
+        <div class="tableBody">
+          <a-spin :spinning="spinning">
+            <a-table :columns="columns" 
+            :data-source="tableData" 
+            :scroll="{ x: 3500 }"  
+            bordered  
+            :laoding='loading' 
+            :pagination='ipagination'
+            size='middle'
+             @change="tableChange"
+            >
+                <a slot="projectName" slot-scope="text,records" @click="goAccount(records)">{{text}}</a>
+                <a slot="authName" slot-scope="text,records" @click="goCampaign(records)">{{text}}</a>
+                <a slot="campaignName" slot-scope="text,records" @click="goUnit(records)">{{text}}</a>
+                <a slot="unitName" slot-scope="text,records" @click="goCreative(records)">{{text}}</a>
+                <!-- <a slot="creativeName" slot-scope="creativeName" >{{creativeName}}</a> -->
+
+                <a slot="coverUrl" slot-scope="text,records" >
+                  <!-- <img :src="text" alt="" style="width:90px" @click="openVideo(records)"> -->
+                  <a-popover placement="right">
+                      <template slot="content">
+                          <!-- {{record.videoId_dictText}}  -->
+                          <video :src="records.url" style="width:250px" controls autoplay muted ></video>
+                      </template>
+                      <template slot="title">
+                      <!-- <span>Title</span> -->
+                      </template>
+                      <!-- <a-button>Right</a-button> -->
+                      <img :src="text" alt="" style="width:60px">
+                  </a-popover>
+                </a>
+
+                <span slot="charge" slot-scope="charge"> {{charge|decimalsHandle}}</span>
+                <span slot="activationCost" slot-scope="activationCost"> {{activationCost|decimalsHandle}}</span>
+                <span slot="eventNextDayStayCost" slot-scope="eventNextDayStayCost"> {{eventNextDayStayCost|decimalsHandle}}</span>
+                <span slot="impression1kCost" slot-scope="impression1kCost"> {{impression1kCost|decimalsHandle}}</span>
+                <span slot="photoClickCost" slot-scope="photoClickCost"> {{photoClickCost|decimalsHandle}}</span>
+                <span slot="actionCost" slot-scope="actionCost"> {{actionCost|decimalsHandle}}</span>
+
+
+                <span slot="photoClick" slot-scope="photoClick"> {{photoClick|formatCurrency}}</span>
+                <span slot="photoShow" slot-scope="photoShow"> {{photoShow|formatCurrency}}</span>
+                <span slot="aclick" slot-scope="aclick"> {{aclick|formatCurrency}}</span>
+                <span slot="bclick" slot-scope="bclick"> {{bclick|formatCurrency}}</span>
+                <span slot="activation" slot-scope="activation"> {{activation|formatCurrency}}</span>
+                <span slot="submit" slot-scope="submit"> {{submit|formatCurrency}}</span>
+                <span slot="eventRegister" slot-scope="eventRegister"> {{eventRegister|formatCurrency}}</span>
+                <span slot="eventNextDayStay" slot-scope="eventNextDayStay"> {{eventNextDayStay|formatCurrency}}</span>
+                <span slot="photoShare" slot-scope="photoShare"> {{photoShare|formatCurrency}}</span>
+                <span slot="photoComment" slot-scope="photoComment"> {{photoComment|formatCurrency}}</span>
+                <span slot="photoLike" slot-scope="photoLike"> {{photoLike|formatCurrency}}</span>
+                <span slot="follow" slot-scope="follow"> {{follow|formatCurrency}}</span>
+                <span slot="report" slot-scope="report"> {{report|formatCurrency}}</span>
+                <span slot="cancelFollow" slot-scope="cancelFollow"> {{cancelFollow|formatCurrency}}</span>
+                <span slot="block" slot-scope="block"> {{block|formatCurrency}}</span>
+                <span slot="nagative" slot-scope="nagative"> {{nagative|formatCurrency}}</span>
+                <span slot="downloadStarted" slot-scope="downloadStarted"> {{downloadStarted|formatCurrency}}</span>
+                <span slot="downloadCompleted" slot-scope="downloadCompleted"> {{downloadCompleted|formatCurrency}}</span>
+                <span slot="downloadCompleted" slot-scope="downloadCompleted"> {{downloadCompleted|formatCurrency}}</span>
+
+
+                <span slot="photoClickRatio" slot-scope="photoClickRatio"> {{photoClickRatio|toPercentage}}</span>
+                <span slot="actionRate" slot-scope="actionRate"> {{actionRate|toPercentage}}</span>
+
+            </a-table>
+          </a-spin>  
+        </div>
+    </div>
+    <div >
+      <a-modal v-model="visible" title="视频详情" @ok="handleOk" :width='currentRecords.materialType==1?"350px" :"600px"'>
+        <div style="display:flex;justify-content:center">
+          <div style="margin-right:15px">
+            <video :src="imgSrc" style="width:250px" controls  v-if="currentRecords.materialType==1"></video>
+            <video :src="imgSrc" style="width:500px" controls v-if="currentRecords.materialType==2"></video>
+          </div>
+          <div>
+            <!-- <p> 标题:{{currentRecords.creativeName}}</p> -->
+            <!-- <p> 标题:{{currentRecords.creativeName}}</p> -->
+          </div>
+        </div>
+        
+      </a-modal>
+    </div>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/ipagination'
+const publicColumns=[
+    {
+    title: '消耗',
+    dataIndex: 'charge',
+    scopedSlots: { customRender: 'charge' },
+    align:'center',
+
+  },
+  {
+    title: '封面曝光数',
+    dataIndex: 'photoShow',
+    scopedSlots: { customRender: 'photoShow' },
+    align:'center',
+  },
+  {
+    title: '封面点击数',
+    dataIndex: 'photoClick',
+    scopedSlots: { customRender: 'photoClick' },
+    align:'center',
+  },
+  {
+    title: '素材曝光数',
+    dataIndex: 'aclick',
+    scopedSlots: { customRender: 'aclick' },
+    align:'center',
+  },
+  {
+    title: '行为数',
+    dataIndex: 'bclick',
+    scopedSlots: { customRender: 'bclick' },
+    align:'center',
+  },
+  {
+    title: '激活数',
+    dataIndex: 'activation',
+    scopedSlots: { customRender: 'activation' },
+    align:'center',
+  },
+  {
+    title: '注册数',
+    dataIndex: 'eventRegister',
+    scopedSlots: { customRender: 'eventRegister' },
+    align:'center',
+  },
+  {
+    title: '提交按钮点击数',
+    dataIndex: 'submit',
+    scopedSlots: { customRender: 'submit' },
+    align:'center',
+  },
+  {
+    title: '次日留存数',
+    dataIndex: 'eventNextDayStay',
+    scopedSlots: { customRender: 'eventNextDayStay' },
+    align:'center',
+  },
+  {
+    title: '次日留存成本',
+    dataIndex: 'eventNextDayStayCost',
+    scopedSlots: { customRender: 'eventNextDayStayCost' },
+    align:'center',
+  },
+  {
+    title: '激活成本',
+    dataIndex: 'activationCost',
+    scopedSlots: { customRender: 'activationCost' },
+    align:'center',
+  },
+  {
+    title: '封面点击率',
+    dataIndex: 'photoClickRatio',
+    scopedSlots: { customRender: 'photoClickRatio' },
+    align:'center',
+  },
+  {
+    title: '行为率 ',
+    dataIndex: 'actionRate',
+    scopedSlots: { customRender: 'actionRate' },
+    align:'center',
+  },
+  {
+    title: '均千次封面曝光花费',
+    dataIndex: 'impression1kCost',
+    scopedSlots: { customRender: 'impression1kCost' },
+    align:'center',
+  },
+  {
+    title: '平均封面点击单价',
+    dataIndex: 'photoClickCost',
+    scopedSlots: { customRender: 'photoClickCost' },
+    align:'center',
+  },
+  {
+    title: '平均行为单价',
+    dataIndex: 'actionCost',
+    scopedSlots: { customRender: 'actionCost' },
+    align:'center',
+  },
+  {
+    title: '分享数',
+    dataIndex: 'photoShare',
+    scopedSlots: { customRender: 'photoShare' },
+    align:'center',
+  },
+  {
+    title: '评论数',
+    dataIndex: 'photoComment',
+    scopedSlots: { customRender: 'photoComment' },
+    align:'center',
+  },
+  {
+    title: '点赞数',
+    dataIndex: 'photoLike',
+    scopedSlots: { customRender: 'photoLike' },
+    align:'center',
+  },
+  {
+    title: '新增关注数',
+    dataIndex: 'follow',
+    scopedSlots: { customRender: 'follow' },
+    align:'center',
+  },
+  {
+    title: '举报数',
+    dataIndex: 'report',
+    scopedSlots: { customRender: 'report' },
+    align:'center',
+  },
+  {
+    title: '取消关注数',
+    dataIndex: 'cancelFollow',
+    scopedSlots: { customRender: 'cancelFollow' },
+    align:'center',
+  },
+  {
+    title: '拉黑数',
+    dataIndex: 'block',
+    scopedSlots: { customRender: 'block' },
+    align:'center',
+  },
+  {
+    title: '减少此类作品数',
+    dataIndex: 'nagative',
+    scopedSlots: { customRender: 'nagative' },
+    align:'center',
+  },
+  {
+    title: '安卓下载开始数',
+    dataIndex: 'downloadStarted',
+    scopedSlots: { customRender: 'downloadStarted' },
+    align:'center',
+  },
+  {
+    title: '安卓下载完成数',
+    dataIndex: 'downloadCompleted',
+    scopedSlots: { customRender: 'downloadCompleted' },
+    align:'center',
+  },
+]
+
+const projectColumns = [
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    width: 150,
+    align:'center',
+    scopedSlots: { customRender: 'projectName' },
+    fixed: 'left'
+  },
+  {
+    title: '广告主',
+    dataIndex: 'advertiserName',
+    width: 200,  
+    align:'center',
+    fixed: 'left'
+  },
+  {
+    title: '运营负责人',
+    dataIndex: 'responsibleName',    
+    scopedSlots: { customRender: 'responsibleName' },
+    align:'center',
+  },
+  {
+    title: '设计负责人',
+    dataIndex: 'designResponsibleName',
+    scopedSlots: { customRender: 'designResponsibleName' },
+    align:'center',
+  },
+  // {
+  //   title: '时间',
+  //   dataIndex: 'statDate',
+  //   // width:200,
+  //   scopedSlots: { customRender: 'statDate' },
+  //   align:'center',
+  // },
+]
+
+const accountColumns = [
+  {
+    title: '账户名称',
+    dataIndex: 'authName',
+    width: 130,
+    align:'center',
+    scopedSlots: { customRender: 'authName' },
+    fixed: 'left'
+  },
+  {
+    title: '账户id',
+    dataIndex: 'accountId',
+    align:'center',
+    width:90,
+    scopedSlots: { customRender: 'accountId' },
+    fixed: 'left'
+  },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    width: 130,
+    align:'center',
+    scopedSlots: { customRender: 'projectName' },
+    fixed: 'left'
+  },
+  
+  // {
+  //   title: '时间',
+  //   dataIndex: 'statDate',
+  //   // width:200,
+  //   scopedSlots: { customRender: 'statDate' },
+  //   align:'center',
+  // },
+  
+]
+
+const campaignColumns = [
+  {
+    title: '广告计划名称',
+    dataIndex: 'campaignName',
+    width: 180,
+    align:'center',
+    scopedSlots: { customRender: 'campaignName' },
+    fixed: 'left'
+  },
+  {
+    title: '广告计划id',
+    dataIndex: 'campaignId',
+    align:'center',
+    scopedSlots: { customRender: 'campaignId' },
+    fixed: 'left',
+    width:100,
+  },
+  {
+    title: '账户名称',
+    dataIndex: 'authName',
+    width: 150,
+    align:'center',
+    scopedSlots: { customRender: 'authName' },
+    fixed: 'left'
+  },
+  
+  // {
+  //   title: '时间',
+  //   dataIndex: 'statDate',
+  //   // width:200,
+  //   scopedSlots: { customRender: 'statDate' },
+  //   align:'center',
+  // },
+
+  
+]
+
+const unitColumns = [
+  {
+    title: '广告组名称',
+    dataIndex: 'unitName',
+    align:'center',
+    scopedSlots: { customRender: 'unitName' },
+    fixed: 'left',
+    width:180,
+  },
+  {
+    title: '广告组id',
+    dataIndex: 'unitId',
+    align:'center',
+    width:90,
+    scopedSlots: { customRender: 'unitId' },
+    fixed: 'left'
+  },
+  {
+    title: '计划名称',
+    dataIndex: 'campaignName',
+    width: 180,
+    align:'center',
+    scopedSlots: { customRender: 'campaignName' },
+    fixed: 'left'
+  },
+
+  // {
+  //   title: '时间',
+  //   dataIndex: 'statDate',
+  //   // width:200,
+  //   scopedSlots: { customRender: 'statDate' },
+  //   align:'center',
+  // },
+
+  
+]
+
+const ideaColumns = [
+    {
+      title: '创意',
+      dataIndex: 'coverUrl',
+      align:'center',
+      scopedSlots: { customRender: 'coverUrl' },
+      fixed: 'left',
+      width:100,
+    },
+   {
+    title: '创意名称',
+    dataIndex: 'creativeName',
+    align:'center',
+    scopedSlots: { customRender: 'creativeName' },
+    fixed: 'left',
+    width:130,
+  },
+
+  {
+    title: '广告组名称',
+    dataIndex: 'unitName',
+    align:'center',
+    scopedSlots: { customRender: 'unitName' },
+    fixed: 'left',
+    width:130,
+  },
+
+  // {
+  //   title: '时间',
+  //   dataIndex: 'statDate',
+  //   // width:200,
+  //   scopedSlots: { customRender: 'statDate' },
+  //   align:'center',
+  // },
+ 
+]
+
+export default {
+    mixins:[JeecgListMixin],
+    data() {
+      return {
+        projectValue:[],
+        dateRange:[moment().subtract(1,'days'),moment()],
+        projectData:[],
+        tableData:[],
+        columns:[...projectColumns,...publicColumns],
+        loading:false,
+        tabKey:1,
+        currentid:undefined,
+        accountId:undefined,
+        projectId:undefined,
+        campaignId:undefined,
+        unitId:undefined,    
+        spinning:false,  
+        visible:false,
+        imgSrc:undefined,
+        currentRecords:{},
+      }
+    },
+    methods: {
+      handleOk(e) {
+        // console.log(e);
+        this.visible = false;
+      },
+      openVideo(records){
+        this.visible=true;
+        this.imgSrc=records.url;
+        this.currentRecords=records
+      },
+      // 过滤事件
+      filterOption(input, option) {
+        return (
+          option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
+        //table的改变(页码改变请求数据,也可以写排序)
+      tableChange(pagination, filters, sorter, { currentDataSource }){
+          // this.searchHandle();
+          this.search();
+      },
+      projectChange(val){
+        console.log(val)
+      },
+      dateChange(date,dateString){
+        console.log(date,dateString)
+      },
+      // tab切换事件
+      tabKeyChange(key){
+        // console.log(key)
+        // if(key==1){
+        //   this.getTableProjectList()
+        // }else if(key==2){
+        //   this.getTableAccountList();
+        // }else if(){
+
+        // }
+        this.search();
+      },
+      // x项目的table值
+      getTableProjectList(paramse){   
+        this.loading=true;     
+        this.spinning=true;
+        // this.ipagination.current=0;
+        this.columns= [...projectColumns,...publicColumns]  
+        postAction('/kuaishou/getKuaishouProjectInfo',paramse).then(res=>{
+          console.log(res);
+          this.tabKey=1;
+          this.loading=false;
+          this.spinning=false;
+          if(res.success){             
+              res.result.list.forEach((item,index)=>{
+                item.key=index
+              })
+              this.tableData=res.result.list;
+              this.ipagination.total=res.result.total
+          }
+         
+        })
+      },
+      // 从项目跳转到账户,并获取账户的table值
+      goAccount(records){
+        console.log(records,'--account');
+        this.projectId=records.projectId 
+        this.getTableAccountList()
+
+      },
+      // 从账户到计划
+      goCampaign(records){
+        console.log(records,'--Campaign');
+        this.accountId=records.accountId;
+        this.getTableCampaignList()
+      },
+      // 从计划到组
+      goUnit(records){
+        console.log(records,'--unit');
+        this.campaignId=records.campaignId;
+        this.getTableUnitList()
+      },
+      // 从组到创意
+      goCreative(records){
+          console.log(records,'--creat');
+          this.unitId=records.unitId;
+          this.getTableCreativeList()
+      },
+      getTableAccountList(){         
+          this.loading=true; 
+          this.spinning=true;
+          // this.ipagination.current=0;           
+          postAction('/kuaishou/getKuaishouAccountInfoByProjectId',{
+            startDate:this.dateRange[0].format('YYYY-MM-DD'),
+            endDate:this.dateRange[1].format('YYYY-MM-DD'),
+            projectId:this.projectId,
+            pageNum:this.ipagination.current,
+            pageSize:'10'
+          }).then(res=>{
+              console.log(res)
+               this.tabKey=2;
+               this.loading=false; 
+               this.spinning=false;  
+               this.columns= [...accountColumns,...publicColumns] 
+              if(res.success){
+                 
+                this.tableData= res.result.list
+                this.ipagination.total=res.result.total
+              }
+          })
+      },
+      getTableCampaignList(){        
+        this.loading=true; 
+        // this.ipagination.current=0; 
+        this.spinning=true;       
+        postAction('/kuaishou/getKuaishouCampaignInfoByAccountId',{
+          startDate:this.dateRange[0].format('YYYY-MM-DD'),
+          endDate:this.dateRange[1].format('YYYY-MM-DD'),
+          accountId:this.accountId,
+          pageNum:this.ipagination.current,
+          pageSize:'10'
+        }).then(res=>{
+            console.log(res)
+            this.tabKey=3;
+            this.loading=false; 
+            this.spinning=false;
+            this.columns= [...campaignColumns,...publicColumns]      
+            if(res.success){             
+              this.tableData= res.result.list
+              this.ipagination.total=res.result.total
+            }
+        })
+      },
+      getTableUnitList(){        
+        this.loading=true; 
+        // this.ipagination.current=0;   
+        this.spinning=true;      
+        postAction('/kuaishou/getKuaishouUnitInfoByCampaignId',{
+          startDate:this.dateRange[0].format('YYYY-MM-DD'),
+          endDate:this.dateRange[1].format('YYYY-MM-DD'),
+          campaignId:this.campaignId,
+          pageNum:this.ipagination.current,
+          pageSize:'10'
+        }).then(res=>{
+            console.log(res)
+            this.tabKey=4;
+            this.loading=false;  
+            this.spinning=false;
+            this.columns= [...unitColumns,...publicColumns]   
+            if(res.success){
+              
+              this.tableData= res.result.list
+              this.ipagination.total=res.result.total
+            }
+        })
+      },
+      getTableCreativeList(){        
+        this.loading=true; 
+        // this.ipagination.current=0;      
+        this.spinning=true; 
+        postAction('/kuaishou/getKuaishouCreativeInfoByUnitId',{
+          startDate:this.dateRange[0].format('YYYY-MM-DD'),
+          endDate:this.dateRange[1].format('YYYY-MM-DD'),
+          unitId:this.unitId,
+          pageNum:this.ipagination.current,
+          pageSize:'10'
+        }).then(res=>{
+            console.log(res)
+            this.tabKey=5;
+            this.loading=false; 
+            this.spinning=false;  
+            this.columns= [...ideaColumns,...publicColumns]    
+            if(res.success){ 
+              this.tableData= res.result.list
+              this.ipagination.total=res.result.total
+            }
+        })
+      },
+
+      search(){
+        if(this.tabKey==1){
+          this.getTableProjectList({
+            startDate:this.dateRange[0].format('YYYY-MM-DD'),
+            endDate:this.dateRange[1].format('YYYY-MM-DD'),
+            projectList:this.projectValue,
+            pageNum:this.ipagination.current,
+            pageSize:'10'
+          })
+        }else if(this.tabKey==2){
+          this.getTableAccountList();
+        }else if(this.tabKey==3){
+          this.getTableCampaignList();
+        }else if(this.tabKey==4){
+          this.getTableUnitList();
+        }else if(this.tabKey==5){
+          this.getTableCreativeList();
+        }
+          
+      },
+    },
+    mounted() {
+      // /ctop/projectMember/participateList
+      //  var arr = this.request.split(',')
+      //         var dataTwo = []
+      //         var data = res.result.filter(item => {
+      //           return item.mediaId == arr[0]
+      //         })
+      //         if (arr.length > 1) {
+      //           dataTwo = res.result.filter(item => {
+      //             return item.mediaId == arr[1]
+      //           })
+      //         }
+        postAction('/ctop/projectMember/getOwnProjects',{
+          mediaIds:[2,4],         
+        }).then(res=>{
+          console.log(res);
+          this.projectData=res.result
+        });
+        console.log(this.dateRange)
+        this.getTableProjectList({
+          startDate:this.dateRange[0].format('YYYY-MM-DD'),
+          endDate:this.dateRange[1].format('YYYY-MM-DD'),
+          projectList:[],
+          pageNum:'0',
+          pageSize:'10'
+        });
+    },
+    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="less">
+.resize-table-th {
+  position: relative;
+  .table-draggable-handle {
+    height: 100% !important;
+    bottom: 0;
+    left: auto !important;
+    right: -5px;
+    cursor: col-resize;
+    touch-action: none;
+  }
+}
+</style>
+<style lang="scss" scoped>
+.effectPage{
+  .moduler {
+    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);
+    .opt{
+      position: absolute;
+      top: 32px ;
+      right: 24px;
+    }
+    .moduler-title {
+      display: flex;
+      align-items: 'center';
+      font-size: 22px;
+      margin-bottom: 20px;
+    }
+    .row-item {
+      display: flex;
+      justify-content: flex-start;
+      align-items: 'center';
+      margin-bottom: 32px;
+    }
+    .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: 5px;
+    }
+    .row-item .label-item {
+      position: relative;
+      align-items: flex-start;
+      align-self: flex-start;
+      line-height: 20px;
+      height: 20px;
+      margin-top: 7px;
+      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;
+      }
+    }
+
+    .tableBody{
+      margin-top: 10px;
+    }
+  }
+  .spin-content {
+    border: 1px solid #91d5ff;
+    background-color: #e6f7ff;
+    padding: 30px;
+  }
+}
+</style>

+ 9 - 1
src/views/modules/Statistics/materialStatistics.vue

@@ -93,7 +93,7 @@
             size="middle"
             :customRow="rowClick"
             :loading="loading"
-            :scroll="{ x: 1900 }"
+            :scroll="{ x: 2300 }"
           >
             <div slot="url" slot-scope="url">
               <video @click.stop class="video" :src="url" controls="controls" style="height:200px;width:112.5px">
@@ -140,6 +140,14 @@ const columns = [
     scopedSlots: { customRender: 'url' }
   },
   {
+    title: '视频md5',
+    dataIndex: 'signature',
+    key: 'signature',
+    align: 'center',
+    scopedSlots: { customRender: 'signature' },
+    width: 250
+  },
+  {
     title: '花费',
     dataIndex: 'cost',
     key: 'cost',

+ 1 - 2
src/views/modules/Statistics/mediaReport.vue

@@ -381,8 +381,7 @@ export default {
         },
         //table的改变(页码改变请求数据,也可以写排序)
         tableChange(pagination, filters, sorter, { currentDataSource }){
-         
-            
+   
             this.searchHandle();
         },
         //table的网络请求

+ 257 - 184
src/views/modules/Statistics/refuseData.vue

@@ -6,7 +6,7 @@
         <div class="search-bar" style="width:100%;display:flex">
           <span style="line-height:35px;margin-left:15px">账户选择:</span>
           <treeselect :appId.sync="appId" :multiple="false" />
-          <a-button type="primary" style="margin-left:10px" @click="addUser">搜索</a-button>
+          <a-button type="primary" style="margin-left:10px" @click="(ipagination.current=1);addUser()">搜索</a-button>
         </div>
       </a-row>
     </a-row>
@@ -16,21 +16,18 @@
           <div style="display:flex;margin:0 0 20px 0">
             <a-input placeholder="请输出要查找的创意名称" style="width:300px;" v-model="keyWord" />
             <a-button type="primary" style="margin-left:10px" @click="addUserKey">搜索</a-button>
+            <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0"
+              :loading="loadingList">一键重提
+            </a-button>
           </div>
 
-          <a-table
-            :columns="columns"
-            :dataSource="dataList"
-            bordered
-            :loading="loading"
-            size="middle"
-            :pagination="ipagination"
-          >
-            <div slot="videoUrl" slot-scope="videoUrl">
+          <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle"
+            :pagination="ipagination" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
+            <!-- <div slot="videoUrl" slot-scope="videoUrl">
               <video class="video" :src="videoUrl" controls="controls" style="height:200px;width:112.5px">
                 您的浏览器不支持 video 标签。
               </video>
-            </div>
+            </div> -->
             <div slot="coverUrl" slot-scope="coverUrl">
               <img :src="coverUrl" controls="controls" style="height:200px;width:112.5px" />
             </div>
@@ -50,197 +47,273 @@
         </a-card>
       </a-col>
     </a-row>
-    <a-modal
-      :title="editTitle"
-      :visible="visible"
-      @ok="handleOk"
-      :confirmLoading="confirmLoading"
-      @cancel="handleCancel"
-    >
+    <a-modal :title="editTitle" :visible="visible" @ok="handleOk" :confirmLoading="confirmLoading"
+      @cancel="handleCancel">
       <a-textarea v-model="editWord" autosize />
     </a-modal>
+    <a-modal v-model="visibleFail" title="重提信息" :footer="null">
+      <div v-if="fail">
+        修改成功条数:{{ fail.successCount }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;失败条数:{{
+              fail.failCount
+            }}
+        <div style="margin-top:20px">
+          <p v-for="(item, index) of fail.failInfo" :key="index">
+            <span>名称:{{ item.campaignName?item.campaignName:item.unitName }}</span><br />
+            <span>错误信息:{{ item.message }}</span>
+          </p>
+        </div>
+      </div>
+    </a-modal>
   </div>
 </template>
 
 <script>
-import moment from 'moment'
-import {  getRefuseCreative, updateCreative, selectByCreateName } from '@api/statistics'
-import axios from 'axios'
-import EditableCell from './components/EditableCell'
-import { mapGetters } from 'vuex'
-
-import Treeselect from './components/Treeselect.vue'
+  import moment from 'moment'
+  import {
+    getRefuseCreative,
+    updateCreative,
+    selectByCreateName
+  } from '@api/statistics'
+  import axios from 'axios'
+  import EditableCell from './components/EditableCell'
+  import {
+    mapGetters
+  } from 'vuex'
+  import {
+    deleteAction,
+    getAction,
+    postAction
+  } from '@/api/manage'
+  import Treeselect from './components/Treeselect.vue'
 
-import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
-const columns = [
-  {
-    title: '账号Id',
-    dataIndex: 'accountId',
-    key: 'accountId',
-    align: 'center'
-  },
-  {
-    title: '计划Id',
-    dataIndex: 'campaignId',
-    key: 'campaignId',
-    align: 'center'
-  },
-  {
-    title: '广告组id',
-    dataIndex: 'unitId',
-    key: 'unitId',
-    align: 'center'
-  },
-  {
-    title: '创意id',
-    dataIndex: 'creativeId',
-    key: 'photoClick',
-    align: 'center'
-  },
-  {
-    title: '创意名称',
-    dataIndex: 'creativeName',
-    key: 'creativeName',
-    align: 'left',
-    scopedSlots: { customRender: 'creativeName' }
-  },
-  {
-    title: '视频',
-    dataIndex: 'videoUrl',
-    key: 'videoUrl',
-    align: 'center',
-    scopedSlots: { customRender: 'videoUrl' }
-  },
-  {
-    title: '封面',
-    dataIndex: 'coverUrl',
-    key: 'coverUrl',
-    align: 'center',
-    scopedSlots: { customRender: 'coverUrl' }
-  },
-  {
-    title: '拒绝原因',
-    dataIndex: 'reviewDetail',
-    key: 'reviewDetail',
-    align: 'left'
-  },
+  import {
+    stopOtherVideo,
+    closeAllVideoFun
+  } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+  const columns = [{
+      title: '账号Id',
+      dataIndex: 'accountId',
+      key: 'accountId',
+      align: 'center'
+    },
+    {
+      title: '计划Id',
+      dataIndex: 'campaignId',
+      key: 'campaignId',
+      align: 'center'
+    },
+    {
+      title: '广告组id',
+      dataIndex: 'unitId',
+      key: 'unitId',
+      align: 'center'
+    },
+    {
+      title: '创意id',
+      dataIndex: 'creativeId',
+      key: 'photoClick',
+      align: 'center'
+    },
+    {
+      title: '创意名称',
+      dataIndex: 'creativeName',
+      key: 'creativeName',
+      align: 'left',
+      scopedSlots: {
+        customRender: 'creativeName'
+      }
+    },
+    // {
+    //   title: '视频',
+    //   dataIndex: 'videoUrl',
+    //   key: 'videoUrl',
+    //   align: 'center',
+    //   scopedSlots: {
+    //     customRender: 'videoUrl'
+    //   }
+    // },
+    {
+      title: '封面',
+      dataIndex: 'coverUrl',
+      key: 'coverUrl',
+      align: 'center',
+      scopedSlots: {
+        customRender: 'coverUrl'
+      }
+    },
+    {
+      title: '拒绝原因',
+      dataIndex: 'reviewDetail',
+      key: 'reviewDetail',
+      align: 'left'
+    },
 
-  {
-    title: '广告语',
-    dataIndex: 'description',
-    key: 'description',
-    align: 'left',
-    scopedSlots: { customRender: 'description' }
-  }
-]
+    {
+      title: '广告语',
+      dataIndex: 'description',
+      key: 'description',
+      align: 'left',
+      scopedSlots: {
+        customRender: 'description'
+      }
+    }
+  ]
 
-export default {
-  name: 'refuse-data',
-  components: {
-    EditableCell,
-    Treeselect
-  },
+  export default {
+    name: 'refuse-data',
+    components: {
+      EditableCell,
+      Treeselect
+    },
 
-  data: function() {
-    return {
-      title: '被拒创意列表',
-      appId: null,
-      loading: false,
-      columns,
-      dataList: [],
-      keyWord: '',
-      editTitle: '',
-      confirmLoading: false,
-      visible: false,
-      editWord: '',
-      nowData: null,
-      ipagination: {
-        current: 1,
-        pageSize: 10,
-        showTotal: (total, range) => {
-          return range[0] + '-' + range[1] + ' 共' + total + '条'
-        },
-        showQuickJumper: true,
-        //   showSizeChanger: true,
-        total: 0,
-        onChange: current => {
-          // 切换分页时的回调,
-          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
-          this.ipagination.current = current
+    data: function () {
+      return {
+        title: '被拒创意列表',
+        visibleFail: false,
+        fail: null,
+        appId: null,
+        loading: false,
+        columns,
+        dataList: [],
+        keyWord: '',
+        editTitle: '',
+        confirmLoading: false,
+        visible: false,
+        editWord: '',
+        nowData: null,
+        selectedRowKeys: [],
+        selectedRowKeysValue: [],
+        loadingList: false,
+        ipagination: {
+          current: 1,
+          pageSize: 50,
+          showTotal: (total, range) => {
+            return range[0] + '-' + range[1] + ' 共' + total + '条'
+          },
+          showQuickJumper: true,
+          //   showSizeChanger: true,
+          total: 0,
+          onChange: current => {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current
+            this.selectedRowKeys = []
+            this.selectedRowKeysValue = []
+            this.addUser()
+          }
         }
       }
-    }
-  },
-  filters: {},
-  methods: {
-    handleOk(e) {
-      this.confirmLoading = true
-      var params = {}
-      params.accountId = this.nowData.accountId
-      params.campaignId = this.nowData.campaignId
-      params.unitId = this.nowData.unitId
-      params.creativeId = this.nowData.creativeId
-      params.creativeName = this.editTitle == '创意名称修改' ? this.editWord : this.nowData.creativeName
-      params.description = this.editTitle == '广告语修改' ? this.editWord : this.nowData.description
-      updateCreative(params).then(res => {
-        if (res.code == 0) {
-          this.addUser()
-          this.visible = false
-          this.confirmLoading = false
-        } else {
-          this.$message.error(res.message)
-          this.visible = false
-          this.confirmLoading = false
-        }
-      })
-    },
-    handleCancel(e) {
-      this.visible = false
     },
-    onCellChange(item, dataIndex) {
-      this.editWord = item[dataIndex]
-      this.editTitle = dataIndex == 'creativeName' ? '创意名称修改' : '广告语修改'
-      this.nowData = item
-      this.visible = true
+    filters: {},
+    watch: {
+      appId(n, o) {
+        console.log(n, o)
+        if (n != o) {
+          this.ipagination.current = 1
+        }
+      }
     },
-    moment,
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    addUser() {
-      this.loading = true
-      var params = {}
-      params.accountId = this.appId + ''
-      if (this.appId) {
-        getRefuseCreative(params).then(res => {
+    methods: {
+      clickAgain() {
+        this.loadingList = true
+        var params = {}
+        params.accountId = this.appId + ''
+        params.creativeArr = this.selectedRowKeysValue
+        postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
+          if (res.success) {
+            this.loadingList = false
+            this.selectedRowKeysValue = []
+            this.selectedRowKeys = []
+            this.visibleFail = true
+            this.fail = res.result
+            this.addUser()
+          } else {
+            this.loadingList = false
+            this.visibleFail = true
+            this.fail = res.result
+            this.$message.error(res.message)
+          }
+        })
+      },
+      onSelectChange(selectedRowKeys, selectionRows) {
+        this.selectedRowKeys = selectedRowKeys
+        this.selectedRowKeysValue = selectionRows.map(item => {
+          return {
+            description: item.description,
+            creativeId: item.creativeId
+          }
+        })
+        //    this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
+      },
+      handleOk(e) {
+        this.confirmLoading = true
+        var params = {}
+        params.accountId = this.nowData.accountId
+        params.campaignId = this.nowData.campaignId
+        params.unitId = this.nowData.unitId
+        params.creativeId = this.nowData.creativeId
+        params.creativeName = this.editTitle == '创意名称修改' ? this.editWord : this.nowData.creativeName
+        params.description = this.editTitle == '广告语修改' ? this.editWord : this.nowData.description
+        updateCreative(params).then(res => {
           if (res.code == 0) {
-            this.dataList = res.data.map((v, index) => {
-              return {
-                ...v,
-                key: index
-              }
-            })
-            this.list = this.dataList
-            this.loading = false
-            this.ipagination.total = this.dataList.length
+            this.addUser()
+            this.visible = false
+            this.confirmLoading = false
+          } else {
+            this.$message.error(res.message)
+            this.visible = false
+            this.confirmLoading = false
           }
         })
-      } else {
-        this.$message.error('请选择账户')
+      },
+      handleCancel(e) {
+        this.visible = false
+      },
+      onCellChange(item, dataIndex) {
+        this.editWord = item[dataIndex]
+        this.editTitle = dataIndex == 'creativeName' ? '创意名称修改' : '广告语修改'
+        this.nowData = item
+        this.visible = true
+      },
+      moment,
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      addUser() {
+        this.loading = true
+        var params = {}
+        params.accountId = this.appId + ''
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+        if (this.appId) {
+          getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
+            if (res.code == 0) {
+              this.dataList = res.result.records.map((v, index) => {
+                return {
+                  ...v,
+                  key: index
+                }
+              })
+              this.list = this.dataList
+              this.loading = false
+              this.ipagination.total = res.result.total
+            }
+          })
+        } else {
+          this.$message.error('请选择账户')
+        }
+      },
+      addUserKey() {
+        this.dataList = this.list.filter(item => {
+          return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        })
       }
     },
-    addUserKey() {
-      this.dataList = this.list.filter(item => {
-        return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
-      })
+    watch: {},
+    distoryed() {},
+    updated() {
+      stopOtherVideo()
+    },
+    mounted: function () {
+      this.$nextTick(() => {})
     }
-  },
-  watch: {},
-  distoryed() {},
-  updated() {
-    stopOtherVideo()
-  },
-  mounted: function() {
-    this.$nextTick(() => {
-    })
   }
-}
-</script>
+</script>

File diff ditekan karena terlalu besar
+ 1362 - 0
src/views/modules/Statistics/xiaoshouStatistics.vue


+ 159 - 0
src/views/modules/advertiser/KuaishouLoginList.vue

@@ -0,0 +1,159 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+        <a-col :md="6" :sm="8">
+            <a-form-item label="账号">
+              <a-input placeholder="请输入账号" v-model="queryParam.accountName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="账号类型">
+              <a-select v-model="queryParam.loginType">
+                <a-select-option value="none">
+                  不限
+                </a-select-option>
+                <a-select-option value="kuaishou">
+                  快手
+                </a-select-option>
+                <a-select-option value="bytedance">
+                  头条
+                </a-select-option>
+                <a-select-option value="pangolin">
+                  穿山甲
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8" >
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <bindAccountLogin-modal ref="modalForm" @ok="modalFormOk"></bindAccountLogin-modal>
+  </a-card>
+</template>
+
+<script>
+  import BindAccountLoginModal from './modules/BindAccountLoginModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "BindAccountLoginList",
+    mixins:[JeecgListMixin],
+    components: {
+      BindAccountLoginModal
+    },
+    data () {
+      return {
+        loginType: 'none',
+        description: '绑定登录信息管理页面',
+        // 表头
+        columns: [
+		   {
+            title: '账号',
+            align:"center",
+            dataIndex: 'accountName'
+           },
+		   {
+            title: '密码',
+            align:"center",
+            dataIndex: 'password'
+           },
+		   {
+            title: '登录方式',
+            align:"center",
+            dataIndex: 'loginType'
+           },
+		   {
+            title: '账号状态',
+            align:"center",
+            dataIndex: 'status'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/ctop/bindAccountLogin/list",
+          delete: "/ctop/bindAccountLogin/delete",
+          deleteBatch: "/ctop/bindAccountLogin/deleteBatch",
+          exportXlsUrl: "ctop/bindAccountLogin/exportXls",
+          importExcelUrl: "ctop/bindAccountLogin/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 11 - 0
src/views/modules/advertiser/ProjectList.vue

@@ -74,6 +74,7 @@
     </div>
 
     <!-- table区域-begin -->
+    <!-- 供应商 -->
     <div>
       <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
         :pagination="ipagination" :loading="loading" @change="handleTableChange">
@@ -152,6 +153,16 @@
             }
           },
           {
+            title: '供应商',
+            align: 'center',
+            dataIndex: 'supplierCode_dictText'
+          },
+          {
+            title: '销售',
+            align: 'center',
+            dataIndex: 'saleId_dictText'
+          },
+          {
             title: '运营负责人',
             align: 'center',
             dataIndex: 'responsibleName'

+ 56 - 20
src/views/modules/advertiser/ProjectMemberList.vue

@@ -39,7 +39,8 @@
       <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
         :pagination="ipagination" :loading="loading">
         <span slot="maxBid" slot-scope="maxBid">{{ maxBid / 1000 }}</span>
-        <span slot="mediaId" slot-scope="mediaId">{{ mediaId == 1 ? '头条' :mediaId == 2? '快手':mediaId == 3?'头条内广':'快手内广' }}</span>
+        <span slot="mediaId"
+          slot-scope="mediaId">{{ mediaId == 1 ? '头条' :mediaId == 2? '快手':mediaId == 3?'头条内广':'快手内广' }}</span>
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">{{ noTitleKey == 'myProject' ? '查看成员' : '账号绑定' }}</a>
           <a-divider type="vertical" />
@@ -55,7 +56,8 @@
     <!-- table区域-end -->
 
     <!--  查看项目成员 -->
-    <a-modal :maskClosable="false" :title="title" v-model="visible" @ok="handleOk" width="800px" class="close-account-my-project">
+    <a-modal :maskClosable="false" :title="title" v-model="visible" @ok="handleOk" width="800px"
+      class="close-account-my-project">
       <div style="display:flex;line-height:50px;flex-wrap: wrap;">
         <div style="width:25%;text-align:center;" v-for="(item, index) of memberList" :key="index">
           <a-tag color="#2db7f5" @close="log(item.id)" closable>{{ item.userName }}
@@ -66,7 +68,8 @@
     </a-modal>
 
     <!--  添加项目成员 -->
-    <a-modal :maskClosable="false" title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading">
+    <a-modal :maskClosable="false" title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd"
+      :confirmLoading="confirmLoading">
       <!-- /sys/user/getAllUserList -->
       <a-select v-model="appId" showSearch allowClear mode="multiple" placeholder="请选择成员" optionFilterProp="children"
         style="width: 100%" @focus="handleFocus" @blur="handleBlur" @change="handleChange" :filterOption="true"
@@ -95,9 +98,9 @@
             <a-radio-group buttonStyle="outline" v-model="loginType">
               <a-radio-button value="kuaishou">快手</a-radio-button>
               <a-radio-button value="bytedance">头条</a-radio-button>
-             
+
             </a-radio-group>
-             <br><span style="color:red;" v-if="loginType == 'bytedance'">*重要:如存在一户多开情况,请勾选所有子账号进行授权!!!</span>
+            <br><span style="color:red;" v-if="loginType == 'bytedance'">*重要:如存在一户多开情况,请勾选所有子账号进行授权!!!</span>
           </a-form-item>
           <a-form-item label="是否本代理商开户:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }" v-if="loginType == 'kuaishou'">
@@ -320,6 +323,7 @@
             // 切换分页时的回调,
             // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
             this.ipaginationAccount.current = current
+
           }
         },
         loadingAccount: false,
@@ -415,6 +419,18 @@
         return y + '-' + MM + '-' + d
       }
     },
+    watch: {
+      'ipagination.current': function (n, o) {
+        console.log(n, o)
+        if (this.noTitleKey == 'participation') {
+          this.getParticipateList()
+        } else {
+          this.getResponsibleList()
+        }
+
+
+      }
+    },
     methods: {
       //   /ctop/userAllocation/getAccountsByProjectId    projectId  userId
       projectLook(item) {
@@ -475,6 +491,7 @@
       onTabChange(key, type) {
         this[type] = key
         this.keyWord = ''
+        this.ipagination.current = 1
         if (key == 'myProject') {
           this.getResponsibleList()
         } else {
@@ -486,13 +503,17 @@
         this.dataSource = []
         this.dataElse = []
         this.loading = true
-        getAction('/ctop/project/responsibleList', {
-          userId: this.userInfo().id
+        getAction('/ctop/project/responsibleListV2', {
+          userId: this.userInfo().id,
+          pageSize: this.ipagination.pageSize,
+          pageNo: this.ipagination.current,
+          projectName: this.keyWord
         }).then(res => {
           if (res.code == 0) {
-            this.dataSource = res.result
-            this.dataElse = res.result
             this.loading = false
+            this.dataSource = res.result.records
+            this.dataElse = res.result.records
+            this.ipagination.total = res.result.total
           }
         })
       },
@@ -501,12 +522,16 @@
         this.dataSource = []
         this.dataElse = []
         this.loading = true
-        getAction('/ctop/projectMember/participateList', {
-          userId: this.userInfo().id
+        getAction('/ctop/projectMember/participateListV2', {
+          userId: this.userInfo().id,
+          pageSize: this.ipagination.pageSize,
+          pageNo: this.ipagination.current,
+          projectName: this.keyWord
         }).then(res => {
           if (res.code == 0) {
-            this.dataSource = res.result
-            this.dataElse = res.result
+            this.dataSource = res.result.records
+            this.dataElse = res.result.records
+            this.ipagination.total = res.result.total
             this.loading = false
           }
         })
@@ -578,7 +603,7 @@
           this.getMemberList(item.id)
         } else {
           this.mode = 'authorization'
-          this.loginType = item.mediaId == '1'||item.mediaId == '3' ? 'bytedance' : 'kuaishou'
+          this.loginType = item.mediaId == '1' || item.mediaId == '3' ? 'bytedance' : 'kuaishou'
           this.record = item
           this.visibleBind = true
         }
@@ -647,12 +672,24 @@
       },
       searchReset() {
         this.keyWord = ''
-        this.dataSource = this.dataElse
+        // this.dataSource = this.dataElse
+        if (this.noTitleKey == 'participation') {
+          this.getParticipateList()
+        } else {
+          this.getResponsibleList()
+        }
       },
       searchQuery() {
-        this.dataSource = this.dataElse.filter(item => {
-          return item.projectName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
-        })
+
+        if (this.noTitleKey == 'participation') {
+          this.getParticipateList()
+        } else {
+          this.getResponsibleList()
+        }
+
+        // this.dataSource = this.dataElse.filter(item => {
+        //   return item.projectName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        // })
       },
       handleChange(value, options) {
         //   this.appId = value
@@ -660,8 +697,7 @@
       getElseData(value) {
         this.getStatistics()
       },
-      handleBlur() {
-      },
+      handleBlur() {},
       handleFocus() {
         if (this.appId.length > 0) {
           this.options = []

+ 162 - 0
src/views/modules/advertiser/ProjectTransferRecordAuditList.vue

@@ -0,0 +1,162 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="状态">
+              <a-select default-value="0" v-model="queryParam.status">
+                <a-select-option value="0">
+                  全部
+                </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>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
+    </div>
+
+    <!-- table区域-begin -->
+
+    <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+      :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <span slot="action" slot-scope="text, record">
+        <a @click="handleEditStatus(record,'2')" :disabled="record.status!=1">通过</a>
+
+        <a-divider type="vertical" />
+        <a @click="handleEditStatus(record,'3')" :disabled="record.status!=1">驳回</a>
+
+
+      </span>
+    </a-table>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <projectTransferRecord-modal ref="modalForm" @ok="modalFormOk"></projectTransferRecord-modal>
+  </a-card>
+</template>
+
+<script>
+  import ProjectTransferRecordModal from './modules/ProjectTransferRecordModal'
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import {
+    postAction
+  } from "../../../api/manage";
+  import qs from 'qs'
+  export default {
+    name: "ProjectTransferRecordList",
+    mixins: [JeecgListMixin],
+    components: {
+      ProjectTransferRecordModal
+    },
+    data() {
+      return {
+        description: '账户转项目记录管理页面',
+        // 表头
+        columns: [{
+            title: '账户id',
+            align: "center",
+            dataIndex: 'accountId'
+          },
+          {
+            title: '账户名称',
+            align: "center",
+            dataIndex: 'accountId_dictText'
+          },
+          {
+            title: '原项目',
+            align: "center",
+            dataIndex: 'soucreProject_dictText'
+          },
+          {
+            title: '目标项目',
+            align: "center",
+            dataIndex: 'targetProject_dictText'
+          },
+          {
+            title: '申请人',
+            align: "center",
+            dataIndex: 'userId_dictText'
+          },
+          {
+            title: '审核人',
+            align: "center",
+            dataIndex: 'reviewerId_dictText'
+          },
+          {
+            title: '审核状态',
+            align: "center",
+            dataIndex: 'status_dictText'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: "center",
+            scopedSlots: {
+              customRender: 'action'
+            },
+          }
+        ],
+        url: {
+          list: "/ctop/projectTransferRecord/auditList",
+          delete: "/ctop/projectTransferRecord/delete",
+          deleteBatch: "/ctop/projectTransferRecord/deleteBatch"
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      handleDele(record) {
+        if (confirm("确认要删除此数据?")) {
+          postAction()
+        }
+      },
+      handleEditStatus(item, status) {
+        var params = qs.stringify({
+          id: item.id,
+          status: status
+        })
+        postAction('/ctop/projectTransferRecord/editStatus', params).then(res => {
+          if (res.success) {
+            this.$message.success(res.message)
+            this.loadData()
+          } else {
+            this.$message.success(res.message)
+          }
+        })
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 155 - 0
src/views/modules/advertiser/ProjectTransferRecordInitiatedList.vue

@@ -0,0 +1,155 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="账户">
+              <!--<a-input placeholder="请输入账户id" v-model="queryParam.accountId"></a-input>-->
+              <j-dict-select-tag v-model="queryParam.accountId" placeholder="请选择用户名称" dictCode="ctop_user_allocation,auth_name,account_id,account_status = '0'"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="状态">
+              <a-select default-value="0" v-model="queryParam.status">
+                <a-select-option value="0">
+                  全部
+                </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>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8" >
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
+    </div>
+
+    <!-- table区域-begin -->
+
+    <a-table
+      ref="table"
+      size="middle"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      @change="handleTableChange">
+        <span slot="action" slot-scope="text, record">
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+    </a-table>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <projectTransferRecord-modal ref="modalForm" @ok="modalFormOk"></projectTransferRecord-modal>
+  </a-card>
+</template>
+
+<script>
+  import ProjectTransferRecordModal from './modules/ProjectTransferRecordModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import {postAction} from "../../../api/manage";
+
+  export default {
+    name: "ProjectTransferRecordList",
+    mixins:[JeecgListMixin],
+    components: {
+      ProjectTransferRecordModal
+    },
+    data () {
+      return {
+        description: '账户转项目记录管理页面',
+        // 表头
+        columns: [
+          {
+            title: '账户id',
+            align:"center",
+            dataIndex: 'accountId'
+          },
+          {
+            title: '账户名称',
+            align:"center",
+            dataIndex: 'accountId_dictText'
+          },
+          {
+            title: '原项目',
+            align:"center",
+            dataIndex: 'soucreProject_dictText'
+          },
+          {
+            title: '目标项目',
+            align:"center",
+            dataIndex: 'targetProject_dictText'
+          },
+          {
+            title: '申请人',
+            align:"center",
+            dataIndex: 'userId_dictText'
+          },
+          {
+            title: '审核人',
+            align:"center",
+            dataIndex: 'reviewerId_dictText'
+          },
+          {
+            title: '审核状态',
+            align:"center",
+            dataIndex: 'status_dictText'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        url: {
+          list: "/ctop/projectTransferRecord/initiatedList",
+          delete: "/ctop/projectTransferRecord/delete",
+          deleteBatch: "/ctop/projectTransferRecord/deleteBatch"
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      handleDele(record){
+        if(confirm("确认要删除此数据?")){
+          postAction()
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 87 - 3
src/views/modules/advertiser/UserAllocationList.vue

@@ -71,13 +71,16 @@
         </span>
         <span slot="mediaId" slot-scope="text">{{ text == 1 ? '头条' : '快手' }}</span>
         <span slot="action" slot-scope="text, record">
+          <a @click="account(record)">转移项目</a>
+
+          <a-divider type="vertical" />
           <a @click="project(record)">转让账户</a>
 
           <a-divider type="vertical" />
           <a @click="handleEdit(record)">编辑</a>
 
-          <a-divider type="vertical" v-show="roleCode == 'admin'"/>
-          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"  v-show="roleCode == 'admin'">
+          <a-divider type="vertical" v-show="roleCode == 'admin'" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-show="roleCode == 'admin'">
             <a>删除</a>
           </a-popconfirm>
         </span>
@@ -129,6 +132,46 @@
         -->
       </a-form>
     </a-modal>
+    <a-modal title="项目转移" v-model="visibleAccount" @ok="handleOkAccount" :confirmLoading="accountLoading" :width="800">
+      <a-form :form="formAccount">
+        <a-form-item label="原项目" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
+          <a-select v-decorator="[
+              'projectId', // 给表单赋值或拉取表单时,该input对应的key
+              { rules: [{ required: true, message: '请选择项目!' }] }
+            ]" showSearch optionFilterProp="children" :filterOption="filterOption" disabled>
+            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
+              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+               item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="转移项目" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
+          <a-select v-decorator="[
+              'projectNewId', // 给表单赋值或拉取表单时,该input对应的key
+              { rules: [{ required: true, message: '请选择项目!' }] }
+            ]" showSearch optionFilterProp="children" :filterOption="filterOption">
+            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
+              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+               item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <!-- 
+        <a-form-item
+          label="账号:"
+          :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
+          v-show="mode == 'login'"
+        >
+          <a-input v-model="accountName" placeholder="请输入账户名" />
+        </a-form-item>
+        -->
+      </a-form>
+    </a-modal>
   </a-card>
 </template>
 
@@ -151,6 +194,7 @@
   import {
     postAction
   } from '../../../api/manage'
+  import qs from 'qs'
   export default {
     name: 'UserAllocationList',
     mixins: [JeecgListMixin],
@@ -162,6 +206,7 @@
       return {
         description: '账号绑定管理页面',
         visibleAdd: false,
+        visibleAccount: false,
         options: [],
         optionsAll: [],
         dataElse: [],
@@ -246,11 +291,14 @@
           importExcelUrl: 'ctop/userAllocation/importExcel'
         },
         confirmLoading: false,
+        accountLoading: false,
         projectId: '',
         accountId: '',
         mediaId: '',
         form: this.$form.createForm(this),
-        roleCode:localStorage.getItem('roleCode')
+        formAccount: this.$form.createForm(this),
+        roleCode: localStorage.getItem('roleCode'),
+        dataElse: []
       }
     },
     computed: {
@@ -265,6 +313,7 @@
           this.optionsAll = res.result
         }
       })
+
     },
     methods: {
       moment,
@@ -313,6 +362,41 @@
         }, 0)
         this.getALLperson()
       },
+      account(item) {
+        this.visibleAccount = true
+        this.accountId = item.accountId
+        this.projectId = item.projectId
+
+        setTimeout(() => {
+          this.formAccount.setFieldsValue({
+            projectId: item.projectId
+          })
+        }, 0)
+      },
+      handleOkAccount(e) {
+        this.accountLoading = true
+
+        this.formAccount.validateFieldsAndScroll((err, values) => {
+          if (err) {
+            // 这里做逻辑处理
+          } else {
+            var params = qs.stringify({
+              projectId: values.projectNewId,
+              accountId: this.accountId
+            })
+            postAction('/ctop/projectTransferRecord/add', params).then(res => {
+              if (res.success) {
+                this.accountLoading = false
+                this.visibleAccount = false
+                this.formAccount.resetFields()
+                this.loadData()
+              } else {
+                this.$message.error(res.message)
+              }
+            })
+          }
+        })
+      },
       handleOkAdd(e) {
         this.confirmLoading = true
 

+ 15 - 36
src/views/modules/advertiser/modules/BindAccountLoginModal.vue

@@ -7,16 +7,9 @@
     @ok="handleOk"
     @cancel="handleCancel"
     cancelText="关闭">
-    
+
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-      
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="广告id">
-          <a-input placeholder="请输入广告id" v-decorator="['advertiserId', {}]" />
-        </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
@@ -27,33 +20,24 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="密码">
-          <a-input placeholder="请输入密码" v-decorator="['password', {}]" />
+          <a-input placeholder="请输入密码" v-decorator="['password', {}]"/>
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="登录方式">
-          <a-input placeholder="请输入登录方式" v-decorator="['loginType', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="1未登陆 2已登陆">
-          <a-input placeholder="请输入1未登陆 2已登陆" v-decorator="['status', {}]" />
+          <a-select v-decorator="['loginType', {initialValue:'kuaishou',}]">
+            <a-select-option value="kuaishou">
+              快手
+            </a-select-option>
+            <a-select-option value="bytedance">
+              头条
+            </a-select-option>
+            <a-select-option value="pangolin">
+              穿山甲
+            </a-select-option>
+          </a-select>
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="userId">
-          <a-input placeholder="请输入userId" v-decorator="['userId', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="用户平台ID">
-          <a-input placeholder="请输入用户平台ID" v-decorator="['accountId', {}]" />
-        </a-form-item>
-		
       </a-form>
     </a-spin>
   </a-modal>
@@ -101,7 +85,7 @@
         this.model = Object.assign({}, record);
         this.visible = true;
         this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'advertiserId','accountName','password','loginType','status','userId','accountId'))
+          this.form.setFieldsValue(pick(this.model,'accountName','password','loginType'))
 		  //时间格式化
         });
 
@@ -127,7 +111,7 @@
             }
             let formData = Object.assign(this.model, values);
             //时间格式化
-            
+
             console.log(formData)
             httpAction(httpurl,formData,method).then((res)=>{
               if(res.success){
@@ -140,17 +124,12 @@
               that.confirmLoading = false;
               that.close();
             })
-
-
-
           }
         })
       },
       handleCancel () {
         this.close()
       },
-
-
     }
   }
 </script>

+ 53 - 33
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -22,10 +22,23 @@
           <a-input placeholder="请输入项目名称" v-decorator="['projectName', validatorRules.projectName]" />
         </a-form-item>
          <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="行业">
-          <j-tree-select ref="treeSelect" placeholder="请选择行业" v-decorator="['industryId', validatorRules.pid]"
+          <j-tree-select ref="treeSelect" placeholder="请选择行业" v-decorator="['industryId']"
             dict="sys_category,name,id" pidField="pid" pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76">
           </j-tree-select>
         </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商" v-if="model.mediaId=='2'||model.mediaId=='4'">
+           <a-select
+            optionFilterProp="children"
+            showSearch
+            :filterOption="filterOption"
+            v-decorator="['supplierCode', validatorRules.supplierCode]"
+          >
+            <a-select-option :value="item.supplierCode" v-for="(item, index) of supplierList" :key="index">{{
+              item.supplierName
+            }}</a-select-option>
+          </a-select>
+        </a-form-item>
+        
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主名称">
           <a-select
             @change="handleChange"
@@ -40,40 +53,19 @@
             }}</a-select-option>
           </a-select>
         </a-form-item>
-        <!-- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户类型">
-          <a-select
-            v-decorator="['advertiserType', validatorRules.advertiserId]"
-          >
-            <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>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售" v-if="getFormFieldValue('advertiserType')==1||getFormFieldValue('advertiserType')==2">
-          <a-select
-            showSearch
-            optionFilterProp="children"
-            style="width: 100%"
-            @focus="handleFocus"
-            @blur="handleBlur"
-            @change="handleChange"
-            :filterOption="filterOption"
-            v-decorator="['saleId', { rules: [{ required: true, message: '请选择销售' }] }]"
-          >
-            <a-select-option
-              v-for="appModel in options"
-              :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId"
-              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
-            >
-          </a-select>
-        </a-form-item> -->
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
           <a-input placeholder="请输入最高出价" v-decorator="['maxBid', validatorRules.maxBid]" addonAfter="元" />
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高转化出价">
           <a-input placeholder="最高转化出价" v-decorator="['maxDeepCpaBid']" addonAfter="元" />
         </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
+          <a-select showSearch optionFilterProp="children" style="width: 100%" :filterOption="filterOption"
+            v-decorator="['saleId', { rules: [{  required: true,message: '请选择销售' }] }]">
+            <a-select-option v-for="appModel in optionsElse" :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+          </a-select>
+        </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="运营负责人">
           <a-select
             showSearch
@@ -152,6 +144,7 @@ export default {
         projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
         industryId: { rules: [{ required: true, message: '请选择行业!' }] },
         advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
+        supplierCode:{ rules: [{ required: true, message: '请选择供应商!' }],initialValue:'kuaishou_001'},
         responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
         maxBid: { rules: [{ required: true, message: '请输入最高出价!' }, { validator: this.validateInputCode }] },
       },
@@ -163,10 +156,14 @@ export default {
       list: [],
       resId: '',
       shejiId: '',
-      options: []
+      options: [],
+      optionsElse:[],
+      supplierList:[]
     }
   },
-  created() {},
+  created() {
+      this.getSupplierList()
+  },
   methods: {
     validateInputCode(rule, value, callback) {
       if (!value || value > 0) {
@@ -208,6 +205,16 @@ export default {
         })
         .finally(() => {})
     },
+    getSupplierList(){
+        var params = {}
+        getAction('/ctop/supplierList/list').then(res=>{
+            if(res.success){
+                this.supplierList = res.result.records
+            } else {
+                this.$message.warning(res.message)
+            }
+        })
+    },
     add() {
       this.edit({
         responsibleId: this.userInfo().id, //用户Id
@@ -215,11 +222,16 @@ export default {
       })
     },
     edit(record) {
+      this.getSupplierList()
       this.getList()
+      
       var params = { ...record }
       if (params.advertiserId) {
         params.advertiserId = { key: params.advertiserId, label: params.advertiserName }
       }
+    //   if (params.industryId) {
+    //     params.industryId = { key: params.industryId, label: params.industryId_dictText }
+    //   }
       console.log(record)
       this.form.resetFields()
       this.model = Object.assign({}, params)
@@ -240,9 +252,10 @@ export default {
             'userId',
             'designResponsibleId',
             'responsibleId',
-            'industryId'
+            'industryCode',
+            'supplierCode',
             // 'advertiserType',
-            // 'saleId'
+            'saleId'
           )
         )
         // this.resId = record.responsibleId
@@ -253,6 +266,12 @@ export default {
             this.options = res.result
           }
         })
+         getAction('/sys/user/getAllSaleList', '').then(res => {
+          console.log(res)
+          if (res.success) {
+            this.optionsElse = res.result
+          }
+        })
         //时间格式化
       })
     },
@@ -277,6 +296,7 @@ export default {
           }
           var data = values.advertiserId
           let formData = Object.assign(this.model, values)
+        //   if(this.model.mediaId)
           formData.maxBid = formData.maxBid * 1000
           formData.maxDeepCpaBid = formData.maxDeepCpaBid*1000
           //时间格式化

+ 154 - 0
src/views/modules/advertiser/modules/ProjectTransferRecordModal.vue

@@ -0,0 +1,154 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="账户id">
+          <a-input placeholder="请输入账户id" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="源项目">
+          <a-input placeholder="请输入源项目" v-decorator="['soucreProject', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="目标项目">
+          <a-input placeholder="请输入目标项目" v-decorator="['targetProject', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="转户操作人">
+          <a-input placeholder="请输入转户操作人" v-decorator="['userId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="状态">
+          <a-input-number v-decorator="[ 'status', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="审核人id">
+          <a-input placeholder="请输入审核人id" v-decorator="['reviewerId', {}]" />
+        </a-form-item>
+		
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+  export default {
+    name: "ProjectTransferRecordModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        },
+        url: {
+          add: "/ctop/projectTransferRecord/add",
+          edit: "/ctop/projectTransferRecord/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'accountId','soucreProject','targetProject','userId','status','reviewerId'))
+		  //时间格式化
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 59 - 25
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -21,7 +21,7 @@
       <a-row class="image-list-heading vm-panel" style="padding: 8px 20px;">
         <a-col :md="7" :sm="8" style="display:flex">
           <a-form-item label="计划id">
-            <a-input placeholder="请输入计划id" v-model="campaignId"></a-input>
+            <a-input placeholder="请输入计划id" v-model="campaignIdSearch"></a-input>
           </a-form-item>
         </a-col>
         <a-col :md="7" :sm="8" style="display:flex">
@@ -92,9 +92,8 @@
             <div style="display:flex;justify-content: center;">
               <a @click="toDetail(record)" class="count" v-show="!record.editName">{{ text }}</a>
               <a-input v-show="record.editName" v-model="record.campaignName" style="width:150px" @fouse.stop />
-              <a-icon :type="record.editName ? 'check' : 'edit'"
-                @click.stop=";(record.editName = !record.editName), editShowName(record)" style="margin-left:10px"
-                class="count" />
+              <a-icon :type="record.editName ? 'check' : 'edit'" @click.stop="editShowName(record)"
+                style="margin-left:10px" class="count" />
             </div>
           </template>
           <span slot="action" slot-scope="text, record">
@@ -155,6 +154,17 @@
         </a-button>
       </template>
     </a-modal>
+    <a-modal v-model="nameEdit" title="广告计划名称修改" @afterClose="clear" :width="900" :maskClosable="false">
+      <a-form-item label="广告计划名称" :labelCol="{ lg: { span: 4 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
+        <a-input placeholder="请输入" v-model="campaignNameEdit" style="display: inline-block;" />
+      </a-form-item>
+      <template slot="footer">
+        <a-button key="submit" type="primary" @click="campaignEdit" :loading="loadingCampaign">
+          确定
+        </a-button>
+      </template>
+    </a-modal>
   </div>
 </template>
 
@@ -260,7 +270,21 @@
       dataIndex: 'putStatus',
       scopedSlots: {
         customRender: 'putStatus'
-      }
+      },
+      filters: [{
+          text: '投放中',
+          value: '1'
+        },
+        {
+          text: '暂停',
+          value: '2'
+        }
+      ],
+      onFilter: (value, record) =>
+        record.putStatus
+        .toString()
+        .toLowerCase()
+        .includes(value.toLowerCase()),
     },
     {
       title: '创建时间',
@@ -284,8 +308,8 @@
     },
     data: function () {
       return {
-        campaignId: '',
-        campaignName: '',
+        nameEdit: false,
+        campaignIdSearch: '',
         loadingList: false,
         form: this.$form.createForm(this),
         jihua: false,
@@ -346,6 +370,9 @@
         url: {},
         type: '',
         campaignName: '',
+        campaignNameEdit: '',
+        loadingCampaign: false,
+        campaignIdEdit: '',
         campaignBudget: 'UNLIMITED',
         unitId: '',
         campaignId: ''
@@ -499,13 +526,13 @@
       },
       ...mapGetters(['nickname', 'avatar', 'userInfo']),
       searchLabel() {
-        this.ipagination.current = 1
+        // this.ipagination.current = 1
         if (this.appId) {
           var params = {}
           params.accountId = this.appId + ''
           params.pageNo = this.ipagination.current
           params.pageSize = this.ipagination.pageSize
-          params.campaignId = this.campaignId
+          params.campaignId = this.campaignIdSearch
           params.campaignName = this.campaignName
           this.getCampaignList(params)
         } else {
@@ -513,7 +540,7 @@
         }
       },
       searchRe() {
-        this.campaignId = ''
+        this.campaignIdSearch = ''
         this.campaignName = ''
         this.searchLabel()
       },
@@ -673,22 +700,29 @@
         }
         console.log(item)
       },
+      campaignEdit(e) {
+        this.loadingCampaign = true
+        var params = {}
+        params.accountId = this.appId + ''
+        params.campaignId = this.campaignIdEdit
+        params.campaignName = this.campaignNameEdit
+        postAction('/kuaishou/batch/updateCampaign', params).then(res => {
+          if (res.result.code == 0) {
+            this.loadingCampaign = false
+            this.nameEdit = false
+            this.$message.success('修改成功')
+            this.addUser()
+          } else {
+            this.loadingCampaign = false
+            this.$message.error(res.result.message)
+          }
+        })
+      },
       editShowName(item) {
-        if (!item.editName) {
-          var params = {}
-          params.accountId = this.appId + ''
-          params.campaignId = item.campaignId
-          params.campaignName = item.campaignName
-          postAction('/kuaishou/batch/updateCampaign', params).then(res => {
-            if (res.result.code == 0) {
-              this.$message.success('修改成功')
-              this.addUser()
-            } else {
-              this.$message.error(res.result.message)
-              this.addUser()
-            }
-          })
-        }
+        this.nameEdit = true
+        this.campaignNameEdit = item.campaignName
+        this.campaignIdEdit = item.campaignId
+
       },
       dianji() {
         if (this.appId == '') {

+ 67 - 13
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -94,13 +94,14 @@
                 onChange: onSelectChange
               }" style="margin-top:30px" :loading="loadingList">
               <!-- getCheckboxProps: getCheckboxProps -->
-              <a slot="unitName" slot-scope="text, record" @click="toDetail(record)" :title="text">
-                <span
-                  :title="text"
-                  style="display:block;width:250px !important;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
-                  {{ text }}</span>
-
-              </a>
+              <span slot="unitName" slot-scope="text, record" :title="text">
+                <div style="display:flex;justify-content: center;">
+                  <a :title="text" @click="toDetail(record)"
+                    style="display:block;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
+                    {{ text }}</a>
+                  <a-icon type="edit" @click.stop="editShowName(record)" style="margin-left:10px" class="count" />
+                </div>
+              </span>
               <span slot="action" slot-scope="text, record">
                 <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
               </span>
@@ -114,9 +115,8 @@
               <span slot="putStatus" slot-scope="text">{{ text | putStatus }}</span>
               <span slot="createChannel" slot-scope="text">{{ text | createChannel }}</span>
               <span slot="reviewDetail" slot-scope="text">
-                <span
-                  :title="text"
-                  style="margin:0;display:block;width:300px !important;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
+                <span :title="text"
+                  style="margin:0;display:block;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
                   {{ text }}</span>
               </span>
               <span slot="bidType" slot-scope="text, record">
@@ -258,6 +258,17 @@
         </a-button>
       </template>
     </a-modal>
+    <a-modal v-model="nameEdit" title="广告组名称修改" :width="900" :maskClosable="false">
+      <a-form-item label="广告组名称" :labelCol="{ lg: { span: 4 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
+        <a-input placeholder="请输入" v-model="unitNameEdit" style="display: inline-block;" />
+      </a-form-item>
+      <template slot="footer">
+        <a-button key="submit" type="primary" @click="unitEdit" :loading="loadingUnit">
+          确定
+        </a-button>
+      </template>
+    </a-modal>
   </div>
 </template>
 
@@ -385,7 +396,21 @@
       dataIndex: 'putStatus',
       scopedSlots: {
         customRender: 'putStatus'
-      }
+      },
+      filters: [{
+          text: '投放中',
+          value: '1'
+        },
+        {
+          text: '暂停',
+          value: '2'
+        }
+      ],
+      onFilter: (value, record) =>
+        record.putStatus
+        .toString()
+        .toLowerCase()
+        .includes(value.toLowerCase()),
     },
     {
       title: '创建渠道',
@@ -415,7 +440,8 @@
       dataIndex: 'reviewDetail',
       scopedSlots: {
         customRender: 'reviewDetail'
-      }
+      },
+      width: 300
     },
     {
       title: '出价类型',
@@ -604,7 +630,11 @@
         allPrice: '1',
         maxBid: null,
         copyData: null,
-        showDeepBid: false
+        showDeepBid: false,
+        nameEdit: false,
+        unitNameEdit: "",
+        unitIdEdit: "",
+        loadingUnit: false
       }
     },
     filters: {
@@ -714,6 +744,30 @@
       //     }
       //   }
       // },
+      unitEdit(e) {
+        this.loadingUnit = true
+        var params = {}
+        params.accountId = localStorage.getItem("accountId")
+        params.unitId = this.unitIdEdit
+        params.unitName = this.unitNameEdit
+        postAction('/kuaishou/batch/updateUnit', params).then(res => {
+          if (res.result.code == 0) {
+            this.loadingUnit = false
+            this.nameEdit = false
+            this.$message.success('修改成功')
+            this.getDataList(localStorage.getItem('advertisingGroupKey'))
+          } else {
+            this.loadingUnit = false
+            this.$message.error(res.result.message)
+          }
+        })
+      },
+      editShowName(item) {
+        this.nameEdit = true
+        this.unitNameEdit = item.unitName
+        this.unitIdEdit = item.unitId
+
+      },
       createUnitName() {
         this.unitNameList = []
         for (let i = 0; i < this.getData('createCount'); i++) {

+ 87 - 29
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -46,7 +46,8 @@
         <creat-application ref="application" />
       </a-form-item>
       <a-form-item label=" " class="else-label" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '2'&&showSite&&(getPlatForm(getData('appId'))=='1'||getPlatForm(getData('appId'))=='2')">
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="campaignType == '2'&&showSite&&(getPlatForm(getData('appId'))=='1'||getPlatForm(getData('appId'))=='2')">
         <a-select v-model="siteId" showSearch allowClear placeholder="选择应用下载详情页" optionFilterProp="children"
           :filterOption="filterOption">
           <a-select-option v-for="appModel in siteList" :key="appModel.siteId" :value="appModel.siteId">
@@ -77,6 +78,18 @@
           优先从系统应用商店下载
         </a-checkbox>
       </a-form-item>
+      <a-form-item label=" " :labelCol="{ lg: { span: 7}, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 16 } }" class="else-label" v-if="allForm.useAppMarket">
+        请勾选投放应用已上架的应用商店(默认全选)
+        <a-checkbox-group v-model="allForm.appStore">
+          <a-checkbox value="huawei">华为</a-checkbox>
+          <a-checkbox value="oppo">OPPO</a-checkbox>
+          <a-checkbox value="vivo">VIVO</a-checkbox>
+          <a-checkbox value="xiaomi">小米</a-checkbox>
+          <a-checkbox value="meizu">魅族</a-checkbox>
+          <a-checkbox value="smartisan">锤子</a-checkbox>
+        </a-checkbox-group>
+      </a-form-item>
       <div style="text-align:center;font-size:16px;margin-bottom:10px">
         目标人群
       </div>
@@ -113,23 +126,20 @@
         </a-radio-group>
       </a-form-item>
       <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="allForm.dayBudget == '1'">
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-show="allForm.dayBudget == '1'">
         <a-input placeholder="不小于100,不超过100000000,仅支持输入自然数" v-decorator="[
             'dayBudget',
-            {
-              rules: [{ required: true, message: '请填写预算' }, { validator: budgetValue }]
-            }
           ]" />
       </a-form-item>
       <a-form-item label="投放方式" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
-        <a-radio-group buttonStyle="solid" v-decorator="['speed', { initialValue: 1 }]">
+        <a-radio-group buttonStyle="solid" v-decorator="['speed']">
           <a-radio-button :value="1">正常投放</a-radio-button>
           <a-radio-button :value="2">平滑投放</a-radio-button>
         </a-radio-group>
         <br />
         <span>
-          {{ getData('speed') == '2' ? '平滑匀速投放' : '尽快展示广告消耗预算' }}
+          {{ getData('speed') == 2 ? '平滑匀速投放' : '尽快展示广告消耗预算' }}
         </span>
       </a-form-item>
       <a-form-item label="排期" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
@@ -173,7 +183,7 @@
       <a-form-item label="场景广告位" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
         <!-- v-decorator="['speed', { initialValue: '1' }]" -->
-        <a-radio-group buttonStyle="solid" :disabled="typeCopy=='edit'" v-decorator="['sceneId', { initialValue: 1 }]">
+        <a-radio-group buttonStyle="solid" :disabled="typeCopy=='edit'" v-model="allForm.sceneIdAll">
           <a-radio-button :value="1">优选广告位</a-radio-button>
           <a-radio-button :value="2">按场景选择广告位</a-radio-button>
         </a-radio-group>
@@ -182,7 +192,7 @@
 
       </a-form-item>
       <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="getData('sceneId') == 2">
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="allForm.sceneIdAll == 2">
         <a-checkbox-group :disabled="typeCopy=='edit'" :defaultValue="[7]" v-model="allForm.sceneId">
           <a-checkbox :value="7">信息流广告</a-checkbox>
           <a-checkbox :value="6">上下滑大屏广告</a-checkbox>
@@ -249,8 +259,8 @@
                           ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                           : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                       }}</span>
-                       <span style="color:red;font-weight:700" v-else-if="item.bidType==2&&item.cpaBid&&item.cpaBid>1">
-                          行为出价大于1元,请注意!!!
+                      <span style="color:red;font-weight:700" v-else-if="item.bidType==2&&item.cpaBid&&item.cpaBid>1">
+                        行为出价大于1元,请注意!!!
                       </span>
                     </a-form-item>
                     <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
@@ -282,6 +292,17 @@
         确定
       </a-button>
     </template>
+    <a-modal v-model="visibleFail" title="错误信息" :footer="null">
+      <div v-if="visibleData">
+        失败条数:{{ visibleData.failCount }}
+        <div style="margin-top:20px">
+          <p v-for="(item, index) of visibleData.failInfo" :key="index">
+            <span>名称:{{ item.campaignName?item.campaignName:item.unitName }}</span><br />
+            <span>错误信息:{{ item.failMessage }}</span>
+          </p>
+        </div>
+      </div>
+    </a-modal>
   </a-modal>
 </template>
 
@@ -314,6 +335,8 @@
     },
     data() {
       return {
+        visibleFail: false,
+        visibleData: null,
         checkedTrue: false,
         nameValue: '',
         visible: false,
@@ -347,6 +370,7 @@
         campaignType: '2',
         maxBid: 0,
         allForm: {
+          sceneIdAll: 1,
           dayBudget: '0',
           time: '1',
           scheduleTime: '1',
@@ -356,7 +380,10 @@
           fail: [],
           success: [],
           sceneId: [7],
-          useAppMarket: false
+          useAppMarket: false,
+          appStore: ['huawei', 'oppo', 'vivo', 'xiaomi',
+            'meizu', 'smartisan'
+          ]
         },
         typeCopy: "edit",
         dataList: [],
@@ -429,7 +456,7 @@
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } 
+        }
       },
       getScheduleTime(item) {
         this.allForm.scheduleTimeData = item
@@ -572,13 +599,18 @@
               ...res.result.target
             }
             //   dataJson.useAppMarket = dataJson.useAppMarket==0?false:true
-            dataJson.dayBudget = dataJson.dayBudget / 1000
-            dataJson.sceneId = JSON.parse(dataJson.sceneId)[0] == 1 ? 1 : 2
+
+            this.allForm.sceneIdAll = JSON.parse(dataJson.sceneId).filter(item => item == 1).length > 0 ? 1 : 2
             this.allForm.useAppMarket = dataJson.useAppMarket ? (dataJson.useAppMarket == 0 ? false : true) : false
-            this.allForm.sceneId = dataJson.sceneId == 1 ? [7] : JSON.parse(res.result.baseInfo
+            this.allForm.appStore = this.allForm.useAppMarket ? JSON.parse(dataJson.appStore) : ['huawei', 'oppo',
+              'vivo', 'xiaomi',
+              'meizu', 'smartisan'
+            ]
+            this.allForm.sceneId = this.allForm.sceneIdAll == 1 ? [7] : JSON.parse(res.result.baseInfo
               .sceneId)
             console.log(this.allForm.sceneId, 1111111)
             this.allForm.dayBudget = dataJson.dayBudget == 0 ? '0' : '1'
+            dataJson.dayBudget = dataJson.dayBudget / 1000
             this.allForm.time = dataJson.endTime ? '2' : '1'
             this.timeRange = [moment(dataJson.beginTime), moment(dataJson.endTime)]
             this.allForm.scheduleTime = dataJson.scheduleTime.indexOf('1') != -1 ? '2' : '1'
@@ -640,11 +672,29 @@
             this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
             this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
             this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
-
+            this.populationData.allForm.checkArr = this.populationData.allForm.appType == '2' ? JSON.parse(dataJson
+              .appIds) : []
             this.$nextTick(() => {
+              console.log(dataJson)
               this.form.setFieldsValue(pick(dataJson, ['appId', 'urlType', 'url', 'dayBudget', 'speed',
-                'showMode', 'sceneId'
+                'showMode'
               ]))
+              //   this.form.setFieldsValue({
+              //     appId: dataJson.appId
+              //   })
+              //   this.form.setFieldsValue({
+              //     dayBudget: dataJson.dayBudget
+              //   })
+              //   this.form.setFieldsValue({
+              //     speed: dataJson.speed
+              //   })
+              //   this.form.setFieldsValue({
+              //     showMode: dataJson.showMode
+              //   })
+              //   console.log(dataJson.sceneId)
+              //   this.form.setFieldsValue({
+              //     sceneId: dataJson.sceneId
+              //   })
             })
           }
         })
@@ -672,7 +722,7 @@
             })[0]
             var json = {
               ...values,
-              sceneId: values.sceneId == 1 ? [values.sceneId] : this.allForm.sceneId,
+              sceneId: this.allForm.sceneIdAll == 1 ? [this.allForm.sceneIdAll] : this.allForm.sceneId,
               dayBudget: values.dayBudget * 1000
             }
             var params = {
@@ -689,8 +739,12 @@
             }
             if (this.allForm.useAppMarket == true || this.allForm.useAppMarket == false) {
               params.useAppMarket = this.allForm.useAppMarket ? 1 : 0
+              if (this.allForm.useAppMarket == true) {
+                params.appStore = this.allForm.appStore
+              }
             }
-            if (this.showSite&&(this.getPlatForm(this.getData('appId'))=='1'||this.getPlatForm(this.getData('appId'))=='2')) {
+            if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
+                'appId')) == '2')) {
               params.appJson = {
                 isUpdate: true,
                 siteId: this.siteId
@@ -728,12 +782,19 @@
               params.groupArr = [groupArr]
               postAction('/kuaishou/batch/copyUnit', params).then(res => {
                 if (res.success) {
-                  var that = this
-                  setTimeout(() => {
-                    that.visible = false
-                    that.loading = false
-                    that.$emit('getList', localStorage.getItem('advertisingGroupKey'))
-                  }, 1000)
+                  if (res.result.failCount > 0) {
+                    this.visibleFail = true
+                    this.visibleData = res.result
+                    this.loading = false
+                  } else {
+                    var that = this
+                    setTimeout(() => {
+                      that.visible = false
+                      that.loading = false
+                      that.$emit('getList', localStorage.getItem('advertisingGroupKey'))
+                    }, 1000)
+                  }
+
                 } else {
                   this.$message.error(res.message)
                 }
@@ -842,9 +903,6 @@
           }
         })
       },
-      getData(className) {
-        return this.form.getFieldValue(className)
-      }
     },
     mounted: function () {
       this.getAppList()

+ 32 - 11
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -77,6 +77,18 @@
           优先从系统应用商店下载
         </a-checkbox>
       </a-form-item>
+      <a-form-item label=" " :labelCol="{ lg: { span: 7}, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 16 } }" class="else-label" v-if="allForm.useAppMarket">
+        请勾选投放应用已上架的应用商店(默认全选)
+        <a-checkbox-group v-model="allForm.appStore">
+          <a-checkbox value="huawei">华为</a-checkbox>
+          <a-checkbox value="oppo">OPPO</a-checkbox>
+          <a-checkbox value="vivo">VIVO</a-checkbox>
+          <a-checkbox value="xiaomi">小米</a-checkbox>
+          <a-checkbox value="meizu">魅族</a-checkbox>
+          <a-checkbox value="smartisan">锤子</a-checkbox>
+        </a-checkbox-group>
+      </a-form-item>
       <div style="text-align:center;font-size:16px;margin-bottom:10px">
         目标人群
       </div>
@@ -173,7 +185,7 @@
       <a-form-item label="场景广告位" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
         <!-- v-decorator="['speed', { initialValue: '1' }]" -->
-        <a-radio-group buttonStyle="solid" v-decorator="['sceneId', { initialValue: 1 }]">
+        <a-radio-group buttonStyle="solid" v-model="allForm.sceneIdAll">
           <a-radio-button :value="1">优选广告位</a-radio-button>
           <a-radio-button :value="2">按场景选择广告位</a-radio-button>
         </a-radio-group>
@@ -182,7 +194,7 @@
 
       </a-form-item>
       <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="getData('sceneId') == 2">
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="allForm.sceneIdAll == 2">
         <a-checkbox-group :defaultValue="[7]" v-model="allForm.sceneId">
           <a-checkbox :value="7">信息流广告</a-checkbox>
           <a-checkbox :value="6">上下滑大屏广告</a-checkbox>
@@ -369,6 +381,7 @@
         campaignType: '2',
         maxBid: 0,
         allForm: {
+          sceneIdAll: 1,
           dayBudget: '0',
           time: '1',
           scheduleTime: '1',
@@ -378,7 +391,10 @@
           fail: [],
           success: [],
           sceneId: [7],
-          useAppMarket: false
+          useAppMarket: false,
+          appStore: ['huawei', 'oppo', 'vivo', 'xiaomi',
+            'meizu', 'smartisan'
+          ]
         },
         typeCopy: "typeOne",
         dataList: [],
@@ -603,9 +619,13 @@
             }
             //   dataJson.useAppMarket = dataJson.useAppMarket==0?false:true
             dataJson.dayBudget = dataJson.dayBudget / 1000
-            dataJson.sceneId = JSON.parse(dataJson.sceneId)[0] == 1 ? 1 : 2
+            this.allForm.sceneIdAll = JSON.parse(dataJson.sceneId).filter(item => item == 1).length > 0 ? 1 : 2
             this.allForm.useAppMarket = dataJson.useAppMarket ? (dataJson.useAppMarket == 0 ? false : true) : false
-            this.allForm.sceneId = dataJson.sceneId == 1 ? [7] : JSON.parse(res.result.baseInfo
+            this.allForm.appStore = this.allForm.useAppMarket ? JSON.parse(dataJson.appStore) : ['huawei', 'oppo',
+              'vivo', 'xiaomi',
+              'meizu', 'smartisan'
+            ]
+            this.allForm.sceneId = this.allForm.sceneIdAll == 1 ? [7] : JSON.parse(res.result.baseInfo
               .sceneId)
             this.allForm.dayBudget = dataJson.dayBudget == 0 ? '0' : '1'
             this.allForm.time = dataJson.endTime ? '2' : '1'
@@ -669,10 +689,11 @@
             this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
             this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
             this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
-
+            this.populationData.allForm.checkArr = this.populationData.allForm.appType == '2' ? JSON.parse(dataJson
+              .appIds) : []
             this.$nextTick(() => {
               this.form.setFieldsValue(pick(dataJson, ['appId', 'urlType', 'url', 'dayBudget', 'speed',
-                'showMode', 'sceneId'
+                'showMode'
               ]))
             })
           }
@@ -692,7 +713,7 @@
 
             var json = {
               ...values,
-              sceneId: values.sceneId == 1 ? [values.sceneId] : this.allForm.sceneId,
+              sceneId: this.allForm.sceneIdAll == 1 ? [this.allForm.sceneIdAll] : this.allForm.sceneId,
               dayBudget: values.dayBudget * 1000
             }
             var params = {
@@ -709,6 +730,9 @@
             }
             if (this.allForm.useAppMarket == true || this.allForm.useAppMarket == false) {
               params.useAppMarket = this.allForm.useAppMarket ? 1 : 0
+              if (this.allForm.useAppMarket == true) {
+                params.appStore = this.allForm.appStore
+              }
             }
             if (this.showSite && (this.getPlatForm(this.getData('appId')) == '1' || this.getPlatForm(this.getData(
                 'appId')) == '2')) {
@@ -917,9 +941,6 @@
           }
         })
       },
-      getData(className) {
-        return this.form.getFieldValue(className)
-      }
     },
     mounted: function () {
       this.getAppList()

+ 0 - 1
src/views/modules/kuaishouapp/account/originality.vue

@@ -326,7 +326,6 @@
           }
         })
         getAction('/kuaishou/batch/getVideoDetail', {
-          accountId: localStorage.getItem('accountId'),
           photoId: item.photoId
         }).then(res => {
           if (res.success) {

+ 46 - 13
src/views/modules/kuaishouapp/account/stepForm/Step2.vue

@@ -39,7 +39,9 @@
             }}
           </a-select-option>
         </a-select>
-        <!-- <a @click="addApplication" style="margin-left:10px">添加应用</a> -->
+        <!-- <a @click="addApplication" style="margin-left:10px">刷新应用</a> -->
+        <a-button type="primary" @click="addApplication" :loading="tongbuLoading">
+          刷新应用</a-button>
         <creat-application ref="application" />
       </a-form-item>
       <a-form-item label="转化类型" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
@@ -58,7 +60,8 @@
       </a-form-item>
 
       <a-form-item label="转化目标" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == 2||campaignType == 4||campaignType == 5">
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="campaignType == 2||campaignType == 4||campaignType == 5">
         <span v-if="convertId&&!convert" style="display:block;font-size:16px">已选择转化目标: {{convertId.label}}</span>
         <a-button type="primary" @click="showConvert">{{convertId?'更换转化目标':'选择转化目标'}}</a-button>
       </a-form-item>
@@ -104,6 +107,19 @@
           优先从系统应用商店下载
         </a-checkbox>
       </a-form-item>
+      <a-form-item label=" " :labelCol="{ lg: { span: 7}, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 16 } }" class="else-label" v-if="getData('useAppMarket')">
+        请勾选投放应用已上架的应用商店(默认全选)
+        <a-checkbox-group v-model="allForm.appStore">
+          <a-checkbox value="huawei">华为</a-checkbox>
+          <a-checkbox value="oppo">OPPO</a-checkbox>
+          <a-checkbox value="vivo">VIVO</a-checkbox>
+          <a-checkbox value="xiaomi">小米</a-checkbox>
+          <a-checkbox value="meizu">魅族</a-checkbox>
+          <a-checkbox value="smartisan">锤子</a-checkbox>
+        </a-checkbox-group>
+      </a-form-item>
+
       <div style="text-align:center;font-size:16px;margin-bottom:10px">
         目标人群
       </div>
@@ -180,7 +196,6 @@
         <selectCheckAll style="width:100%" v-show="allForm.scheduleTime == '2'"
           :scheduleTime.sync="allForm.scheduleTimeData" ref="selectCheck" />
       </a-form-item>
-
       <a-form-item label="创意展现方式" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
         <!-- v-decorator="['speed', { initialValue: '1' }]" -->
@@ -266,7 +281,8 @@
                       <a-input-number v-model="item.bid" @change="showTip(index)"
                         :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }" style="width:100%">
                       </a-input-number>
-                      <span style="color:red" v-if="item.showTipCheck&&item.bidType==180">不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span>
+                      <span style="color:red"
+                        v-if="item.showTipCheck&&item.bidType==180">不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span>
                     </a-form-item>
                     <a-form-item label="目标成本" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
                       :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }" v-else>
@@ -279,7 +295,7 @@
                           : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
                       }}</span>
                       <span style="color:red;font-weight:700" v-else-if="item.bidType==2&&item.cpaBid&&item.cpaBid>1">
-                          行为出价大于1元,请注意!!!     
+                        行为出价大于1元,请注意!!!
                       </span>
                     </a-form-item>
                     <a-form-item label="深度转化出价" :labelCol="{ lg: { span: 6 }, sm: { span: 7 } }"
@@ -352,7 +368,6 @@
   import targetedPopulation from './stepModule/targetedPopulation.vue'
 
   import selectCheckAll from './stepModule/test'
-
   let dateQuantumRangeConst = ''
   const columns = [{
       title: '人群',
@@ -459,7 +474,7 @@
     components: {
       creatApplication,
       targetedPopulation,
-      selectCheckAll
+      selectCheckAll,
     },
     props: {
       campaignId: {
@@ -472,6 +487,7 @@
 
     data() {
       return {
+        tongbuLoading: false,
         convert: false,
         convertId: "",
         convertList: [],
@@ -517,7 +533,8 @@
           groupTypeData: null,
           fail: [],
           success: [],
-          sceneId: [7]
+          sceneId: [7],
+          appStore: ['huawei', 'oppo', 'vivo', 'xiaomi', 'meizu', 'smartisan']
         },
         convertType: '1',
         dataList: []
@@ -594,7 +611,7 @@
       },
       addGroup() {
         this.allForm.group.push({
-          bidType: this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1'?180:2,
+          bidType: this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
           bid: '',
           cpaBid: '',
           showTipCheck: false,
@@ -649,13 +666,13 @@
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } else  {
+        } else {
           if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
             this.allForm.group[index].showTipCheck = true
           } else {
             this.allForm.group[index].showTipCheck = false
           }
-        } 
+        }
       },
       getScheduleTime(item) {
         this.allForm.scheduleTimeData = item
@@ -775,7 +792,20 @@
       },
 
       addApplication() {
-        this.$refs.application.showApplication()
+        this.tongbuLoading = true
+        // this.$refs.application.showApplication()
+        getAction('/kuaishou/batch/syncAppList', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.tongbuLoading = false
+            this.$message.success(res.message)
+            this.getAppList()
+          } else {
+            this.tongbuLoading = false
+            this.$message.error(res.message)
+          }
+        })
       },
       handleOk() {
         var that = this
@@ -826,6 +856,9 @@
             }
             if (values.useAppMarket == true || values.useAppMarket == false) {
               params.useAppMarket = values.useAppMarket ? 1 : 0
+              if (values.useAppMarket == true) {
+                params.appStore = this.allForm.appStore
+              }
             }
             console.log(params)
             if (this.checkedTrue) {
@@ -853,7 +886,7 @@
                     })
                   )
                   localStorage.setItem('pans', dataJson)
-                  localStorage.setItem('appId',this.getData('appId'))
+                  localStorage.setItem('appId', this.getData('appId'))
                 }
               } else {
                 this.loading = false

+ 247 - 12
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -29,6 +29,15 @@
       z-index: 100;
     }
   }
+
+  .onlny-click-track {
+    .ant-list-item-content {
+      width: 60%;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+  }
 </style>
 <style scoped lang="scss">
   .actor-photo-list {
@@ -122,6 +131,9 @@
               <a-radio-button value="2">横版视频</a-radio-button>
             </a-radio-group>
           </a-form-item>
+          <!-- <a-form-item label="素材同步" :labelCol="labelCol" :wrapperCol="wrapperCol">
+           
+          </a-form-item> -->
           <a-form-item label="创意内容" :labelCol="labelCol">
             <a-layout>
               <a-layout-content style="padding:10px;">
@@ -133,9 +145,11 @@
                         @click="deleteCreative(bestIndex, index)" />
                       <div style="clear:both"></div>
                       <div class="dynamically_add_form_item">
+
                         <a-form-item label="">
                           <a @click="getVideoList('video', index, item, bestIndex)">选择视频</a>
                           <a @click="uploadVideo(index,bestIndex)" style="margin-left:10px">上传视频</a>
+
                           <br />
                           <video :src="item.videoList.url" controls="controls" style="width:25%"
                             v-if="item.videoList"></video>
@@ -170,8 +184,15 @@
                         </a-form-item>
                         <a-form-item label="广告语">
                           <a @click="showTitle(index,bestIndex)">推荐广告语</a>
+
+
                           <a-textarea class="rending" placeholder="请输入广告语" v-model.trim="item.description"
                             :autosize="{ minRows: 2, maxRows: 6 }"></a-textarea>
+                          <span v-if="item.description.length>30" style="color:red">广告语长度不能超过30个字符</span>
+                          <br>
+                          <a @click="cunTitle(index,bestIndex)">收藏</a>
+                          <a @click="showCunTitle(index,bestIndex)" style="margin-left:10px">收藏列表</a>
+                          <br>
                           <a-tag v-for="(itemTag,indexTag) of tags" :key="indexTag"
                             @click="getChange(item, itemTag, index)">{{itemTag.name}}</a-tag>
                         </a-form-item>
@@ -226,6 +247,8 @@
                 }
               ]" placeholder="请输入第三方检测链接">
             </a-input>
+            <a v-if="getData('clickTrackUrl')" @click="clickTrackUrlShow=true" style="margin-right:10px">收藏监测链接</a>
+            <a @click="getClickTrackUrlList()">监测链接列表</a>
           </a-form-item>
         </a-form>
       </a-tab-pane>
@@ -289,8 +312,8 @@
         </a-button>
       </template>
       <a-form-item label="" class="add-image-material">
-        <uploadFile v-if="addVideoVisible" :checkFile="file" :value.sync="urlList.url" @overUpload="overUpload" :fileCount="10"
-          uploadType="video" :multiple="false" />
+        <uploadFile v-if="addVideoVisible" :checkFile="file" :value.sync="urlList.url" @overUpload="overUpload"
+          :fileCount="10" uploadType="video" :multiple="false" />
 
         <!-- <upload-to-ali v-model="urlList.url" :customDomain="customDomain" preview :region="region" :bucket="bucket"
           :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId" :accessKeySecret="accessKeySecret"
@@ -349,7 +372,15 @@
               </li>
             </a-checkbox-group>
           </ul>
+          <div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
+            <img
+              src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+              alt="" v-if="!loadingVideoList" />
+            <img v-else src="@/views/modules/material/loading.gif" />
+          </div>
         </a-tab-pane>
+        <a-button slot="tabBarExtraContent" type="primary" @click="tongbu()" :loading="tongbuLoading">
+          刷新素材</a-button>
       </a-tabs>
 
       <!-- <ul class="actor-photo-list">
@@ -397,7 +428,62 @@
             <a-list size="large" bordered :dataSource="title">
               <a-list-item slot="renderItem" slot-scope="item">
                 <a slot="actions" @click="okTitle(item)">选择</a>
-                {{ item }}</a-list-item>
+
+
+                {{ item }}
+              </a-list-item>
+            </a-list>
+          </a-card>
+        </a-col>
+      </a-row>
+    </a-modal>
+    <a-modal title="收藏标题" v-model="cunTitleVisible" :width="1000" :footer="null">
+      <a-row :gutter="10">
+        <a-col :sm="24" style="margin-bottom: 20px;z-index: 10">
+          <a-card class="search-box" style="over-flow:auto">
+            <a-list size="large" bordered :dataSource="cunTitleList">
+              <a-list-item slot="renderItem" slot-scope="item">
+
+                <div slot="actions">
+                  <a @click="okTitleCun(item)">选择</a>
+                  <a-divider type="vertical" />
+                  <a @click="removeTitleCun(item)">删除</a>
+                </div>
+                {{ item.title }}
+              </a-list-item>
+            </a-list>
+          </a-card>
+        </a-col>
+      </a-row>
+    </a-modal>
+    <a-modal title="监测链接名称" v-model="clickTrackUrlShow">
+      <template slot="footer">
+        <a-button key="submit" :disabled="trackUrlName==''&&(!showTrackUrlNameElse)" type="primary"
+          @click="clickTrackUrlOk">
+          确定
+        </a-button>
+      </template>
+      <a-input placeholder="请输入监测链接名称" v-model="trackUrlName" @blur="changeTrackUrlName" style="width: 100%" />
+      <span style="color:red" v-if="!showTrackUrlNameElse">名称重复</span>
+
+    </a-modal>
+    <a-modal title="监测链接列表" v-model="clickTrackUrlList" :width="1000" :footer="null">
+      <a-row :gutter="10" class="onlny-click-track">
+        <a-col :sm="24" style="margin-bottom: 20px;z-index: 10">
+          <a-card class="search-box" style="over-flow:auto">
+            <a-list size="large" bordered :dataSource="trackUrlList">
+              <a-list-item slot="renderItem" slot-scope="item" :title="item.trackUrl" style="line-height:50px">
+
+                <div slot="actions">
+                  <a @click="okClickTrackUrl(item)">选择</a>
+                  <a-divider type="vertical" />
+                  <a @click="removeClickTrackUrl(item)">删除</a>
+                </div>
+
+
+                {{ item.trackName }}
+                <a-input v-model="item.trackUrl" readonly style="margin:10px"></a-input>
+              </a-list-item>
             </a-list>
           </a-card>
         </a-col>
@@ -409,7 +495,8 @@
 <script>
   import {
     getAction,
-    postAction
+    postAction,
+    deleteAction
   } from '@/api/manage'
   import {
     mapGetters
@@ -425,7 +512,6 @@
   import checkMatemal from './stepModule/checkMatemal'
   import BMF from 'browser-md5-file'
   import uploadFile from '@/components/uploadFile.vue'
-
   let nowIndex = 0
   let bestIndex = 0
   let showRemove = false
@@ -439,8 +525,16 @@
     },
     data() {
       return {
+        tongbuLoading: false,
+        showTrackUrlNameElse: true,
+        clickTrackUrlShow: false,
+        clickTrackUrlList: false,
+        trackUrlList: [],
+        trackUrlName: "",
         showSite: true,
         titleVisible: false,
+        cunTitleVisible: false,
+        cunTitleList: [],
         options: [],
         data: [],
         value: '',
@@ -488,6 +582,7 @@
         pansKey: '',
         addImageVisible: false,
         addVideoVisible: false,
+        loadingVideoList: false,
         loadingVideo: false,
         loadingImage: false,
         allForm: {
@@ -559,6 +654,64 @@
       }
     },
     methods: {
+      ...mapGetters(["nickname", "avatar", "userInfo"]),
+      changeTrackUrlName() {
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.userId = this.userInfo().id
+        params.trackName = this.trackUrlName
+        getAction('/kuaishou/kuaiShouTrackUrlCollection/checkTrackName', params).then(res => {
+          this.showTrackUrlNameElse = res.result
+
+        })
+      },
+      clickTrackUrlOk() {
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.userId = this.userInfo().id
+        params.trackName = this.trackUrlName
+        params.trackUrl = this.getData('clickTrackUrl')
+        postAction('/kuaishou/kuaiShouTrackUrlCollection/add', params).then(res => {
+          if (res.success) {
+            this.clickTrackUrlShow = false
+            this.trackUrlName = ""
+            this.$message.success('添加成功')
+          } else {
+            this.$message.error(res.message)
+          }
+        })
+      },
+      okClickTrackUrl(item) {
+        this.clickTrackUrlList = false
+        this.form.setFieldsValue({
+          clickTrackUrl: item.trackUrl
+        })
+      },
+      removeClickTrackUrl(item) {
+        deleteAction('/kuaishou/kuaiShouTrackUrlCollection/delete', {
+          id: item.id
+        }).then(res => {
+          if (res.success) {
+            this.getClickTrackUrlList()
+          }
+        })
+      },
+      getClickTrackUrlList() {
+        this.clickTrackUrlList = true
+
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.userId = this.userInfo().id
+        params.pageNo = 1
+        params.pageSize = 500
+        getAction('/kuaishou/kuaiShouTrackUrlCollection/list', params).then(res => {
+          if (res.success) {
+            this.trackUrlList = res.result.records
+          } else {
+            this.$message.error(res.message)
+          }
+        })
+      },
       showTitle(index, bestIndex) {
         nowIndex = index
         bestIndex = bestIndex
@@ -572,6 +725,57 @@
         this.value = ""
         this.title = []
       },
+      cunTitle(nowIndex, lastIndex) {
+        if (this.pans[lastIndex].list[nowIndex].description == '') {
+          this.$message.error('请填写广告语后再进行收藏')
+        } else {
+          var params = {}
+          params.accountId = localStorage.getItem('accountId')
+          params.userId = this.userInfo().id
+          params.title = this.pans[lastIndex].list[nowIndex].description
+          postAction('/kuaishou/kuaiShouTitleCollection/add', params).then(res => {
+            if (res.success) {
+              this.$message.success('收藏成功')
+            } else {
+              this.$message.error(res.message)
+            }
+          })
+        }
+
+      },
+      showCunTitle(index, bestIndex) {
+        nowIndex = index
+        bestIndex = bestIndex
+        this.cunTitleVisible = true
+        this.getCunTitle()
+      },
+      getCunTitle() {
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.userId = this.userInfo().id
+        params.pageNo = 1
+        params.pageSize = 500
+        getAction('/kuaishou/kuaiShouTitleCollection/list', params).then(res => {
+          if (res.success) {
+            console.log(res.result)
+            this.cunTitleList = res.result.records
+          }
+        })
+      },
+      removeTitleCun(item) {
+        deleteAction('/kuaishou/kuaiShouTitleCollection/delete', {
+          id: item.id
+        }).then(res => {
+          if (res.success) {
+            this.getCunTitle()
+          }
+        })
+      },
+      okTitleCun(item) {
+        this.pans[bestIndex].list[nowIndex].description = item.title
+        this.cunTitleVisible = false;
+        this.cunTitleList = []
+      },
       searchQuery() {
         // /ctop/creativeTitle/titleSuggestion
         console.log(this.value)
@@ -704,7 +908,8 @@
             }
           })
           getAction('/ctop/MaterialImageInfo/list', {
-            videoId: item.video.signature
+            videoId: item.video.signature,
+            status: 1
           }).then(res => {
             // console.log(res)
             if (res.success) {
@@ -782,10 +987,14 @@
       },
       showVideoList(url, params) {
         this.dataSource = []
+        this.loadingVideoList = true
         getAction(url, params).then(res => {
           if (res.success) {
             this.dataSource = res.result.records
             this.ipagination.total = res.result.total
+            this.loadingVideoList = false
+          } else {
+            this.loadingVideoList = false
           }
         })
       },
@@ -970,6 +1179,32 @@
         bestIndex = bestIndex
         this.addVideoVisible = true
       },
+      tongbu() {
+        this.tongbuLoading = true
+        getAction('/kuaishou/batch/syncVideo', {
+          accountId: localStorage.getItem('accountId'),
+        }).then(res => {
+          if (res.success) {
+            this.$message.success(res.message)
+            this.tongbuLoading = false
+            var params = {}
+            params.accountId = localStorage.getItem('accountId')
+            params.materialType = this.getData('creativeMaterialType')
+            params.pageSize = this.ipagination.pageSize
+            params.pageNo = 1
+            params.status = 0
+            params.channelType = this.channelType
+            if (this.time.length > 0) {
+              params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+              params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+            }
+            this.showVideoList('/kuaishou/batch/getVideoList', params)
+          } else {
+            this.$message.error(res.message)
+            this.tongbuLoading = false
+          }
+        })
+      },
       handleOkChouzhen(e) {
 
         var arr = []
@@ -1270,11 +1505,12 @@
         }).then(res => {
           if (res.success) {
             this.pans[bestIndex].list[nowIndex].description =
-              res.result ? res.result.creativeCopywriter : ''
+              res.result ? (res.result.creativeCopywriter ? res.result.creativeCopywriter : '') : ''
           }
         })
         getAction('/ctop/MaterialImageInfo/list', {
-          videoId: this.checkVideo[0].signature
+          videoId: this.checkVideo[0].signature,
+          status: 1
         }).then(res => {
           // console.log(res)
           if (res.success) {
@@ -1285,9 +1521,6 @@
           }
         })
 
-
-
-
         this.pans[bestIndex].list[nowIndex].videoList = this.checkVideo[0]
         this.visibleMatemal = false
         this.ipagination.current = 1
@@ -1455,8 +1688,10 @@
           })
 
           this.pansKey = this.pans[0].key
+          setTimeout(() => {
+            this.addCreative(0)
+          }, 0)
 
-          this.addCreative(0)
           getAction('/kuaishou/batch/checkCreativeCount', {
             unitId: this.pansKey,
             accountId: localStorage.getItem('accountId')

+ 11 - 6
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -398,7 +398,7 @@ li:hover {
           <a-button @click="clearAll">清空</a-button>
           <br />
           <a-tag v-for="item of checkArr" :key="item" closable :afterClose="() => log(item)">
-            {{ showAppName(item) }}
+            {{ showAppName(item)?showAppName(item):item }}
           </a-tag>
         </div>
       </div>
@@ -718,7 +718,7 @@ export default {
           this.allForm.noAreaBreak = n.noAreaBreak == '0' ? false : true
           this.selectedRowKeys = n.population ? n.population : []
           this.selectedRowKeysNo = n.excludePopulation ? n.excludePopulation : []
-
+          this.checkArr = n.allForm.checkArr
           this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
           this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
           this.getPeople().then(res => {
@@ -993,10 +993,15 @@ export default {
       }
     },
     showAppName(appId) {
-      var data = this.checkOptions.filter(item => {
-        return item.appId == appId
-      })
-      return data[0].appName
+        if(this.checkOptions.length>0){
+            var data = this.checkOptions.filter(item => {
+                return item.appId == appId
+            })
+            return data[0].appName
+        }else{
+            return null
+        }
+     
     },
     log(appId) {
       var index = this.checkArr.findIndex(item => item === appId)

+ 980 - 0
src/views/modules/material/supplierMaterial.vue

@@ -0,0 +1,980 @@
+<style lang="scss">
+  .downLoad .ant-form-item-control-wrapper {
+    width: 70%;
+  }
+
+  #material-card .ant-tabs-tab {
+    border: 1px solid gainsboro !important;
+  }
+
+  #material-card .ant-tabs-top-bar {
+    position: relative;
+    z-index: 100;
+  }
+
+  #material-card .ant-badge-count {
+    top: 0px;
+  }
+
+  .detail .ant-form-item {
+    margin-bottom: 10px !important;
+  }
+
+  .ant-carousel>>>.slick-slide {
+    text-align: center;
+    //   height: 160px;
+    //   line-height: 160px;
+    background: #364d79;
+    overflow: hidden;
+  }
+
+  .ad_cover_container .ant-card-body {
+    padding: 0;
+  }
+
+  .ant-carousel>>>.slick-slide h3 {
+    color: #fff;
+  }
+
+  .ant-carousel>>>.custom-slick-arrow {
+    width: 25px;
+    height: 25px;
+    font-size: 25px;
+    color: #fff;
+    background-color: rgba(31, 45, 61, 0.11);
+    opacity: 0.3;
+  }
+
+  .ant-carousel>>>.custom-slick-arrow:before {
+    display: none;
+  }
+
+  .ant-carousel>>>.custom-slick-arrow:hover {
+    opacity: 0.5;
+  }
+
+  .cover_carousel_con .slick-dots {
+    bottom: 55px;
+  }
+
+  .add-image-material .draggable-list {
+    display: block !important;
+  }
+
+  li.chouzhen.first:before {
+    font-size: 12px;
+    content: "首帧";
+    position: absolute;
+    top: 7px;
+    left: 5px;
+    width: 36px;
+    height: 20px;
+    color: rgb(255, 255, 255);
+    line-height: 20px;
+    text-align: center;
+    background: rgba(0, 0, 0, 0.5);
+    border-radius: 2px;
+  }
+</style>
+<style lang="scss" scoped>
+  .chouzhen {
+    border-style: solid;
+    border-width: 1px;
+    border-color: #e4e4e4;
+    width: calc(20% - 10px);
+    padding: 10px;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+    background: #fff;
+    position: relative;
+    z-index: 99;
+    float: left
+  }
+
+  .content {
+    display: flex !important;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+
+    .slick-dots {
+      bottom: 55px;
+    }
+  }
+
+  .video-content {
+    width: 50%;
+    padding: 10px;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    border-right: 1px solid #f2f2f2;
+  }
+
+  .tag-video {
+    position: absolute;
+    right: 0px;
+    top: 8px;
+    padding: 4px;
+    border-radius: 2px;
+    line-height: 16px;
+    font-size: 12px;
+    color: #fff;
+    background-color: rgba(0, 0, 0, 0.3);
+  }
+
+  .home-item {
+    overflow: hidden;
+  }
+
+
+
+  @media only screen and (min-width: 1200px) {
+    .home-item {
+      border-style: solid;
+      border-width: 1px;
+      border-color: #e4e4e4;
+      width: calc(50% - 10px);
+      padding: 10px;
+      margin-right: 10px;
+      margin-bottom: 10px;
+      display: flex;
+      align-items: center;
+      background: #fff;
+      position: relative;
+      z-index: 99;
+    }
+  }
+
+  /*>=1024的设备*/
+
+  // @media (min-width: 1100px) {
+  //     .checkbox_item_container {
+  //         width:70%
+  //     }
+  // } /*>=1100的设备*/
+  @media only screen and (min-width: 1250px) {
+    .home-item {
+      border-style: solid;
+      border-width: 1px;
+      border-color: #e4e4e4;
+      width: calc(25% - 10px);
+      padding: 10px;
+      margin-right: 10px;
+      margin-bottom: 10px;
+      display: flex;
+      align-items: center;
+      background: #fff;
+      position: relative;
+      z-index: 99;
+    }
+  }
+
+  /*>=1280的设备*/
+
+  // @media (min-width: 1366px) {
+  // }
+
+  // @media (min-width: 1440px) {
+  // }
+
+  // @media (min-width: 1680px) {
+
+  // }
+  // @media (min-width: 1920px) {
+  //   .home-item {
+  //     border-style: solid;
+  //     border-width: 1px;
+  //     border-color: #e4e4e4;
+  //     width: calc(25% - 10px);
+  //     padding: 10px;
+  //     margin-right: 10px;
+  //     margin-bottom: 10px;
+  //     display: flex;
+  //     align-items: center;
+  //     background: #fff;
+  //     position: relative;
+  //     z-index: 99;
+  //     cursor: pointer;
+  //   }
+  // }
+
+  .actor-photo-list {
+    display: flex;
+    padding-left: 0;
+
+    li {
+      width: 25%;
+      margin: 10px;
+      position: relative;
+      height: 250px;
+      border: 1px solid #f2f2f2;
+
+      img,
+      video {
+        width: 100%;
+        margin-top: auto;
+        margin-bottom: auto;
+        top: 0;
+        bottom: 0;
+        position: absolute;
+        max-height: 250px;
+      }
+    }
+  }
+
+  .home-card {
+    width: 100%;
+    overflow: hidden;
+    padding: 10px 0px;
+    display: flex;
+    flex-wrap: wrap;
+    margin-right: -10px;
+
+    .home-right {
+      width: 100%;
+    }
+
+    .bg:after {
+      content: '';
+      width: 110%;
+      height: 110%;
+      position: absolute;
+      left: -5%;
+      top: -5%;
+      background: inherit;
+      filter: blur(10px);
+      z-index: 2;
+    }
+  }
+
+  .bh {
+    height: 60px;
+    line-height: 30px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    -webkit-line-clamp: 2;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+  }
+
+  .bhShow {
+    height: 100px;
+    line-height: 25px;
+    text-align: center;
+  }
+
+  .bhShow span {
+    font-size: 14px;
+  }
+
+  .show-data {
+    width: 50%;
+    display: flex;
+    flex-direction: column;
+    align-items: flex-start;
+  }
+
+  a {
+    font-size: 14px;
+  }
+
+  .actor-photo-list {
+    display: flex;
+    padding-left: 0;
+
+    li {
+      width: 25%;
+      margin: 10px;
+      position: relative;
+      height: 250px;
+      border: 1px solid #f2f2f2;
+      list-style: none;
+
+      img,
+      video {
+        width: 100%;
+        margin-top: auto;
+        margin-bottom: auto;
+        top: 0;
+        bottom: 0;
+        position: absolute;
+        max-height: 250px;
+      }
+    }
+  }
+</style>
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="8" :sm="8">
+            <!-- <a-form-item label="项目名称"> -->
+            <selectTable :projectId.sync="queryParam.projectId"></selectTable>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <a-form-item label="素材名称">
+              <a-input placeholder="请输入素材名称" v-model="queryParam.materialName"></a-input>
+            </a-form-item>
+          </a-col>
+          <!--  -->
+          <a-col :md="8" :sm="8">
+            <a-form-item label="时间选择">
+              <a-date-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width:100%" />
+              <!-- <a-input placeholder="请输入查询时间" v-model="queryParam.createTime"></a-input> -->
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <a-form-item label="供应商选择">
+              <a-select v-model="queryParam.supplierCode">
+                <a-select-option value="kuaishou_001">汇创</a-select-option>
+                <a-select-option value="kuaishou_002">鸣闻</a-select-option>
+                <a-select-option value="kuaishou_003">优效</a-select-option>
+              </a-select>
+              <!-- <a-input placeholder="请输入查询时间" v-model="queryParam.createTime"></a-input> -->
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- table区域-begin -->
+    <!-- <div> -->
+
+    <!-- 操作按钮区域 -->
+
+
+    <a-tabs @change="callbackTwo" v-model="active" type="card" id="material-card">
+      <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
+        <div v-if="dataSource.length > 0">
+          <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
+            <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
+              <span v-if="items.excellent == 0"></span>
+              <span v-else
+                style="position:absolute;top:30px;right:-105px;display:block;width:300px;height:30px;text-align:center;line-height;30px;background:red;transform:rotate(45deg);z-index:1000">优秀素材</span>
+              <div class="home-right">
+                <a-badge :count="checkArr.indexOf(items.id) > -1 ? checkArr.indexOf(items.id) + 1 : 0"
+                  :numberStyle="{ backgroundColor: '#52c41a' }" style="width:100%;display:flex" @click.stop>
+                  <span
+                    style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
+                    :title="items.projectName">
+                    {{ items.projectName }}
+                  </span>
+                  <span
+                    style="color: #999; fontSize: 14px;padding-bottom:10px;display:inline-block;width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
+                    :title="items.materialName">
+                    {{items.materialName}}
+                  </span>
+                </a-badge>
+                <div style="display:flex;justify-content:center;width:100%;height:200px;position:relative;">
+
+
+
+                  <img :src="items.coverUrl" alt="" style="height:200px;max-width:100%;position:absolute;z-index:10;" />
+                </div>
+                <div style="width:100%;height:1px;border-bottom:1px solid #f2f2f2;margin-top:5px"></div>
+                <span
+                  style="color: black; fontSize: 16px;padding-top:10px;display:flex;width:100%;justify-content: space-between;"
+                  @click.stop>
+                  <span>{{ items.createTime | getDate }}</span>
+                  <span>{{items.supplierCode|supplierName}}</span>
+
+                </span>
+              </div>
+            </div>
+          </a-checkbox-group>
+          <a-pagination size="small" :showTotal="ipagination.showTotal" style="float:right" v-if="dataSource.length > 0"
+            showQuickJumper :pageSize.sync="ipagination.pageSize" :total="ipagination.total"
+            v-model="ipagination.current" @change="getDataSource" />
+        </div>
+        <div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
+          <img
+            src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+            alt="" v-if="!loading" />
+          <img v-else src="./loading.gif" />
+        </div>
+      </a-tab-pane>
+    </a-tabs>
+
+
+    <a-modal title="素材详情" v-model="visibleDetail" width="70%" :footer="null">
+      <div style="display:flex;height:700px">
+        <div class="video-content"
+          style="width:50%;padding:10px;box-sizing:border-box;display:flex;justify-content:center;border-right:1px solid #f2f2f2">
+          <video class="video" :src="showUrl" controls="controls" style="height:50%" controlsList="nodownload">
+            您的浏览器不支持 video 标签。
+          </video>
+          <div class="downLoad" style="height:50%;overflow:auto">
+            <ul class="actor-photo-list" :style="{ width: model.length>4?25 * model.length + '%':'100%' }"
+              v-if="model.length > 0">
+              <a-checkbox-group v-model="checkArrImage" style="width:100%;  display: flex;padding-left: 0;"
+                @change="onChangeCheckImage">
+                <li v-for="(item, index) of model" :key="index">
+                  <a-checkbox :value="item.id" style="position:absolute;z-index: 100"></a-checkbox><img class="video"
+                    :src="item.url" @click="coverPreviewShowModal(item, index)" />
+                  <span class="tag-video" :style="{
+                      backgroundColor:
+                        item.status == 0 ? 'rgba(0, 0, 0)' : item.status == 1 ? 'rgba(0, 180, 100)' : 'red'
+                    }">{{ item.status == 0 ? '未审核' : item.status == 1 ? '已批准' : '已驳回' }}</span>
+                </li>
+              </a-checkbox-group>
+            </ul>
+            <div v-else style="height:100%;display:flex;justify-content: center;align-items: center;">
+              <img
+                src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+                alt="" />
+            </div>
+          </div>
+        </div>
+        <a-modal title="图片预览" v-model="coverPreviewVisible" :footer="null">
+          <a-carousel arrows class="cover_carousel_con">
+            <div v-for="(item, index) in modelNew" :key="index" class="content">
+              <img :src="item.url" :width="300" />
+            </div>
+            <a-icon type="left-circle" slot="prevArrow" slot-scope
+              style="left: 10px;zIndex: 9;font-size:30px;color:black" />
+            <a-icon type="right-circle" slot="nextArrow" slot-scope
+              style="right: 10px;zIndex: 9;font-size:30px;color:black" />
+          </a-carousel>
+        </a-modal>
+        <div style="flex:3;padding:10px;box-sizing:border-box;">
+          <a-form v-if="detail" class="detail ant-advanced-search-form" layout="inline">
+            <div v-if="detail.parameter" style="display:flex;">
+              <a-form-item label="视频时长" v-if="detail.parameter.second" style="flex:1">
+                {{ detail.parameter.second }}秒
+              </a-form-item>
+              <a-form-item label="尺寸" style="flex:1" v-if="detail.parameter.width">
+                {{ detail.parameter.width }}*{{ detail.parameter.height }}
+              </a-form-item>
+              <a-form-item label="大小" style="flex:1" v-if="detail.parameter.size">
+                {{ detail.parameter.size }}
+              </a-form-item>
+            </div>
+            <div v-if="detail.ascription" style="display:flex;">
+              <a-form-item label="策划" style="flex:1">
+                {{ detail.ascription.planName }}
+              </a-form-item>
+              <a-form-item label="拍摄" style="flex:1">
+                {{ detail.ascription.shotName }}
+              </a-form-item>
+              <a-form-item label="剪辑" v-if="detail.ascription.clipName" style="flex:1">
+                {{ detail.ascription.clipName }}
+              </a-form-item>
+            </div>
+            <div>
+              <a-form-item label="水印链接" v-if="watermarkUrl">
+                <a-input v-model="watermarkUrl" type="text" style="width:200%" readonly />
+              </a-form-item>
+              <a-form-item label="生成水印" v-else>
+                <a-button type="primary" @click="createWater" :loading="creatLoading">生成</a-button>
+              </a-form-item>
+            </div>
+            <div>
+              <a-form-item label="标签" v-if="detail.tag">
+                <a-tag v-for="(item, index) of detail.tag" :key="index">{{ item }}</a-tag>
+              </a-form-item>
+            </div>
+            <div>
+              <a-form-item label="审核人" v-if="active == '2' && detail.auditorName">
+                {{ detail.auditorName }}
+              </a-form-item>
+            </div>
+            <div>
+              <a-form-item label="广告语" v-if="active == '1'">
+                {{ creativeCopywriter ? creativeCopywriter : '无广告语' }}
+              </a-form-item>
+            </div>
+            <div>
+              <a-form-item label="驳回原因" v-if="active == '2'">
+                {{ refuseReason ? refuseReason : '无原因' }}
+              </a-form-item>
+            </div>
+            <div>
+              <a-form-item label="截图" v-if="active == '2'">
+                <div v-if="refuseFile" style="width:100%">
+                  <img style="width:100px;height:auto;margin:5px" @click="showBoHui(item)" :src="item"
+                    v-for="(item,index) in refuseFile" :key="index" alt="">
+                </div>
+                <div v-else>无截图</div>
+              </a-form-item>
+            </div>
+          </a-form>
+        </div>
+      </div>
+    </a-modal>
+    <a-modal title="查看截图" v-model="bohuiShow" :width="300" :footer="null">
+      <img :src="bohui" alt="" style="width:100%">
+    </a-modal>
+
+
+
+  </a-card>
+</template>
+
+<script>
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import UploadToAli from '@femessage/upload-to-ali'
+  import {
+    fileCheck,
+    fileInsertV2,
+    fileEdit,
+    fileCheckImage,
+    fileEditAll
+  } from '@/api/actor'
+  import {
+    getAction,
+    postAction,
+    postFile,
+    deleteAction,
+    putAction
+  } from '@/api/manage'
+  import qs from 'qs'
+  import {
+    mapGetters
+  } from 'vuex'
+  import moment from 'moment'
+
+  import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
+
+  import BMF from 'browser-md5-file'
+  import uploadFile from '@/components/uploadFile.vue'
+  import {
+    stopOtherVideo,
+    closeAllVideoFun
+  } from '@/utils/videoControl'
+  import accountCheck from './accountCheck'
+  export default {
+    name: 'YardList',
+    mixins: [JeecgListMixin],
+    components: {
+      JEllipsis,
+      UploadToAli,
+      accountCheck,
+      selectTable,
+      uploadFile
+    },
+
+    data() {
+      return {
+        coverPreviewVisible: false,
+        chouzhen: false,
+        chouzhenList: [],
+        model: [],
+        modelNew: [],
+        goodsColumns: [{
+            title: '封面预览',
+            //   dataIndex: 'coverUrl',
+            //   key: 'coverUrl',
+            dataIndex: 'url',
+            align: 'center',
+            scopedSlots: {
+              customRender: 'url'
+            }
+          },
+          {
+            title: '审核',
+            align: 'center',
+            dataIndex: 'action',
+            width: 100,
+            scopedSlots: {
+              customRender: 'action'
+            }
+          }
+        ],
+
+        addImageVisible: false,
+        addImageData: null,
+        projectId: '',
+        inputVisible: false,
+        inputValue: '',
+        labelCol: {
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 5
+          }
+        },
+        wrapperCol: {
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 12
+          }
+        },
+        queryParam: {},
+        dataElse: [],
+        ascription: {
+          clipId: [], //剪辑人id
+          shotId: [], //拍摄人id
+          planId: [], //策划id
+          planeId: [] //平面id
+        },
+        show: true,
+        visible: false,
+        visibleDetail: false,
+        personVisible: false,
+        confirmLoading: false,
+        loading: false,
+        loadingImage: false,
+        loadingPerson: false,
+        activeKey: 'video',
+        active: '0',
+        examinelList: [{
+            value: '0',
+            tab: '未审核'
+          },
+          {
+            value: '1',
+            tab: '已批准'
+          },
+          {
+            value: '2',
+            tab: '已驳回'
+          }
+        ],
+        // 表头
+        columns: [],
+        urlList: {
+          url: '',
+          md5: '',
+          name: ''
+        },
+        urlListImage: {
+          url: [],
+          md5: [],
+          name: [],
+          size: []
+        },
+        watermarkUrl: null,
+        url: {
+          list: '/ctop/materialInfo/supplierList'
+        },
+        detail: false,
+        form: this.$form.createForm(this),
+        formPerson: this.$form.createForm(this),
+        tags: [],
+        refuseFile: [],
+        refuseReason: '',
+        refuseReasonImage: '',
+        creativeCopywriter: '',
+        customDomain: '',
+        region: 'oss-cn-beijing',
+        bucket: 'ctop-media',
+        acceptVideo: 'video/mpeg,video/mp4',
+        acceptImage: 'image/jpeg,image/jpg,image/png',
+        accessKeyId: 'LTAIbNbqWzSOklQV',
+        accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
+        checkArr: [],
+        checkAll: false,
+        checkArrImage: [],
+        checkAllImage: false,
+        showUrl: '',
+        showUrlWater: '',
+        materialName: '',
+        materialDescribe: '',
+        name: '',
+        detail: null,
+        add: true,
+        id: '',
+        role: {
+          roleCode: '',
+          roleName: ''
+        },
+        key: '0',
+        mediaId: null,
+        sizeType: [],
+        size: null,
+        repeat: false,
+        excellent: 0,
+        code: '',
+        material: [],
+        imageArrList: [],
+        showDataBool: false,
+        kuaishouData: null,
+        douyinData: null,
+        bohui: "",
+        bohuiShow: false,
+        creatLoading: false
+      }
+    },
+    filters: {
+      getDate(value) {
+        let date = new Date(value)
+        let y = date.getFullYear()
+        let MM = date.getMonth() + 1
+        MM = MM < 10 ? '0' + MM : MM
+        let d = date.getDate()
+        d = d < 10 ? '0' + d : d
+        return y + '-' + MM + '-' + d
+      },
+      supplierName(value) {
+        var data = {
+          'kuaishou_001': "汇创",
+          "kuaishou_002": "鸣闻",
+          "kuaishou_003": "优效"
+        }
+        return data[value]
+      }
+    },
+    computed: {
+      dirImg() {
+        let date = new Date()
+        let y = date.getFullYear()
+        let MM = date.getMonth() + 1
+        MM = MM < 10 ? '0' + MM : MM
+        let d = date.getDate()
+        d = d < 10 ? '0' + d : d
+
+        return 'image/' + y + '-' + MM + '-' + d + '/'
+      },
+      dirVideo() {
+        let date = new Date()
+        let y = date.getFullYear()
+        let MM = date.getMonth() + 1
+        MM = MM < 10 ? '0' + MM : MM
+        let d = date.getDate()
+        d = d < 10 ? '0' + d : d
+
+        return 'video/' + y + '-' + MM + '-' + d + '/'
+      }
+    },
+    created() {
+      this.queryParam.type = 'VIDEO'
+      this.queryParam.userId = this.userInfo().id
+      this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
+      this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
+      // this.queryParam.status = key
+      this.ipagination.pageSize = 8
+      this.getParticipateList()
+      // /sys/user/getRoleInfo
+      getAction('/sys/user/getRoleInfo', {
+        userId: this.userInfo().id
+      }).then(res => {
+        this.role = res
+      })
+      getAction('/ctop/videoWatermarkTemplate/list').then(res => {
+        if (res.success) {
+          this.sizeType = res.result.records
+        }
+      })
+    },
+    updated() {
+      stopOtherVideo()
+    },
+    watch: {
+      $route: function (n, o) {
+        if (n.path == '/modules/material/videoMaterial') {
+          this.queryParam.userId = this.userInfo().id
+          this.queryParam.status = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
+          this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
+          this.loadData()
+        }
+      },
+      'queryParam.projectId': function (n, o) {
+        if (n != '') {
+          this.getList(n)
+        }
+      },
+      visibleDetail: function (n, o) {
+        if (!n) {
+          this.refuseFile = []
+          this.refuseReason = ''
+        }
+      }
+    },
+    methods: {
+      createWater() {
+        this.creatLoading = true
+        getAction('/ctop/materialInfo/supplierWatermark', {
+          id: this.id
+        }).then(res => {
+          if (res.success) {
+            console.log(res)
+            this.watermarkUrl = res.result
+            this.creatLoading = false
+          } else {
+            this.creatLoading = true
+          }
+        })
+      },
+      showBoHui(item) {
+        this.bohui = item
+        this.bohuiShow = true
+      },
+      getData(className) {
+        return this.form.getFieldValue(className)
+      },
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      moment,
+
+
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      searchRe() {
+        this.queryParam = {
+          type: 'VIDEO',
+          userId: this.userInfo().id,
+          status: this.active
+        }
+        this.loadData(1)
+      },
+      getList(value) {
+        if (value) {
+          this.mediaId = this.dataElse.filter(item => {
+            if (value == item.projectId) {
+              return item
+            }
+          })[0].mediaId
+        }
+        this.loadData()
+      },
+      onChangeCheckImage(checkedList) {
+        if (checkedList.length == 0) {
+          this.checkAllImage = false
+        }
+      },
+      onChangeCheck(checkedList) {
+        if (checkedList.length == 0) {
+          this.checkAll = false
+        }
+      },
+
+      showDetail(item) {
+        this.watermarkUrl = null
+        this.visibleDetail = true
+        this.showUrl = item.url
+        this.id = item.id
+        this.code = item.code
+        this.excellent = item.excellent
+        if (this.active == '2') {
+          this.refuseReason = item.refuseReason
+          this.refuseFile = item.refuseFile ? JSON.parse(item.refuseFile) : null
+        } else if (this.active == '1') {
+          this.creativeCopywriter = item.creativeCopywriter
+          this.refuseReason = ''
+          this.refuseFile = []
+        } else {
+          this.refuseReason = ''
+          this.refuseFile = []
+        }
+        getAction('/ctop/materialInfo/getDetail', {
+          materialId: item.id
+        }).then(res => {
+          this.detail = res
+          this.size =
+            res.parameter.width == '1080' ? 3 : res.parameter.width == '1920' ? 1 : res.parameter.width == '1280' ?
+            2 : 4
+        })
+        getAction('/ctop/supplierWatermark/list', {
+          videoSignature: item.code
+        }).then(res => {
+
+          if (res.success) {
+            this.watermarkUrl = res.result.records.length > 0 ? res.result.records[0].watermarkUrl : null
+          } else {
+            this.watermarkUrl = null
+          }
+        })
+
+        getAction('/ctop/materialInfo/queryById', {
+          id: item.id
+        }).then(res => {
+          if (res.success) {
+            this.showUrlWater = res.result.watermarkUrl
+            this.name = res.result.watermarkCode
+            this.materialName = res.result.materialName
+          } else {
+            this.showUrlWater = null
+            this.name = null
+          }
+        })
+        getAction('/ctop/MaterialImageInfo/list', {
+          videoId: item.code
+        }).then(res => {
+          console.log(res)
+          if (res.success) {
+            this.model = res.result.map((item, index) => {
+              return {
+                ...item,
+                key: index
+              }
+            })
+          }
+        })
+      },
+      coverPreviewShowModal(item, index) {
+        console.log(this.model)
+        this.modelNew = this.model.filter(items => {
+          return items.status == 0
+        })
+        if (this.modelNew.length > 0) {
+          this.coverPreviewVisible = true
+        }
+      },
+      callbackTwo(key) {
+        this.checkAll = false
+        this.checkArr = []
+
+        if (key == '3') {
+          this.url.list = "/ctop/materialInfo/effiMaterialInfo"
+          this.queryParam = {}
+        } else {
+          this.url.list = "/ctop/materialInfo/list"
+          this.queryParam = {
+            type: 'VIDEO',
+            userId: this.userInfo().id,
+            status: key,
+            projectId: this.queryParam.projectId
+          }
+          if (this.form.getFieldValue('projectId')) {
+            this.form.setFieldsValue({
+              projectId: ''
+            })
+          }
+        }
+        //   if (this.form.getFieldValue('projectId')) {
+        //     this.form.setFieldsValue({
+        //       projectId: ''
+        //     })
+        //   }
+        //   this.queryParam.status = key
+        this.loadData(1)
+      },
+      getParticipateList() {
+        getAction('/ctop/projectMember/participateList', {
+          userId: this.userInfo().id
+        }).then(res => {
+          if (res.code == 0) {
+            this.dataElse = res.result
+          }
+        })
+      },
+      getDataSource(page, pageSize) {
+        this.ipagination.current = page
+        this.checkArr = []
+        this.checkAll = false
+        this.loadData()
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 7 - 14
vue.config.js

@@ -71,26 +71,19 @@ module.exports = {
   devServer: {
     port: 3000,
     proxy: {
-      /* '/api': {
-         target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统
-         ws: false,
-         changeOrigin: true,
-         pathRewrite: {
-           '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
-         }
-       },*/
       '/jeecg-boot': {
-
         // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://127.0.0.1:8080', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
+        // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
-        // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.1.251:8088', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
+        target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
+        // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
 
 
         ws: false,