Ver Fonte

Merge branch 'master' into jiaoyang

朱鑫波 há 4 anos atrás
pai
commit
497b2a2c38
47 ficheiros alterados com 13805 adições e 1703 exclusões
  1. 0 25
      debug.log
  2. 7 0
      src/api/actor.js
  3. 326 0
      src/components/formComponents/Cascader.vue
  4. 263 286
      src/components/formComponents/toutiaoTime.vue
  5. 12 0
      src/components/layouts/TabLayout.vue
  6. 1 2
      src/components/uploadFile.vue
  7. 1 0
      src/views/modules/BatchCreate/linkMultiSelect.vue
  8. 2 1
      src/views/modules/Statistics/KSAccountReport.vue
  9. 2 2
      src/views/modules/Statistics/accountReport.vue
  10. 32 1
      src/views/modules/Statistics/components/Treeselect.vue
  11. 227 114
      src/views/modules/Statistics/imageStatics/imageCostReport.vue
  12. 44 2
      src/views/modules/advertiser/UserAllocationList.vue
  13. 1 0
      src/views/modules/advertiser/modules/projectListModal.vue
  14. 0 0
      src/views/modules/autoLaunch/autoLaunchList.vue
  15. 338 0
      src/views/modules/autoLaunch/components/MultiCheckBox.vue
  16. 687 0
      src/views/modules/autoLaunch/components/linkMultiSelect.vue
  17. 274 0
      src/views/modules/autoLaunch/components/singleLayerSelecte.vue
  18. 471 0
      src/views/modules/autoLaunch/createStrategy.vue
  19. 39 0
      src/views/modules/autoLaunch/index.vue
  20. 237 0
      src/views/modules/autoLaunch/radioCheck.vue
  21. 0 0
      src/views/modules/autoLaunch/setCreate.vue
  22. 1514 0
      src/views/modules/autoLaunch/setDirectional.vue
  23. 160 73
      src/views/modules/earlyWarningRules/configRules.vue
  24. 2 5
      src/views/modules/earlyWarningRules/index.vue
  25. 128 0
      src/views/modules/earlyWarningRules/pushTreeSelect.vue
  26. 47 17
      src/views/modules/earlyWarningRules/ruleModule.vue
  27. 81 32
      src/views/modules/earlyWarningRules/useRuleList.vue
  28. 2 1
      src/views/modules/kuaishouapp/account/advertisingGroup.vue
  29. 2 2
      src/views/modules/kuaishouapp/account/stepForm/stepModule/checkMatemal.vue
  30. 400 0
      src/views/modules/kuaishouapp/account/stepForm/stepModule/newSelectRegion.vue
  31. 51 0
      src/views/modules/kuaishouapp/account/stepForm/stepModule/region.js
  32. 183 176
      src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue
  33. 3 2
      src/views/modules/kuaishouapp/crossAccount/createCampaign.vue
  34. 2263 0
      src/views/modules/kuaishouapp/crossAccount/createCreative.vue
  35. 1674 123
      src/views/modules/kuaishouapp/crossAccount/createUnit.vue
  36. 43 0
      src/views/modules/kuaishouapp/crossAccount/data.json
  37. 196 0
      src/views/modules/kuaishouapp/crossAccount/templateModal.vue
  38. 236 59
      src/views/modules/workBench/designLeader/platForm.vue
  39. 2 2
      src/views/modules/workBench/designPeople/index.vue
  40. 246 60
      src/views/modules/workBench/designPeople/platForm.vue
  41. 1246 191
      src/views/modules/workBench/materialList.vue
  42. 1 0
      src/views/modules/workBench/operator/index.vue
  43. 335 138
      src/views/modules/workBench/operator/materialList.vue
  44. 250 56
      src/views/modules/workBench/operator/platForm.vue
  45. 1462 182
      src/views/modules/workBench/orderDetail.vue
  46. 43 105
      src/views/modules/workBench/orderList.vue
  47. 271 46
      src/views/modules/workBench/placeOrder.vue

+ 0 - 25
debug.log

@@ -1,25 +0,0 @@
-[0525/133323.308:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
-[0529/110148.397:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
-[0529/112937.608:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
-[0619/110835.729:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
-[0701/153438.192:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
-[0708/055752.148:ERROR:process_info.cc(375)] NtQuerySystemInformation SystemExtendedHandleInformation: {没锟斤拷锟姐够锟斤拷锟絵 没锟斤拷锟姐够锟斤拷锟斤拷锟斤拷锟节达拷锟斤拷页锟侥硷拷锟斤拷锟斤拷锟斤拷锟斤拷指锟斤拷锟侥诧拷锟斤拷锟斤拷 (0xc0000017)
-[0708/055807.088:ERROR:process_info.cc(359)] UncheckedAllocate
-[0713/163350.208:ERROR:file_io.cc(89)] ReadExactly: expected 36, observed 0
-[0716/000711.554:ERROR:process_reader_win.cc(123)] NtOpenThread: {无法访问} 过程已请求访问一对象,但未给访问权限。 (0xc0000022)
-[0716/000711.558:ERROR:exception_snapshot_win.cc(98)] thread ID 12948 not found in process
-[0716/000711.559:ERROR:process_reader_win.cc(123)] NtOpenThread: {无法访问} 过程已请求访问一对象,但未给访问权限。 (0xc0000022)
-[0716/000711.560:ERROR:exception_snapshot_win.cc(98)] thread ID 15736 not found in process
-[0716/000711.577:ERROR:process_reader_win.cc(123)] NtOpenThread: {无法访问} 过程已请求访问一对象,但未给访问权限。 (0xc0000022)
-[0716/000711.577:ERROR:exception_snapshot_win.cc(98)] thread ID 2072 not found in process
-[0716/000711.592:ERROR:process_reader_win.cc(123)] NtOpenThread: {无法访问} 过程已请求访问一对象,但未给访问权限。 (0xc0000022)
-[0716/000711.593:ERROR:exception_snapshot_win.cc(98)] thread ID 12744 not found in process
-[0716/000711.593:ERROR:process_reader_win.cc(123)] NtOpenThread: {无法访问} 过程已请求访问一对象,但未给访问权限。 (0xc0000022)
-[0716/000711.593:ERROR:exception_snapshot_win.cc(98)] thread ID 17220 not found in process
-[0716/000711.615:ERROR:process_reader_win.cc(123)] NtOpenThread: {无法访问} 过程已请求访问一对象,但未给访问权限。 (0xc0000022)
-[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

+ 7 - 0
src/api/actor.js

@@ -153,6 +153,13 @@ export function fileInsertV2(parameter) {
         data: parameter
     })
 }
+export function orderFileInsert(parameter) {
+    return axios({
+        url: "/platform/file/uploadVideo",
+        method: 'post',
+        data: parameter
+    })
+}
 
 
 export function fileEdit(parameter) {

+ 326 - 0
src/components/formComponents/Cascader.vue

@@ -0,0 +1,326 @@
+<style lang="scss">
+.hcst-cascader{
+    .el-cascader {
+        display: inline-block;
+        position: relative;
+        font-size: 14px;
+        height: 32px;
+    }
+    .el-input__inner{
+        height: 32px  !important;
+    }
+    .el-cascader__tags {
+        top: 64%;
+    }
+}
+
+</style>
+<template>
+  <div class="hcst-cascader">
+    <!-- <a-checkbox-group v-model="selectedVal" :disabled="disabled" style="width: 100%">
+      <a-checkbox
+        v-for="item of selectOption"
+        :label="item.label"
+        :key="item.value"
+        :value="item.value"
+        :class="{
+          item: true && userButton,
+          selection: selectedVal && selectedVal.indexOf(item.value) > -1 && userButton,
+          bgcolor: item.disabled,
+        }"
+        >{{ item.label }}</a-checkbox
+      >
+    </a-checkbox-group> -->
+
+    <!-- :show-all-levels="false"  :clearCheckedNodes='clearCheckedNodes'-->
+        <el-cascader
+        v-model='selectedVal'
+        :disabled="disabled"        
+        :props="props"
+        clearable
+        collapse-tags
+        
+        ></el-cascader>
+        <!-- {{selectedVal}} -->
+  </div>
+</template>
+
+<script>
+// import { dictionary } from '@/components/service/core/dictionary'
+import { isArray } from '@/utils/Tools'
+import { httpAction, getAction } from '@/api/manage'
+
+let id = 0;
+
+export default {
+  name: 'Cascader', // Cascader组件二次封装
+  props: {
+    userButton: {
+      type: Boolean,
+      default() {
+        return true
+      },
+    },
+    code: {
+      // 参数code
+      type: String,
+      default: '',
+    },
+    allValue: {
+      type: Boolean,
+      default() {
+        return false
+      },
+    },
+    options: {
+      // 外部传入的option 可替代请求项
+      type: Array,
+      default() {
+        return []
+      },
+    },
+    value: {
+      // v-model绑定值
+      type: [Number, Array, String],
+      default() {
+        return []
+      },
+    },
+    cascaderValue: {
+      // v-model绑定值
+      type: [Number, Array, String],
+      default() {
+        return []
+      },
+    },
+    label: {
+      // label 绑定值
+      type: [Array, String],
+      default: '',
+    },
+    radioStyle: {
+      // 是否复选框模拟单选效果
+      type: Boolean,
+      default: false,
+    },
+    disabled: {
+      // 是否禁用
+      type: Boolean,
+      default: false,
+    },
+    isLazy: {
+      // 是否禁用
+      type: Boolean,
+      default: false,
+    },
+  },
+  components: {},
+  data() {
+    return {
+        // selectOption: [],
+        totalData:[],
+        selectedVal:[],
+        props: {
+            multiple: true ,
+            // checkStrictly: true ,
+            emitPath:false,
+            lazy: this.isLazy,
+            lazyLoad :(node, resolve) =>{
+                // console.log(node,resolve)
+                const { level } = node;
+               
+                // const nodes = Array.from({ length: level + 1 })
+                //     .map(item => ({
+                //     value: ++id,
+                //     label: `选项${id}`,
+                //     leaf: level >= 2
+                //     }));
+                let params={}
+                if(node.root){
+                    params.level=1;
+                }else{
+                    params.parent=node.root?0:node.value
+                }
+                
+                getAction('/kuaishou/batch/getRegion',params).then(res=>{
+                    // console.log(res)
+                    
+                    const nodes =res.result.map(item => ({
+                        value: item.regionId,
+                        label: item.name,
+                        level:item.level,
+                        parent:item.parent,                        
+                        leaf: item.level >= 2
+                    }));
+                    if(!node.root&&node.level==1){
+                      if(this.totalData.length){
+                        let dataArr=[];
+                        dataArr=this.totalData.filter(item=>{
+                            return item.value==node.value
+                        });
+                        if(!dataArr.length){
+                          this.totalData.push({
+                            label:node.label,
+                            value:node.value,
+                            children:res.result.length
+                          })
+                        }
+                      }else{
+                        this.totalData.push({
+                          label:node.label,
+                          value:node.value,
+                          children:res.result.length
+                        })
+                      }
+                    }
+                    // console.log(this.totalData)
+                    // 通过调用resolve将子节点数据返回,通知组件数据加载完成
+                    resolve(nodes);
+                })
+                
+               
+            }
+        },
+    }
+  },
+  watch: {
+    
+    selectedVal(n, o) {
+      console.log(n,o)
+      if(n.length){
+          var retrunData = []
+          
+          if(n.length){
+             retrunData=JSON.parse(JSON.stringify(n))
+            this.totalData.forEach(element => {
+                let arr=[];
+                arr=n.filter(item=>{
+                  let number=(item+'').substr(0,2)
+                  // console.log(number)
+                  return element.value==number
+                })
+                if(arr.length==element.children ){
+                  
+                  retrunData=retrunData.filter(ele=>{
+                    return element.value!=(ele+'').substr(0,2)
+                  })
+                  console.log(retrunData)
+                  // this.selectedVal=[];
+                  retrunData=[
+                    ...retrunData,
+                    element.value,
+                    
+                  ]
+                }
+                
+              
+            });
+          }
+          console.log('retrunData',retrunData)
+          // this.$emit('input', val)
+          // this.$emit('change', val)
+          this.$emit('update:cascaderValue',retrunData)
+          // this.consoleFun('VALUE: ', val, 'LABEL:', label)
+      
+      }else{
+        this.$emit('update:cascaderValue',n)
+      }
+      
+      
+    },
+  },
+  // 
+  mounted() {
+    this.$nextTick(() => {
+      
+    })
+  },
+  methods: {
+    getOptions() {
+      // 获取字典项
+      getAction('/sys/dictItem/list', { dictId: this.code, pageSize: 1000, pageNo: 1 }).then((res) => {
+        if (res.success && isArray(res.result.records)) {
+          var data = res.result.records
+          data = data.map((item) => {
+            return {
+              label: item.itemText,
+              value: item.itemValue,
+              ...item,
+            }
+          })
+          if (this.allValue) {
+            data.unshift({ label: '不检查', value: 'unlimited' })
+            if (this.value == '' || this.value == '' || this.value == null || this.value.length == 0) {
+              this.selectedVal = ['unlimited']
+            }
+          } else {
+            if (this.value == '' || this.value == '' || this.value == null || this.value.length == 0) {
+              this.selectedVal = []
+            }
+          }
+          this.selectOption.push(...data)
+        }
+      })
+    },
+    selectChange(val) {
+      
+        // 多选
+        var retrunData = []
+        
+        console.log(val)
+        
+        if(val.length){
+          this.totalData.forEach(element => {
+              let arr=[];
+              arr=val.filter(item=>{
+                let number=(item+'').substr(0,2)
+                // console.log(number)
+                return element.value==number
+              })
+              if(arr.length==element.children ){
+                let otherArr=[]
+                otherArr=this.selectedVal.filter(ele=>{
+                  return element.value!=(ele+'').substr(0,2)
+                })
+                console.log(otherArr)
+                // this.selectedVal=[];
+                retrunData=[
+                  ...retrunData,
+                  element.value,
+                  ...otherArr,
+                ]
+                
+              }else{
+                retrunData=[
+                  ...retrunData,
+                  ...arr
+                ]
+              }
+             
+          });
+        }
+        console.log('retrunData',retrunData)
+        // this.$emit('input', val)
+        // this.$emit('change', val)
+        this.$emit('update:cascaderValue',retrunData)
+        // this.consoleFun('VALUE: ', val, 'LABEL:', label)
+      
+    },
+    emitChange(...args) {
+      // emit change事件
+      this.$emit('change', ...args)
+    },
+    consoleFun(...args) {
+      // 打印信息
+      if (process.env.NODE_ENV == 'development') {
+        console.log(...args)
+      }
+    },
+
+    // clearCheckedNodes(){
+
+    // },
+  },
+}
+</script>
+

+ 263 - 286
src/components/formComponents/toutiaoTime.vue

@@ -3,334 +3,311 @@
     <table class="time_table table" v-on:mouseleave="mouseleave">
       <thead>
         <tr>
-          <th rowspan="2" style="width:120px">日期/时间(时)</th>
+          <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>
+          <th class="unselectable" v-for="(num, index) in numData" :key="index" style="width: 30px">{{ 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"
+          <td
+            v-for="(timeItem, key) in options.time"
+            :key="key"
             :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>
+            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 style="height:200px;overflow:auto">
+      <span v-for="(item, index) of dataString" :key="index">
+        <a-tag v-if="item" closable :afterClose="() => handleClose(index)">
+          {{ setItemDate(index) }}
+        </a-tag>
+      </span>
+    </div> -->
   </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
-        }
-      }
+export default {
+  name: 'calendar-table',
+  props: {
+    scheduleTime: {
+      type: String,
+      default() {
+        return '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+      },
     },
-    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
+  },
+  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],
+      dateTime: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
+      timeData: [
+        {
+          date: '周一',
+          time: [],
+        },
+        {
+          date: '周二',
+          time: [],
+        },
+        {
+          date: '周三',
+          time: [],
+        },
+        {
+          date: '周四',
+          time: [],
+        },
+        {
+          date: '周五',
+          time: [],
         },
-        dataString: ''
+        {
+          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,
+      })
     },
-    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)
-          }
+    mouseover: function (index, key) {
+      // x 垂直方向  y 水平方向
+      if (this.selectFlag) {
+        if (index >= this.max.x) {
+          this.max.x = index
         }
-        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)
-            }
-          }
+        if (key >= this.max.y) {
+          this.max.y = key
         }
-      },
-      mouseup: function (index, key) {
         var start = {
           x: this.selectStart[0].index,
-          y: this.selectStart[0].key
+          y: this.selectStart[0].key,
         }
         var end = {
           x: index,
-          y: key
+          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)
+          }
         }
         /* 渲染选中的区域 */
-        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
-        //     }
+        // 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)
         //   }
-        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
+        // }
+        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.$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
+      }
+    },
+    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 < 24) {
-          return '周一' + i + ':00~' + (i + 1) + ':00'
+          this.timeData[0].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         } else if (i < 48 && i >= 24) {
-          return '周二' + (i - 24) + ':00~' + (i - 23) + ':00'
+          this.timeData[1].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         } else if (i < 72 && i >= 48) {
-          return '周三' + (i - 48) + ':00~' + (i - 47) + ':00'
+          this.timeData[2].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         } else if (i < 96 && i >= 72) {
-          return '周四' + (i - 72) + ':00~' + (i - 71) + ':00'
+          this.timeData[3].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         } else if (i < 120 && i >= 96) {
-          return '周五' + (i - 96) + ':00~' + (i - 95) + ':00'
+          this.timeData[4].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         } else if (i < 144 && i >= 120) {
-          return '周六' + (i - 120) + ':00~' + (i - 119) + ':00'
+          this.timeData[5].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         } 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
-            })
-          }
+          this.timeData[6].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         }
       }
     },
-    watch: {
-      scheduleTime: {
-        immediate: true, // immediate选项可以开启首次赋值监听
-        handler(newVal, oldVal) {
+  },
+  watch: {
+    scheduleTime: {
+      immediate: true, // immediate选项可以开启首次赋值监听
+      handler(newVal, oldVal) {
+        if (newVal == '' || newVal == null || newVal == undefined) {
+          // this.scheduleTime=oldVal
+          this.$emit('update:scheduleTime', oldVal)
+        } else {
           this.init()
         }
-      }
-    }
-  }
+      },
+    },
+  },
+}
 </script>
 
 <style lang="scss" scoped>
-  .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 !important;
-    -webkit-user-select: none !important;
-    -moz-user-select: none !important;
-    -ms-user-select: none !important;
-    user-select: none !important;
-  }
-</style>
+.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: 30px !important;
+  height: 20px;
+}
+.active_select {
+  background: cornflowerblue;
+}
+.active_select_move {
+  background: aqua;
+}
+* {
+  -webkit-touch-callout: none !important;
+  -webkit-user-select: none !important;
+  -moz-user-select: none !important;
+  -ms-user-select: none !important;
+  user-select: none !important;
+}
+</style>

+ 12 - 0
src/components/layouts/TabLayout.vue

@@ -119,6 +119,12 @@
         localStorage.removeItem("advertisingGroup")
         localStorage.removeItem("advertisingGroupKey")
       }
+      if (!this.linkList.includes("/crossAccount/createCreative")) {
+        localStorage.removeItem("crossAccountUnit")
+      }
+      if (!this.linkList.includes("/crossAccount/createUnit")) {
+        localStorage.removeItem("crossAccountCampaign")
+      }
     },
     watch: {
       '$route': function (newRoute) {
@@ -164,6 +170,12 @@
           localStorage.removeItem("originality")
           localStorage.removeItem("originalityKey")
         }
+        if (!this.linkList.includes("/crossAccount/createCreative")) {
+        localStorage.removeItem("crossAccountUnit")
+        }
+        if (!this.linkList.includes("/crossAccount/createUnit")) {
+          localStorage.removeItem("crossAccountCampaign")
+        }
       },
       'activePage': function (key) {
         let index = this.linkList.lastIndexOf(key)

+ 1 - 2
src/components/uploadFile.vue

@@ -96,7 +96,6 @@ export default {
       },
     },
     value: {
-      type: [String, Array],
       required: true,
     },
     size: {
@@ -142,7 +141,7 @@ export default {
     value: {
       immediate: true,
       handler(n, o) {
-        if (this.fileList.length == 0) {
+        if (this.fileList&&this.fileList.length == 0) {
           if (typeof n == 'object') {
             this.fileList = n.map((item, index) => {
               return {

+ 1 - 0
src/views/modules/BatchCreate/linkMultiSelect.vue

@@ -607,6 +607,7 @@
       border: 1px solid #ccc;
       border-radius: 5px;
       overflow-x: auto;
+      overflow-y: hidden;
     }
 
     .rightBox {

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

@@ -150,7 +150,8 @@
                 <template slot="title">
                   日期选择具体某一天之后,这里可以查看具体的时间段数据哦~
                 </template>
-                  <a-select  placeholder="请选择具体时间段" style="width: 160px" @change="timeChange"  v-model='timeDefaultValue'  label-in-value class="selectTime" v-show="dateValue[0].format('YYYY-MM-DD')==dateValue[1].format('YYYY-MM-DD')" :disabled='accountId.length==0'>
+                <!-- v-show="dateValue[0].format('YYYY-MM-DD')==dateValue[1].format('YYYY-MM-DD')" -->
+                  <a-select  placeholder="请选择具体时间段" style="width: 160px" @change="timeChange"  v-model='timeDefaultValue'  label-in-value class="selectTime" v-show="dateValue[1].format('YYYY-MM-DD')==moment().format('YYYY-MM-DD')" :disabled='accountId.length==0'>
                     <a-select-option v-for="(i,index) in 24 " :key="index" :value="index" >{{index>=10 ? `00:00-${index}:59` :`00:00-0${index}:59`}}</a-select-option>
                   </a-select>
               </a-tooltip>

+ 2 - 2
src/views/modules/Statistics/accountReport.vue

@@ -150,7 +150,7 @@
                 <template slot="title">
                   日期选择具体某一天之后,这里可以查看具体的时间段数据哦~
                 </template>
-                  <a-select  placeholder="请选择具体时间段" style="width: 160px" @change="timeChange"  v-model='timeDefaultValue'  label-in-value class="selectTime" v-show="dateValue[0].format('YYYY-MM-DD')==dateValue[1].format('YYYY-MM-DD')" :disabled='accountId.length==0'>
+                  <a-select  placeholder="请选择具体时间段" style="width: 160px" @change="timeChange"  v-model='timeDefaultValue'  label-in-value class="selectTime" v-show="dateValue[1].format('YYYY-MM-DD')==moment().format('YYYY-MM-DD')" :disabled='accountId.length==0'>
                     <a-select-option v-for="(i,index) in 24 " :key="index" :value="index" >{{index>=10 ? `00:00-${index}:59` :`00:00-0${index}:59`}}</a-select-option>
                   </a-select>
               </a-tooltip>
@@ -444,7 +444,7 @@ export default {
 
   data() {
     return {
-      
+      todayDate:moment(),
       moment,
       //账户的数据
       accountId:[],

+ 32 - 1
src/views/modules/Statistics/components/Treeselect.vue

@@ -188,7 +188,38 @@ export default {
             })
           }
         })
-      } else {
+      } else if(this.reqUrl == '/ctop/projectMember/getProjectAccountByUserId'){
+          getAction(this.reqUrl, {
+            mediaType: this.request,
+          }).then((res) => {
+            if (res.code == 0) {
+              if (res.result.length > 0) {
+                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+'_'+element.project.projectName;
+                            this.options[index].children[i].id=ele.accountId;
+                            this.options[index].children[i].key=ele.accountId;
+                        })
+                          
+                      }                           
+                  }      
+                });
+              } else {
+                this.showLoading = '暂无数据'
+              }
+            }
+          })
+      }else {
         getAction(this.reqUrl, {
           userId: this.userInfo().id,
         }).then((res) => {

+ 227 - 114
src/views/modules/Statistics/imageStatics/imageCostReport.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="vsummary">
+  <div class="imageCostReport">
       <div class="tabspane">
         <a-tabs v-model="tabKeys" @change="tabChange">
             <a-tab-pane :key="1" tab="头条">           
@@ -75,7 +75,9 @@
         style="word-break: break-all;"
         >
         <div slot="imageUrl" slot-scope="text,records">
+          <span v-if="text=='总计'">{{text}}</span>
             <img
+            v-else
             :src="text"
             alt
             style="width:80px"
@@ -169,15 +171,15 @@ const TTcolumns = [
     width: 200,
     fixed: 'left'
   },
-    {
-    title:'相关平面',
-    dataIndex:'operation',
-    key:'operation',
-    scopedSlots: { customRender: 'operation' },
-    align: 'center',
-    width:150,
-    fixed: 'left'
-  },
+  //   {
+  //   title:'相关平面',
+  //   dataIndex:'operation',
+  //   key:'operation',
+  //   scopedSlots: { customRender: 'operation' },
+  //   align: 'center',
+  //   width:150,
+  //   fixed: 'left'
+  // },
   
   {
     title: '消耗(元)',
@@ -269,15 +271,15 @@ const KScolumns = [
     width: 200,
     fixed: 'left'
   },
-    {
-    title:'相关平面',
-    dataIndex:'operation',
-    key:'operation',
-    scopedSlots: { customRender: 'operation' },
-    align: 'center',
-    width:150,
-    fixed: 'left'
-  },
+  //   {
+  //   title:'相关平面',
+  //   dataIndex:'operation',
+  //   key:'operation',
+  //   scopedSlots: { customRender: 'operation' },
+  //   align: 'center',
+  //   width:150,
+  //   fixed: 'left'
+  // },
   
   {
     title: '消耗',
@@ -432,24 +434,30 @@ export default {
         accountID:undefined,
         ipagination: {
             current: 1,
-            pageSize: 10,
+            pageSize: 11,
             //   pageSizeOptions: ['10', '20', '30'],
             showTotal: (total, range) => {
-                return range[0] + "-" + range[1] + " 共" + total + "条"
+              console.log(total,range)
+              if(range[0]>1){
+                return (range[0]-this.ipagination.current+1) + "-" + (range[1]-this.ipagination.current) + " 共" + (total-Math.ceil(this.pageTotal/10)) + "条"
+              }else{
+                return range[0] + "-" + (range[1]-1) + " 共" + (total-Math.ceil(this.pageTotal/10)) + "条"
+              }
+                
             },
             showQuickJumper: true,
-            showSizeChanger:true,
-            pageSizeOptions: ['10', '30', '50'],
+            // showSizeChanger:true,
+            // pageSizeOptions: ['10', '30', '50'],
             total: 0,
-            onChange: (current, pageSize) => {
-                // 切换分页时的回调,
-                // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
-                this.ipagination.current = current;
-                this.ipagination.pageSize= pageSize;
-            }
+            // onChange: (current, pageSize) => {
+            //     // 切换分页时的回调,
+            //     // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            //     this.ipagination.current = current;
+            //     this.ipagination.pageSize= pageSize;
+            // }
         },
 
-
+        pageTotal:0,
 
         relevantPeopleVisible:false,
       relevantPeopleData:{},
@@ -490,7 +498,17 @@ export default {
       //
       form: [],
       videoID: '',
-      timedata: []
+      timedata: [],
+      bytedanceUrl:{
+        cost:'/image/bytedance/cost',
+        totalCost:'image/bytedance/costTotal'
+      },
+      kuaishouUrl:{
+        cost:'/image/kuaishou/cost',
+        totalCost:'image/kuaishou/costTotal',
+      },
+
+      totalCost:{},
     }
   },
   // mixins: [JeecgListMixin],
@@ -503,19 +521,20 @@ export default {
         tabChange(val){
           this.accountIds=[];
           this.data=[]
-          this.ipagination.current=1
+          this.ipagination.current=1;
+          this.totalCost={}
           if(this.tabKeys==1){
                 this.treeData=this.TTaccountList;
                 this.columns=this.TTcolumns;
                 this.target='cost';
                 this.scrollX=0;
-                this.HttpPost('/image/bytedance/cost')
+                this.getTableData(this.bytedanceUrl)
             }else if (this.tabKeys==2){
                 this.treeData=this.KSaccountList;
                 this.columns=this.KScolumns
                 this.target='cost'
                 this.scrollX=2500
-                this.HttpPost('/image/kuaishou/cost')
+                this.getTableData(this.kuaishouUrl)
             } 
         },
         treeChange(val) {
@@ -571,8 +590,8 @@ export default {
         })
         },
         sort(pagination, filters, sorter, { currentDataSource }){
-            console.log(pagination, filters, sorter)
-            if(sorter.order == 'ascend'){            
+          console.log(pagination, filters, sorter)
+          if(sorter.order == 'ascend'){            
               this.order='asc'
               this.target=sorter.columnKey;
           }else if(sorter.order == 'descend'){
@@ -584,11 +603,11 @@ export default {
           }   
             this.ipagination.current=pagination.current
             this.ipagination.pageSize= pagination.pageSize;
-
+            
             if(this.tabKeys==1){               
-                this.HttpPost('/image/bytedance/cost')
+                this.getTableData(this.bytedanceUrl)
             }else if (this.tabKeys==2){
-                this.HttpPost('/image/kuaishou/cost')
+                this.getTableData(this.kuaishouUrl)
             } 
         },
         moment,
@@ -615,12 +634,102 @@ export default {
         searchRes() {
             this.data=[];
             this.ipagination.current=1
+            this.totalCost={};
             if(this.tabKeys==1){               
-                this.HttpPost('/image/bytedance/cost')
+                this.getTableData(this.bytedanceUrl)
             }else if (this.tabKeys==2){
-                this.HttpPost('/image/kuaishou/cost')
+                this.getTableData(this.kuaishouUrl)
             } 
         },
+
+        getTableData(type){
+            this.loading=true
+            // this.data=[];
+            let HttpPost = new Promise((resolve, reject) => {
+              postAction(type.cost, {
+                startDate: this.dateValue[0].format('YYYY-MM-DD'),
+                endDate: this.dateValue[1].format('YYYY-MM-DD'),        
+                code: this.videoID,
+                pageNumber:this.ipagination.current,
+                pageSize:this.ipagination.pageSize-1,
+                accountList:this.accountIds,
+                order:this.order,
+                target:this.target,
+              }).then(res => {
+                  let resArr = []
+                  
+                  if (res.success) {
+                    resArr = res.data.list.map((item,index)=>{
+                        return {
+                            ...item,
+                            key:item.signature
+                        }
+                    })
+                    this.pageTotal=res.data.total;
+                    this.ipagination.total = res.data.total+Math.ceil(res.data.total/10)
+                    
+                    resolve(resArr)
+                  }else{
+                      
+                      reject('失败')
+                  }
+              })
+              
+            })
+
+            let totalCostHttp = new Promise((resolve, reject) => {
+              if(this.totalCost.key){
+                  resolve(this.totalCost)
+              }else{
+                postAction(type.totalCost, {
+                  startDate: this.dateValue[0].format('YYYY-MM-DD'),
+                  endDate: this.dateValue[1].format('YYYY-MM-DD'),        
+                  code: this.videoID,
+                  pageNumber:this.ipagination.current,
+                  pageSize:this.ipagination.pageSize,
+                  accountList:this.accountIds,
+                }).then(res => {
+                    console.log(res)
+                    let resArr = []
+                    
+                    if (res.success) {
+                      resArr = res.data;
+                      resArr.imageUrl='总计';
+                      resArr.projectName='-';
+                      resArr.signature='-';
+                      resArr.key='total';
+                      this.totalCost=resArr;
+                      resolve(resArr)
+                    }else{
+                        
+                        reject('失败')
+                    }
+                })
+              }
+              
+            })
+
+
+            Promise.all([HttpPost, totalCostHttp]).then((result) => {
+              console.log(result);             //['成功了', 'success']
+              this.data=[];
+              
+              
+              if(result[0].length){
+                this.data=[
+                  result[1],
+                  ...result[0]
+                ]
+              }
+              
+              console.log(this.data,'---------------------------------------------')
+              this.$forceUpdate()
+              this.loading=false;
+            }).catch((error) => {
+              console.log(error)
+            })
+        },
+
         loadShow(){
             show++
             if(this.data.length>0){
@@ -630,80 +739,73 @@ export default {
             }
         },
         //网络请求table数据函数
-        HttpPost(url){
-          this.loading=true;
-          this.data=[]
-          show = 0
-          postAction(url, {
-              startDate: this.dateValue[0].format('YYYY-MM-DD'),
-              endDate: this.dateValue[1].format('YYYY-MM-DD'),        
-              code: this.videoID,
-              pageNumber:this.ipagination.current,
-              pageSize:this.ipagination.pageSize,
-              accountList:this.accountIds,
-              order:this.order,
-              target:this.target,
-          }).then(res => {
-              let resArr = []
-              this.loading=false;
-              if (res.success) {
-              //   let result = res.result
-              //   this.data.push({ ...result, key: 1 })
-              //   result.map((item, index) => {
-              //     item.key = index
-              //   })
-              this.data = res.data.list.map((item,index)=>{
-                  return {
-                      ...item,
-                      key:index
-                  }
-              })
-              this.ipagination.total = res.data.total
-              this.loading = false
+        // HttpPost(url){
+        //   this.loading=true;
+        //   this.data=[]
+        //   show = 0
+        //   postAction(url, {
+        //       startDate: this.dateValue[0].format('YYYY-MM-DD'),
+        //       endDate: this.dateValue[1].format('YYYY-MM-DD'),        
+        //       code: this.videoID,
+        //       pageNumber:this.ipagination.current,
+        //       pageSize:this.ipagination.pageSize,
+        //       accountList:this.accountIds,
+        //       order:this.order,
+        //       target:this.target,
+        //   }).then(res => {
+        //       let resArr = []
+        //       this.loading=false;
+        //       if (res.success) {
+        //       this.data = res.data.list.map((item,index)=>{
+        //           return {
+        //               ...item,
+        //               key:index
+        //           }
+        //       })
+        //       this.ipagination.total = res.data.total
+        //       this.loading = false
               
-              }else{
-                  this.loading = false
-              }
-          })
-        },
+        //       }else{
+        //           this.loading = false
+        //       }
+        //   })
+        // },
         //导出报表
         exportExcel() {
           this.exportExcelIsOk=true;
         
-        // let column = this.columns.map((item, index) => {
-        //     return item.dataIndex
-        // })
-        //     let columns=['url',...column]
-        let url=''
-        if(this.tabKeys==1){
-          url='/image/bytedance/cost/export'
-        }else{
-          url='/image/kuaishou/cost/export'
-        }
+          // let column = this.columns.map((item, index) => {
+          //     return item.dataIndex
+          // })
+          //     let columns=['url',...column]
+          let url=''
+          if(this.tabKeys==1){
+            url='/image/bytedance/cost/export'
+          }else{
+            url='/image/kuaishou/cost/export'
+          }
             
-        downFilePost(url, {
-              
+          downFilePost(url, {              
               startDate: this.dateValue[0].format('YYYY-MM-DD'),
               endDate: this.dateValue[1].format('YYYY-MM-DD'),        
               code: this.videoID,
               accountList:this.accountIds,
               order:this.order,
               target:this.target,
-        }).then(res => {
-         
-            let blob = new Blob([res], {
-              type:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
-            })
-            let downloadElement = document.createElement('a')
-            let href = window.URL.createObjectURL(blob) //创建下载的链接
-            downloadElement.href = href
-            downloadElement.download =  '图片消耗.xlsx' //下载后文件名
-            document.body.appendChild(downloadElement)
-            downloadElement.click() //点击下载
-            document.body.removeChild(downloadElement) //下载完成移除元素
-            window.URL.revokeObjectURL(href) //释放掉blob对象
-            this.exportExcelIsOk=false;
-        })
+            }).then(res => {        
+                let blob = new Blob([res], {
+                  type:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+                })
+                let downloadElement = document.createElement('a')
+                let href = window.URL.createObjectURL(blob) //创建下载的链接
+                downloadElement.href = href
+                downloadElement.download =  '图片消耗.xlsx' //下载后文件名
+                document.body.appendChild(downloadElement)
+                downloadElement.click() //点击下载
+                document.body.removeChild(downloadElement) //下载完成移除元素
+                window.URL.revokeObjectURL(href) //释放掉blob对象
+                this.exportExcelIsOk=false;
+          })
         },
 
         //日期选择回调
@@ -800,12 +902,17 @@ export default {
 
 
   },
-  // watch:{
-  //     'ipagination.current':function(n,o){
-  //         console.log(n,o)
-  //         this.HttpPost()
-  //     }
-  // },
+  watch:{
+      // 'ipagination.current':function(n,o){
+      //     console.log(n,o)
+          
+      //       if(this.tabKeys==1){               
+      //           this.getTableData(this.bytedanceUrl)
+      //       }else if (this.tabKeys==2){
+      //           this.getTableData(this.kuaishouUrl)
+      //       } 
+      // }
+  },
  
   filters: {
     
@@ -905,10 +1012,11 @@ export default {
     dateValue:{
         deep:true,
         handler(){
+          this.totalCost={};
             if(this.tabKeys==1){               
-                this.HttpPost('/image/bytedance/cost')
+                this.getTableData(this.bytedanceUrl)
             }else if (this.tabKeys==2){
-                this.HttpPost('/image/kuaishou/cost')
+                this.getTableData(this.kuaishouUrl)
             } 
         }
       }
@@ -918,7 +1026,8 @@ export default {
     
    
    
-    this.HttpPost('/image/bytedance/cost')
+    // this.HttpPost('/image/bytedance/cost')
+    this.getTableData(this.bytedanceUrl)
     this.accountHttp(1);
     this.accountHttp(2);
     
@@ -930,18 +1039,22 @@ export default {
 // .ant-table .ant-table-fixed-left .ant-table-thead {
 //   height: 108px !important ;
 // }
-.vsummary{
+.imageCostReport{
   .ant-table .ant-table-thead .ant-table-header-column .ant-table-column-title {
     // display:block;
     white-space: normal;
     word-break: break-all;
   }
+  
+  .ant-table-tbody .ant-table-row-level-0:first-child{
+    background: #e8e9ea;
+  }
 }
 
 </style>
 
 <style lang="scss" scoped>
-.vsummary {
+.imageCostReport {
   width: 100%;
   height: 100%;
   background:  #fff;

+ 44 - 2
src/views/modules/advertiser/UserAllocationList.vue

@@ -98,6 +98,11 @@
 
           <a-switch v-model="record.accountStatus == 0 ? true : false" @change="onChangeSwitch(record)" />
         </span>
+        <span slot="deleteComment" slot-scope="text, record">
+          <!-- {{ text == 0 ? '启用' : '禁用' }} -->
+
+          <a-switch v-model="record.deleteComment == 0 ? true : false" @change="deleteCommentChangeSwitch(record)" />
+        </span>
         <span slot="mediaId" slot-scope="text">{{ text == 1 ? '头条' : '快手' }}</span>
 
         <div slot="authName" slot-scope="text, record">
@@ -107,18 +112,33 @@
         </div>
 
         <span slot="action" slot-scope="text, record">
-          <a @click="account(record)">转移项目</a>
+          <!-- <a @click="account(record)">转移项目</a>
 
           <a-divider type="vertical" />
           <a @click="project(record)">转让账户</a>
 
-          <a-divider type="vertical" />
+          <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>删除</a>
           </a-popconfirm>
+          <a-divider type="vertical" />
+          <a-dropdown :trigger="['click']">
+            <a class="ant-dropdown-link" @click="e => e.preventDefault()">
+              更多 <a-icon type="down" />
+            </a>
+            <a-menu slot="overlay">
+              <a-menu-item key="0">
+                <a @click="account(record)">转移项目</a>
+              </a-menu-item>
+              <a-menu-item key="1">
+                <a @click="project(record)">转让账户</a>
+              </a-menu-item>
+             
+            </a-menu>
+          </a-dropdown>
         </span>
       </a-table>
     </div>
@@ -368,9 +388,19 @@ export default {
           align: 'center',
         },
         {
+          title: '是否开启删评论',
+          dataIndex: 'deleteComment',
+          align: 'center',
+          width:80,
+          scopedSlots: {
+            customRender: 'deleteComment',
+          },
+        },
+        {
           title: '操作',
           dataIndex: 'action',
           align: 'center',
+          width: 160,
           scopedSlots: {
             customRender: 'action',
           },
@@ -449,6 +479,18 @@ export default {
         }
       })
     },
+    deleteCommentChangeSwitch(record){
+      console.log(record)
+      var params = {}
+      params.accountId = record.accountId
+      params.switchType = record.deleteComment ==0 ? 1 : 0
+
+      postAction('/ctop/userAllocation/onOrOffDeleteComment', qs.stringify(params)).then((res) => {
+        if (res.success) {
+          this.loadData()
+        }
+      })
+    },
     getParticipateList() {
       getAction('/ctop/projectMember/participateList', {
         userId: this.userInfo().id,

+ 1 - 0
src/views/modules/advertiser/modules/projectListModal.vue

@@ -107,6 +107,7 @@
                 <a-select-option :value="191">首日ROI</a-select-option>
                 <a-select-option :value="396">注册优化目标</a-select-option>
                 <a-select-option :value="717">广告观看事件</a-select-option>
+                <a-select-option :value="700">唤起应用</a-select-option>
               </a-select>
             </a-form-item>
           </div>

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


+ 338 - 0
src/views/modules/autoLaunch/components/MultiCheckBox.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="multiCheckbox">
+    <div class="linkMulti_list" >
+      <div class="title">{{title}}</div>
+      <ul class="linkMulti_list_one">
+        <li class="checkAll" ref="checkAllBox">
+          <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange" :data-layers="curLayerNum"   >全选</a-checkbox>
+        </li>
+        <li @click.stop="listItemClick($event,item)" v-for="(item,index) in listArr" :key="index"
+          :data-layers="curLayerNum" ref="checkList">
+          <a-checkbox @change="onChange($event,item,index)" :value="item.code" :checked="item.checked"
+            @click.stop="listItemClick($event,item)" :indeterminate="item.indeterminates" >{{item.name}}</a-checkbox>
+          <!-- <span>{{item.name}}</span>                        -->
+          <span class="more" v-show="item.hasChild">
+            <a-icon type="right" />
+          </span>
+        </li>
+      </ul>
+    </div>
+    <!-- <MultiCheckBox class="childClass"  :title='currentItem.name'  :listArr='currentItem.children'  v-if="currentItem" :curLayerNum='currentLayerNum'  />      -->
+  </div>
+</template>
+
+<script>
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+  export default {
+    name: 'MultiCheckBox',
+    props: {
+      title: {
+        type: String
+      },
+      listArr: {
+        type: Array,
+        default () {
+          return []
+        }
+      },
+      curLayerNum: {
+        type: Number,
+        default () {
+          return 1
+        }
+      },
+      parentChecked: {
+        type: Boolean,
+        default () {
+          return false
+        }
+      },
+      indeterminates:{
+          type:Boolean,
+          default(){
+              return false
+          }
+      }
+    },
+    data() {
+      return {
+        checkedList: [],
+        indeterminate: false,
+        checkAll: false,
+        plainOptions: [],
+        layersNum: 0, //控制层级
+        currentLayerNum: 0, //当前层级是多少层,
+        currentItem: null,
+        labelList:[],//选中的文字的样式
+      }
+    },
+    watch: {
+      checkedList: function (n, o) {
+      // this.labelList=[];
+      //   this.checkedList.forEach((item)=>{
+      //     this.listArr.forEach((ele,index)=>{
+      //       if(ele.code==item){
+      //         this.labelList.push(ele.name)
+      //       }
+      //     })
+      //  }) 
+     },
+      listArr:{
+          handler(n, o) {
+              this.plainOptions=[];
+              this.checkedList=[];
+            //   console.log(n,o,'------')
+              this.listArr.forEach(element => {
+                this.plainOptions.push(element.value)
+                if(element.checked){
+                    let num = this.checkedList.indexOf(element.value)
+                    if (num == -1) {
+                        this.checkedList.push(element.value);
+                        this.labelList.push(element.name);
+                        // console.log(this.checkedList,'--',this.curLayerNum)
+                    }                
+                }else{
+                    let num = this.checkedList.indexOf(element.value)
+                    if (num > -1) {
+                        this.checkedList.splice(num, 1)
+
+                    }
+                    let n=this.labelList.indexOf(element.name)
+                    if (n > -1) {
+                        this.labelList.splice(n, 1)
+                    }
+                }
+            });
+           
+            // console.log(this.checkedList.length,this.plainOptions.length)
+            // console.log(this.checkedList,this.plainOptions.length)
+
+            this.indeterminate = !!this.checkedList.length && this.checkedList.length < this.plainOptions.length
+            this.checkAll = this.checkedList.length === this.plainOptions.length && this.plainOptions.length!=0
+
+            this.$emit('getCheckedList',{
+              curLayerNum:this.curLayerNum,
+              checkList:this.checkedList,
+              currentList:this.curLayerNum>1? this.listArr : []
+            })
+          },
+            deep: true
+      },
+
+      parentChecked: {
+        handler(n, o) {
+        //   console.log(n, o, '--parentChecked', this.curLayerNum,this.checkedList,this.plainOptions)
+          if (n) {
+            this.checkAll = true
+            this.checkedList=[];
+            this.listArr.forEach((item, index) => {
+                item.checked = n
+                let num = this.checkedList.indexOf(item.value)
+                if (num == -1) {
+                    this.checkedList.push(item.value);
+                }
+             
+
+            })
+          } else if (n == false) {
+            this.checkAll = false
+            // this.listArr.forEach((item, index) => {
+            //   item.checked = n
+            // })
+            this.checkedList = []
+          }
+        },
+        
+        deep: true,
+        immediate: true
+      }
+    },
+    methods: {
+       onChange(e, item, index) {
+        // console.log(e.target,item)
+
+        if (e.target.checked) {
+          // item.checked=true;
+          this.listArr.forEach((ele, i) => {
+            if (index == i) {
+              this.$set(ele, 'checked', e.target.checked)
+              this.$set(ele, 'indeterminates',false)
+              this.checkedList.push(e.target.value)
+            }
+          })
+        } else {
+          this.listArr.forEach((ele, i) => {
+            if (index == i) {
+              this.$set(ele, 'checked', e.target.checked)
+              
+            }
+          })
+
+          let num = this.checkedList.indexOf(e.target.value)
+          if (num > -1) {
+            this.checkedList.splice(num, 1)
+          }
+        }
+        this.indeterminate = !!this.checkedList.length && this.checkedList.length < this.plainOptions.length
+        this.checkAll = this.checkedList.length === this.plainOptions.length
+        // this.listItemClick(e,item);
+      },
+      onCheckAllChange(e) {
+              
+        console.log(event)
+        Object.assign(this, {
+          checkedList: e.target.checked ? this.plainOptions : [],
+          indeterminate: false,
+          checkAll: e.target.checked
+        })
+        console.log(this.checkedList)
+        if (this.checkedList.length) {
+          this.listArr.forEach(item => {
+            this.$set(item, 'checked', true)
+            this.$set(item, 'indeterminates', false)
+          })
+        } else {
+          this.listArr.forEach(item => {
+            this.$set(item, 'checked', false)
+            this.$set(item, 'indeterminate', false)
+          })
+        }
+      
+
+        this.listItemClick(event,{
+            name:'全选',
+            value:'all',
+            checked:e.target.checked,
+            indeterminates:false,
+            parentCode:this.listArr[0].parentCode
+        })
+      },
+      
+      listItemClick(event, item) {
+        // console.log(item)
+        
+        this.$emit('getItemData', {
+          clickObj: event.target,
+          data: item,
+          curLayerNum:this.curLayerNum,
+          checkList:this.checkedList,
+          plainOptions:this.plainOptions,
+          
+        })
+      },
+     
+    },
+    mounted() {
+      this.currentLayerNum = this.curLayerNum
+
+      this.listArr.forEach(element => {
+        this.plainOptions.push(element.value)
+        // console.log(this.plainOptions)
+      })
+ 
+    
+       console.log('zhixingle yici')
+      if (this.$refs.checkList) {
+        let refsCheckListArr = Array.from(this.$refs.checkList)
+        refsCheckListArr.forEach((item, index) => {
+          let nodeArr = Array.from(item.children[0].children)
+          // console.log(nodeArr)
+          nodeArr.forEach((ele, i) => {
+            if (i == 0) {
+              let nodeArr2 = Array.from(ele.children)
+            //   console.log(nodeArr2)
+              nodeArr2.forEach(element => {
+                element.dataset['layers'] = this.curLayerNum
+              })
+            } else {
+              ele.dataset['layers'] = this.curLayerNum
+            }
+          })
+        })
+      }
+
+      if(this.$refs.checkAllBox){
+        //   console.log(this.$refs.checkAllBox)
+          let refsCheckAllArr = Array.from(this.$refs.checkAllBox)
+            refsCheckAllArr.forEach((item, index) => {
+          let nodeArr = Array.from(item.children[0].children)
+          // console.log(nodeArr)
+          nodeArr.forEach((ele, i) => {
+            if (i == 0) {
+              let nodeArr2 = Array.from(ele.children)
+            //   console.log(nodeArr2)
+              nodeArr2.forEach(element => {
+                element.dataset['layers'] = this.curLayerNum
+              })
+            } else {
+              ele.dataset['layers'] = this.curLayerNum
+            }
+          })
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .multiCheckbox {
+    width: 100%;
+    height: 300px;
+
+    ul,
+    li {
+      margin: 0;
+      padding: 0;
+      list-style: none;
+    }
+
+    .linkMulti_list {
+      // padding: 5px 0px;
+      display: inline-block;
+      width: 100%;
+      height: 100%;
+      box-sizing: border-box;
+      overflow: hidden;
+
+      .title {
+        height: 36px;
+        line-height: 36px;
+        font-size: 14px;
+        font-weight: 600;
+        border-radius: 5px 5px 0 0;
+        background-color: rgb(248, 249, 250);
+        padding: 0 15px;
+        border-bottom: 1px solid #ccc;
+        box-sizing: border-box;
+      }
+
+      ul {
+        height: 264px;
+        overflow: auto;
+      }
+
+
+      li {
+        height: 30px;
+        line-height: 30px;
+        cursor: pointer;
+        padding: 0 15px;
+        position: relative;
+
+        .more {
+          position: absolute;
+          top: 2px;
+          right: 10px;
+        }
+      }
+
+      li:hover {
+        background-color: rgb(240, 240, 240);
+      }
+    }
+
+    .ant-checkbox-group {
+      width: 100%;
+    }
+  }
+</style>

+ 687 - 0
src/views/modules/autoLaunch/components/linkMultiSelect.vue

@@ -0,0 +1,687 @@
+<template>
+  <div class="linkMultiSel">
+    <div class="leftBox">
+      <div class="bigBOX" ref="mycheckBox">
+        <div class="big_item">
+          <MultiCheckBox :title="title1" :listArr="listArr1" :curLayerNum="1" :parentChecked="false"
+            @getItemData="getItemData" @getCheckedList='getCheckedList' />
+        </div>
+        <div class="big_item">
+          <MultiCheckBox :title="title2" :listArr="listArr2" :curLayerNum="2"  :parentChecked="parentChecked1"
+            @getItemData="getItemData"  @getCheckedList='getCheckedList' v-if="listArr2.length>0" />
+        </div>
+        <div class="big_item">
+          <MultiCheckBox :title="title3" :listArr="listArr3" :curLayerNum="3"  :parentChecked="parentChecked2"
+            @getItemData="getItemData"  @getCheckedList='getCheckedList' v-if="listArr3.length>0" />
+        </div>
+        <div class="big_item">
+          <MultiCheckBox :title="title4" :listArr="listArr4" :curLayerNum="4"  :parentChecked="parentChecked3"
+            @getItemData="getItemData"  @getCheckedList='getCheckedList' v-if="listArr4.length>0" />
+        </div>
+      </div>
+    </div>
+
+    <div class="rightBox">
+      <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>
+          </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import MultiCheckBox from './MultiCheckBox'
+  import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+  export default {
+    props: ['title', 'listArr','listUrl','maxLayers'],
+    components: {
+      MultiCheckBox
+    },
+    data() {
+      return {
+        listArr1:[],
+        title1:'',
+        title2: '',
+        listArr2: [],
+        title3: '',
+        listArr3: [],
+        title4: '',
+        listArr4: [],
+        clickKey: 0,
+        parentChecked1: false,
+        parentChecked2: false,
+        parentChecked3: false,
+
+       
+
+        currentData: null,
+        layersNum: 0,
+        checkedShowList:[],
+      }
+    },
+    watch: {},
+    methods: {
+      getItemData(val) {
+        this.$nextTick(() => {
+          // this.clickKey = val.clickObj.dataset.layers
+          // let index = parseInt(val.clickObj.dataset.layers) || val.curLayerNum
+          let index = val.curLayerNum
+          this.currentData = val.data
+          
+          let childrensArr = Array.from(this.$refs.mycheckBox.children)
+          setTimeout(() => {
+            // console.log(val, index)
+            // console.log(val.data.checked)
+            if (index == 1 || this.clickKey == 1) {
+                this.$refs.mycheckBox.style.width = '100%'
+                if(val.data.hasChild){
+                    getAction(this.listUrl,{
+                        parentCode:val.data.code,
+                        level:this.maxLayers
+                    }).then((res)=>{
+                        // console.log(res);
+                        if(res.success){
+                            if(res.data.length>0){
+                                res.data.forEach((item,index)=>{
+                                    
+                                    item.value=item.code
+                                    item.checked=val.data.checked;
+                                    item.indeterminates=false;
+                                })
+                                // 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 = ''
+                                this.listArr4 = []
+                                this.title4 = ''
+
+                                //处理样式
+                                this.styleHandle(childrensArr, index)
+                                this.parentChecked1 = val.data.checked
+                                this.parentChecked2 = val.data.checked
+                                this.parentChecked3 = val.data.checked
+                                this.listArr2=res.data
+                                this.title2 = val.data.name
+                            }                    
+                        };
+                        
+                    })  
+                }else{
+                    this.listArr3 = []
+                    this.title3 = ''
+                    this.listArr4 = []
+                    this.title4 = ''
+                    this.listArr2 = []
+                    this.title2 = ''
+                    this.resetStyle(childrensArr, index)
+                }  
+                
+                //  this.checkedShowList=val.checkList     
+            } else if (index == 2 || this.clickKey == 2) {
+                if(val.data.hasChild){
+                    getAction(this.listUrl,{
+                        parentCode:val.data.code,
+                        level:this.maxLayers
+                    }).then((res)=>{
+                        // console.log(res);
+                        if(res.success){
+                            if(res.data.length>0){
+                                res.data.forEach((item,index)=>{
+                                    item.value=item.code
+                                    item.checked=val.data.checked;
+                                    item.indeterminates=false;
+                                
+                                })
+                                this.checkedShowList.forEach((ele)=>{
+                                  res.data.forEach((item)=>{
+                                      if(ele.code==item.code){
+                                            item.checked=true;
+                                        }
+                                  })
+                                        
+                                })
+                                this.listArr4 = []
+                                this.title4 = ''
+                                
+                                this.$refs.mycheckBox.style.width = '150%'
+                                this.styleHandle(childrensArr, index)
+                                this.parentChecked2 = val.data.checked
+                                this.parentChecked3 = val.data.checked
+                                this.listArr3=res.data
+                                this.title3 = val.data.name
+                            }                    
+                        };
+                        
+                    })
+                }else{
+                    this.listArr4 = []
+                    this.title4 = ''
+                    this.listArr3 = []
+                    this.title3 = ''
+                    this.$refs.mycheckBox.style.width = '100%'
+                    this.resetStyle(childrensArr, index)
+                }  
+                 
+              
+                let ind=-1
+                this.listArr1.forEach((ele,i)=>{                       
+                    if(ele.code==val.data.parentCode){
+                        ind=i
+                        // console.log(ind)
+                    }                        
+                }) 
+                if(ind>-1){
+                    this.listArr1[ind].indeterminates = !!val.checkList.length && val.checkList.length <val.plainOptions.length
+                    this.listArr1[ind].checked = val.checkList.length === val.plainOptions.length && val.plainOptions.length!=0
+                }
+                
+            } else if (index == 3 || this.clickKey == 3) {
+
+                if(val.data.hasChild){
+                    getAction(this.listUrl,{
+                        parentCode:val.data.code,
+                        level:this.maxLayers
+                    }).then((res)=>{
+                        // console.log(res);
+                        if(res.success){
+                            if(res.data.length>0){
+                                res.data.forEach((item,index)=>{
+                                    item.value=item.code
+                                    item.checked=val.data.checked;
+                                    item.indeterminates=false;
+                                
+                                })
+                                this.checkedShowList.forEach((ele)=>{
+                                  res.data.forEach((item)=>{
+                                      if(ele.code==item.code){
+                                            item.checked=true;
+                                        }
+                                  })
+                                        
+                                })
+                                this.listArr4 = res.data
+                                this.title4 = val.data.name
+                                this.$refs.mycheckBox.style.width = '200%'
+                                this.styleHandle(childrensArr, index)
+                                this.parentChecked3 = val.data.checked
+                                
+                            }                    
+                        };
+                        
+                    })
+                }else{
+                    this.$refs.mycheckBox.style.width = '150%'
+                    this.resetStyle(childrensArr, index)
+                }  
+
+                let ind=-1;
+                if(this.listArr2){
+                    // console.log(this.listArr2)                                      
+                    this.listArr2.forEach((ele,i)=>{                       
+                      if(ele.code==val.data.parentCode){
+                          ind=i
+                          // console.log(ind)
+                      }                                           
+                    })      
+                    if(ind>-1){
+                        this.listArr2[ind].indeterminates = !!val.checkList.length && val.checkList.length <val.plainOptions.length
+                        this.listArr2[ind].checked = val.checkList.length === val.plainOptions.length && val.plainOptions.length!=0
+                    }           
+                }
+                     let z=-1          
+                    this.listArr1.forEach((element,num)=>{                        
+                      if(element.code==this.listArr2[ind].parentCode){
+                          z=num
+                          // console.log(ind)
+                      }
+                        
+                    })      
+                    let checklist=this.listArr2.filter((item,index)=>{
+                        return  item.checked || item.indeterminates
+                    })    
+                    // console.log(checklist)
+                    if(z>-1){
+                            this.listArr1[z].indeterminates = !!checklist.length && checklist.length < this.listArr2.length
+                            this.listArr1[z].checked = checklist.length === this.listArr2.length && this.listArr2.length!=0
+                    }
+            }else if (index == 4 || this.clickKey == 4){
+                if(this.listArr3){
+                    // console.log(this.listArr3)
+                    let ind=-1
+                    this.listArr3.forEach((ele,i)=>{
+                        
+                        if(item.code==val.data.parentCode){
+                            ind=i
+                            // console.log(ind)
+                        }
+                                            
+                    })   
+                    if(ind>-1){
+                        this.listArr3[ind].indeterminates = !!val.checkList.length && val.checkList.length <val.plainOptions.length
+                        this.listArr3[ind].checked = val.checkList.length === val.plainOptions.length && val.plainOptions.length!=0
+                    }              
+                    
+                }
+                if(this.listArr2){
+                    // console.log(this.listArr2)
+                    let ind=-1
+                    this.listArr3.forEach((ele,i)=>{
+                        
+                        if(item.code==val.data.parentCode){
+                            ind=i
+                            // console.log(ind)
+                        }
+                                            
+                    })   
+                    this.listArr2.forEach((element,num)=>{
+                        if(item.code==this.listArr3[ind].parentCode){
+                            ind=num
+                            // console.log(ind)
+                        }                        
+                    })    
+                    if(ind>-1){
+                  
+                        let checklist3=this.listArr3.filter((item,index)=>{
+                            return  item.checked || item.indeterminates
+                        })    
+                        // console.log(checklist)
+                   
+                        this.listArr2[ind].indeterminates = !!checklist3.length && checklist3.length < this.listArr3.length
+                        this.listArr2[ind].checked = checklist3.length === this.listArr3.length && this.listArr3.length!=0
+                        let z=-1;
+                        this.listArr1.forEach((element,num)=>{
+                            
+                            if(item.code==this.listArr2[ind].parentCode){
+                                z=num
+                                // console.log(z)
+                            }
+                            
+                        })      
+                        let checklist2=this.listArr1.filter((item,index)=>{
+                            return  item.checked || item.indeterminates
+                        })  
+                        if(z>-1){
+                            this.listArr1[z].indeterminates = !!checklist2.length && checklist2.length < this.listArr2.length
+                            this.listArr1[z].checked = checklist2.length === this.listArr2.length && this.listArr2.length!=0
+                        }
+                        
+                    }              
+              } 
+             
+            }
+          }, 100)
+          this.$emit('getSelectedArr',val.checkList)
+
+        })
+      },
+      styleHandle(arr, i) {
+        arr.forEach((item, index) => {
+          if (index <= i) {
+            item.style.width = `${100 / (i + 1)}%`
+            item.style.borderRight = '1px solid #ccc'
+          }
+        })
+      },
+      resetStyle(arr, i) {
+        arr.forEach((item, index) => {
+          if (index < i) {
+            item.style.width = `${100 / i}%`
+            item.style.borderRight = '1px solid #ccc'
+          }
+          if (index == i - 1) {
+            item.style.borderRight = 'none'
+          }
+        })
+      },
+      
+      
+      deleteItem(item){
+          // console.log(item);
+          let val='';
+          this.checkedShowList.forEach((ele,index)=>{
+              if(ele.code==item.code){
+                  val=ele.value
+              }
+          })
+          
+          this.checkedShowList=this.checkedShowList.filter((element,index) => {
+              return element.code!=val;
+          });
+          if(item.level==1){
+              this.listArr1.forEach((ele)=>{
+                  if(ele.code==val){
+                     ele.checked=false
+                  }
+              })  
+          }
+          if(item.level==2){
+              // console.log('------------------------------------');
+              let childList=this.checkedShowList.filter((element,index) => {
+                  return element.parentCode==item.parentCode;
+              });
+              let data=[]
+              let checkList=[];
+              let plainOptions=[]
+              this.listArr1.forEach((ele)=>{
+                  if(ele.code==item.parentCode){
+                      data=ele;
+                  }
+                  if(ele.checked){
+                    checkList.push(ele.code)
+                  }
+                  plainOptions.push(ele.code)
+              })
+              if(childList.length==0){
+                  data.indeterminates=false
+              }
+              
+              
+              this.getItemData({
+                clickObj:{},
+                data: data,
+                curLayerNum:1,
+                checkList,
+                plainOptions,
+              })
+              
+
+          }
+          if(item.level==3){
+
+          }
+      },
+
+      clearAll(){
+          this.listArr1.forEach((item)=>{
+              item.checked=false;
+              item.indeterminates=false;
+          })
+          this.listArr2.forEach((item)=>{
+              item.checked=false;
+              item.indeterminates=false;
+          })
+          this.listArr3.forEach((item)=>{
+              item.checked=false
+              item.indeterminates=false
+          })
+          this.listArr4.forEach((item)=>{
+              item.checked=false
+              item.indeterminates=false
+          })
+          this.checkedShowList=[]
+      },
+
+      getCheckedList(val){
+        // console.log(val);
+        if(val.curLayerNum==1){
+          if(val.checkList.length>0){
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.level!=1
+            })
+            // console.log(this.checkedShowList)
+            if(val.checkList.length==this.listArr1.length){
+                this.checkedShowList=[];
+                val.checkList.forEach((ele)=>{
+                  var result = this.checkedShowList.some(item => {
+                    if(item.code == ele){
+                        return true 
+                    } 
+                  })
+                  if(!result){
+                    this.listArr1.forEach((item)=>{
+                      if(ele==item.code){
+                          this.checkedShowList.push(item)
+                      }
+                    })
+                  }
+                
+                })
+            }else if(val.checkList.length<this.listArr1.length){
+              val.checkList.forEach((ele)=>{
+                var result = this.checkedShowList.some(item => {
+                    if(item.code == ele){
+                        return true 
+                    } 
+                })
+                if(!result){
+                  this.listArr1.forEach((item)=>{
+                    if(ele==item.code){
+                        this.checkedShowList.push(item)
+                    }
+                  })
+                }
+              
+              })
+            }
+            
+            // console.log(this.checkedShowList)
+          }else{
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.level!=1
+            })
+          }
+          
+        }else if(val.curLayerNum==2){
+          this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.code!=val.currentList[0].parentCode
+          })
+          
+          if(val.checkList.length>0&&val.checkList.length<val.currentList.length){
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.parentCode!=val.currentList[0].parentCode
+            })
+            // console.log(this.checkedShowList)
+            val.checkList.forEach((ele)=>{
+              var result = this.checkedShowList.some(item => {
+                if(item.code == ele){
+                    return true 
+                } 
+              })
+              if(!result){
+                val.currentList.forEach((item)=>{
+                  if(ele==item.code){
+                      this.checkedShowList.push(item)
+                  }
+                })
+              }
+             
+            })
+            // console.log(this.checkedShowList)
+          }else if(val.checkList.length==0){
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.parentCode!=val.currentList[0].parentCode
+
+            })
+          }else if(val.checkList.length==val.currentList.length){
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.parentCode!=val.currentList[0].parentCode
+            })
+            this.listArr1.forEach((item)=>{
+                if(item.code==val.currentList[0].parentCode){
+                    this.checkedShowList.push(item)
+                }
+            })
+          }
+        }else if(val.curLayerNum==3){
+          this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.code!=val.currentList[0].parentCode
+          })
+          
+          if(val.checkList.length>0&&val.checkList.length<val.currentList.length){
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.parentCode!=val.currentList[0].parentCode
+            })
+            // console.log(this.checkedShowList)
+            val.checkList.forEach((ele)=>{
+              var result = this.checkedShowList.some(item => {
+                if(item.code == ele){
+                    return true 
+                } 
+              })
+              if(!result){
+                val.currentList.forEach((item)=>{
+                  if(ele==item.code){
+                      this.checkedShowList.push(item)
+                  }
+                })
+              }
+             
+            })
+            // console.log(this.checkedShowList)
+          }else if(val.checkList.length==0){
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.parentCode!=val.currentList[0].parentCode
+              
+            })
+          }else if(val.checkList.length==val.currentList.length){
+            this.checkedShowList=this.checkedShowList.filter((item)=>{
+              return item.parentCode!=val.currentList[0].parentCode
+            })
+            this.listArr2.forEach((item)=>{
+                if(item.code==val.currentList[0].parentCode){
+                    this.checkedShowList.push(item)
+                }
+            })
+          }
+        }else if(val.curLayerNum==4){
+
+        }
+      },
+
+
+    },
+    mounted() {
+        // this.listArr1=this.listArr;
+        this.title1=this.title;
+        // console.log(this.listUrl)
+        if(this.listUrl){
+            getAction(this.listUrl,{
+                parentCode:0,
+                level:this.maxLayers
+            }).then((res)=>{
+                console.log(res);
+                if(res.success){
+                    res.data.forEach((item,index)=>{
+                        item.value=item.code
+                        item.checked=false;
+                        item.indeterminates=false;
+                        
+                    })
+                };
+                this.listArr1=res.data
+            })
+        }
+
+        
+        
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .linkMultiSel {
+    width: 100%;
+    height: 310px;
+    display: flex;
+
+    ul,
+    li {
+      margin: 0;
+      padding: 0;
+      list-style: none;
+    }
+
+    .leftBox {
+      width: 62%;
+      margin-right: 3%;
+      border: 1px solid #ccc;
+      border-radius: 5px;
+      overflow-x: auto;
+      overflow-y: hidden;
+    }
+
+    .rightBox {
+      width: 35%;
+      border: 1px solid #ccc;
+      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;
+                }
+            }
+      }
+    }
+
+    .title {
+      height: 36px;
+      line-height: 36px;
+      font-size: 14px;
+      font-weight: 600;
+      border-radius: 5px 5px 0 0;
+      background-color: rgb(248, 249, 250);
+      padding: 0 15px;
+      border-bottom: 1px solid #ccc;
+      position: relative;
+      .clearAllBtn{
+          position: absolute;
+          top: 3px;
+          right: 0;
+      }
+    }
+
+    .big_item {
+      width: 100%;
+      // min-width: 200px;
+      // width: 426px;
+      display: inline-block;
+      // height: calc(100% - 10px);
+    }
+
+    .bigBOX {
+      // width: calc(2 * 100%);
+      height: calc(100% - 10px);
+      box-sizing: border-box;
+      // display: flex;
+    }
+  }
+</style>

+ 274 - 0
src/views/modules/autoLaunch/components/singleLayerSelecte.vue

@@ -0,0 +1,274 @@
+<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="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'
+// 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: [],
+    }
+  },
+  watch: {
+    checkedList: {        
+        handler(n,o){
+            
+                this.$emit('getCheckedList', this.checkedList)
+            
+        },
+        deep: true,
+        immediate: true,
+    },
+    listArr:{
+        handler(n,o){
+            this.plainOptions = this.listArr
+            this.valueOptions=[];
+            this.listArr.forEach((item) => {
+                    this.valueOptions.push(item.value)
+            })
+        },
+        deep: true,
+        immediate: true,
+    },
+    checked: {
+        handler(n, o) {     
+            
+                this.checkedList=[]
+                this.checkedShowList=[];
+                this.plainOptions = this.listArr
+                this.valueOptions=[];
+                this.listArr.forEach((item) => {
+                    this.valueOptions.push(item.value)
+                })
+                 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)
+      this.checkedList=[];
+      this.checkedShowList=[];
+      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
+      }
+            // this.$emit('getCheckedList', this.checkedList)
+
+    },
+
+    clearAll() {
+      this.checkedList = []
+      this.indeterminate = false
+      this.checkAll = false
+      this.checkedShowList = []
+        // this.$emit('getCheckedList', this.checkedList)
+
+    },
+  },
+  mounted() {
+    this.plainOptions = this.listArr
+    this.valueOptions=[];
+    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;
+      .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>

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

@@ -0,0 +1,471 @@
+<template>
+  <div class="newPlan">
+    <a-form :form="form">
+         <!-- 投放范围 -->
+        <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="['scenes', { initialValue:'2' }]">
+                    <a-radio-button value="1">素材+出价</a-radio-button>
+                    <a-radio-button value="2">素材+定向</a-radio-button>
+                    <a-radio-button value="3">时间+出价</a-radio-button>
+                    </a-radio-group>
+                </a-form-item>
+                </div>
+            </div>        
+            </div>
+        </div>
+
+        <div class="moduler">
+            <div class="moduler-title">选择账户</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">
+                    
+                    <Treeselect :appId.sync="accountId" :multiple="false" request="2" reqUrl='/ctop/projectMember/getProjectAccountByUserId'  ref="treeSelect" style="margin-bottom:8px;width:580px " />
+                </div>
+            </div>
+            </div>
+        </div>
+     
+        <!-- 推广目的 -->
+        <div class="moduler">
+            <div class="moduler-title">请选择营销目标</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="['marketingGoal',{initialValue:'2' }]" @change="marketingGoalChange">
+                            <a-radio-button value="2">提升应用安装</a-radio-button>
+                            <a-radio-button value="3">获取电商下单</a-radio-button>                                   
+                            <a-radio-button value="4">推广品牌活动</a-radio-button>                                   
+                            <a-radio-button value="5">收集销售线索</a-radio-button>                                   
+                            <a-radio-button value="7">提高应用活跃</a-radio-button>                                   
+                        </a-radio-group>
+                    </a-form-item>
+                </div>
+            </div>        
+           
+        </div>
+    
+        <!-- 基础信息 -->
+        <div class="moduler">
+            <div class="moduler-title">请设置基本信息</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="strategyName"   allow-clear />
+               </a-form-item>
+            </div>
+          </div>  
+            
+        </div>
+    
+      <div class="moduler">
+        <div class="opt">
+          <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
+         
+          <a-button type="primary" @click="goNext"  :loading="goNextloading">下一步</a-button>
+        </div>
+      </div>
+    </a-form>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+import { TreeSelect } from 'ant-design-vue';
+import qs from 'qs'
+const SHOW_PARENT = TreeSelect.SHOW_PARENT;
+// import selectCheckAll from './toutiaoTime'
+
+var str = ""
+for (let i = 0; i < 7*48; i++) {
+ str+='0'
+  
+}
+export default {
+    components: {
+        // selectCheckAll,
+        // newDirectedPackage,
+        Treeselect
+    },
+    data() {
+        return {
+            treeData:[],
+            accountId:undefined,
+            strategyName: '',
+            form: this.$form.createForm(this),
+
+            goNextloading:false,
+            goPlanShowloading:false,
+            
+            
+            dateRange: [moment(), moment()],
+
+            visible:false,
+            errorInfo:[],
+        
+            validationRules: {
+                url: [   
+                {          
+                    required: true,
+                    validator: this.validateURL,
+                },
+                ],
+                strategyName:[{
+                required: true,
+                validator: this.validateName,
+                }],
+                bid:[{
+                required: true,
+                message:'出价信息必须填写',
+                // validator: this.validateBid,
+                }],
+                roi:[{
+                required: true,
+                message:'ROI系数必须填写',
+                // validator: this.validateBid,
+                }],
+            },
+            
+        }
+    },
+    watch: {
+        accountId(newValue,oldValue){
+            if(newValue){
+                this.treeData.forEach(item=>{
+                    if(item.children){
+                        item.children.forEach(ele=>{
+                            if(ele.value==newValue){
+                                this.$parent.accountInfo=ele
+                            }
+                        })
+                    }
+                })
+                console.log(this.$parent.accountInfo)
+            }
+        }
+    },
+    methods: {
+    
+
+        //获取表单的某一个属性值
+        getFormData(className) {
+        return this.form.getFieldValue(className)
+        },
+        dateChange(date, dateString) {
+        // console.log(date,dateString)
+        this.form.getFieldDecorator('startTime')
+        this.form.getFieldDecorator('endTime')
+        this.form.setFieldsValue({
+            startTime: date[0].format('YYYY-MM-DD HH:mm'),
+            endTime:  date[1].format('YYYY-MM-DD HH:mm'),
+        })
+        },
+    
+        //推广目的改变
+        marketingGoalChange(e){
+            console.log(e.target)
+            this.marketingGoalHandle(e.target.value)
+        },
+    
+        // 验证网址
+        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('链接必须填写')
+        }
+        },
+        validateName(rule, value, callback){
+        // console.log(rule, value, callback);
+
+            if (value) {
+            callback()
+            } else {
+                callback('应用包名称必须填写')
+            }
+        },
+        validateBid(rule, value, callback){
+        // console.log(rule, value, callback);
+            if (value) {
+            callback()
+            } else {
+                callback('出价必须填写')
+            }
+        },
+
+   
+    
+        goBack() {
+            this.$router.replace('/autoLaunch/autoLaunchList')
+            this.$bus.$emit('remove', '/autoLaunch/newStrategy')
+        },
+    
+        // 保存并新建创意
+        goNext() {
+        this.$nextTick(()=>{
+            if (this.strategyName) {
+                this.form.validateFields((err, values) => {
+                if (!err) {
+
+                    console.log('Received values of form: ', values)
+                    // console.log(this.strategyNames)
+                    values.accountId = this.accountId
+                    values.strategyName=this.strategyName
+                    this.$parent.strategyInfo=values;
+                    this.$parent.currentTabComponent='setDirectional'
+                }else{
+                    this.$message.error('请正确填写必填项目')
+                }
+            })
+                }else{
+                    this.$message.error('请输入策略名称')
+                }
+        })
+        
+        },
+        //请求项目和账户内容
+        accountHttp(){
+            this.treeData=[];
+            this.accountIds=[];
+            getAction('/ctop/projectMember/getProjectAccountByUserId?mediaType=2', {}).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+'_'+element.project.projectName;
+                                this.treeData[index].children[i].value=ele.accountId;
+                                this.treeData[index].children[i].key=ele.accountId;
+                            })
+                                
+                            }                           
+                        }      
+                        });
+                        // console.log(this.treeData)
+                        
+                    }
+            }
+            })
+        },
+
+
+        marketingGoalHandle(val){
+            let str='';
+            switch (val) {
+                case '2':
+                    str='应用安装'
+                    break;
+                case '3':
+                    str='电商下单'
+                    break;
+                case '4':
+                    str='推广品牌'
+                    break;
+                case '5':
+                    str='营销线上'
+                    break;
+                case '7':
+                    str='应用活跃'
+                    break;
+            
+                default:
+                    str='转化错误'
+                    break;
+            }
+            return str
+        },
+    },
+    
+  mounted() {
+    this.accountHttp()
+    // this.$bus.$emit('remove', '/modules/BatchCreate/newGroup')
+    let strategyNamepart=this.marketingGoalHandle(this.getFormData('marketingGoal'));
+    
+    
+    this.strategyName ='[策略]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
+
+    
+  },
+}
+</script>
+<style lang="scss">
+.newPlan{
+  .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;
+}
+.newPlan {
+  .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;
+    }
+  }
+}
+</style>
+<style lang="scss" scoped>
+.newPlan {
+  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: 9px;
+    }
+    .row-item .label-item {
+      position: relative;
+      align-items: flex-start;
+      align-self: flex-start;
+      line-height: 20px;
+      height: 20px;
+      margin-top: 10px;
+      width: 80px;
+      min-width: 80px;
+      .text-item {
+        font-size: 14px;
+        width: 60px;
+      }
+    }
+    .row-item .required-item {
+      width: 4px;
+      height: 4px;
+      border-radius: 2px;
+      background: #f45858;
+      position: absolute;
+      right: 10px;
+      top: 50%;
+      transform: translateY(-50%);
+    }
+    .row-item .input-item {
+      min-width: 480px;
+      position: relative;
+      // height: 35px;
+      .tip {
+        font-size: 12px;
+        color: tomato;
+      }
+    }
+  }
+  .opt {
+    text-align: right;
+  }
+}
+</style>

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

@@ -0,0 +1,39 @@
+<template>
+
+        <component v-bind:is="currentTabComponent">
+
+        </component>
+    
+    
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+export default {
+    name:'index',
+    data() {
+        return {
+            currentTabComponent:'createStrategy',
+            isEdit:false,
+            strategyInfo:{},
+            accountInfo:{},
+        }
+    },
+    components:{   
+        createStrategy: () => import('./createStrategy'), 
+        setDirectional: () => import('./setDirectional'), 
+        setCreate: () => import('./setCreate'), 
+        
+    },
+
+    mounted(){
+       this.currentTabComponent='createStrategy' 
+    },
+    beforeDestroy() {
+        this.currentTabComponent='createStrategy' 
+    },
+   
+}
+
+</script>

+ 237 - 0
src/views/modules/autoLaunch/radioCheck.vue

@@ -0,0 +1,237 @@
+<template>
+    <div class="radioCheck" >
+        
+            <label :class="{'item':true,'selection': selectValue.indexOf(item.value)>-1,'bgcolor':item.disabled}" v-for="(item,index) in checkArr" :key="index">
+                
+                <span>
+                    <input type="checkbox" :value="item.value"  class="checkbox-button-input" @click="radioCheckChange($event,item)">
+                </span>
+                <span>{{item.title}}</span>
+                
+            </label>
+            <!-- <label :class="{'item':true,'selection': selectValue.indexOf(item.value)>-1}" v-for="(item,index) in checkArr" :key="index" :disabled='item.disabled'>               
+                <span>
+                    <input type="checkbox" :value="item.value"  class="checkbox-button-input" @click="radioCheckChange">
+                </span>
+                <span>{{item.title}}</span>               
+            </label>        -->
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            selectValue:[''],
+            currentSelect:'',
+        }
+    },
+   
+    props:['checkArr','selectArr'],
+    watch:{
+        checkArr:{
+            handler(n,o){
+                // console.log(n,o)
+                this.selectValue=[];
+                let i=0;
+                this.checkArr.forEach((item,index)=>{
+                    // console.log(item)
+                    if(item.disabled==false){
+                        i++;
+                        this.selectValue[0]=item.value;
+                        // console.log(this.selectValue)
+                    }else if(item.disabled==undefined){
+                        if(item.checked){
+                            this.selectValue.push(item.value)
+                        }
+                        
+                    }
+                })
+                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,!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)
+                    }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=[''];
+                    }
+                    
+                }
+            // console.log(this.currentSelect,this.selectValue);
+            }
+            this.$emit('getSonValue',this.selectValue)
+        },
+    },
+    mounted() {
+        // this.selectValue=[]
+        // console.log(this.checkArr)
+        this.checkArr.forEach((item,index)=>{
+            
+            if(item.disabled&&item.disabled!=undefined){
+                this.selectValue[0]=item.value
+            }else{
+                this.selectValue=['']
+            }
+        })
+        this.$emit('getSonValue',this.selectValue)
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.radioCheck{        
+    border-radius: 5px;
+    height: 32px;
+    padding: 0;
+    margin: 0;
+    border: none;
+    background: transparent;
+    .btn{
+        background: transparent;
+        padding: 0;
+        margin: 0;
+        border: none;
+    }
+    .item{
+        min-width: 80px;
+        padding: 0px 15px;
+        text-align: center;
+        display: inline-block;
+        border: 1px solid #ccc;
+        border-left: 0;
+        height: 32px;
+        line-height: 32px;
+        cursor: pointer;
+        .checkbox-button-input{
+            width: 0;
+            height: 0;
+            opacity: 0;
+        }
+
+    }
+    .bgcolor{
+        color:rgba(0, 0, 0, 0.25);
+        background-color: #f5f5f5;
+        border-color: #d9d9d9;
+        cursor: not-allowed;
+    }
+    .item::after{
+        content: "";
+        position: absolute;
+        right: 1px;
+        top: -2px;
+        width: 0;
+        height: 0;
+        border-top: 6px solid transparent;
+        border-bottom: 6px solid transparent;
+        border-left: 6px solid;
+        border-left-color: #e0e0e0;
+        -webkit-transform: rotate(-45deg);
+        -ms-transform: rotate(-45deg);
+        transform: rotate(-45deg);
+        border-radius: 2px;
+    }
+    .item:hover{
+        color: #1890ff;
+    }
+    .selection{
+        color: #1890ff;
+        background: #fff;
+        border-color: #1890ff;
+    }
+    .item.selection:hover{
+        // color: #1890ff;
+        color: #40a9ff;
+        background: #fff;
+        border-color: #40a9ff;
+    }
+    .item.selection:after{
+        border-left: 6px solid #1890ff;
+    }
+    .item:hover::after{
+        // border-color: #40a9ff;
+        border-left: 6px solid #40a9ff;
+    }
+    .bgcolor:hover{
+        color:rgba(0, 0, 0, 0.25);
+        background-color: #f5f5f5;
+        border-color: #d9d9d9;
+        cursor: not-allowed;
+    }
+    .bgcolor:hover::after{
+        // border-color: #40a9ff;
+        border-left: 6px solid #e0e0e0;
+    }
+    .bgcolor.selection:after{
+        border-left: 6px solid #e0e0e0;
+    }
+    .bgcolor.selection{
+        color:rgba(0, 0, 0, 0.25);
+        background-color: #f5f5f5;
+        border-color: #d9d9d9;
+        cursor: not-allowed;
+    }
+    .bgcolor.selection:hover{
+        // color: #1890ff;
+        color:rgba(0, 0, 0, 0.25);
+        background-color: #f5f5f5;
+        border-color: #d9d9d9;
+        cursor: not-allowed;
+    }
+    .bgcolor.selection:after{
+        border-left: 6px solid #e0e0e0;
+    }
+}
+.radioCheck .item:first-child {
+    border-radius: 5px 0 0 5px;
+    border-left: 1px solid #ccc;
+}
+.radioCheck .item.selection:first-child {
+    border-radius: 5px 0 0 5px;
+    border-left: 1px solid #1890ff;
+}
+.radioCheck .item.selection:nth-child(2) {
+    
+    border-left: 1px solid #1890ff;
+}
+.radioCheck .item:first-child:after{
+    border-left: 0;
+}
+.radioCheck .item:last-child {
+    border-radius: 0px 5px 5px 0px;
+}
+</style>

+ 0 - 0
src/views/modules/autoLaunch/setCreate.vue


Diff do ficheiro suprimidas por serem muito extensas
+ 1514 - 0
src/views/modules/autoLaunch/setDirectional.vue


+ 160 - 73
src/views/modules/earlyWarningRules/configRules.vue

@@ -21,11 +21,11 @@
                         </div>
                         <div class="input-item"> 
                              <a-form-model-item ref="eventRuleLevel"  prop="eventRuleLevel">
-                                <a-radio-group v-model="form.mediaType" :disabled="form.templateId!=null">
-                                    <a-radio-button :value="1" >头条</a-radio-button>
-                                    <!-- <a-radio-button :value="2">快手</a-radio-button> -->
-                                    <a-radio-button :value="3">头条内广</a-radio-button>
-                                    <!-- <a-radio-button :value="4">快手内广</a-radio-button> -->
+                                <a-radio-group v-model="form.mediaType" :disabled="form.templateId!=null" @change="mediaTypeChange">
+                                    <a-radio-button :value="3" >头条</a-radio-button>
+                                    <a-radio-button :value="2">快手</a-radio-button>
+                                    <!-- <a-radio-button :value="3">头条内广</a-radio-button>
+                                    <a-radio-button :value="4">快手内广</a-radio-button> -->
                                    
                                 </a-radio-group>
                             </a-form-model-item>
@@ -166,7 +166,7 @@
                                         <div class="title">                                            
                                             <a-form-model-item ref="ruleRelationship"  prop="ruleRelationship">
                                                 <span class="condition-title">如果</span>
-                                                <a-select  style="width: 300px" v-model="item.ruleRelationship">
+                                                <a-select  style="width: 300px" v-model="item.ruleRelationship" :disabled="!!item.groupId">
                                                     <a-select-option  value='and'>满足以下所有条件</a-select-option>
                                                     <a-select-option  value='or'>满足以下任意条件</a-select-option>
                                                 </a-select>
@@ -242,7 +242,7 @@
                                                     
                                             </div>
                                                
-                                            <div class="add-rule" @click="addCondition(item,index)" > 添加条件</div>
+                                            <div class="add-rule" @click="addCondition(item,index)" v-show="item.ruleType=='group'"> 添加条件</div>
                                         </div>
                                     </div>
                                     <div class="toolbox-automate-rules-create-content_rules-and-condition_rules">
@@ -254,9 +254,9 @@
                                                     <div class="rules-list-item">
                                                         <div class="rules-list-item-subject" >
                                                             <a-form-model-item ref="processMethod"  prop="processMethod">
-                                                                <a-select   v-model="item.processMethod" :disabled="!!item.groupId">
+                                                                <a-select   v-model="item.operate" :disabled="!!item.groupId">
                                                                     <a-select-option  value='SEND'>仅发送通知</a-select-option>
-                                                                    <a-select-option  value='PAUSE' >关停</a-select-option>
+                                                                    <a-select-option  value='PAUSE' >关停并发送通知</a-select-option>
                                                                     
                                                                 </a-select>
                                                             </a-form-model-item>
@@ -264,10 +264,10 @@
                                                         <div class="rules-list-item-subject" >
                                                             <a-form-model-item ref="processMethod"  prop="processMethod">
                                                                 <a-select   v-model="item.sendType" :disabled="!!item.groupId">
-                                                                    <a-select-option  value='message' >短信</a-select-option>
-                                                                    <a-select-option  value='enterpriseWechat'>企业微信</a-select-option>
-                                                                    <a-select-option  value='email'>邮箱</a-select-option>
-                                                                    <a-select-option  value='phone'>电话</a-select-option>
+                                                                    <!-- <a-select-option  value='message' >短信</a-select-option> -->
+                                                                    <a-select-option  value='Wechat'>企业微信</a-select-option>
+                                                                    <a-select-option  value='EMAIL'>邮箱</a-select-option>
+                                                                    <!-- <a-select-option  value='phone'>电话</a-select-option> -->
                                                                 </a-select>
                                                             </a-form-model-item>
                                                         </div>
@@ -304,6 +304,7 @@ import moment from 'moment';
 import { getAction, postAction, downFile, downFilePost,deleteAction,putAction } from '@/api/manage';
 import { Switch } from 'ant-design-vue';
 import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+// import func from '../../../../vue-temp/vue-editor-bridge';
 
 export default {
     components:{
@@ -361,8 +362,8 @@ export default {
                                 isUnlimited:1,
                             },
                         ],
-                        processMethod:'SEND',//预警方式
-                        sendType:'enterpriseWechat',//通知方式
+                        operate:'SEND',//预警方式
+                        sendType:'Wechat',//通知方式
                     },
                 ],
             },
@@ -391,44 +392,75 @@ export default {
             }else{
                 this.templateNameTrue = false
             }
-        }
+        },
+        // 'form.mediaType':function(n,o){
+
+        //     getAction(this.url.fieldList,{   
+        //         mediaType:n,
+        //         pageNo:1,
+        //         pageSize:500,
+        //     }).then(res=>{
+        //         console.log(res);
+        //         this.rulesFieldList = []
+        //         if(res.success){ 
+        //             this.rulesFieldList=res.result.map(item=>{
+        //                 return {
+        //                     name:item.dimensionName,
+        //                     code:item.dimension,
+        //                     children:item.dimensionList
+        //                 }
+        //             }) 
+        //             this.getTempletDetail()   
+        //         }            
+        //     })
+            
+        // }
     },
     methods: {
         blurTemplateName(){
             console.log(this.form)
-            if(this.templateNameTrue){
-                if(this.form.templateName!=''){
-                    putAction('/ruleTemplate/edit',{id:this.form.templateId,templateName:this.form.templateName}).then(res=>{
+            if(this.currentRuleId){
+                if(this.templateNameTrue){
+                    if(this.form.templateName!=''){
+                        putAction('/ruleTemplate/edit',{id:this.form.templateId,templateName:this.form.templateName}).then(res=>{
+                            if(res.success){
+
+                            }else{
+                            this.$message.error(res.message) 
+                            }
+                        })
+                    }else{
+                        this.$message.error('模板名称不可以为空!!!')
+                    }
+                }
+            }
+            
+        },
+        blurGroupName(item){
+            if(this.currentRuleId){
+                if(item.groupName!=''&&item.remark!=''){
+                    putAction('/ruleGroup/edit',{id:item.groupId,groupName:item.groupName,remark:item.remark}).then(res=>{
                         if(res.success){
 
                         }else{
-                           this.$message.error(res.message) 
+                        this.$message.error(res.message)  
                         }
                     })
                 }else{
-                    this.$message.error('模板名称不可以为空!!!')
+                    this.$message.error('规则名称和规则描述不可以为空!!!')
                 }
             }
-        },
-        blurGroupName(item){
-            if(item.groupName!=''&&item.remark!=''){
-                putAction('/ruleGroup/edit',{id:item.groupId,groupName:item.groupName,remark:item.remark}).then(res=>{
-                    if(res.success){
-
-                    }else{
-                       this.$message.error(res.message)  
-                    }
-                })
-            }else{
-                this.$message.error('规则名称和规则描述不可以为空!!!')
-            }
+            
         },
         ruleTypeChange(item){
-            
+            console.log(item)
             if(item.ruleType=='base'){
-                item.isCopy=0
+                item.isCopy=0;
+                item.ruleDetail=item.ruleDetail.filter((item,index)=>{
+                    return index==0
+                })
             }
-            
+            console.log(item)
         },
         inputCheck(val){
             console.log(val)
@@ -527,8 +559,8 @@ export default {
                     ruleRelationship:"and",
                     ruleType:'base',
                     remark:'',
-                    processMethod:'SEND',//预警方式
-                    sendType:'enterpriseWechat',//通知方式
+                    operate:'SEND',//预警方式
+                    sendType:'Wechat',//通知方式
                     isRequired:1,
                     isCopy:0,
                     ruleDetail:[
@@ -688,27 +720,47 @@ export default {
                     console.log(res);
                     if(res.success){
                         this.spinning=false;
-                        
-                        res.result.ruleList.map((item,index)=>{
-                            item.ruleDetail.forEach((ele,ind)=>{
+                        new Promise((resolve,reject)=>{
+                             getAction(this.url.fieldList,{   
+                                mediaType:res.result.mediaType,
+                                pageNo:1,
+                                pageSize:500,
+                            }).then(result=>{
+                                console.log(result);
+                                if(result.success){ 
+                                    this.rulesFieldList=result.result.map(item=>{
+                                        return {
+                                            name:item.dimensionName,
+                                            code:item.dimension,
+                                            children:item.dimensionList
+                                        }
+                                    }) 
+                                    resolve('success')
+                                }            
+                            })
+                        }).then(data=>{
+                             res.result.ruleList.map((item,index)=>{
+                                item.ruleDetail.forEach((ele,ind)=>{
 
-                                ele.baseIndex=[ele.ruleDimension,ele.indicatorCode];
-                                 getAction(this.url.ruleCondition,{
-                                    dataType:ele.dataType
-                                }).then(result=>{
-                                    console.log(result)
-                                    if(result.success){
-                                        ele.conditionList=result.result
-                                        console.log(this.form);
-                                        this.form={};
-                                        this.form=res.result
-                                    }
+                                    ele.baseIndex=[ele.ruleDimension,ele.indicatorCode];
+                                    getAction(this.url.ruleCondition,{
+                                        dataType:ele.dataType
+                                    }).then(result=>{
+                                        console.log(result)
+                                        if(result.success){
+                                            ele.conditionList=result.result
+                                            console.log(this.form);
+                                            this.form={};
+                                            this.form=res.result
+                                        }
+                                    })
                                 })
                             })
-                        })
 
-                        
-                        this.form=res.result;
+                            
+                            this.form=res.result;
+                        })
+                       
                     }
                 })
             }else{
@@ -716,6 +768,33 @@ export default {
             }
 
         },
+
+        mediaTypeChange(e){
+            console.log(e);
+            this.getMediaTypeRuleField()
+        },
+
+        getMediaTypeRuleField(){
+            this.rulesFieldList=[];
+            getAction(this.url.fieldList,{   
+                mediaType:this.form.mediaType,
+                pageNo:1,
+                pageSize:500,
+            }).then(res=>{
+                console.log(res);
+                if(res.success){ 
+                    this.rulesFieldList=[];
+                    this.rulesFieldList=res.result.map(item=>{
+                        return {
+                            name:item.dimensionName,
+                            code:item.dimension,
+                            children:item.dimensionList
+                        }
+                    }) 
+                   
+                }            
+            })
+        },
     },
 
     filters:{
@@ -751,28 +830,36 @@ export default {
 
             return returnVal
         },
+
+        
     },
 
     mounted(){
         // this.spinning=true;
         this.currentRuleId=this.$route.query.id
-        getAction(this.url.fieldList,{   
-            mediaType:3,
-            pageNo:1,
-            pageSize:500,
-        }).then(res=>{
-            console.log(res);
-            if(res.success){ 
-                this.rulesFieldList=res.result.map(item=>{
-                    return {
-                        name:item.dimensionName,
-                        code:item.dimension,
-                        children:item.dimensionList
-                    }
-                }) 
-                this.getTempletDetail()   
-            }            
-        })
+        if(!this.$route.query.id){
+            getAction(this.url.fieldList,{   
+                mediaType:this.form.mediaType,
+                pageNo:1,
+                pageSize:500,
+            }).then(res=>{
+                console.log(res);
+                if(res.success){ 
+                    this.rulesFieldList=res.result.map(item=>{
+                        return {
+                            name:item.dimensionName,
+                            code:item.dimension,
+                            children:item.dimensionList
+                        }
+                    }) 
+                    this.getTempletDetail()   
+                }            
+            })
+        }else{
+            this.getTempletDetail()   
+        }
+        
+        
 
         // console.log(this.$route.query);
         

+ 2 - 5
src/views/modules/earlyWarningRules/index.vue

@@ -312,16 +312,13 @@ export default {
     filters:{
         handleMediaType(val){
             switch (val) {
-                case 1:
-                    return '头条'
-                    break;
-            
+               
                 case 2:
                     return '快手'
                     break;
             
                 case 3:
-                    return '头条内广'
+                    return '头条'
                     break;
             
                 case 4:

+ 128 - 0
src/views/modules/earlyWarningRules/pushTreeSelect.vue

@@ -0,0 +1,128 @@
+<style lang="scss" scoped>
+.select-project {
+  width: 50%;
+}
+</style>
+<template>
+  <div class="select-project">
+    <treeselect
+      :multiple="multiple"
+      :disable-branch-nodes="!multiple"
+      :options="options"
+      :load-options="loadOptions"
+      placeholder="请选择项目以及账户"
+      v-model="value"
+      :value-consists-of="valueConsistsOf"
+      @input="emitValue"
+      :limit="2"
+      :limitText="
+        (count) => {
+          return '隐藏' + count + '条'
+        }
+      "
+      noChildrenText="该项目下暂无账号"
+      noOptionsText="暂无项目"
+    />
+  </div>
+</template>
+
+<script>
+// 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.
+
+export default {
+  data: () => ({
+    value: null,
+    valueConsistsOf: 'LEAF_PRIORITY',
+    options: [],
+  }),
+  props: {
+    multiple: {
+      type: Boolean,
+      default() {
+        return true
+      },
+    },
+  },
+  components: { Treeselect },
+  watch: {
+    $route(n, o) {
+      console.log(n, o)
+    },
+  },
+  methods: {
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+  
+    emitValue() {
+      this.$emit('update:appId', this.value)
+    },
+    getChildren() {},
+    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/getAccountList', { projectId: parentNode.id, userId: this.userInfo().id }).then(
+          (res) => {
+            console.log(res)
+            if (res.code == 0) {
+              if (res.result.length > 0) {
+                parentNode.children = res.result.map((i) => {
+                  return {
+                    id: i.accountId,
+                    label:
+                      (i.userName.length == 2
+                        ? i.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
+                        : i.userName.length == 3
+                        ? i.userName + '\xa0\xa0\xa0\xa0'
+                        : i.userName) +
+                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
+                      i.accountId +
+                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
+                      i.authName,
+                  }
+                })
+                callback()
+              } else {
+                parentNode.children = []
+                callback()
+              }
+            } else {
+              callback(new Error('Failed to load options: network error.'))
+            }
+          }
+        )
+      }
+    },
+    getParticipateList() {
+      //我参与的
+      getAction('/ctop/projectMember/participateListV2', {
+        userId: this.userInfo().id,
+        pageSize: 1000000,
+        pageNo: 1,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.options = res.result.records.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,
+            }
+          })
+        }
+      })
+    },
+  },
+  mounted() {
+    this.getParticipateList()
+  },
+}
+</script>

+ 47 - 17
src/views/modules/earlyWarningRules/ruleModule.vue

@@ -35,7 +35,7 @@
           <a-form-model ref="ruleForm" :model="form" layout="horizontal">
             <div class="moduler">
               <template v-for="(item, index) of form.ruleList">
-                <div class="row-item" v-if="item.ruleType == 'base' && item.isCopy == 0">
+                <div class="row-item" v-if="item.ruleType == 'base' && item.isCopy == 0" :key="index">
                   <div class="hint-item">
                     <a-tooltip>
                       <template slot="title">
@@ -121,12 +121,31 @@
                         v-else-if="value.modelType == 'tagBox'"
                       >
                       </a-select>
+
+                      <!-- <p v-else-if="value.modelType == 'timeRange'">{{value.threshold}}</p> -->
+                      <scheduleTime
+                        style="width: 100%"
+                        :scheduleTime.sync="value.threshold"
+                        ref="selectCheck"
+                        v-else-if="value.modelType == 'scheduleTime'"
+                      >
+                      </scheduleTime>
+                      <!--  v-model="value.threshold" -->
+                      <region
+                        :disabled="!editShow"
+                        :cascaderValue.sync="value.threshold"
+                        style="width: 100%; height: 32px"
+                        :isLazy="true"
+                        v-else-if="value.modelType == 'region'"
+                      >
+                      </region>
+                      <!-- {{value.threshold}} -->
                       {{ value.dataUnit }}
                     </a-form-model-item>
                   </div>
                 </div>
 
-                <div class="row-item" v-else-if="item.ruleType == 'group' && item.isCopy == 0">
+                <div class="row-item" v-else-if="item.ruleType == 'group' && item.isCopy == 0" :key="index">
                   <div class="hint-item">
                     <a-tooltip>
                       <template slot="title">
@@ -145,7 +164,7 @@
                         <div class="rules-list">
                           <div class="rules-list-item">
                             <template v-for="(value, valueIndex) of item.ruleDetail">
-                              <div class="row-item row-group" v-if="value.variableType == 1">
+                              <div class="row-item row-group" v-if="value.variableType == 1" :key="valueIndex">
                                 <!-- <div class="hint-item"></div>
                               <div class="label-item">
                                 <div class="text-item"></div>
@@ -250,7 +269,7 @@
                     </div>
                   </div>
                 </div>
-                <div class="row-item" v-else-if="item.ruleType == 'group' && item.isCopy == 1">
+                <div class="row-item" v-else-if="item.ruleType == 'group' && item.isCopy == 1" :key="index">
                   <div class="hint-item">
                     <a-tooltip>
                       <template slot="title">
@@ -266,10 +285,10 @@
                   <div class="input-item">
                     <div class="toolbox-automate-rules-create-content_rules-and-condition_rules">
                       <div class="content">
-                        <div class="rules-list" v-for="(valueElse, valueIndex) of item.ruleDetail">
+                        <div class="rules-list" v-for="(valueElse, valueIndex) of item.ruleDetail" :key="valueIndex+'ruleDetail'">
                           <div class="rules-list-item">
                             <template v-for="(value, valueElseIndex) of valueElse">
-                              <div class="row-item row-group" v-if="value.variableType == 1">
+                              <div class="row-item row-group" v-if="value.variableType == 1" :key="valueElseIndex+'valueElse'">
                                 <!-- <div class="hint-item"></div>
                               <div class="label-item">
                                 <div class="text-item"></div>
@@ -403,6 +422,7 @@
                                 class="rules-list-item-delete"
                                 v-if="item.isCopy == 1"
                                 @click="addData(item, valueElse, valueIndex)"
+                                :key="valueElseIndex"
                               >
                                 {{ valueIndex == 0 ? '复建' : '删除' }}
                               </div>
@@ -419,7 +439,7 @@
         </div>
       </a-spin>
     </div>
-    <switchConfig :disabled="!editShow"/>
+    <switchConfig :disabled="!editShow" v-if="form.mediaType == 1 || form.mediaType == 3" />
     <div class="toolbox-automate-rules-create-body" v-if="editShow">
       <div class="moduler">
         <div class="opt">
@@ -449,6 +469,8 @@ import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 import selectGroup from '@/components/formComponents/selectGroup'
 import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
 import timeRange from '@/components/formComponents/timeRange'
+import scheduleTime from '@/components/formComponents/toutiaoTime'
+import region from '@/components/formComponents/Cascader'
 import switchConfig from './switchConfig'
 let statusList = [
   {
@@ -543,6 +565,8 @@ export default {
     checkBoxGroup,
     timeRange,
     switchConfig,
+    scheduleTime,
+    region,
   },
   data() {
     return {
@@ -944,20 +968,20 @@ export default {
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
           // this.form.rulesList=this.rulesList;
-          console.log(valid, this.form)
-
-          var data = this.form.ruleList.map((item) => {
+          
+          var datas = []
+          datas=this.form.ruleList.map((item) => {
             return {
               ...item,
               ruleDetail: item.ruleDetail.map((end) => {
-                if (isArray(end)) {
+                if (isArray(item.ruleDetail[0])) {
                   var data = end.map((c) => {
                     return {
                       ...c,
-                      threshold: isArray(c.threshold) ? JSON.stringify(c.threshold) : end.threshold,
+                      threshold: isArray(c.threshold) ? JSON.stringify(c.threshold) : c.threshold,
                     }
                   })
-                  return [...data]
+                  return data
                 } else {
                   return {
                     ...end,
@@ -967,10 +991,10 @@ export default {
               }),
             }
           })
-
+          // console.log(data)
           var params = {
             ...this.form,
-            ruleList: data,
+            ruleList: datas,
             accountId: JSON.parse(localStorage.getItem('getRuleDetail')).accountId,
           }
           this.saveLoading = true
@@ -1087,6 +1111,7 @@ export default {
     this.editShow = data.edit
     if (data.edit) {
       this.spinLoading = true
+
       getAction('/ruleTemplate/queryDetailByAccountIdAndTemplateId', {
         templateId: data.id,
         accountId: data.accountId,
@@ -1128,6 +1153,10 @@ export default {
       getAction('/ruleTemplate/previewTemplate', { id: data.id }).then((res) => {
         if (res.success) {
           this.form = res.result
+          var str = ''
+          for (let i = 0; i < 7 * 24; i++) {
+            str += '0'
+          }
           var data = this.form.ruleList.map((item) => {
             return {
               ...item,
@@ -1136,14 +1165,15 @@ export default {
                   var data = end.map((c) => {
                     return {
                       ...c,
-                      threshold: c.modelType == 'tagBox' ? undefined : end.threshold,
+                      threshold:
+                        c.modelType == 'tagBox' ? undefined : c.modelType == 'scheduleTime' ? str : end.threshold,
                     }
                   })
                   return [...data]
                 } else {
                   return {
                     ...end,
-                    threshold: end.modelType == 'tagBox' ? undefined : end.threshold,
+                    threshold: end.modelType == 'tagBox' ? undefined :end.modelType == 'scheduleTime'?str: end.threshold,
                   }
                 }
               }),

+ 81 - 32
src/views/modules/earlyWarningRules/useRuleList.vue

@@ -48,6 +48,11 @@
           <span slot="mediaType" slot-scope="text">
             {{ text | handleMediaType }}
           </span>
+          <span slot="accountStatus" slot-scope="text">
+              <span class="bohui" v-if="text==1"></span>
+              <span class="shenhe" v-if="text==0"></span>
+              {{text?'暂停':'投放中'}}
+          </span>
           <span slot="processMethod" slot-scope="text">
             {{ text == 'SEND' ? '仅发送通知' : '发送并关停组' }}
           </span>
@@ -67,14 +72,14 @@
       </div>
     </div>
     <!-- pushRuleVisible -->
-    <a-modal v-model="pushRuleVisible" title="推送账户选择" @ok="handleOk" :confirmLoading="confirmLoading">
+    <a-modal v-model="pushRuleVisible" title="推送账户选择" @ok="handleOk" :confirmLoading="confirmLoading" width="60%">
       <a-form layout="inline" class="rule-tree-select">
         <a-form-item
           label="请选择账户"
           :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
         >
-          <Treeselect :appId.sync="accountId" :multiple="false" request="1,3" ref="treeSelect" style="width: 100%" />
+          <Treeselect :appId.sync="accountId" :multiple="false" ref="treeSelect" style="width: 100%" />
         </a-form-item>
       </a-form>
     </a-modal>
@@ -83,7 +88,8 @@
 
 <script>
 import moment from 'moment'
-import { getAction, postAction, downFile, downFilePost, deleteAction } from '@/api/manage'
+import Treeselect from './pushTreeSelect.vue'
+import { getAction, postAction, downFile, downFilePost, deleteAction , putAction } from '@/api/manage'
 let existColumns = [
   // {
   //     title: '运行/暂停',
@@ -128,6 +134,15 @@ let existColumns = [
 ]
 
 let recordsColumns = [
+
+    {
+      title: '运行/暂停',
+      dataIndex: 'status',
+      align: 'center',
+      width:100,
+      key: 'status',
+      scopedSlots: { customRender: 'status' }
+  },
   {
     title: '模板名称',
     dataIndex: 'templateName',
@@ -159,6 +174,13 @@ let recordsColumns = [
     scopedSlots: { customRender: 'accountId' },
   },
   {
+    title: '账户状态',
+    dataIndex: 'accountStatus',
+    align: 'center',
+    key: 'accountStatus',
+    scopedSlots: { customRender: 'accountStatus' },
+  },
+  {
     title: '运营',
     dataIndex: 'userName',
     align: 'center',
@@ -174,7 +196,7 @@ let recordsColumns = [
     scopedSlots: { customRender: 'optionsTwo' },
   },
 ]
-import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+
 export default {
   name: 'useRuleList',
   data() {
@@ -349,34 +371,41 @@ export default {
     },
     switchChange(text, record) {
       console.log(text, record)
-      record.spin = true
-      let eventRuleStatus = '1'
-      if (text) {
-        eventRuleStatus = '0'
-      } else {
-        eventRuleStatus = '1'
-      }
+      if(record.accountStatus==0 || record.accountStatus==1&&text){
+        record.spin = true
+        let templateStatus = 0
+        if (text) {
+          templateStatus = 1
+        } else {
+          templateStatus = 0
+        }
 
-      postAction('/alarm/alarmEventRule/edit', {
-        eventRuleId: record.eventRuleId,
-        eventRuleStatus,
-      }).then((res) => {
-        console.log(res)
-        record.spin = false
-        if (res.success) {
-          // this.getTableListHttp()
-          if (text) {
-            record.status = false
-            eventRuleStatus = '0'
+        putAction('/ruleAccountTemplate/edit', {
+          id: record.id,
+          templateStatus,
+        }).then((res) => {
+          console.log(res)
+          record.spin = false
+          if (res.success) {
+            // this.getTableListHttp()
+            if (text) {
+              record.status = false
+              templateStatus = 1
+              this.$message.success('修改成功')
+            } else {
+              record.status = true
+              templateStatus = 0
+              this.$message.success('修改成功')
+            }
           } else {
-            record.status = true
-            eventRuleStatus = '1'
+            this.$message.error('修改失败')
+            // this.getTableListHttp()
           }
-        } else {
-          this.$message.error('修改失败')
-          // this.getTableListHttp()
-        }
-      })
+        })
+      }else{        
+          this.$message.error('当前账户已关停,预警规则不支持开启!')
+      }
+      
     },
 
     getTableListHttp(url) {
@@ -394,7 +423,7 @@ export default {
             this.data = res.result.records.map((item) => {
               return {
                 ...item,
-                status: item.eventRuleStatus == '1' ? true : false,
+                status: item.templateStatus == 0 ? true : false,
                 spin: false,
               }
             })
@@ -402,7 +431,7 @@ export default {
             this.data = res.result.list.map((item) => {
               return {
                 ...item,
-                status: item.eventRuleStatus == '1' ? true : false,
+                status: item.templateStatus == 0 ? true : false,
                 spin: false,
               }
             })
@@ -432,7 +461,7 @@ export default {
           break
 
         case 3:
-          return '头条内广'
+          return '头条'
           break
 
         case 4:
@@ -472,6 +501,26 @@ export default {
     .opts {
       margin-bottom: 15px;
     }
+
+    .shenhe{
+      width: 6px;
+      height: 6px;
+      display: inline-block;
+      background: #52C41A;
+      border-radius: 50%;
+      position: relative;
+      top: -2px;
+    }
+    .bohui{
+      width: 6px;
+      height: 6px;
+      display: inline-block;
+      background: #F5222D;
+      border-radius: 50%;
+      position: relative;
+      top: -2px;
+    }
   }
+
 }
 </style>

+ 2 - 1
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -203,7 +203,8 @@
     </a-modal>
     <a-modal title="拷贝" v-model="visibleCopy" :width="900">
       <a-spin :spinning="copyLoading">
-           <span style="color:red;display:block;width:100%;text-align:center;margin:10px">快手后台抽帧,程序化创意暂不支持被复制</span>
+      <span style="color:red;display:block;width:100%;text-align:center;margin:10px">快手后台抽帧,程序化创意暂不支持被复制</span>
+      <span style="color:red;display:block;width:100%;text-align:center;margin:10px">第三方人群包不能复制</span>
       <a-form :form="form">
         <a-form-item label="广告计划名称" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">

+ 2 - 2
src/views/modules/kuaishouapp/account/stepForm/stepModule/checkMatemal.vue

@@ -117,13 +117,13 @@ export default {
     stopOtherVideo()
   },
   methods: {
-    showCheck(typeName, url, item, typeString, key) {
+    showCheck(typeName, url, item, typeString, key,accountId) {
       this.dataSource = []
       this.visibleMatemal = true
       this.joinVideo.key = key
       this.ipagination.current = 1
       var params = {}
-      params.accountId = localStorage.getItem('accountId')
+      params.accountId = accountId?accountId:localStorage.getItem('accountId')
       params.materialType = typeName
       params.pageSize = this.ipagination.pageSize
       params.pageNo = this.ipagination.current

+ 400 - 0
src/views/modules/kuaishouapp/account/stepForm/stepModule/newSelectRegion.vue

@@ -0,0 +1,400 @@
+<style scoped>
+.transfer {
+  display: flex;
+}
+
+.transfer .transfer-box {
+  width: 350px;
+  height: 250px;
+  border: 1px solid #dadfe3;
+  display: flex;
+  overflow-x: auto;
+  overflow-y: hidden;
+  box-sizing: border-box;
+  margin-right: 25px;
+}
+
+.content-box {
+  min-width: 174px;
+  width: 100%;
+  height: 100%;
+  border-right: 1px solid #dadfe3;
+}
+
+.content-box .content-title {
+  width: 100%;
+  background: #f8f9fa;
+  border-bottom: 1px solid #dadfe3;
+  padding: 5px 15px;
+  font-size: 16px;
+  font-weight: 700;
+  line-height: 30px;
+}
+
+.content-box .content {
+  width: 100%;
+  height: 85%;
+  overflow: auto;
+}
+
+.content-box .content p:hover {
+  background: #edf1f5;
+  cursor: pointer;
+}
+
+.content-box .content p:hover span {
+  display: inline-block;
+}
+
+.content-box .content p span {
+  display: none;
+}
+
+p {
+  padding: 5px;
+  margin-bottom: 0;
+  border-bottom: 1px solid #f2f2f2;
+}
+
+.backgroundOnly {
+  background: #edf1f5;
+}
+</style>
+<style>
+.transfer .ant-checkbox-group {
+  width: 100px;
+  overflow-x: hidden;
+}
+
+.transfer .ant-checkbox-group-item {
+  display: inline-block;
+  margin-right: 8px;
+  width: 100%;
+}
+</style>
+
+<template>
+  <div class="transfer">
+    {{ dataShow }}
+    <region :checkValue.sync="dataShow" :checkList="options"/>
+    <!-- <el-cascader-panel
+      :options="options"
+      :props="{ multiple: true, checkStrictly: false, emitPath: false }"
+      v-model="dataShow"
+      @change="changeShow"
+      @expand-change="openShow"
+      @focus="showElse"
+    ></el-cascader-panel> -->
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { getProvince, postAction } from '@/api/manage'
+import region from './region'
+import $ from 'jquery'
+export default {
+  name: 'select-region',
+  components: { region },
+  data() {
+    return {
+      dataShow: [],
+      showClass: false,
+      showCityData: false,
+      checkData: [],
+      checkMatched: [],
+      province: [],
+      city: [],
+      area: [],
+      CityData: '/kuaishou/batch/getRegion',
+      provinceIndex: null,
+      cityIndex: null,
+      checkAll: false,
+      checkMatchedCity: [],
+      checkAllCity: false,
+      nowProvince: null,
+      loading: false,
+      options: [
+        {
+          value: 'zhinan',
+          label: '指南',
+          children: [
+            {
+              value: 'shejiyuanze',
+              label: '设计原则',
+              children: [
+                {
+                  value: 'yizhi',
+                  label: '一致',
+                },
+                {
+                  value: 'fankui',
+                  label: '反馈',
+                },
+                {
+                  value: 'xiaolv',
+                  label: '效率',
+                },
+                {
+                  value: 'kekong',
+                  label: '可控',
+                },
+              ],
+            },
+            {
+              value: 'daohang',
+              label: '导航',
+              children: [
+                {
+                  value: 'cexiangdaohang',
+                  label: '侧向导航',
+                },
+                {
+                  value: 'dingbudaohang',
+                  label: '顶部导航',
+                },
+              ],
+            },
+          ],
+        },
+        {
+          value: 'zujian',
+          label: '组件',
+          children: [
+            {
+              value: 'basic',
+              label: 'Basic',
+              children: [
+                {
+                  value: 'layout',
+                  label: 'Layout 布局',
+                },
+                {
+                  value: 'color',
+                  label: 'Color 色彩',
+                },
+                {
+                  value: 'typography',
+                  label: 'Typography 字体',
+                },
+                {
+                  value: 'icon',
+                  label: 'Icon 图标',
+                },
+                {
+                  value: 'button',
+                  label: 'Button 按钮',
+                },
+              ],
+            },
+            {
+              value: 'form',
+              label: 'Form',
+              children: [
+                {
+                  value: 'radio',
+                  label: 'Radio 单选框',
+                },
+                {
+                  value: 'checkbox',
+                  label: 'Checkbox 多选框',
+                },
+                {
+                  value: 'input',
+                  label: 'Input 输入框',
+                },
+                {
+                  value: 'input-number',
+                  label: 'InputNumber 计数器',
+                },
+                {
+                  value: 'select',
+                  label: 'Select 选择器',
+                },
+                {
+                  value: 'cascader',
+                  label: 'Cascader 级联选择器',
+                },
+                {
+                  value: 'switch',
+                  label: 'Switch 开关',
+                },
+                {
+                  value: 'slider',
+                  label: 'Slider 滑块',
+                },
+                {
+                  value: 'time-picker',
+                  label: 'TimePicker 时间选择器',
+                },
+                {
+                  value: 'date-picker',
+                  label: 'DatePicker 日期选择器',
+                },
+                {
+                  value: 'datetime-picker',
+                  label: 'DateTimePicker 日期时间选择器',
+                },
+                {
+                  value: 'upload',
+                  label: 'Upload 上传',
+                },
+                {
+                  value: 'rate',
+                  label: 'Rate 评分',
+                },
+                {
+                  value: 'form',
+                  label: 'Form 表单',
+                },
+              ],
+            },
+            {
+              value: 'data',
+              label: 'Data',
+              children: [
+                {
+                  value: 'table',
+                  label: 'Table 表格',
+                },
+                {
+                  value: 'tag',
+                  label: 'Tag 标签',
+                },
+                {
+                  value: 'progress',
+                  label: 'Progress 进度条',
+                },
+                {
+                  value: 'tree',
+                  label: 'Tree 树形控件',
+                },
+                {
+                  value: 'pagination',
+                  label: 'Pagination 分页',
+                },
+                {
+                  value: 'badge',
+                  label: 'Badge 标记',
+                },
+              ],
+            },
+            {
+              value: 'notice',
+              label: 'Notice',
+              children: [
+                {
+                  value: 'alert',
+                  label: 'Alert 警告',
+                },
+                {
+                  value: 'loading',
+                  label: 'Loading 加载',
+                },
+                {
+                  value: 'message',
+                  label: 'Message 消息提示',
+                },
+                {
+                  value: 'message-box',
+                  label: 'MessageBox 弹框',
+                },
+                {
+                  value: 'notification',
+                  label: 'Notification 通知',
+                },
+              ],
+            },
+            {
+              value: 'navigation',
+              label: 'Navigation',
+              children: [
+                {
+                  value: 'menu',
+                  label: 'NavMenu 导航菜单',
+                },
+                {
+                  value: 'tabs',
+                  label: 'Tabs 标签页',
+                },
+                {
+                  value: 'breadcrumb',
+                  label: 'Breadcrumb 面包屑',
+                },
+                {
+                  value: 'dropdown',
+                  label: 'Dropdown 下拉菜单',
+                },
+                {
+                  value: 'steps',
+                  label: 'Steps 步骤条',
+                },
+              ],
+            },
+            {
+              value: 'others',
+              label: 'Others',
+              children: [
+                {
+                  value: 'dialog',
+                  label: 'Dialog 对话框',
+                },
+                {
+                  value: 'tooltip',
+                  label: 'Tooltip 文字提示',
+                },
+                {
+                  value: 'popover',
+                  label: 'Popover 弹出框',
+                },
+                {
+                  value: 'card',
+                  label: 'Card 卡片',
+                },
+                {
+                  value: 'carousel',
+                  label: 'Carousel 走马灯',
+                },
+                {
+                  value: 'collapse',
+                  label: 'Collapse 折叠面板',
+                },
+              ],
+            },
+          ],
+        },
+        {
+          value: 'ziyuan',
+          label: '资源',
+          children: [
+            {
+              value: 'axure',
+              label: 'Axure Components',
+            },
+            {
+              value: 'sketch',
+              label: 'Sketch Templates',
+            },
+            {
+              value: 'jiaohu',
+              label: '组件交互文档',
+            },
+          ],
+        },
+      ],
+    }
+  },
+  computed: {},
+  mounted() {},
+  watch: {},
+  methods: {
+    changeShow() {},
+    openShow(data) {
+      console.log(data)
+    },
+    showElse(data) {
+      console.log(data)
+    },
+  },
+}
+</script>

+ 51 - 0
src/views/modules/kuaishouapp/account/stepForm/stepModule/region.js

@@ -0,0 +1,51 @@
+
+export default {
+    name: 'regionList',
+    props: {
+        checkValue: {
+            type: Array,
+            required: true
+        },
+        checkList: {
+            type: Array,
+            required: true
+        }
+
+    }, data() {
+        return {
+
+            value: []
+        }
+    },
+    methods: {
+        onOpenChange(openKeys) {
+          
+        }
+    },
+    render(h) {
+        const on = {
+            select: obj => {
+                this.selectedKeys = obj.selectedKeys
+                this.$emit('select', obj)
+            },
+            onchange: this.onOpenChange
+        }
+        const props = {
+            mode: '',
+            theme: '',
+            openKeys: this.value
+        }
+        return (
+            <a-checkbox-group vModel={this.value} {...{ props, on: on }}>
+                <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>
+
+
+        )
+    }
+}

+ 183 - 176
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -46,6 +46,7 @@ li:hover {
         <a-radio-button value="3">定向人群</a-radio-button>
         <!-- <a-radio-button value="4">付费人群</a-radio-button> -->
       </a-radio-group>
+      <span style="color: red;margin-left:10px">第三方人群包不能复制</span>
     </a-form-item>
     <a-form-item
       v-if="people == '3'"
@@ -61,12 +62,12 @@ li:hover {
       <div
         :style="{
           border: targeted == '4' ? '1px solid #f2f2f2' : '0',
-          padding: targeted == '4' ? '20px' : '0'
+          padding: targeted == '4' ? '20px' : '0',
         }"
         v-clickoutside="targetedShow"
       >
-        <div style="display:flex;margin-top:15px" v-if="targeted == '4' || targeted == '2'">
-          <span style="white-space:nowrap;width:10%" v-if="targeted == '4'">定向池:</span>
+        <div style="display: flex; margin-top: 15px" v-if="targeted == '4' || targeted == '2'">
+          <span style="white-space: nowrap; width: 10%" v-if="targeted == '4'">定向池:</span>
           <a-input
             placeholder="请至少选择一个自定义人群"
             @focus="
@@ -80,7 +81,7 @@ li:hover {
         </div>
 
         <div
-          style="background:white;padding:10px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);"
+          style="background: white; padding: 10px; box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15)"
           :style="{ width: targeted == '4' ? '90%' : '100%', marginLeft: targeted == '4' ? '10%' : '0' }"
           v-show="topMiddle"
         >
@@ -89,24 +90,24 @@ li:hover {
             :dataSource="dataList"
             bordered
             :pagination="false"
-            :scroll="{ y: 300 ,x:true }"
+            :scroll="{ y: 300, x: true }"
             :rowSelection="{
               selectedRowKeys: selectedRowKeys,
               onChange: onSelectChange,
-              getCheckboxProps: getCheckboxProps
+              getCheckboxProps: getCheckboxProps,
             }"
           >
             <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
             <span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
             <span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
           </a-table>
-          <div style="text-align:right">
-            <a-button style="margin-right:5px" @click="topMiddle = false">取消</a-button>
+          <div style="text-align: right">
+            <a-button style="margin-right: 5px" @click="topMiddle = false">取消</a-button>
             <a-button type="primary" @click="okSelect">确定</a-button>
           </div>
         </div>
-        <div style="display:flex;margin-top:15px" v-if="targeted == '4' || targeted == '3'">
-          <span style="white-space:nowrap;width:10%" v-if="targeted == '4'">排除池:</span>
+        <div style="display: flex; margin-top: 15px" v-if="targeted == '4' || targeted == '3'">
+          <span style="white-space: nowrap; width: 10%" v-if="targeted == '4'">排除池:</span>
           <a-input
             placeholder="请至少选择一个自定义人群"
             @focus="
@@ -120,7 +121,7 @@ li:hover {
         </div>
 
         <div
-          style="background:white;padding:10px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);"
+          style="background: white; padding: 10px; box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15)"
           :style="{ width: targeted == '4' ? '90%' : '100%', marginLeft: targeted == '4' ? '10%' : '0' }"
           v-show="topMiddleNo"
         >
@@ -129,19 +130,19 @@ li:hover {
             :dataSource="dataList"
             bordered
             :pagination="false"
-            :scroll="{ y: 300 ,x:true}"
+            :scroll="{ y: 300, x: true }"
             :rowSelection="{
               selectedRowKeys: selectedRowKeysNo,
               onChange: onSelectChangeNo,
-              getCheckboxProps: getCheckboxPropsNo
+              getCheckboxProps: getCheckboxPropsNo,
             }"
           >
             <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
             <span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
             <span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
           </a-table>
-          <div style="text-align:right">
-            <a-button style="margin-right:5px" @click="topMiddleNo = false">取消</a-button>
+          <div style="text-align: right">
+            <a-button style="margin-right: 5px" @click="topMiddleNo = false">取消</a-button>
             <a-button type="primary" @click="okSelectNo">确定</a-button>
           </div>
         </div>
@@ -156,7 +157,7 @@ li:hover {
         <a-radio-button value="noLimit">不限</a-radio-button>
         <a-radio-button value="limit">指定地区</a-radio-button>
       </a-radio-group>
-      <div v-if="allForm.regionType == 'limit'" style="margin-top:10px">
+      <div v-if="allForm.regionType == 'limit'" style="margin-top: 10px">
         <select-region :checkData.sync="allForm.region" :dataValue="allForm.region" />
       </div>
     </a-form-item>
@@ -191,8 +192,8 @@ li:hover {
             'age',
             {
               rules: [{ required: true, message: '请选择年龄段' }, { validator: handleConfirmValue }],
-              initialValue: [10, 50]
-            }
+              initialValue: [10, 50],
+            },
           ]"
         />
       </div>
@@ -207,8 +208,8 @@ li:hover {
         v-decorator="[
           'gender',
           {
-            initialValue: 0
-          }
+            initialValue: 0,
+          },
         ]"
       >
         <a-radio-button :value="0">不限</a-radio-button>
@@ -238,8 +239,8 @@ li:hover {
         v-decorator="[
           'androidOsv',
           {
-            initialValue: 3
-          }
+            initialValue: 3,
+          },
         ]"
       >
         <a-radio :value="3">不限</a-radio>
@@ -260,8 +261,8 @@ li:hover {
         v-decorator="[
           'iosOsv',
           {
-            initialValue: 6
-          }
+            initialValue: 6,
+          },
         ]"
       >
         <a-radio :value="6">不限</a-radio>
@@ -281,10 +282,10 @@ li:hover {
         <a-radio-button value="0">不限</a-radio-button>
         <a-radio-button value="1">选择品牌</a-radio-button>
       </a-radio-group>
-      <div v-if="allForm.device == '1'" style="width:120%">
+      <div v-if="allForm.device == '1'" style="width: 120%">
         <a-checkbox-group
           v-decorator="['deviceBrand', { rules: [{ required: true, message: '请选择设备品牌' }] }]"
-          style="width:120%"
+          style="width: 120%"
         >
           <a-checkbox :value="1">OPPO</a-checkbox>
           <a-checkbox :value="2">VIVO</a-checkbox>
@@ -309,10 +310,10 @@ li:hover {
         <a-radio-button value="0">不限</a-radio-button>
         <a-radio-button value="1">选择价格</a-radio-button>
       </a-radio-group>
-      <div v-if="allForm.price == '1'" style="width:120%">
+      <div v-if="allForm.price == '1'" style="width: 120%">
         <a-checkbox-group
           v-decorator="['devicePrice', { rules: [{ required: true, message: '请选择设备价格' }] }]"
-          style="width:120%"
+          style="width: 120%"
         >
           <a-checkbox :value="1">1500以下</a-checkbox>
           <a-checkbox :value="2">1501~2000</a-checkbox>
@@ -331,7 +332,7 @@ li:hover {
       label="APP行为"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == 1&&allForm.platform_os&&lol=='1'"
+      v-if="allForm.platform_os == 1 && allForm.platform_os && lol == '1'"
     >
       <a-radio-group buttonStyle="solid" v-model="allForm.appType" @change="getAppType">
         <a-radio-button value="0">不限</a-radio-button>
@@ -343,7 +344,7 @@ li:hover {
       label=" "
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == 1 && allForm.appType == '1'&&lol=='1'"
+      v-if="allForm.platform_os == 1 && allForm.appType == '1' && lol == '1'"
       class="else-label"
     >
       <a-select
@@ -363,43 +364,51 @@ li:hover {
       label=" "
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="allForm.platform_os == 1 && allForm.appType == '2'&&lol=='1'"
+      v-if="allForm.platform_os == 1 && allForm.appType == '2' && lol == '1'"
       class="else-label"
     >
-      <div style="position:relative;" v-clickoutside="handleClose">
+      <div style="position: relative" v-clickoutside="handleClose">
         <a-input
           placeholder="请输入搜索内容"
           @change="getAppAll"
           @focus="getAppAllElse"
-          style="width:100%;position:relative;"
+          style="width: 100%; position: relative"
           v-model="appListValue"
         />
         <div
-          style="width:100%;position:absolute;z-index:10;height:200px;background:white;overflow:auto;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);"
+          style="
+            width: 100%;
+            position: absolute;
+            z-index: 10;
+            height: 200px;
+            background: white;
+            overflow: auto;
+            box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
+          "
           v-if="closeDialog"
         >
           <ul>
-            <li style="padding:0 10px">
+            <li style="padding: 0 10px">
               <a-checkbox
-                style="float:left;margin:0 5px"
+                style="float: left; margin: 0 5px"
                 @change="onCheckAllChange"
                 :indeterminate="indeterminate"
                 :checked="checkAll"
               ></a-checkbox
               >全选
             </li>
-            <a-checkbox-group @change="onChange" v-model="checkArr" class="home-card" style="width:100%">
-              <li style="padding:0 10px;width:100%;" v-for="item of optionsApp" :key="item.appId">
-                <a-checkbox :value="item.appId" style="float:left;margin:0 5px"></a-checkbox>{{ item.appName }}
+            <a-checkbox-group @change="onChange" v-model="checkArr" class="home-card" style="width: 100%">
+              <li style="padding: 0 10px; width: 100%" v-for="item of optionsApp" :key="item.appId">
+                <a-checkbox :value="item.appId" style="float: left; margin: 0 5px"></a-checkbox>{{ item.appName }}
               </li>
             </a-checkbox-group>
           </ul>
         </div>
-        <div style="width:100%" v-if="optionsAll.length > 0">
+        <div style="width: 100%" v-if="optionsAll.length > 0">
           <a-button @click="clearAll">清空</a-button>
           <br />
           <a-tag v-for="item of optionsAll" :key="item" closable :afterClose="() => log(item)">
-            {{ showAppName(item)?showAppName(item):item }}
+            {{ showAppName(item) ? showAppName(item) : item }}
           </a-tag>
         </div>
       </div>
@@ -408,22 +417,24 @@ li:hover {
       label="商业兴趣"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-       v-if="lol=='1'"
+      v-if="lol == '1'"
     >
       <a-radio-group buttonStyle="solid" @change="businessInterest" v-model="allForm.businessInterestType">
         <a-radio-button :value="0">不限</a-radio-button>
         <a-radio-button :value="1">智能推荐</a-radio-button>
         <a-radio-button :value="2">兴趣标签</a-radio-button>
       </a-radio-group>
-      <br>
-      <span v-if="allForm.businessInterestType==1">商业兴趣定向会根据您的投放计划,智能精选出最匹配人群,帮助您获取更满足投放意图的人群,以达到最好的投放效果。</span>
+      <br />
+      <span v-if="allForm.businessInterestType == 1"
+        >商业兴趣定向会根据您的投放计划,智能精选出最匹配人群,帮助您获取更满足投放意图的人群,以达到最好的投放效果。</span
+      >
     </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.businessInterestType == 2&&lol=='1'"
+      v-if="allForm.businessInterestType == 2 && lol == '1'"
     >
       <a-select
         mode="multiple"
@@ -448,8 +459,8 @@ li:hover {
         v-decorator="[
           'network',
           {
-            initialValue: 0
-          }
+            initialValue: 0,
+          },
         ]"
       >
         <a-radio-button :value="0">不限</a-radio-button>
@@ -462,7 +473,7 @@ li:hover {
       label="网红粉丝"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="lol=='1'"
+      v-if="lol == '1'"
     >
       <a-radio-group buttonStyle="solid" v-model="allForm.fansStar" @change="fansStar">
         <a-radio-button value="0">不限</a-radio-button>
@@ -474,7 +485,7 @@ li:hover {
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       class="else-label"
-      v-if="allForm.fansStar == '1'&&lol=='1'"
+      v-if="allForm.fansStar == '1' && lol == '1'"
     >
       <a-select
         mode="multiple"
@@ -494,7 +505,7 @@ li:hover {
       label="兴趣视频用户"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="lol=='1'"
+      v-if="lol == '1'"
     >
       <a-radio-group buttonStyle="solid" v-model="allForm.interestVideo" @change="interestVideo">
         <a-radio-button value="0">不限</a-radio-button>
@@ -506,7 +517,7 @@ li:hover {
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       class="else-label"
-      v-if="allForm.interestVideo == '1'&&lol=='1'"
+      v-if="allForm.interestVideo == '1' && lol == '1'"
     >
       <a-select
         mode="multiple"
@@ -533,7 +544,7 @@ li:hover {
             initialValue: '0'
           }
         ]" -->
-     <a-radio-group buttonStyle="solid" v-decorator="['filterConvertedLevel',{initialValue: 0}]">
+      <a-radio-group buttonStyle="solid" v-decorator="['filterConvertedLevel', { initialValue: 0 }]">
         <a-radio-button :value="0">不限</a-radio-button>
         <a-radio-button :value="1">广告组</a-radio-button>
         <a-radio-button :value="2">广告计划</a-radio-button>
@@ -546,7 +557,7 @@ li:hover {
       label="智能扩量"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      v-if="lol=='1'"
+      v-if="lol == '1'"
     >
       <!-- v-decorator="[
           'isOpen',
@@ -564,7 +575,7 @@ li:hover {
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       class="else-label"
-      v-if="allForm.isOpen == 1&&lol=='1'"
+      v-if="allForm.isOpen == 1 && lol == '1'"
     >
       <a-checkbox :disabled="allForm.ageType == 'noLimit'" :checked="allForm.noAgeBreak" @change="getAge"
         >不可突破年龄</a-checkbox
@@ -572,7 +583,10 @@ li:hover {
       <a-checkbox :disabled="getData('gender') == '0'" :checked="allForm.noGenderBreak" @change="getGender"
         >不可突破性别</a-checkbox
       >
-      <a-checkbox :disabled="allForm.regionType != 'limit'||allForm.region.length==0" :checked="allForm.noAreaBreak" @change="getArea"
+      <a-checkbox
+        :disabled="allForm.regionType != 'limit' || allForm.region.length == 0"
+        :checked="allForm.noAreaBreak"
+        @change="getArea"
         >不可突破地域</a-checkbox
       >
     </a-form-item>
@@ -611,7 +625,7 @@ const clickoutside = {
     // 解除事件监听
     document.removeEventListener('click', el.__vueClickOutside__)
     delete el.__vueClickOutside__
-  }
+  },
 }
 
 const columns = [
@@ -619,7 +633,7 @@ const columns = [
     title: '人群',
     dataIndex: 'orientationName',
     scopedSlots: { customRender: 'orientationName' },
-    width: 150
+    width: 150,
   },
   {
     title: '属性',
@@ -641,22 +655,18 @@ const columns = [
       { text: '固化标签', value: '14' },
       { text: '行业偏好', value: '15' },
       { text: '第三方标签', value: '16' },
-      { text: '产品关键词', value: '17' }
+      { text: '产品关键词', value: '17' },
     ],
-    onFilter: (value, record) =>
-      record.populationType
-        .toString()
-        .toLowerCase()
-        .includes(value.toLowerCase()),
+    onFilter: (value, record) => record.populationType.toString().toLowerCase().includes(value.toLowerCase()),
     scopedSlots: { customRender: 'populationType' },
-    width: 150
+    width: 150,
   },
   {
     title: '创建时间',
     dataIndex: 'putTime',
     scopedSlots: { customRender: 'putTime' },
-    sorter: (a, b) => a.putTime - b.putTime
-  }
+    sorter: (a, b) => a.putTime - b.putTime,
+  },
 ]
 
 export default {
@@ -667,20 +677,20 @@ export default {
       type: String,
       default() {
         return null
-      }
+      },
     },
     platform: {
       default() {
         return null
-      }
+      },
     },
     populationData: {},
-    lol:{
-      type:String,
-      default(){
-        return "1"
-      }
-    }
+    lol: {
+      type: String,
+      default() {
+        return '1'
+      },
+    },
   },
   filters: {
     getDate(value) {
@@ -697,7 +707,7 @@ export default {
         1: 'Android应用下载',
         2: 'Android网页游戏',
         3: 'iOS应用下载',
-        4: 'iOS网页游戏'
+        4: 'iOS网页游戏',
       }
       return data[str]
     },
@@ -719,10 +729,10 @@ export default {
         14: '固化标签',
         15: '行业偏好',
         16: '第三方标签',
-        17: '产品关键词'
+        17: '产品关键词',
       }
       return data[str]
-    }
+    },
   },
   watch: {
     platform(n, o) {
@@ -749,10 +759,10 @@ export default {
           this.allForm.noAreaBreak = n.noAreaBreak == '0' ? false : true
           this.selectedRowKeys = n.population ? n.population : []
           this.selectedRowKeysNo = n.excludePopulation ? n.excludePopulation : []
-          this.optionsAll = n.appIds?(typeof n.appIds)=='string'? JSON.parse(n.appIds):n.appIds:[]
+          this.optionsAll = n.appIds ? (typeof n.appIds == 'string' ? JSON.parse(n.appIds) : n.appIds) : []
           this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
           this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
-          this.getPeople().then(res => {
+          this.getPeople().then((res) => {
             if (n.excludePopulation) {
               this.keyValueNo = ''
               this.selectedRowKeysValueNo = []
@@ -762,7 +772,7 @@ export default {
                     this.keyValueNo += res[i].orientationName + '   '
                     this.selectedRowKeysValueNo.push({
                       orientationId: res[i].orientationId,
-                      orientationName: res[i].orientationName
+                      orientationName: res[i].orientationName,
                     })
                     this.selectedRowKeysNo.push()
                   }
@@ -778,7 +788,7 @@ export default {
                     this.keyValue += res[i].orientationName + '   '
                     this.selectedRowKeysValue.push({
                       orientationId: res[i].orientationId,
-                      orientationName: res[i].orientationName
+                      orientationName: res[i].orientationName,
                     })
                   }
                 }
@@ -800,7 +810,7 @@ export default {
                 'deviceBrand',
                 'devicePrice',
                 'businessInterest',
-                'filterConvertedLevel'
+                'filterConvertedLevel',
               ])
             )
           })
@@ -827,10 +837,10 @@ export default {
             isOpen: 0,
             noAgeBreak: false,
             noGenderBreak: false,
-            noAreaBreak: false
+            noAreaBreak: false,
           }
         }
-      }
+      },
     },
     checkArr(n, o) {
       console.log(n, o)
@@ -853,7 +863,7 @@ export default {
   directives: { clickoutside },
   data() {
     return {
-      optionsAll:[],
+      optionsAll: [],
       formAll: this.$form.createForm(this),
       marks: {
         5: '5岁',
@@ -866,12 +876,12 @@ export default {
         40: '40岁',
         45: '45岁',
         50: '50岁',
-        55: '55岁'
+        55: '55岁',
       },
       step: 0,
       loading: false,
       checkArr: [],
-      appListValue:"",
+      appListValue: '',
       checkAll: false,
       allForm: {
         regionType: 'noLimit',
@@ -894,7 +904,7 @@ export default {
         topMiddle: false,
         topMiddleNo: false,
         keyValue: '',
-        keyValueNo: ''
+        keyValueNo: '',
       },
       options: [],
       optionsAll: [],
@@ -903,7 +913,7 @@ export default {
         label: 'name',
         children: 'children',
         multiple: true,
-        emitPath: false
+        emitPath: false,
         // checkStrictly: true
       },
       optionsApp: [],
@@ -917,7 +927,7 @@ export default {
         label: 'tagName',
         children: 'children',
         multiple: true,
-        emitPath: false
+        emitPath: false,
       },
       getApp: '0',
       closeDialog: false,
@@ -935,20 +945,20 @@ export default {
       selectedRowKeysNo: [],
       selectedRowKeysValueNo: [],
       dataList: [],
-      dataElse:[]
+      dataElse: [],
     }
   },
   computed: {},
   methods: {
     getPeople() {
       return new Promise((resolve, reject) => {
-        getAction('/kuaishou/batch/getPopulationList', { accountId: localStorage.getItem('accountId') }).then(res => {
+        getAction('/kuaishou/batch/getPopulationList', { accountId: localStorage.getItem('accountId') }).then((res) => {
           if (res.success) {
             if (res.result) {
               this.dataList = res.result.map((item, index) => {
                 return {
                   ...item,
-                  key: index
+                  key: index,
                 }
               })
               this.dataElse = this.dataList
@@ -968,28 +978,28 @@ export default {
     },
     onSelectChange(selectedRowKeys, selectionRows) {
       this.selectedRowKeys = selectedRowKeys
-      this.selectedRowKeysValue = selectionRows.map(item => {
+      this.selectedRowKeysValue = selectionRows.map((item) => {
         return { orientationId: item.orientationId, orientationName: item.orientationName }
       })
     },
     getCheckboxProps(record) {
       return {
         props: {
-          disabled: this.selectedRowKeysValueNo.some(item => item.orientationId === record.orientationId)
-        }
+          disabled: this.selectedRowKeysValueNo.some((item) => item.orientationId === record.orientationId),
+        },
       }
     },
     onSelectChangeNo(selectedRowKeys, selectionRows) {
       this.selectedRowKeysNo = selectedRowKeys
-      this.selectedRowKeysValueNo = selectionRows.map(item => {
+      this.selectedRowKeysValueNo = selectionRows.map((item) => {
         return { orientationId: item.orientationId, orientationName: item.orientationName }
       })
     },
     getCheckboxPropsNo(record) {
       return {
         props: {
-          disabled: this.selectedRowKeysValue.some(item => item.orientationId === record.orientationId)
-        }
+          disabled: this.selectedRowKeysValue.some((item) => item.orientationId === record.orientationId),
+        },
       }
     },
     okSelect() {
@@ -1006,19 +1016,19 @@ export default {
         this.keyValueNo += this.selectedRowKeysValueNo[i].orientationName + '   '
       }
     },
-    showOne(){
-    //    this.keyValueNo =orientationName
-        var data = this.keyValue.split('   ')
-        this.dataList = this.dataElse.filter(item => {
-          return item.orientationName.toLowerCase().indexOf(data[data.length-1].toLowerCase()) > -1
-        })
+    showOne() {
+      //    this.keyValueNo =orientationName
+      var data = this.keyValue.split('   ')
+      this.dataList = this.dataElse.filter((item) => {
+        return item.orientationName.toLowerCase().indexOf(data[data.length - 1].toLowerCase()) > -1
+      })
     },
-    showTwo(){
-    //    this.keyValueNo =orientationName
-        var data = this.keyValueNo.split('   ')
-        this.dataList = this.dataElse.filter(item => {
-          return item.orientationName.toLowerCase().indexOf(data[data.length-1].toLowerCase()) > -1
-        })
+    showTwo() {
+      //    this.keyValueNo =orientationName
+      var data = this.keyValueNo.split('   ')
+      this.dataList = this.dataElse.filter((item) => {
+        return item.orientationName.toLowerCase().indexOf(data[data.length - 1].toLowerCase()) > -1
+      })
     },
     getAge(e) {
       this.allForm.noAgeBreak = e.target.checked
@@ -1044,20 +1054,18 @@ export default {
       }
     },
     showAppName(appId) {
-        if(this.checkOptions.length>0){
-            var data = this.checkOptions.filter(item => {
-                return item.appId == appId
-            })
-            if(data[0]){
-              return data[0].appName
-            }else{
-              return null
-            }
-            
-        }else{
-            return null
+      if (this.checkOptions.length > 0) {
+        var data = this.checkOptions.filter((item) => {
+          return item.appId == appId
+        })
+        if (data[0]) {
+          return data[0].appName
+        } else {
+          return null
         }
-     
+      } else {
+        return null
+      }
     },
     log(appId) {
       var index = this.optionsAll.findIndex((item) => item === appId)
@@ -1070,9 +1078,9 @@ export default {
     handleClose(e) {
       this.closeDialog = false
     },
-    targetedShow(e){
-        this.topMiddle = false
-        this.topMiddleNo = false
+    targetedShow(e) {
+      this.topMiddle = false
+      this.topMiddleNo = false
     },
     clearAll() {
       this.checkArr = []
@@ -1083,24 +1091,24 @@ export default {
       this.indeterminate =
         !!checkedList.length &&
         checkedList.length <
-          this.optionsApp.map(item => {
+          this.optionsApp.map((item) => {
             return item.appId
           }).length
       this.checkAll =
         checkedList.length ===
-        this.optionsApp.map(item => {
+        this.optionsApp.map((item) => {
           return item.appId
         }).length
     },
     onCheckAllChange(e) {
       Object.assign(this, {
         checkArr: e.target.checked
-          ? this.optionsApp.map(item => {
+          ? this.optionsApp.map((item) => {
               return item.appId
             })
           : [],
         indeterminate: false,
-        checkAll: e.target.checked
+        checkAll: e.target.checked,
       })
       if (this.optionsAll.length > 20) {
         this.$message.error('最多选择20个APP行为')
@@ -1127,32 +1135,32 @@ export default {
             json.appIds = this.optionsAll
           }
           if (this.allForm.regionType == 'limit') {
-            json.region = this.allForm.region.map(item => {
+            json.region = this.allForm.region.map((item) => {
               return item.value
             })
           }
           var jsonData = {}
-          if(this.people == '3'){
+          if (this.people == '3') {
             if (this.targeted == '2') {
-                jsonData.population = this.selectedRowKeysValue.map(item => {
+              jsonData.population = this.selectedRowKeysValue.map((item) => {
                 return item.orientationId
-                })
+              })
             } else if (this.targeted == '3') {
-                jsonData.excludePopulation = this.selectedRowKeysValueNo.map(item => {
+              jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
                 return item.orientationId
-                })
+              })
             } else if (this.targeted == '4') {
-                jsonData.population = this.selectedRowKeysValue.map(item => {
+              jsonData.population = this.selectedRowKeysValue.map((item) => {
                 return item.orientationId
-                })
-                jsonData.excludePopulation = this.selectedRowKeysValueNo.map(item => {
+              })
+              jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
                 return item.orientationId
-                })
+              })
             } else {
-                jsonData = {}
+              jsonData = {}
             }
           }
-          
+
           var dataJson = {
             ...values,
             platformOs: this.allForm.platform_os,
@@ -1163,7 +1171,7 @@ export default {
             noGenderBreak: this.allForm.noGenderBreak ? 1 : 0,
             noAreaBreak: this.allForm.noAreaBreak ? 1 : 0,
             allForm: this.allForm,
-            ...jsonData
+            ...jsonData,
           }
           this.$emit('update:populationData', dataJson)
         }
@@ -1186,42 +1194,42 @@ export default {
     },
     search(e) {},
     put() {
-      var data = this.allForm.region.map(item => {
+      var data = this.allForm.region.map((item) => {
         return item[1] + ''
       })
-      var dataElse = data.map(item => {
+      var dataElse = data.map((item) => {
         return [item.substring(0, 2), item]
       })
     },
-    getAppAllElse(e){
-        this.checkArr = this.optionsAll
-        // this.getAppAll()
-        
-        if(this.appListValue!=''){
-           getAction('/kuaishou/batch/getAppSearch', {
-              accountId: localStorage.getItem('accountId'),
-              appName: e.target.value
-            }).then(res => {
-              if (res.result) {
-                this.optionsApp = res.result
-                this.checkOptions.push(...res.result)
-                this.closeDialog = true
-              } else {
-                this.optionsApp = []
-                this.closeDialog = false
-              }
-            })
-        }else {
-          this.optionsApp = []
-          this.closeDialog = false
-        }
+    getAppAllElse(e) {
+      this.checkArr = this.optionsAll
+      // this.getAppAll()
+
+      if (this.appListValue != '') {
+        getAction('/kuaishou/batch/getAppSearch', {
+          accountId: localStorage.getItem('accountId'),
+          appName: e.target.value,
+        }).then((res) => {
+          if (res.result) {
+            this.optionsApp = res.result
+            this.checkOptions.push(...res.result)
+            this.closeDialog = true
+          } else {
+            this.optionsApp = []
+            this.closeDialog = false
+          }
+        })
+      } else {
+        this.optionsApp = []
+        this.closeDialog = false
+      }
     },
     getAppAll(e) {
       if (e.target.value !== '') {
         getAction('/kuaishou/batch/getAppSearch', {
           accountId: localStorage.getItem('accountId'),
-          appName: e.target.value
-        }).then(res => {
+          appName: e.target.value,
+        }).then((res) => {
           if (res.result) {
             this.optionsApp = res.result
             this.checkOptions.push(...res.result)
@@ -1241,7 +1249,7 @@ export default {
       this.formAll.setFieldsValue({ appInterest: [] })
       this.checkArr = []
       if (e.target.value == '1') {
-        getAction('/kuaishou/batch/getTargetList', { tagType: 'APP_INTEREST' }).then(res => {
+        getAction('/kuaishou/batch/getTargetList', { tagType: 'APP_INTEREST' }).then((res) => {
           if (res.success) {
             this.optionsApp = res.result
           }
@@ -1268,7 +1276,7 @@ export default {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     },
     getDataType(type, dataList) {
-      getAction('/kuaishou/batch/getTargetList', { tagType: type }).then(res => {
+      getAction('/kuaishou/batch/getTargetList', { tagType: type }).then((res) => {
         if (res.success) {
           this[dataList] = res.result
         }
@@ -1276,15 +1284,14 @@ export default {
     },
     getData(className) {
       return this.formAll.getFieldValue(className)
-    }
+    },
   },
-  mounted: function() {
+  mounted: function () {
     this.getDataType('APP_INTEREST', 'optionsAppActive')
     this.getDataType('BUSINESS_INTEREST', 'businessOptions')
     this.getDataType('FANS_STAR', 'fansStarOptions')
     this.getDataType('INTEREST_VIDEO', 'interestVideoOptions')
-
-  }
+  },
 }
 </script>
 

+ 3 - 2
src/views/modules/kuaishouapp/crossAccount/createCampaign.vue

@@ -380,9 +380,10 @@ export default {
             console.log(res)
             if (res.success) {
               this.$message.success('创建成功')
-              localStorage.setItem('campaignId', res.result)
+              localStorage.setItem('crossAccountCampaign', JSON.stringify(res.result))
               this.loading = false
-              this.nextStep(res.result)
+              this.$router.replace({ path: '/crossAccount/createUnit' })
+              this.$bus.$emit('remove', '/crossAccount/createCampaign')
             } else {
               this.$message.error(res.message)
               this.loading = false

Diff do ficheiro suprimidas por serem muito extensas
+ 2263 - 0
src/views/modules/kuaishouapp/crossAccount/createCreative.vue


Diff do ficheiro suprimidas por serem muito extensas
+ 1674 - 123
src/views/modules/kuaishouapp/crossAccount/createUnit.vue


+ 43 - 0
src/views/modules/kuaishouapp/crossAccount/data.json

@@ -0,0 +1,43 @@
+{
+    "account": {
+        "accountId": 23212,
+        "accountName": "环球黑卡",
+        "campaignAgreement": 0,
+        "unitCount": 1,
+        "allianceAccount": true,
+        "campaignType": 2,
+        "campaignList": [
+            {
+                "campaignId": 1231231,
+                "campaignName": "测试",
+                "check": 1,
+                "unit": [
+                    {
+                        "name": "",
+                        "directional": "",
+                        "allianceAccount": "1"
+                    },
+                    {
+                        "name": "",
+                        "directional": "",
+                        "allianceAccount": "1"
+                    }
+                ],
+                "unitIdentical": {
+                    "unitName": "",
+                    "directional": "",
+                    "allianceAccount": "1"
+                }
+            }
+        ],
+        "campaignOne": {
+            "unitNames": [
+                {
+                    "value": ""
+                }
+            ],
+            "directional": "",
+            "allianceAccount": "1"
+        }
+    }
+}

+ 196 - 0
src/views/modules/kuaishouapp/crossAccount/templateModal.vue

@@ -0,0 +1,196 @@
+<style>
+#table_time_selected1 tr {
+  border: 1px solid rgb(102, 162, 243);
+}
+
+.plug-timer-grid th {
+  line-height: 25px;
+}
+
+.group-creat .ant-form-item-required::before {
+  display: inline-block;
+  margin-right: 4px;
+  color: #f5222d;
+  font-size: 14px;
+  font-family: SimSun, sans-serif;
+  line-height: 1;
+  content: '';
+}
+
+.else-label .ant-form-item-label label::after {
+  content: '';
+  position: relative;
+  top: -0.5px;
+  margin: 0 8px 0 2px;
+}
+</style>
+<template>
+  <a-modal v-model="visible" title="定向模板" :width="1100" v-if="visible">
+    <a-spin :spinning="spinning">
+      <a-form @submit="handleSubmit" :form="form">
+        <a-form-item
+          label="模板名称"
+          :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+          :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
+        >
+          <a-input
+            v-decorator="['templateName', { rules: [{ required: true, message: '模板名称必填' }] }]"
+            :disabled="type == 'look'"
+          ></a-input>
+        </a-form-item>
+        <targeted-population ref="population" :populationData.sync="populationData" />
+      </a-form>
+    </a-spin>
+    <template slot="footer">
+      <a-button type="primary" @click="handleSubmit" :loading="loading"> 确定 </a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
+import moment from 'moment'
+import { mapGetters } from 'vuex'
+import jq from 'jquery'
+
+import targetedPopulation from '@/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue'
+import pick from 'lodash.pick'
+export default {
+  name: 'new-mould',
+  components: {
+    targetedPopulation,
+  },
+  data() {
+    return {
+      visible: false,
+      spinning: false,
+      form: this.$form.createForm(this),
+
+      populationData: {},
+      accountId: '',
+      type: 'add',
+      loading: false,
+    }
+  },
+  computed: {},
+  methods: {
+    create(accountId, type) {
+      this.spinning = false
+      this.visible = true
+      this.type = type
+      this.populationData = {}
+      this.accountId = accountId
+    },
+    handleOk(accountId, templateId, type) {
+      this.spinning = true
+      this.visible = true
+      this.type = type
+      var params = {}
+      params.templateId = templateId
+      getAction('/batch/kuaishouTemplateTarget/getDetailByTemplateId', params).then((res) => {
+        if (res.success) {
+          var dataJson = {
+            ...res.result.base,
+            ...res.result.detail,
+          }
+
+          this.populationData = dataJson
+          this.populationData.population = dataJson.population ? JSON.parse(dataJson.population) : null
+          this.populationData.excludePopulation = dataJson.excludePopulation
+            ? JSON.parse(dataJson.excludePopulation)
+            : null
+
+          this.populationData.devicePrice = dataJson.devicePrice ? JSON.parse(dataJson.devicePrice) : null
+          this.populationData.appInterest = dataJson.appInterest ? JSON.parse(dataJson.appInterest) : null
+          this.populationData.businessInterest = dataJson.businessInterest
+            ? JSON.parse(dataJson.businessInterest)
+            : null
+          this.populationData.fansStar = dataJson.fansStar ? JSON.parse(dataJson.fansStar) : null
+          this.populationData.interestVideo = dataJson.interestVideo ? JSON.parse(dataJson.interestVideo) : null
+          this.populationData.deviceBrand = dataJson.deviceBrand ? JSON.parse(dataJson.deviceBrand) : null
+
+          this.populationData.age = dataJson.ageMin ? [dataJson.ageMin, dataJson.ageMax] : []
+          this.populationData.agesRange = dataJson.agesRange ? JSON.parse(dataJson.agesRange) : []
+          this.populationData.devicePrice = dataJson.devicePrice ? dataJson.devicePrice : null
+          this.populationData.allForm = {}
+          this.populationData.allForm.regionType =
+            dataJson.region && JSON.parse(dataJson.region).length > 0 ? 'limit' : 'noLimit'
+
+          this.populationData.allForm.region = dataJson.region
+          // postAction('/kuaishou/batch/getRegionDetail', {
+          //   regionArr: dataJson.region
+          // }).then(res => {
+          //   console.log(res, 11111)
+          //   if (res.success) {
+          //     this.populationData.allForm.region = res.result
+          //   }
+          // })
+
+          this.populationData.allForm.ageType =
+            dataJson.agesRange.length > 0 ? 'ageLimit' : dataJson.ageMin ? 'ageCustom' : 'noLimit'
+          this.populationData.allForm.device = dataJson.deviceBrand ? '1' : '0'
+          this.populationData.allForm.price = dataJson.devicePrice ? '1' : '0'
+          this.populationData.allForm.appType = dataJson.appInterest ? '1' : dataJson.appIds ? '2' : '0'
+          this.populationData.allForm.fansStar = dataJson.fansStar ? '1' : '0'
+          this.populationData.allForm.interestVideo = dataJson.interestVideo ? '1' : '0'
+          this.populationData.allForm.platform_os = dataJson.platformOs
+          this.populationData.allForm.businessInterestType = dataJson.businessInterest ? 2 : 0
+          this.populationData.allForm.isOpen = dataJson.isOpen
+          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, ['templateName']))
+            this.spinning = false
+          })
+        }
+      })
+    },
+    handleCancel(e) {
+      this.visible = false
+    },
+    handleSubmit(e) {
+      //   this.$refs.population.handleSubmit()
+
+      e.preventDefault()
+      this.$refs.population.handleSubmit()
+      this.form.validateFieldsAndScroll((err, values) => {
+        if (!err) {
+          this.loading = true
+
+          var params = {
+            ...this.populationData,
+            templateName: values.templateName,
+            accountId: this.accountId,
+          }
+
+          if (this.type == 'add') {
+            postAction('/batch/kuaishouTemplate/createTemplate', params).then((res) => {
+              if (res.success) {
+                this.visible = false
+                this.loading = false
+
+                getAction('/batch/kuaishouTemplate/getTemplateByAccountId', {
+                  accountId: this.accountId,
+                }).then((res) => {
+                  if (res.success) {
+                    this.$emit('getData', this.accountId)
+                  }
+                })
+              } else {
+                this.loading = false
+                this.$message.error(res.result.message)
+              }
+            })
+          } else if (this.type == 'look') {
+            this.visible = false
+          }
+        }
+      })
+    },
+  },
+}
+</script>

+ 236 - 59
src/views/modules/workBench/designLeader/platForm.vue

@@ -7,11 +7,11 @@
                     <img src="@/assets/touxiang.png"  alt="">
                 </div>  
                 <div class='tip'>
-                    <p class="greet">早安,{{userInfo.username}},祝你开心每一天!</p>
+                    <p class="greet">{{getTimeState()}},{{roleInfo.realname}},祝你开心每一天!</p>
                     <p class="descPosition">
-                        <span>运营经理</span>
+                        <span>{{roleInfo.roleName}}</span>
                         <a-divider type="vertical" />
-                        <span>华北地区-头条事业部</span>
+                        <span>{{roleInfo.area}}地区-{{roleInfo.departName}}</span>
                     </p>
                 </div>
             </div>
@@ -30,16 +30,16 @@
                                     <span>待确定的订单</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.toDecided||0}} <span>个</span></p>
                                 </div>                               
                             </div>
-                            <div class="item" @click="goOrderList(2)">                               
+                            <div class="item" @click="goMaterialList(4)">                               
                                 <div class="title">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
-                                    <span>待指派的订单</span>
+                                    <span>待指派的物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.toPayOut||0}} <span>个</span></p>
                                 </div>                               
                             </div>
                             
@@ -49,7 +49,7 @@
                                     <span>我参与的物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.myMaterial||0}} <span>个</span></p>
                                 </div>                               
                             </div>
                             
@@ -59,7 +59,7 @@
                                     <span>被驳回的物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.rejectMaterial||0}} <span>个</span></p>
                                 </div>                                
                             </div>
                             <div class="item" @click="goOrderList(3)">                               
@@ -68,7 +68,7 @@
                                     <span>已完成的订单</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.finishOrder||0}} <span>个</span></p>
                                 </div>                              
                             </div>
                            
@@ -78,7 +78,7 @@
                                     <span>全部订单</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.allOrder||0}} <span>个</span></p>
                                 </div>                               
                             </div>
                             
@@ -88,32 +88,40 @@
                     <div class="leftBottom">
                         <div class="sectionHead">
                             订单进度
-                             <a-button type="link" class="allOrder" @click="goOrderList(4)">全部订单</a-button>
+                             <!-- <a-button type="link" class="allOrder" @click="goOrderList(4)">全部订单</a-button> -->
                         </div>
-                        <div class="orderProgress">
-                            <ul class="orderProgress-list">
+                        <a-spin :spinning="orderProgressSpinning">
+                        <div class="orderProgress">                            
+                            <ul class="orderProgress-list" v-if="orderProgressList.length>0">
                                 <li v-for="(item,index) in orderProgressList" :key="index"  >
                                     
                                     <div style="display:flex;align-items: center;" class="orderProgress-list-item" @click="orderDetail(item)">
                                         <div style="display:flex;width:80%; align-items: center;" >
                                             <span class="item-icon"></span>
                                             <div class="content">
-                                                <p class="name">我是一个任务名称嗷嗷嗷啊</p>
-                                                <p class="desc">这是对这个任务的简介,所以得好好寻…</p>
+                                                <p class="name">{{item.orderTitle}}</p>
+                                                <p class="desc">{{item.orderRemark}}</p>
                                             </div>
                                         </div>
                                         
-                                        <div class="progress">
-                                            <a-progress type="circle" :percent="75" :width='30' :showInfo='false'  :strokeWidth='10' />
-                                            <span style="margin-left:15px">75%</span>
+                                        <div class="progress" v-if="item.orderStatus==1||item.orderStatus==3">
+                                            <a-progress type="circle" :percent="(item.materialFinishAmount/item.materialAmount)*100" :width='30' :showInfo='false'  :strokeWidth='10' />
+                                            <span style="margin-left:15px">{{(item.materialFinishAmount/item.materialAmount)*100}}%</span>
+                                        </div>
+                                        <div class="progress" v-else>
+                                            {{item.orderStatus|handleOrderStatus}}
                                         </div>
                                     </div>
                                     
                                 </li>
                             </ul>
+                            <div   v-else style="width:100%;height:585px;line-height:585px;text-align:center">                               
+                                <img src="@/assets/nodata.png" alt="" style="width:300px;text-align:center">
+                            </div>
                             <!-- hideOnSinglePage -->
-                            <a-pagination size="small" :total="totalPage" :current='currentPage' class="fenye" :change='pageChange'  show-size-changer show-quick-jumper hideOnSinglePage />
+                            <a-pagination size="small" :total="totalPage" :current='currentPage' class="fenye" :pageSize='8' @change='pageChange'   show-quick-jumper hideOnSinglePage />                            
                         </div>
+                        </a-spin>
                     </div>
                 </div>
                 <div class="sectionRightBox">
@@ -121,37 +129,25 @@
                         <div class="sectionHead">
                             操作记录
                         </div>
+                        <a-spin :spinning="spinning">
                         <div class="optionRecordList">
-                            <a-timeline>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
+                            
+                            <a-timeline >
+                                <a-timeline-item color='#F0F2F5' style="height:46px" v-for="(item,index) in operateRecordList" :key="index">
+                                <p style="margin-bottom:0px">
+                                    <span class="content-item">{{item.userName}}{{item.operate}}{{item.materialName||item.orderTitle}}</span> 
+                                    <span class="time">{{item.time}}</span>
+                                </p>
                                 </a-timeline-item>
                                 
                             </a-timeline>
+
+                           
+                            
                         </div>
+                        </a-spin>
                     </div>
-                    <div class="rightBottom">
+                    <!-- <div class="rightBottom">
                         <div class="sectionHead">
                             本周项目燃尽图
                         </div>
@@ -168,7 +164,7 @@
                                 </p>
                              </div>
                         </div>
-                    </div>
+                    </div> -->
                 </div>
                 
             </div>
@@ -184,12 +180,15 @@ export default {
     name:'designlearder-platform',
     data() {
         return {
+            spinning:false,
+            moment,
+            roleInfo:{},
+            orderProgressSpinning:false,
+            countInfo:{},
             touxiang:'@/assets/touxiang.png',
             // 订单进度
             orderProgressList:[
-                {},
-                {},
-                {}
+               
             ],
 
             // 操作记录
@@ -202,7 +201,9 @@ export default {
             totalPage:0,
             currentPage:1,
             userInfo:{},
-            roleCode:''
+            roleCode:'',
+            operateRecordList:[],
+            TimerObj:null
         }
     },
     methods: {
@@ -224,12 +225,131 @@ export default {
         },
         // 分页页码改变
         pageChange(page, pageSize){
-
+            // console.log(page,pageSize)
+            this.currentPage=page;
+            this.getOrderList()
         },
         // 全部订单
         allOrder() {
             this.$router.push('/workBench/orderList')
         },
+        // 获取订单列表
+        getOrderList(){
+            this.orderProgressSpinning=true;
+            let params={
+                design:this.userInfo.id,
+                pageNo:this.currentPage,
+                pageSize:10,
+            }
+            getAction('/platform/order/listByCreatorOrDesignLeader',params).then(res=>{
+                console.log(res);
+                this.loading=false;
+                this.orderProgressSpinning=false;
+                if(res.success){
+                    this.orderProgressList=res.result.list;
+                    this.totalPage=res.result.total;
+
+                }
+            })
+        },
+        // 操作记录
+        getOperationRecord(){
+            this.spinning=true;
+            getAction('/platform/operateRecord/createDesc').then(res=>{
+                console.log(res)
+                 this.spinning=false;
+                if(res.success){
+                    this.operateRecordList=res.result.list.map((item,index)=>{
+                       
+                            let time='';
+                            let startTime=moment(item.createTime)
+                            console.log() 
+                            if(moment().diff(startTime,'minutes')>60){
+                                time=item.createTime.split(/[ ]+/)[1]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }else if(moment().diff(startTime,'minutes')>=1){
+                                time=moment().diff(startTime,'minutes')+'分钟前'
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }else if(moment().diff(startTime,'minutes')==0){
+                                time=moment().diff(startTime,'seconds')+'秒前'
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }
+                        
+                        
+                    });
+
+                   
+                }
+            })
+        },
+        
+        scrollRecord(){
+            console.log(this.$refs.scrollRecord);
+            this.TimerObj=setInterval(()=>{
+                this.getOperationRecord()
+
+            },60000)            
+        },
+
+        // 获取工作台内容
+        getPlantformInfo(){
+            getAction('/platform/query/jobContent').then(res=>{
+                console.log(res)
+                if(res.success){
+                    if(this.$parent.role=='operator'){
+                        this.countInfo=res.result.operatorJobContent
+                    }else if(this.$parent.role=='design'){
+                        this.countInfo=res.result.designJobContent
+                    }else if(this.$parent.role=='designLeader'){
+                        this.countInfo=res.result.designLeaderJobContent
+                    }
+                }
+            })
+        },
+
+
+         getTimeState () {
+            // 获取当前时间
+            let timeNow = new Date();
+            // 获取当前小时
+            let hours = timeNow.getHours();
+            // 设置默认文字
+            let text = ``;
+            // 判断当前时间段
+            if (hours >= 0 && hours <= 5) {
+                text = `凌晨好`;
+            }else if(hours >= 6 && hours <= 9){
+                text = `早上好`;
+            } else if(hours > 9 && hours <= 12){
+                text = `上午好`;
+            }else if (hours > 12 && hours <= 14) {
+                text = `中午好`;
+            } else if (hours > 14 && hours <= 18) {
+                text = `下午好`;
+            } else if (hours > 18 && hours <= 24) {
+                text = `晚上好`;
+            }
+            // 返回当前时间段对应的状态
+            return text
+        },
+
+        getidentity(){
+            getAction('/platform/query/identity',{}).then(res=>{
+                console.log(res);
+                if(res.success){
+                    this.roleInfo=res.result
+                }
+            })
+        }
         
     },
     mounted(){
@@ -238,9 +358,54 @@ export default {
             this.userInfo=JSON.parse(userInfo).value
         }
         this.roleCode=localStorage.getItem('roleCode')
+        this.getOrderList()
+        this.getOperationRecord()
+        this.scrollRecord()
+        this.getPlantformInfo()
+        this.getidentity();
+    },
+    beforeDestroy(){
+        clearInterval(this.TimerObj)
+    },
+    activated(){
+        let userInfo=localStorage.getItem('pro__Login_Userinfo');
+        if(userInfo){
+            this.userInfo=JSON.parse(userInfo).value
+        }
+        this.roleCode=localStorage.getItem('roleCode')
+        this.getOrderList()
+        this.getOperationRecord()
         
-        
-    }
+        this.getPlantformInfo()
+        this.getidentity();
+    },
+    filters:{
+        handleOrderStatus(val){
+            let text
+            switch (val) {
+                case 0:
+                    text='待接单'
+                    break;
+                case 1:
+                    text='制作中'
+                    break;
+                case 2:
+                    text='已驳回'
+                    break;
+                case 3:
+                    text='已完成'
+                    break;
+                case -1:
+                    text='已撤回'
+                    break;
+            
+                default:
+                    text='出错'
+                    break;
+            }
+            return text
+        }
+    },
 }
 
 </script>
@@ -383,6 +548,8 @@ export default {
                     background: white;
                     .orderProgress{
                         padding: 0 20px;
+                        height: 585px;
+                        position: relative;
                         .orderProgress-list-item{
                             padding: 10px 0;
                             display: flex;
@@ -430,35 +597,45 @@ export default {
                         .fenye{
                             padding: 20px 0;
                             text-align: right;
+                            position: absolute;
+                            right: 20px;
+                            bottom: 0;
                         }
                     }
                 }
             }
             .sectionRightBox{
                 width: 29.5%;
-                // background: white;
+                background: white;
                 margin-left: 12px;
+                height: 1023px;
                 .rightTop{
-                    height: 370px;
-                     background: white;
+                   
+                    
                      .optionRecordList{
-                         padding: 20px;
+                         margin: 20px;
+                          padding: 10px 0;
+                         box-sizing: border-box;
+                          height: 928px;
+                        //  overflow: auto;
+                        overflow: hidden;
                          p{
                              width: 100%;
                          }
                         .content-item{
-                            width: 80%;
+                            width: 70%;
                             display: inline-block;
                             overflow: hidden;
                             text-overflow: ellipsis;
                             white-space: nowrap;
                         }
                         .time{
-                            width: 20%;
+                            width: 30%;
                             display: inline-block;
                             overflow: hidden;
                             text-overflow: ellipsis;
                             white-space: nowrap;
+                            text-align: right;
                         }
                      }
                 }

+ 2 - 2
src/views/modules/workBench/designPeople/index.vue

@@ -11,7 +11,7 @@ import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
 
 export default {
     components:{
-        designrPlatform: () => import('./platForm'), 
+        designPlatform: () => import('./platForm'), 
         orderList: () => import('../orderList'), 
         orderDetail: () => import('../orderDetail'), 
         materialList: () => import('../materialList'), 
@@ -19,7 +19,7 @@ export default {
 
     data() {
         return {
-            currentTabComponent:'designrPlatform',
+            currentTabComponent:'designPlatform',
             orderStatus:undefined,//跳转到订单详情时需要里面的参数  status订单参数 role 当前角色
             role:'design',
             materialStatus:undefined,

+ 246 - 60
src/views/modules/workBench/designPeople/platForm.vue

@@ -7,11 +7,11 @@
                     <img src="@/assets/touxiang.png"  alt="">
                 </div>  
                 <div class='tip'>
-                    <p class="greet">早安,{{userInfo.username}},祝你开心每一天!</p>
+                    <p class="greet">{{getTimeState()}},{{roleInfo.realname}},祝你开心每一天!</p>
                     <p class="descPosition">
-                        <span>运营经理</span>
+                        <span>{{roleInfo.roleName}}</span>
                         <a-divider type="vertical" />
-                        <span>华北地区-头条事业部</span>
+                        <span>{{roleInfo.area}}地区-{{roleInfo.departName}}</span>
                     </p>
                 </div>
             </div>
@@ -30,7 +30,7 @@
                                     <span>指派给我的物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.myMaterial || 0}} <span>个</span></p>
                                 </div>
                                 
                             </div>
@@ -40,7 +40,7 @@
                                     <span>被驳回的物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.rejectMaterial || 0}} <span>个</span></p>
                                 </div>                                
                             </div>
                             
@@ -50,7 +50,7 @@
                                     <span>已完成的物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.finishMaterial || 0}} <span>个</span></p>
                                 </div>                              
                             </div>
                             <div class="item" @click="goMaterialList(4)">                                
@@ -59,7 +59,7 @@
                                     <span>全部物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count" >60 <span>个</span></p>
+                                    <p class="count" >{{countInfo.allMaterial || 0}} <span>个</span></p>
                                 </div>                                
                             </div>
                         </div>  
@@ -67,32 +67,43 @@
                     <div class="leftBottom">
                         <div class="sectionHead">
                             订单进度
-                             <a-button type="link" class="allOrder" @click="allOrder">全部订单</a-button>
+                             <!-- <a-button type="link" class="allOrder" @click="goOrderList(4)">全部订单</a-button> -->
                         </div>
+                        <a-spin :spinning="orderProgressSpinning">
                         <div class="orderProgress">
-                            <ul class="orderProgress-list">
+                            
+                            <ul class="orderProgress-list" v-if="orderProgressList.length>0">
                                 <li v-for="(item,index) in orderProgressList" :key="index"  >
-                                    <router-link to="/workBench/orderDetail" style="display:block;width:100%">
-                                    <div style="display:flex;align-items: center;" class="orderProgress-list-item">
+                                    
+                                    <div style="display:flex;align-items: center;" class="orderProgress-list-item" @click="orderDetail(item)">
                                         <div style="display:flex;width:80%; align-items: center;" >
                                             <span class="item-icon"></span>
                                             <div class="content">
-                                                <p class="name">我是一个任务名称嗷嗷嗷啊</p>
-                                                <p class="desc">这是对这个任务的简介,所以得好好寻…</p>
+                                                <p class="name">{{item.orderTitle}}</p>
+                                                <p class="desc">{{item.orderRemark}}</p>
                                             </div>
                                         </div>
                                         
-                                        <div class="progress">
-                                            <a-progress type="circle" :percent="75" :width='30' :showInfo='false'  :strokeWidth='10' />
-                                            <span style="margin-left:15px">75%</span>
+                                        <div class="progress" v-if="item.orderStatus==1||item.orderStatus==3">
+                                            <a-progress type="circle" :percent="(item.materialFinishAmount/item.materialAmount)*100" :width='30' :showInfo='false'  :strokeWidth='10' />
+                                            <span style="margin-left:15px">{{(item.materialFinishAmount/item.materialAmount)*100}}%</span>
+                                        </div>
+                                        <div class="progress" v-else>
+                                            {{item.orderStatus|handleOrderStatus}}
                                         </div>
                                     </div>
-                                    </router-link>
+                                    
                                 </li>
                             </ul>
+                            <div   v-else style="width:100%;height:585px;line-height:585px;text-align:center">
+                               
+                                <img src="@/assets/nodata.png" alt="" style="width:300px;text-align:center">
+                            </div>
                             <!-- hideOnSinglePage -->
-                            <a-pagination size="small" :total="totalPage" :current='currentPage' class="fenye" :change='pageChange'  show-size-changer show-quick-jumper hideOnSinglePage />
+                            <a-pagination size="small" :total="totalPage" :current='currentPage' :pageSize='8' class="fenye" @change='pageChange'   show-quick-jumper hideOnSinglePage />
+                            
                         </div>
+                        </a-spin>
                     </div>
                 </div>
                 <div class="sectionRightBox">
@@ -100,37 +111,25 @@
                         <div class="sectionHead">
                             操作记录
                         </div>
+                        <a-spin :spinning="spinning">
                         <div class="optionRecordList">
-                            <a-timeline>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
+                            
+                            <a-timeline >
+                                <a-timeline-item color='#F0F2F5' style="height:46px" v-for="(item,index) in operateRecordList" :key="index">
+                                <p style="margin-bottom:0px">
+                                    <span class="content-item">{{item.userName}}{{item.operate}}{{item.materialName||item.orderTitle}}</span> 
+                                    <span class="time">{{item.time}}</span>
+                                </p>
                                 </a-timeline-item>
                                 
                             </a-timeline>
+
+                           
+                            
                         </div>
+                        </a-spin>
                     </div>
-                    <div class="rightBottom">
+                    <!-- <div class="rightBottom">
                         <div class="sectionHead">
                             本周项目燃尽图
                         </div>
@@ -147,7 +146,7 @@
                                 </p>
                              </div>
                         </div>
-                    </div>
+                    </div> -->
                 </div>
                 
             </div>
@@ -163,12 +162,14 @@ export default {
     name:'design-platform',
     data() {
         return {
+            spinning:false,
+            moment,
+            roleInfo:{},
+            orderProgressSpinning:false,
             touxiang:'@/assets/touxiang.png',
             // 订单进度
             orderProgressList:[
-                {},
-                {},
-                {}
+                
             ],
 
             // 操作记录
@@ -181,10 +182,18 @@ export default {
             totalPage:0,
             currentPage:1,
             userInfo:{},
-            roleCode:''
+            roleCode:'',
+            operateRecordList:[],
+            TimerObj:null,
+            countInfo:{},
         }
     },
     methods: {
+        orderDetail(item){
+            console.log(item)
+            this.$parent.currentTabComponent='orderDetail';
+            this.$parent.orderId=item.id
+        },
          goOrderList(val){
             console.log(val);
             // console.log(this.$parent)
@@ -198,7 +207,9 @@ export default {
         },
         // 分页页码改变
         pageChange(page, pageSize){
-
+            this.currentPage=page;
+            // console.log(page,pageSize)
+            this.getOrderList()
         },
         // 全部订单
         allOrder() {
@@ -208,6 +219,125 @@ export default {
         sendOrder(){
             this.$router.push('/workBench/placeOrder')
         },
+        
+        // 获取订单列表
+        getOrderList(){
+            this.orderProgressSpinning=true;
+            let params={
+                design:this.userInfo.id,
+                pageNo:this.currentPage,
+                pageSize:8,
+            }
+            getAction('/platform/order/listByCreatorOrDesignLeader',params).then(res=>{
+                console.log(res);
+                this.loading=false;
+                this.orderProgressSpinning=false;
+                if(res.success){
+                    
+                    this.orderProgressList=res.result.list;
+                    this.totalPage=res.result.total;
+
+                }
+            })
+        },
+
+        // 操作记录
+        getOperationRecord(){
+            this.spinning=true;
+            getAction('/platform/operateRecord/createDesc').then(res=>{
+                console.log(res)
+                this.spinning=false;
+                if(res.success){
+                    this.operateRecordList=res.result.list.map((item,index)=>{
+                        
+                        let time='';
+                        let startTime=moment(item.createTime)
+                        console.log() 
+                        if(moment().diff(startTime,'minutes')>60){
+                            time=item.createTime.split(/[ ]+/)[1]
+                            return {
+                                ...item,
+                                time,
+                            }
+                        }else if(moment().diff(startTime,'minutes')>=1){
+                            time=moment().diff(startTime,'minutes')+'分钟前'
+                            return {
+                                ...item,
+                                time,
+                            }
+                        }else if(moment().diff(startTime,'minutes')==0){
+                            time=moment().diff(startTime,'seconds')+'秒前'
+                            return {
+                                ...item,
+                                time,
+                            }
+                        }
+                        
+                    });
+
+                    
+                }
+            })
+        },
+        
+        scrollRecord(){
+            console.log(this.$refs.scrollRecord);
+            this.TimerObj=setInterval(()=>{
+                this.getOperationRecord()
+
+            },60000)            
+        },
+
+        // 获取工作台内容
+        getPlantformInfo(){
+            getAction('/platform/query/jobContent').then(res=>{
+                console.log(res)
+                if(res.success){
+                    if(this.$parent.role=='operator'){
+                        this.countInfo=res.result.operatorJobContent
+                    }else if(this.$parent.role=='design'){
+                        this.countInfo=res.result.designJobContent
+                    }else if(this.$parent.role=='designLeader'){
+                        this.countInfo=res.result.designLeaderJobContent
+                    }
+                }
+            })
+        },
+
+         getTimeState () {
+            // 获取当前时间
+            let timeNow = new Date();
+            // 获取当前小时
+            let hours = timeNow.getHours();
+            // 设置默认文字
+            let text = ``;
+            // 判断当前时间段
+            if (hours >= 0 && hours <= 5) {
+                text = `凌晨好`;
+            }else if(hours >= 6 && hours <= 9){
+                text = `早上好`;
+            } else if(hours > 9 && hours <= 12){
+                text = `上午好`;
+            }else if (hours > 12 && hours <= 14) {
+                text = `中午好`;
+            } else if (hours > 14 && hours <= 18) {
+                text = `下午好`;
+            } else if (hours > 18 && hours <= 24) {
+                text = `晚上好`;
+            }
+            // 返回当前时间段对应的状态
+            return text
+        },
+
+        getidentity(){
+            getAction('/platform/query/identity',{}).then(res=>{
+                console.log(res);
+                if(res.success){
+                    this.roleInfo=res.result
+                }
+            })
+        }
+        
     },
     mounted(){
         let userInfo=localStorage.getItem('pro__Login_Userinfo');
@@ -215,9 +345,53 @@ export default {
             this.userInfo=JSON.parse(userInfo).value
         }
         this.roleCode=localStorage.getItem('roleCode')
-        
-        
-    }
+        this.getOrderList()
+        this.getOperationRecord()
+        this.scrollRecord()
+        this.getPlantformInfo()
+        this.getidentity()
+    },
+    activated(){
+        let userInfo=localStorage.getItem('pro__Login_Userinfo');
+        if(userInfo){
+            this.userInfo=JSON.parse(userInfo).value
+        }
+        this.roleCode=localStorage.getItem('roleCode')
+        this.getOrderList()
+        this.getOperationRecord()
+        this.getPlantformInfo()
+        this.getidentity()
+    },
+    beforeDestroy(){
+        clearInterval(this.TimerObj)
+    },
+    filters:{
+        handleOrderStatus(val){
+            let text
+            switch (val) {
+                case 0:
+                    text='待接单'
+                    break;
+                case 1:
+                    text='制作中'
+                    break;
+                case 2:
+                    text='已驳回'
+                    break;
+                case 3:
+                    text='已完成'
+                    break;
+                case -1:
+                    text='已撤回'
+                    break;
+            
+                default:
+                    text='出错'
+                    break;
+            }
+            return text
+        }
+    },
 }
 
 </script>
@@ -360,6 +534,8 @@ export default {
                     background: white;
                     .orderProgress{
                         padding: 0 20px;
+                        height: 585px;
+                        position: relative;
                         .orderProgress-list-item{
                             padding: 10px 0;
                             display: flex;
@@ -407,37 +583,47 @@ export default {
                         .fenye{
                             padding: 20px 0;
                             text-align: right;
+                            position: absolute;
+                            right: 20;
+                            bottom: 0px;
                         }
                     }
                 }
             }
             .sectionRightBox{
                 width: 29.5%;
-                // background: white;
+                background: white;
                 margin-left: 12px;
+                height: 1023px;
                 .rightTop{
-                    height: 370px;
-                     background: white;
-                     .optionRecordList{
-                         padding: 20px;
+                   
+                    
+                    .optionRecordList{
+                        margin: 20px;
+                        padding: 10px 0;
+                        box-sizing: border-box;
+                          height: 928px;
+                        //  overflow: auto;
+                        overflow: hidden;
                          p{
                              width: 100%;
                          }
                         .content-item{
-                            width: 80%;
+                            width: 70%;
                             display: inline-block;
                             overflow: hidden;
                             text-overflow: ellipsis;
                             white-space: nowrap;
                         }
                         .time{
-                            width: 20%;
+                            width: 30%;
                             display: inline-block;
                             overflow: hidden;
                             text-overflow: ellipsis;
                             white-space: nowrap;
+                            text-align: right;
                         }
-                     }
+                    }
                 }
                 .rightBottom{
                     margin-top: 12px;

Diff do ficheiro suprimidas por serem muito extensas
+ 1246 - 191
src/views/modules/workBench/materialList.vue


+ 1 - 0
src/views/modules/workBench/operator/index.vue

@@ -19,6 +19,7 @@ export default {
             role:'operator',
             materialStatus:undefined,
             orderId:undefined,
+            isEdit:false,
         }
     },
     components:{   

+ 335 - 138
src/views/modules/workBench/operator/materialList.vue

@@ -227,14 +227,19 @@
     }
 }
 .videoBox{
-    width: 320px;
-    height: 180px;
+   
+    height: 240px;
 }
 .imgBox{
-    width: 100%;
-    height: 180px;
+   
+  width: 90%;
+}
+.videomarterialInfo{
+    position: relative;
+    height: 800px;
 }
 .marterialInfo{
+    overflow: auto;
     
     p{margin-bottom: 0;}
     ul,li{
@@ -245,11 +250,13 @@
         margin-bottom: 20px;
         display: flex;
         // justify-content: center;
-        align-items: center;
+        align-items: flex-start;
         span{
             display: inline-block;
             width: 70px;
             text-align: left;
+            flex-shrink: 0;
+            text-align: right;
         }
         .ant-tag{
             width: auto;
@@ -258,10 +265,13 @@
         }
     }
     .info{
+        width: 100%;
         ul{
+            width: 100%;
             display: flex;
             justify-content: space-between;
             flex-wrap: wrap;
+            width: 100%;
         }
         li{
             width: 33.3%;
@@ -269,14 +279,26 @@
         }
         margin-bottom: 0;
     }
+    
     .bottom-btn{
-        width: 100%;
+        width: 100%; 
         text-align: center;
         position: absolute;
-        bottom: 20px;
+        bottom: 0px;
         left: 0;
+        // margin-top: 20px;
 
     }
+    .scriptbottom-btn{
+        width: 100%; 
+        // height: 60px;  
+        line-height: 60px;   
+        text-align: center;
+        position: absolute;
+        bottom: 20px;
+        left: 0;
+       
+    }
 }
 </style>
 
@@ -316,7 +338,7 @@
                 <div class="section-item">
                     <div class="tabBox">
                         
-                        <div class="search-item">
+                        <!-- <div class="search-item">
                             <span>名称:</span>
                             <a-input placeholder="请输入订单名称" allow-clear v-model="materialName" style="width:300px" />
                         </div>
@@ -333,7 +355,7 @@
                         <div class="opt-item">
                             <a-button type='primary' @click="search" style="margin-right:20px">查询</a-button>
                             <a-button type='default' @click="reset">查询</a-button>
-                        </div>
+                        </div> -->
                     </div>
                         
                     
@@ -350,35 +372,26 @@
                             >
                             <div slot="materialStatus" slot-scope="text" >
                                 <span class="wancheng" v-if="text==7"> </span>
-                                <span class="bohui" v-else-if="text==6||text==4"> </span>
+                                <span class="bohui" v-else-if="text==6||text==3"> </span>
                                 <span class="shenhe" v-else> </span>
-                                {{text | handleMaterialStatus}}
+                                {{text | handlerMaterialStatus}}
                             </div>
                             <div slot="scriptStatus" slot-scope="text,record">
-                                <div v-if="text==0||text==2">脚本未上传</div>
-                                <div v-if="text==1">
-                                    <a href="javascript:;" @click="scriptViewDetails(record)">预览</a>
-                                    <a-divider type="vertical" />
-                                    <a href="javascript:;" @click="scriptApproved(record)">通过</a>
-                                    <a-divider type="vertical" />
-                                    <a href="javascript:;" @click="scriptReject(record)">驳回</a>
-                                </div>
-                                <div v-if="text==3">
-                                     <a href="javascript:;" @click="scriptViewDetails(record)">预览</a>
-                                </div>
+                                <span v-if="record.materialStatus==0">-</span>
+                                <span v-else>
+                                     <a href="javascript:;" @click="scriptViewDetails(record)">{{record.planName}}</a>
+                                </span>
                             </div>
                             <div slot="videoStatus" slot-scope="text,record">
-                                <div v-if="text==0||text==2">视频未上传</div>
-                                <div v-if="text==1">
-                                    <a href="javascript:;" @click="viewDetails(record)">预览</a>
-                                    <a-divider type="vertical" />
-                                    <a href="javascript:;" @click="approved(record)">通过</a>
-                                    <a-divider type="vertical" />
-                                    <a href="javascript:;" @click="reject(record)">驳回</a>
-                                </div>
-                                <div v-if="text==3">
-                                     <a href="javascript:;" @click="viewDetails(record)">预览</a>
-                                </div>
+                                <span v-if="record.materialStatus==0">-</span>
+                                <span v-else>
+                                     <a href="javascript:;" @click="viewDetails(record)">{{record.clipName}}</a>
+                                </span>
+                            </div>
+                            <div slot="orderTitle" slot-scope="text,record">
+                               
+                                <a href="javascript:;" @click="goOrderDetail(record)">{{text}}</a>
+                                
                             </div>
                            
 
@@ -386,110 +399,135 @@
                     </div>
                     <a-drawer
                     title="视频详情"
-                    width="640"
+                    width="700"
                     :placement="placement"
                     :closable="false"
                     :visible="visible"
                     @close="onClose"
                     >
-                        <div class="videoBody">
-                            <div class="videoBox">
-                                <video :src="currentMaterial.src" ></video>
-                            </div>
-                            
-                            <div class="imgBox">
-                                <img src="" alt="">
-                                <img src="" alt="">
-                            </div>
-                        </div>
-                        <div class="marterialInfo">
+
+                        <div class="marterialInfo videomarterialInfo">
                             <div class="info-item">
-                                <span>素材状态:</span>
-                                <p>未审核</p>
+                                <span>视频状态:</span>
+                                <p>{{ currentVideo.videoStatus | handlerVideoStatus }}</p>
                             </div>
                             <div class="info-item">
-                                <span>生成水印:</span>
-                                <a-select :defaultValue="4" v-model="size" style="width:70%;">
-                                    <a-select-option :value="item.id" :key="item.id" v-for="item of sizeType">{{
-                                        item.name
-                                    }}</a-select-option>
-                                </a-select>
-                                
+                                <span>视频预览:</span>
+                                <div class="videoBox" v-if="currentVideo.videoStatus==1||currentVideo.videoStatus==3">
+                                    <video style="height:100%" :src="currentVideo.url" v-if="currentVideo.url" controls></video>
+                                    <img :src="defaultPic" alt="" style="height:100%" v-else>
+                                </div>
                             </div>
                             <div class="info-item">
+                                <span>封面预览:</span>
+                                <div class="imgBox">
+                                    <img  alt="" style="width:100px;margin:0 10px 8px 0" v-for="(item,index) in currentVideo.imgList" :key='index' :src="item">                                   
+                                </div>
+                            </div>
+                            <div class="info-item" v-if="currentVideo.videoStatus==1">
                                 <span>视频标签:</span>
-                                <a-tag>Tag 1</a-tag>
-                                <a-tag>Tag 1</a-tag>
+                                <p>
+                                    <a-tag v-for="(item,index) in currentVideo.tagList" :key="index" style="margin-bottom:8px">{{item}}</a-tag>
+                                    <!-- {{currentVideo.tag}} -->
+                                </p>
                             </div>
                             <div class="info-item info">
                                 <ul>
-                                    <li><span>视频时长:</span> 17秒 </li>
-                                    <li><span>视频尺寸:</span> 1080*1920 </li>
-                                    <li><span>视频大小:</span> 31.42M </li>
-                                    <li><span>策划:</span> 吴永前 </li>
-                                    <li><span>拍摄:</span> 吴永前 </li>
-                                    <li><span>剪辑:</span> 吴永前 </li>                                    
+                                   
+                                    <li><span>编导:</span> {{ currentVideo.planName }} </li>
+                                    <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
+                                    <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>                                    
                                 </ul>
                             </div>
-                            <div class="info-item">
-                                <span>广告语:</span>
-                                <p>14354534324454354水电费水电费方式手动</p>
+                            <div class="info-item" v-if="currentVideo.videoStatus==2">
+                                <span>驳回理由:</span>
+                                <p>{{ currentVideo.videoAdvise }}</p>
                             </div>
+                            
                             <div class="bottom-btn">
-                                <a-button type='primary' @click="approved" style="margin-right:20px">通过审核</a-button>
-                                <a-button type='default' @click="reject">驳回</a-button>
+                                <a-button type='primary' @click="approved" v-if="currentMaterial.materialStatus==5" :loading='acceptLoading' style="margin-right:20px">通过审核</a-button>                               
+                                <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="currentMaterial.materialStatus==5"  style="margin-right:20px">驳回</a-button>
+                                                            
+                                <a-button type='default' @click="onClose">关闭</a-button>
                             </div>
+                            
+                            
                         </div>
                     </a-drawer>
                     <a-drawer
                     title="脚本详情"
-                    width="640"
+                    width="600"
                     :placement="placement"
                     :closable="false"
                     :visible="scriptVisible"
                     @close="scriptClose"
                     >
-                        <div class="videoBody">
-                            <div class="videoBox">
-                                <video :src="currentMaterial.src" ></video>
-                            </div>
-                            
-                            <div class="imgBox">
-                                <img src="" alt="">
-                                <img src="" alt="">
-                            </div>
-                        </div>
+                        
                         <div class="marterialInfo">
                             <div class="info-item">
                                 <span>脚本状态:</span>
-                                <p>未审核</p>
+                                <p>{{ currentScript.scriptStatus | handlerVideoStatus }}</p>
                             </div>
                             <div class="info-item">
                                 <span>所属项目:</span>
-                                <p>所属项目:充电得宝 快手 北京汇创思拓有限公司</p>
+                                <p>{{currentScript.projectName}}</p>
                                 
                             </div>
                             <div class="info-item">
                                 <span>所属物料:</span>
-                                <p>所属项目:充电得宝 快手 北京汇创思拓有限公司</p>
+                                <p>{{currentScript.materialName}}</p>
                             </div>
                             <div class="info-item">
                                 <span>编导:</span>
-                                <p>吴永前</p>
+                                <p>{{currentScript.planName}}</p>
+                            </div>
+                            <div class="info-item" v-if="currentScript.scriptStatus==2">
+                                <span>驳回理由:</span>
+                                <p>{{currentScript.scriptAdvise}}</p>
                             </div>
                             <div class="info-item">
                                 <span>脚本:</span>
-                                <p></p>
+                                <p v-if="currentScript.scriptStatus==0">暂无</p>
+                                <p v-else><a :href="currentScript.url">{{currentScript.scriptName}}</a></p>
+
                             </div>
                                                        
-                            <div class="bottom-btn">
-                                <a-button type='primary' @click="approved" style="margin-right:20px">通过审核</a-button>
-                                <a-button type='default' @click="reject">驳回</a-button>
-                                <a-button type='default' @click="dowmLoadScript">下载脚本</a-button>
+                            <div class="scriptbottom-btn">
+                                <a-button type='primary' @click="scriptApproved" v-if="currentMaterial.materialStatus==2" style="margin-right:20px" >通过审核</a-button>
+                               
+                                <a-button type='default' v-if="currentMaterial.materialStatus==2" @click="()=>{scriptRejectVisiable=true}"  style="margin-right:20px">驳回</a-button>
+                                
                                 <a-button type='default' @click="scriptClose">关闭</a-button>
                             </div>
                         </div>
                     </a-drawer>
+
+                    <!-- bohui -->
+                <a-modal v-model="videoRejectVisiable" title="视频驳回"  width='600px'>
+                     <template slot="footer">
+                        <a-button key="back" @click="()=>{videoRejectVisiable=false}">取消</a-button>
+                        <a-button type="primary"  @click="reject" :loading="loadingElse">确定驳回</a-button>
+                    </template>
+                   <a-textarea
+                    v-model="videoAdvise"
+                    placeholder="请填写驳回理由"
+                    :auto-size="{ minRows: 3, maxRows: 5 }"
+                    />
+                </a-modal>
+                <a-modal v-model="scriptRejectVisiable" title="脚本驳回"  width='600px'>
+                     <template slot="footer">
+                        <a-button key="back" @click="()=>{scriptRejectVisiable=false}">取消</a-button>
+                        <a-button type="primary"  @click="scriptReject" :loading="loadingElse">确定驳回</a-button>
+                    </template>                   
+                    
+                        <a-textarea
+                        v-model="scriptAdvise"
+                        placeholder="请填写驳回理由"
+                        :auto-size="{ minRows: 3, maxRows: 5 }"
+                        />
+                                      
+                </a-modal>
+                
                 </div>
             </div>
         </div>
@@ -505,17 +543,17 @@ import qs from 'qs'
 let columns=[
     {
         title: '物料名称',
-        dataIndex: 'orderTitle',
+        dataIndex: 'materialName',
         align: 'center',        
-        key: 'orderTitle',
-        scopedSlots: { customRender: 'orderTitle' }
+        key: 'materialName',
+        scopedSlots: { customRender: 'materialName' }
     },
     {
         title: '物料编号',
-        dataIndex: 'id',
+        dataIndex: 'materialId',
         align: 'center',        
         key: 'tag',
-        scopedSlots: { customRender: 'id' }
+        scopedSlots: { customRender: 'materialId' }
     },
     {
         title: '物料状态',
@@ -541,10 +579,10 @@ let columns=[
     },
     {
         title: '所属订单',
-        dataIndex: 'materialFinishTime',
+        dataIndex: 'orderTitle',
         align: 'center',        
-        key: 'materialFinishTime',
-        scopedSlots: { customRender: 'materialFinishTime' }
+        key: 'orderTitle',
+        scopedSlots: { customRender: 'orderTitle' }
     },
    
 ]
@@ -559,7 +597,17 @@ export default {
             { title: '视频列表', content: '', key: 2 , },           
         ];
         return {
-            
+            loadingElse:false,
+            videoRejectVisiable:false,
+            scriptRejectVisiable:false,
+
+            acceptLoading:false,
+            videoAdvise:'',
+            scriptAdvise:'',
+            currentScript:{},
+            currentVideo:{},
+
+
             userInfo:{},
             roleCode:'',
 
@@ -603,22 +651,31 @@ export default {
 
             sizeType:[],
             size: "4",
+
+            url:{
+                scriptDetail:'/platform/material/scriptDetail',
+                videoDetail:'/platform/material/videoDetail',
+                scriptAccept:'/platform/material/script/accept',
+                scriptReject:'/platform/material/script/reject',
+                videoAccept:'/platform/material/video/accept',
+                videoReject:'/platform/material/video/reject',
+            }
         }
     },
     methods: {
-        closeBox(){
-
-        },
-        dowmLoadScript(){
-            
+        goOrderDetail(record){
+            console.log(record)
+            this.$parent.currentTabComponent='orderDetail';
+            this.$parent.orderId=record.orderId
         },
+        
         goPlantForm(){
             if(this.$parent.role=='operator'){
                 this.$parent.currentTabComponent='operatorPlatform'
             }else if(this.$parent.role=='designLeader'){
                 this.$parent.currentTabComponent='designleaderPlatform'
             }else if(this.$parent.role=='design'){
-                this.$parent.currentTabComponent='operatorPlatform'
+                this.$parent.currentTabComponent='designPlatform'
             }
         },
         tabChange(key){
@@ -636,16 +693,65 @@ export default {
             );
         },
 
-        // 查看详情
+        // 视频查看详情
         viewDetails(record){
             console.log(record)
-           this.visible=true;
+             this.currentMaterial=record
+            if(record.materialStatus>=4){              
+                this.currentVideo={};                
+                if(record.videoId){
+                    getAction(this.url.videoDetail,{
+                        videoId:record.videoId
+                    }).then(res=>{
+                        console.log(res);
+                        if(res.success){
+                            if(res.result){
+                                let tagList=res.result.tag.split(',')
+                                let imgList=res.result.imageUrl.split(',')
+                                console.log(tagList)
+                                this.currentVideo={
+                                    ...res.result,
+                                    tagList,
+                                    imgList
+                                }
+                            }
+                            
+                            this.visible = true;
+                        }else{
+                            this.currentVideo={};
+                        }
+                    })
+                }else{
+                    this.currentVideo=record
+                    this.visible = true;
+                }
+            }else{
+                this.$message.error('请等待脚本审核通过后,上传视频')
+            }
+            
         },
-        // 查看详情
+        // 脚本查看详情
         scriptViewDetails(record){
             console.log(record)
-            this.scriptVisible=true;
-            // this.$router.push(`/workBench/orderDetail?orderId=${record.id}`)
+            this.currentMaterial=record
+            this.currentScript={};
+            if(record.scriptId){
+                getAction(this.url.scriptDetail,{
+                    scriptId:record.scriptId
+                }).then(res=>{
+                    console.log(res);
+                    if(res.success){
+                        this.currentScript=res.result;
+                        this.scriptVisible = true;
+                    }else{
+                        this.currentScript={};
+                    }
+                })
+            }else{
+                this.currentScript=record
+                this.scriptVisible = true;
+            }
+            
         },
         
         
@@ -680,25 +786,92 @@ export default {
             this.ipagination.current=pagination.current;
 
             this.ipagination.pageSize=pagination.pageSize;
-            this.materialHttp()
-        },
-        // 请求素材
-        materialHttp(){
-            // this.loading=true;           
-            this.data=[];
+            this.tableHttp(this.activeKey)
         },
-
+       
         
 
         
 
+        // 脚本通过审核
+        scriptApproved(){
+            postAction(this.url.scriptAccept,{
+                id:this.currentMaterial.materialId,
+                orderCode:this.currentMaterial.orderCode,
+                materialCode:this.currentMaterial.materialCode
+            }).then(res=>{
+                console.log(res);
+
+                this.scriptVisible=false;
+                if(res.success){
+                    this.$message.success(res.message);
+                    this.tableHttp(this.$parent.materialStatus)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        // 脚本驳回
+        scriptReject(){
+            this.loadingElse=true
+            postAction(this.url.scriptReject,{
+                id:this.currentMaterial.materialId,
+                scriptAdvise:this.scriptAdvise,
+                materialCode:this.currentMaterial.materialCode
+            }).then(res=>{
+                console.log(res);
+
+                this.scriptVisible=false;
+                this.loadingElse=false;
+                this.scriptRejectVisiable=false
+                if(res.success){
+                    this.$message.success(res.message);
+                    this.tableHttp(this.$parent.materialStatus)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+        },
         // 视频通过审核
         approved(){
-
+            this.acceptLoading=true;
+            postAction(this.url.videoAccept,{
+                id:this.currentMaterial.materialId,
+                orderCode:this.currentMaterial.orderCode,
+                materialCode:this.currentMaterial.materialCode,
+                videoId:this.currentVideo.videoId
+            }).then(res=>{
+                console.log(res);
+                this.acceptLoading=false;
+                this.visible=false;
+                if(res.success){
+                    this.$message.success(res.message);
+                    this.tableHttp(this.$parent.materialStatus)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
         },
         // 视频驳回
         reject(){
+            this.loadingElse=true
+            postAction(this.url.videoReject,{
+                id:this.currentMaterial.materialId,
+                videoAdvise:this.videoAdvise,
+                materialCode:this.currentMaterial.materialCode
+            }).then(res=>{
+                console.log(res);
 
+                this.visible=false;
+                this.loadingElse=false;
+                this.videoRejectVisiable=false
+                if(res.success){
+                    this.$message.success(res.message);
+                    this.tableHttp(this.$parent.materialStatus)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
         },
         
         search(){
@@ -713,6 +886,7 @@ export default {
         },
 
         tableHttp(type){
+            this.loading=true;
             let  params=this.handlerParams(type)
             params={
                 ...params,
@@ -720,10 +894,11 @@ export default {
                 pageSize:this.ipagination.pageSize
             }
             console.log(params)
-            getAction('/platform/designer/listByOperatorUserId',params).then(res=>{
+            getAction('/platform/material/listByOperatorUserId',params).then(res=>{
                 console.log(res);
                 if(res.success){
-                    this.data=res.result.records;
+                    this.loading=false;
+                    this.data=res.result.list;
                     this.ipagination.total=res.result.total;
 
                 }
@@ -734,8 +909,7 @@ export default {
             if(this.$parent.role=='operator'){
                 if(status==1){
                     return {
-                        materialStatus:0,
-                        createBy:this.userInfo.id
+                        operatorUserId:this.userInfo.id
                     }
                 }
             }else if(this.$parent.role=='designLeader'){
@@ -784,50 +958,73 @@ export default {
         }
         this.roleCode=localStorage.getItem('roleCode')
         console.log(this.$parent.materialStatus)
+        this.tableHttp(this.$parent.materialStatus)
+        this.activeKey=this.$parent.materialStatus
     },
     activated() {
         
-        this.activeKey=this.$parent.materialStatus
-        this.tableHttp(this.$parent.materialStatus)
+       
+        // this.tableHttp(this.$parent.materialStatus)
     },
     filters:{
-        handleMaterialStatus(val){
-            let text
-            switch (val) {
+        handlerMaterialStatus(val){
+            let str='';
+            switch(val){
+                
                 case 0:
-                    text='待指派'
+                    str= '待指派'
                     break;
                 case 1:
-                    text='脚本已上传'
+                    str= '脚本待上传'
                     break;
                 case 2:
-                    text='脚本待审核'
+                    str= '脚本待审核'
                     break;
                 case 3:
-                    text='视频待上传'
+                    str= '脚本被驳回'
                     break;
                 case 4:
-                    text='脚本被驳回'
+                    str= '视频待上传'
                     break;
                 case 5:
-                    text='视频待审核'
+                    str= '视频待审核'
                     break;
                 case 6:
-                    text='视频被驳回'
+                    str= '视频被驳回'
                     break;
                 case 7:
-                    text='物料已完成'
+                    str= '物料已完结'
                     break;
-                case -1:
-                    text='已作废'
+                default:
+                    str='出错了'
+                    break;
+            }
+            return str
+        },
+
+        handlerVideoStatus(val){
+            let str='';
+            switch(val){
+                
+                case 0:
+                    str= '待上传'
+                    break;
+                case 1:
+                    str= '待审核'
+                    break;
+                case 2:
+                    str= '被驳回'
+                    break;
+                case 3:
+                    str= '已审核'
                     break;
-            
                 default:
-                    text='出错'
+                    str='出错了'
                     break;
             }
-            return text
-        }
+            return str
+        },
+
     },
 
 }

+ 250 - 56
src/views/modules/workBench/operator/platForm.vue

@@ -7,11 +7,11 @@
                     <img src="@/assets/touxiang.png"  alt="">
                 </div>  
                 <div class='tip'>
-                    <p class="greet">早安,{{userInfo.username}},祝你开心每一天!</p>
+                    <p class="greet">{{getTimeState()}},{{roleInfo.realname}},祝你开心每一天!</p>
                     <p class="descPosition">
-                        <span>运营经理</span>
+                        <span>{{roleInfo.roleName}}</span>
                         <a-divider type="vertical" />
-                        <span>华北地区-头条事业部</span>
+                        <span>{{roleInfo.area}}地区-{{roleInfo.departName}}</span>
                     </p>
                 </div>
                 <a-button type='primary' class="mybtn" @click="sendOrder">
@@ -35,7 +35,7 @@
                                     <span>我发起的订单</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.newOrder || 0}} <span>个</span></p>
                                 </div>
                             </div>
                             <div class="item" @click="goMaterialList(1)">                                
@@ -44,7 +44,7 @@
                                     <span>待审核的物料</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.toAuditMaterial || 0}}<span>个</span></p>
                                 </div>                              
                             </div>
                            
@@ -54,7 +54,7 @@
                                     <span>已完成的订单</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.finishOrder ||0}}<span>个</span></p>
                                 </div>
                             </div>
                             <div class="item" @click="goOrderList(3)">                                
@@ -63,49 +63,60 @@
                                     <span>被驳回的订单</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.rejectOrder || 0}} <span>个</span></p>
                                 </div>
                             </div>
-                            <div class="item" @click="goOrderList(4)">                                
+                            <!-- <div class="item" @click="goOrderList(4)">                                
                                 <div class="title">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
                                     <span>全部订单</span>
                                 </div>
                                 <div class="itemBody">
-                                    <p class="count">60 <span>个</span></p>
+                                    <p class="count">{{countInfo.allOrder}}<span>个</span></p>
                                 </div>                                
-                            </div>
+                            </div> -->
                         </div>  
                     </div>
                     <div class="leftBottom">
                         <div class="sectionHead">
                             订单进度
-                             <a-button type="link" class="allOrder" @click="goOrderList(4)">全部订单</a-button>
+                             <!-- <a-button type="link" class="allOrder" @click="goOrderList(1)">全部订单</a-button> -->
                         </div>
+                        <a-spin :spinning="orderProgressSpinning">
                         <div class="orderProgress">
-                            <ul class="orderProgress-list">
+                            
+                            <ul class="orderProgress-list" v-if="orderProgressList.length>0">
                                 <li v-for="(item,index) in orderProgressList" :key="index"  >
                                     <!-- <span  style="display:block;width:100%"> -->
                                     <div style="display:flex;align-items: center;" class="orderProgress-list-item" @click="orderDetail(item)">
                                         <div style="display:flex;width:80%; align-items: center;" >
                                             <span class="item-icon"></span>
                                             <div class="content">
-                                                <p class="name">我是一个任务名称嗷嗷嗷啊</p>
-                                                <p class="desc">这是对这个任务的简介,所以得好好寻…</p>
+                                                <p class="name">{{item.orderTitle}}</p>
+                                                <p class="desc">{{item.orderRemark}}</p>
                                             </div>
                                         </div>
                                         
-                                        <div class="progress">
-                                            <a-progress type="circle" :percent="75" :width='30' :showInfo='false'  :strokeWidth='10' />
-                                            <span style="margin-left:15px">75%</span>
+                                        <div class="progress" v-if="item.orderStatus==1||item.orderStatus==3">
+                                            <a-progress type="circle" :percent="(item.materialFinishAmount/item.materialAmount)*100" :width='30' :showInfo='false'  :strokeWidth='10' />
+                                            <span style="margin-left:15px">{{(item.materialFinishAmount/item.materialAmount)*100}}%</span>
+                                        </div>
+                                        <div class="progress" v-else>
+                                            {{item.orderStatus|handleOrderStatus}}
                                         </div>
                                     </div>
                                     <!-- </span> -->
                                 </li>
                             </ul>
+                            <div   v-else style="width:100%;height:585px;line-height:585px;text-align:center">
+                               
+                                <img src="@/assets/nodata.png" alt="" style="width:300px;text-align:center">
+                            </div>
                             <!-- hideOnSinglePage -->
-                            <a-pagination size="small" :total="totalPage" :current='currentPage' class="fenye" :change='pageChange'  show-size-changer show-quick-jumper hideOnSinglePage />
+                            <a-pagination size="small" :total="totalPage" :current='currentPage' :pageSize='8' class="fenye" @change='pageChange'  show-quick-jumper  />
+                            
                         </div>
+                        </a-spin>
                     </div>
                 </div>
                 <div class="sectionRightBox">
@@ -113,37 +124,25 @@
                         <div class="sectionHead">
                             操作记录
                         </div>
+                        <a-spin :spinning="spinning">
                         <div class="optionRecordList">
-                            <a-timeline>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
-                                </a-timeline-item>
-                                <a-timeline-item color='#F0F2F5' style="height:30px">
-                                   <p style="margin-bottom:0px">
-                                    <span class="content-item">Create a services site 2015-09-01</span> 
-                                    <span class="time">1分钟前</span>
-                                   </p>
+                            
+                            <a-timeline >
+                                <a-timeline-item color='#F0F2F5' style="height:46px" v-for="(item,index) in operateRecordList" :key="index">
+                                <p style="margin-bottom:0px">
+                                    <span class="content-item">{{item.userName}}{{item.operate}}{{item.materialName||item.orderTitle}}</span> 
+                                    <span class="time">{{item.time}}</span>
+                                </p>
                                 </a-timeline-item>
                                 
                             </a-timeline>
+
+                           
+                            
                         </div>
+                        </a-spin>
                     </div>
-                    <div class="rightBottom">
+                    <!-- <div class="rightBottom">
                         <div class="sectionHead">
                             本周项目燃尽图
                         </div>
@@ -160,7 +159,8 @@
                                 </p>
                              </div>
                         </div>
-                    </div>
+                    </div> -->
+
                 </div>
                 
             </div>
@@ -176,12 +176,17 @@ export default {
     name:'operator-platform',
     data() {
         return {
+            moment,
+            roleInfo:{},
+            todayGreet:moment(),
+            orderProgressSpinning:false,
+            countInfo:{},
+
+            spinning:false,
             touxiang:'@/assets/touxiang.png',
             // 订单进度
             orderProgressList:[
-                {},
-                {},
-                {}
+                
             ],
 
             // 操作记录
@@ -193,8 +198,13 @@ export default {
             // 分页参数
             totalPage:0,
             currentPage:1,
+
             userInfo:{},
-            roleCode:''
+            roleCode:'',
+
+            operateRecordList:[],
+
+            TimerObj:null,
         }
     },
     methods: {
@@ -216,7 +226,9 @@ export default {
         },
         // 分页页码改变
         pageChange(page, pageSize){
-
+            this.currentPage=page;
+            // console.log(page,pageSize)
+            this.getOrderList()
         },
         
         // 发起订单
@@ -224,6 +236,129 @@ export default {
             this.$parent.currentTabComponent='placeOrder';
             
         },
+        // 获取订单列表
+        getOrderList(){
+          
+            let params={
+                createBy:this.userInfo.id,
+                pageNo:this.currentPage,
+                pageSize:8,
+            }
+            this.orderProgressSpinning=true;
+            getAction('/platform/order/listByCreatorOrDesignLeader',params).then(res=>{
+                console.log(res);
+                this.loading=false;
+                this.orderProgressSpinning=false;
+                if(res.success){
+
+                    this.orderProgressList=res.result.list;
+                    this.totalPage=res.result.total;
+
+                }
+            })
+        },
+
+        // 操作记录
+        getOperationRecord(){
+            this.spinning=true;
+            getAction('/platform/operateRecord/createDesc').then(res=>{
+                console.log(res)
+                this.spinning=false;
+                if(res.success){
+                    this.operateRecordList=res.result.list.map((item,index)=>{
+                       
+                            let time='';
+                            let startTime=moment(item.createTime)
+                            console.log() 
+                            if(moment().diff(startTime,'minutes')>60){
+                                time=item.createTime.split(/[ ]+/)[1]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }else if(moment().diff(startTime,'minutes')>=1){
+                                time=moment().diff(startTime,'minutes')+'分钟前'
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }else if(moment().diff(startTime,'minutes')==0){
+                                time=moment().diff(startTime,'seconds')+'秒前'
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }
+                        
+                        
+                        
+                    });
+
+                    
+                }
+            })
+        },
+        
+        scrollRecord(){
+            console.log(this.$refs.scrollRecord);
+            this.TimerObj=setInterval(()=>{
+                this.getOperationRecord()
+
+            },60000)            
+        },
+
+
+        // 获取工作台内容
+        getPlantformInfo(){
+            getAction('/platform/query/jobContent').then(res=>{
+                console.log(res)
+                if(res.success){
+                    if(this.$parent.role=='operator'){
+                        this.countInfo=res.result.operatorJobContent
+                    }else if(this.$parent.role=='design'){
+                        this.countInfo=res.result.designJobContent
+                    }else if(this.$parent.role=='designLeader'){
+                        this.countInfo=res.result.designLeaderJobContent
+                    }
+                }
+            })
+        },
+
+
+        getTimeState () {
+            // 获取当前时间
+            let timeNow = new Date();
+            // 获取当前小时
+            let hours = timeNow.getHours();
+            // 设置默认文字
+            let text = ``;
+            // 判断当前时间段
+            if (hours >= 0 && hours <= 5) {
+                text = `凌晨好`;
+            }else if(hours >= 6 && hours <= 9){
+                text = `早上好`;
+            } else if(hours > 9 && hours <= 12){
+                text = `上午好`;
+            }else if (hours > 12 && hours <= 14) {
+                text = `中午好`;
+            } else if (hours > 14 && hours <= 18) {
+                text = `下午好`;
+            } else if (hours > 18 && hours <= 24) {
+                text = `晚上好`;
+            }
+            // 返回当前时间段对应的状态
+            return text
+        },
+
+        getidentity(){
+            getAction('/platform/query/identity',{}).then(res=>{
+                console.log(res);
+                if(res.success){
+                    this.roleInfo=res.result
+                }
+            })
+        }
+
     },
     mounted(){
         let userInfo=localStorage.getItem('pro__Login_Userinfo');
@@ -231,9 +366,56 @@ export default {
             this.userInfo=JSON.parse(userInfo).value
         }
         this.roleCode=localStorage.getItem('roleCode')
+        this.getOrderList()
+        this.getOperationRecord()
+        this.scrollRecord()
+        this.getPlantformInfo()
+        this.getidentity()
         
+    },
+    activated(){
+        let userInfo=localStorage.getItem('pro__Login_Userinfo');
+        if(userInfo){
+            this.userInfo=JSON.parse(userInfo).value
+        }
+        this.roleCode=localStorage.getItem('roleCode')
+        this.getOrderList()
+        this.getOperationRecord()
         
-    }
+        this.getPlantformInfo()
+        this.getidentity()
+    },
+    beforeDestroy(){
+        clearInterval(this.TimerObj)
+    },
+    filters:{
+        handleOrderStatus(val){
+            let text
+            switch (val) {
+                case 0:
+                    text='待接单'
+                    break;
+                case 1:
+                    text='制作中'
+                    break;
+                case 2:
+                    text='已驳回'
+                    break;
+                case 3:
+                    text='已完成'
+                    break;
+                case -1:
+                    text='已撤回'
+                    break;
+            
+                default:
+                    text='出错'
+                    break;
+            }
+            return text
+        }
+    },
+    
 }
 
 </script>
@@ -376,6 +558,8 @@ export default {
                     background: white;
                     .orderProgress{
                         padding: 0 20px;
+                        height: 585px;
+                        position: relative;
                         .orderProgress-list-item{
                             padding: 10px 0;
                             display: flex;
@@ -423,35 +607,45 @@ export default {
                         .fenye{
                             padding: 20px 0;
                             text-align: right;
+                            position: absolute;
+                            right: 20px;
+                            bottom: 0px;
                         }
                     }
                 }
             }
             .sectionRightBox{
                 width: 29.5%;
-                // background: white;
+                background: white;
                 margin-left: 12px;
+                height: 1023px;
                 .rightTop{
-                    height: 370px;
-                     background: white;
+                  
                      .optionRecordList{
-                         padding: 20px;
+                         margin: 20px;
+                         padding: 10px 0;
+                         box-sizing: border-box;
+                          height: 928px;
+                        //  overflow: auto;
+                        overflow: hidden;
+                        position: relative;
                          p{
                              width: 100%;
                          }
                         .content-item{
-                            width: 80%;
+                            width: 70%;
                             display: inline-block;
                             overflow: hidden;
                             text-overflow: ellipsis;
                             white-space: nowrap;
                         }
                         .time{
-                            width: 20%;
+                            width: 30%;
                             display: inline-block;
                             overflow: hidden;
                             text-overflow: ellipsis;
                             white-space: nowrap;
+                            text-align: right;
                         }
                      }
                 }

Diff do ficheiro suprimidas por serem muito extensas
+ 1462 - 182
src/views/modules/workBench/orderDetail.vue


+ 43 - 105
src/views/modules/workBench/orderList.vue

@@ -319,17 +319,17 @@
                         
                         <div class="search-item">
                             <span>订单名称:</span>
-                            <a-input placeholder="请输入订单名称" allow-clear v-model="orderName" style="width:300px" />
+                            <a-input placeholder="请输入订单名称" allow-clear v-model="orderTitle" style="width:200px" />
                         </div>
                         <div class="search-item">
                             <span>订单编号:</span>
-                            <a-input placeholder="请输入订单编号" allow-clear v-model="orderId" style="width:300px" />
+                            <a-input placeholder="请输入订单编号" allow-clear v-model="id" style="width:200px" />
                         </div>
                         
 
                         <div class="search-item">
                             <span>发起的人:</span>
-                            <a-input placeholder="请输入订单发起人" allow-clear v-model="orderSponsor" style="width:300px" />
+                            <a-input placeholder="请输入订单发起人" allow-clear v-model="createByName" style="width:200px" />
                         </div>
                         <div class="opt-item">
                             <a-button type='primary' @click="search" style="margin-right:20px">查询</a-button>
@@ -357,69 +357,13 @@
                             <span slot="options" slot-scope="text,record">
                                 <a href="javascript:;" @click="viewDetails(record)">详情</a>                                                           
                             </span>
-                            <span slot="materialFinishTime" slot-scope="text">
+                            <span slot="updateTime" slot-scope="text">
                                 {{text||'-'}}                                                    
                             </span>
 
                         </a-table>
                     </div>
-                    <a-drawer
-                    title="素材详情"
-                    width="640"
-                    :placement="placement"
-                    :closable="false"
-                    :visible="visible"
-                    @close="onClose"
-                    >
-                        <div class="videoBody">
-                            <div class="videoBox">
-                                <video :src="currentMaterial.src" ></video>
-                            </div>
-                            
-                            <div class="imgBox">
-                                <img src="" alt="">
-                                <img src="" alt="">
-                            </div>
-                        </div>
-                        <div class="marterialInfo">
-                            <div class="info-item">
-                                <span>素材状态:</span>
-                                <p>未审核</p>
-                            </div>
-                            <div class="info-item">
-                                <span>生成水印:</span>
-                                <a-select :defaultValue="4" v-model="size" style="width:70%;">
-                                    <a-select-option :value="item.id" :key="item.id" v-for="item of sizeType">{{
-                                        item.name
-                                    }}</a-select-option>
-                                </a-select>
-                                
-                            </div>
-                            <div class="info-item">
-                                <span>视频标签:</span>
-                                <a-tag>Tag 1</a-tag>
-                                <a-tag>Tag 1</a-tag>
-                            </div>
-                            <div class="info-item info">
-                                <ul>
-                                    <li><span>视频时长:</span> 17秒 </li>
-                                    <li><span>视频尺寸:</span> 1080*1920 </li>
-                                    <li><span>视频大小:</span> 31.42M </li>
-                                    <li><span>策划:</span> 吴永前 </li>
-                                    <li><span>拍摄:</span> 吴永前 </li>
-                                    <li><span>剪辑:</span> 吴永前 </li>                                    
-                                </ul>
-                            </div>
-                            <div class="info-item">
-                                <span>广告语:</span>
-                                <p>14354534324454354水电费水电费方式手动</p>
-                            </div>
-                            <div class="bottom-btn">
-                                <a-button type='primary' @click="approved" style="margin-right:20px">通过审核</a-button>
-                                <a-button type='default' @click="reject">驳回</a-button>
-                            </div>
-                        </div>
-                    </a-drawer>
+                    
                 </div>
             </div>
         </div>
@@ -449,10 +393,10 @@ let listColumns=[
     },
     {
         title: '订单发起人',
-        dataIndex: 'status',
+        dataIndex: 'createByName',
         align: 'center',        
-        key: 'status',
-        scopedSlots: { customRender: 'status' }
+        key: 'createByName',
+        scopedSlots: { customRender: 'createByName' }
     },
     {
         title: '订单状态',
@@ -463,10 +407,10 @@ let listColumns=[
     },
     {
         title: '更新时间',
-        dataIndex: 'materialFinishTime',
+        dataIndex: 'updateTime',
         align: 'center',        
-        key: 'materialFinishTime',
-        scopedSlots: { customRender: 'materialFinishTime' }
+        key: 'updateTime',
+        scopedSlots: { customRender: 'updateTime' }
     },
     {
         title: '操作',
@@ -483,7 +427,6 @@ export default {
     name:'order-list',
     data() {
         const operatorPanes = [
-            { title: '全部订单', content: '', key: 4 , },
             { title: '我发起的', content: '', key: 1 , },           
             { title: '已完成的', content: '', key: 2 ,},
             { title: '被驳回的', content: '', key: 3 , },
@@ -492,11 +435,17 @@ export default {
         const designLeaderPanes=[
             { title: '全部订单', content: '', key: 4 , },
             { title: '待确定的', content: '', key: 1 , },
-            { title: '待指派的', content: '', key: 2 , },
             { title: '已完成的', content: '', key: 3 ,},
             
         ]
         return {
+            orderTitle:'',
+            createByName:'',
+            id:'',
+            loadingElse:false,
+            videoRejectVisiable:false,
+            scriptRejectVisiable:false,
+
             operatorPanes,
             designLeaderPanes,
             userInfo:{},
@@ -550,7 +499,7 @@ export default {
             }else if(this.$parent.role=='designLeader'){
                 this.$parent.currentTabComponent='designleaderPlatform'
             }else if(this.$parent.role=='design'){
-                this.$parent.currentTabComponent='operatorPlatform'
+                this.$parent.currentTabComponent='designPlatform'
             }
         },
         tabChange(key){
@@ -607,41 +556,34 @@ export default {
             this.ipagination.current=pagination.current;
 
             this.ipagination.pageSize=pagination.pageSize;
-            this.materialHttp()
-        },
-        // 请求素材
-        materialHttp(){
-            // this.loading=true;           
-            this.data=[];
-        },
-
-        
-
-        
-
-        // 素材通过审核
-        approved(){
-
+            this.tableHttp(this.activeKey)
         },
-        // 素材驳回
-        reject(){
 
-        },
-        
+       
         search(){
-
+            this.tableHttp(this.activeKey)
         },
         reset(){
-            this.orderName='';
-            this.orderId='';
-            this.orderStatus='';
-            this.orderParticipants="";
-            this.orderSponsor='';
+            this.orderTitle='';
+            this.id='';
+            this.createByName='';
+            
         },
 
         tableHttp(type){
             let  params=this.handlerParams(type)
             this.loading=true;
+            if(this.id){
+                params.id=this.id
+            }
+            if(this.orderTitle){
+                params.orderTitle=this.orderTitle
+            }
+            if(this.createByName){
+                params.createByName=this.createByName
+            }
+           
+               
             params={
                 ...params,
                 pageNo:this.ipagination.current,
@@ -651,7 +593,7 @@ export default {
                 console.log(res);
                 this.loading=false;
                 if(res.success){
-                    this.data=res.result.records;
+                    this.data=res.result.list;
                     this.ipagination.total=res.result.total;
 
                 }
@@ -662,7 +604,7 @@ export default {
             if(this.$parent.role=='operator'){
                 if(status==1){
                     return {
-                        orderStatus:0,
+                        
                         createBy:this.userInfo.id
                     }
                 }else if(status==2){
@@ -675,11 +617,7 @@ export default {
                         orderStatus:2,
                         createBy:this.userInfo.id
                     }
-                }else if(status==4){
-                    return {
-                        createBy:this.userInfo.id
-                    }
-                }   
+                } 
             }else if(this.$parent.role=='designLeader'){
                 if(status==1){
                     return {
@@ -726,7 +664,7 @@ export default {
             this.panes=this.designLeaderPanes
         }
         this.activeKey=this.$parent.orderStatus
-
+        this.tableHttp(this.$parent.orderStatus)
 
     },
     filters:{
@@ -737,7 +675,7 @@ export default {
                     text='待接单'
                     break;
                 case 1:
-                    text='已接单'
+                    text='制作中'
                     break;
                 case 2:
                     text='已驳回'
@@ -746,7 +684,7 @@ export default {
                     text='已完成'
                     break;
                 case -1:
-                    text='已作废'
+                    text='已撤回'
                     break;
             
                 default:

+ 271 - 46
src/views/modules/workBench/placeOrder.vue

@@ -193,6 +193,7 @@
             </div>
         </div>
         <div class="section">
+            <a-spin :spinning="placeOrderSpinning">
             <div class="sectionBody">
                 <a-form-model
                 ref="ruleForm"
@@ -254,14 +255,14 @@
                         <div class="input-item"> 
                             <a-form-model-item ref="sysName"  prop="sysName">
                                 <a-radio-group v-model="form.sysName" @change="sysNameChange">
-                                     <a-radio-button :value="3">不限</a-radio-button>
-                                    <a-radio-button :value="1">IOS</a-radio-button>
-                                    <a-radio-button :value="2">安卓</a-radio-button> 
+                                    <a-radio-button value="3">不限</a-radio-button>
+                                    <a-radio-button value="1">IOS</a-radio-button>
+                                    <a-radio-button value="2">安卓</a-radio-button> 
                                 </a-radio-group>
                             </a-form-model-item>
                         </div>
                     </div>
-                    <div class="row-item" v-if="form.sysName==2">
+                    <div class="row-item" v-if="form.sysName=='2'">
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">APK链接</div>
@@ -305,7 +306,7 @@
                         </div>
                         <div class="input-item"> 
                             <a-form-model-item ref="materialAmountDay"  prop="materialAmountDay">
-                                <a-input-number :min="1" :max="500"  @change="materialAmountDayChange" v-model="form.materialAmountDay"  />
+                                <a-input-number :min="1" :max="500"  @blur="materialAmountDayChange" v-model="form.materialAmountDay"  />
                             </a-form-model-item>
                         </div>
                     </div>
@@ -346,7 +347,7 @@
                         </div>
                         <div class="input-item"> 
                             <a-form-model-item ref="cutAmount"  prop="cutAmount">
-                                 <a-input-number :min="1" :max="500"  @change="materialAmountDayChange" v-model="form.cutAmount" />
+                                 <a-input-number :min="1" :max="500"  @change="cutAmountChange" v-model="form.cutAmount" />
                             </a-form-model-item>
                         </div>
                     </div>
@@ -354,7 +355,7 @@
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">订单备注</div>
-                            <div class="required-item"></div>
+                            <!-- <div class="required-item"></div> -->
                         </div>
                         <div class="input-item"> 
                             <a-form-model-item ref="orderRemark"  prop="orderRemark">
@@ -370,15 +371,27 @@
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">附件</div>
-                            <div class="required-item"></div>
+                            <!-- <div class="required-item"></div> -->
                         </div>
                         <div class="input-item"> 
                             <a-form-model-item ref="orderRemark"  prop="orderRemark">
+                                <a :href="form.attachmentUrl" style="margin-right:20px;display:block" v-if="form.attachmentUrl">{{form.attachmentName}}</a>
                                 <a-upload
-                                    action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
-                                    :default-file-list="defaultFileList"
-                                >
-                                    <a-button> <a-icon type="upload" /> 上传附件 </a-button>
+                                    name="file"
+                                    :multiple="false"
+                                    :action="uploadAction"
+                                    :headers="tokenHeader"
+                                    :file-list="fileList"
+                                    :showUploadList="false"
+                                    :beforeUpload="beforeUpload"
+                                    @change="handleChange"
+                                    style="margin-right:20px"
+                                        
+                                    >
+                                        <a-button :disabled="loadDisabled">
+                                        <a-icon type="upload" />
+                                            {{loadDisabled?'上传中,请稍后':'文件上传'}}
+                                        </a-button>
                                 </a-upload>
                             </a-form-model-item>
                         </div>
@@ -388,11 +401,14 @@
                     <!-- <div class="moduler-title">计划名称</div> -->
                     <div class="opt">
                         <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
-                        <a-button type="primary"  style="margin-right:15px" @click="saveHandler" :loading="saveLoading">下单</a-button>
+                        <a-button type="primary"  style="margin-right:15px" @click="saveHandler" :loading="saveLoading">
+                            {{isEidt?'完成':'下单'}}
+                        </a-button>
                     </div>
                 </div>   
                 </a-form-model>
             </div>
+            </a-spin>
         </div>
     </div>
 </template>
@@ -400,17 +416,40 @@
 <script>
 import moment from 'moment';
 import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
-
+import Vue from 'vue'
+import {ACCESS_TOKEN} from "@/store/mutation-types";
+const fileSuffix = [
+  'rar',
+  'zip',
+  'arj',
+  'gz',
+  'z',
+  '7-zip',
+  'tar',
+  'gzip',
+  'bz2',
+  'jar',
+  'ace',
+  'iso',
+  
+]
 export default {
     data() {
         return {
-            defaultFileList:[],
+            placeOrderSpinning:false,
+            fileList:[],
+            isEidt:false,
+            loadDisabled:false,
+            tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
+            uploadAction:'',
+            
+
             saveLoading:false,
             form: {
                 orderTitle: '',               
                 design:undefined,
                 project:undefined,
-                sysName:3,
+                sysName:'3',
                 sysPackage:'',
                 dataValue:[],
                 materialAmount:undefined,
@@ -419,11 +458,13 @@ export default {
                 realAmount:undefined,
                 cutAmount:undefined,
                 orderRemark:'',
+                attachmentName:'',
+                attachmentUrl:'',
 
             },
             rules: {
                 orderTitle: [
-                    { required: true, message: '请填写订单名称', trigger: 'blur' },
+                    { required: true, message: '请填写订单标题', trigger: 'blur' },
                     { min: 2, message: '长度不得小于2', trigger: 'blur' },
                 ],
                 sysPackage: [
@@ -433,9 +474,16 @@ export default {
                 dataValue: [{ required: true, message: '请选择订单周期', trigger: 'change' }],
                 materialAmount: [{ required: true, message: '素材总数必须大于1', trigger: 'change' }],
                 materialAmountDay: [{required: true, message: '日均产量必须填写', trigger: 'change' }],
-                project: [{required: true, message: '必须选择关联项目', trigger: 'change' }],
-                design: [{required: true, message: '必须选择设计组长', trigger: 'change' }],
-               
+                project: [{required: true, message: '请选择关联项目', trigger: 'change' }],
+                design: [{required: true, message: '请选择设计组长', trigger: 'change' }],
+                cutAmount: [
+                    { required: true, message: '组合模式下,剪辑数量必须填写', trigger: 'blur' },
+                    // { min: 1, message: '组合模式下,剪辑数量不能小于1', trigger: 'blur' },
+                ],
+                realAmount: [
+                    { required: true, message: '组合模式下,真人数量必须填写', trigger: 'blur' },
+                   
+                ],
             },
             // 操作记录
             designLeaderList:[],
@@ -448,7 +496,8 @@ export default {
             totalPage:0,
             currentPage:1,
             userInfo:{},
-            roleCode:''
+            roleCode:'',
+            currentOrderInfo:{},
         }
     },
     methods: {
@@ -469,12 +518,7 @@ export default {
                 option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
             );
         },
-        // 附件上传的方法
-        handleChange({ file, fileList }) {
-        if (file.status !== 'uploading') {
-            console.log(file, fileList);
-        }
-        },
+        
         // form-modal 自带方法
         onSubmit() {
             this.$refs.ruleForm.validate(valid => {
@@ -499,27 +543,90 @@ export default {
         },
         materialAmountChange(e){
             console.log(e)
+            if(this.form.materialType==1){
+                this.form.realAmount=this.form.materialAmount;
+                this.form.cutAmount=0
+            }else if(this.form.materialType==2){
+                this.form.cutAmount=this.form.materialAmount;
+                this.form.realAmount=0
+            }else{
+                if(this.form.materialAmount){
+                    this.form.cutAmount=Math.ceil(this.form.materialAmount/2);
+                    this.form.realAmount=Math.floor(this.form.materialAmount/2);
+                }
+                
+            }
         },
         materialAmountDayChange(e){
-
+            console.log(e);
+            if(e.target.value>this.form.materialAmount&&this.form.materialAmount){
+                this.$message.error('日均产量不能大于素材总量')
+                this.form.materialAmountDay=this.form.materialAmount
+            }else if(!this.form.materialAmount){
+                 this.$message.error('请先填写素材总量')
+                this.form.materialAmountDay=undefined
+            }
+            
         },
-        materialTypeChange(val){
-
+        materialTypeChange(e){
+            console.log(e.target.value)
+            if(e.target.value==1){
+                this.form.realAmount=this.form.materialAmount?this.form.materialAmount:undefined;
+                this.form.cutAmount=0
+            }else if(e.target.value==2){
+                this.form.cutAmount=this.form.materialAmount?this.form.materialAmount:undefined;
+                this.form.realAmount=0
+            }else if(e.target.value==3){
+                if(this.form.materialAmount){
+                    this.form.cutAmount=Math.ceil(this.form.materialAmount/2);
+                    this.form.realAmount=Math.floor(this.form.materialAmount/2);
+                }else{
+                    this.form.cutAmount=undefined;
+                    this.form.realAmount=undefined;
+                }
+                
+            }
         },
-        realAmountChange(e){
-            console.log(e);
-            this.form.cutAmount=this.form.materialAmount-this.form.realAmount
+        realAmountChange(val){
+            console.log(val);
+            if(this.form.materialAmount){
+                if(val>this.form.materialAmount){
+                    this.$message.error('数量输入有误,不能超过素材总量哦');
+                    this.form.realAmount=this.form.materialAmount-1
+                }
+                this.form.cutAmount=this.form.materialAmount-this.form.realAmount
+            }else{
+                this.form.cutAmount=undefined;
+                this.form.realAmount=undefined;
+            }
+            
+        },
+        cutAmountChange(val){
+            console.log(val);
+            if(this.form.materialAmount){
+                if(this.form.realAmount==null){
+                    console.log(1)
+                    if(val>this.form.materialAmount){
+                        this.$message.error('数量输入有误,不能超过素材总量哦');
+                        this.form.cutAmount=this.form.materialAmount-1
+                    }
+                    this.form.realAmount=this.form.materialAmount-this.form.cutAmount
+                }
+            }else{
+                this.form.cutAmount=undefined;
+                this.form.realAmount=undefined;
+            }
+            
         },
         goBack() {
-            this.$router.replace('/autoRules')
-            this.$bus.$emit('remove', '/newBlankRule')
-           
+            this.$parent.currentTabComponent='operatorPlatform';
+            this.$parent.isEdit=false;
         },
 
         saveHandler(){
              this.$refs.ruleForm.validate(valid=> {
                 if (valid) {
-                    
+                    this.saveLoading=true;
                     console.log(valid,this.form);
                     let params={
                         ...this.form,
@@ -528,16 +635,39 @@ export default {
                         endDate:this.form.dataValue[1].format('YYYY-MM-DD'),
                     };
 
-                    
-                    postAction('/platform/operator/payout',params).then(res=>{
-                        console.log(res);
-                        if(res.success){
-                             this.$router.push('/workBench')
-                            this.$bus.$emit('remove', '/workBench/placeOrder')
-                        }else{
-                            this.$message.error(res.success)
+                    if(!this.$parent.isEdit){
+                        postAction('/platform/operator/payout',params).then(res=>{
+                            console.log(res);
+                            this.saveLoading=false;
+                            if(res.success){
+                                this.$parent.orderId=res.result.id
+                                this.$parent.isEdit=false;
+                                this.$parent.currentTabComponent='orderDetail';
+                                
+                            }else{
+                                this.$message.error(res.success)
+                            }
+                        })
+                    }else{
+                        params={
+                            id:this.currentOrderInfo.id,
+                            ...params,
                         }
-                    })
+                        postAction('/platform/operator/rePayout',params).then(res=>{
+                            console.log(res);
+                            this.saveLoading=false;
+                            if(res.success){
+                                this.$parent.isEdit=false;
+                                this.$parent.orderId=this.currentOrderInfo.id
+                                this.$parent.currentTabComponent='orderDetail';
+
+                                
+                            }else{
+                                this.$message.error(res.success)
+                            }
+                        })
+                    }
+                    
 
                 } else {
                     console.log('error submit!!');
@@ -545,6 +675,96 @@ export default {
                 }
             });
         },
+
+        getOrderInfo(){
+            
+            if(this.$parent.isEdit){
+                this.placeOrderSpinning=true;
+                getAction('/platform/order/queryById',{
+                    id:this.$parent.orderId
+                }).then(res=>{
+                    console.log(res)
+                    this.placeOrderSpinning=false;
+                    this.currentOrderInfo={}
+                    if(res.success){
+                        
+                        this.currentOrderInfo=res.result;
+                        this.form=res.result;
+                        this.form.dataValue=[moment(res.result.startDate),moment(res.result.endDate)]
+                    }
+                })
+            }
+        },
+
+        beforeUpload(file) {
+            // ${this.form.project}
+            this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadAttachment?projectId=772`
+            this.loadDisabled = true
+            const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
+            const fileName = file.name
+            const fileStrArr = fileName.split('.')
+            const suffix = fileStrArr[fileStrArr.length - 1]
+
+            let result = fileSuffix.some((item) => {
+                return item === suffix
+            })
+
+            if (!result) {
+                this.$message.error('不支持该文件类型')
+                this.loadDisabled = false
+                return false
+            }
+
+            // if (size > 10) {
+            //     this.$message.error('文件不能大于10MB')
+            //     this.loadDisabled = false
+            //     return false
+            // }
+            
+        },
+        handleChange(info) {
+            // console.log(info)
+            let fileList = [...info.fileList];
+
+            // 1. Limit the number of uploaded files
+            //    Only to show two recent uploaded files, and old ones will be replaced by the new
+            fileList = fileList.slice(-2);
+
+            // 2. read from response and show file link
+            fileList = fileList.map(file => {
+                if (file.response) {
+                    // Component will show file.url as link
+                    file.url = file.response.url;
+                }
+                return file;
+            });
+            if(fileList.length>0){
+                this.fileList = [
+                    {
+                        ...fileList[fileList.length-1]
+                    }
+                ]
+            }else{
+                this.fileList=[]
+            }
+            
+
+
+            if (info.file.status !== 'uploading') {
+                console.log(info.file, info.fileList)
+            }
+            if (info.file.status === 'done') {
+                this.$message.success(`${info.file.name} 上传成功`)
+                this.loadDisabled = false 
+                this.form.attachmentName=info.file.response.result.attachmentName || ''         
+                this.form.attachmentUrl=info.file.response.result.attachmentUrl || ''
+            } else if (info.file.status === 'error') {
+                this.$message.error(`${info.file.name} file upload failed.`)
+                this.loadDisabled = false
+            }
+
+            // console.log(this.form)
+        },
     },
 
     mounted(){
@@ -564,7 +784,12 @@ export default {
             console.log(res);
             this.projectList=res.result
         })
+        this.isEidt=this.$parent.isEdit
+        this.getOrderInfo()
     },
+    activated(){
+        this.getOrderInfo()
+    }
 }
 </script>