Bläddra i källkod

'骄阳合并'

魏志佳 4 år sedan
förälder
incheckning
cb8cefc549
59 ändrade filer med 22851 tillägg och 1754 borttagningar
  1. 36 0
      src/components/bigImg.vue
  2. 524 0
      src/components/calendar/calendar.js
  3. 809 0
      src/components/calendar/calendar.vue
  4. 323 0
      src/components/editableTree.vue
  5. 38 2
      src/components/formComponents/selectGroup.vue
  6. 1 0
      src/components/formComponents/toutiaoTime.vue
  7. 4 0
      src/components/uploadFile.vue
  8. 3735 0
      src/components/vend-ztree.all.js
  9. 2 0
      src/main.js
  10. 1 1
      src/views/modules/Statistics/KSAccountReport.vue
  11. 79 52
      src/views/modules/Statistics/components/Treeselect.vue
  12. 190 28
      src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue
  13. 902 0
      src/views/modules/Statistics/popularVideo.vue
  14. 27 2
      src/views/modules/Statistics/refuseDataCreat.vue
  15. 28 4
      src/views/modules/Statistics/refuseDataCreatNew.vue
  16. 1 1
      src/views/modules/advertiser/ProjectList.vue
  17. 27 5
      src/views/modules/advertiser/modules/AdvertiserModal.vue
  18. 1 1
      src/views/modules/advertiser/modules/ProjectModal.vue
  19. 2 2
      src/views/modules/advertiser/modules/projectListModal.vue
  20. 47 0
      src/views/modules/autoLaunch/autoLaunchList.vue
  21. 2155 0
      src/views/modules/autoLaunch/autoLaunchReport.vue
  22. 124 0
      src/views/modules/autoLaunch/autoReportIndex.vue
  23. 2 2
      src/views/modules/autoLaunch/components/MultiCheckBox.vue
  24. 248 0
      src/views/modules/autoLaunch/components/Treeselect.vue
  25. 90 65
      src/views/modules/autoLaunch/components/linkMultiSelect.vue
  26. 1045 0
      src/views/modules/autoLaunch/components/materialList.vue
  27. 712 0
      src/views/modules/autoLaunch/components/platForm.vue
  28. 5 5
      src/views/modules/autoLaunch/radioCheck.vue
  29. 18 2
      src/views/modules/autoLaunch/createStrategy.vue
  30. 1086 0
      src/views/modules/autoLaunch/groupList.vue
  31. 2 0
      src/views/modules/autoLaunch/index.vue
  32. 2153 0
      src/views/modules/autoLaunch/materialAndBid.vue
  33. 1098 0
      src/views/modules/autoLaunch/planList.vue
  34. 861 0
      src/views/modules/autoLaunch/previewStrategy.vue
  35. 601 88
      src/views/modules/autoLaunch/setDirectional.vue
  36. 1090 0
      src/views/modules/autoLaunch/strategyList.vue
  37. 1 1
      src/views/modules/earlyWarningRules/configRules.vue
  38. 20 0
      src/views/modules/earlyWarningRules/pushTreeSelect.vue
  39. 57 104
      src/views/modules/earlyWarningRules/ruleModule.vue
  40. 39 22
      src/views/modules/earlyWarningRules/useRuleList.vue
  41. 902 804
      src/views/modules/kuaishouapp/account/accountIndex.vue
  42. 1214 0
      src/views/modules/kuaishouapp/account/copyAllUnit.vue
  43. 1 1
      src/views/modules/kuaishouapp/account/stepForm/Step2.vue
  44. 57 34
      src/views/modules/kuaishouapp/account/stepForm/Step3.vue
  45. 28 5
      src/views/modules/kuaishouapp/account/stepForm/Step4.vue
  46. 30 27
      src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue
  47. 93 55
      src/views/modules/kuaishouapp/batchCreation/campaignList.vue
  48. 237 77
      src/views/modules/kuaishouapp/batchCreation/creat/creatUnit.vue
  49. 1376 0
      src/views/modules/kuaishouapp/populationAnalysis/index.vue
  50. 3 1
      src/views/modules/material/videoMaterial.vue
  51. 8 2
      src/views/modules/workBench/designLeader/platForm.vue
  52. 12 6
      src/views/modules/workBench/designPeople/platForm.vue
  53. 272 156
      src/views/modules/workBench/materialList.vue
  54. 44 32
      src/views/modules/workBench/operator/materialList.vue
  55. 9 2
      src/views/modules/workBench/operator/platForm.vue
  56. 365 160
      src/views/modules/workBench/orderDetail.vue
  57. 1 1
      src/views/modules/workBench/orderList.vue
  58. 11 3
      src/views/oceanengine/HotMaterialList.vue
  59. 4 1
      vue.config.js

+ 36 - 0
src/components/bigImg.vue

@@ -0,0 +1,36 @@
+<template>
+  <!-- 过渡动画 -->
+  <a-modal title="查看封面" v-model="showImageChouzhen" :width="400" :footer="null">
+    <img :src="showImageStr" style="width: 100%" v-if="showType == 'inage'" />
+    <video class="video" :src="showImageStr" controls="controls" style="width: 100%" v-else>
+      您的浏览器不支持 video 标签。
+    </video>
+  </a-modal>
+</template>
+<script>
+export default {
+  props: {
+    imgSrc: {
+      type: String,
+      default: '',
+    },
+  },
+  data() {
+    return {
+      scale: 1,
+      showType: 'image',
+      showImageChouzhen: false,
+      showImageStr:''
+    }
+  },
+  methods: {
+    showImg(type,url) {
+      this.showType = type
+      this.showImageStr = url
+      this.showImageChouzhen = true
+    },
+  },
+}
+</script>
+
+

+ 524 - 0
src/components/calendar/calendar.js

@@ -0,0 +1,524 @@
+/**
+* @1900-2100区间内的公历、农历互转
+* @charset UTF-8
+* @Author  Jea杨(JJonline@JJonline.Cn) 
+* @Time    2014-7-21
+* @Time    2016-8-13 Fixed 2033hex、Attribution Annals
+* @Time    2016-9-25 Fixed lunar LeapMonth Param Bug
+* @Version 1.0.2
+* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
+* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
+*/
+var calendar = {
+
+    /**
+      * 农历1900-2100的润大小信息表
+      * @Array Of Property
+      * @return Hex 
+      */
+    lunarInfo:[0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,//1900-1909
+            0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,//1910-1919
+            0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,//1920-1929
+            0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,//1930-1939
+            0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,//1940-1949
+            0x06ca0,0x0b550,0x15355,0x04da0,0x0a5b0,0x14573,0x052b0,0x0a9a8,0x0e950,0x06aa0,//1950-1959
+            0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,//1960-1969
+            0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b6a0,0x195a6,//1970-1979
+            0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,//1980-1989
+            0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,//1990-1999
+            0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,//2000-2009
+            0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,//2010-2019
+            0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,//2020-2029
+            0x05aa0,0x076a3,0x096d0,0x04afb,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,//2030-2039
+            0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0,//2040-2049
+            /**Add By JJonline@JJonline.Cn**/
+            0x14b63,0x09370,0x049f8,0x04970,0x064b0,0x168a6,0x0ea50, 0x06b20,0x1a6c4,0x0aae0,//2050-2059
+            0x0a2e0,0x0d2e3,0x0c960,0x0d557,0x0d4a0,0x0da50,0x05d55,0x056a0,0x0a6d0,0x055d4,//2060-2069
+            0x052d0,0x0a9b8,0x0a950,0x0b4a0,0x0b6a6,0x0ad50,0x055a0,0x0aba4,0x0a5b0,0x052b0,//2070-2079
+            0x0b273,0x06930,0x07337,0x06aa0,0x0ad50,0x14b55,0x04b60,0x0a570,0x054e4,0x0d160,//2080-2089
+            0x0e968,0x0d520,0x0daa0,0x16aa6,0x056d0,0x04ae0,0x0a9d4,0x0a2d0,0x0d150,0x0f252,//2090-2099
+            0x0d520],//2100
+
+    /**
+      * 公历每个月份的天数普通表
+      * @Array Of Property
+      * @return Number 
+      */
+    solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],
+
+    /**
+      * 天干地支之天干速查表
+      * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
+      * @return Cn string 
+      */
+    Gan:["\u7532","\u4e59","\u4e19","\u4e01","\u620a","\u5df1","\u5e9a","\u8f9b","\u58ec","\u7678"],
+
+    /**
+      * 天干地支之地支速查表
+      * @Array Of Property 
+      * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
+      * @return Cn string 
+      */
+    Zhi:["\u5b50","\u4e11","\u5bc5","\u536f","\u8fb0","\u5df3","\u5348","\u672a","\u7533","\u9149","\u620c","\u4ea5"],
+
+    /**
+      * 天干地支之地支速查表<=>生肖
+      * @Array Of Property 
+      * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
+      * @return Cn string 
+      */
+    Animals:["\u9f20","\u725b","\u864e","\u5154","\u9f99","\u86c7","\u9a6c","\u7f8a","\u7334","\u9e21","\u72d7","\u732a"],
+
+    /**
+      * 24节气速查表
+      * @Array Of Property 
+      * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
+      * @return Cn string 
+      */
+    solarTerm:["\u5c0f\u5bd2","\u5927\u5bd2","\u7acb\u6625","\u96e8\u6c34","\u60ca\u86f0","\u6625\u5206","\u6e05\u660e","\u8c37\u96e8","\u7acb\u590f","\u5c0f\u6ee1","\u8292\u79cd","\u590f\u81f3","\u5c0f\u6691","\u5927\u6691","\u7acb\u79cb","\u5904\u6691","\u767d\u9732","\u79cb\u5206","\u5bd2\u9732","\u971c\u964d","\u7acb\u51ac","\u5c0f\u96ea","\u5927\u96ea","\u51ac\u81f3"],
+
+    /**
+      * 1900-2100各年的24节气日期速查表
+      * @Array Of Property 
+      * @return 0x string For splice
+      */
+    sTermInfo:['9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f',
+              '97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
+              '97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa',
+              '97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f',
+              'b027097bd097c36b0b6fc9274c91aa','9778397bd19801ec9210c965cc920e','97b6b97bd19801ec95f8c965cc920f',
+              '97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2','9778397bd197c36c9210c9274c91aa',
+              '97b6b97bd19801ec95f8c965cc920e','97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2',
+              '9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec95f8c965cc920e','97bcf97c3598082c95f8e1cfcc920f',
+              '97bd097bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e',
+              '97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
+              '97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722',
+              '9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f',
+              '97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
+              '97bcf97c359801ec95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
+              '97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd097bd07f595b0b6fc920fb0722',
+              '9778397bd097c36b0b6fc9210c8dc2','9778397bd19801ec9210c9274c920e','97b6b97bd19801ec95f8c965cc920f',
+              '97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
+              '97b6b97bd19801ec95f8c965cc920f','97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
+              '9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e','97bd07f1487f595b0b0bc920fb0722',
+              '7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
+              '97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
+              '97b6b97bd19801ec9210c965cc920e','97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
+              '9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf7f1487f531b0b0bb0b6fb0722',
+              '7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
+              '97bcf7f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
+              '97b6b97bd19801ec9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
+              '9778397bd097c36b0b6fc9210c91aa','97b6b97bd197c36c9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722',
+              '7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
+              '97b6b7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
+              '9778397bd097c36b0b70c9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
+              '7f0e397bd097c35b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
+              '7f0e27f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
+              '97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
+              '9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
+              '7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
+              '7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9274c91aa',
+              '97b6b7f0e47f531b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
+              '9778397bd097c36b0b6fc9210c91aa','97b6b7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
+              '7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','977837f0e37f149b0723b0787b0721',
+              '7f07e7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c35b0b6fc9210c8dc2',
+              '977837f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
+              '7f0e397bd097c35b0b6fc9210c8dc2','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
+              '7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','977837f0e37f14998082b0787b06bd',
+              '7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
+              '977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
+              '7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
+              '7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd',
+              '7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
+              '977837f0e37f14998082b0723b06bd','7f07e7f0e37f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
+              '7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b0721',
+              '7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f595b0b0bb0b6fb0722','7f0e37f0e37f14898082b0723b02d5',
+              '7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f531b0b0bb0b6fb0722',
+              '7f0e37f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
+              '7f0e37f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
+              '7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35',
+              '7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
+              '7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f149b0723b0787b0721',
+              '7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0723b06bd',
+              '7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722','7f0e37f0e366aa89801eb072297c35',
+              '7ec967f0e37f14998082b0723b06bd','7f07e7f0e37f14998083b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
+              '7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14898082b0723b02d5','7f07e7f0e37f14998082b0787b0721',
+              '7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66aa89801e9808297c35','665f67f0e37f14898082b0723b02d5',
+              '7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66a449801e9808297c35',
+              '665f67f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
+              '7f0e36665b66a449801e9808297c35','665f67f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
+              '7f07e7f0e47f531b0723b0b6fb0721','7f0e26665b66a449801e9808297c35','665f67f0e37f1489801eb072297c35',
+              '7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722'],
+
+    /**
+      * 数字转中文速查表
+      * @Array Of Property 
+      * @trans ['日','一','二','三','四','五','六','七','八','九','十']
+      * @return Cn string 
+      */
+    nStr1:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"],
+
+    /**
+      * 日期转农历称呼速查表
+      * @Array Of Property 
+      * @trans ['初','十','廿','卅']
+      * @return Cn string 
+      */
+    nStr2:["\u521d","\u5341","\u5eff","\u5345"],
+
+    /**
+      * 月份转农历称呼速查表
+      * @Array Of Property 
+      * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
+      * @return Cn string 
+      */
+    nStr3:["\u6b63","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u51ac","\u814a"],
+
+    /**
+      * 返回农历y年一整年的总天数
+      * @param lunar Year
+      * @return Number
+      * @eg:var count = calendar.lYearDays(1987) ;//count=387
+      */
+    lYearDays:function(y) {
+        var i, sum = 348;
+        for(i=0x8000; i>0x8; i>>=1) { sum += (calendar.lunarInfo[y-1900] & i)? 1: 0; }
+        return(sum+calendar.leapDays(y));
+    },
+
+    /**
+      * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
+      * @param lunar Year
+      * @return Number (0-12)
+      * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
+      */
+    leapMonth:function(y) { //闰字编码 \u95f0
+        return(calendar.lunarInfo[y-1900] & 0xf);
+    },
+
+    /**
+      * 返回农历y年闰月的天数 若该年没有闰月则返回0
+      * @param lunar Year
+      * @return Number (0、29、30)
+      * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
+      */
+    leapDays:function(y) {
+        if(calendar.leapMonth(y))  { 
+            return((calendar.lunarInfo[y-1900] & 0x10000)? 30: 29); 
+        }
+        return(0);
+    },
+
+    /**
+      * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
+      * @param lunar Year
+      * @return Number (-1、29、30)
+      * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
+      */
+    monthDays:function(y,m) {
+        if(m>12 || m<1) {return -1}//月份参数从1至12,参数错误返回-1
+        return( (calendar.lunarInfo[y-1900] & (0x10000>>m))? 30: 29 );
+    },
+
+    /**
+      * 返回公历(!)y年m月的天数
+      * @param solar Year
+      * @return Number (-1、28、29、30、31)
+      * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
+      */
+    solarDays:function(y,m) {
+        if(m>12 || m<1) {return -1} //若参数错误 返回-1
+        var ms = m-1;
+        if(ms==1) { //2月份的闰平规律测算后确认返回28或29
+            return(((y%4 == 0) && (y%100 != 0) || (y%400 == 0))? 29: 28);
+        }else {
+            return(calendar.solarMonth[ms]);
+        }
+    },
+
+    /**
+     * 农历年份转换为干支纪年
+     * @param  lYear 农历年的年份数
+     * @return Cn string
+     */
+    toGanZhiYear:function(lYear) {
+        var ganKey = (lYear - 3) % 10;
+        var zhiKey = (lYear - 3) % 12;
+        if(ganKey == 0) ganKey = 10;//如果余数为0则为最后一个天干
+        if(zhiKey == 0) zhiKey = 12;//如果余数为0则为最后一个地支
+        return calendar.Gan[ganKey-1] + calendar.Zhi[zhiKey-1];
+        
+    },
+
+    /**
+     * 公历月、日判断所属星座
+     * @param  cMonth [description]
+     * @param  cDay [description]
+     * @return Cn string
+     */
+    toAstro:function(cMonth,cDay) {
+        var s   = "\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf";
+        var arr = [20,19,21,21,21,22,23,23,23,23,22,22];
+        return s.substr(cMonth*2 - (cDay < arr[cMonth-1] ? 2 : 0),2) + "\u5ea7";//座
+    },
+
+    /**
+      * 传入offset偏移量返回干支
+      * @param offset 相对甲子的偏移量
+      * @return Cn string
+      */
+    toGanZhi:function(offset) {
+        return calendar.Gan[offset%10] + calendar.Zhi[offset%12];
+    },
+
+    /**
+      * 传入公历(!)y年获得该年第n个节气的公历日期
+      * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起 
+      * @return day Number
+      * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
+      */
+    getTerm:function(y,n) {
+        if(y<1900 || y>2100) {return -1;}
+        if(n<1 || n>24) {return -1;}
+        var _table = calendar.sTermInfo[y-1900];
+        var _info = [
+            parseInt('0x'+_table.substr(0,5)).toString() ,
+            parseInt('0x'+_table.substr(5,5)).toString(),
+            parseInt('0x'+_table.substr(10,5)).toString(),
+            parseInt('0x'+_table.substr(15,5)).toString(),
+            parseInt('0x'+_table.substr(20,5)).toString(),
+            parseInt('0x'+_table.substr(25,5)).toString()
+        ];
+        var _calday = [
+            _info[0].substr(0,1),
+            _info[0].substr(1,2),
+            _info[0].substr(3,1),
+            _info[0].substr(4,2),
+            
+            _info[1].substr(0,1),
+            _info[1].substr(1,2),
+            _info[1].substr(3,1),
+            _info[1].substr(4,2),
+            
+            _info[2].substr(0,1),
+            _info[2].substr(1,2),
+            _info[2].substr(3,1),
+            _info[2].substr(4,2),
+            
+            _info[3].substr(0,1),
+            _info[3].substr(1,2),
+            _info[3].substr(3,1),
+            _info[3].substr(4,2),
+            
+            _info[4].substr(0,1),
+            _info[4].substr(1,2),
+            _info[4].substr(3,1),
+            _info[4].substr(4,2),
+            
+            _info[5].substr(0,1),
+            _info[5].substr(1,2),
+            _info[5].substr(3,1),
+            _info[5].substr(4,2),
+        ];
+        return parseInt(_calday[n-1]);
+    },
+
+    /**
+      * 传入农历数字月份返回汉语通俗表示法
+      * @param lunar month
+      * @return Cn string
+      * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
+      */
+    toChinaMonth:function(m) { // 月 => \u6708
+        if(m>12 || m<1) {return -1} //若参数错误 返回-1
+        var s = calendar.nStr3[m-1];
+        s+= "\u6708";//加上月字
+        return s;
+    },
+
+    /**
+      * 传入农历日期数字返回汉字表示法
+      * @param lunar day
+      * @return Cn string
+      * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
+      */
+    toChinaDay:function(d){ //日 => \u65e5
+        var s;
+        switch (d) {
+            case 10:
+            s = '\u521d\u5341'; break;
+        case 20:
+            s = '\u4e8c\u5341'; break;
+            break;
+        case 30:
+            s = '\u4e09\u5341'; break;
+            break;
+        default :
+            s = calendar.nStr2[Math.floor(d/10)];
+            s += calendar.nStr1[d%10];
+        }
+        return(s);
+    },
+
+    /**
+      * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
+      * @param y year
+      * @return Cn string
+      * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
+      */
+    getAnimal: function(y) {
+        return calendar.Animals[(y - 4) % 12]
+    },
+
+    /**
+      * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
+      * @param y  solar year
+      * @param m  solar month
+      * @param d  solar day
+      * @return JSON object
+      * @eg:console.log(calendar.solar2lunar(1987,11,01));
+      */
+    solar2lunar:function (y,m,d) { //参数区间1900.1.31~2100.12.31
+        if(y<1900 || y>2100) {return -1;}//年份限定、上限
+        if(y==1900&&m==1&&d<31) {return -1;}//下限
+        if(!y) { //未传参  获得当天
+            var objDate = new Date();
+        }else {
+            var objDate = new Date(y,parseInt(m)-1,d)
+        }
+        var i, leap=0, temp=0;
+        //修正ymd参数
+        var y = objDate.getFullYear(),m = objDate.getMonth()+1,d = objDate.getDate();
+        var offset   = (Date.UTC(objDate.getFullYear(),objDate.getMonth(),objDate.getDate()) - Date.UTC(1900,0,31))/86400000;
+        for(i=1900; i<2101 && offset>0; i++) { temp=calendar.lYearDays(i); offset-=temp; }
+        if(offset<0) { offset+=temp; i--; }
+        
+        //是否今天
+        var isTodayObj = new Date(),isToday=false;
+        if(isTodayObj.getFullYear()==y && isTodayObj.getMonth()+1==m && isTodayObj.getDate()==d) {
+            isToday = true;
+        }
+        //星期几
+        var nWeek = objDate.getDay(),cWeek = calendar.nStr1[nWeek];
+        if(nWeek==0) {nWeek =7;}//数字表示周几顺应天朝周一开始的惯例
+        //农历年
+        var year = i;
+        
+        var leap = calendar.leapMonth(i); //闰哪个月
+        var isLeap = false;
+        
+        //效验闰月
+        for(i=1; i<13 && offset>0; i++) {
+            //闰月
+            if(leap>0 && i==(leap+1) && isLeap==false){ 
+                --i;
+                isLeap = true; temp = calendar.leapDays(year); //计算农历闰月天数
+            }
+            else{
+                temp = calendar.monthDays(year, i);//计算农历普通月天数
+            }
+            //解除闰月
+            if(isLeap==true && i==(leap+1)) { isLeap = false; }
+            offset -= temp;
+        }
+        
+        if(offset==0 && leap>0 && i==leap+1)
+        if(isLeap){
+            isLeap = false;
+        }else{ 
+            isLeap = true; --i;
+        }
+        if(offset<0){ offset += temp; --i; }
+        //农历月
+        var month   = i;
+        //农历日
+        var day     = offset + 1;
+        
+        //天干地支处理
+        var sm      =   m-1;
+        var gzY     =   calendar.toGanZhiYear(year);
+        
+        //月柱 1900年1月小寒以前为 丙子月(60进制12)
+        var firstNode   = calendar.getTerm(year,(m*2-1));//返回当月「节」为几日开始
+        var secondNode  = calendar.getTerm(year,(m*2));//返回当月「节」为几日开始
+        
+        //依据12节气修正干支月
+        var gzM     =   calendar.toGanZhi((y-1900)*12+m+11);
+        if(d>=firstNode) {
+            gzM     =   calendar.toGanZhi((y-1900)*12+m+12);
+        }
+        
+        //传入的日期的节气与否
+        var isTerm = false;
+        var Term   = null;
+        if(firstNode==d) {
+            isTerm  = true;
+            Term    = calendar.solarTerm[m*2-2];
+        }
+        if(secondNode==d) {
+            isTerm  = true;
+            Term    = calendar.solarTerm[m*2-1];
+        }
+        //日柱 当月一日与 1900/1/1 相差天数
+        var dayCyclical = Date.UTC(y,sm,1,0,0,0,0)/86400000+25567+10;
+        var gzD = calendar.toGanZhi(dayCyclical+d-1);
+        //该日期所属的星座
+        var astro = calendar.toAstro(m,d);
+        
+        return {'lYear':year,'lMonth':month,'lDay':day,'Animal':calendar.getAnimal(year),'IMonthCn':(isLeap?"\u95f0":'')+calendar.toChinaMonth(month),'IDayCn':calendar.toChinaDay(day),'cYear':y,'cMonth':m,'cDay':d,'gzYear':gzY,'gzMonth':gzM,'gzDay':gzD,'isToday':isToday,'isLeap':isLeap,'nWeek':nWeek,'ncWeek':"\u661f\u671f"+cWeek,'isTerm':isTerm,'Term':Term,'astro':astro};
+    },
+
+    /**
+      * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
+      * @param y  lunar year
+      * @param m  lunar month
+      * @param d  lunar day
+      * @param isLeapMonth  lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
+      * @return JSON object
+      * @eg:console.log(calendar.lunar2solar(1987,9,10));
+      */
+    lunar2solar:function(y,m,d,isLeapMonth) {   //参数区间1900.1.31~2100.12.1
+        var isLeapMonth = !!isLeapMonth;
+        var leapOffset  = 0;
+        var leapMonth   = calendar.leapMonth(y);
+        var leapDay     = calendar.leapDays(y);
+        if(isLeapMonth&&(leapMonth!=m)) {return -1;}//传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
+        if(y==2100&&m==12&&d>1 || y==1900&&m==1&&d<31) {return -1;}//超出了最大极限值 
+        var day  = calendar.monthDays(y,m); 
+        var _day = day;
+        //bugFix 2016-9-25 
+        //if month is leap, _day use leapDays method 
+        if(isLeapMonth) {
+            _day = calendar.leapDays(y,m);
+        }
+        if(y < 1900 || y > 2100 || d > _day) {return -1;}//参数合法性效验
+        
+        //计算农历的时间差
+        var offset = 0;
+        for(var i=1900;i<y;i++) {
+            offset+=calendar.lYearDays(i);
+        }
+        var leap = 0,isAdd= false;
+        for(var i=1;i<m;i++) {
+            leap = calendar.leapMonth(y);
+            if(!isAdd) {//处理闰月
+                if(leap<=i && leap>0) {
+                    offset+=calendar.leapDays(y);isAdd = true;
+                }
+            }
+            offset+=calendar.monthDays(y,i);
+        }
+        //转换闰月农历 需补充该年闰月的前一个月的时差
+        if(isLeapMonth) {offset+=day;}
+        //1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
+        var stmap   =   Date.UTC(1900,1,30,0,0,0);
+        var calObj  =   new Date((offset+d-31)*86400000+stmap);
+        var cY      =   calObj.getUTCFullYear();
+        var cM      =   calObj.getUTCMonth()+1;
+        var cD      =   calObj.getUTCDate();
+
+        return calendar.solar2lunar(cY,cM,cD);
+    }
+};
+
+export default calendar

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 809 - 0
src/components/calendar/calendar.vue


+ 323 - 0
src/components/editableTree.vue

@@ -0,0 +1,323 @@
+<template>
+  <div id="areaTree" class="addrTree">
+    <ul :id="treeId" class="ztree"></ul>
+  </div>
+</template>
+
+<script>
+import $ from 'jquery'
+export default {
+  name: 'editableTree',
+  components: {},
+  props: {
+    treeData: {
+      // 树 data
+      type: Array,
+      default() {
+        return []
+      },
+    },
+    editable: {
+      // 是否可编辑
+      type: Boolean,
+      default: true,
+    },
+    btn: {
+      // 按钮集合
+      type: Array,
+      default() {
+        return ['add', 'del']
+      },
+    },
+    selectFirstNode: {
+      // 是否默认选中第一个节点
+      type: Boolean,
+      default: false,
+    },
+    pIdKey: {
+      type: String,
+      default: 'parentId',
+    },
+  },
+  data() {
+    return {
+      treeId: 'treeDemo' + new Date().getTime(),
+      setting: {
+        view: {
+          addHoverDom: this.editable && this.showBtn('add') && this.addHoverDom,
+          showIcon: false,
+          showLine: true,
+          selectedMulti: false,
+        },
+        edit: {
+          enable: this.editable,
+          showRemoveBtn: this.showBtn('del') && this.showRemoveBtn,
+          showRenameBtn: this.showBtn('edit') && this.showRenameBtn,
+          removeTitle: '删除',
+          renameTitle: '修改',
+        },
+        data: {
+          simpleData: {
+            enable: true,
+            idKey: 'id',
+            pIdKey: this.pIdKey,
+            rootPId: 0,
+          },
+        },
+        callback: {
+          onClick: this.zTreeOnClick,
+          beforeDrag: this.beforeDrag,
+          onExpand: this.onExpand,
+          beforeRemove: this.beforeRemove,
+          beforeEditName: this.beforeEditName,
+          beforeRename: this.beforeRename,
+          onRename: this.onRename,
+          onRemove: this.onRemove,
+        },
+      },
+      zNodes: [],
+      log: '',
+      className: 'dark',
+      newCount: 1,
+      curDragNodes: '',
+      autoExpandNode: '',
+      action: 'add',
+    }
+  },
+  methods: {
+    zTreeOnClick(event, treeId, treeNode) {
+      this.$emit('treeNodeClick', treeNode)
+    },
+    beforeDrag(treeId, treeNodes) {
+      return false
+    },
+    onExpand(event, treeId, treeNode) {
+      if (treeNode === this.autoExpandNode) {
+        this.className = this.className === 'dark' ? '' : 'dark'
+        this.showLog('[ ' + this.getTime() + ' onExpand ]&nbsp;&nbsp;&nbsp;&nbsp;' + treeNode.name)
+      }
+    },
+    remove() {
+      // 移除节点
+      var zTree = $.fn.zTree.getZTreeObj(this.treeId),
+        nodes = zTree.getSelectedNodes(),
+        treeNode = nodes[0]
+      this.$emit('delTreeNode', treeNode)
+    },
+    beforeRemove(treeId, treeNode) {
+      if (treeNode.id) {
+        console.log('delete:', treeNode)
+        this.$emit('deleteNode', treeNode) // 触发删除
+      }
+      return false
+    },
+    onRemove(e, treeId, treeNode) {
+      this.showLog('[ ' + this.getTime() + ' onRemove ]&nbsp;&nbsp;&nbsp;&nbsp; ' + treeNode.name)
+    },
+    onRename(event, treeId, treeNode, isCancel) {
+      console.log('rename')
+      this.$emit('treeInfoEvent', treeNode, event)
+    },
+    beforeRename(treeId, treeNode, newName) {
+      if (newName.length == 0) {
+        alert('节点名称不能为空.')
+        var zTree = $.fn.zTree.getZTreeObj(this.treeId)
+        setTimeout(function () {
+          zTree.editName(treeNode)
+        }, 10)
+        return false
+      } else if (newName.length > 20) {
+        alert('节点名称不能大于20个字符.')
+        var zTree = $.fn.zTree.getZTreeObj(this.treeId)
+        setTimeout(function () {
+          zTree.editName(treeNode)
+        }, 10)
+        return false
+      }
+      return true
+    },
+    showLog(str) {
+      if (!this.log) this.log = $('#log')
+      this.log.append("<li class='" + this.className + "'>" + str + '</li>')
+      if (this.log.children('li').length > 8) {
+        this.log.get(0).removeChild(this.log.children('li')[0])
+      }
+    },
+    getTime() {
+      var now = new Date(),
+        h = now.getHours(),
+        m = now.getMinutes(),
+        s = now.getSeconds(),
+        ms = now.getMilliseconds()
+      return h + ':' + m + ':' + s + ' ' + ms
+    },
+    addHoverDom(treeId, treeNode) {
+      if (treeNode.addDis != true) {
+        let _this = this
+        var sObj = $('#' + treeNode.tId + '_span')
+        if (treeNode.editNameFlag || $('#addBtn_' + treeNode.tId).length > 0) return
+        var addStr =
+          "<span class='button add' id='addBtn_" + treeNode.tId + "' title='新增' onfocus='this.blur();'>新增</span>"
+        sObj.after(addStr)
+        var btn = $('#addBtn_' + treeNode.tId)
+        if (btn)
+          btn.bind('click', function () {
+            _this.add(treeNode)
+          })
+      }
+    },
+    add(treeNode) {
+      // 增加子节点
+      this.action = 'add' // 切换为add
+      var zTree = $.fn.zTree.getZTreeObj(this.treeId)
+      var isParent = false
+      var nodes = zTree.getSelectedNodes()
+      var treeNode2 = nodes[0]
+      if (treeNode) {
+        treeNode2 = zTree.addNodes(treeNode, {
+          id: '',
+          pId: treeNode.id,
+          sysCode: treeNode.sysCode || treeNode.valStr,
+          isParent: isParent,
+          name: '新子节点' + this.newCount++,
+        })
+      } else {
+        treeNode2 = zTree.addNodes(null, { id: '', pId: 0, isParent: isParent, name: '新节点' + this.newCount++ })
+      }
+      if (treeNode2) {
+        zTree.editName(treeNode2[0])
+      } else {
+        alert('叶子节点被锁定,无法增加子节点')
+      }
+    },
+    addTopNodes() {
+      this.action = 'add'
+      var zTree = $.fn.zTree.getZTreeObj(this.treeId)
+      var treeNode = zTree.addNodes(null, { id: '', pId: 0, isParent: true, name: '新节点' + this.newCount++ })
+      zTree.editName(treeNode[0])
+      this.treeNodeMessage = zTree.getNodes() //Root节点信息
+      this.$emit('RootNodes', this.treeNodeMessage)
+    },
+    showRemoveBtn(treeId, treeNode) {
+      if (treeNode.removeDis == true) return false
+      return true
+    },
+    showRenameBtn(treeId, treeNode) {
+      if (treeNode.renameDis == true) return true
+      return false
+    },
+    showBtn(button) {
+      if (this.btn && this.btn.length > 0) {
+        if (this.btn.findIndex((v) => v == button) > -1) {
+          return true
+        } else {
+          return false
+        }
+      } else {
+        return false
+      }
+    },
+    selectFirstNodeFun() {
+      // 选中第一个节点
+      if (this.selectFirstNode) {
+        const treeObj = $.fn.zTree.getZTreeObj(this.treeId)
+        console.log(treeObj)
+        let nodes = treeObj.getNodes()
+        if (nodes.length > 0) {
+          treeObj.selectNode(nodes[0])
+        }
+      }
+    },
+    selectNode(node) {
+      const treeObj = $.fn.zTree.getZTreeObj(this.treeId)
+      treeObj.selectNode(node)
+    },
+    queryTreeFun(data) {
+      this.searchTree(data)
+    },
+    searchTree(info) {
+      var treeObj = $.fn.zTree.getZTreeObj(this.treeId)
+      if (info.val == '') {
+        $.fn.zTree.init($('#' + this.treeId), this.setting, this.treeData)
+      } else {
+        function filter(node) {
+          return node.name.indexOf(info.val) > -1
+        }
+        let nodes = treeObj.transformToArray(this.treeData)
+        nodes = JSON.parse(JSON.stringify(nodes))
+        nodes.map((item) => {
+          if (item.hasOwnProperty('children')) {
+            delete item.children
+          }
+          return item
+        })
+
+        nodes = nodes.filter((v) => v.name.indexOf(info.val) > -1)
+        nodes = treeObj.transformTozTreeNodes(nodes)
+        $.fn.zTree.init($('#' + this.treeId), this.setting, nodes)
+        treeObj.expandAll(true)
+      }
+    },
+  },
+  watch: {
+    treeData(val) {
+      $.fn.zTree.init($('#' + this.treeId), this.setting, val)
+      this.selectFirstNodeFun()
+    },
+  },
+  mounted() {
+    this.$nextTick(() => {
+      $.fn.zTree.init($('#' + this.treeId), this.setting, this.treeData)
+      this.selectFirstNodeFun()
+    })
+  },
+}
+</script>
+<style lang="scss" scope>
+.addrTree {
+  position: relative;
+  height: 100%;
+  background: #fff;
+  .tree_title {
+    height: 30px;
+    line-height: 30px;
+    padding: 0 10px;
+    background: #fafafa;
+    button {
+      float: right;
+      margin: 4px 4px 0 0;
+    }
+  }
+  .ztree {
+    height: 100%;
+    overflow: auto;
+    padding: 5px;
+    li span.button.add {
+      background-position: -143px 0;
+    }
+  }
+  [treenode_a] {
+    vertical-align: middle;
+    .button.add {
+      margin-right: 2px;
+      display: none;
+    }
+    &:hover {
+      .button.add {
+        display: inline-block;
+      }
+    }
+    span {
+      vertical-align: middle !important;
+    }
+  }
+  [treenode_a].curSelectedNode {
+    .button.add {
+      display: inline-block;
+    }
+  }
+  [treenode_switch] {
+    vertical-align: middle;
+  }
+}
+</style>

+ 38 - 2
src/components/formComponents/selectGroup.vue

@@ -31,6 +31,11 @@ export default {
       type: String,
       default: '',
     },
+    requestUrl: {
+      // 字典代码
+      type: String,
+      default: '',
+    },
     require: {
       type: Boolean,
       default() {
@@ -216,8 +221,11 @@ export default {
     this.$nextTick(() => {
       if (this.code && this.options.length == 0) {
         // 如果code值不为空且options.lengt==0, 则去请求字典项
-        this.getOptions()
-      } else {
+        this.getOptions(this.requestUrl)
+      } else if(this.requestUrl && this.options.length == 0){
+        this.getOptionsByURrl(this.requestUrl)
+        
+      }else {
         // 否则将外部传入的options显示到下拉框中
         this.selectOption.splice(0, this.selectOption.length)
         this.selectOption.push(...this.options)
@@ -229,6 +237,34 @@ export default {
     filterOptionAll(input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     },
+    getOptionsByURrl(url){
+      getAction(url,{}).then((res) => {
+        if (res.success && isArray(res.result)) {
+          let data = res.result
+          data = data.map((v) => {
+            return {
+              ...v,
+              label: v.tagName,
+              value: v.tagId+"",
+            }
+          })
+          if (!this.multiple && !this.require) {
+            data.unshift({ label: '不限', value: 'unlimited' })
+            if (this.value == ''|| this.value == null || this.value.length == 0 ) {
+              this.selectedVal = ['unlimited']
+            }
+          } else {
+            if (this.value == ''|| this.value == null || this.value.length == 0 ) {
+              this.selectedVal = []
+              this.$emit('clearValidate', this.selectedVal)
+            }
+          }
+          this.selectOption.splice(0, this.selectOption.length)
+          this.selectOption.push(...data)
+          this.setDefaultVal(this.selectOption)
+        }
+      })
+    },
     getOptions() {
       // 获取字典项
 

+ 1 - 0
src/components/formComponents/toutiaoTime.vue

@@ -46,6 +46,7 @@ export default {
   },
   data() {
     return {
+      changeDataElse: ['1'],
       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: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],

+ 4 - 0
src/components/uploadFile.vue

@@ -97,6 +97,9 @@ export default {
     },
     value: {
       required: true,
+      default() {
+        return ''
+      },
     },
     size: {
       type: Number,
@@ -141,6 +144,7 @@ export default {
     value: {
       immediate: true,
       handler(n, o) {
+        console.log(n,o)
         if (this.fileList&&this.fileList.length == 0) {
           if (typeof n == 'object') {
             this.fileList = n.map((item, index) => {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3735 - 0
src/components/vend-ztree.all.js


+ 2 - 0
src/main.js

@@ -63,6 +63,8 @@ import JDictSelectTag from './components/dict/index.js'
 import hasPermission from '@/utils/hasPermission'
 import vueBus from '@/utils/vueBus';
 
+
+import '@/components/vend-ztree.all.js'
 import JeecgComponents from '@/components/jeecg/index'
 // import iView from 'iview'
 import '!style-loader!css-loader!less-loader!./theme/index.less'

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

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

+ 79 - 52
src/views/modules/Statistics/components/Treeselect.vue

@@ -16,10 +16,10 @@
       :auto-load-root-options="false"
       @select="update"
       @input="emitValue"
-      :limit="2"
+      :limit="limit"
       :default-options="true"
       :limitText="
-        count => {
+        (count) => {
           return '隐藏' + count + '条'
         }
       "
@@ -50,6 +50,12 @@ export default {
     showLoading: 'loading...',
   }),
   props: {
+    oneData: {
+      type: Boolean,
+      default() {
+        return false
+      },
+    },
     //是否多选
     multiple: {
       type: Boolean,
@@ -58,7 +64,6 @@ export default {
       },
     },
     appId: {
-      
       default() {
         return ''
       },
@@ -77,27 +82,34 @@ export default {
         return '/ctop/projectMember/participateListByMediaId'
       },
     },
+    // 展示条数
+    limit: {
+      type: Number,
+      default() {
+        return 2
+      },
+    },
   },
   components: {
     Treeselect,
   },
   watch: {
     $route(n, o) {},
-      appId: {
-        handler(n, o) {
-          console.log(n)
-          if (n.length == 0) {
-            if (this.multiple) {
-              this.value = []
-            } else {
-              this.value = undefined
-            }
-          }else{
-            this.value=this.appId
+    appId: {
+      handler(n, o) {
+        console.log(n)
+        if (n.length == 0) {
+          if (this.multiple) {
+            this.value = []
+          } else {
+            this.value = undefined
           }
-        },
-        deep: true
-      }
+        } else {
+          this.value = this.appId
+        }
+      },
+      deep: true,
+    },
   },
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
@@ -165,13 +177,14 @@ export default {
       }
 
       if (this.reqUrl == '/ctop/projectMember/participateListByMediaId') {
-        if(this.options.length>0){
+        if (this.options.length > 0) {
           return
         }
         postAction(this.reqUrl, params).then((res) => {
           if (res.success) {
             this.options = res.result.map((item) => {
-              return {
+              
+                return {
                 id: item.projectId + 'projectId',
                 label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
                 children: item.accountList
@@ -179,7 +192,11 @@ export default {
                       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) +
+                          (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' +
@@ -187,42 +204,52 @@ export default {
                       }
                     })
                   : [],
-              }
+                }
+              
+              
             })
+            if (this.oneData&&!this.multiple) {
+              var data = this.options.filter((item) => {
+                if (item.children&&item.children.length > 0) {
+                  return { ...item }
+                }
+              })
+              this.$emit('update:appId', data[0].children[0].id)
+            }
           }
         })
-      } 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 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 {
+          }
+        })
+      } else {
         getAction(this.reqUrl, {
           userId: this.userInfo().id,
         }).then((res) => {

+ 190 - 28
src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue

@@ -170,8 +170,8 @@
   <div class="newPlanStatic">
     <div class="tabbody">
       <a-tabs v-model="tabKey" @change="tabChange">
-        <a-tab-pane :key="1" tab="头条">        
-        </a-tab-pane>
+        <!-- <a-tab-pane :key="1" tab="头条">        
+        </a-tab-pane> -->
         <a-tab-pane :key="2" tab="快手">       
         </a-tab-pane>
       </a-tabs>
@@ -222,7 +222,19 @@
               </a-select-option>
             </a-select> 
             <a-button type='primary' style="position:absolute;right:20px" @click="search">查询</a-button>
-        </div>
+          </div>
+          <div style="margin-bottom:20px">
+              <span>数据维度:</span>
+                <a-radio-group v-model="value" @change="dataTypeChange">
+                    <a-radio :value="1">
+                        广告计划
+                    </a-radio>
+                    <a-radio :value="2">
+                        广告组
+                    </a-radio>
+                    
+                </a-radio-group>
+          </div>
           <div class="time"  @click="opendate" >
             <datePick  :dateValue.sync='dateValue'   :type.sync='type'   />
             
@@ -236,7 +248,9 @@
       <div class="showNumBox">
           <a-col :sm="24" :md="10" :xl="10" :xxl="10">
             <span class="title">
-              新上{{tabKey==1?'计划数':'推广组'}}
+              
+              <template v-if="tabKey==1 || tabKey==2&&value==1 ">新上计划数</template>
+               <template v-else-if="tabKey==2&&value==2">新上推广组</template>
             </span>
             <div>
               <countTo
@@ -254,7 +268,10 @@
           </a-col>
           
           <a-col :sm="24" :md="10" :xl="10" :xxl="10">
-            <span class="title">有效{{tabKey==1?'计划数':'推广组'}}</span>
+            <span class="title">
+               <template v-if="tabKey==1 || tabKey==2&&value==1 ">有效计划数</template>
+               <template v-else-if="tabKey==2&&value==2">有效推广组</template>
+            </span>
            <div>
               <countTo
                 :startVal="0"
@@ -283,9 +300,9 @@
       <a-col :span="24">
         <div class="tableBody">
           <a-tabs v-model="tableTab" @change="tableTabChange">
-            <a-tab-pane :key="1" :tab="tabKey==1?'新上计划数':'新上推广组'">        
+            <a-tab-pane :key="1" :tab="(tabKey==1||tabKey==2&&value==1)?'新上计划数':'新上推广组'">        
             </a-tab-pane>
-            <a-tab-pane :key="2" :tab="tabKey==1?'有效计划数':'有效推广组'">       
+            <a-tab-pane :key="2" :tab="(tabKey==1||tabKey==2&&value==1)?'有效计划数':'有效推广组'">       
             </a-tab-pane>
           </a-tabs>
           <a-table :columns="columns" :dataSource="dataTable" :pagination="false" :loading="loading" bordered>             
@@ -514,7 +531,106 @@ let KScolumnsVaild=[
   },
 ]
 
-
+let KScolumnsPlan=[
+  // {
+  //   title: '项目名称',
+  //   dataIndex: 'projectName',
+  //   scopedSlots: { customRender: 'projectName' },
+  //   align: 'center',
+  //   key:'projectName'
+    
+  // },
+  {
+    title: '账户名称',
+    dataIndex: 'authName',
+    scopedSlots: { customRender: 'authName' },
+    align: 'center',
+    key:'authName'
+    
+  },
+  {
+    title: '账户ID',
+    dataIndex: 'accountId',
+    scopedSlots: { customRender: 'accountId' },
+    align: 'center',
+    key:'accountId'
+    
+  },
+  {
+    title: '账户所属人',
+    dataIndex: 'userName',
+    scopedSlots: { customRender: 'userName' },
+    align: 'center',
+    key:'userName'
+    
+  },
+  {
+    title: '新上计划数',
+    dataIndex: 'new',
+    scopedSlots: { customRender: 'new' },
+    align: 'center',
+    key:'new'
+    
+  },
+  {
+    title: '最近上新',
+    dataIndex: 'maxCreateTime',
+    scopedSlots: { customRender: 'maxCreateTime' },
+    align: 'center',
+    key:'maxCreateTime'
+    
+  },
+]
+let KScolumnsPlanVaild=[
+  // {
+  //   title: '项目名称',
+  //   dataIndex: 'projectName',
+  //   scopedSlots: { customRender: 'projectName' },
+  //   align: 'center',
+  //   key:'projectName'
+    
+  // },
+  {
+    title: '账户名称',
+    dataIndex: 'authName',
+    scopedSlots: { customRender: 'authName' },
+    align: 'center',
+    key:'authName'
+    
+  },
+  {
+    title: '账户ID',
+    dataIndex: 'accountId',
+    scopedSlots: { customRender: 'accountId' },
+    align: 'center',
+    key:'accountId'
+    
+  },
+  {
+    title: '账户所属人',
+    dataIndex: 'userName',
+    scopedSlots: { customRender: 'userName' },
+    align: 'center',
+    key:'userName'
+    
+  },
+  {
+    title: '有效计划数',
+    dataIndex: 'valid',
+    scopedSlots: { customRender: 'valid' },
+    align: 'center',
+    key:'valid'
+    
+  },
+  {
+    title: '最近上新',
+    dataIndex: 'maxCreateTime',
+    scopedSlots: { customRender: 'maxCreateTime' },
+    align: 'center',
+    key:'maxCreateTime'
+    
+  },
+]
 
 
 let sectionOption={
@@ -633,6 +749,7 @@ export default {
 
   data: function() {
     return {
+      value:2,
       KSaccountList:[],
       TTaccountList:[],
 
@@ -677,6 +794,21 @@ export default {
     }
   },
   methods: {
+    dataTypeChange(e){
+      console.log(e.target.value)
+        if(this.value==2){
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumns]:[...KScolumnsVaild];
+          this.sectionOption.legend.data=['新上推广组','有效推广组']
+        }else{
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumnsPlan]:[...KScolumnsPlanVaild];
+          this.sectionOption.legend.data=['新上计划数','有效计划数']
+        }
+        this.getNewPlan()
+    },
       //项目改变后的事件
     treeChange(val) {
       // console.log(this.treeData)
@@ -794,7 +926,8 @@ export default {
     // 快手头条的切换
     tabChange(key){
       console.log(key);
-      
+      this.treeValue=[];
+      this.operate=''
       if(key==1){
         // toutiao
         this.treeData=this.TTaccountList;
@@ -803,11 +936,20 @@ export default {
         this.sectionOption.legend.data=['新上计划数','有效计划数']
       }else{
         // kuaishou
-        this.operateList=this.KSoperateList
-        this.treeData=this.KSaccountList;
-        this.columns=this.tableTab==1?[...KScolumns]:[...KScolumnsVaild]
-        this.sectionOption.legend.data=['新上推广组','有效推广组']
+        if(this.value==2){
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumns]:[...KScolumnsVaild]
+          this.sectionOption.legend.data=['新上推广组','有效推广组']
+        }else{
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumnsPlan]:[...KScolumnsPlanVaild]
+          this.sectionOption.legend.data=['新上计划数','有效计划数']
+        }
+        
       }
+      
       this.getNewPlan()
     },
     operateChange(value){
@@ -1038,7 +1180,12 @@ export default {
         url='/ctop/bytedance/newPlan/report/data'
       }else{
         // 快手
-        url='/ctop/kuaishou/newGroup/report/data'
+        if(this.value==2){
+          url='/ctop/kuaishou/newGroup/report/data'
+        }else{
+          url='/ctop/kuaishou/newPlan/report/data'
+        }
+        
       }
       // if(this.accountId){
       //   this.operate='';
@@ -1046,16 +1193,23 @@ export default {
       //   this.accountId=''
       // }
       this.loading=true;
-      
+      this.echartSpinning=true;
       this.sectionOption=JSON.parse(JSON.stringify(sectionOption));
       if(this.tabKey==1){
         this.sectionOption.legend.data=['新上计划数','有效计划数']
         this.sectionOption.series[0].name='新上计划数'
         this.sectionOption.series[1].name='有效计划数'
       }else{
-        this.sectionOption.legend.data=['新上推广组','有效推广组']
-        this.sectionOption.series[0].name='新上推广组'
-        this.sectionOption.series[1].name='有效推广组'
+        if(this.value==2){
+          this.sectionOption.legend.data=['新上推广组','有效推广组']
+          this.sectionOption.series[0].name='新上推广组'
+          this.sectionOption.series[1].name='有效推广组'
+        }else{
+          this.sectionOption.legend.data=['新上计划数','有效计划数']
+          this.sectionOption.series[0].name='新上计划数'
+          this.sectionOption.series[1].name='有效计划数'
+        }
+        
       }
       
       postAction(url,{
@@ -1070,18 +1224,26 @@ export default {
         this.loading=false;
         this.echartSpinning=false;
         if(res.success){
-          this.effectPlan=res.result.sumData.valid;
-          this.newPlan=res.result.sumData.new;
-          this.dataTable=res.result.listData;
-
-          // 处理echar数据
-          res.result.chartData.map(item=>{
-            this.sectionOption.xAxis.data.push(item.statDate)
-            this.sectionOption.series[0].data.push(item.new)
-            this.sectionOption.series[1].data.push(item.valid)
-          })
+          if(res.result){
+              this.effectPlan=res.result.sumData.valid;
+              this.newPlan=res.result.sumData.new;
+              this.dataTable=res.result.listData;
+              // 处理echar数据
+              res.result.chartData.map(item=>{
+                this.sectionOption.xAxis.data.push(item.statDate)
+                this.sectionOption.series[0].data.push(item.new)
+                this.sectionOption.series[1].data.push(item.valid)
+              })
          
 
+          }else{
+              this.effectPlan=0;
+              this.newPlan=0;
+              this.dataTable=[];
+          }
+          
+
+          
 
           this.getEchartData('sectionChart', this.sectionOption);
 

+ 902 - 0
src/views/modules/Statistics/popularVideo.vue

@@ -0,0 +1,902 @@
+<style lang="scss" scoped>
+.search-bar {
+  display: flex;
+  align-items: center;
+}
+.search-box p {
+  display: inline-block;
+  border: 1px solid #f2f2f2;
+  border-radius: 5px;
+  margin-right: 10px;
+  padding: 5px 10px;
+  cursor: pointer;
+}
+</style>
+<style>
+.showNumBox{
+  margin: 10px 0;
+}
+.showNumBox .ant-card-body {
+  display: flex;
+  justify-content: center;
+}
+.showNumBox p,
+.showNumBox span {
+  text-align: center;
+  line-height: 40px;
+  font-size: 30px;
+  font-weight: 600;
+  color: red;
+  margin: 0;
+}
+.search-box .ant-card-body {
+  padding: 5px 15px;
+}
+.showNumBox .ant-card-body .styleElse {
+  line-height: 60px;
+  height: 40px;
+  font-size: 16px;
+  font-weight: 400;
+  margin-left: 10px;
+}
+.ant-modal-wrap .yincang .ant-modal-content .ant-modal-footer {
+  display: none !important;
+}
+.yincang .ant-col-6 p {
+  text-align: left;
+  color: red;
+  font-size: 16px;
+  font-weight: 500;
+}
+.ant-table-thead div {
+  font-weight: 700;
+}
+.tool-tip {
+  position: absolute;
+  top: 65px;
+  right: 10px;
+}
+</style>
+<style lang='less'>
+.ant-card-head .ant-tabs-bar{
+  padding: 0;
+}
+.search-box .ant-card-body {
+  padding: 5px 15px;
+
+}
+.search-box{
+  padding: 15px 10px;
+}
+.search-box p {
+  display: inline-block;
+  border: 1px solid #f2f2f2;
+  border-radius: 5px;
+  margin-right: 10px;
+  padding: 5px 10px;
+  cursor: pointer;
+}
+.statistics .ant-col-6 .ant-card-body .styleElse {
+  line-height: 60px;
+  height: 40px;
+  font-size: 16px;
+  font-weight: 400;
+  margin-left: 10px;
+}
+.ant-modal-wrap .yincang .ant-modal-content .ant-modal-footer {
+  display: none !important;
+}
+.yincang .ant-col-6 p {
+  text-align: left;
+  color: red;
+  font-size: 16px;
+  font-weight: 500;
+}
+.ant-table-thead div {
+  font-weight: 700;
+}
+.tool-tip {
+  position: absolute;
+  top: 65px;
+  right: 10px;
+}
+.statistics{
+  .ant-card-bordered {
+     border: none; 
+  }
+  .ant-card-head .ant-tabs {
+    clear: both;
+    margin-bottom: -13px;
+    color: rgba(0, 0, 0, 0.65);
+    font-weight: normal;
+    font-size: 14px;
+}
+.duibi{
+  position: absolute;
+  right: 24px;
+  top: 15px;
+}
+  p{
+    margin-bottom: 0;
+  }
+}
+
+</style>
+
+<style lang="less">
+.newPlanStatic{
+  .divider{
+      height: 62px;
+  }
+  .showNumBox{
+    background: white;
+    overflow: hidden;
+    margin: 15px 0;
+    padding: 30px 0;
+    text-align: center;
+    .ant-card-body{
+      padding-top: 0;
+    }
+    .title{     
+
+      font-size: 14px;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #999999;
+      line-height: 22px;
+      display: inline-block;
+    }
+  }
+  .tabbody{
+    background: white;
+    padding: 0 24px;
+    margin-bottom: 15px;
+    .ant-tabs-bar {
+      margin: 0;
+    }
+  }
+  .chartBox{
+    background: white;
+    padding: 20px 0;
+  }
+  .tableBody{
+    background: white;
+    padding: 20px ;
+  }
+}
+</style>
+
+<template>
+  <div class="newPlanStatic">
+    <div class="tabbody">
+      <a-tabs v-model="tabKey" @change="tabChange">
+        <a-tab-pane :key="1" tab="头条">        
+        </a-tab-pane>
+        <a-tab-pane :key="2" tab="快手">       
+        </a-tab-pane>
+      </a-tabs>
+    </div>
+    
+    <a-row>
+      <a-col :span="24">
+        
+        <a-card :bordered="false" class="search-box">
+          <div style="margin-bottom:20px">
+            
+
+            <span style="margin-left:20px">编导:</span>
+            <a-select
+              v-model="planId"
+              show-search
+              placeholder="请输入名字"
+              option-filter-prop="children"
+              style="width: 200px"
+              :filter-option="filterOption"
+              @change="operateChange"
+              :disabled='operateDisabled'
+              allowClear
+            >
+              <a-select-option v-for="item in designList" :key="item.user_id" :value="item.id">
+                {{item.realname+'_('+item.roleName+')'}}
+              </a-select-option>
+            </a-select> 
+            <span style="margin-left:20px">剪辑:</span>
+            <a-select
+              v-model="clipId"
+              show-search
+              placeholder="请输入名字"
+              option-filter-prop="children"
+              style="width: 200px"
+              :filter-option="filterOption"
+              @change="operateChange"
+              :disabled='operateDisabled'
+              allowClear
+            >
+              <a-select-option v-for="item in designList" :key="item.user_id" :value="item.id">
+                {{item.realname+'_('+item.roleName+')'}}
+              </a-select-option>
+            </a-select> 
+            <span style="margin-left:20px">拍摄:</span>
+            <a-select
+              v-model="shotId"
+              show-search
+              placeholder="请输入名字"
+              option-filter-prop="children"
+              style="width: 200px"
+              :filter-option="filterOption"
+              @change="operateChange"
+              :disabled='operateDisabled'
+              allowClear
+            >
+              <a-select-option v-for="item in designList" :key="item.user_id" :value="item.id">
+                {{item.realname+'_('+item.roleName+')'}}
+              </a-select-option>
+            </a-select> 
+            <a-button type='primary' style="position:absolute;right:20px" @click="search">查询</a-button>
+            
+          </div>
+           <div style="margin-bottom:20px">
+                <span>日期选择:</span>
+                <a-range-picker
+                    @change="dateChange"
+                    v-model="dateRange"
+                    :disabled-date="disabledDate" 
+                    style="width:200px"                    
+                />
+                <span style="margin-left:20px">数据维度:</span>
+                <a-radio-group v-model="value" @change="dataTypeChange">
+                    <a-radio value="valid">
+                        有效视频
+                    </a-radio>
+                    <a-radio value="hot">
+                        爆款视频
+                    </a-radio>
+                    <a-radio value="onlie">
+                        上线时间
+                    </a-radio>
+                    
+                </a-radio-group>
+          </div>
+          <div class="time"   >
+              
+            
+          </div>
+
+        </a-card>
+      </a-col>
+    </a-row>
+    
+    
+    <a-row style="margin-bottom:15px;margin-top:12px">
+      <a-col :span="24">
+        <div class="tableBody">
+          <a-button  type='primary' class="export" style="margin-bottom:20px" @click="exportExcel" :loading="exportloading">导出报表</a-button>
+          <a-table :columns="columns" :dataSource="dataTable" :pagination="ipagination" :loading="loading" bordered @change="tableChange">  
+                <span slot="createImg" slot-scope="text,record">  
+                    <a-popover placement="right">
+                        <template slot="content">
+                            <video :src="record.url" style="width:250px" controls  ></video>
+                        </template>
+                        <template slot="title">
+                        </template>                       
+                        <img :src="record.coverUrl || noImg" alt="" style="width:80px">
+                    </a-popover>
+                </span> 
+                <span slot='companyName' slot-scope="text">{{text || '未知'}}</span>          
+                <span slot='planName' slot-scope="text">{{text || '-'}}</span>          
+                <span slot='clipName' slot-scope="text">{{text || '-'}}</span>          
+                <span slot='shotName' slot-scope="text">{{text || '-'}}</span>          
+                <span slot='totalCost' slot-scope="text">{{text |decimalsHandle}}</span>          
+                <span slot='activeNum' slot-scope="text">{{text |formatCurrency}}</span>          
+                <span slot='clickNum' slot-scope="text">{{text |formatCurrency}}</span>          
+                <span slot='convertNum' slot-scope="text">{{text |formatCurrency}}</span>          
+                <span slot='showNum' slot-scope="text">{{text |formatCurrency}}</span>          
+                <span slot='aclick' slot-scope="text">{{text |formatCurrency}}</span>          
+                <span slot='bclick' slot-scope="text">{{text |formatCurrency}}</span>          
+                <span slot='photoClick' slot-scope="text">{{text |formatCurrency}}</span>          
+                <span slot='photoShow' slot-scope="text">{{text |formatCurrency}}</span>          
+          </a-table> 
+        </div>
+               
+      </a-col>
+    </a-row>
+  </div>
+</template>
+
+<script>
+
+
+import { TreeSelect } from 'ant-design-vue';
+const SHOW_PARENT = TreeSelect.SHOW_PARENT;
+import ARow from 'ant-design-vue/es/grid/Row'
+import ACol from 'ant-design-vue/es/grid/Col'
+import moment from 'moment'
+
+import {  getKsAccountReport, getKsDetail, getReportList } from '@api/video.js'
+import {
+    getAction,
+    postAction,
+    downFile,
+    downFilePost
+  } from '@/api/manage';
+
+
+import qs from 'qs'
+
+
+
+let TTcolumns=[
+    {
+    title: '视频',
+    dataIndex: 'createImg',
+    scopedSlots: { customRender: 'createImg' },
+    align: 'center',
+    key:'userNcreateImgame'
+    
+  },
+  {
+    title: '视频ID',
+    dataIndex: 'videoCode',
+    scopedSlots: { customRender: 'videoCode' },
+    align: 'center',
+    key:'videoCode'
+    
+  },
+  {
+    title: '视频上线时间',
+    dataIndex: 'stateDate',
+    scopedSlots: { customRender: 'stateDate' },
+    align: 'center',
+    key:'stateDate'
+    
+  },
+  
+  {
+    title: '所属公司',
+    dataIndex: 'companyName',
+    scopedSlots: { customRender: 'companyName' },
+    align: 'center',
+    key:'companyName'
+    
+  },
+  {
+    title: '策划名称',
+    dataIndex: 'planName',
+    scopedSlots: { customRender: 'planName' },
+    align: 'center',
+    key:'planName'
+    
+  },
+  {
+    title: '剪辑名称',
+    dataIndex: 'clipName',
+    scopedSlots: { customRender: 'clipName' },
+    align: 'center',
+    key:'clipName'
+    
+  },
+  {
+    title: '拍摄名称',
+    dataIndex: 'shotName',
+    scopedSlots: { customRender: 'shotName' },
+    align: 'center',
+    key:'shotName'
+    
+  },
+  {
+    title: '总消耗',
+    dataIndex: 'totalCost',
+    scopedSlots: { customRender: 'totalCost' },
+    align: 'center',
+    key:'totalCost'
+    
+  },
+  {
+    title: '点击数',
+    dataIndex: 'clickNum',
+    scopedSlots: { customRender: 'clickNum' },
+    align: 'center',
+    key:'clickNum'
+    
+  },
+  {
+    title: '曝光数',
+    dataIndex: 'showNum',
+    scopedSlots: { customRender: 'showNum' },
+    align: 'center',
+    key:'showNum'
+    
+  },
+  {
+    title: '激活数',
+    dataIndex: 'activeNum',
+    scopedSlots: { customRender: 'activeNum' },
+    align: 'center',
+    key:'activeNum'
+    
+  },
+  {
+    title: '转化数',
+    dataIndex: 'convertNum',
+    scopedSlots: { customRender: 'convertNum' },
+    align: 'center',
+    key:'convertNum'
+    
+  },
+//   {
+//     title: '总消耗',
+//     dataIndex: 'totalCost',
+//     scopedSlots: { customRender: 'totalCost' },
+//     align: 'center',
+//     key:'totalCost'
+    
+//   },
+]
+
+
+
+let KScolumns=[
+  {
+    title: '视频',
+    dataIndex: 'createImg',
+    scopedSlots: { customRender: 'createImg' },
+    align: 'center',
+    key:'userNcreateImgame'
+    
+  },
+  {
+    title: '视频ID',
+    dataIndex: 'videoCode',
+    scopedSlots: { customRender: 'videoCode' },
+    align: 'center',
+    key:'videoCode'
+    
+  },
+  {
+    title: '视频上线时间',
+    dataIndex: 'stateDate',
+    scopedSlots: { customRender: 'stateDate' },
+    align: 'center',
+    key:'stateDate'
+    
+  },
+  
+  {
+    title: '所属公司',
+    dataIndex: 'companyName',
+    scopedSlots: { customRender: 'companyName' },
+    align: 'center',
+    key:'companyName'
+    
+  },
+  {
+    title: '策划名称',
+    dataIndex: 'planName',
+    scopedSlots: { customRender: 'planName' },
+    align: 'center',
+    key:'planName'
+    
+  },
+  {
+    title: '剪辑名称',
+    dataIndex: 'clipName',
+    scopedSlots: { customRender: 'clipName' },
+    align: 'center',
+    key:'clipName'
+    
+  },
+  {
+    title: '拍摄名称',
+    dataIndex: 'shotName',
+    scopedSlots: { customRender: 'shotName' },
+    align: 'center',
+    key:'shotName'
+    
+  },
+  {
+    title: '总消耗',
+    dataIndex: 'totalCost',
+    scopedSlots: { customRender: 'totalCost' },
+    align: 'center',
+    key:'totalCost'
+    
+  },
+  {
+    title: '封面曝光',
+    dataIndex: 'photoShow',
+    scopedSlots: { customRender: 'photoShow' },
+    align: 'center',
+    key:'photoShow'
+    
+  },
+  {
+    title: '封面点击',
+    dataIndex: 'photoClick',
+    scopedSlots: { customRender: 'photoClick' },
+    align: 'center',
+    key:'photoClick'
+    
+  },
+  {
+    title: '素材曝光',
+    dataIndex: 'aclick',
+    scopedSlots: { customRender: 'aclick' },
+    align: 'center',
+    key:'aclick'
+    
+  },
+  {
+    title: '行为数',
+    dataIndex: 'bclick',
+    scopedSlots: { customRender: 'bclick' },
+    align: 'center',
+    key:'bclick'
+    
+  },
+]
+
+
+
+
+
+export default {
+  
+    components: {
+        ACol,
+        ARow,
+        
+    },
+
+    data() {
+        return {
+            exportloading:false,
+            planId:'',
+            shotId:'',
+            clipId:'',
+            dateRange:[moment().subtract(1,'weeks'),moment()],
+            noImg:require('@/assets/noImg.png'),
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                //   pageSizeOptions: ['10', '20', '30'],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条"
+                },
+                showQuickJumper: true,
+                showSizeChanger:true,
+                pageSizeOptions: ['10', '30', '50'],
+                total: 0,
+                onChange: (current, pageSize) => {
+                    // 切换分页时的回调,
+                    // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                    this.ipagination.current = current;
+                    this.ipagination.pageSize= pageSize;
+                }
+            },
+            value:'valid',
+            KSaccountList:[],
+            TTaccountList:[],
+
+            KSdesignList:[],
+            TTdesignList:[],
+
+            
+            operateDisabled:false,
+            userId:JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
+            duration: 1000,
+            //treeselect的参数
+            treeValue: [],
+            treeData: [],
+            SHOW_PARENT,
+
+            type:3,
+            dateValue:[moment().subtract(7,'days'), moment()],
+
+            operate:'',
+            designList:[],
+
+            tabKey:1,
+
+            loading: false,
+            TTcolumns,
+            KScolumns,
+            columns:[...TTcolumns],    
+            dataTable: [],
+            
+            tableTab:1,
+
+            newPlan:0,
+            effectPlan:0,
+            
+            
+
+            openOptions:false,
+
+            target:'',
+            order:'desc',
+        }
+    },
+    methods: {
+         moment,
+        disabledDate(current) {           
+            return current && current > moment()
+        }, 
+        dateChange(date, dateString) {
+            // console.log(date,dateString)               
+        },
+        //导出报表
+        exportExcel() {
+            this.exportloading=true;
+            let url='';
+            if(this.tabKey==1){
+                url='/ctop/bytedanceVideoEtlInfo/exportXls';
+            }else {
+                url='/ctop/kuaishouVideoEtlInfo/exportXls'
+            }
+            let nameType=''
+            if(this.value=='valid'){
+                nameType='有效视频'
+            }else if(this.value=='hot'){
+                nameType='爆款视频'
+            }else if(this.value=='online'){
+                nameType='视频上线时间'
+            }
+
+            downFilePost(url,qs.stringify({
+                type:this.value,
+                clipId:this.clipId,
+                shotId:this.shotId,
+                planId:this.planId,
+                startData:this.dateRange[0].format('YYYY-MM-DD'),
+                endData:this.dateRange[1].format('YYYY-MM-DD'),  
+            })).then(res => {
+                this.exportloading=false;
+                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 = moment().format('YYYY-MM-DD') + nameType+'.xlsx' //下载后文件名
+                document.body.appendChild(downloadElement)
+                downloadElement.click() //点击下载
+                document.body.removeChild(downloadElement) //下载完成移除元素
+                window.URL.revokeObjectURL(href) //释放掉blob对象
+            })
+        },
+        dataTypeChange(e){
+            console.log(e.target.value)
+            
+            this.getNewPlan()
+        },
+    
+        
+        filterOption(input, option){
+            // console.log(input, option)
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                );
+        },
+     
+    
+        // 快手头条的切换
+        tabChange(key){
+            console.log(key);
+            this.treeValue=[];
+            this.ipagination.current=1
+           this.columns=this.tabKey==1?[...TTcolumns]:[...KScolumns]
+            
+            this.getNewPlan()
+        },
+        operateChange(value){
+        console.log(value);
+        if(value){
+            this.accountDisabled=true;
+            this.accountId=''
+        }else{
+            this.accountDisabled=false
+        }
+        },
+
+        tableChange(pagination, filters, sorter, { currentDataSource }){
+            console.log(pagination)
+            this.ipagination.current=pagination.current;
+            this.ipagination.pageSize=pagination.pageSize;
+            this.getNewPlan()
+        },
+       
+        // table区域的tab切换
+        tableTabChange(key){
+            if(key==1){
+            
+                this.columns=this.tabKey==1?[...TTcolumns]:[...KScolumns]
+                this.target='new'
+            }else{
+                
+                this.columns=this.tabKey==1?[...TTcolumnsVaild]:[...KScolumnsVaild]
+                this.target='valid'
+            }
+            this.getNewPlan()
+        },
+    
+       
+
+        // 获取所有运营
+        getAllOperator(key){
+            let url='/sys/user/getAllDesigner'
+            this.designList=[]
+            
+            getAction(url,{}).then(res=>{
+                console.log(res);
+                if(res.success){
+                
+                    this.designList=res.data
+               
+                
+                }
+            })
+        },
+
+
+        // 获取展示数据
+        getNewPlan(){
+            let url=''
+            if(this.tabKey==1){
+                // 头条
+                url='/ctop/bytedanceVideoEtlInfo/list'
+            }else{
+                // 快手
+                
+                url='/ctop/kuaishouVideoEtlInfo/list'
+                
+            }
+            
+            this.loading=true;
+
+            getAction(url,{
+                type:this.value,
+                clipId:this.clipId==''?null:this.clipId,
+                shotId:this.shotId==''?null:this.shotId,
+                planId:this.planId==''?null:this.planId,
+                startDate:this.dateRange[0].format('YYYY-MM-DD'),
+                endDate:this.dateRange[1].format('YYYY-MM-DD'),
+                pageSize:this.ipagination.pageSize,
+                pageNo:this.ipagination.current
+            }).then(res=>{
+                console.log(res);
+                this.loading=false;
+            
+                if(res.success){
+                    
+                    if(res.result){
+                        this.dataTable=res.result.records
+                        this.ipagination.total=res.result.total
+                    }
+
+                }
+            })
+        
+        },
+
+        // 查询按钮
+        search(){
+            // if(this.accountId || this.operate){
+            //     this.echartSpinning=true;
+            //     this.getNewPlan()
+            // }else{
+            //     this.$message.error('请选择具体账户或者运营')
+            // }
+            this.ipagination.current=1;
+            this.getNewPlan()
+            
+        },
+    
+    },
+    watch: {
+        dateValue(newName,oldName){
+        
+            this.search()
+        },
+    },
+    computed: {
+        newDate() {
+        var myDate = new Date()
+        myDate.getYear() //获取当前年份(2位)
+        var n = myDate.getFullYear() //获取完整的年份(4位,1970-????)
+        var m = myDate.getMonth() //获取当前月份(0-11,0代表1月)
+        var d = myDate.getDate() //获取当前日(1-31)
+        var day = myDate.getHours()
+        return day
+        }
+    },
+    mounted() {
+        this.getNewPlan()
+        this.getAllOperator()
+    },
+    activated: function() {
+        
+        
+    },
+  
+    filters: {
+        toPercentage(val) {
+        if(typeof val != 'string'){
+            return (val * 100).toFixed(2) + '%'
+        }else{
+            return val
+        }
+        
+        },
+        //保留两位小数并且变成货币格式
+        decimalsHandle(val){
+            
+            if(val && typeof val !='string'){
+                if(val>=0){
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+                    
+                    let str0=str[0].split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+                    
+                    return handleResult+'.'+str[1]
+                }else{
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+                    
+                    let str0=str[0].substr(1).split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+                    
+                    return '-'+handleResult+'.'+str[1]
+                }
+                
+            }else if(typeof val =='string'){
+                return val
+            }
+            else{
+                return 0
+            }           
+        },
+        //变成货币格式
+        formatCurrency(val){
+        if(val){
+            let numberStr = val.toString()
+            let str = numberStr.split('').reverse()
+            for (let i = 0; i < str.length; i++) {
+                if ((i + 1) % 4 === 0) {
+                str.splice(i, 0, ',')
+                }
+            }
+            str.reverse()
+            let handleResult = ''
+            for (let j = 0; j < str.length; j++) {
+                handleResult += str[j]
+            }
+            return handleResult
+        }else{
+            return '-'
+        }
+            
+        }
+    }
+}
+</script>

+ 27 - 2
src/views/modules/Statistics/refuseDataCreat.vue

@@ -617,6 +617,7 @@
         params.campaignId = localStorage.getItem('accountIdCreat')
         params.pageSize = this.ipagination.pageSize
         params.pageNo = this.ipagination.current
+        params.creativeName=this.keyWord
         params.putStatus = this.putStatus == "0" ? null : this.putStatus
         getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
           if (res.code == 0) {
@@ -633,8 +634,32 @@
         })
       },
       addUserKey() {
-        this.dataList = this.list.filter(item => {
-          return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        // this.dataList = this.list.filter(item => {
+        //   return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        // })
+        this.loading = true
+        var params = {}
+        this.selectedRowKeys = []
+        this.selectedRowKeysValue = []        
+        params.accountId = this.appId
+        params.accountId = localStorage.getItem('accountIdCreatNow')
+        params.campaignId = localStorage.getItem('accountIdCreat')
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+        params.putStatus = this.putStatus == "0" ? null : this.putStatus
+        params.creativeName=this.keyWord
+        getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
+          if (res.code == 0) {
+            this.dataList = res.result.records.map((v, index) => {
+              return {
+                ...v,
+                key: index
+              }
+            })
+            this.list = this.dataList
+            this.loading = false
+            this.ipagination.total = res.result.total
+          }
         })
       },
       reset() {

+ 28 - 4
src/views/modules/Statistics/refuseDataCreatNew.vue

@@ -16,7 +16,7 @@
           <div style="display:flex;margin:0 0 20px 0;position:relative">
             <a-input placeholder="请输出要查找的创意名称" style="width:300px;" v-model="keyWord" />
             <a-button type="primary" style="margin-left:10px" @click="addUserKey">搜索</a-button>
-            <a-button type="primary" style="margin-left:10px" @click="reset()">刷新列表</a-button>
+            <a-button type="primary" style="margin-left:10px" @click="reset">刷新列表</a-button>
             <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0"
               :loading="loadingList">一键重提
             </a-button>
@@ -431,7 +431,7 @@
         return this.form.getFieldValue(className)
       },
       syncCreative() {
-
+        
         this.loadingSyncCreative = true
         var params = {}
         //  localStorage.setItem('accountIdCreat', record.campaignId)
@@ -615,6 +615,7 @@
         // params.campaignId = localStorage.getItem('accountIdCreat')
         params.pageSize = this.ipagination.pageSize
         params.pageNo = this.ipagination.current
+        params.creativeName=this.keyWord
         params.putStatus = this.putStatus == "0" ? null : this.putStatus
         getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
           if (res.code == 0) {
@@ -631,11 +632,34 @@
         })
       },
       addUserKey() {
-        this.dataList = this.list.filter(item => {
-          return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        // this.dataList = this.list.filter(item => {
+        //   return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        // })
+        this.loading = true
+        var params = {}
+        this.selectedRowKeys = []
+        this.selectedRowKeysValue = []        
+        params.accountId = this.appId
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+        params.putStatus = this.putStatus == "0" ? null : this.putStatus
+        params.creativeName=this.keyWord
+        getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
+          if (res.code == 0) {
+            this.dataList = res.result.records.map((v, index) => {
+              return {
+                ...v,
+                key: index
+              }
+            })
+            this.list = this.dataList
+            this.loading = false
+            this.ipagination.total = res.result.total
+          }
         })
       },
       reset() {
+        // this.keyWord='';
         this.addUser()
       }
     },

+ 1 - 1
src/views/modules/advertiser/ProjectList.vue

@@ -133,7 +133,7 @@
           <!-- {{ text | ocpxActionType }} -->
         </span>
         <span slot="bidType" slot-scope="text">
-          <div v-if="text">
+          <div v-if="text&&JSON.parse(text).length>0">
             <span v-for="(item, index) of JSON.parse(text)" :key="index"
               >{{ item | bidType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
             >

+ 27 - 5
src/views/modules/advertiser/modules/AdvertiserModal.vue

@@ -88,13 +88,22 @@
             rules: [{
               required: true,
               message: '请输入联系人手机!'
-            }]
+            },{
+              validator:this.mobileChecked
+            }
+            ]
           },
           email: {
-            rules: [{
-              required: true,
-              message: '请输入联系人邮箱!'
-            }]
+            rules: [
+              {
+                type: 'email',
+                message: '邮箱格式不正确,请重新输入',
+              },
+              {
+                required: true,
+                message: '请输入联系人邮箱!',
+              },
+              ]
           },
           pid: {
             rules: [{
@@ -199,6 +208,19 @@
       filterOption(input, option) {
         return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       },
+      mobileChecked(rule, value, callback){
+        // console.log(rule, value, callback)
+            var strRegex = /^1[0-9]{10}$/
+            var re = new RegExp(strRegex)
+            // console.log(re.test(res))
+            if (re.test(value)) {
+                callback()
+            } else if(value && !re.test(value)){
+                callback('手机号码不正确,请正确输入')
+            }else{
+              callback()
+            }
+      }
     }
   }
 </script>

+ 1 - 1
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -205,7 +205,7 @@ export default {
   },
   methods: {
     validateInputCode(rule, value, callback) {
-      if (!value || value > 0) {
+      if ( value > 0) {
         callback()
       } else {
         callback('请输入大于0的最高报价!')

+ 2 - 2
src/views/modules/advertiser/modules/projectListModal.vue

@@ -330,8 +330,8 @@ export default {
       //       }
       if (record.mediaId == '2' || record.mediaId == '4') {
         var params = { ...record }
-        params.bidType = (record.bidType == null||record.bidType == '') ? [2] : JSON.parse(record.bidType)
-        params.ocpxActionType = (record.ocpxActionType == null||record.ocpxActionType == '') ? [2] : JSON.parse(record.ocpxActionType)
+        params.bidType = (record.bidType == null||record.bidType == '') ? [] : JSON.parse(record.bidType)
+        params.ocpxActionType = (record.ocpxActionType == null||record.ocpxActionType == '') ? [] : JSON.parse(record.ocpxActionType)
         this.showDian = true
       } else {
         var { ocpxActionType, bidType, ...params } = record

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

@@ -0,0 +1,47 @@
+<template>
+
+        <component v-bind:is="currentTabComponent">
+
+        </component>
+    
+    
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+export default {
+    name:'index',
+    data() {
+        return {
+            currentTabComponent:'strategyList',
+            currentStrategyId:'',
+            currentPlanId:'',
+            currentGroupId:'',
+            userId:'',
+            currentStrateg:{},
+        }
+    },
+    components:{   
+        strategyList: () => import('./strategyList'), 
+        planList: () => import('./planList'), 
+        groupList: () => import('./groupList'), 
+        previewStrategy: () => import('./previewStrategy'), 
+        
+    },
+
+    mounted(){
+       this.currentTabComponent='strategyList' 
+        let userInfo=localStorage.getItem('pro__Login_Userinfo');
+        let userId=''
+        if(userInfo){
+            this.userId=JSON.parse(userInfo).value.id
+        }
+    },
+    beforeDestroy() {
+        this.currentTabComponent='strategyList' 
+    },
+   
+}
+
+</script>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2155 - 0
src/views/modules/autoLaunch/autoLaunchReport.vue


+ 124 - 0
src/views/modules/autoLaunch/autoReportIndex.vue

@@ -0,0 +1,124 @@
+<template>
+<div class="autoLaunch">
+    <div class="card-container">
+        <a-tabs type="card" v-model="analaysisDirection" @change="analaysisDirectionChange" :animated='true'>
+            <a-tab-pane key="1" tab="素材+出价"></a-tab-pane>
+            <a-tab-pane key="2" tab="素材+定向"></a-tab-pane>
+            <a-tab-pane key="3" tab="时间+出价"></a-tab-pane>
+            <!-- <a-tab-pane key="3" tab="">
+            </a-tab-pane> -->
+        </a-tabs>
+        <component v-bind:is="currentTabComponent">
+        </component>
+     </div>
+</div>
+
+    
+        
+    
+    
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+export default {
+    name:'index',
+    data() {
+        return {
+            currentTabComponent:'materialAndOrient',
+            analaysisDirection:'1',
+            currentStrategy:{}
+        }
+    },
+    components:{   
+        materialAndOrient: () => import('./autoLaunchReport'), 
+        materialAndBid: () => import('./materialAndBid'), 
+        
+    },
+    methods: {
+        analaysisDirectionChange(key){
+            // console.log(key)
+            // if(key=='1'){
+            //     this.currentTabComponent='materialAndOrient' 
+            // }else if(key=='2'){
+            //     this.currentTabComponent='materialAndBid' 
+            // }
+        }
+    },
+    watch:{
+        analaysisDirection(key,oldkey){
+            console.log(key)
+            if(key=='1'){
+                this.currentTabComponent='materialAndOrient' 
+            }else if(key=='2'){
+                this.currentTabComponent='materialAndBid' 
+            }
+        }
+    },
+    mounted(){
+       this.currentTabComponent='materialAndOrient' ;
+       let currentStrategy=localStorage.getItem('currentStrategy');
+        if(currentStrategy){
+            this.currentStrategy=JSON.parse(currentStrategy);
+            this.analaysisDirection=this.currentStrategy.scenes;
+            // this.analaysisDirectionChange(this.currentStrategy.scenes)
+        }
+    },
+    beforeDestroy() {
+        this.currentTabComponent='materialAndOrient' ;
+        localStorage.setItem('currentStrategy','');
+    },
+   
+}
+
+</script>
+
+<style lang="less">
+.autoLaunch{
+    
+    .card-container {
+        background: #f5f5f5;
+        // overflow: hidden;
+        // padding: 24px;
+        .ant-tabs-nav .ant-tabs-tab {
+            position: relative;
+            display: inline-block;
+            -webkit-box-sizing: border-box;
+            box-sizing: border-box;
+            height: 100%;
+            margin: 0 ;
+            padding: 0px 16px 8px;
+            text-decoration: none;
+            cursor: pointer;
+            -webkit-transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+            transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+            font-size: 16px;
+        }
+    }
+    .card-container > .ant-tabs-card > .ant-tabs-content {
+        // height: 120px;
+        margin-top: -16px;
+    }
+
+    .card-container > .ant-tabs-card > .ant-tabs-content > .ant-tabs-tabpane {
+        background: #fff;
+        // padding: 16px;
+    }
+
+    .card-container > .ant-tabs-card > .ant-tabs-bar {
+        border-color: #fff;
+    }
+
+    .card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab {
+        border-color: transparent;
+        background: transparent !important;
+    }
+
+    .card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab-active {
+        border-color: #fff;
+        background: #fff !important;
+    }
+}
+
+</style>

+ 2 - 2
src/views/modules/autoLaunch/components/MultiCheckBox.vue

@@ -116,7 +116,7 @@ import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
               currentList:this.curLayerNum>1? this.listArr : []
             })
           },
-            deep: true
+          deep: true
       },
 
       parentChecked: {
@@ -204,7 +204,7 @@ import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
             value:'all',
             checked:e.target.checked,
             indeterminates:false,
-            parentCode:this.listArr[0].parentCode
+            parent:this.listArr[0].parent
         })
       },
       

+ 248 - 0
src/views/modules/autoLaunch/components/Treeselect.vue

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

+ 90 - 65
src/views/modules/autoLaunch/components/linkMultiSelect.vue

@@ -73,27 +73,28 @@
           
           let childrensArr = Array.from(this.$refs.mycheckBox.children)
           setTimeout(() => {
-            // console.log(val, index)
+            console.log(val, index)
             // console.log(val.data.checked)
             if (index == 1 || this.clickKey == 1) {
                 this.$refs.mycheckBox.style.width = '100%'
-                if(val.data.hasChild){
+                if(val.data.code&&this.maxLayers>index){
                     getAction(this.listUrl,{
-                        parentCode:val.data.code,
-                        level:this.maxLayers
+                        parent:val.data.code,
+                        // level:2
                     }).then((res)=>{
                         // console.log(res);
                         if(res.success){
-                            if(res.data.length>0){
-                                res.data.forEach((item,index)=>{
+                            if(res.result.length>0){
+                                res.result.forEach((item,index)=>{
                                     
-                                    item.value=item.code
+                                    item.value=item.regionId
+                                    item.code=item.regionId
                                     item.checked=val.data.checked;
                                     item.indeterminates=false;
                                 })
                                 // console.log(this.checkedShowList)
                                 this.checkedShowList.forEach((ele)=>{
-                                  res.data.forEach((item)=>{
+                                  res.result.forEach((item)=>{
                                       if(ele.code==item.code){
                                             item.checked=true;
                                             return
@@ -110,40 +111,50 @@
                                 this.parentChecked1 = val.data.checked
                                 this.parentChecked2 = val.data.checked
                                 this.parentChecked3 = val.data.checked
-                                this.listArr2=res.data
+                                this.listArr2=res.result
                                 this.title2 = val.data.name
-                            }                    
+                            }else{
+                                this.listArr3 = []
+                                this.title3 = ''
+                                this.listArr4 = []
+                                this.title4 = ''
+                                this.listArr2 = []
+                                this.title2 = ''
+                                this.resetStyle(childrensArr, index)
+                            }                      
                         };
                         
                     })  
-                }else{
-                    this.listArr3 = []
-                    this.title3 = ''
-                    this.listArr4 = []
-                    this.title4 = ''
-                    this.listArr2 = []
-                    this.title2 = ''
-                    this.resetStyle(childrensArr, index)
-                }  
                 
+                }
+                if(val.data.value=='all'){
+                  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){
+                if(val.data.code&&this.maxLayers>index){
                     getAction(this.listUrl,{
-                        parentCode:val.data.code,
-                        level:this.maxLayers
+                        parent:val.data.code,
+                      //  level:3
                     }).then((res)=>{
                         // console.log(res);
                         if(res.success){
-                            if(res.data.length>0){
-                                res.data.forEach((item,index)=>{
-                                    item.value=item.code
+                            if(res.result.length>0){
+                                res.result.forEach((item,index)=>{
+                                    item.value=item.regionId
+                                    item.code=item.regionId
                                     item.checked=val.data.checked;
                                     item.indeterminates=false;
                                 
                                 })
                                 this.checkedShowList.forEach((ele)=>{
-                                  res.data.forEach((item)=>{
+                                  res.result.forEach((item)=>{
                                       if(ele.code==item.code){
                                             item.checked=true;
                                         }
@@ -157,25 +168,33 @@
                                 this.styleHandle(childrensArr, index)
                                 this.parentChecked2 = val.data.checked
                                 this.parentChecked3 = val.data.checked
-                                this.listArr3=res.data
+                                this.listArr3=res.result
                                 this.title3 = val.data.name
+                            }else{
+                              this.listArr4 = []
+                              this.title4 = ''
+                              this.listArr3 = []
+                              this.title3 = ''
+                              this.$refs.mycheckBox.style.width = '100%'
+                              this.resetStyle(childrensArr, index)
                             }                    
                         };
                         
                     })
-                }else{
+                }
+                if(val.data.value=='all'){
                     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){
+                    if(ele.code==val.data.parent){
                         ind=i
                         // console.log(ind)
                     }                        
@@ -187,48 +206,53 @@
                 
             } else if (index == 3 || this.clickKey == 3) {
 
-                if(val.data.hasChild){
+                if(val.data.code&&this.maxLayers>index){
                     getAction(this.listUrl,{
-                        parentCode:val.data.code,
-                        level:this.maxLayers
+                        parent:val.data.code,
+                        // level:4
                     }).then((res)=>{
                         // console.log(res);
                         if(res.success){
-                            if(res.data.length>0){
-                                res.data.forEach((item,index)=>{
-                                    item.value=item.code
+                            if(res.result.length>0){
+                                res.result.forEach((item,index)=>{
+                                    item.value=item.regionId
+                                    item.code=item.regionId
                                     item.checked=val.data.checked;
                                     item.indeterminates=false;
                                 
                                 })
                                 this.checkedShowList.forEach((ele)=>{
-                                  res.data.forEach((item)=>{
+                                  res.result.forEach((item)=>{
                                       if(ele.code==item.code){
                                             item.checked=true;
                                         }
                                   })
                                         
                                 })
-                                this.listArr4 = res.data
+                                this.listArr4 = res.result
                                 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)
                             }                    
                         };
                         
                     })
-                }else{
+                 }
+                 if(val.data.value=='all'){
                     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){
+                      if(ele.code==val.data.parent){
                           ind=i
                           // console.log(ind)
                       }                                           
@@ -240,7 +264,7 @@
                 }
                      let z=-1          
                     this.listArr1.forEach((element,num)=>{                        
-                      if(element.code==this.listArr2[ind].parentCode){
+                      if(element.code==this.listArr2[ind].parent){
                           z=num
                           // console.log(ind)
                       }
@@ -260,7 +284,7 @@
                     let ind=-1
                     this.listArr3.forEach((ele,i)=>{
                         
-                        if(item.code==val.data.parentCode){
+                        if(item.code==val.data.parent){
                             ind=i
                             // console.log(ind)
                         }
@@ -277,14 +301,14 @@
                     let ind=-1
                     this.listArr3.forEach((ele,i)=>{
                         
-                        if(item.code==val.data.parentCode){
+                        if(item.code==val.data.parent){
                             ind=i
                             // console.log(ind)
                         }
                                             
                     })   
                     this.listArr2.forEach((element,num)=>{
-                        if(item.code==this.listArr3[ind].parentCode){
+                        if(item.code==this.listArr3[ind].parent){
                             ind=num
                             // console.log(ind)
                         }                        
@@ -301,7 +325,7 @@
                         let z=-1;
                         this.listArr1.forEach((element,num)=>{
                             
-                            if(item.code==this.listArr2[ind].parentCode){
+                            if(item.code==this.listArr2[ind].parent){
                                 z=num
                                 // console.log(z)
                             }
@@ -367,13 +391,13 @@
           if(item.level==2){
               // console.log('------------------------------------');
               let childList=this.checkedShowList.filter((element,index) => {
-                  return element.parentCode==item.parentCode;
+                  return element.parent==item.parent;
               });
               let data=[]
               let checkList=[];
               let plainOptions=[]
               this.listArr1.forEach((ele)=>{
-                  if(ele.code==item.parentCode){
+                  if(ele.code==item.parent){
                       data=ele;
                   }
                   if(ele.checked){
@@ -473,12 +497,12 @@
           
         }else if(val.curLayerNum==2){
           this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.code!=val.currentList[0].parentCode
+              return item.code!=val.currentList[0].parent
           })
           
           if(val.checkList.length>0&&val.checkList.length<val.currentList.length){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.parentCode!=val.currentList[0].parentCode
+              return item.parent!=val.currentList[0].parent
             })
             // console.log(this.checkedShowList)
             val.checkList.forEach((ele)=>{
@@ -499,27 +523,27 @@
             // console.log(this.checkedShowList)
           }else if(val.checkList.length==0){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.parentCode!=val.currentList[0].parentCode
+              return item.parent!=val.currentList[0].parent
 
             })
           }else if(val.checkList.length==val.currentList.length){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.parentCode!=val.currentList[0].parentCode
+              return item.parent!=val.currentList[0].parent
             })
             this.listArr1.forEach((item)=>{
-                if(item.code==val.currentList[0].parentCode){
+                if(item.code==val.currentList[0].parent){
                     this.checkedShowList.push(item)
                 }
             })
           }
         }else if(val.curLayerNum==3){
           this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.code!=val.currentList[0].parentCode
+              return item.code!=val.currentList[0].parent
           })
           
           if(val.checkList.length>0&&val.checkList.length<val.currentList.length){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.parentCode!=val.currentList[0].parentCode
+              return item.parent!=val.currentList[0].parent
             })
             // console.log(this.checkedShowList)
             val.checkList.forEach((ele)=>{
@@ -540,15 +564,15 @@
             // console.log(this.checkedShowList)
           }else if(val.checkList.length==0){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.parentCode!=val.currentList[0].parentCode
+              return item.parent!=val.currentList[0].parent
               
             })
           }else if(val.checkList.length==val.currentList.length){
             this.checkedShowList=this.checkedShowList.filter((item)=>{
-              return item.parentCode!=val.currentList[0].parentCode
+              return item.parent!=val.currentList[0].parent
             })
             this.listArr2.forEach((item)=>{
-                if(item.code==val.currentList[0].parentCode){
+                if(item.code==val.currentList[0].parent){
                     this.checkedShowList.push(item)
                 }
             })
@@ -566,19 +590,20 @@
         // console.log(this.listUrl)
         if(this.listUrl){
             getAction(this.listUrl,{
-                parentCode:0,
-                level:this.maxLayers
+                parent:0,
+                level:1
             }).then((res)=>{
                 console.log(res);
                 if(res.success){
-                    res.data.forEach((item,index)=>{
-                        item.value=item.code
+                    res.result.forEach((item,index)=>{
+                        item.value=item.regionId
+                        item.code=item.regionId
                         item.checked=false;
                         item.indeterminates=false;
                         
                     })
                 };
-                this.listArr1=res.data
+                this.listArr1=res.result
             })
         }
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1045 - 0
src/views/modules/autoLaunch/components/materialList.vue


+ 712 - 0
src/views/modules/autoLaunch/components/platForm.vue

@@ -0,0 +1,712 @@
+<template>
+    <div class="workBench">
+        <div class="topBody">
+            <p class="breadcrumb">工作台</p>
+            <div class="bottom">
+                <div class="touxiang">
+                    <img src="@/assets/touxiang.png"  alt="">
+                </div>  
+                <div class='tip'>
+                    <p class="greet">{{getTimeState()}},{{roleInfo.realname}},祝你开心每一天!</p>
+                    <p class="descPosition">
+                        <span>{{roleInfo.roleName}}</span>
+                        <a-divider type="vertical" />
+                        <span>{{roleInfo.area}}地区-{{roleInfo.departName}}</span>
+                    </p>
+                </div>
+                <a-button type='primary' class="mybtn" @click="sendOrder">
+                    <a-icon type="plus" />
+                    发起订单
+                </a-button>
+            </div>
+        </div>
+        <div class="section">
+            <div class="sectionBody">
+                <div class="sectionLeftBox">
+                    <div class="leftTop">
+                        <div class="sectionHead">
+                            我的工作内容
+                        </div>
+                        <div class="zhanshiBox">
+                           
+                            <div class="item" @click="goOrderList(1)">                               
+                                <div class="title">
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>我发起的订单</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">{{countInfo.newOrder || 0}} <span>个</span></p>
+                                </div>
+                            </div>
+                            <div class="item" @click="goMaterialList(1)">                                
+                                <div class="title">
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>待审核的物料</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">{{countInfo.toAuditMaterial || 0}}<span>个</span></p>
+                                </div>                              
+                            </div>
+                           
+                            <div class="item" @click="goOrderList(2)">                               
+                                <div class="title">                                   
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>已完成的订单</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">{{countInfo.finishOrder ||0}}<span>个</span></p>
+                                </div>
+                            </div>
+                            <div class="item" @click="goOrderList(3)">                                
+                                <div class="title">                                   
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>被驳回的订单</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">{{countInfo.rejectOrder || 0}} <span>个</span></p>
+                                </div>
+                            </div>
+                            <!-- <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">{{countInfo.allOrder}}<span>个</span></p>
+                                </div>                                
+                            </div> -->
+                        </div>  
+                    </div>
+                    <div class="leftBottom">
+                        <div class="sectionHead">
+                            订单进度
+                             <!-- <a-button type="link" class="allOrder" @click="goOrderList(1)">全部订单</a-button> -->
+                        </div>
+                        <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"  >
+                                    <!-- <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">{{item.orderTitle}}</p>
+                                                <p class="desc">{{item.orderRemark}}</p>
+                                            </div>
+                                        </div>
+                                        
+                                        <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' :pageSize='8' class="fenye" @change='pageChange'  show-quick-jumper  />
+                            
+                        </div>
+                        </a-spin>
+                    </div>
+                </div>
+                <div class="sectionRightBox">
+                    <div class="rightTop">
+                        <div class="sectionHead">
+                            操作记录
+                        </div>
+                        <a-spin :spinning="spinning">
+                        <div class="optionRecordList">
+                            
+                            <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="sectionHead">
+                            本周项目燃尽图
+                        </div>
+                        <div class="burnDown">
+                             <a-progress type="circle" :percent="75"  :width='150' :strokeWidth='6' />
+                             <div class="tip">
+                                <p class="done">
+                                    <span class="item-icon"></span>
+                                    <span>已完成订单:{{}}个</span>
+                                </p>
+                                <p class="all">
+                                    <span class="item-icon"></span>
+                                    <span>未完成订单:{{}}个</span>
+                                </p>
+                             </div>
+                        </div>
+                    </div> -->
+
+                </div>
+                
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+
+export default {
+    name:'operator-platform',
+    data() {
+        return {
+            moment,
+            roleInfo:{},
+            todayGreet:moment(),
+            orderProgressSpinning:false,
+            countInfo:{},
+
+            spinning:false,
+            touxiang:'@/assets/touxiang.png',
+            // 订单进度
+            orderProgressList:[
+                
+            ],
+
+            // 操作记录
+            optionRecord:[],
+
+            // 本周项目燃尽图
+            burnDownChart:[],
+
+            // 分页参数
+            totalPage:0,
+            currentPage:1,
+
+            userInfo:{},
+            roleCode:'',
+
+            operateRecordList:[],
+
+            TimerObj:null,
+        }
+    },
+    methods: {
+        goOrderList(val){
+            console.log(val);
+            // console.log(this.$parent)
+            this.$parent.currentTabComponent='orderList';
+            this.$parent.orderStatus=val
+            
+        },
+        goMaterialList(val){
+            this.$parent.currentTabComponent='materialList';
+            this.$parent.materialStatus=val
+        },
+        orderDetail(item){
+            console.log(item)
+            this.$parent.currentTabComponent='orderDetail';
+            this.$parent.orderId=item.id
+        },
+        // 分页页码改变
+        pageChange(page, pageSize){
+            this.currentPage=page;
+            // console.log(page,pageSize)
+            this.getOrderList()
+        },
+        
+        // 发起订单
+        sendOrder(){
+            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(startTime) 
+                            if(moment().diff(startTime,'hours')>24){
+                                time=item.createTime.split(/[ ]+/)[0]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }
+                            else 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');
+        if(userInfo){
+            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>
+
+<style lang="scss" scoped>
+.workBench{
+    ul,li{
+        margin: 0;
+        padding: 0;
+    }
+    width: 100%;
+    .topBody{
+        width: 100%;
+        height: 146px;
+        background: #FFFFFF;
+        margin-bottom: 12px;
+        padding: 20px;
+        box-sizing: border-box;
+        .breadcrumb{
+            width: 42px;
+            height: 22px;
+            font-size: 12px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #000000;
+            line-height: 22px;
+        }
+        .bottom{
+            display: flex;
+            position: relative;
+            // padding: 20px;
+            .touxiang{
+                width: 72px;
+                height: 72px;
+                margin-right: 20px;
+                border-radius: 50%;
+                overflow: hidden;
+                img{
+                    width: 100%;
+                    height: 100%;
+                    border-radius: 50%;
+                }
+            }
+            .tip{
+                .greet{
+                    height: 28px;
+                    font-size: 20px;
+                    font-family: PingFangSC-Medium, PingFang SC;
+                    font-weight: 500;
+                    color: rgba(0, 0, 0, 0.85);
+                    line-height: 28px;
+                }
+                .descPosition{
+                    height: 22px;
+                    font-size: 14px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: rgba(0, 0, 0, 0.45);
+                    line-height: 22px;
+                }
+
+            }
+            .mybtn{
+                position: absolute;
+                // top: 50%;
+                // margin-left: -18px;
+                right: 0;
+            }
+        }
+
+    }
+    .section{
+        .sectionBody{
+            display: flex;
+            .sectionHead{
+                padding: 15px 20px;
+                // height: 24px;
+                font-size: 16px;
+                font-family: PingFangSC-Medium, PingFang SC;
+                font-weight: 500;
+                color: rgba(0, 0, 0, 0.85);
+                line-height: 24px;
+                border-bottom: 1px solid  #E9E9E9;;
+                position: relative;
+                .allOrder{
+                    position: absolute;
+                    right: 5px;
+                }
+            }
+            .sectionLeftBox{
+                width: 70%;
+               
+                .leftTop{
+                    overflow: hidden;
+                    background: white;
+                }
+                .zhanshiBox{
+                    display: flex;
+                    flex-wrap: wrap;
+                    .item{
+                        width: 33.33%;
+                        // background: brown;
+                        padding: 20px ;
+                        border-right: 1px solid #E9E9E9;
+                        border-bottom: 1px solid #E9E9E9;
+                        .title{
+                            padding-bottom: 34px;
+                            color: #000000;
+                            .iconImg{
+                                width: 24px;
+                                margin-right: 8px;
+                            }
+                        }
+                        .itemBody{
+                            text-align: center;
+                            .count{
+                                
+                                font-size: 24px;
+                                font-family: PingFangSC-Medium, PingFang SC;
+                                font-weight: 500;
+                                color: #000000;
+                                line-height: 32px;
+                                cursor: pointer;
+                                span{
+                                    font-size: 16px;
+                                    cursor: pointer;
+                                }
+                            }
+                            .count:hover{                                
+                                color: #1890FF;
+                            }
+                        }
+                    }
+                    .item:nth-child(3n){
+                        border-right: 0;
+                    }
+                }
+                .leftBottom{
+                    margin-top: 12px;
+                    background: white;
+                    .orderProgress{
+                        padding: 0 20px;
+                        height: 585px;
+                        position: relative;
+                        .orderProgress-list-item{
+                            padding: 10px 0;
+                            display: flex;
+                            align-items: center;
+                            border-bottom: 1px solid  #E9E9E9;;
+                            justify-content:space-between;
+                            cursor: pointer;
+                            .item-icon{
+                                width: 8px;
+                                height: 8px;
+                                background: #3BA0FF;
+                                margin-right: 15px;
+                                display: inline-block;
+                                border-radius: 50%;
+                            }
+                            .content{
+                                width: 70%;
+                                overflow: hidden;
+                                font-size: 14px;
+                                font-family: PingFangSC-Regular, PingFang SC;
+                                font-weight: 400;
+                                .name{
+                                    height: 22px;                                    
+                                    color: rgba(0, 0, 0, 0.65);
+                                    line-height: 22px;
+                                    text-overflow: ellipsis;
+                                    white-space: nowrap;
+                                    overflow: hidden;
+                                    margin-bottom: 0px;
+                                }
+                                .desc{
+                                    height: 22px;
+                                    color: rgba(0, 0, 0, 0.25);
+                                    line-height: 22px;
+                                    text-overflow: ellipsis;
+                                    white-space: nowrap;
+                                    overflow: hidden;
+                                     margin-bottom: 0px;
+                                }
+                            }
+                            .progress{
+                                float: right;
+                            }
+                        }
+                        .fenye{
+                            padding: 20px 0;
+                            text-align: right;
+                            position: absolute;
+                            right: 20px;
+                            bottom: 0px;
+                        }
+                    }
+                }
+            }
+            .sectionRightBox{
+                width: 29.5%;
+                background: white;
+                margin-left: 12px;
+                height: 1023px;
+                .rightTop{
+                  
+                     .optionRecordList{
+                         margin: 20px;
+                         padding: 10px 0;
+                         box-sizing: border-box;
+                          height: 928px;
+                        //  overflow: auto;
+                        overflow: hidden;
+                        position: relative;
+                         p{
+                             width: 100%;
+                         }
+                        .content-item{
+                            width: 70%;
+                            display: inline-block;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;
+                        }
+                        .time{
+                            width: 30%;
+                            display: inline-block;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;
+                            text-align: right;
+                        }
+                     }
+                }
+                .rightBottom{
+                    margin-top: 12px;
+                     background: white;
+                    .burnDown{
+                         padding: 30px 20px;
+                         text-align: center;
+                         .tip{
+                            margin-top: 40px;
+                            display: flex;
+                            justify-content: space-around;
+                             
+                            height: 22px;
+                            font-size: 14px;
+                            font-family: PingFangSC-Regular, PingFang SC;
+                            font-weight: 400;
+                            color: rgba(0, 0, 0, 0.65);
+                            line-height: 22px;
+                             .done{
+                                .item-icon{
+                                     width: 8px;
+                                    height: 8px;
+                                    background: #3BA0FF;
+                                    margin-right: 15px;
+                                    display: inline-block;
+                                    border-radius: 50%;
+                                }
+                             }
+                             .all{
+                                .item-icon{
+                                    width: 8px;
+                                    height: 8px;
+                                    background: #F0F2F5;
+                                    margin-right: 15px;
+                                    display: inline-block;
+                                    border-radius: 50%;
+                                } 
+                             }
+                         }
+                    }
+
+                }
+            }
+        }
+    }
+}
+</style>
+
+<style lang="less">
+    .workBench{
+        .ant-timeline-item-head{
+            background: rgb(240,242,245);
+        }
+    }
+</style>

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

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

+ 18 - 2
src/views/modules/autoLaunch/createStrategy.vue

@@ -194,7 +194,9 @@ export default {
         //推广目的改变
         marketingGoalChange(e){
             console.log(e.target)
-            this.marketingGoalHandle(e.target.value)
+            let strategyNamepart=this.marketingGoalHandle(e.target.value);
+            this.strategyName ='[策略]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
+
         },
     
         // 验证网址
@@ -317,7 +319,7 @@ export default {
                     str='推广品牌'
                     break;
                 case '5':
-                    str='营销线'
+                    str='营销线'
                     break;
                 case '7':
                     str='应用活跃'
@@ -340,6 +342,19 @@ export default {
     this.strategyName ='[策略]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
 
     
+    this.$nextTick(()=>{
+      if(this.$parent.strategyInfo.accountId){
+          this.form.setFieldsValue(
+            {
+              ...this.$parent.strategyInfo
+            }
+          )
+          this.accountId=this.$parent.strategyInfo.accountId
+          this.strategyName=this.$parent.strategyInfo.strategyName
+      }
+    })
+
+    
   },
 }
 </script>
@@ -399,6 +414,7 @@ export default {
   li {
     margin: 0;
     padding: 0;
+    
   }
   .moduler {
     background: #fff;

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1086 - 0
src/views/modules/autoLaunch/groupList.vue


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

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

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2153 - 0
src/views/modules/autoLaunch/materialAndBid.vue


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1098 - 0
src/views/modules/autoLaunch/planList.vue


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

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

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 601 - 88
src/views/modules/autoLaunch/setDirectional.vue


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1090 - 0
src/views/modules/autoLaunch/strategyList.vue


+ 1 - 1
src/views/modules/earlyWarningRules/configRules.vue

@@ -437,7 +437,7 @@ export default {
             
         },
         blurGroupName(item){
-            if(this.currentRuleId){
+            if(this.currentRuleId&&item.groupId){
                 if(item.groupName!=''&&item.remark!=''){
                     putAction('/ruleGroup/edit',{id:item.groupId,groupName:item.groupName,remark:item.remark}).then(res=>{
                         if(res.success){

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

@@ -51,12 +51,32 @@ export default {
         return true
       },
     },
+    appId: {
+      default() {
+        return ''
+      },
+    },
   },
   components: { Treeselect },
   watch: {
     $route(n, o) {
       console.log(n, o)
     },
+    appId: {
+      handler(n, o) {
+        console.log(n)
+        if (n.length == 0) {
+          if (this.multiple) {
+            this.value = []
+          } else {
+            this.value = undefined
+          }
+        } else {
+          this.value = this.appId
+        }
+      },
+      deep: true,
+    },
   },
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),

+ 57 - 104
src/views/modules/earlyWarningRules/ruleModule.vue

@@ -72,12 +72,14 @@
                         v-model="value.threshold"
                         style="width: 300px; margin-right: 5px"
                         v-else-if="value.modelType == 'text'"
+                        @change="inputChange(value)"
                       />
                       <selectGroup
                         :disabled="!editShow"
                         v-model="value.threshold"
                         style="width: 300px; margin-right: 5px"
                         :code="value.dictId"
+                        :requestUrl="value.requestUrl"
                         :multiple="
                           value.dataType == 'string' ||
                           value.dataType == 'number' ||
@@ -123,6 +125,7 @@
                       </a-select>
 
                       <!-- <p v-else-if="value.modelType == 'timeRange'">{{value.threshold}}</p> -->
+
                       <scheduleTime
                         style="width: 100%"
                         :scheduleTime.sync="value.threshold"
@@ -221,10 +224,12 @@
                                     }"
                                     v-else-if="value.modelType == 'select' || value.modelType == 'checkBox'"
                                   >
+                                    <!--  -->
                                     <selectGroup
                                       :disabled="!editShow"
                                       v-model="value.threshold"
                                       :code="value.dictId"
+                                      :requestUrl="value.requestUrl"
                                       :multiple="
                                         value.dataType == 'string' ||
                                         value.dataType == 'number' ||
@@ -354,7 +359,7 @@
                                     }"
                                     v-else-if="value.modelType == 'text'"
                                   >
-                                    <a-input :disabled="!editShow" v-model="value.threshold" style="width: 95%" />
+                                    <a-input :disabled="!editShow" v-model="value.threshold" style="width: 95%"  @change='inputChange'/>
                                   </a-form-model-item>
                                   <a-form-model-item
                                     :label-col="{ span: 6 }"
@@ -381,6 +386,7 @@
                                       :disabled="!editShow"
                                       v-model="value.threshold"
                                       :code="value.dictId"
+                                      :requestUrl="value.requestUrl"
                                       :multiple="
                                         value.dataType == 'string' ||
                                         value.dataType == 'number' ||
@@ -778,6 +784,12 @@ export default {
     },
   },
   methods: {
+    inputChange(value){
+      
+      
+      value.threshold=value.threshold.trim()
+      console.log(value);
+    },
     addData(valueElse, value, index) {
       // alert(1)
       if (index == 0) {
@@ -796,17 +808,7 @@ export default {
     disabledDate(current) {
       return current && current < moment().subtract(1, 'days')
     },
-    // 应用方式改变
-    applyRangeChange(e) {
-      this.checkedList = []
-      this.checkAll = false
-      this.indeterminate = false
-      if (e.target.value == 'ACCORDINGTO_STATUS') {
-        this.form.appStatus = '1'
-      } else {
-        this.form.appStatus = null
-      }
-    },
+    
     // 获取计划列表
     getCampaignList() {
       getAction('/kuaishou/batch/getCampaignList', {
@@ -868,26 +870,7 @@ export default {
       }
     },
 
-    handleChange(value) {
-      let rulesList = {}
-      rulesList = this.rulesFieldList.filter((item) => {
-        return item.metricValueCode == value
-      })[0]
-      this.rulesList = []
-      rulesList.childs.forEach((ele, index) => {
-        this.rulesList.push({
-          metricValueName: ele.metricValueName,
-          metricValueCode: ele.metricValueCode,
-          dataRange: 'CURRENT_DAY_DATA',
-          judgeMethod: 'GT_EQ',
-          judgeType: 'MONEY',
-          threshold: undefined,
-          minThreshold: undefined,
-          campaignStatus: undefined,
-          unitStatus: undefined,
-        })
-      })
-    },
+    
 
     filterOption(input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -907,78 +890,22 @@ export default {
     resetForm() {
       this.$refs.ruleForm.resetFields()
     },
-    addRule() {
-      this.rulesList.push({
-        metricValueName: ['0', 'COST'],
-        dataRange: 'CURRENT_DAY_DATA',
-        judgeMethod: 'GT_EQ',
-        judgeType: 'MONEY',
-        budgetMultiple: 0.5,
-        budgetMultipleMin: 0.5,
-        budgetMultipleMax: 0.8,
-        campaignStatus: undefined,
-        unitStatus: undefined,
-        threshold: 0,
-        maxNumber: 0,
-      })
-    },
-    deleteRulesListItem(item, index) {
-      console.log(item, index)
-      this.rulesList = this.rulesList.filter((ele, ind) => {
-        return ind != index
-      })
-    },
+   
     displayRender({ labels }) {
       return labels[labels.length - 1]
     },
-    conditionChange(item) {
-      console.log(item)
-      if (item.metricValueName[1] == 'COST') {
-        item.judgeType = 'MONEY'
-      } else {
-        item.judgeType = undefined
-      }
-      item.specificMoney = undefined
-      item.specificMoneyMin = undefined
-      item.specificMoneyMax = undefined
-      item.threshold = undefined
-      item.maxNumber = undefined
-      item.campaignStatus = undefined
-      item.unitStatus = undefined
-    },
-
-    applyObjChange(e) {
-      // console.log(e.target.value)
-      this.plainOptions = []
-      this.checkedList = []
-      this.checkAll = false
-      this.indeterminate = false
-      if (e.target.value == 'ACCOUNT') {
-        this.form.processMethod = 'SEND'
-        this.rulesFieldList = this.accountFieldList
-      } else if (e.target.value == 'CAMPAIGN') {
-        this.rulesFieldList = this.campaignFieldList
-      } else if (e.target.value == 'UNIT') {
-        this.rulesFieldList = this.unitFieldList
-      }
+    
 
-      if (this.form.applyAccount) {
-        if (e.target.value == 'CAMPAIGN') {
-          this.spinning = true
-          this.getCampaignList()
-        } else if (e.target.value == 'UNIT') {
-          this.spinning = true
-          this.getCampaignList()
-          this.getUnitList()
-        }
-      }
-    },
+    
 
     saveHandler() {
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
           // this.form.rulesList=this.rulesList;
-
+          var str = ''
+          for (let i = 0; i < 7 * 24; i++) {
+            str += '0'
+          }
           var datas = []
           datas = this.form.ruleList.map((item) => {
             return {
@@ -988,7 +915,11 @@ export default {
                   var data = end.map((c) => {
                     return {
                       ...c,
-                      threshold: isArray(c.threshold) ? JSON.stringify(c.threshold) : c.threshold,
+                      threshold: isArray(c.threshold)
+                        ? c.dataType != 'array'
+                          ? c.threshold[0]
+                          : JSON.stringify(c.threshold)
+                        : c.threshold,
                     }
                   })
                   return data
@@ -996,12 +927,18 @@ export default {
                   return {
                     ...end,
                     threshold: isArray(end.threshold)
-                      ? end.modelType == 'region'
-                        ? JSON.stringify(
-                            end.threshold.map((c) => {
-                              return c.value
-                            })
-                          )
+                      ? end.dataType != 'array'
+                        ? end.modelType == 'region'
+                          ? JSON.stringify(
+                              end.threshold.map((c) => {
+                                return c.value
+                              })
+                            )
+                          : end.threshold[0]
+                        : end.modelType == 'scheduleTime'
+                        ? end.threshold == str
+                          ? ''
+                          : end.threshold
                         : JSON.stringify(end.threshold)
                       : end.threshold,
                   }
@@ -1146,7 +1083,15 @@ export default {
                     return {
                       ...c,
                       threshold:
-                        c.modelType == 'tagBox' ? (c.threshold == null ? undefined : c.threshold) : c.threshold,
+                        c.modelType == 'tagBox'
+                          ? c.threshold == null
+                            ? undefined
+                            : c.threshold
+                          : c.modelType == 'checkBox'
+                          ? c.dataType == 'array'
+                            ? c.threshold
+                            : [c.threshold]
+                          : c.threshold,
                     }
                   })
                   return [...data]
@@ -1154,7 +1099,15 @@ export default {
                   return {
                     ...end,
                     threshold:
-                      end.modelType == 'tagBox' ? (end.threshold == null ? undefined : end.threshold) : end.threshold,
+                      end.modelType == 'tagBox'
+                        ? end.threshold == null
+                          ? undefined
+                          : end.threshold
+                        : end.modelType == 'checkBox'
+                        ? end.dataType == 'array'
+                          ? end.threshold
+                          : [end.threshold]
+                        : end.threshold,
                   }
                 }
               }),

+ 39 - 22
src/views/modules/earlyWarningRules/useRuleList.vue

@@ -72,7 +72,7 @@
       </div>
     </div>
     <!-- pushRuleVisible -->
-    <a-modal v-model="pushRuleVisible" title="推送账户选择" @ok="handleOk" :confirmLoading="confirmLoading" width="60%">
+    <a-modal v-model="pushRuleVisible" title="推送账户选择" @ok="handleOk" @cancel='cancelPush' :confirmLoading="confirmLoading" width="60%">
       <a-form layout="inline" class="rule-tree-select">
         <a-form-item
           label="请选择账户"
@@ -298,31 +298,48 @@ export default {
     },
 
     handleOk() {
-      this.confirmLoading = true
-      getAction('/ruleAccountTemplate/checkAccountTemplate', { accountId: this.accountId }).then((res) => {
-        console.log(res)
-        if (res.success) {
-          if (!res.result.isApplication) {
-            postAction('/ruleAccountTemplate/pushTemplateToAccount', {
-              templateId: this.templateId,
-              accountId: this.accountId,
-            }).then((r) => {
-              var data = { id: this.templateId, edit: true, accountId: this.accountId }
-              localStorage.setItem('getRuleDetail', JSON.stringify(data))
-              this.$router.push('/earlyWarningRules/ruleModule')
+      
+      if(this.accountId){
+        this.confirmLoading = true
+        getAction('/ruleAccountTemplate/checkAccountTemplate', { accountId: this.accountId }).then((res) => {
+          console.log(res)
+          if (res.success) {
+            if (!res.result.isApplication) {
+              postAction('/ruleAccountTemplate/pushTemplateToAccount', {
+                templateId: this.templateId,
+                accountId: this.accountId,
+              }).then((r) => {
+                if(r.success){
+                  var data = { id: this.templateId, edit: true, accountId: this.accountId }
+                  localStorage.setItem('getRuleDetail', JSON.stringify(data))
+                  this.$router.push('/earlyWarningRules/ruleModule')
+                  this.confirmLoading = false
+                  this.accountId=undefined
+                }else{
+                  this.$message.error(r.message)
+                }
+                
+              })
+            } else {
+              // this.accountId = ''
+              this.$message.error(`此账户下已绑定模板${res.result.templateName},请重新选择账户`)
               this.confirmLoading = false
-            })
+            }
           } else {
-            this.accountId = ''
-            this.$message.error(`此账户下已绑定模板${res.result.templateName},请重新选择账户`)
+            // this.accountId = ''
+            this.$message.error(res.message)
             this.confirmLoading = false
           }
-        } else {
-          this.accountId = ''
-          this.$message.error(res.message)
-          this.confirmLoading = false
-        }
-      })
+        })
+      }else{
+        this.$message.error('请选择需要推送的账户')
+      }
+      
+    },
+    cancelPush(){
+      
+      this.accountId=''
+      
     },
     // recordsRule(record){
     //     console.log(record);

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 902 - 804
src/views/modules/kuaishouapp/account/accountIndex.vue


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1214 - 0
src/views/modules/kuaishouapp/account/copyAllUnit.vue


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

@@ -87,7 +87,7 @@
         <a-form-item label="选择转化" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
           :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
           <a-select allowClear labelInValue style="width:100%" v-model="convertId" @focus="getConvertList">
-            <a-select-option :value="item.convert_id" v-for="(item,index) in convertList" :key="item.convert_id">
+            <a-select-option :value="item.convert_id" v-for="(item) in convertList" :key="item.convert_id">
               {{item.convert_name}}</a-select-option>
           </a-select>
         </a-form-item>

+ 57 - 34
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -432,21 +432,21 @@ li.chouzhen.first:before {
             </a-layout>
           </a-form-item>
 
-          <a-form-item label="创意分类" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="创意分类" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="creativeCategorySwitch">
             <a-cascader
               :options="createOptions"
-              v-decorator="['creativeCategory']"
+              v-decorator="['creativeCategory',{ rules: [{ required: true, message: '创意分类必选' }] }]"
               :fieldNames="fieldNames"
               placeholder="请选择创意分类"
             />
           </a-form-item>
 
-          <a-form-item label="创意标签" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="创意标签" :labelCol="labelCol" :wrapperCol="wrapperCol"  v-if="creativeCategorySwitch">
             <a-select
               mode="tags"
               style="width: 100%"
               placeholder="按回车生成标签"
-              v-decorator="['creativeTag', { validator: creativeTagValid }]"
+              v-decorator="['creativeTag',{ rules: [{ required: true, message: '创意标签必填' }] }]"
               dropdownClassName="display-none-selset"
               :token-separators="[',', ' ', ',']"
             >
@@ -541,7 +541,7 @@ li.chouzhen.first:before {
               >监测链接列表</a
             >
           </a-form-item>
-          <a-form-item label="第三方ActionBar点击监控链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="第三方ActionBar点击监控链接" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="actionbarClickUrlSwitch">
             <a-input
               v-decorator="[
                 'actionbarClickUrl',
@@ -868,35 +868,35 @@ li.chouzhen.first:before {
       <span style="color: red" v-if="!showTrackUrlNameElse">名称重复</span>
     </a-modal>
     <a-modal title="监测链接列表" v-model="clickTrackUrlList" :width="1000" :footer="null">
-       <a-spin :spinning="spinning">
-      <a-row :gutter="10" class="onlny-click-track">
-        <a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
-          <a-card class="search-box" style="over-flow: auto">
-            <!-- <a-input v-model="trackName"></a-input> -->
-            <a-input-search
-              placeholder="请输入监测链接名称"
-              enter-button="Search"
-              size="large"
-              @search="onSearch"
-              style="width: 40%; margin-bottom: 20px"
-              v-model="trackName"
-            />
-            <a-list size="large" bordered :dataSource="trackUrlList">
-              <a-list-item slot="renderItem" slot-scope="item" :title="item.trackUrl" style="line-height: 50px">
-                <div slot="actions">
-                  <a @click="okClickTrackUrl(item)">选择</a>
-                  <a-divider type="vertical" />
-                  <a @click="removeClickTrackUrl(item)">删除</a>
-                </div>
+      <a-spin :spinning="spinning">
+        <a-row :gutter="10" class="onlny-click-track">
+          <a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
+            <a-card class="search-box" style="over-flow: auto">
+              <!-- <a-input v-model="trackName"></a-input> -->
+              <a-input-search
+                placeholder="请输入监测链接名称"
+                enter-button="Search"
+                size="large"
+                @search="onSearch"
+                style="width: 40%; margin-bottom: 20px"
+                v-model="trackName"
+              />
+              <a-list size="large" bordered :dataSource="trackUrlList">
+                <a-list-item slot="renderItem" slot-scope="item" :title="item.trackUrl" style="line-height: 50px">
+                  <div slot="actions">
+                    <a @click="okClickTrackUrl(item)">选择</a>
+                    <a-divider type="vertical" />
+                    <a @click="removeClickTrackUrl(item)">删除</a>
+                  </div>
 
-                {{ item.trackName }}
-                <a-input v-model="item.trackUrl" readOnly style="margin: 10px; width: 70%"></a-input>
-              </a-list-item>
-            </a-list>
-          </a-card>
-        </a-col>
-      </a-row>
-       </a-spin>
+                  {{ item.trackName }}
+                  <a-input v-model="item.trackUrl" readOnly style="margin: 10px; width: 70%"></a-input>
+                </a-list-item>
+              </a-list>
+            </a-card>
+          </a-col>
+        </a-row>
+      </a-spin>
     </a-modal>
   </a-card>
 </template>
@@ -945,7 +945,7 @@ export default {
       clickTrackUrlShow: false,
       clickTrackUrlShowType: '1',
       clickTrackUrlList: false,
-      spinning:false,
+      spinning: false,
       trackUrlList: [],
       trackUrlName: '',
       showSite: true,
@@ -1083,6 +1083,8 @@ export default {
       },
       tagName: '',
       optionsTag: [],
+      creativeCategorySwitch:false,
+      actionbarClickUrlSwitch:false,
     }
   },
   methods: {
@@ -2374,6 +2376,27 @@ export default {
           this.stickerStyles = []
         }
       })
+
+      getAction('/kuaishou/batch/getWhiteList', {
+        accountId: localStorage.getItem('accountId'),
+      }).then((res) => {
+        if (res.success) {
+          // console.log(res)
+          if (res.result) {
+            this.creativeCategorySwitch = res.result.creative_category_switch == 1 ? true : false
+            this.actionbarClickUrlSwitch = res.result.actionbar_click_url_switch == 1 ? true : false
+
+            // if (res.result.alliance_account == 1) {
+            //   this.allianceAccount = true
+            // } else {
+            //   this.allianceAccount = false
+            // }
+          } else {
+            this.creativeCategorySwitch = false
+            this.actionbarClickUrlSwitch = false
+          }
+        }
+      })
     })
   },
 }

+ 28 - 5
src/views/modules/kuaishouapp/account/stepForm/Step4.vue

@@ -380,21 +380,21 @@ li.chouzhen.first:before {
             </div>
           </a-form-item>
 
-          <a-form-item label="创意分类" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="创意分类" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="creativeCategorySwitch">
             <a-cascader
               :options="createOptions"
-              v-decorator="['creativeCategory']"
+              v-decorator="['creativeCategory',{ rules: [{ required: true, message: '创意分类必选' }] }]"
               :fieldNames="fieldNames"
               placeholder="请选择创意分类"
             />
           </a-form-item>
 
-          <a-form-item label="创意标签" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="创意标签" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="creativeCategorySwitch">
             <a-select
               mode="tags"
               style="width: 100%"
               placeholder="按回车生成标签"
-              v-decorator="['creativeTag', { validator: creativeTagValid }]"
+              v-decorator="['creativeTag',{ rules: [{ required: true, message: '创意标签必填' }] }]"
               dropdownClassName="display-none-selset"
               :token-separators="[',',' ',',']"
             >
@@ -477,7 +477,7 @@ li.chouzhen.first:before {
           </a-form-item>
           
           <!-- , { validator: handleConfirmValue } -->
-          <a-form-item label="第三方ActionBar点击监控链接" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-form-item label="第三方ActionBar点击监控链接" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="actionbarClickUrlSwitch">
             <a-input
               v-decorator="[
                 'actionbarClickUrl',
@@ -878,6 +878,8 @@ export default {
   },
   data() {
     return {
+      creativeCategorySwitch: false,
+      actionbarClickUrlSwitch: false,
       optionsTag: [],
       defaultProps: {
         children: 'children',
@@ -2443,6 +2445,27 @@ export default {
           this.stickerStyles = []
         }
       })
+
+      getAction('/kuaishou/batch/getWhiteList', {
+        accountId: localStorage.getItem('accountId'),
+      }).then((res) => {
+        if (res.success) {
+          // console.log(res)
+          if (res.result) {
+            this.creativeCategorySwitch = res.result.creative_category_switch == 1 ? true : false
+            this.actionbarClickUrlSwitch = res.result.actionbar_click_url_switch == 1 ? true : false
+
+            // if (res.result.alliance_account == 1) {
+            //   this.allianceAccount = true
+            // } else {
+            //   this.allianceAccount = false
+            // }
+          } else {
+            this.creativeCategorySwitch = false
+            this.actionbarClickUrlSwitch = false
+          }
+        }
+      })
     })
   },
 }

+ 30 - 27
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -164,14 +164,14 @@ li:hover {
     <a-form-item
       label="年龄"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-      :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
     >
       <a-radio-group v-model="allForm.ageType" buttonStyle="solid">
         <a-radio-button value="noLimit">不限</a-radio-button>
         <a-radio-button value="ageLimit">限定年龄段</a-radio-button>
         <a-radio-button value="ageCustom">自定义年龄段</a-radio-button>
       </a-radio-group>
-      <div v-if="allForm.ageType == 'ageLimit'">
+      <div v-if="allForm.ageType == 'ageLimit'" style="margin-top:5px">
         <a-checkbox-group v-decorator="['agesRange', { rules: [{ required: true, message: '请选择年龄段' }] }]">
           <!-- <a-checkbox :value="0">0-11岁</a-checkbox>
           <a-checkbox :value="12">12-17岁</a-checkbox> -->
@@ -201,7 +201,7 @@ li:hover {
     <a-form-item
       label="性别"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-      :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
     >
       <a-radio-group
         buttonStyle="solid"
@@ -211,6 +211,7 @@ li:hover {
             initialValue: 0,
           },
         ]"
+        
       >
         <a-radio-button :value="0">不限</a-radio-button>
         <a-radio-button :value="1">女性</a-radio-button>
@@ -234,6 +235,7 @@ li:hover {
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       v-if="allForm.platform_os == 1"
       class="else-label"
+      style="margin-top:-16px"
     >
       <a-radio-group
         v-decorator="[
@@ -256,6 +258,7 @@ li:hover {
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       v-if="allForm.platform_os == 2"
       class="else-label"
+      style="margin-top:-16px"
     >
       <a-radio-group
         v-decorator="[
@@ -282,22 +285,22 @@ 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%;margin-top:15px">
         <a-checkbox-group
           v-decorator="['deviceBrand', { rules: [{ required: true, message: '请选择设备品牌' }] }]"
           style="width: 120%"
         >
-          <a-checkbox :value="1">OPPO</a-checkbox>
-          <a-checkbox :value="2">VIVO</a-checkbox>
-          <a-checkbox :value="3">华为</a-checkbox>
-          <a-checkbox :value="4">小米</a-checkbox>
-          <a-checkbox :value="5">荣耀</a-checkbox>
-          <a-checkbox :value="6">三星</a-checkbox>
-          <a-checkbox :value="7">金立</a-checkbox>
-          <a-checkbox :value="8">魅族</a-checkbox>
-          <a-checkbox :value="9">乐视</a-checkbox>
-          <a-checkbox :value="10">其他</a-checkbox>
-          <a-checkbox :value="11" v-if="allForm.platform_os == 0">苹果</a-checkbox>
+          <a-checkbox :value="1" style='margin-bottom:8px'>OPPO</a-checkbox>
+          <a-checkbox :value="2" style='margin-bottom:8px'>VIVO</a-checkbox>
+          <a-checkbox :value="3" style='margin-bottom:8px'>华为</a-checkbox>
+          <a-checkbox :value="4" style='margin-bottom:8px'>小米</a-checkbox>
+          <a-checkbox :value="5" style='margin-bottom:8px'>荣耀</a-checkbox>
+          <a-checkbox :value="6" style='margin-bottom:8px'>三星</a-checkbox>
+          <a-checkbox :value="7" style='margin-bottom:8px'>金立</a-checkbox>
+          <a-checkbox :value="8" style="margin:0 0 8px 0">魅族</a-checkbox>
+          <a-checkbox :value="9" style='margin-bottom:8px'>乐视</a-checkbox>
+          <a-checkbox :value="10" style='margin-bottom:8px'>其他</a-checkbox>
+          <a-checkbox :value="11" v-if="allForm.platform_os == 0" style='margin-bottom:8px'>苹果</a-checkbox>
         </a-checkbox-group>
       </div>
     </a-form-item>
@@ -310,21 +313,21 @@ 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%;margin-top:10px">
         <a-checkbox-group
           v-decorator="['devicePrice', { rules: [{ required: true, message: '请选择设备价格' }] }]"
           style="width: 120%"
         >
-          <a-checkbox :value="1">1500以下</a-checkbox>
-          <a-checkbox :value="2">1501~2000</a-checkbox>
-          <a-checkbox :value="3">2001~2500</a-checkbox>
-          <a-checkbox :value="4">2501~3000</a-checkbox>
-          <a-checkbox :value="5">3001~3500</a-checkbox>
-          <a-checkbox :value="6">3501~4000</a-checkbox>
-          <a-checkbox :value="7">4001~4500</a-checkbox>
-          <a-checkbox :value="8">4501~5000</a-checkbox>
-          <a-checkbox :value="9">5001~5500</a-checkbox>
-          <a-checkbox :value="10">5500以上</a-checkbox>
+          <a-checkbox :value="1" style='margin-bottom:8px'>1500以下</a-checkbox>
+          <a-checkbox :value="2" style='margin-bottom:8px'>1501~2000</a-checkbox>
+          <a-checkbox :value="3" style='margin-bottom:8px'>2001~2500</a-checkbox>
+          <a-checkbox :value="4" style='margin-bottom:8px'>2501~3000</a-checkbox>
+          <a-checkbox :value="5" style="margin-left:0;margin-bottom:8px">3001~3500</a-checkbox>
+          <a-checkbox :value="6" style='margin-bottom:8px'>3501~4000</a-checkbox>
+          <a-checkbox :value="7" style='margin-bottom:8px'>4001~4500</a-checkbox>
+          <a-checkbox :value="8" style='margin-bottom:8px'>4501~5000</a-checkbox>
+          <a-checkbox :value="9" style="margin-left:0;margin-bottom:8px">5001~5500</a-checkbox>
+          <a-checkbox :value="10" style='margin-bottom:8px'>5500以上</a-checkbox>
         </a-checkbox-group>
       </div>
     </a-form-item>
@@ -536,7 +539,7 @@ li:hover {
     <a-form-item
       label="过滤已转化用户"
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-      :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      :wrapperCol="{ lg: { span: 15 }, sm: { span: 15 } }"
     >
       <!-- v-decorator="[
           'isOpen',

+ 93 - 55
src/views/modules/kuaishouapp/batchCreation/campaignList.vue

@@ -49,6 +49,8 @@
     </a-row>
     <a-row style="margin-top: 15px">
       <a-card>
+        <!-- :btn="btn"  -->
+
         <a-button @click="dianji" style="margin-bottom: 15px">新增广告计划</a-button>
         <div v-show="selectedRowKeys.length > 0">
           请输入修改金额:
@@ -106,6 +108,18 @@
           :pagination="ipagination"
           @change="sort"
         >
+          <span slot="actionTwo" slot-scope="text, record">
+            <a-popconfirm @confirm="getInfo(record, 'allUnit')">
+              <div slot="title">
+                <div>
+                  计划名称:
+                  <a-input placeholder="请输入" v-model="refuseReason" style="display: inline-block; width: 500px" />
+                </div>
+              </div>
+              <!-- <a-button slot="okText" type="primary" :disabled="refuseReason == ''">确定</a-button> -->
+              <a @click="setData(record)">复制此计划下所有组</a>
+            </a-popconfirm>
+          </span>
           <template slot="campaignName" slot-scope="text, record">
             <div style="display: flex; justify-content: center">
               <a @click="toDetail(record)" class="count" v-show="!record.editName">{{ text }}</a>
@@ -193,51 +207,22 @@
       </template>
     </a-modal>
 
-    <!-- 实时数据 -->
-    <a-modal v-model="realTimeVisiable" title="广告计划实时数据" @afterClose="clear" width="80%" :maskClosable="false">
-      <div class="optBody">
-        <a-range-picker
-          :disabled-date="disabledDate"
-          format="YYYY-MM-DD"
-          style="width: 250px"
-          @change="dateValueChange"
-          v-model="dateValue"
-        />
-      </div>
-      <div class="tableBox" style="margin-top: 20px; min-height: 400px">
-        <a-table
-          size="middle"
-          :columns="realTimeColumn"
-          :dataSource="realTimeData"
-          bordered
-          :pagination="false"
-          :scroll="{ x: scrollX }"
-          :loading="realTimeLoading"
-          ref="accountTable"
-          style="word-break: break-all"
-        >
-          <span slot="ctr" slot-scope="text">{{ text | toPercentage }}</span>
-          <span slot="action_ratio" slot-scope="text">{{ text | toPercentage }}</span>
-          <span slot="photo_click_ratio" slot-scope="text">{{ text | toPercentage }}</span>
-
-          <span slot="charge" slot-scope="text">{{ text | decimalsHandle }}</span>
-          <span slot="activationCost" slot-scope="text, records">{{
-            (records.activation / records.charge) | decimalsHandle
-          }}</span>
-          <span slot="event_register_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
-          <span slot="form_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
-          <span slot="event_order_paid_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
+    <a-modal v-model="allUnitCopy" title="复制计划下所有组" width="80%" :maskClosable="false">
+      <a-form-item
+        label="是否修改定向与出价"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
+      >
+        <a-radio-group buttonStyle="solid" v-model="editUnit" @change="editUnitType">
+          <a-radio-button value="1">是</a-radio-button>
+          <a-radio-button value="2">否</a-radio-button>
+        </a-radio-group>
+      </a-form-item>
 
-          <span slot="show" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="photo_click" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="aclick" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="bclick" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="activation" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="event_register" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="form_count" slot-scope="text">{{ text | formatCurrency }}</span>
-          <span slot="event_order_paid" slot-scope="text">{{ text | formatCurrency }}</span>
-        </a-table>
-      </div>
+      <copyAllUnit ref="copyAllUnit" v-if="editUnit == '1'" @getUnitData="getUnitData" />
+      <template slot="footer">
+        <a-button key="submit" type="primary" @click="handleEditAllUnit"> 确定 </a-button>
+      </template>
     </a-modal>
   </div>
 </template>
@@ -252,7 +237,7 @@ import { deleteAction, getAction, postAction } from '@/api/manage'
 
 import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 
-//   import copyGroup from './copyGroup'
+import copyAllUnit from '../account/copyAllUnit'
 
 var columns = [
   {
@@ -265,6 +250,16 @@ var columns = [
       customRender: 'campaignName',
     },
   },
+  // {
+  //   title: '操作',
+  //   align: 'center',
+  //   dataIndex: 'actionTwo',
+  //   fixed: 'left',
+  //   width: 200,
+  //   scopedSlots: {
+  //     customRender: 'actionTwo',
+  //   },
+  // },
   {
     title: '计划单日预算金额',
     align: 'center',
@@ -461,6 +456,7 @@ export default {
     ARow,
     countTo,
     Treeselect,
+    copyAllUnit,
     //   copyGroup
   },
   data: function () {
@@ -550,6 +546,12 @@ export default {
       campaignBudget: 'UNLIMITED',
       unitId: '',
       campaignId: '',
+      editUnit: '2',
+      allUnitCopy: false,
+      oldCampaignId: '',
+      oldCampaignName: '',
+      newCampaignId: '',
+      campaignType: '',
     }
   },
   filters: {
@@ -669,6 +671,43 @@ export default {
     },
   },
   methods: {
+    getUnitData() {
+      this.addUser()
+      this.allUnitCopy = false
+      this.editUnit = '2'
+    },
+    handleEditAllUnit(e) {
+      if (this.editUnit == '1') {
+        this.$refs.copyAllUnit.handleSubmit(e)
+      } else {
+        postAction('/kuaishouCampaignCopyData/add', {
+          accountId: this.appId,
+          oldCampaignId: this.oldCampaignId,
+          oldCampaignName: this.oldCampaignName,
+          newCampaignId: this.newCampaignId,
+        }).then((res) => {
+          if (res.success) {
+            this.addUser()
+            this.allUnitCopy = false
+          }
+        })
+      }
+    },
+    editUnitType() {
+      if (this.editUnit == '2') {
+      } else {
+        var params = {
+          accountId: this.appId,
+          oldCampaignId: this.oldCampaignId,
+          oldCampaignName: this.oldCampaignName,
+          newCampaignId: this.newCampaignId,
+          campaignType: this.campaignType,
+        }
+        this.$nextTick(() => {
+          this.$refs.copyAllUnit.handleOk(params)
+        })
+      }
+    },
     disabledDate(current) {
       // console.log(current)
       return (current && current > moment()) || (current && current < moment().subtract(7, 'days'))
@@ -777,7 +816,8 @@ export default {
       d = d < 10 ? '0' + d : d
       this.refuseReason = item.campaignName + '-' + y + '/' + MM + '/' + d
     },
-    getInfo(item) {
+    getInfo(item, type) {
+      this.editUnit == '2'
       if (this.refuseReason == '') {
         this.$message.error('请输入计划名称')
         return
@@ -790,15 +830,13 @@ export default {
         params.accountId = this.appId + ''
         postAction('/kuaishou/batch/campaignCreate', params).then((res) => {
           if (res.success) {
-            this.jihua = true
-            this.loadingGroup = false
-            this.refuseReason = ''
-            this.unitId = ''
-            // 7156834
-            this.planId = res.result
-            this.campaignId = item.campaignId
-            this.getDataList(item.campaignId)
-            this.addUser()
+            if (type) {
+              this.allUnitCopy = true
+              this.oldCampaignId = item.campaignId
+              this.oldCampaignName = item.campaignName
+              this.newCampaignId = res.result
+              this.campaignType = item.campaignType
+            }
           } else {
             this.$message.error(res.message)
           }

+ 237 - 77
src/views/modules/kuaishouapp/batchCreation/creat/creatUnit.vue

@@ -87,7 +87,7 @@
         :label="campaignType == 3 ? ' ' : '链接'"
         :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-        v-if="campaignType != 2"
+        v-if="campaignType == 3||campaignType == 4||campaignType == 5||campaignType == 6||campaignType == 7"
         :class="{ 'else-label': campaignType == 3 }"
       >
         <a-input
@@ -441,16 +441,22 @@
           :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
           v-if="item.bidType == 1"
         >
+                    <!-- v-model="item.bid" -->
           <a-input-number
-            v-model="item.bid"
-            @change="showTip(index)"
+
+            v-decorator="[
+            'bid',
+            {
+              rules: [{ required: true, message: '出价必填' }, {validator: bidCheck}],
+            },
+          ]"
             :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }"
             style="width: 100%"
           >
           </a-input-number>
-          <span style="color: red" v-if="item.showTipCheck && item.ocpxActionType == 180"
+          <!-- <span style="color: red" v-if="item.showTipCheck && item.ocpxActionType == 180"
             >不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span
-          >
+          > -->
         </a-form-item>
         <a-form-item
           label="目标成本"
@@ -458,21 +464,26 @@
           :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
           v-else
         >
+                    <!-- v-model="item.cpaBid" -->
           <a-input-number
-            v-model="item.cpaBid"
-            @change="showTip(index)"
-            :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }"
+
+            v-decorator="[
+            'cpaBid',
+            {
+              rules: [{ required: true, message: '目标成本必填' }, {validator: cpaBidCheck}],
+            },]"
+          
             style="width: 100%"
           >
           </a-input-number>
-          <span style="color: red" v-if="item.showTipCheck">{{
+          <!-- <span style="color: red" v-if="item.showTipCheck">{{
             item.bidType == 1
               ? '不得低于1元,不得高于项目最高出价' + maxBid + '元'
               : '不得低于1元,不得高于项目最高出价' + maxBid + '元'
-          }}</span>
+          }}</span> -->
           <span
             style="color: red; font-weight: 700"
-            v-else-if="item.ocpxActionType == 2 && item.cpaBid && item.cpaBid > 1"
+            v-if="item.ocpxActionType == 2 && getData('cpaBid') && getData('cpaBid') > 1"
           >
             行为出价大于1元,请注意!!!
           </span>
@@ -492,7 +503,7 @@
             @change="deep_conversion_bidTip(index)"
             :style="{ borderColor: item.deepConversionBidCheck ? 'red' : '#d9d9d9' }"
             style="width: 100%"
-            :disabled="item.cpaBid == ''"
+            :disabled="getData('cpaBid')==null||getData('cpaBid') == ''"
           ></a-input-number>
           <span style="color: red" v-if="item.deepConversionBidCheck"
             >深度转化目标成本必须高于优化目标成本,且不得高于3000元</span
@@ -503,7 +514,12 @@
           :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
           :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
         >
-          <a-input v-model="item.unitName" @change="checkGroup($event, index)"></a-input>
+        <!-- v-model="item.unitName"  -->
+          <a-input  v-decorator="[
+            'unitName',
+            {
+              rules: [{ required: true, message: '广告组必填' }, {validator: handleConfirmValue}],
+            },]" @change="checkGroup($event, index)"></a-input>
           <span style="color: red" v-if="item.unitNameCheck">广告组名称重复</span>
         </a-form-item>
       </div>
@@ -517,7 +533,7 @@
         <a-radio-group
           buttonStyle="solid"
           v-decorator="['creativeMaterialType', { initialValue: '1' }]"
-          @change="changeType(item)"
+          @change="changeType()"
         >
           <a-radio-button value="1">竖版视频</a-radio-button>
           <a-radio-button value="2">横版视频</a-radio-button>
@@ -540,11 +556,25 @@
         ></a-input>
       </a-form-item>
       <a-form-item
+        label="创建类型"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      >
+         <a-radio-group
+          buttonStyle="solid"
+          v-decorator="['createType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '0' }]"
+          @change="getPageSize"
+        >
+          <a-radio-button value="0">单品</a-radio-button>
+          <a-radio-button value="1">混搭</a-radio-button>
+        </a-radio-group>
+      </a-form-item>
+      <a-form-item
         label="选择视频"
         :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       >
-        <a @click="getVideoList()">选择视频</a> {{ videoList.length + '/' + getData('createCount') }}
+        <a @click="getVideoList()">选择视频</a> {{ videoList.length + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
         <br />
         <div v-if="videoList.length > 0 && showVideo" style="display:flex;flex-wrap:wrap">
           <span v-for="(item, index) of videoList" :key="index" style="position: relative" class="width-video">
@@ -558,12 +588,20 @@
         :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       >
+      <!-- v-model.trim="allForm.description" -->
+      <!-- @keyup="getData('description')?getData('description')=this.value.replace(/^ +| +$/g,'')" -->
         <a @click="showTitle()">推荐广告语</a>
         <div class="step4-else" style="display: inline-block; position: relative; border-radius: 4px; width: 100%; border: 1px solid #d9d9d9;">
           <a-textarea
             class="rending"
             placeholder="请输入广告语"
-            v-model.trim="allForm.description"
+             v-decorator="['description',{ rules: [{ required: true, message: '广告语必填' }] }]"
+             @keyup="getData('description')?form.setFieldsValue({
+                description: getData('description').replace(/\s/g,'')
+              }):null"
+            @change="getData('description')?form.setFieldsValue({
+                description: getData('description').replace(/\s/g,'')
+              }):null"
             :autosize="{ minRows: 2, maxRows: 6 }"
             :max-length="30"
           ></a-textarea>
@@ -581,7 +619,7 @@
               margin-bottom: 0;
             "
           >
-            {{ allForm.description.length + '/30' }}
+            {{ (getData('description')?getData('description').length:0) + '/30' }}
           </p>
         </div>
         <br />
@@ -597,10 +635,11 @@
         label="创意分类"
         :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="creativeCategorySwitch"
       >
         <a-cascader
           :options="createOptions"
-          v-decorator="['creativeCategory']"
+          v-decorator="['creativeCategory',{ rules: [{ required: true, message: '创意分类必选' }] }]"
           :fieldNames="fieldNames"
           placeholder="请选择创意分类"
         />
@@ -609,19 +648,19 @@
         label="创意标签"
         :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="creativeCategorySwitch"
       >
         <a-select
           mode="tags"
           style="width: 100%"
           placeholder="按回车生成标签"
-          v-decorator="['creativeTag']"
+          v-decorator="['creativeTag',{ rules: [{ required: true, message: '创意标签必填' }] }]"
           dropdownClassName="display-none-selset"
           :token-separators="[',', ' ', ',']"
         >
         </a-select>
         <span v-if="getData('creativeTag') && getData('creativeTag').length > 10" style="color: red"
-          >创意标签最多填写10个,请删减</span
-        >
+        >创意标签最多填写10个,请删减</span>
         <br />
         <a-popconfirm @confirm="getInfo()">
           <div slot="title">
@@ -700,6 +739,7 @@
         label="第三方ActionBar点击监控链接"
         :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+        v-if="actionbarClickUrlSwitch"
       >
         <a-input v-decorator="['actionbarClickUrl']" placeholder="请输入第三方点击监控链接"> </a-input>
         <span style="color: red; position: relative; top: -10px">仅加白使用</span>
@@ -751,8 +791,13 @@
     >
       <a-tabs type="card" @change="callback" v-model="active" class="check-video">
         <div slot="tabBarExtraContent">
-          当前选择数量{{ sumContent  + '/' + getData('createCount') }}
+          当前选择数量
+          {{ sumContent + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
+          <a-button  type="primary" @click="tongbu()" :loading="tongbuLoading" style="margin-left:10px">
+          刷新素材</a-button
+        >
         </div>
+         
         <a-tab-pane :tab="item.label" v-for="item of tab" :key="item.value">
           <a-row :gutter="24">
             <a-col :span="12">
@@ -1169,6 +1214,8 @@ export default {
       ],
       templateList: [],
       allianceAccount: false,
+      creativeCategorySwitch: false,
+      actionbarClickUrlSwitch: false,
       tongbuLoading: false,
       convert: false,
       convertId: '',
@@ -1204,7 +1251,7 @@ export default {
       appId: '',
       loading: false,
       campaignTemplateId: '',
-      campaignType: '2',
+      campaignType: null,
       maxBid: 0,
       allForm: {
         dayBudget: '0',
@@ -1237,6 +1284,7 @@ export default {
       cunTitleVisible: false,
       cunTitleList: [],
       createCount: 0,
+      tongbuLoading: false,
     }
   },
   computed: {
@@ -1265,6 +1313,35 @@ export default {
     },
   },
   methods: {
+    tongbu() {
+      this.tongbuLoading = true
+      getAction('/kuaishou/batch/syncVideo', {
+        accountId: localStorage.getItem('campaignAccountId'),
+      }).then((res) => {
+        if (res.success) {
+          this.$message.success(res.message)
+          this.tongbuLoading = false
+          var params = {}
+          params.accountId = localStorage.getItem('campaignAccountId')
+          params.materialType = this.creativeMaterialType
+          params.pageSize = this.ipagination.pageSize
+          params.pageNo = 1
+          params.status = 0
+          params.channelType = this.channelType
+          params.orderBy = this.orderBy
+          if (this.time.length > 0) {
+            // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+            // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+            params.startDate = moment(this.time[0]).format('YYYY-MM-DD') + ' 00:00:00'
+            params.endDate = moment(this.time[1]).format('YYYY-MM-DD') + ' 23:59:59'
+          }
+          this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
+        } else {
+          this.$message.error(res.message)
+          this.tongbuLoading = false
+        }
+      })
+    },
     removeTitleCun(item) {
       deleteAction('/kuaishou/kuaiShouTitleCollection/delete', {
         id: item.id,
@@ -1276,17 +1353,20 @@ export default {
     },
     okTitleCun(item) {
       this.allForm.description = item.title
+      this.form.setFieldsValue({
+        description: item.title,
+      })
       this.cunTitleVisible = false
       this.cunTitleList = []
     },
     cunTitle() {
-      if (this.allForm.description == '') {
+      if (this.getData('description') && this.getData('description') == '') {
         this.$message.error('请填写广告语后再进行收藏')
       } else {
         var params = {}
         params.accountId = localStorage.getItem('campaignAccountId')
         params.userId = this.userInfo().id
-        params.title = this.allForm.description
+        params.title = this.getData('description')
         postAction('/kuaishou/kuaiShouTitleCollection/add', params).then((res) => {
           if (res.success) {
             this.$message.success('收藏成功')
@@ -1314,6 +1394,12 @@ export default {
     },
     okTitle(item) {
       this.allForm.description = item
+      this.$nextTick(() => {
+        this.form.setFieldsValue({
+          description: item,
+        })
+      })
+
       this.titleVisible = false
       this.dataOne = []
       this.value = ''
@@ -1616,14 +1702,29 @@ export default {
         sum += this.checkVideoWai[i].length
       }
       this.sumContent = sum
-      if (sum > this.getData('createCount')) {
-        this.$message.error('最多选择' + this.getData('createCount') + '个素材')
-        this.checkVideo = []
-        this.sumContent = this.sumContent - 5
-        if (this.active == 0) {
-          this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
-        } else if (this.active == 1) {
-          this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+      if (this.getData('createType') == '0') {
+        if (sum > this.getData('createCount')) {
+          this.$message.error('最多选择' + this.getData('createCount') + '个素材')
+          this.checkVideo = []
+          this.sumContent = this.sumContent - 5
+
+          if (this.active == 0) {
+            this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
+          } else if (this.active == 1) {
+            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+          }
+        }
+      } else {
+        if (sum > this.getData('createCount') * 15) {
+          this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
+          this.checkVideo = []
+          this.sumContent = this.sumContent - 15
+
+          if (this.active == 0) {
+            this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
+          } else if (this.active == 1) {
+            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+          }
         }
       }
     },
@@ -1648,14 +1749,28 @@ export default {
         sum += this.checkVideoWai[i].length
       }
       this.sumContent = sum
-      if (sum > this.getData('createCount')) {
-        this.$message.error('最多选择' + this.getData('createCount') + '个素材')
-        this.checkVideo.pop()
-        this.sumContent--
-        if (this.active == 0) {
-          this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
-        } else if (this.active == 1) {
-          this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+
+      if (this.getData('createType') == '0') {
+        if (sum > this.getData('createCount')) {
+          this.$message.error('最多选择' + this.getData('createCount') + '个素材')
+          this.checkVideo.pop()
+          this.sumContent--
+          if (this.active == 0) {
+            this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
+          } else if (this.active == 1) {
+            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+          }
+        }
+      } else {
+        if (sum > this.getData('createCount') * 15) {
+          this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
+          this.checkVideo.pop()
+          this.sumContent--
+          if (this.active == 0) {
+            this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
+          } else if (this.active == 1) {
+            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+          }
         }
       }
     },
@@ -1723,7 +1838,7 @@ export default {
         this.checkVideo = this.checkVideoWai[this.ipagination.current - 1]
       }
     },
-    changeType(item) {
+    changeType() {
       this.$nextTick(() => {
         if (this.getData('creativeMaterialType') == '1') {
           this.form.setFieldsValue({
@@ -1821,11 +1936,11 @@ export default {
     addGroup() {
       this.allForm.group.push({
         bidType: 10,
-        bid: '',
-        cpaBid: '',
+        // bid: '',
+        // cpaBid: '',
         showTipCheck: false,
         deepConversionBidCheck: false,
-        unitName: '',
+        // unitName: '',
         unitNameCheck: false,
         deepConversionType: '',
         deepConversionBid: '',
@@ -1833,19 +1948,25 @@ export default {
       })
     },
     resData(index) {
-      this.allForm.group[index].bid = ''
-      this.allForm.group[index].cpaBid = ''
+      // this.allForm.group[index].bid = ''
+      // this.allForm.group[index].cpaBid = ''
       this.allForm.group[index].showTipCheck = false
       this.allForm.group[index].deepConversionBidCheck = false
       this.allForm.group[index].deepConversionType = ''
       this.allForm.group[index].deepConversionBid = ''
+      this.form.setFieldsValue({
+        bid: undefined,
+      })
+      this.form.setFieldsValue({
+        cpaBid: undefined,
+      })
     },
     removeGroup(index) {
       this.allForm.group.splice(index, 1)
     },
     deep_conversion_bidTip(index) {
       if (
-        this.allForm.group[index].deepConversionBid < this.allForm.group[index].cpaBid ||
+        this.allForm.group[index].deepConversionBid < this.getData('cpaBid') ||
         this.allForm.group[index].deepConversionBid > 3000
       ) {
         this.allForm.group[index].deepConversionBidCheck = true
@@ -1869,13 +1990,13 @@ export default {
     },
     showTip(index) {
       if (this.allForm.group[index].bidType == 1) {
-        if (this.allForm.group[index].bid < 0.2 || this.allForm.group[index].bid > this.maxBid) {
+        if (this.getData('bid') < 0.2 || this.getData('bid') > this.maxBid) {
           this.allForm.group[index].showTipCheck = true
         } else {
           this.allForm.group[index].showTipCheck = false
         }
       } else {
-        if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
+        if (this.getData('cpaBid') < 1 || this.getData('cpaBid') > this.maxBid) {
           this.allForm.group[index].showTipCheck = true
         } else {
           this.allForm.group[index].showTipCheck = false
@@ -1902,23 +2023,38 @@ export default {
     getData(className) {
       return this.form.getFieldValue(className)
     },
+    bidCheck(rule, value, callback) {
+      if (value < 0.2 || value > this.maxBid) {
+        callback('不得低于0.2元,不得高于项目最高出价' + this.maxBid + '元')
+      } else {
+        callback()
+      }
+    },
+    cpaBidCheck(rule, value, callback) {
+      if (value < 1 || value > this.maxBid) {
+        callback('不得低于1元,不得高于项目最高出价' + this.maxBid + '元')
+      } else {
+        callback()
+      }
+    },
     handleConfirmValue(rule, value, callback) {
-      if (this.campaignType == 3) {
-        if (value == '') {
-          callback('请填写链接')
-        }
-      } else if (this.campaignType == 4) {
-        if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value) && value != '' && value.length < 10000) {
-          callback()
-        } else {
-          callback('链接不能为空且开头为http://或https://,并且长度小于10000')
-        }
-      } else if (this.campaignType == 5) {
-        if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value) && value != '' && value.length < 10000) {
-          callback()
-        } else {
-          callback('链接不能为空且开头为http://或https://,并且长度小于10000')
-        }
+      if (value != '' && value != undefined) {
+        getAction('/kuaishou/batch/checkUnitName', {
+          campaignId: localStorage.getItem('campaignList'),
+          unitName: value + '_0',
+        }).then((res) => {
+          if (res.success) {
+            if (!res.result) {
+              callback('广告组名称重复')
+            } else {
+              callback()
+            }
+          } else {
+            callback()
+          }
+        })
+      } else {
+        callback()
       }
     },
     budgetValue(rule, value, callback) {
@@ -2027,17 +2163,22 @@ export default {
     },
     handleSubmit(e) {
       e.preventDefault()
-      if (this.checkVideo.length < this.getData('createCount')) {
-        this.$message.error('选择的素材不能小于创建条数')
+      if (
+        this.checkVideo.length <
+        (this.getData('createType') == '0' ? this.getData('createCount') : this.getData('createCount') * 15)
+      ) {
+        // this.$message.error('选择的素材不能小于创建条数')
+        this.getData('createType') == '0'
+          ? this.$message.error('选择的素材不能小于创建条数')
+          : this.$message.error('选择的素材不能小于创建条数*15')
       } else {
-        this.form.validateFields((err, values) => {
+        this.form.validateFieldsAndScroll((err, values) => {
           if (!err) {
             this.loading = true
             var groupArr = this.allForm.group.map((item) => {
               return {
                 ...item,
-                cpaBid: item.cpaBid != '' ? item.cpaBid * 1000 : '',
-                bid: item.bid != '' ? item.bid * 1000 : '',
+
                 deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
                 ocpxActionType: item.ocpxActionType,
                 bidType: item.bidType == 1 ? 2 : 10,
@@ -2045,6 +2186,8 @@ export default {
             })
             var json = {
               ...values,
+              cpaBid: values.cpaBid && values.cpaBid != '' ? values.cpaBid * 1000 : null,
+              bid: values.bid && values.bid != '' ? values.bid * 1000 : null,
               convertId: this.convertId ? this.convertId.key : null,
               dayBudget: values.dayBudget * 1000,
               photoArr: this.checkVideo,
@@ -2061,7 +2204,6 @@ export default {
               campaignId: localStorage.getItem('campaignList'),
               beginTime: moment(this.timeRange[0]).format('YYYY-MM-DD'),
               endTime: this.allForm.time == '2' ? moment(this.timeRange[1]).format('YYYY-MM-DD') : '',
-              description: this.allForm.description,
               appStore: values.useAppMarket == true ? this.allForm.appStore : null,
               useAppMarket: values.useAppMarket ? 1 : 0,
               sceneId: this.allForm.allianceAccount == '1' ? this.allForm.sceneId : [5],
@@ -2116,6 +2258,18 @@ export default {
     handleFocus() {
       // console.log('focus')
     },
+    getPageSize(data) {
+      if (data.target.value == '0') {
+        this.ipagination.pageSize = 5
+      } else if (data.target.value == '1') {
+        this.ipagination.pageSize = 15
+      }
+      this.videoList = []
+      this.checkVideo = []
+      this.checkVideoAll = []
+      this.checkVideoWai = []
+      this.sumContent = 0
+    },
     filterOption(input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     },
@@ -2257,13 +2411,19 @@ export default {
       if (res.success) {
         // console.log(res)
         if (res.result) {
-          if (res.result.alliance_account == 1) {
-            this.allianceAccount = true
-          } else {
-            this.allianceAccount = false
-          }
+          this.creativeCategorySwitch = res.result.creative_category_switch == 1 ? true : false
+          this.allianceAccount = res.result.alliance_account == 1 ? true : false
+          this.actionbarClickUrlSwitch = res.result.actionbar_click_url_switch == 1 ? true : false
+
+          // if (res.result.alliance_account == 1) {
+          //   this.allianceAccount = true
+          // } else {
+          //   this.allianceAccount = false
+          // }
         } else {
           this.allianceAccount = false
+          this.creativeCategorySwitch = false
+          this.actionbarClickUrlSwitch = false
         }
       }
     })

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1376 - 0
src/views/modules/kuaishouapp/populationAnalysis/index.vue


+ 3 - 1
src/views/modules/material/videoMaterial.vue

@@ -885,7 +885,7 @@ a {
             :value.sync="urlList.url"
             @overUpload="overUpload"
             @removeUpload="removeUpload"
-            :fileCount="10"
+            :fileCount="1"
             uploadType="video"
             :multiple="false"
           />
@@ -2683,6 +2683,7 @@ export default {
                 this.visible = false
                 this.add = true
                 this.loading = false
+                this.loadingElse = false
                 for (const key in this.role) {
                   if (key == 'roleCode') {
                     this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
@@ -2691,6 +2692,7 @@ export default {
               } else {
                 this.$message.error(res.message)
                 this.loading = false
+                this.loadingElse = false
               }
             })
           }

+ 8 - 2
src/views/modules/workBench/designLeader/platForm.vue

@@ -239,7 +239,7 @@ export default {
             let params={
                 design:this.userInfo.id,
                 pageNo:this.currentPage,
-                pageSize:10,
+                pageSize:8,
             }
             getAction('/platform/order/listByCreatorOrDesignLeader',params).then(res=>{
                 console.log(res);
@@ -264,7 +264,13 @@ export default {
                             let time='';
                             let startTime=moment(item.createTime)
                             console.log() 
-                            if(moment().diff(startTime,'minutes')>60){
+                            if(moment().diff(startTime,'hours')>24){
+                                time=item.createTime.split(/[ ]+/)[0]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }else if(moment().diff(startTime,'minutes')>60){
                                 time=item.createTime.split(/[ ]+/)[1]
                                 return {
                                     ...item,

+ 12 - 6
src/views/modules/workBench/designPeople/platForm.vue

@@ -253,12 +253,18 @@ export default {
                         let time='';
                         let startTime=moment(item.createTime)
                         console.log() 
-                        if(moment().diff(startTime,'minutes')>60){
-                            time=item.createTime.split(/[ ]+/)[1]
-                            return {
-                                ...item,
-                                time,
-                            }
+                        if(moment().diff(startTime,'hours')>24){
+                                time=item.createTime.split(/[ ]+/)[0]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                        }else 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 {

+ 272 - 156
src/views/modules/workBench/materialList.vue

@@ -420,7 +420,9 @@
                                 :visible="childrenDrawer"
                                 @close="onChildrenDrawerClose"
                             >  
+                                <a-spin :spinning="videoUploadLoading"> 
                                 <a-form :form="form" :label-col="labelCol" :wrapper-col="wrapperCol">
+                                     
                                     <a-form-item label="视频上传">
                                         
                                         <uploadFile
@@ -559,6 +561,7 @@
                                         />
                                     </a-form-item>
                                 </a-form>
+                                </a-spin>
                                <div
                                     :style="{
                                     position: 'absolute',
@@ -575,7 +578,7 @@
                                 >
                                     
                                     <a-button key="back" @click="onChildrenDrawerClose" style="margin-right:15px">取消</a-button>
-                                    <a-button type="primary" :disabled="!confirmLoading" @click="onChildrenDrawerOk" :loading="loadingElse2">确定</a-button>
+                                    <a-button type="primary" :disabled="!confirmLoading" @click="onChildrenDrawerOk" :loading="loadingElse">确定</a-button>
                                 
                                 </div>
                             </a-drawer>
@@ -620,11 +623,13 @@
                                 </p>
                             </div>
                             <div class="info-item info">
-                                <ul>
+                                <ul style="position:relative">
                                    
                                     <li><span>编导:</span> {{ currentVideo.planName }} </li>
                                     <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
-                                    <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>                                    
+                                    <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>   
+                                     <!-- v-if="role=='designLeader'&&currentVideo.videoStatus==0" -->
+                                 <a-button type='link' style="margin-left:15px;position:absolute;top:-6px;right:0" @click="updataPeople" v-if="role=='designLeader'&&currentVideo.videoStatus==0">重新指派</a-button>                                 
                                 </ul>
                             </div>
                             <div class="info-item" v-if="currentVideo.videoStatus==2">
@@ -667,8 +672,11 @@
                                 <p>{{currentScript.materialName}}</p>
                             </div>
                             <div class="info-item">
-                                <span>编导:</span>
-                                <p>{{currentScript.planName}}</p>
+                                <span style="height: 32px;line-height: 32px;">编导:</span>
+                                <p style="height:32px;line-height:32px">
+                                    {{currentScript.planName}}
+                                    <a-button type='link' style="margin-left:15px" @click="updataPeople" v-if="role=='designLeader'&&currentScript.scriptStatus==0">重新指派</a-button>
+                                </p>
                             </div>
                             <div class="info-item" v-if="currentScript.scriptStatus==2">
                                 <span>驳回理由:</span>
@@ -734,6 +742,7 @@
                             <a-button key="back" @click="quxiao">取消</a-button>
                             <a-button type="primary"  @click="handleOk" :loading="loadingElse">确定</a-button>
                         </template>
+                        <a-spin :spinning='assignVisibleLoading'>
                         <a-form-model ref="ruleForm" :rules="rules"  :model="formPerson" :label-col="labelCol" :wrapper-col="wrapperCol">
 
                             <a-form-model-item  label="编导" ref="plan"  prop="plan">
@@ -742,7 +751,7 @@
                                     showSearch
                                     optionFilterProp="children"
                                     :filterOption="filterOption"
-
+                                    :disabled="currentMaterial.materialStatus>=4"
                                 >
                                 <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
                                 </a-select>
@@ -771,7 +780,7 @@
                                 </a-select>
                             </a-form-model-item>
                         </a-form-model>
-
+                        </a-spin>
                     </a-modal>
                 </div>
             </div>
@@ -911,10 +920,23 @@ export default {
             
         ]
         return {
+            videoEchoInfo:{},
+            videoUploadLoading:false,
+            videoinfo:{
+                url: '',
+                md5: '',
+                name: '',
+                width:undefined,
+                height:undefined,
+
+            },
+            imageinfo:[],
+
+            assignVisibleLoading:false,
             visibleLoading:false,
 
             loadingElse2:false,
-             rules: {
+            rules: {
                 
                 clip: [{ required: true, message: '剪辑人员必须指派', trigger: 'change' }],
                 // shot: [{ required: true, message: '拍摄人员必须指派', trigger: 'change' }],
@@ -1059,18 +1081,33 @@ export default {
         },
         handleOk(e) {
             console.log(e);
+
             this.$refs.ruleForm.validate(valid => {
                 if (valid) {
                     this.loadingElse=true;
-                    postAction(this.url.assgin,{
-                        id:this.currentMaterial.materialId,
-                        ...this.formPerson
-                    }).then(res=>{
-                        this.loadingElse=false;
-                        this.assignVisible = false;
-                        this.$message.success(res.message);
-                        this.materialHttp(this.activeKey)
-                    })
+
+                    if(this.currentMaterial.clip&&this.currentMaterial.plan&&this.currentMaterial.shot){
+                        postAction('/platform/designer/assignAgain',{
+                            id:this.currentMaterial.materialId,
+                            ...this.formPerson
+                        }).then(res=>{
+                            this.loadingElse=false;
+                            this.assignVisible = false;
+                            this.$message.success(res.message);
+                            this.materialHttp(this.activeKey)
+                        })
+                    }else{
+                        postAction(this.url.assgin,{
+                            id:this.currentMaterial.materialId,
+                            ...this.formPerson
+                        }).then(res=>{
+                            this.loadingElse=false;
+                            this.assignVisible = false;
+                            this.$message.success(res.message);
+                            this.materialHttp(this.activeKey)
+                        })
+                    }
+                    
                 } else {
                     console.log('error submit!!');
                     return false;
@@ -1103,11 +1140,25 @@ export default {
             this.assignVisible=true;
             this.getProjectId(record.projectId)
         },
+        updataPeople(){
+             this.formPerson={
+                plan:this.currentMaterial.plan,
+                shot:this.currentMaterial.shot,
+                clip:this.currentMaterial.clip,
+            },
+         
+            this.assignVisible=true;
+            this.scriptVisible=false;
+            this.visible=false;
+            this.assignVisibleLoading=true;
+            this.getProjectId(this.currentMaterial.projectId)
+        },
         getProjectId(id) {
             this.ascription=[];
             getAction('/ctop/projectMember/getMemberList', {
                 projectId: id,
             }).then((res) => {
+                this.assignVisibleLoading=false;
                 if (res.code == 0) {
                     this.ascription = res.result.filter((item) => {
                         if (
@@ -1128,18 +1179,42 @@ export default {
         },
         modifyVideo(){
             this.childrenDrawer=true;
-            console.log(this.currentVideo);
-            // urlList: {
-            //     url: '',
-            //     md5: '',
-            //     name: '',
-            // },
-            // urlListImage: {
-            //     url: [],
-            //     md5: [],
-            //     name: [],
-            //     size: [],
-            // },
+            // console.log(this.currentVideo);
+            
+            this.videoUploadLoading=true
+            getAction('/platform/material/videoEcho',{
+                videoId:this.currentVideo.videoId
+            }).then(res=>{
+                console.log(res)
+                console.log(res)
+                this.videoUploadLoading=false;
+                this.confirmLoading=true;
+                if(res.result.video){
+                    this.urlList=res.result.video
+                    this.videoinfo=res.result.video;
+                    this.videoinfo.url=this.videoinfo.url.replace(/https:/g,'')
+                }
+                if(res.result.covers){
+                    this.imageinfo=res.result.covers;
+                    this.urlListImage= {
+                        url : res.result.covers.map(item=>{return item.url}),
+                        md5 : res.result.covers.map(item=>item.md5),
+                        name : res.result.covers.map(item=>item.name),
+                        size : res.result.covers.map(item=>item.size),
+                        format : res.result.covers.map(item=>item.format),
+                    }
+                }
+                
+                this.form.setFieldsValue({
+                    contentTagList: res.result.tags.contentTagList.map(item=>{return item.tagId}),
+                    modalityTagList:  res.result.tags.modalityTagList.map(item=>{return item.tagId}),
+                    modTagList:  res.result.tags.modTagList.map(item=>{return item.tagId}),
+                    senceTagList:  res.result.tags.senceTagList.map(item=>{return item.tagId}),
+                })
+
+                this.videoEchoInfo=res.result
+            })
+            
         },
         goOrderDetail(record){
             console.log(record)
@@ -1348,10 +1423,10 @@ export default {
         },
 
 
-
-
         beforeUpload(file) {
-            this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
+
+            // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
+            this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
             this.loadDisabled = true
             const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
             const fileName = file.name
@@ -1397,7 +1472,7 @@ export default {
         },
         onChildrenDrawerClose() {
             this.childrenDrawer = false;
-            this.loadingElse2=false
+            this.loadingElse=false
             this.dataElse = []
             this.form.resetFields()
             this.urlList = {
@@ -1412,113 +1487,95 @@ export default {
                 name: [],
                 size: [],
             }
-            this.imageArrList = []
+            this.imageArrList = [];
+            this.videoinfo={
+                url: '',
+                md5: '',
+                name: '',
+                width:undefined,
+                height:undefined,
+            };
+            this.imageinfo=[];
+            this.form.setFieldsValue({
+                contentTagList: null,
+                modalityTagList: null,
+                modTagList: null,
+                senceTagList: null,
+            })
         },
 
         onChildrenDrawerOk(){
             this.form.validateFieldsAndScroll((err, values) => {
                 if (!err) {
                     console.log(values)
-                    this.loadingElse2 = true
+                    this.loadingElse = true
                     var params = {
                         ...values,
+                        ...this.videoinfo,
+                        covers:[...this.imageinfo]
                     }
-                    // var roleCode = {}
-                    // for (const key in this.role) {
-                    //     if (key == 'roleCode') {
-                    //         this.role[key] = this.role[key] + 'Id'
-                    //         roleCode[this.role[key]] = this.userInfo.id
-                    //     }
-                    // }
+                   
                     params.id = this.add ? null : this.id
-                    params.code = this.urlList.md5
-                    params.url = this.urlList.url
-                    params.materialName = this.urlList.name
-                
                     params.userId = this.userInfo.id
-                    params.projectId = values.projectId
-                    params.materialDescribe = values.materialDescribe
-                    params.type = 'VIDEO'
-                    //   params.tagList = values.tagList
-                    params.ascription ={
-                        planId: this.currentMaterial.plan,
-                        shotId: this.currentMaterial.shot,
-                        clipId: this.currentMaterial.clip,
-                    }
+
                     params.projectId=this.currentMaterial.projectId
-                    params.materialId=this.currentMaterial.id||this.currentMaterial.materialId
-                    params.tag = this.tags
-                    params.imageArr = this.imageArrList
-                    if (this.add) {
-                        orderFileInsert(params).then((res) => {
-                        if (res.success) {
-                            this.form.resetFields()
-                            this.urlList = {
-                            url: '',
-                            md5: '',
-                            name: '',
-                            }
-                            
-                            this.urlListImage = {
-                            url: [],
-                            md5: [],
-                            name: [],
-                            size: [],
-                            }
-                            this.imageArrList = []
-                            this.tags = []
-                            
-                            this.childrenDrawer = false
-                            this.visible=false;
-                            this.add = true
-                            for (const key in this.role) {
-                            if (key == 'roleCode') {
-                                this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
-                            }
-                            }
-                            this.$message.success('素材上传成功')
-                            this.loadingElse2 = false
-                            this.materialHttp(this.activeKey)
-                            //   this.departValue = []
-                        } else {
-                            this.$message.error(res.message)
-                            this.loadingElse2 = false
-                            this.childrenDrawer = false
-                            this.visible=false;
-                        }
-                        })
-                    } else {
-                        fileEdit({
-                        ...params,
-                        status: '0',
-                        }).then((res) => {
-                        if (res.success) {
-                            this.form.resetFields()
-                            this.urlList = {
-                            url: '',
-                            md5: '',
-                            name: '',
-                            }
-                            
-                            this.tags = []                      
-                            this.childrenDrawer = false
-                            this.add = true
-                            for (const key in this.role) {
+                    params.materialId=this.currentMaterial.id ||this.currentMaterial.materialId
+                    params.materialCode=this.currentMaterial.materialCode
+                    
+                        postAction('/platform/file/uploadVideo',params).then(res=>{
+                            this.loading=false;
+                            if (res.success) {
+                                this.form.resetFields()
+                                this.urlList = {
+                                    url: '',
+                                    md5: '',
+                                    name: '',
+                                }
+                                
+                                this.urlListImage = {
+                                    url: [],
+                                    md5: [],
+                                    name: [],
+                                    size: [],
+                                }
+                                this.imageArrList = []
+                                this.tags = []
+                                
+                                this.childrenDrawer = false
+                                this.visible=false;
+                                this.add = true
+                                for (const key in this.role) {
                                 if (key == 'roleCode') {
                                     this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
                                 }
+                                }
+                                this.$message.success('素材上传成功')
+                                this.loadingElse = false
+                                this.videoinfo={
+                                    url: '',
+                                    md5: '',
+                                    name: '',
+                                    width:undefined,
+                                    height:undefined,
+                                };
+                                this.imageinfo=[];
+                                this.materialHttp(this.activeKey)
+                                //   this.departValue = []
+                            } else {
+                                this.$message.error(res.message)
+                                this.loadingElse = false
+                                // this.childrenDrawer = false
+                                // this.visible=false;
                             }
-                        } else {
-                            this.$message.error(res.message)                       
-                            this.childrenDrawer = false
-                        }
                         })
-                    }
-                }else {
-
+                        
+                } else {
+                    this.$message.error('请正确填写必填项目')
                 }
+                
             })
         },
+
         // 上传视频相关方法
         removeUpload() {
             this.form.setFieldsValue({
@@ -1533,10 +1590,12 @@ export default {
             this.confirmLoading = true
             this.repeat = false
             this.urlList.url = urlAll[0].url
+            
+            this.videoinfo.url=urlAll[0].url
             this.$message.success('上传成功')
 
             getAction('/ctop/materialTagInfo/detail', {
-                code: this.urlList.md5,
+                code: this.videoinfo.md5,
             }).then((res) => {
                 if (res.success) {
                 if (res.modalityTagList.length > 0) {
@@ -1565,25 +1624,23 @@ export default {
             console.log(index)
         },
         overUploadImage(urlAll) {
-        
+            console.log(urlAll)
             var that = this
             that.material = []
             that.imageArrList = []
             var img
             if (urlAll.length > 0) {
-                for (var i = 0; i < urlAll.length; i++) {
-                that.imageArrList.push({
-                    // width: img.width,
-                    // height: img.height,
-                    // size: this.urlListImage.size[i],
-                    code: this.urlListImage.md5[i],
-                    url: urlAll[i].url,
-                    materialName: this.urlListImage.name[i],
+                urlAll.forEach((ele,index)=>{
+
+                    this.imageinfo.forEach(item=>{
+                        if(item.name==ele.name){
+                            item.url=ele.url
+                        }
+                    })
+                    // img = new Image()
+                    // img.src = urlAll[index].url
                 })
-                img = new Image()
-                img.src = urlAll[i].url
                 
-                }
             } else {}
         },
         addImage(item) {
@@ -1614,35 +1671,79 @@ export default {
                 size: [],
             }
             this.imageArrList = []
+            
         },
         file(file) {
+            console.log(file)
             var bmf = new BMF()
             var that = this
-            return new Promise(function (resolve, reject) {
-                bmf.md5(file, (err, md5) => {
-                that.urlList.name = file.name
-                that.urlList.md5 = md5
-                fileCheck({
-                    code: md5,
-                    projectId: that.currentMaterial.projectId,
-                }).then((res) => {
-                    if (res.code == 0) {
-                    that.$message.error('此素材已经上传')
-                    that.repeat = true
-                    reject()
-                    } else {
-                    that.repeat = false
+            
+            return new Promise( (resolve, reject)=> {
+                
+                this.getVideoMsg(file).then((videoinfo) => {
+                    const { duration, height, width } = videoinfo;
+                    //获取到视频的时长,高度,宽度
+                    bmf.md5(file, (err, md5) => {
+                        videoinfo.name = file.name
+                        videoinfo.md5 = md5
+                        that.repeat = false
+                    })
+                    videoinfo.size=file.size;
+                    videoinfo.format=file.type
+                    console.log(videoinfo);
+                    this.videoinfo=videoinfo
                     resolve()
-                    //   reject()
-                    }
-                })
-                })
+                });
             })
+
+            
+
+            
+        },
+        
+        getVideoMsg(file) {
+            // console.log('getVideoMsg')
+            return new Promise((resolve) => {
+                let videoElement = document.createElement("video");
+                videoElement.src = URL.createObjectURL(file);
+                videoElement.addEventListener("loadedmetadata", function () {
+                    let obj={
+                        duration: videoElement.duration,
+                        height: videoElement.videoHeight,
+                        width: videoElement.videoWidth,
+                    }
+                    
+                    window.URL.revokeObjectURL(videoElement.src);
+                    videoElement.remove()
+                    resolve(obj);
+                });
+            });
+        },
+
+        getImageMsg(file){
+            return new Promise((resolve) => {
+                // let imageElement = document.createElement("image");
+                let imageElement = new Image();
+                let obj={}
+                imageElement.src = URL.createObjectURL(file);
+                // console.log(imageElement)
+                imageElement.onload=function(){
+                    // console.log(imageElement.width)
+                    obj={
+                        height:imageElement.height,
+                        width:imageElement.width
+                    }
+                    console.log(obj)
+                    resolve(obj)
+                }
+                
+            });
         },
         fileWater(file) {
+            console.log(file)
             var bmf = new BMF()
             var that = this
-            var codeData = that.urlList.md5 != '' ? that.urlList.md5 : that.addImageData.code
+            var codeData = that.videoinfo.md5 != '' ? that.videoinfo.md5 : that.addImageData.code
             console.log(codeData)
             this.urlListImage = {
                 url: [],
@@ -1650,14 +1751,27 @@ export default {
                 name: [],
                 size: [],
             }
-            return new Promise(function (resolve, reject) {
+            this.imageinfo=[]
+            return new Promise( (resolve, reject)=> {
                 bmf.md5(file, (err, md5) => {
                 that.urlListImage.name.push(file.name)
                 that.urlListImage.md5.push(md5)
-                that.urlListImage.size.push(file.size)
-                resolve()
+                that.urlListImage.size.push(file.size)})
                 
-                })
+                this.getImageMsg(file).then((imageinfo) => {
+                   
+                    imageinfo.size=file.size;
+                    imageinfo.format=file.type;
+                    imageinfo.name=file.name
+                    bmf.md5(file, (err, md5) => {                        
+                        imageinfo.md5=md5   
+                        this.imageinfo.push({
+                            ...imageinfo
+                        })   
+                        resolve()                                    
+                    })
+                    
+                });
             })
         },
 
@@ -1766,6 +1880,7 @@ export default {
         this.role=this.$parent.role;  
         this.activeKey=this.$parent.materialStatus
         this.materialHttp(this.$parent.materialStatus)
+        this.getTagListAll()
     },
     activated() {
         if(this.$parent.role=='operator'){
@@ -1777,6 +1892,7 @@ export default {
         }
         this.activeKey=this.$parent.materialStatus
         this.materialHttp(this.$parent.materialStatus)
+        this.getTagListAll()
     },
     filters:{
         handlerMaterialStatus(val){

+ 44 - 32
src/views/modules/workBench/operator/materialList.vue

@@ -828,23 +828,29 @@ export default {
         // 脚本驳回
         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;
+            if(this.scriptAdvise){
+                postAction(this.url.scriptReject,{
+                    id:this.currentMaterial.materialId,
+                    scriptAdvise:this.scriptAdvise,
+                    materialCode:this.currentMaterial.materialCode
+                }).then(res=>{
+                    console.log(res);
+                    this.scriptAdvise=''
+                    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)
+                    }
+                })
+            }else{
                 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)
-                }
-            })
+                this.$messgae.error('请填写驳回理由')
+            }
+            
         },
         // 视频通过审核
         approved(){
@@ -869,23 +875,29 @@ export default {
         // 视频驳回
         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;
+            if(this.videoAdvise){
+                postAction(this.url.videoReject,{
+                    id:this.currentMaterial.materialId,
+                    videoAdvise:this.videoAdvise,
+                    materialCode:this.currentMaterial.materialCode
+                }).then(res=>{
+                    console.log(res);
+                    this.videoAdvise='';
+                    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)
+                    }
+                })
+            }else{
                 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)
-                }
-            })
+                this.$message.error('请填写驳回理由')
+            }
+            
         },
         
         search(){

+ 9 - 2
src/views/modules/workBench/operator/platForm.vue

@@ -269,8 +269,15 @@ export default {
                        
                             let time='';
                             let startTime=moment(item.createTime)
-                            console.log() 
-                            if(moment().diff(startTime,'minutes')>60){
+                            console.log(startTime) 
+                            if(moment().diff(startTime,'hours')>24){
+                                time=item.createTime.split(/[ ]+/)[0]
+                                return {
+                                    ...item,
+                                    time,
+                                }
+                            }
+                            else if(moment().diff(startTime,'minutes')>60){
                                 time=item.createTime.split(/[ ]+/)[1]
                                 return {
                                     ...item,

+ 365 - 160
src/views/modules/workBench/orderDetail.vue

@@ -525,7 +525,7 @@
                                
                                 
                                 <span class="wancheng" v-if="text==7"> </span>
-                                <span class="bohui" v-else-if="text==3"> </span>
+                                <span class="bohui" v-else-if="text==3 || text==6"> </span>
                                 <span class="shenhe" v-else> </span>
                                 {{text | handlerMaterialStatus}}
                             </div>
@@ -564,7 +564,7 @@
                     @close="onClose"
                     >
                         
-                         <a-spin :spinning="visibleLoading">   
+                        <a-spin :spinning="visibleLoading">   
                             <a-drawer
                                 :title="add ? '上传视频' : '修改视频'"
                                 width="600"
@@ -572,24 +572,26 @@
                                 :visible="childrenDrawer"
                                 @close="onChildrenDrawerClose"
                             >
+                                <a-spin :spinning="videoUploadLoading"> 
                                 <a-form :form="form" :label-col="labelCol" :wrapper-col="wrapperCol">
                                     <a-form-item label="视频上传">
+                                        <!--  -->
                                         <uploadFile
                                             :checkFile="file"
                                             :value.sync="urlList.url"
                                             @overUpload="overUpload"
                                             @removeUpload="removeUpload"
-                                            :fileCount="10"
+                                            :fileCount="1"
                                             uploadType="video"
                                             :multiple="false"
                                         />
                                         <span v-if="repeat" style="color: red">此素材重复,请重新选择上传</span>
-                                        <span v-if="confirmLoading && urlList.url != ''" style="color: green">上传成功</span>
+                                        <span v-if="confirmLoading && videoinfo.url != ''" style="color: green">上传成功</span>
                                     </a-form-item>
                                     <a-form-item
                                         label="封面上传"
                                         class="add-image-material"
-                                        v-if="currentMaterial.projectId && add && urlList.url != ''"
+                                        v-if="currentMaterial.projectId && add && videoinfo.url != ''"
                                         >
                                         <uploadFile
                                             :value.sync="urlListImage.url"
@@ -731,12 +733,13 @@
                                         <a-textarea
                                             placeholder="请输入描述"
                                             v-decorator="[
-                                            'materialDescribe', // 给表单赋值或拉取表单时,该input对应的key
+                                            'describe', // 给表单赋值或拉取表单时,该input对应的key
                                             ]"
                                             :auto-size="{ minRows: 3, maxRows: 10 }"
                                         />
                                     </a-form-item>
                                 </a-form>
+                                </a-spin>
                                <div
                                     :style="{
                                     position: 'absolute',
@@ -785,8 +788,8 @@
                                         
                                         <span v-else>暂无封面</span>
                                     </div>
-                                     
-                                    <img :src="defaultPic" alt=""  style="width:100px;margin:0 10px 8px 0" v-else>                              
+                                     <span v-else>暂无封面</span>
+                                    <!-- <img :src="defaultPic" alt=""  style="width:100px;margin:0 10px 8px 0" v-else>                               -->
                                 </div>
                             </div>
                             
@@ -804,6 +807,8 @@
                                     <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
                                     <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>                                    
                                 </ul>
+                                <!-- v-if="role=='designLeader'&&currentVideo.videoStatus==0" -->
+                                 <a-button type='link' style="margin-left:15px;position:relative;top:-6px" @click="updataPeople" v-if="role=='designLeader'&&currentVideo.videoStatus==0">重新指派</a-button>
                             </div>
                             <div class="info-item" v-if="currentVideo.videoStatus==2">
                                 <span>驳回理由:</span>
@@ -811,11 +816,12 @@
                             </div>
                             <div class="bottom-btn">
                                 <a-button type='primary' @click="approved" v-if="role=='operator'&&currentMaterial.materialStatus==5" style="margin-right:20px">通过审核</a-button>
-                                <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="role=='operator'&&currentMaterial.materialStatus==5"  style="margin-right:20px">驳回</a-button>                                                               
+                                <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="role=='operator'&&currentMaterial.materialStatus==5"  style="margin-right:20px">驳回</a-button>            
+                                 <a-button type='primary' v-if="role!='operator'&&currentVideo.videoStatus==2" :disabled="currentVideo.clip!=userInfo.id" @click="modifyVideo" style="margin-right:20px">修改视频信息</a-button>                                                   
                                 <a-button type='default' @click="onClose">关闭</a-button>
                             </div>
                         </div>
-                         </a-spin>   
+                        </a-spin>   
                     </a-drawer>
                     
 
@@ -843,8 +849,11 @@
                                 <p>{{currentScript.materialName}}</p>
                             </div>
                             <div class="info-item">
-                                <span>编导:</span>
-                                <p>{{currentScript.planName}}</p>
+                                <span style="height: 32px;line-height: 32px;">编导:</span>
+                                <p style="height:32px;line-height:32px">
+                                    {{currentScript.planName}}
+                                    <a-button type='link' style="margin-left:15px" @click="updataPeople" v-if="role=='designLeader'&&currentScript.scriptStatus==0">重新指派</a-button>
+                                </p>
                             </div>
                             <div class="info-item" v-if="currentScript.scriptStatus==2">
                                 <span>驳回理由:</span>
@@ -911,10 +920,12 @@
 
                 <!-- 指派 -->
                  <a-modal v-model="assignVisible" title="物料指派"  width='600px'>
+                    
                         <template slot="footer">
                             <a-button key="back" @click="quxiao">取消</a-button>
                             <a-button type="primary"  @click="handleOk" :loading="loadingElse">确定</a-button>
                         </template>
+                    <a-spin :spinning='assignVisibleLoading'>
                         <a-form-model ref="ruleForm" :rules="rules"  :model="formPerson" :label-col="labelCol" :wrapper-col="wrapperCol">
 
                             <a-form-model-item  label="编导" ref="plan"  prop="plan">
@@ -923,7 +934,7 @@
                                     showSearch
                                     optionFilterProp="children"
                                     :filterOption="filterOption"
-
+                                    :disabled="currentMaterial.materialStatus>=4"
                                 >
                                 <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
                                 </a-select>
@@ -952,13 +963,14 @@
                                 </a-select>
                             </a-form-model-item>
                         </a-form-model>
-
+                    </a-spin>
                 </a-modal>
                 <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="请填写驳回理由"
@@ -966,7 +978,7 @@
                     />
                 </a-modal>
                 <a-modal v-model="scriptRejectVisiable" title="脚本驳回"  width='600px'>
-                     <template slot="footer">
+                    <template slot="footer">
                         <a-button key="back" @click="()=>{scriptRejectVisiable=false}">取消</a-button>
                         <a-button type="primary"  @click="scriptReject" :loading="loadingElse">确定驳回</a-button>
                     </template>
@@ -1118,6 +1130,10 @@ export default {
     },
     data() {
         return {
+            videoEchoInfo:{},
+            videoUploadLoading:false,
+            videoRejectType:'1',
+            assignVisibleLoading:false,
             visibleLoading:false,
              rules: {
                 
@@ -1143,7 +1159,7 @@ export default {
             loadDisabled:false,
             labelCol: { span: 4 },
             wrapperCol: { span: 14 },
-            loadingElse: false,
+            
             formPerson:{
                 plan:'',
                 shot:'',
@@ -1272,9 +1288,59 @@ export default {
             add: true,
             inputVisible: false,
             inputValue: '',
+
+
+            videoinfo:{
+                url: '',
+                md5: '',
+                name: '',
+                width:undefined,
+                height:undefined,
+
+            },
+            imageinfo:[],
         }
     },
     methods: {
+        modifyVideo(){
+            this.childrenDrawer=true;
+            // console.log(this.currentVideo);
+            
+            this.videoUploadLoading=true
+            getAction('/platform/material/videoEcho',{
+                videoId:this.currentVideo.videoId
+            }).then(res=>{
+                console.log(res)
+                
+                this.videoUploadLoading=false;
+                this.confirmLoading=true;
+                if(res.result.video){
+                    this.urlList=res.result.video
+                    this.videoinfo=res.result.video;
+                    this.videoinfo.url=this.videoinfo.url.replace(/https:/g,'')
+                }
+                if(res.result.covers){
+                    this.imageinfo=res.result.covers;
+                    this.urlListImage= {
+                        url : res.result.covers.map(item=>{return item.url}),
+                        md5 : res.result.covers.map(item=>item.md5),
+                        name : res.result.covers.map(item=>item.name),
+                        size : res.result.covers.map(item=>item.size),
+                        format : res.result.covers.map(item=>item.format),
+                    }
+                }
+                
+                this.form.setFieldsValue({
+                    contentTagList: res.result.tags.contentTagList.map(item=>{return item.tagId}),
+                    modalityTagList:  res.result.tags.modalityTagList.map(item=>{return item.tagId}),
+                    modTagList:  res.result.tags.modTagList.map(item=>{return item.tagId}),
+                    senceTagList:  res.result.tags.senceTagList.map(item=>{return item.tagId}),
+                })
+
+                this.videoEchoInfo=res.result
+            })
+            
+        },
         editOrder(){
             this.$parent.isEdit=true;
             this.$parent.orderId=this.currentOrderInfo.id;
@@ -1290,6 +1356,7 @@ export default {
             getAction('/ctop/projectMember/getMemberList', {
                 projectId: id,
             }).then((res) => {
+                this.assignVisibleLoading=false
                 if (res.code == 0) {
                     this.ascription = res.result.filter((item) => {
                         if (
@@ -1335,22 +1402,46 @@ export default {
             this.assignVisible=true;
             this.getProjectId(record.projectId)
         },
+        updataPeople(){
+             this.formPerson={
+                plan:this.currentMaterial.plan,
+                shot:this.currentMaterial.shot,
+                clip:this.currentMaterial.clip,
+            },
+            this.scriptVisible=false;
+            this.visible=false;
+            this.assignVisible=true;
+            this.assignVisibleLoading=true;
+            this.getProjectId(this.currentMaterial.projectId)
+        },
         handleOk(e) {
             console.log(e);
-          
             this.$refs.ruleForm.validate(valid => {
                 if (valid) {
+                    console.log(this.formPerson)
                     this.loadingElse=true;
-                    postAction(this.url.assgin,{
-                        id:this.currentMaterial.id ,
-                        ...this.formPerson
-                    }).then(res=>{                       
+                    if(this.currentMaterial.clip&&this.currentMaterial.plan&&this.currentMaterial.shot){
+                        postAction('/platform/designer/assignAgain',{
+                            id:this.currentMaterial.id,
+                            ...this.formPerson
+                        }).then(res=>{
                             this.loadingElse=false;
                             this.assignVisible = false;
                             this.$message.success(res.message);
                             this.materialHttp(this.activeKey)
-                        
-                    })
+                        })
+                    }else{
+                        postAction(this.url.assgin,{
+                            id:this.currentMaterial.id,
+                            ...this.formPerson
+                        }).then(res=>{
+                            this.loadingElse=false;
+                            this.assignVisible = false;
+                            this.$message.success(res.message);
+                            this.materialHttp(this.activeKey)
+                        })
+                    }
+                   
                 } else {
                     console.log('error submit!!');
                     return false;
@@ -1474,8 +1565,10 @@ export default {
             console.log(record)
             this.currentMaterial=record
             this.currentScript={};
+            
             if(record.scriptId){
-                this.visibleLoading=true;       
+                this.visibleLoading=true; 
+                this.scriptVisible = true;      
                 getAction(this.url.scriptDetail,{
                     scriptId:record.scriptId
                 }).then(res=>{
@@ -1483,7 +1576,7 @@ export default {
                     this.visibleLoading=false;       
                     if(res.success){
                         this.currentScript=res.result;
-                        this.scriptVisible = true;
+                        
                     }else{
                         this.currentScript={};
                     }
@@ -1558,23 +1651,31 @@ export default {
             })
         },
         // 视频驳回
-        reject(){           
-            postAction(this.url.videoReject,{
-                id:this.currentMaterial.id,
-                videoAdvise:this.videoAdvise,
-                materialCode:this.currentMaterial.materialCode
-                
-            }).then(res=>{
-                console.log(res);
-                this.videoAdvise=''
-                this.visible=false;
-                if(res.success){
-                    this.$message.success(res.message);
-                    this.materialHttp()
-                }else{
-                    this.$message.error(res.message)
-                }
-            })
+        reject(){   
+            this.loadingElse=true;
+            if(this.videoAdvise){
+                postAction(this.url.videoReject,{
+                    id:this.currentMaterial.id,
+                    videoAdvise:this.videoAdvise,
+                    materialCode:this.currentMaterial.materialCode
+                    
+                }).then(res=>{
+                    console.log(res);
+                    this.videoAdvise=''
+                    this.visible=false;
+                    this.videoRejectVisiable=false;
+                    if(res.success){
+                        this.$message.success(res.message);
+                        this.materialHttp()
+                    }else{
+                        this.$message.error(res.message)
+                    }
+                })
+            }else{
+                this.loadingElse=false;
+                this.$message.error('请填写驳回理由')
+            }        
+            
 
         },
         // 脚本通过审核
@@ -1597,22 +1698,31 @@ export default {
         },
         // 脚本驳回
         scriptReject(){
-            postAction(this.url.scriptReject,{
-                id:this.currentMaterial.id,
-                scriptAdvise:this.scriptAdvise,
-                materialCode:this.currentMaterial.materialCode
-            }).then(res=>{
-                console.log(res);
+            this.loadingElse=true;
+            if(this.scriptAdvise){
+                postAction(this.url.scriptReject,{
+                    id:this.currentMaterial.id,
+                    scriptAdvise:this.scriptAdvise,
+                    materialCode:this.currentMaterial.materialCode
+                }).then(res=>{
+                    console.log(res);
 
-                this.scriptVisible=false;
-                this.scriptReject=''
-                if(res.success){
-                    this.$message.success(res.message);
-                    this.materialHttp()
-                }else{
-                    this.$message.error(res.message)
-                }
-            })
+                    this.scriptVisible=false;
+                    this.scriptAdvise=''
+                    this.scriptRejectVisiable=false;
+                    this.loadingElse=false;
+                    if(res.success){
+                        this.$message.success(res.message);
+                        this.materialHttp()
+                    }else{
+                        this.$message.error(res.message)
+                    }
+                })
+            }else{
+                this.loadingElse=false;
+                this.$messgae.error('请填写驳回理由')
+            }
+            
         },
         // 生成水印
         getWater() {
@@ -1693,7 +1803,9 @@ export default {
 
 
         beforeUpload(file) {
-            this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
+            // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
+            this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
+
             this.loadDisabled = true
             const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
             const fileName = file.name
@@ -1754,7 +1866,21 @@ export default {
                 name: [],
                 size: [],
             }
-            this.imageArrList = []
+            this.imageArrList = [];
+            this.videoinfo={
+                url: '',
+                md5: '',
+                name: '',
+                width:undefined,
+                height:undefined,
+            };
+            this.imageinfo=[];
+            this.form.setFieldsValue({
+                contentTagList: null,
+                modalityTagList: null,
+                modTagList: null,
+                senceTagList: null,
+            })
         },
 
         onChildrenDrawerOk(){
@@ -1764,71 +1890,101 @@ export default {
                     this.loadingElse = true
                     var params = {
                         ...values,
+                        ...this.videoinfo,
+                        covers:[...this.imageinfo]
                     }
-                    // var roleCode = {}
-                    // for (const key in this.role) {
-                    //     if (key == 'roleCode') {
-                    //         this.role[key] = this.role[key] + 'Id'
-                    //         roleCode[this.role[key]] = this.userInfo.id
-                    //     }
-                    // }
+                   
                     params.id = this.add ? null : this.id
-                    params.code = this.urlList.md5
-                    params.url = this.urlList.url
-                    params.materialName = this.urlList.name
-                
                     params.userId = this.userInfo.id
-                    params.projectId = values.projectId
-                    params.materialDescribe = values.materialDescribe
-                    params.type = 'VIDEO'
-                    //   params.tagList = values.tagList
-                    params.ascription ={
-                        planId: this.currentMaterial.plan,
-                        shotId: this.currentMaterial.shot,
-                        clipId: this.currentMaterial.clip,
-                    }
+
                     params.projectId=this.currentMaterial.projectId
-                    params.materialId=this.currentMaterial.id||this.currentMaterial.materialId
-                    params.tag = this.tags
-                    params.imageArr = this.imageArrList
+                    params.materialId=this.currentMaterial.id ||this.currentMaterial.materialId
+                    params.materialCode=this.currentMaterial.materialCode
                     if (this.add) {
-                        orderFileInsert(params).then((res) => {
-                        if (res.success) {
-                            this.form.resetFields()
-                            this.urlList = {
-                            url: '',
-                            md5: '',
-                            name: '',
+                        postAction('/platform/file/uploadVideo',params).then(res=>{
+                            if (res.success) {
+                                this.form.resetFields()
+                                this.urlList = {
+                                    url: '',
+                                    md5: '',
+                                    name: '',
+                                }
+                                
+                                this.urlListImage = {
+                                    url: [],
+                                    md5: [],
+                                    name: [],
+                                    size: [],
+                                }
+                                this.imageArrList = []
+                                this.tags = []
+                                
+                                this.childrenDrawer = false
+                                this.visible=false;
+                                this.add = true
+                                for (const key in this.role) {
+                                if (key == 'roleCode') {
+                                    this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
+                                }
+                                }
+                                this.$message.success('素材上传成功')
+                                this.loadingElse = false
+                                this.videoinfo={
+                                    url: '',
+                                    md5: '',
+                                    name: '',
+                                    width:undefined,
+                                    height:undefined,
+                                };
+                                this.imageinfo=[];
+                                this.materialHttp()
+                                //   this.departValue = []
+                            } else {
+                                this.$message.error(res.message)
+                                this.loadingElse = false
+                                // this.childrenDrawer = false
+                                // this.visible=false;
                             }
+                        })
+                        // orderFileInsert(params).then((res) => {
+                        // if (res.success) {
+                        //     this.form.resetFields()
+                        //     this.urlList = {
+                        //         url: '',
+                        //         md5: '',
+                        //         name: '',
+                        //     }
                             
-                            this.urlListImage = {
-                            url: [],
-                            md5: [],
-                            name: [],
-                            size: [],
-                            }
-                            this.imageArrList = []
-                            this.tags = []
+                        //     this.urlListImage = {
+                        //         url: [],
+                        //         md5: [],
+                        //         name: [],
+                        //         size: [],
+                        //     }
+                        //     this.imageArrList = []
+                        //     this.tags = []
                             
-                            this.childrenDrawer = false
-                            this.visible=false;
-                            this.add = true
-                            for (const key in this.role) {
-                            if (key == 'roleCode') {
-                                this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
-                            }
-                            }
-                            this.$message.success('素材上传成功')
-                            this.loadingElse = false
-                            this.materialHttp()
-                            //   this.departValue = []
-                        } else {
-                            this.$message.error(res.message)
-                            this.loadingElse = false
-                            this.childrenDrawer = false
-                            this.visible=false;
-                        }
-                        })
+                        //     this.childrenDrawer = false
+                        //     this.visible=false;
+                        //     this.add = true
+                        //     for (const key in this.role) {
+                        //     if (key == 'roleCode') {
+                        //         this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
+                        //     }
+                        //     }
+                        //     this.$message.success('素材上传成功')
+                        //     this.loadingElse = false
+                        //     this.videoinfo={};
+                        //     this.imageinfo=[];
+                        //     this.materialHttp()
+                        //     //   this.departValue = []
+                        // } else {
+                        //     this.$message.error(res.message)
+                        //     this.loadingElse = false
+                        //     this.childrenDrawer = false
+                        //     this.visible=false;
+                        // }
+                        // })
                     } else {
                         fileEdit({
                         ...params,
@@ -1868,14 +2024,6 @@ export default {
 
 
 
-
-
-
-
-
-
-
-
         // 上传视频相关方法
         removeUpload() {
             this.form.setFieldsValue({
@@ -1890,10 +2038,12 @@ export default {
             this.confirmLoading = true
             this.repeat = false
             this.urlList.url = urlAll[0].url
+            
+            this.videoinfo.url=urlAll[0].url
             this.$message.success('上传成功')
 
             getAction('/ctop/materialTagInfo/detail', {
-                code: this.urlList.md5,
+                code: this.videoinfo.md5,
             }).then((res) => {
                 if (res.success) {
                 if (res.modalityTagList.length > 0) {
@@ -1922,25 +2072,23 @@ export default {
             console.log(index)
         },
         overUploadImage(urlAll) {
-        
+            console.log(urlAll)
             var that = this
             that.material = []
             that.imageArrList = []
             var img
             if (urlAll.length > 0) {
-                for (var i = 0; i < urlAll.length; i++) {
-                that.imageArrList.push({
-                    // width: img.width,
-                    // height: img.height,
-                    // size: this.urlListImage.size[i],
-                    code: this.urlListImage.md5[i],
-                    url: urlAll[i].url,
-                    materialName: this.urlListImage.name[i],
+                urlAll.forEach((ele,index)=>{
+
+                    this.imageinfo.forEach(item=>{
+                        if(item.name==ele.name){
+                            item.url=ele.url
+                        }
+                    })
+                    // img = new Image()
+                    // img.src = urlAll[index].url
                 })
-                img = new Image()
-                img.src = urlAll[i].url
                 
-                }
             } else {}
         },
         addImage(item) {
@@ -1971,35 +2119,79 @@ export default {
                 size: [],
             }
             this.imageArrList = []
+            
         },
         file(file) {
+            console.log(file)
             var bmf = new BMF()
             var that = this
-            return new Promise(function (resolve, reject) {
-                bmf.md5(file, (err, md5) => {
-                that.urlList.name = file.name
-                that.urlList.md5 = md5
-                fileCheck({
-                    code: md5,
-                    projectId: that.currentMaterial.projectId,
-                }).then((res) => {
-                    if (res.code == 0) {
-                    that.$message.error('此素材已经上传')
-                    that.repeat = true
-                    reject()
-                    } else {
-                    that.repeat = false
+            
+            return new Promise( (resolve, reject)=> {
+                
+                this.getVideoMsg(file).then((videoinfo) => {
+                    const { duration, height, width } = videoinfo;
+                    //获取到视频的时长,高度,宽度
+                    bmf.md5(file, (err, md5) => {
+                        videoinfo.name = file.name
+                        videoinfo.md5 = md5
+                        that.repeat = false
+                    })
+                    videoinfo.size=file.size;
+                    videoinfo.format=file.type
+                    console.log(videoinfo);
+                    this.videoinfo=videoinfo
                     resolve()
-                    //   reject()
-                    }
-                })
-                })
+                });
             })
+
+            
+
+            
+        },
+        
+        getVideoMsg(file) {
+            // console.log('getVideoMsg')
+            return new Promise((resolve) => {
+                let videoElement = document.createElement("video");
+                videoElement.src = URL.createObjectURL(file);
+                videoElement.addEventListener("loadedmetadata", function () {
+                    let obj={
+                        duration: videoElement.duration,
+                        height: videoElement.videoHeight,
+                        width: videoElement.videoWidth,
+                    }
+                    
+                    window.URL.revokeObjectURL(videoElement.src);
+                    videoElement.remove()
+                    resolve(obj);
+                });
+            });
+        },
+
+        getImageMsg(file){
+            return new Promise((resolve) => {
+                // let imageElement = document.createElement("image");
+                let imageElement = new Image();
+                let obj={}
+                imageElement.src = URL.createObjectURL(file);
+                // console.log(imageElement)
+                imageElement.onload=function(){
+                    // console.log(imageElement.width)
+                    obj={
+                        height:imageElement.height,
+                        width:imageElement.width
+                    }
+                    console.log(obj)
+                    resolve(obj)
+                }
+                
+            });
         },
         fileWater(file) {
+            console.log(file)
             var bmf = new BMF()
             var that = this
-            var codeData = that.urlList.md5 != '' ? that.urlList.md5 : that.addImageData.code
+            var codeData = that.videoinfo.md5 != '' ? that.videoinfo.md5 : that.addImageData.code
             console.log(codeData)
             this.urlListImage = {
                 url: [],
@@ -2007,14 +2199,27 @@ export default {
                 name: [],
                 size: [],
             }
-            return new Promise(function (resolve, reject) {
+            this.imageinfo=[]
+            return new Promise( (resolve, reject)=> {
                 bmf.md5(file, (err, md5) => {
                 that.urlListImage.name.push(file.name)
                 that.urlListImage.md5.push(md5)
-                that.urlListImage.size.push(file.size)
-                resolve()
+                that.urlListImage.size.push(file.size)})
                 
-                })
+                this.getImageMsg(file).then((imageinfo) => {
+                   
+                    imageinfo.size=file.size;
+                    imageinfo.format=file.type;
+                    imageinfo.name=file.name
+                    bmf.md5(file, (err, md5) => {                        
+                        imageinfo.md5=md5   
+                        this.imageinfo.push({
+                            ...imageinfo
+                        })   
+                        resolve()                                    
+                    })
+                    
+                });
             })
         },
 

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

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

+ 11 - 3
src/views/oceanengine/HotMaterialList.vue

@@ -21,7 +21,7 @@
               </a-col>
             </a-row>-->
             <a-row :gutter="24">
-              <a-col :md="10" :sm="10">
+              <a-col :md="3" :sm="3">
                 <a-form-item label="排序">
                   <a-radio-group v-model="queryParam.orderByColumn">
                     <a-radio-button value="create_time">按抓取时间</a-radio-button>
@@ -30,6 +30,13 @@
                     <a-radio-button value="comment">按评论数</a-radio-button>-->
                   </a-radio-group>
                 </a-form-item>
+               
+              </a-col>
+              <a-col :md="8" :sm="8">
+                
+                <a-form-item label="标题">
+                  <a-input placeholder="标题名称" style="width: 300px" allowClear v-model="queryParam.title" />
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="6">
                 <a-form-item>
@@ -39,7 +46,7 @@
                   </a-radio-group>
                 </a-form-item>
               </a-col>
-              <a-col :md="8" :sm="8">
+              <a-col :md="4" :sm="4">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                 <a-button
                   type="primary"
@@ -146,7 +153,8 @@ export default {
         orderByColumn: 'create_time',
         orderByType: 'desc',
         start: '',
-        end: ''
+        end: '',
+        title:'',
       },
       time: [],
       companyData: [],

+ 4 - 1
vue.config.js

@@ -75,15 +75,18 @@ module.exports = {
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.43:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.43:8888', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        // target: 'http://192.168.1.43:8087', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
+        // target: 'http://192.168.1.193:8088', //请求本地 需要jeecg-boot后台项目  李煜一
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',
+        // target:'http://139.186.151.174:8804', //测试
+
 
 
         ws: false,