瀏覽代碼

'合并盯盘'

魏志佳 4 年之前
父節點
當前提交
ba248df3c9
共有 100 個文件被更改,包括 18828 次插入1697 次删除
  1. 7 4
      package.json
  2. 1 1
      public/index.html
  3. 37 0
      public/splitting.js
  4. 75 70
      src/components/ChartCard.vue
  5. 12 4
      src/components/layouts/UserLayout.vue
  6. 1 1
      src/components/uploadFile.vue
  7. 348 0
      src/components/uploadFileMd5Push.vue
  8. 13 3
      src/config/router.config.js
  9. 72 2
      src/filters.js
  10. 16 12
      src/permission.js
  11. 1 0
      src/utils/request.js
  12. 7 6
      src/views/dashboard/Analysis.vue
  13. 1 1
      src/views/modules/BatchCreate/TouTiaoBatch.vue
  14. 1 1
      src/views/modules/BatchCreate/newCreate.vue
  15. 1 1
      src/views/modules/BatchCreate/newDirectedPackage.vue
  16. 0 1
      src/views/modules/BatchCreate/newPlan.vue
  17. 0 1
      src/views/modules/LaunchHousekeeper/newProject.vue
  18. 0 1
      src/views/modules/LaunchHousekeeper/setProjectBudget.vue
  19. 0 1
      src/views/modules/LaunchHousekeeper/setProjectConvert.vue
  20. 0 1
      src/views/modules/LaunchHousekeeper/setProjectCreate.vue
  21. 0 1
      src/views/modules/LaunchHousekeeper/setProjectDirectional.vue
  22. 2 1
      src/views/modules/Statistics/KSAccountReport.vue
  23. 2 1
      src/views/modules/Statistics/accountReport.vue
  24. 8 0
      src/views/modules/Statistics/components/Treeselect.vue
  25. 19 4
      src/views/modules/Statistics/components/ratioModal.vue
  26. 二進制
      src/views/modules/Statistics/materialReport/image/1.png
  27. 二進制
      src/views/modules/Statistics/materialReport/image/2.png
  28. 二進制
      src/views/modules/Statistics/materialReport/image/3.png
  29. 二進制
      src/views/modules/Statistics/materialReport/image/4.png
  30. 二進制
      src/views/modules/Statistics/materialReport/image/5.png
  31. 498 0
      src/views/modules/Statistics/materialReport/marterialDetail.vue
  32. 680 0
      src/views/modules/Statistics/materialReport/marterialList.vue
  33. 633 0
      src/views/modules/Statistics/materialReport/marterialTtList.vue
  34. 859 457
      src/views/modules/Statistics/materialReport/materialReport.vue
  35. 19 2
      src/views/modules/Statistics/materialStatistics.vue
  36. 0 1
      src/views/modules/Statistics/mediaReport.vue
  37. 44 2
      src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue
  38. 11 7
      src/views/modules/Statistics/refuseDataCreat.vue
  39. 17 8
      src/views/modules/Statistics/refuseDataCreatNew.vue
  40. 113 33
      src/views/modules/Statistics/videoStatics/KSvideoStatics.vue
  41. 5 3
      src/views/modules/Statistics/videoStatics/TTvideoStatics.vue
  42. 6 7
      src/views/modules/Statistics/yicheStatistics/dayStatistics.vue
  43. 6 7
      src/views/modules/Statistics/yicheStatistics/timeStatistics.vue
  44. 49 16
      src/views/modules/advertiser/AdvertiserList.vue
  45. 3 1
      src/views/modules/advertiser/ProjectList.vue
  46. 3 1
      src/views/modules/advertiser/ProjectMemberList.vue
  47. 1 2
      src/views/modules/advertiser/UserAllocationList.vue
  48. 76 29
      src/views/modules/advertiser/modules/ProjectModal.vue
  49. 0 154
      src/views/modules/advertiser/modules/Treeselect.vue
  50. 15 21
      src/views/modules/advertiser/modules/projectListModal.vue
  51. 759 0
      src/views/modules/autoLaunch/accelerateExplorationList.vue
  52. 647 0
      src/views/modules/autoLaunch/appIdList.vue
  53. 1 1
      src/views/modules/autoLaunch/autoLaunchReport.vue
  54. 558 120
      src/views/modules/autoLaunch/configLaunchInfo.vue
  55. 256 62
      src/views/modules/autoLaunch/configLaunchList.vue
  56. 0 1
      src/views/modules/autoLaunch/createStrategy.vue
  57. 1 1
      src/views/modules/autoLaunch/groupList.vue
  58. 1 1
      src/views/modules/autoLaunch/materialAndBid.vue
  59. 494 0
      src/views/modules/autoLaunch/newAppId.vue
  60. 1 1
      src/views/modules/autoLaunch/planList.vue
  61. 2 3
      src/views/modules/autoLaunch/setDirectional.vue
  62. 1 1
      src/views/modules/autoLaunch/strategyList.vue
  63. 8 0
      src/views/modules/columnConst/accountConst.js
  64. 1569 0
      src/views/modules/columnConst/stockWatch.js
  65. 21 39
      src/views/modules/earlyWarningRules/pushTreeSelect.vue
  66. 26 8
      src/views/modules/kuaishouapp/account/accountIndex.vue
  67. 22 8
      src/views/modules/kuaishouapp/account/advertisingGroup.vue
  68. 19 21
      src/views/modules/kuaishouapp/account/copyAllUnit.vue
  69. 2 2
      src/views/modules/kuaishouapp/account/copyGroup.vue
  70. 41 36
      src/views/modules/kuaishouapp/account/editGroup.vue
  71. 41 37
      src/views/modules/kuaishouapp/account/editGroupNew.vue
  72. 14 1
      src/views/modules/kuaishouapp/account/newMould.vue
  73. 63 26
      src/views/modules/kuaishouapp/account/stepForm/Step2.vue
  74. 2 1
      src/views/modules/kuaishouapp/account/stepForm/Step3.vue
  75. 31 4
      src/views/modules/kuaishouapp/account/stepForm/Step4.vue
  76. 4 0
      src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue
  77. 44 38
      src/views/modules/kuaishouapp/account/stepForm/stepModule/test.vue
  78. 10 2
      src/views/modules/kuaishouapp/batchCreation/campaignList.vue
  79. 5 7
      src/views/modules/kuaishouapp/batchCreation/creat/creatUnit.vue
  80. 7 9
      src/views/modules/kuaishouapp/crossAccount/createUnit.vue
  81. 28 4
      src/views/modules/kuaishouapp/crossAccount/templateModal.vue
  82. 4871 0
      src/views/modules/kuaishouapp/newBatch/index.vue
  83. 1110 0
      src/views/modules/kuaishouapp/newBatch/lookPreview.vue
  84. 590 0
      src/views/modules/kuaishouapp/newBatch/result.vue
  85. 0 1
      src/views/modules/kuaishouapp/populationAnalysis/index.vue
  86. 1 1
      src/views/modules/material/musicTab.vue
  87. 1 1
      src/views/modules/onlineTraining/onlineTrainingList.vue
  88. 2749 0
      src/views/modules/stockWatch/accountPage.vue
  89. 305 0
      src/views/modules/stockWatch/modules/customColumn.vue
  90. 294 0
      src/views/modules/stockWatch/modules/selectComponent.vue
  91. 1 1
      src/views/modules/workBench/designLeader/index.vue
  92. 9 2
      src/views/modules/workBench/materialList.vue
  93. 9 1
      src/views/modules/workBench/orderDetail.vue
  94. 11 3
      src/views/modules/workBench/placeOrder.vue
  95. 2 2
      src/views/oceanengine/HotMaterialList.vue
  96. 1 0
      src/views/oceanengine/modules/HotMaterialModal.vue
  97. 45 6
      src/views/system/DepartList.vue
  98. 282 196
      src/views/system/UserList.vue
  99. 207 180
      src/views/system/modules/DepartModal.vue
  100. 0 0
      src/views/system/modules/UserModal.vue

+ 7 - 4
package.json

@@ -12,20 +12,23 @@
   "dependencies": {
     "@antv/data-set": "^0.10.2",
     "@femessage/upload-to-ali": "^1.8.1",
+    "@jeecg/antd-online-beta220": "^1.0.1",
     "@riophae/vue-treeselect": "^0.4.0",
     "@tinymce/tinymce-vue": "^2.0.0",
     "ali-oss": "^6.1.1",
     "ant-design-vue": "^1.3.9",
     "apexcharts": "^3.6.5",
+    "area-data": "^5.0.6",
     "axios": "^0.18.0",
     "babel-loader": "^8.0.6",
     "blueimp-md5": "^2.11.0",
     "browser-md5-file": "^1.1.1",
     "clipboard": "^2.0.4",
     "codemirror": "^5.46.0",
+    "core-js": "^2.6.12",
     "cos-js-sdk-v5": "^0.5.26",
     "dayjs": "^1.8.0",
-    "echarts": "^4.3.0",
+    "echarts": "^4.9.0",
     "element-ui": "^2.13.0",
     "enquire.js": "^2.1.6",
     "html2canvas": "^1.0.0-rc.3",
@@ -48,6 +51,7 @@
     "vue-i18n": "^8.7.0",
     "vue-infinite-scroll": "^2.0.2",
     "vue-layer": "^1.0.2",
+    "vue-lazyload": "^1.3.3",
     "vue-loader": "^15.7.0",
     "vue-ls": "^3.2.0",
     "vue-oss-uploader": "^0.1.10",
@@ -61,8 +65,7 @@
     "vue-waterfall-easy": "^2.4.3",
     "vuedraggable": "^2.20.0",
     "vuex": "^3.0.1",
-    "vuex-class": "^0.3.1",
-    "vue-lazyload": "^1.3.3"
+    "vuex-class": "^0.3.1"
   },
   "devDependencies": {
     "@babel/polyfill": "^7.2.5",
@@ -131,4 +134,4 @@
     "last 2 versions",
     "not ie <= 8"
   ]
-}
+}

+ 1 - 1
public/index.html

@@ -284,7 +284,7 @@
     window._CONFIG['imgDomainURL'] = 'http://139.186.31.213:8804/jeecg-boot/sys/common/view';
     window._CONFIG['pdfDomainURL'] = 'http://139.186.31.213:8804/jeecg-boot/sys/common/pdf/pdfPreviewIframe';
   </script>
-  <script src="https://unpkg.com/splitting/dist/splitting.min.js"></script>
+  <script src="<%= BASE_URL %>splitting.js"></script>
 
 </head>
 

+ 37 - 0
public/splitting.js

@@ -0,0 +1,37 @@
+!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Splitting=t()}(this,function(){"use strict"
+var u=document,l=u.createTextNode.bind(u)
+function d(n,t,e){n.style.setProperty(t,e)}function f(n,t){return n.appendChild(t)}function p(n,t,e,r){var i=u.createElement("span")
+return t&&(i.className=t),e&&(!r&&i.setAttribute("data-"+t,e),i.textContent=e),n&&f(n,i)||i}function h(n,t){return n.getAttribute("data-"+t)}function m(n,t){return n&&0!=n.length?n.nodeName?[n]:[].slice.call(n[0].nodeName?n:(t||u).querySelectorAll(n)):[]}function o(n){for(var t=[];n--;)t[n]=[]
+return t}function g(n,t){n&&n.some(t)}function c(t){return function(n){return t[n]}}var a={}
+function n(n,t,e,r){return{by:n,depends:t,key:e,split:r}}function e(n){return function t(e,n,r){var i=r.indexOf(e)
+if(-1==i)r.unshift(e),g(a[e].depends,function(n){t(n,e,r)})
+else{var u=r.indexOf(n)
+r.splice(i,1),r.splice(u,0,e)}return r}(n,0,[]).map(c(a))}function t(n){a[n.by]=n}function v(n,r,i,u,o){n.normalize()
+var c=[],a=document.createDocumentFragment()
+u&&c.push(n.previousSibling)
+var s=[]
+return m(n.childNodes).some(function(n){if(!n.tagName||n.hasChildNodes()){if(n.childNodes&&n.childNodes.length)return s.push(n),void c.push.apply(c,v(n,r,i,u,o))
+var t=n.wholeText||"",e=t.trim()
+e.length&&(" "===t[0]&&s.push(l(" ")),g(e.split(i),function(n,t){t&&o&&s.push(p(a,"whitespace"," ",o))
+var e=p(a,r,n)
+c.push(e),s.push(e)})," "===t[t.length-1]&&s.push(l(" ")))}else s.push(n)}),g(s,function(n){f(a,n)}),n.innerHTML="",f(n,a),c}var s=0
+var i="words",r=n(i,s,"word",function(n){return v(n,"word",/\s+/,0,1)}),y="chars",w=n(y,[i],"char",function(n,e,t){var r=[]
+return g(t[i],function(n,t){r.push.apply(r,v(n,"char","",e.whitespace&&t))}),r})
+function b(t){var f=(t=t||{}).key
+return m(t.target||"[data-splitting]").map(function(a){var s=a["🍌"]
+if(!t.force&&s)return s
+s=a["🍌"]={el:a}
+var n=e(t.by||h(a,"splitting")||y),l=function(n,t){for(var e in t)n[e]=t[e]
+return n}({},t)
+return g(n,function(n){if(n.split){var t=n.by,e=(f?"-"+f:"")+n.key,r=n.split(a,l,s)
+e&&(i=a,c=(o="--"+e)+"-index",g(u=r,function(n,t){Array.isArray(n)?g(n,function(n){d(n,c,t)}):d(n,c,t)}),d(i,o+"-total",u.length)),s[t]=r,a.classList.add(t)}var i,u,o,c}),a.classList.add("splitting"),s})}function N(n,t,e){var r=m(t.matching||n.children,n),i={}
+return g(r,function(n){var t=Math.round(n[e]);(i[t]||(i[t]=[])).push(n)}),Object.keys(i).map(Number).sort(x).map(c(i))}function x(n,t){return n-t}b.html=function(n){var t=(n=n||{}).target=p()
+return t.innerHTML=n.content,b(n),t.outerHTML},b.add=t
+var T=n("lines",[i],"line",function(n,t,e){return N(n,{matching:e[i]},"offsetTop")}),L=n("items",s,"item",function(n,t){return m(t.matching||n.children,n)}),k=n("rows",s,"row",function(n,t){return N(n,t,"offsetTop")}),A=n("cols",s,"col",function(n,t){return N(n,t,"offsetLeft")}),C=n("grid",["rows","cols"]),M="layout",S=n(M,s,s,function(n,t){var e=t.rows=+(t.rows||h(n,"rows")||1),r=t.columns=+(t.columns||h(n,"columns")||1)
+if(t.image=t.image||h(n,"image")||n.currentSrc||n.src,t.image){var i=m("img",n)[0]
+t.image=i&&(i.currentSrc||i.src)}t.image&&d(n,"background-image","url("+t.image+")")
+for(var u=e*r,o=[],c=p(s,"cell-grid");u--;){var a=p(c,"cell")
+p(a,"cell-inner"),o.push(a)}return f(n,c),o}),H=n("cellRows",[M],"row",function(n,t,e){var r=t.rows,i=o(r)
+return g(e[M],function(n,t,e){i[Math.floor(t/(e.length/r))].push(n)}),i}),O=n("cellColumns",[M],"col",function(n,t,e){var r=t.columns,i=o(r)
+return g(e[M],function(n,t){i[t%r].push(n)}),i}),j=n("cells",["cellRows","cellColumns"],"cell",function(n,t,e){return e[M]})
+return t(r),t(w),t(T),t(L),t(k),t(A),t(C),t(S),t(H),t(O),t(j),b})

+ 75 - 70
src/components/ChartCard.vue

@@ -7,7 +7,12 @@
           <slot name="action"></slot>
         </span>
       </div>
-      <div class="total"><span>{{ total }}</span></div>
+      <div class="total" style="display: flex; justify-content: space-between">
+        <span>{{ total }}</span>
+        <span>
+          <slot name="percentage"></slot>
+        </span>
+      </div>
     </div>
     <div class="chart-card-content">
       <div class="content-fix">
@@ -23,89 +28,89 @@
 </template>
 
 <script>
-  export default {
-    name: "ChartCard",
-    props: {
-      title: {
-        type: String,
-        default: ''
-      },
-      total: {
-        type: String,
-        default: ''
-      },
-      loading: {
-        type: Boolean,
-        default: false
-      }
-    }
-  }
+export default {
+  name: 'ChartCard',
+  props: {
+    title: {
+      type: String,
+      default: '',
+    },
+    total: {
+      type: String,
+      default: '',
+    },
+    loading: {
+      type: Boolean,
+      default: false,
+    },
+  },
+}
 </script>
 
 <style lang="scss" scoped>
-  .chart-card-header {
+.chart-card-header {
+  position: relative;
+  overflow: hidden;
+  width: 100%;
+
+  .meta {
     position: relative;
     overflow: hidden;
     width: 100%;
-
-    .meta {
-      position: relative;
-      overflow: hidden;
-      width: 100%;
-      color: rgba(0, 0, 0, .45);
-      font-size: 14px;
-      line-height: 22px;
-    }
+    color: rgba(0, 0, 0, 0.45);
+    font-size: 14px;
+    line-height: 22px;
   }
+}
 
-  .chart-card-action {
-    cursor: pointer;
-    position: absolute;
-    top: 0;
-    right: 0;
-  }
-
-  .chart-card-footer {
-    border-top: 1px solid #e8e8e8;
-    padding-top: 9px;
-    margin-top: 8px;
+.chart-card-action {
+  cursor: pointer;
+  position: absolute;
+  top: 0;
+  right: 0;
+}
 
-    > * {
-      position: relative;
-    }
-
-    .field {
-      white-space: nowrap;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      margin: 0;
-    }
-  }
+.chart-card-footer {
+  border-top: 1px solid #e8e8e8;
+  padding-top: 9px;
+  margin-top: 8px;
 
-  .chart-card-content {
-    margin-bottom: 12px;
+  > * {
     position: relative;
-    height: 46px;
-    width: 100%;
-
-    .content-fix {
-      position: absolute;
-      left: 0;
-      bottom: 0;
-      width: 100%;
-    }
   }
 
-  .total {
+  .field {
+    white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
-    word-break: break-all;
-    white-space: nowrap;
-    color: #000;
-    margin-top: 4px;
-    margin-bottom: 0;
-    font-size: 30px;
-    line-height: 38px;
-    height: 38px;
+    margin: 0;
+  }
+}
+
+.chart-card-content {
+  margin-bottom: 12px;
+  position: relative;
+  height: 46px;
+  width: 100%;
+
+  .content-fix {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 100%;
   }
+}
+
+.total {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  word-break: break-all;
+  white-space: nowrap;
+  color: #000;
+  margin-top: 4px;
+  margin-bottom: 0;
+  font-size: 30px;
+  line-height: 38px;
+  height: 38px;
+}
 </style>

+ 12 - 4
src/components/layouts/UserLayout.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="userLayout" :class="['user-layout-wrapper', device]">
-    <div class="container">
-      <div class="top" style="margin-bottom:30px">
+    <div class="container"  v-if="showTitle">
+      <div class="top" style="margin-bottom: 30px" >
         <div class="header">
           <a href="/">
             <img src="~@/assets/logo.png" class="logo" alt="logo" style="height: 50px" />
@@ -24,6 +24,7 @@
         <div class="copyright">Copyright &copy; 2019 上海有腾</div>
       </div>
     </div>
+    <route-view v-else></route-view>
   </div>
 </template>
 
@@ -36,14 +37,21 @@ export default {
   components: { RouteView },
   mixins: [mixinDevice],
   data() {
-    return {}
+    return {
+      showTitle: true,
+    }
   },
   mounted() {
     document.body.classList.add('userLayout')
+    if (this.$route.path == '/user/new-batch'||this.$route.path=='/user/lookPreview') {
+      this.showTitle = false
+    } else {
+      this.showTitle = true
+    }
   },
   beforeDestroy() {
     document.body.classList.remove('userLayout')
-  }
+  },
 }
 </script>
 

+ 1 - 1
src/components/uploadFile.vue

@@ -24,7 +24,7 @@
       </div>
     </a-upload>
     <div style="color: red" v-if="sizeCheck">
-      {{ uploadType == 'image' ? '请上传jpg格式的图片,并且大小在2m之内' : '请上传mp4格式,大小在100m之内' }}
+      {{ uploadType == 'image' ? '请上传jpg格式的图片,并且大小在2m之内' : '请上传mp4格式,大小在'+(size/1024)+'m之内' }}
     </div>
     <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
       <img alt="example" style="width: 100%" :src="previewImage" v-if="uploadType == 'image'" />

+ 348 - 0
src/components/uploadFileMd5Push.vue

@@ -0,0 +1,348 @@
+<style>
+</style>
+<style lang="scss">
+.md5-file {
+  width: 100%;
+  height: 100%;
+}
+.md5-file .ant-upload-picture-card-wrapper {
+  height: 100% !important;
+}
+.md5-file .ant-upload.ant-upload-select-picture-card {
+  height: 100% !important;
+  width: 100%;
+}
+
+</style>
+<template>
+  <div class="upload-file md5-file">
+    <a-upload
+      name="file"
+      :multiple="multiple"
+      list-type="picture-card"
+      class="avatar-uploader"
+      action="https://media-1301855440.cos.ap-chongqing.myqcloud.com/"
+      :before-upload="beforeUpload"
+      @change="handleChange"
+      :accept="uploadType + '/' + (uploadType == 'image' ? 'jpeg,image/jpg' : 'mp4')"
+      :file-list="fileList"
+      :remove="removeFile"
+      @preview="handlePreview"
+      :disabled="loadingElse || disabled"
+    >
+      <div v-if="fileList.length < fileCount || fileList.length < 1">
+        <a-progress v-if="loadingElse" :percent="percent" :show-info="false" />
+        <div>点击上传</div>
+      </div>
+    </a-upload>
+    <!-- <div style="color: red" v-if="sizeCheck">
+      {{ uploadType == 'image' ? '请上传jpg格式的图片,并且大小在2m之内' : '请上传mp4格式,大小在100m之内' }}
+    </div> -->
+    <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+      <img alt="example" style="width: 100%" :src="previewImage" v-if="uploadType == 'image'" />
+      <video :src="previewImage" v-else style="width: 100%" controls="controls">您的浏览器不支持 video 标签。</video>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+import { mapGetters } from 'vuex'
+import moment from 'moment'
+
+import BMF from 'browser-md5-file'
+
+import qs from 'qs'
+var COS = require('cos-js-sdk-v5')
+var cos = new COS({
+  SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
+  SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9',
+})
+var i = 0
+const oneKB = 1024
+
+function getBase64(file) {
+  return new Promise((resolve, reject) => {
+    const reader = new FileReader()
+    reader.readAsDataURL(file)
+    reader.onload = () => resolve(reader.result)
+    reader.onerror = (error) => reject(error)
+  })
+}
+export default {
+  name: 'upload-file',
+  components: {},
+  props: {
+    uploadType: {
+      //上传类型  值为  image/video,同时目录名称也是这样
+      type: String,
+      default() {
+        return 'image'
+      },
+    },
+    multiple: {
+      // true 可以批量上传  false 不可以
+      type: Boolean,
+      default() {
+        return true
+      },
+    },
+    fileCount: {
+      //最大上传数量
+      type: Number,
+      default() {
+        return 10
+      },
+    },
+    checkFile: {
+      //返回promise方法,判读文件是否上传过,进行上传拦截
+      type: Function,
+      default() {
+        return Promise.resolve()
+      },
+    },
+    disabled: {
+      type: Boolean,
+      default() {
+        return false
+      },
+    },
+    value: {
+      required: true,
+      default() {
+        return ''
+      },
+    },
+    size: {
+      type: Number,
+      default() {
+        if (this.sizeCheck) {
+          if (this.uploadType == 'image') {
+            return 2048
+          } else {
+            return 102400
+          }
+        }
+      },
+    },
+    sizeCheck: {
+      type: Boolean,
+      default() {
+        return true
+      },
+    },
+    onOversize: {
+      type: Function,
+      default() {
+        alert(`请选择${this.size}KB内的文件!`)
+      },
+    },
+  },
+  data() {
+    return {
+      fileList: [],
+      loadingElse: false,
+      imageUrl: '',
+      percent: 0,
+      previewVisible: false,
+      previewImage: '',
+      md5: '',
+      accountId: '',
+    }
+  },
+  filters: {},
+  computed: {},
+  mounted() {},
+  watch: {
+    //    fileListAll
+    // value: {
+    //   immediate: true,
+    //   handler(n, o) {
+    //     this.$nextTick(() => {
+    //       if (this.fileList && this.fileList.length == 0) {
+    //         if (typeof n == 'object') {
+    //           this.fileList = n.map((item, index) => {
+    //             return {
+    //               uid: index + 1,
+    //               name: index + 1,
+    //               status: 'done',
+    //               url: item,
+    //             }
+    //           })
+    //         } else {
+    //           if (n == '') {
+    //             this.fileList = []
+    //           } else {
+    //             this.fileList = [
+    //               {
+    //                 uid: 1,
+    //                 name: 1,
+    //                 status: 'done',
+    //                 url: n,
+    //               },
+    //             ]
+    //           }
+    //         }
+    //       } else {
+    //         if (n.length == 0 || n == '') {
+    //           this.clearAll()
+    //         }
+    //       }
+    //     })
+    //   },
+    //   deep: true,
+    // },
+  },
+  methods: {
+    handleCancel() {
+      closeAllVideoFun()
+      this.previewVisible = false
+    },
+    handleChange(info) {
+      if (info.file.status === 'uploading') {
+        this.loading = true
+        return
+      }
+      if (info.file.status === 'done') {
+        // Get this url from response in real world.
+        getBase64(info.file.originFileObj, (imageUrl) => {
+          this.imageUrl = imageUrl
+          this.loading = false
+        })
+      }
+    },
+    removeFile(file) {
+      // console.log(file)
+      var index = this.fileList.findIndex((v) => v.uid === file.uid)
+      this.fileList.splice(index, 1)
+      this.$emit('removeUpload', file)
+    },
+    async handlePreview(file) {
+      if (!file.url && !file.preview) {
+        file.preview = await getBase64(file.originFileObj)
+      }
+      this.previewImage = file.url || file.preview
+      this.previewVisible = true
+    },
+    beforeUpload(file) {
+      this.percent = 0
+      this.loadingElse = true
+      const fileOvesize = file.size > this.size * oneKB
+      // console.log(fileOvesize)
+      if (fileOvesize && this.sizeCheck) {
+        this.onOversize()
+        this.loadingElse = false
+        return
+      } else {
+        this.checkFile(file)
+          .then((res) => {
+            this.md5 = res.md5
+            this.accountId = res.accountId
+            this.cosUpload(file)
+          })
+          .catch(() => {
+            this.loadingElse = false
+          })
+        return new Promise(function (resolve, reject) {
+          reject()
+        })
+      }
+    },
+    clearAll() {
+      this.fileList = []
+    },
+    cosUpload(file) {
+      var that = this
+      let date = new Date()
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      var timeElse = new Date().getTime()
+      var arr = file.name.split('.')
+
+      var str = ''
+      for (let i = 0; i < arr.length; i++) {
+        if (i == arr.length - 1) {
+        } else {
+          if (i == arr.length - 2) {
+            str += arr[i]
+          } else {
+            str += arr[i] + '.'
+          }
+        }
+      }
+      // console.log(str + '-' + timeElse + '.' + arr[arr.length - 1])
+      cos.putObject(
+        {
+          Bucket: 'media-1301855440',
+          /* 必须 */
+          Region: 'ap-chongqing',
+          /* 存储桶所在地域,必须字段 */
+          Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
+          /* 必须 */
+          StorageClass: 'STANDARD',
+          Body: file, // 上传文件对象
+          onProgress: function (progressData) {
+            //进度条方法
+
+            that.percent = progressData.percent * 100
+          },
+          onTaskReady: function (tid) {
+            // console.log('onTaskReady', tid);
+          },
+          onTaskStart: function (info) {
+            //开始上传
+            // console.log('onTaskStart', info);
+          },
+        },
+        function (err, data) {
+          if (err) {
+            that.loadingElse = false
+            that.$message.error('上传失败!!!' + err)
+            return
+          }
+          // alert('成功')
+          that.loadingElse = false
+          if (that.fileList.length < that.fileCount) {
+            that.fileList.push({
+              uid: file.name,
+              name: file.name,
+              status: 'done',
+              url: '//' + data.Location,
+            })
+
+            // that.$emit('overUpload', that.fileList.map(item => {
+            //                 return item.url
+            //               }))
+            that.$emit('overUpload', that.fileList)
+
+            if (that.multiple) {
+              that.$emit(
+                'update:value',
+                that.fileList.map((item) => {
+                  return item.url
+                })
+              )
+            } else {
+              that.$emit(
+                'update:value',
+                that.fileList.map((item) => {
+                  return { url: item.url, signature: that.md5 }
+                })[0]
+              )
+             
+            }
+          } else {
+            that.$message.error('上传已达上限' + that.fileCount + '张')
+          }
+        }
+      )
+    },
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 13 - 3
src/config/router.config.js

@@ -1,4 +1,4 @@
-import {UserLayout, TabLayout, RouteView, BlankLayout, PageView} from '@/components/layouts'
+import { UserLayout, TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'
 
 /**
  * 走菜单,走权限控制
@@ -10,7 +10,7 @@ export const asyncRouterMap = [
     path: '/',
     name: 'dashboard',
     component: TabLayout,
-    meta: {title: '首页'},
+    meta: { title: '首页' },
     redirect: '/dashboard/workplace',
     children: []
   },
@@ -65,6 +65,16 @@ export const constantRouterMap = [
         name: 'FStransfer',
         component: () => import(/* webpackChunkName: "fail" */ '@/views/user/FStransfer')
       },
+      {
+        path: 'new-batch',
+        name: 'newBatch',
+        component: () => import(/* webpackChunkName: "fail" */ '@/views/modules/kuaishouapp/newBatch')
+      },
+      {
+        path: 'lookPreview',
+        name: 'lookPreview',
+        component: () => import(/* webpackChunkName: "fail" */ '@/views/modules/kuaishouapp/newBatch/lookPreview')
+      }
     ]
   },
 
@@ -90,5 +100,5 @@ export const constantRouterMap = [
     name: 'errorPage',
     component: () => import(/* webpackChunkName: "fail" */ '@/views/errorPage')
   },
-  
+
 ]

+ 72 - 2
src/filters.js

@@ -81,9 +81,9 @@ const filters = {
         var data = {
             null: '-',
             1: 'CPM',
-            2: 'CPC',
+            2: '封面点击(CPC)',
             6: 'OCPC',
-            10: 'OCPM',
+            10: '转化(OCPM)',
         }
         return data[sta]
     },
@@ -104,6 +104,12 @@ const filters = {
             383: '授信',
             384: '完件',
             394: '订单提交',
+            324: '唤起应用',
+            715: '微信复制优化目标',
+            716: '多转化事件',
+            396:'注册优化目标',
+            731:'广告观看5次',
+            732:'广告观看10次',
         }
         return data[sta]
     },
@@ -256,6 +262,70 @@ const filters = {
 
         return data[val]
     },
+    //快手年龄
+    kuaishouAge(val) {
+        var data = {
+            18: '18-23岁',//'等于',
+            24: '24-30岁',//不等于,
+            31: '31-40岁',//大于
+            41: '41-49岁',//小于
+            50: '50+',//大于等于
+        }
+
+        return data[val]
+    },
+    //快手手机价格
+    kuaishouPrice(val) {
+        var data = {
+            1: '1500以下',
+            2: '1501~2000',
+            3: '2001~2500',
+            4: '2501~3000',
+            5: '3001~3500',
+            6: '3501~4000',
+            7: '4001~4500',
+            8: '4501~5000',
+            9: '5001~5500',
+            10: '5500以上',
+        }
+
+        return data[val]
+    },
+    //快手过滤以转化用户
+    kuaishouFilterConvertedLevel(val) {
+        var data = {
+            0: '不限',
+            1: '广告组',
+            2: '广告计划',
+            3: '本账户',
+            4: '公司主体',
+            5: 'APP'
+        }
+
+        return data[val]
+    },
+    //场景广告位
+    kuaishouSceneId(val) {
+        var data = {
+            1: '优选广告位',
+            3: '视频播放页广告',
+            6: '上下滑大屏广告',
+            7: '信息流广告',
+            5: "联盟广告"
+        }
+
+        return data[val]
+    },
+    platform(str) {
+        var data = {
+            1: 'Android应用下载',
+            2: 'Android网页游戏',
+            3: 'iOS应用下载',
+            4: 'iOS网页游戏'
+        }
+        return data[str]
+    }
+
 }
 
 // 获取当前月的第一天

+ 16 - 12
src/permission.js

@@ -4,44 +4,48 @@ import store from './store'
 import NProgress from 'nprogress' // progress bar
 import 'nprogress/nprogress.css' // progress bar style
 import notification from 'ant-design-vue/es/notification'
-import {ACCESS_TOKEN} from '@/store/mutation-types'
-import {generateIndexRouter} from "@/utils/util"
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { generateIndexRouter } from "@/utils/util"
 
-NProgress.configure({showSpinner: false}) // NProgress Configuration
+NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 
-const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration','/user/transfer-local','/errorPage','http://192.168.0.111:8088/jeecg-boot/sys/feishu/url','/user/FStransfer'] // no redirect whitelist
+const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration', '/user/transfer-local', '/errorPage', '/user/new-batch', '/user/lookPreview', 'http://192.168.0.111:8088/jeecg-boot/sys/feishu/url', '/user/FStransfer'] // no redirect whitelist
 
 router.beforeEach((to, from, next) => {
   NProgress.start() // start progress bar
-
+  //if (whiteList.indexOf(to.path) !== -1) {
+    // 在免登录白名单,直接进入
+   // next()
+ //}
   if (Vue.ls.get(ACCESS_TOKEN)) {
     /* has token */
+
     if (to.path === '/user/login') {
-      next({path: '/dashboard/workplace'})
+      next({ path: '/dashboard/workplace' })
       NProgress.done()
     } else {
       if (store.getters.permissionList.length === 0) {
         store.dispatch('GetPermissionList').then(res => {
           const menuData = res.result.menu;
-          localStorage.setItem("roleCode",res.result.roleCode)
+          localStorage.setItem("roleCode", res.result.roleCode)
           if (menuData === null || menuData === "" || menuData === undefined) {
             return;
           }
           let constRoutes = [];
           constRoutes = generateIndexRouter(menuData);
           // 添加主界面路由
-          store.dispatch('UpdateAppRouter', {constRoutes}).then(() => {
+          store.dispatch('UpdateAppRouter', { constRoutes }).then(() => {
             // 根据roles权限生成可访问的路由表
             // 动态添加可访问路由表
             router.addRoutes(store.getters.addRouters)
             const redirect = decodeURIComponent(from.query.redirect || to.path)
             if (to.path === redirect) {
               // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
-              next({...to, replace: true})
+              next({ ...to, replace: true })
             } else {
               // 跳转到目的路由
-              next({path: redirect})
+              next({ path: redirect })
             }
           })
         })
@@ -51,7 +55,7 @@ router.beforeEach((to, from, next) => {
                description: '请求用户信息失败,请重试!'
              })*/
             store.dispatch('Logout').then(() => {
-              next({path: '/user/login', query: {redirect: to.fullPath}})
+              next({ path: '/user/login', query: { redirect: to.fullPath } })
             })
           })
       } else {
@@ -63,7 +67,7 @@ router.beforeEach((to, from, next) => {
       // 在免登录白名单,直接进入
       next()
     } else {
-      next({path: '/user/login', query: {redirect: to.fullPath}})
+      next({ path: '/user/login', query: { redirect: to.fullPath } })
       NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
     }
   }

+ 1 - 0
src/utils/request.js

@@ -9,6 +9,7 @@ const key = "1"
 
 if (process.env.NODE_ENV == 'development') { 
     axios.defaults.baseURL = '/jeecg-boot'
+    
 } 
 else if (process.env.NODE_ENV == 'debug') { 
 } 

+ 7 - 6
src/views/dashboard/Analysis.vue

@@ -247,17 +247,18 @@
               <div class="updateBox">
                 <h3 class="textTitle">1.新功能上线</h3>
                 <ul class="updatelist">
-                  <li><span class="circular"></span>素材下单制-流程节点发通知给相关人员;</li>
-                  <li><span class="circular"></span>素材下单制-封面图片支持点击查看大图;</li>
-                  <li><span class="circular"></span>批量工具-定时获取最新行动号召按钮;</li>
+                  <li><span class="circular"></span>组织架构;增加汇报上级、部门领导</li>
+                  <li><span class="circular"></span>自动投放账户配置回显问题;</li>
+                  <li><span class="circular"></span>批量创建-销售线索优化;</li>
+                  <li><span class="circular"></span>优化快手素材报表接口查询效率;</li>
                 </ul>
               </div>
-              <div class="updateBox">
+              <!-- <div class="updateBox">
                 <h3 class="textTitle">2.功能优化:</h3>
                 <ul>
                   <li><span class="circular"></span>修复了相关BUG;</li>
                 </ul>
-              </div>
+              </div> -->
 
             </div>
         </div>
@@ -333,7 +334,7 @@
         indicator: <a-icon type="loading" style="font-size: 24px" spin />,
         roleCode: localStorage.getItem('roleCode'),
         visible:false,//更新通知消息提示框
-        updateTime:['2021-01-27'],
+        updateTime:['2021-03-03'],
         versionId:0,//存储版本号 判断通知什么时候显示
       }
     },

+ 1 - 1
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -1675,7 +1675,7 @@ export default {
 
     }
     
-    .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

+ 1 - 1
src/views/modules/BatchCreate/newCreate.vue

@@ -825,7 +825,7 @@
 }
 
   .ant-tooltip-inner,
-  .ant-tooltip,
+
   .ant-tooltip-arrow::before {
     background-color: #fff;
     color: #333;

+ 1 - 1
src/views/modules/BatchCreate/newDirectedPackage.vue

@@ -362,7 +362,7 @@
             }
         }
     }
-    .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #666;
         font-size: 12px;

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

@@ -1335,7 +1335,6 @@ export default {
 
 
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

+ 0 - 1
src/views/modules/LaunchHousekeeper/newProject.vue

@@ -547,7 +547,6 @@ export default {
 
 
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

+ 0 - 1
src/views/modules/LaunchHousekeeper/setProjectBudget.vue

@@ -555,7 +555,6 @@ export default {
 
 
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

+ 0 - 1
src/views/modules/LaunchHousekeeper/setProjectConvert.vue

@@ -585,7 +585,6 @@ export default {
 
 
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

+ 0 - 1
src/views/modules/LaunchHousekeeper/setProjectCreate.vue

@@ -1292,7 +1292,6 @@ let MonitoringTypeColumns=[
 }
 
   .ant-tooltip-inner,
-  .ant-tooltip,
   .ant-tooltip-arrow::before {
     background-color: #fff;
     color: #333;

+ 0 - 1
src/views/modules/LaunchHousekeeper/setProjectDirectional.vue

@@ -857,7 +857,6 @@ export default {
 
 
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

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

@@ -1094,6 +1094,7 @@ export default {
     //请求table的数据
     tableHttp(params){
       this.loading=true;
+      this.tableData=[]
           postAction('/ctop/kuaishou/dailyPage/report/list', {
               mediaId:this.mediaId,
               discount:this.discount,
@@ -1423,7 +1424,7 @@ export default {
 }
 </script>
 <style lang="scss">
-     .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+     .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

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

@@ -1249,6 +1249,7 @@ export default {
     })
   },
   beforeDestroy() {
+    
     let arr = JSON.stringify(this.columns)
     postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
       json: arr,
@@ -1349,7 +1350,7 @@ export default {
 }
 </script>
 <style lang="scss">
-     .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+     .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

+ 8 - 0
src/views/modules/Statistics/components/Treeselect.vue

@@ -19,6 +19,7 @@
       @input="emitValue"
       :limit="limit"
       :default-options="true"
+      :disabled="disabled"
       :limitText="
         (count) => {
           return '隐藏' + count + '条'
@@ -90,6 +91,12 @@ export default {
         return 2
       },
     },
+    disabled:{
+      type: Boolean,
+      default() {
+        return false
+      },
+    }
   },
   components: {
     Treeselect,
@@ -110,6 +117,7 @@ export default {
         }
       },
       deep: true,
+      immediate:true
     },
   },
   methods: {

+ 19 - 4
src/views/modules/Statistics/components/ratioModal.vue

@@ -5,7 +5,7 @@ th div {
 </style>
 <template>
   <div class="data-display-statistics">
-    <a-modal title="环比展示" v-model="visible" @ok="handleOk" width="90%">
+    <a-modal title="环比展示" v-model="visible" @ok="handleOk" width="90%" :footer='null'>
       <div v-if="url">
         <video class="video" :src="url" controls="controls" style="height:200px;" v-show="showVideo">
           您的浏览器不支持 video 标签。
@@ -42,6 +42,10 @@ th div {
             <span v-if="record.statDate == '环比'">{{ conversionPrice | getBo }}</span>
             <span v-else>{{ conversionPrice | toFixtwo }}</span>
           </span>
+           <span slot="play3sRate" slot-scope="play3sRate,record">
+             <span v-if="record.statDate == '环比'">{{ play3sRate }}</span>
+            <span v-else>{{ play3sRate | getBo }}</span>
+           </span>
         </a-table>
       </a-card>
     </a-modal>
@@ -145,7 +149,15 @@ const columnsDetail = [
     key: 'conversionPrice',
     scopedSlots: { customRender: 'conversionPrice' },
     align: 'center'
-  }
+  },
+  {
+    title: '3s播放率',
+    dataIndex: 'play3sRate',
+    key: 'play3sRate',
+    scopedSlots: { customRender: 'play3sRate' },
+    align: 'center',
+    
+  },
 ]
 export default {
   name: 'ration-modal',
@@ -227,7 +239,8 @@ export default {
               conversionPrice: res.result.chainRatio.conversionPriceProportion,
               actionRatio: res.result.chainRatio.actionRatioProportion,
               actionCost: res.result.chainRatio.actionCostProportion,
-              photoShow: (res.result.chainRatio.showProportion * 100).toFixed(2) + '%'
+              photoShow: (res.result.chainRatio.showProportion * 100).toFixed(2) + '%',
+              play3sRate: (res.result.chainRatio.conversionPlay3sRate * 100).toFixed(2) + '%'
             }
             this.dataDetail.push(now)
             this.dataDetail.push(yesterday)
@@ -240,7 +253,9 @@ export default {
         }
       })
     },
-    handleOk() {}
+    handleOk() {
+      this.visible = true
+    }
   },
   watch: {},
   distoryed() {}

二進制
src/views/modules/Statistics/materialReport/image/1.png


二進制
src/views/modules/Statistics/materialReport/image/2.png


二進制
src/views/modules/Statistics/materialReport/image/3.png


二進制
src/views/modules/Statistics/materialReport/image/4.png


二進制
src/views/modules/Statistics/materialReport/image/5.png


+ 498 - 0
src/views/modules/Statistics/materialReport/marterialDetail.vue

@@ -0,0 +1,498 @@
+<style lang="scss" scoped>
+#office-iframe {
+  height: 800px;
+}
+</style>
+<style>
+.info-detail .ant-descriptions-item-content {
+  font-weight: bold;
+}
+.info-detail .ant-descriptions-item-label {
+  color: darkgray;
+  min-width: 80px;
+}
+.info-detail table tr td {
+  border: 0;
+}
+.show-data span {
+  display: inline-block;
+  width: 85px;
+}
+</style>
+<template>
+  <a-row :gutter="10">
+    <a-spin :spinning="spinning">
+      <a-col :sm="6" style="margin-bottom: 20px; z-index: 10">
+        <a-card class="search-box" style="min-height: 500px" v-if="materialInfo">
+          <video class="video" :src="materialInfo.url" controls="controls" style="width: 100%">
+            您的浏览器不支持 video 标签。
+          </video>
+        </a-card>
+      </a-col>
+      <a-col :sm="18" style="margin-bottom: 20px; z-index: 10">
+        <a-card class="search-box info-detail" style="min-height: 300px" v-if="materialInfo">
+          <a-descriptions title="视频信息">
+            <a-descriptions-item label="素材标题" :span="3"> {{ materialInfo.materialName }} </a-descriptions-item>
+            <a-descriptions-item label="素材ID"> {{ materialInfo.materialId }} </a-descriptions-item>
+            <a-descriptions-item label="上线时间"> {{ materialInfo.createTime.split(' ')[0] }} </a-descriptions-item>
+            <a-descriptions-item label="素材类型">
+              {{ materialInfo.materialType == '' ? '无' : materialInfo.materialType }}
+            </a-descriptions-item>
+            <a-descriptions-item label="视频时长"> {{ materialInfo.second }}s </a-descriptions-item>
+            <a-descriptions-item label="视频大小">
+              {{ materialInfo.size }}
+            </a-descriptions-item>
+            <a-descriptions-item label="视频尺寸">
+              {{ materialInfo.width }}*{{ materialInfo.height }}
+            </a-descriptions-item>
+            <a-descriptions-item label="投放媒体">
+              {{ materialInfo.madia }}
+            </a-descriptions-item>
+            <a-descriptions-item label="素材渠道">
+              {{ materialInfo.channelType }}
+            </a-descriptions-item>
+            <a-descriptions-item label="供应商">
+              {{ materialInfo.supplier }}
+            </a-descriptions-item>
+            <a-descriptions-item label="关联项目">
+              {{ materialInfo.projectName }}
+            </a-descriptions-item>
+            <a-descriptions-item label="唯一编码" :span="2">
+              {{ materialInfo.code }}
+            </a-descriptions-item>
+
+            <a-descriptions-item label="设计组长" :span="3" style="margin-top: 10px">
+              {{ materialInfo.leaderName }}
+            </a-descriptions-item>
+            <a-descriptions-item label="编导">
+              {{ materialInfo.planName == '' ? '无' : materialInfo.planName }}
+            </a-descriptions-item>
+            <a-descriptions-item label="拍摄">
+              {{ materialInfo.shotName == '' ? '无' : materialInfo.shotName }}
+            </a-descriptions-item>
+            <a-descriptions-item label="剪辑">
+              {{ materialInfo.clipName == '' ? '无' : materialInfo.clipName }}
+            </a-descriptions-item>
+          </a-descriptions>
+        </a-card>
+        <a-card
+          class="search-box"
+          style="min-height: 300px; margin: 20px 0"
+          title="数据概览"
+          v-if="dataView && $route.query.mediaId == 2"
+        >
+          <a-row :gutter="15">
+            <a-col :xl="6" class="show-data">
+              <h3>素材消耗</h3>
+              <p
+                :style="{ color: dataView.charge[0].charge > dataView.charge[2].charge ? '#F66C6D' : '#67C239' }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.charge[0].charge | decimalsHandle }}
+              </p>
+              <p><span>项目top</span>{{ dataView.charge[1].charge | decimalsHandle }}</p>
+              <p><span>数据库均值</span>{{ dataView.charge[2].charge | decimalsHandle }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>封面曝光数</h3>
+              <p
+                :style="{
+                  color: dataView.photoShow[0].photoShow > dataView.photoShow[2].photoShow ? '#F66C6D' : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.photoShow[0].photoShow }}
+              </p>
+              <p><span>项目top</span>{{ dataView.photoShow[1].photoShow }}</p>
+              <p><span>数据库均值</span>{{ dataView.photoShow[2].photoShow }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>封面点击数</h3>
+              <p
+                :style="{
+                  color: dataView.photoClick[0].photoClick > dataView.photoClick[2].photoClick ? '#F66C6D' : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.photoClick[0].photoClick }}
+              </p>
+              <p><span>项目top</span>{{ dataView.photoClick[1].photoClick }}</p>
+              <p><span>数据库均值</span>{{ dataView.photoClick[2].photoClick }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>素材曝光数</h3>
+              <p
+                :style="{ color: dataView.aclick[0].aclick > dataView.aclick[2].aclick ? '#F66C6D' : '#67C239' }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.aclick[0].aclick }}
+              </p>
+              <p><span>项目top</span>{{ dataView.aclick[1].aclick }}</p>
+              <p><span>数据库均值</span>{{ dataView.aclick[2].aclick }}</p>
+            </a-col>
+          </a-row>
+          <a-row :gutter="15" style="margin-top: 20px">
+            <a-col :xl="6" class="show-data">
+              <h3>行为数</h3>
+              <p
+                :style="{ color: dataView.bclick[0].bclick > dataView.bclick[2].bclick ? '#F66C6D' : '#67C239' }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.bclick[0].bclick }}
+              </p>
+              <p><span>项目top</span>{{ dataView.bclick[1].bclick }}</p>
+              <p><span>数据库均值</span>{{ dataView.bclick[2].bclick }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>激活数</h3>
+              <p
+                :style="{
+                  color: dataView.activation[0].activation > dataView.activation[2].activation ? '#F66C6D' : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.activation[0].activation }}
+              </p>
+              <p><span>项目top</span>{{ dataView.activation[1].activation }}</p>
+              <p><span>数据库均值</span>{{ dataView.activation[2].activation }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>3s播放率</h3>
+              <p
+                :style="{
+                  color: dataView.play3sRate[0].play3sRate > dataView.play3sRate[2].play3sRate ? '#F66C6D' : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ (dataView.play3sRate[0].play3sRate * 100).toFixed(2) + '%' }}
+              </p>
+              <p><span>项目top</span>{{ (dataView.play3sRate[1].play3sRate * 100).toFixed(2) + '%' }}</p>
+              <p><span>数据库均值</span>{{ (dataView.play3sRate[2].play3sRate * 100).toFixed(2) + '%' }}</p>
+            </a-col>
+          </a-row>
+        </a-card>
+        <a-card
+          class="search-box"
+          style="min-height: 300px; margin: 20px 0"
+          title="数据概览"
+          v-if="dataView && $route.query.mediaId == 1"
+        >
+          <a-row :gutter="15">
+            <a-col :xl="6" class="show-data">
+              <h3>素材消耗</h3>
+              <p
+                :style="{ color: dataView.cost[0].cost > dataView.cost[2].cost ? '#F66C6D' : '#67C239' }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.cost[0].cost | decimalsHandle }}
+              </p>
+              <p><span>项目top</span>{{ dataView.cost[1].cost | decimalsHandle }}</p>
+              <p><span>数据库均值</span>{{ dataView.cost[2].cost | decimalsHandle }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>点击数</h3>
+              <p
+                :style="{
+                  color: dataView.click[0].click > dataView.click[2].click ? '#F66C6D' : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.click[0].click }}
+              </p>
+              <p><span>项目top</span>{{ dataView.click[1].click }}</p>
+              <p><span>数据库均值</span>{{ dataView.click[2].click }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>曝光数</h3>
+              <p
+                :style="{
+                  color:
+                    dataView.materialShow[0].materialShow > dataView.materialShow[2].materialShow
+                      ? '#F66C6D'
+                      : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.materialShow[0].materialShow }}
+              </p>
+              <p><span>项目top</span>{{ dataView.materialShow[1].materialShow }}</p>
+              <p><span>数据库均值</span>{{ dataView.materialShow[2].materialShow }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>完播率</h3>
+              <p
+                :style="{
+                  color:
+                    dataView.play100Rate[0].play100Rate > dataView.play100Rate[2].play100Rate ? '#F66C6D' : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ (dataView.play100Rate[0].play100Rate * 100).toFixed(2) + '%' }}
+              </p>
+              <p><span>项目top</span>{{ (dataView.play100Rate[1].play100Rate * 100).toFixed(2) + '%' }}</p>
+              <p><span>数据库均值</span>{{ (dataView.play100Rate[2].play100Rate * 100).toFixed(2) + '%' }}</p>
+            </a-col>
+          </a-row>
+          <a-row :gutter="15" style="margin-top: 20px">
+            <a-col :xl="6" class="show-data">
+              <h3>点赞数</h3>
+              <p
+                :style="{
+                  color:
+                    dataView.likeMaterial[0].likeMaterial > dataView.likeMaterial[2].likeMaterial
+                      ? '#F66C6D'
+                      : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.likeMaterial[0].likeMaterial }}
+              </p>
+              <p><span>项目top</span>{{ dataView.likeMaterial[1].likeMaterial }}</p>
+              <p><span>数据库均值</span>{{ dataView.likeMaterial[2].likeMaterial }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>评论数</h3>
+              <p
+                :style="{
+                  color:
+                    dataView.commentMaterial[0].commentMaterial > dataView.commentMaterial[2].commentMaterial
+                      ? '#F66C6D'
+                      : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.commentMaterial[0].commentMaterial }}
+              </p>
+              <p><span>项目top</span>{{ dataView.commentMaterial[1].commentMaterial }}</p>
+              <p><span>数据库均值</span>{{ dataView.commentMaterial[2].commentMaterial }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>转发数</h3>
+              <p
+                :style="{
+                  color:
+                    dataView.shareMaterial[0].shareMaterial > dataView.shareMaterial[2].shareMaterial
+                      ? '#F66C6D'
+                      : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.shareMaterial[0].shareMaterial }}
+              </p>
+              <p><span>项目top</span>{{ dataView.shareMaterial[1].shareMaterial }}</p>
+              <p><span>数据库均值</span>{{ dataView.shareMaterial[2].shareMaterial }}</p>
+            </a-col>
+            <a-col :xl="6" class="show-data">
+              <h3>关注数</h3>
+              <p
+                :style="{
+                  color: dataView.follow[0].follow > dataView.follow[2].follow ? '#F66C6D' : '#67C239',
+                }"
+                style="font-size: 18px; font-weight: 700"
+              >
+                {{ dataView.follow[0].follow }}
+              </p>
+              <p><span>项目top</span>{{ dataView.follow[1].follow }}</p>
+              <p><span>数据库均值</span>{{ dataView.follow[2].follow }}</p>
+            </a-col>
+          </a-row>
+        </a-card>
+        <a-card class="search-box" style="min-height: 300px" title="数据消耗趋势">
+          <div
+            id="echartCircular"
+            ref="echartCircular"
+            style="height: 350px"
+            :style="{ width: (clientWidth / 24) * 18 - 48 - 24 + 'px' }"
+          ></div
+        ></a-card>
+        <!-- <a-card class="search-box" style="min-height: 300px; margin: 20px 0"> </a-card> -->
+      </a-col>
+    </a-spin>
+  </a-row>
+</template>
+
+<script>
+import { getAction, postAction } from '@/api/manage'
+import moment from 'moment'
+import $ from 'jquery'
+import qs from 'qs'
+import UploadToAli from '@femessage/upload-to-ali'
+import uploadFile from '@/components/uploadFile.vue'
+import { mapActions, mapGetters, mapState } from 'vuex'
+var echarts = require('echarts')
+export default {
+  name: 'online-training-list',
+  data() {
+    return {
+      materialInfo: null,
+      dataView: null,
+      clientWidth: 1920,
+      spinning: false,
+    }
+  },
+  components: {
+    UploadToAli,
+    uploadFile,
+  },
+  methods: {
+    handlerEchartOption(data) {
+      var option = {
+        noDataLoadingOption: {
+          text: '暂无数据',
+          effect: 'bubble',
+          effectOption: {
+            effect: {
+              n: 0,
+            },
+          },
+        },
+        // title: {
+        //     text: '折线图堆叠'
+        // },
+        tooltip: {
+          trigger: 'axis',
+        },
+        // legend: {
+        //     data: ['邮件营销', '联盟广告', ]
+        // },
+        grid: {
+          left: '3%',
+          right: '4%',
+          bottom: '3%',
+          containLabel: true,
+        },
+        legend: {
+          icon: 'circle',
+          top: '5%',
+          right: '5%',
+          itemWidth: 6,
+          itemGap: 20,
+          textStyle: {
+            color: '#556677',
+          },
+        },
+        toolbox: {
+          // feature: {
+          //     saveAsImage: {}
+          // }
+        },
+        xAxis: {
+          type: 'category',
+          data: data.map((item) => {
+            return item.statDate
+          }),
+          boundaryGap: false,
+          // 坐标轴线
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: '#999',
+            },
+          },
+          // 分割线
+          splitLine: {
+            show: true,
+            lineStyle: {
+              type: 'dashed',
+              color: '#e5e5e5',
+            },
+          },
+        },
+        yAxis: {
+          type: 'value',
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: '#999',
+            },
+          },
+          splitLine: {
+            lineStyle: {
+              type: 'dashed',
+              color: '#e5e5e5',
+            },
+          },
+        },
+        series: [
+          {
+            name: '消耗',
+            type: 'line',
+            stack: '总量',
+            data: data.map((item) => {
+              return item.cost.toFixed(3)
+            }),
+            symbol: 'circle',
+            symbolSize: 1,
+            lineStyle: {
+              normal: {
+                width: 2,
+                // color: '#0bcd74'
+              },
+            },
+            itemStyle: {
+              borderColor: '#ffffff',
+              borderWidth: 0,
+            },
+          },
+        ],
+      }
+
+      return option
+    },
+    initEchart(idName, optionName) {
+      var that = this
+      const chart = this.$refs[idName]
+      //   console.log(chart)
+      if (chart) {
+        const myChart = echarts.init(document.getElementById(idName))
+        // myChart.showLoading({
+        //     text: "图表数据正在努力加载..."
+        // });
+
+        myChart.setOption(optionName)
+        window.addEventListener('resize', function () {
+          that.clientWidth = document.documentElement.clientWidth - 224
+          myChart.resize()
+        })
+      }
+    },
+    getMaterialInfo() {
+      this.spinning = true
+      var params = {
+        mediaId: this.$route.query.mediaId,
+        md5: this.$route.query.md5,
+      }
+      var data = []
+      this.postDataAction('/overView/materialDetailInfo', params).then((res) => {
+        if (res.success) {
+          this.materialInfo = res.result
+          
+        }
+      })
+      this.postDataAction('/overView/materialDetailAnalyse', params).then((res) => {
+        if (res.success) {
+          this.dataView = res.result
+           this.spinning = false
+        }
+      })
+      this.postDataAction('/overView/materialDetailChat', params).then((res) => {
+        if (res.success) {
+          this.initEchart('echartCircular', this.handlerEchartOption(res.result))
+          
+        }
+      })
+    },
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.clientWidth = document.documentElement.clientWidth - 224
+      //   this.$route.query.mediaId
+      //   this.$route.query.md5
+      this.getMaterialInfo()
+    })
+  },
+  created() {
+    
+  },
+}
+</script>

+ 680 - 0
src/views/modules/Statistics/materialReport/marterialList.vue

@@ -0,0 +1,680 @@
+<style>
+.materialReport .chart-card-content {
+  display: none !important;
+}
+</style>
+<style scoped>
+.top-ul-style {
+  width: 100%;
+  padding-left: 0;
+}
+.top-ul-style li {
+  height: 100px;
+  border: 1px solid #f2f2f2;
+  margin-bottom: 5px;
+  padding: 10px;
+  display: flex;
+  justify-content: space-between;
+}
+.li-cost {
+  display: flex;
+  flex-flow: column;
+  justify-content: center;
+  align-content: flex-end;
+}
+.li-cost span {
+  font-size: 16px;
+  font-weight: 500;
+  min-width: 50px;
+  text-align: right;
+}
+</style>
+<template>
+  <div class="materialReport">
+    <div class="card-container">
+      <div class="option" style="justify-content: space-between">
+        <div class="option" style="padding: 0">
+          <div class="item">
+            <span>素材ID</span>
+            <a-input style="width: 300px" v-model="md5"></a-input>
+          </div>
+        </div>
+
+        <div class="item" style="float: right">
+          <a-button @click="handleSubmit" type="primary" :loading="loading">搜索</a-button>
+          <a-button @click="resetSubmit" style="margin-left: 15px" :loading="loading">重置</a-button>
+        </div>
+      </div>
+    </div>
+    <a-row :gutter="24" style="margin-top: 20px">
+      <a-col :xl="24">
+        <a-card title="数据列表" style="width: 100%; min-height: 700px" :bordered="false">
+          <div class="tableTop" style="text-align: end; margin: 0 0 15px 0">
+            <!-- <a-button type="primary" class="export" @click="exportExcel">导出报表</a-button> -->
+            <a-button type="primary" class="add" @click="customColumns">自定义列</a-button>
+          </div>
+          <a-table
+            size="middle"
+            :columns="columns"
+            :dataSource="tableData"
+            bordered
+            id="outTable"
+            :pagination="ipagination"
+            :scroll="{ x: scrollX }"
+            :loading="loading"
+            ref="accountTable"
+            :customRow="rowClick"
+            :width="tableWidth"
+            @change="sort"
+            style="word-break: break-all; font-size: 16px; font-weight: 600"
+          >
+            <span slot="coverUrl" slot-scope="text, records">
+              <img :src="text || noImg" alt="" style="width: 100%; height: auto" />
+            </span>
+            <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
+            <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
+            <span slot="clickMaterial" slot-scope="clickMaterial">{{ clickMaterial | formatCurrency }}</span>
+            <span slot="showMaterial" slot-scope="showMaterial">{{ showMaterial | formatCurrency }}</span>
+            <span slot="convertMaterial" slot-scope="convertMaterial">{{ convertMaterial | formatCurrency }}</span>
+            <span slot="play25FeedBreak" slot-scope="play25FeedBreak">{{ play25FeedBreak | formatCurrency }}</span>
+            <span slot="play50FeedBreak" slot-scope="play50FeedBreak">{{ play50FeedBreak | formatCurrency }}</span>
+            <span slot="play75FeedBreak" slot-scope="play75FeedBreak">{{ play75FeedBreak | formatCurrency }}</span>
+            <span slot="play100FeedBreak" slot-scope="play100FeedBreak">{{ play100FeedBreak | formatCurrency }}</span>
+            <span slot="nextDayOpen" slot-scope="nextDayOpen">{{ nextDayOpen | formatCurrency }}</span>
+            <span slot="downloadFinish" slot-scope="downloadFinish">{{ downloadFinish | formatCurrency }}</span>
+            <span slot="downloadStart" slot-scope="downloadStart">{{ downloadStart | formatCurrency }}</span>
+            <span slot="likeMaterial" slot-scope="likeMaterial">{{ likeMaterial | formatCurrency }}</span>
+            <span slot="shareMaterial" slot-scope="shareMaterial">{{ shareMaterial | formatCurrency }}</span>
+            <span slot="register" slot-scope="register">{{ register | formatCurrency }}</span>
+            <span slot="follow" slot-scope="follow">{{ follow | formatCurrency }}</span>
+            <span slot="formCount" slot-scope="formCount">{{ formCount | formatCurrency }}</span>
+            <span slot="formCountCost" slot-scope="formCountCost">{{ formCountCost | decimalsHandle }}</span>
+            <span slot="aClick" slot-scope="aClick">{{ aClick | formatCurrency }}</span>
+            <span slot="photoShow" slot-scope="photoShow">{{ photoShow | formatCurrency }}</span>
+            <span slot="photoClick" slot-scope="photoClick">{{ photoClick | formatCurrency }}</span>
+            <span slot="bClick" slot-scope="bClick">{{ bClick | formatCurrency }}</span>
+            <span slot="active" slot-scope="active">{{ active | formatCurrency }}</span>
+            <span slot="submit" slot-scope="submit">{{ submit | formatCurrency }}</span>
+            <span slot="nextDayOpen" slot-scope="nextDayOpen">{{ nextDayOpen | formatCurrency }}</span>
+            <span slot="eventCreditGrantLandingPage" slot-scope="eventCreditGrantLandingPage">{{
+              eventCreditGrantLandingPage | formatCurrency
+            }}</span>
+            <span slot="submitCost" slot-scope="submitCost">{{ submitCost | decimalsHandle }}</span>
+            <span slot="eventCreditGrantLandingPageCost" slot-scope="eventCreditGrantLandingPageCost">{{
+              eventCreditGrantLandingPageCost | decimalsHandle
+            }}</span>
+            <span slot="submitRate" slot-scope="submitRate">{{ submitRate | toPercentage }}</span>
+            <span slot="eventCreditGrantLandingPageRate" slot-scope="eventCreditGrantLandingPageRate">{{
+              eventCreditGrantLandingPageRate | toPercentage
+            }}</span>
+            <span slot="play25FeedBreakRate" slot-scope="play25FeedBreakRate">{{
+              play25FeedBreakRate | toPercentage
+            }}</span>
+            <span slot="playOverRate" slot-scope="playOverRate">{{ playOverRate | toPercentage }}</span>
+            <!-- 新加数据 -->
+
+            <span slot="convertRate" slot-scope="convertRate">{{ convertRate | toPercentage }}</span>
+            <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
+            <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
+            <span slot="cpc" slot-scope="cpc">{{ cpc | decimalsHandle }}</span>
+            <span slot="cpm" slot-scope="cpm">{{ cpm | decimalsHandle }}</span>
+            <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
+            <span slot="installFinishRate" slot-scope="installFinishRate">{{ installFinishRate | toPercentage }}</span>
+            <span slot="validPlayRate" slot-scope="validPlayRate">{{ validPlayRate | toPercentage }}</span>
+            <span slot="activePayCost" slot-scope="activePayCost">{{ activePayCost | decimalsHandle }}</span>
+            <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | decimalsHandle }}</span>
+            <span slot="validPlayCost" slot-scope="validPlayCost">{{ validPlayCost | decimalsHandle }}</span>
+            <span slot="activeCost" slot-scope="activeCost">{{ activeCost | decimalsHandle }}</span>
+            <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | decimalsHandle }}</span>
+            <span slot="gameAddictionCost" slot-scope="gameAddictionCost">{{
+              gameAddictionCost | decimalsHandle
+            }}</span>
+            <span slot="downloadFinishCost" slot-scope="downloadFinishCost">{{
+              downloadFinishCost | decimalsHandle
+            }}</span>
+            <span slot="downloadStartCost" slot-scope="downloadStartCost">{{
+              downloadStartCost | decimalsHandle
+            }}</span>
+            <span slot="installFinishCost" slot-scope="installFinishCost">{{
+              installFinishCost | decimalsHandle
+            }}</span>
+            <span slot="convertCost" slot-scope="convertCost">{{ convertCost | decimalsHandle }}</span>
+
+            <!--  -->
+            <span slot="downloadStartRate" slot-scope="downloadStartRate">{{ downloadStartRate | toPercentage }}</span>
+            <span slot="downloadFinishRate" slot-scope="downloadFinishRate">{{
+              downloadFinishRate | toPercentage
+            }}</span>
+            <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
+            <span slot="activeRegisterRate" slot-scope="activeRegisterRate">{{
+              activeRegisterRate | toPercentage
+            }}</span>
+            <span slot="gameAddictionRate" slot-scope="gameAddictionRate">{{ gameAddictionRate | toPercentage }}</span>
+            <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
+            <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
+          </a-table>
+        </a-card>
+      </a-col>
+    </a-row>
+    <a-modal title="查看视频" v-model="visibleVideo" :width="400" :footer="null">
+      <video class="video" :src="videoUrlShow" controls="controls" style="width: 100%">
+        您的浏览器不支持 video 标签。
+      </video>
+    </a-modal>
+    <customColumn
+      :visible="visible"
+      :listNum="listNum"
+      :fiexColumn="columnsFixd"
+      :mediaType="2"
+      @closeCustomColumn="closeCustomColumn"
+      @changeColumn="changeColumn"
+    />
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import YoutTable from '@/components/youtTable/YoutTable'
+import ChartCard from '@/components/ChartCard'
+import Trend from '@/components/Trend'
+import { mapGetters } from 'vuex'
+import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+import customColumn from '../components/customColumn.vue'
+var echarts = require('echarts')
+
+const columnsFixd = [
+  {
+    title: '素材',
+    dataIndex: 'coverUrl',
+    scopedSlots: { customRender: 'coverUrl' },
+    align: 'center',
+    key: 'date',
+    width: 200,
+    fixed: 'left',
+  },
+  {
+    title: '素材名称',
+    dataIndex: 'materialName',
+    align: 'center',
+    width: 200,
+    fixed: 'left',
+    customRender: function (text) {
+      if (text) {
+        return text
+      } else {
+        return '-'
+      }
+    },
+  },
+  {
+    title: '所属项目',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 200,
+    fixed: 'left',
+  },
+]
+
+const initVariableColimns = [
+  {
+    title: '消耗(元)',
+    dataIndex: 'cost',
+    width: 150,
+    tip: '广告在投放期间的花费总额',
+    align: 'center',
+    scopedSlots: { customRender: 'cost' },
+    sorter: () => {},
+  },
+  // {
+  //     title: '折后消耗(元)',
+  //     dataIndex: 'discountCost',
+  //     width:150,
+  //     tip: '广告在投放期间的花费总额',
+  //     align: 'center',
+  //     scopedSlots: { customRender: 'discountCost' },
+  //     sorter: () => {}
+  // },
+  {
+    title: '封面曝光数',
+    dataIndex: 'photoShow',
+    tip: '广告在瀑布流被观看次数',
+    align: 'center',
+    scopedSlots: { customRender: 'photoShow' },
+    sorter: () => {},
+  },
+  {
+    title: '封面点击数',
+    dataIndex: 'photoClick',
+    tip: '用户点击封面进入视频播放页的次数(数据会进行反作弊去重)',
+    align: 'center',
+
+    scopedSlots: { customRender: 'photoClick' },
+    sorter: () => {},
+  },
+  {
+    title: '封面点击率',
+    dataIndex: 'clickRate',
+    tip: '封面点击数占封面展示数百分比',
+    align: 'center',
+    scopedSlots: { customRender: 'clickRate' },
+    sorter: () => {},
+  },
+  {
+    title: '素材曝光数',
+    dataIndex: 'aClick',
+    tip: '用户进入视频播放页观看的次数(数据会进行反作弊去重)',
+    align: 'center',
+
+    scopedSlots: { customRender: 'aClick' },
+    sorter: () => {},
+  },
+  {
+    title: '行为数',
+    dataIndex: 'bClick',
+    tip: '用户在视频播放页单击转化按钮的次数/展示数*100%',
+    align: 'center',
+
+    scopedSlots: { customRender: 'bClick' },
+    sorter: () => {},
+  },
+
+  {
+    title: '行为率',
+    dataIndex: 'bClickRate',
+    tip: '行为数占素材曝光数百分比',
+    align: 'center',
+    scopedSlots: { customRender: 'bClickRate' },
+    sorter: () => {},
+  },
+  {
+    title: '平均千次封面曝光花费(元)',
+    dataIndex: 'cpm',
+    tip: '花费/封面曝光数*1000',
+    align: 'center',
+    scopedSlots: { customRender: 'cpm' },
+    sorter: () => {},
+  },
+  {
+    title: '平均封面点击单价(元)',
+    dataIndex: 'cpc',
+    tip: '花费/封面点击数',
+    align: 'center',
+    scopedSlots: { customRender: 'cpc' },
+    sorter: () => {},
+  },
+  {
+    title: '平均行为单价(元)',
+    dataIndex: 'cpb',
+    tip: '总花费/行为数',
+    align: 'center',
+    scopedSlots: { customRender: 'cpb' },
+    sorter: () => {},
+  },
+]
+export default {
+  components: {
+    YoutTable,
+    ChartCard,
+    Trend,
+    customColumn,
+  },
+  data() {
+    return {
+      tableData: [],
+      designTopLoading: false,
+      noImg: require('@/assets/noImg.png'),
+      visibleVideo: false,
+      videoUrlShow: '',
+      cost: '0',
+      costLink: 0,
+      videoTotal: '0',
+      newVideo: 0,
+      hotTotal: '0',
+      xiaoTotal: '0',
+      spinning: false,
+      loading: false,
+      chartList: [],
+      videoList: [],
+      designTopList: [],
+      columns: [...columnsFixd, ...initVariableColimns], //table的表头
+      columnsFixd,
+      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
+        },
+      },
+
+      dateRanges: {
+        今天: [moment(), moment()],
+        昨天: [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
+        近一周: [moment().subtract(7, 'days'), moment()],
+        近一月: [moment().subtract(1, 'months'), moment()],
+        近半年: [moment().subtract(6, 'months'), moment()],
+        近一年: [moment().subtract(12, 'months'), moment()],
+      },
+      dateValue: [moment().subtract(7, 'days'), moment()],
+      dataDimension: 'a',
+      mediaDimension: 'b',
+      dataDimensionValue: [],
+      dataDimensionList: [],
+      specificLoading: false,
+      order: null,
+      target: null,
+      materialData: null,
+      md5: '',
+      visible: false,
+      listNum: [],
+      scrollX: 1000,
+      tableWidth: '', //设置表格的列宽
+    }
+  },
+  watch: {
+    visibleVideo(n, o) {
+      if (!n) {
+        stopOtherVideo()
+        closeAllVideoFun()
+      }
+    },
+    'ipagination.current': function (n, o) {
+      if (n != o) {
+        this.getMoreVideoList({
+          ...this.materialData,
+        })
+      }
+    },
+  },
+  methods: {
+    rowClick(record, index) {
+      return {
+        on: {
+          click: (e) => {
+            this.$router.push({
+              path: '/materialReport/marterialDetail?md5=' + record.signature + '&mediaId=2',
+            })
+          },
+        },
+      }
+    },
+    moment,
+    closeCustomColumn() {
+      this.visible = false
+    },
+    changeColumn(val) {
+      this.columns = [...val]
+      if (this.columns.length > this.columnsFixd.length && this.columns.length < 8) {
+        this.columns.forEach((element, index) => {
+          if (index < this.columns.length - 1) {
+            element.width = 'auto'
+            element.fixed = false
+          }
+        })
+
+        // this.scrollX=2000+200*(this.columns.length-this.columnsFixd.length)
+      } else if (this.columns.length >= 8) {
+        this.columns.forEach((element, index) => {
+          if (index < this.columnsFixd.length) {
+            element.width = 200
+            element.fixed = 'left'
+          }
+        })
+
+        this.scrollX = 1000 + 200 * (this.columns.length - this.columnsFixd.length)
+      } else {
+        this.scrollX = 0
+        this.columns.forEach((element) => {
+          element.width = 'auto'
+          element.fixed = false
+        })
+      }
+    },
+    customColumns() {
+      this.visible = true
+      this.listNum = [...this.columns]
+    },
+    ...mapGetters(['userInfo']),
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    sort(pagination, filters, sorter, { currentDataSource }) {
+      // console.log(pagination, filters, sorter)
+      this.ipagination.current = pagination.current
+      this.ipagination.pageSize = pagination.pageSize
+      if (sorter.order) {
+        this.order = sorter.order ? sorter.order : 'descend'
+        this.target = sorter.columnKey
+        this.getMoreVideoList({
+          ...this.materialData,
+          target: sorter.columnKey,
+          order: sorter.order ? sorter.order : 'descend',
+        })
+      } else {
+        this.order = null
+        this.target = null
+      }
+    },
+    getData() {
+      var data = { ...this.materialData, md5: this.md5 }
+      this.getMoreVideoList(data)
+    },
+
+    getMoreVideoList(data) {
+      this.loading = true
+      var params = { ...data }
+      params.channelType = null
+
+      if (data.target) {
+        params.target = data.target
+        if (data.order == 'descend') {
+          params.order = 'desc'
+        } else {
+          params.order = 'asc'
+        }
+      } else {
+        params.target = this.target
+        params.order = this.order == 'descend' ? 'desc' : this.order == null ? null : 'asc'
+      }
+
+      params.pageSize = this.ipagination.pageSize
+      params.pageNo = this.ipagination.current
+      this.postDataAction('/overView/materialTopViewMore', params).then((res) => {
+        this.loading = false
+        if (res.success) {
+          this.tableData = res.result.list
+          this.ipagination.total = res.result.total
+        }
+      })
+    },
+    getDesignTopList(data) {
+      this.designTopLoading = true
+      return new Promise((resolve, reject) => {
+        var params = {
+          // startDate: this.dateValue.length == 2 ? moment(this.dateValue[0]).format('YYYY-MM-DD') : null,
+          // endDate: this.dateValue.length == 2 ? moment(this.dateValue[1]).format('YYYY-MM-DD') : null,
+          // userId: this.userInfo().id,
+          // pageSize: this.ipagination.pageSize,
+          // pageNo: this.ipagination.current,
+          // target: 'cost',
+          // order: 'desc',
+        }
+        params.startDate = this.dateValue.length == 2 ? moment(this.dateValue[0]).format('YYYY-MM-DD') : null
+        params.endDate = this.dateValue.length == 2 ? moment(this.dateValue[1]).format('YYYY-MM-DD') : null
+        params.userId = this.userInfo().id
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+
+        if (data) {
+          params.target = data.target
+          if (data.order == 'descend') {
+            params.order = 'desc'
+          } else {
+            params.order = 'asc'
+          }
+        } else {
+          params.target = this.target
+          params.order = this.order == 'descend' ? 'desc' : 'asc'
+        }
+        this.postDataAction('/overView/designTop', params).then((res) => {
+          this.designTopLoading = false
+          if (res.success) {
+            this.designTopList = res.result.list
+            this.ipagination.total = res.result.total
+            resolve(res.result)
+          } else {
+            reject(res.message)
+          }
+        })
+      })
+    },
+
+    handleSubmit() {
+      this.spinning = true
+      this.ipagination.current = 1
+      this.getData()
+    },
+    resetSubmit() {
+      this.dateValue = [moment().subtract(7, 'days'), moment()]
+      this.dataDimension = 'a'
+      this.mediaDimension = 'b'
+      this.dataDimensionValue = []
+      this.ipagination.current = 1
+      this.md5 = ''
+      this.getData()
+    },
+    //导出报表
+    exportExcel() {
+      
+      let column = this.columns.map((item, index) => {
+        return item.dataIndex
+      })
+      let columns = column.splice(3)
+      
+      downFilePost('/ctop/kuaishou/dailyPage/report/excel', {
+        mediaId: this.mediaId,
+        discount: this.discount,
+        accountIds: this.accountId,
+        startDate: this.dateValue[0].format('YYYY-MM-DD'),
+        endDate: this.dateValue[1].format('YYYY-MM-DD'),
+        hour: this.timeSelectValue,
+        target: this.target,
+        order: this.order,
+        columns,
+      }).then((res) => {
+        let blob = new Blob([res], {
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+        })
+        let downloadElement = document.createElement('a')
+        let href = window.URL.createObjectURL(blob) //创建下载的链接
+        downloadElement.href = href
+        downloadElement.download = moment().format('YYYY-MM-DD') + '账户报表.xlsx' //下载后文件名
+        document.body.appendChild(downloadElement)
+        downloadElement.click() //点击下载
+        document.body.removeChild(downloadElement) //下载完成移除元素
+        window.URL.revokeObjectURL(href) //释放掉blob对象
+      })
+    },
+    tableChange(data) {
+      console.log(data)
+    },
+    //获取echart的值
+    initEchart(idName, optionName) {
+      const chart = this.$refs[idName]
+      //   console.log(chart)
+      if (chart) {
+        const myChart = echarts.init(document.getElementById(idName))
+        // myChart.showLoading({
+        //     text: "图表数据正在努力加载..."
+        // });
+
+        myChart.setOption(optionName)
+        window.addEventListener('resize', function () {
+          myChart.resize()
+        })
+      }
+    },
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.materialData = JSON.parse(localStorage.getItem('materialParams'))
+      this.getMoreVideoList(this.materialData)
+    })
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.materialReport {
+  .option {
+    background: white;
+    padding: 20px;
+    display: flex;
+    justify-content: flex-start;
+    flex-wrap: wrap;
+    .item {
+      margin-right: 15px;
+      margin-bottom: 15px;
+      height: 32px;
+      line-height: 32px;
+      flex-shrink: 0;
+      span {
+        margin-right: 10px;
+      }
+    }
+  }
+  .echart {
+    margin-top: 20px;
+    padding: 0 20px 20px;
+    background: white;
+    .echart-header {
+      padding: 20px 0;
+      font-size: 15px;
+      font-weight: 600;
+    }
+  }
+  .tableBody {
+    margin-top: 20px;
+  }
+}
+</style>
+<style>
+.card-container {
+  overflow: hidden;
+  /* padding: 24px; */
+}
+.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>

+ 633 - 0
src/views/modules/Statistics/materialReport/marterialTtList.vue

@@ -0,0 +1,633 @@
+<style>
+.materialReport .chart-card-content {
+  display: none !important;
+}
+</style>
+<style scoped>
+.top-ul-style {
+  width: 100%;
+  padding-left: 0;
+}
+.top-ul-style li {
+  height: 100px;
+  border: 1px solid #f2f2f2;
+  margin-bottom: 5px;
+  padding: 10px;
+  display: flex;
+  justify-content: space-between;
+}
+.li-cost {
+  display: flex;
+  flex-flow: column;
+  justify-content: center;
+  align-content: flex-end;
+}
+.li-cost span {
+  font-size: 16px;
+  font-weight: 500;
+  min-width: 50px;
+  text-align: right;
+}
+</style>
+<template>
+  <div class="materialReport">
+    <div class="card-container">
+      <div class="option" style="justify-content: space-between">
+        <div class="option" style="padding: 0">
+          <div class="item">
+            <span>素材ID</span>
+            <a-input style="width: 300px" v-model="md5"></a-input>
+          </div>
+        </div>
+
+        <div class="item" style="float: right">
+          <a-button @click="handleSubmit" type="primary" :loading="spinning">搜索</a-button>
+          <a-button @click="resetSubmit" style="margin-left: 15px" :loading="spinning">重置</a-button>
+        </div>
+      </div>
+    </div>
+    <a-row :gutter="24" style="margin-top: 20px">
+      <a-col :xl="24">
+        <a-card title="数据列表" style="width: 100%; min-height: 700px" :bordered="false">
+          <div class="tableTop" style="text-align: end; margin: 0 0 15px 0">
+            <!-- <a-button type="primary" class="export" @click="exportExcel">导出报表</a-button> -->
+            <a-button type="primary" class="add" @click="customColumns">自定义列</a-button>
+          </div>
+          <a-table
+            size="middle"
+            :columns="columns"
+            :dataSource="tableData"
+            bordered
+            id="outTable"
+            :pagination="ipagination"
+            :scroll="{ x: scrollX }"
+            :loading="loading"
+            ref="accountTable"
+            :width="tableWidth"
+            :customRow="rowClick"
+            @change="sort"
+            style="word-break: break-all; font-size: 16px; font-weight: 600"
+          >
+            <span slot="coverUrl" slot-scope="text, records">
+              <img :src="text || noImg" alt="" style="width: 100%; height: auto" />
+            </span>
+            <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
+            <span slot="cost" slot-scope="cost">{{ cost | decimalsHandle }}</span>
+            <span slot="clickMaterial" slot-scope="clickMaterial">{{ clickMaterial | formatCurrency }}</span>
+            <span slot="showMaterial" slot-scope="showMaterial">{{ showMaterial | formatCurrency }}</span>
+            <span slot="convertMaterial" slot-scope="convertMaterial">{{ convertMaterial | formatCurrency }}</span>
+            <span slot="play25FeedBreak" slot-scope="play25FeedBreak">{{ play25FeedBreak | formatCurrency }}</span>
+            <span slot="play50FeedBreak" slot-scope="play50FeedBreak">{{ play50FeedBreak | formatCurrency }}</span>
+            <span slot="play75FeedBreak" slot-scope="play75FeedBreak">{{ play75FeedBreak | formatCurrency }}</span>
+            <span slot="play100FeedBreak" slot-scope="play100FeedBreak">{{ play100FeedBreak | formatCurrency }}</span>
+            <span slot="nextDayOpen" slot-scope="nextDayOpen">{{ nextDayOpen | formatCurrency }}</span>
+            <span slot="downloadFinish" slot-scope="downloadFinish">{{ downloadFinish | formatCurrency }}</span>
+            <span slot="downloadStart" slot-scope="downloadStart">{{ downloadStart | formatCurrency }}</span>
+            <span slot="likeMaterial" slot-scope="likeMaterial">{{ likeMaterial | formatCurrency }}</span>
+            <span slot="shareMaterial" slot-scope="shareMaterial">{{ shareMaterial | formatCurrency }}</span>
+            <span slot="register" slot-scope="register">{{ register | formatCurrency }}</span>
+            <span slot="follow" slot-scope="follow">{{ follow | formatCurrency }}</span>
+            <span slot="formCount" slot-scope="formCount">{{ formCount | formatCurrency }}</span>
+            <span slot="formCountCost" slot-scope="formCountCost">{{ formCountCost | decimalsHandle }}</span>
+            <span slot="aClick" slot-scope="aClick">{{ aClick | formatCurrency }}</span>
+            <span slot="photoShow" slot-scope="photoShow">{{ photoShow | formatCurrency }}</span>
+            <span slot="photoClick" slot-scope="photoClick">{{ photoClick | formatCurrency }}</span>
+            <span slot="bClick" slot-scope="bClick">{{ bClick | formatCurrency }}</span>
+            <span slot="active" slot-scope="active">{{ active | formatCurrency }}</span>
+            <span slot="submit" slot-scope="submit">{{ submit | formatCurrency }}</span>
+            <span slot="nextDayOpen" slot-scope="nextDayOpen">{{ nextDayOpen | formatCurrency }}</span>
+            <span slot="eventCreditGrantLandingPage" slot-scope="eventCreditGrantLandingPage">{{
+              eventCreditGrantLandingPage | formatCurrency
+            }}</span>
+            <span slot="submitCost" slot-scope="submitCost">{{ submitCost | decimalsHandle }}</span>
+            <span slot="eventCreditGrantLandingPageCost" slot-scope="eventCreditGrantLandingPageCost">{{
+              eventCreditGrantLandingPageCost | decimalsHandle
+            }}</span>
+            <span slot="submitRate" slot-scope="submitRate">{{ submitRate | toPercentage }}</span>
+            <span slot="eventCreditGrantLandingPageRate" slot-scope="eventCreditGrantLandingPageRate">{{
+              eventCreditGrantLandingPageRate | toPercentage
+            }}</span>
+            <span slot="play25FeedBreakRate" slot-scope="play25FeedBreakRate">{{
+              play25FeedBreakRate | toPercentage
+            }}</span>
+            <span slot="playOverRate" slot-scope="playOverRate">{{ playOverRate | toPercentage }}</span>
+            <!-- 新加数据 -->
+
+            <span slot="convertRate" slot-scope="convertRate">{{ convertRate | toPercentage }}</span>
+            <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
+            <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
+            <span slot="cpc" slot-scope="cpc">{{ cpc | decimalsHandle }}</span>
+            <span slot="cpm" slot-scope="cpm">{{ cpm | decimalsHandle }}</span>
+            <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
+            <span slot="installFinishRate" slot-scope="installFinishRate">{{ installFinishRate | toPercentage }}</span>
+            <span slot="validPlayRate" slot-scope="validPlayRate">{{ validPlayRate | toPercentage }}</span>
+            <span slot="activePayCost" slot-scope="activePayCost">{{ activePayCost | decimalsHandle }}</span>
+            <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | decimalsHandle }}</span>
+            <span slot="validPlayCost" slot-scope="validPlayCost">{{ validPlayCost | decimalsHandle }}</span>
+            <span slot="activeCost" slot-scope="activeCost">{{ activeCost | decimalsHandle }}</span>
+            <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | decimalsHandle }}</span>
+            <span slot="gameAddictionCost" slot-scope="gameAddictionCost">{{
+              gameAddictionCost | decimalsHandle
+            }}</span>
+            <span slot="downloadFinishCost" slot-scope="downloadFinishCost">{{
+              downloadFinishCost | decimalsHandle
+            }}</span>
+            <span slot="downloadStartCost" slot-scope="downloadStartCost">{{
+              downloadStartCost | decimalsHandle
+            }}</span>
+            <span slot="installFinishCost" slot-scope="installFinishCost">{{
+              installFinishCost | decimalsHandle
+            }}</span>
+            <span slot="convertCost" slot-scope="convertCost">{{ convertCost | decimalsHandle }}</span>
+
+            <!--  -->
+            <span slot="downloadStartRate" slot-scope="downloadStartRate">{{ downloadStartRate | toPercentage }}</span>
+            <span slot="downloadFinishRate" slot-scope="downloadFinishRate">{{
+              downloadFinishRate | toPercentage
+            }}</span>
+            <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
+            <span slot="activeRegisterRate" slot-scope="activeRegisterRate">{{
+              activeRegisterRate | toPercentage
+            }}</span>
+            <span slot="gameAddictionRate" slot-scope="gameAddictionRate">{{ gameAddictionRate | toPercentage }}</span>
+            <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
+            <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
+          </a-table>
+        </a-card>
+      </a-col>
+    </a-row>
+    <a-modal title="查看视频" v-model="visibleVideo" :width="400" :footer="null">
+      <video class="video" :src="videoUrlShow" controls="controls" style="width: 100%">
+        您的浏览器不支持 video 标签。
+      </video>
+    </a-modal>
+    <customColumn
+      :visible="visible"
+      :listNum="listNum"
+      :fiexColumn="columnsFixd"
+      :mediaType="2"
+      @closeCustomColumn="closeCustomColumn"
+      @changeColumn="changeColumn"
+    />
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import YoutTable from '@/components/youtTable/YoutTable'
+import ChartCard from '@/components/ChartCard'
+import Trend from '@/components/Trend'
+import { mapGetters } from 'vuex'
+import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+import customColumn from '../components/customColumn.vue'
+var echarts = require('echarts')
+
+const columnsFixd = [
+  {
+    title: '素材',
+    dataIndex: 'coverUrl',
+    scopedSlots: { customRender: 'coverUrl' },
+    align: 'center',
+    key: 'date',
+    width: 200,
+    fixed: 'left',
+  },
+  {
+    title: '素材名称',
+    dataIndex: 'materialName',
+    align: 'center',
+    width: 200,
+    fixed: 'left',
+    customRender: function (text) {
+      if (text) {
+        return text
+      } else {
+        return '-'
+      }
+    },
+  },
+  {
+    title: '所属项目',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 200,
+    fixed: 'left',
+  },
+]
+
+const initVariableColimns = [
+  {
+    title: '消耗(元)',
+    dataIndex: 'cost',
+    scopedSlots: { customRender: 'cost' },
+    align: 'center',
+    sorter: (a, b) => {},
+  },
+  {
+    title: '点击数',
+    dataIndex: 'clickMaterial',
+    align: 'center',
+    scopedSlots: { customRender: 'clickMaterial' },
+    sorter: (a, b) => {},
+    // (a, b) => a.clickMaterial - b.clickMaterial
+  },
+  {
+    title: '点击率',
+    dataIndex: 'ctr',
+    align: 'center',
+    scopedSlots: { customRender: 'ctr' },
+    sorter: (a, b) => {},
+  },
+
+  {
+    title: '展示数',
+    dataIndex: 'showMaterial',
+    align: 'center',
+
+    scopedSlots: { customRender: 'showMaterial' },
+    sorter: (a, b) => {},
+  },
+  {
+    title: '平均千次展现费用(元)',
+    dataIndex: 'cpm',
+    tip: '广告平均每一千次展现所付出的费用,计算公式是:总花费/展示数*1000',
+    align: 'center',
+
+    scopedSlots: { customRender: 'cpm' },
+    sorter: (a, b) => {},
+  },
+  {
+    title: '平均点击单价(元)',
+    dataIndex: 'cpc',
+    tip: '广告主为每次点击付出的费用成本,计算公式是:总花费/点击数',
+    align: 'center',
+    scopedSlots: { customRender: 'cpc' },
+    sorter: (a, b) => {},
+  },
+]
+export default {
+  components: {
+    YoutTable,
+    ChartCard,
+    Trend,
+    customColumn,
+  },
+  data() {
+    return {
+      tableData: [],
+      designTopLoading: false,
+      noImg: require('@/assets/noImg.png'),
+      visibleVideo: false,
+      videoUrlShow: '',
+      cost: '0',
+      costLink: 0,
+      videoTotal: '0',
+      newVideo: 0,
+      hotTotal: '0',
+      xiaoTotal: '0',
+      spinning: false,
+      loading: false,
+      chartList: [],
+      videoList: [],
+      designTopList: [],
+      columns: [...columnsFixd, ...initVariableColimns], //table的表头
+      columnsFixd,
+      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
+        },
+      },
+
+      dateRanges: {
+        今天: [moment(), moment()],
+        昨天: [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
+        近一周: [moment().subtract(7, 'days'), moment()],
+        近一月: [moment().subtract(1, 'months'), moment()],
+        近半年: [moment().subtract(6, 'months'), moment()],
+        近一年: [moment().subtract(12, 'months'), moment()],
+      },
+      dateValue: [moment().subtract(7, 'days'), moment()],
+      dataDimension: 'a',
+      mediaDimension: 'b',
+      dataDimensionValue: [],
+      dataDimensionList: [],
+      specificLoading: false,
+      order: null,
+      target: null,
+      materialData: null,
+      md5: '',
+      visible: false,
+      listNum: [],
+      scrollX: 1000,
+      tableWidth: '', //设置表格的列宽
+    }
+  },
+  watch: {
+    visibleVideo(n, o) {
+      if (!n) {
+        stopOtherVideo()
+        closeAllVideoFun()
+      }
+    },
+    'ipagination.current': function (n, o) {
+      if (n != o) {
+        this.getMoreVideoList({
+          ...this.materialData,
+        })
+      }
+    },
+  },
+  methods: {
+    rowClick(record, index) {
+      return {
+        on: {
+          click: (e) => {
+            this.$router.push({
+              path: '/materialReport/marterialDetail?md5=' + record.signature + '&mediaId=1',
+            })
+          },
+        },
+      }
+    },
+
+    moment,
+    closeCustomColumn() {
+      this.visible = false
+    },
+    changeColumn(val) {
+      this.columns = [...val]
+      if (this.columns.length > this.columnsFixd.length && this.columns.length < 8) {
+        this.columns.forEach((element, index) => {
+          if (index < this.columns.length - 1) {
+            element.width = 'auto'
+            element.fixed = false
+          }
+        })
+
+        // this.scrollX=2000+200*(this.columns.length-this.columnsFixd.length)
+      } else if (this.columns.length >= 8) {
+        this.columns.forEach((element, index) => {
+          if (index < this.columnsFixd.length) {
+            element.width = 200
+            element.fixed = 'left'
+          }
+        })
+
+        this.scrollX = 1000 + 200 * (this.columns.length - this.columnsFixd.length)
+      } else {
+        this.scrollX = 0
+        this.columns.forEach((element) => {
+          element.width = 'auto'
+          element.fixed = false
+        })
+      }
+    },
+    customColumns() {
+      this.visible = true
+      this.listNum = [...this.columns]
+    },
+    ...mapGetters(['userInfo']),
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    sort(pagination, filters, sorter, { currentDataSource }) {
+      // console.log(pagination, filters, sorter)
+      this.ipagination.current = pagination.current
+      this.ipagination.pageSize = pagination.pageSize
+      if (sorter.order) {
+        this.order = sorter.order ? sorter.order : 'descend'
+        this.target = sorter.columnKey
+        this.getMoreVideoList({
+          ...this.materialData,
+          target: sorter.columnKey,
+          order: sorter.order ? sorter.order : 'descend',
+        })
+      } else {
+        this.order = null
+        this.target = null
+      }
+    },
+    getData() {
+      var data = { ...this.materialData, md5: this.md5 }
+      this.getMoreVideoList(data)
+    },
+
+    getMoreVideoList(data) {
+      this.loading = true
+      var params = { ...data }
+      params.channelType = null
+
+      if (data.target) {
+        params.target = data.target
+        if (data.order == 'descend') {
+          params.order = 'desc'
+        } else {
+          params.order = 'asc'
+        }
+      } else {
+        params.target = this.target
+        params.order = this.order == 'descend' ? 'desc' : this.order == null ? null : 'asc'
+      }
+
+      params.pageSize = this.ipagination.pageSize
+      params.pageNo = this.ipagination.current
+      this.postDataAction('/overView/materialTopViewMore', params).then((res) => {
+        this.loading = false
+        if (res.success) {
+          this.tableData = res.result.list
+          this.ipagination.total = res.result.total
+        }
+      })
+    },
+    getDesignTopList(data) {
+      this.designTopLoading = true
+      return new Promise((resolve, reject) => {
+        var params = {
+          // startDate: this.dateValue.length == 2 ? moment(this.dateValue[0]).format('YYYY-MM-DD') : null,
+          // endDate: this.dateValue.length == 2 ? moment(this.dateValue[1]).format('YYYY-MM-DD') : null,
+          // userId: this.userInfo().id,
+          // pageSize: this.ipagination.pageSize,
+          // pageNo: this.ipagination.current,
+          // target: 'cost',
+          // order: 'desc',
+        }
+        params.startDate = this.dateValue.length == 2 ? moment(this.dateValue[0]).format('YYYY-MM-DD') : null
+        params.endDate = this.dateValue.length == 2 ? moment(this.dateValue[1]).format('YYYY-MM-DD') : null
+        params.userId = this.userInfo().id
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+
+        if (data) {
+          params.target = data.target
+          if (data.order == 'descend') {
+            params.order = 'desc'
+          } else {
+            params.order = 'asc'
+          }
+        } else {
+          params.target = this.target
+          params.order = this.order == 'descend' ? 'desc' : 'asc'
+        }
+        this.postDataAction('/overView/designTop', params).then((res) => {
+          this.designTopLoading = false
+          if (res.success) {
+            this.designTopList = res.result.list
+            this.ipagination.total = res.result.total
+            resolve(res.result)
+          } else {
+            reject(res.message)
+          }
+        })
+      })
+    },
+
+    handleSubmit() {
+      this.ipagination.current = 1
+      this.getData()
+    },
+    resetSubmit() {
+      this.dateValue = [moment().subtract(7, 'days'), moment()]
+      this.dataDimension = 'a'
+      this.mediaDimension = 'b'
+      this.dataDimensionValue = []
+      this.ipagination.current = 1
+      this.md5 = ''
+      this.getData()
+    },
+    //导出报表
+    exportExcel() {
+      let column = this.columns.map((item, index) => {
+        return item.dataIndex
+      })
+      let columns = column.splice(3)
+      // console.log(columns)
+      downFilePost('/ctop/kuaishou/dailyPage/report/excel', {
+        mediaId: this.mediaId,
+        discount: this.discount,
+        accountIds: this.accountId,
+        startDate: this.dateValue[0].format('YYYY-MM-DD'),
+        endDate: this.dateValue[1].format('YYYY-MM-DD'),
+        hour: this.timeSelectValue,
+        target: this.target,
+        order: this.order,
+        columns,
+      }).then((res) => {
+        let blob = new Blob([res], {
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+        })
+        let downloadElement = document.createElement('a')
+        let href = window.URL.createObjectURL(blob) //创建下载的链接
+        downloadElement.href = href
+        downloadElement.download = moment().format('YYYY-MM-DD') + '账户报表.xlsx' //下载后文件名
+        document.body.appendChild(downloadElement)
+        downloadElement.click() //点击下载
+        document.body.removeChild(downloadElement) //下载完成移除元素
+        window.URL.revokeObjectURL(href) //释放掉blob对象
+      })
+    },
+    tableChange(data) {
+      console.log(data)
+    },
+    //获取echart的值
+    initEchart(idName, optionName) {
+      const chart = this.$refs[idName]
+      //   console.log(chart)
+      if (chart) {
+        const myChart = echarts.init(document.getElementById(idName))
+        // myChart.showLoading({
+        //     text: "图表数据正在努力加载..."
+        // });
+
+        myChart.setOption(optionName)
+        window.addEventListener('resize', function () {
+          myChart.resize()
+        })
+      }
+    },
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.materialData = JSON.parse(localStorage.getItem('materialParams'))
+      this.getMoreVideoList(this.materialData)
+    })
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.materialReport {
+  .option {
+    background: white;
+    padding: 20px;
+    display: flex;
+    justify-content: flex-start;
+    flex-wrap: wrap;
+    .item {
+      margin-right: 15px;
+      margin-bottom: 15px;
+      height: 32px;
+      line-height: 32px;
+      flex-shrink: 0;
+      span {
+        margin-right: 10px;
+      }
+    }
+  }
+  .echart {
+    margin-top: 20px;
+    padding: 0 20px 20px;
+    background: white;
+    .echart-header {
+      padding: 20px 0;
+      font-size: 15px;
+      font-weight: 600;
+    }
+  }
+  .tableBody {
+    margin-top: 20px;
+  }
+}
+</style>
+<style>
+.card-container {
+  overflow: hidden;
+  /* padding: 24px; */
+}
+.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>

File diff suppressed because it is too large
+ 859 - 457
src/views/modules/Statistics/materialReport/materialReport.vue


+ 19 - 2
src/views/modules/Statistics/materialStatistics.vue

@@ -93,7 +93,7 @@
             size="middle"
             :customRow="rowClick"
             :loading="loading"
-            :scroll="{ x: 2300 }"
+            :scroll="{ x: 2600 }"
           >
             <div slot="url" slot-scope="url">
               <video @click.stop class="video" :src="url" controls="controls" style="height:200px;width:112.5px">
@@ -106,6 +106,7 @@
             <span slot="photoClickCost" slot-scope="photoClickCost">{{ photoClickCost | toFixtwo }}</span>
             <span slot="actionCost" slot-scope="actionCost">{{ actionCost | toFixtwo }}</span>
             <span slot="conversionPrice" slot-scope="conversionPrice">{{ conversionPrice | toFixtwo }}</span>
+            <span slot="play3sRate" slot-scope="play3sRate">{{ play3sRate | getBo }}</span>
             <span slot="operation" slot-scope="text,record">
                 <a href="javascript:;" @click.stop="showRelevantPeople(record)">查看相关人员</a>
             </span>
@@ -248,6 +249,14 @@ const columns = [
     sorter: (a, b) => a.conversionPrice - b.conversionPrice
   },
   {
+    title: '3s播放率',
+    dataIndex: 'play3sRate',
+    key: 'play3sRate',
+    scopedSlots: { customRender: 'play3sRate' },
+    align: 'center',
+    sorter: (a, b) => a.play3sRate - b.play3sRate
+  },
+  {
     title:'相关人员',
     dataIndex:'operation',
     key:'operation',
@@ -341,7 +350,15 @@ const columnsDetail = [
     key: 'conversionPrice',
     scopedSlots: { customRender: 'conversionPrice' },
     align: 'center'
-  }
+  },
+  {
+    title: '3s播放率',
+    dataIndex: 'play3sRate',
+    key: 'play3sRate',
+    scopedSlots: { customRender: 'play3sRate' },
+    align: 'center',
+    
+  },
 ]
 export default {
   name: 'data-display-statistics',

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

@@ -742,7 +742,6 @@
 </style>
 <style lang="scss">
   .ant-tooltip-inner,
-  .ant-tooltip,
   .ant-tooltip-arrow::before {
     background-color: #fff;
     color: #666;

+ 44 - 2
src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue

@@ -304,6 +304,10 @@
             </a-tab-pane>
             <a-tab-pane :key="2" :tab="(tabKey==1||tabKey==2&&value==1)?'有效计划数':'有效推广组'">       
             </a-tab-pane>
+
+            <a-button slot="tabBarExtraContent" @click="exportExcel" :loading="exportloading" v-show="tabKey==2">
+              导出报表
+            </a-button>
           </a-tabs>
           <a-table :columns="columns" :dataSource="dataTable" :pagination="false" :loading="loading" bordered>             
           </a-table> 
@@ -325,7 +329,7 @@ import moment from 'moment'
 import countTo from 'vue-count-to'
 import lifting from '../components/lifting'
 import {  getKsAccountReport, getKsDetail, getReportList } from '@api/video.js'
-import { getAction, postAction } from '@/api/manage'
+import { getAction, postAction ,downFile, downFilePost } from '@/api/manage'
 
 import timeCheck from '../components/timeCheck'
 
@@ -747,8 +751,9 @@ export default {
      datePick
   },
 
-  data: function() {
+  data() {
     return {
+      exportloading:false,
       value:2,
       KSaccountList:[],
       TTaccountList:[],
@@ -794,6 +799,43 @@ export default {
     }
   },
   methods: {
+    //导出报表
+        exportExcel() {
+            this.exportloading=true;
+            let url='';
+            let nameType=''
+            if(this.value==2){
+              url='/ctop/kuaishou/newGroup/report/excel'
+            }else{
+              url='/ctop/kuaishou/newPlan/report/excel'
+            }
+            if(this.value==2){
+                nameType='广告组'
+            }else if(this.value==1){
+                nameType='广告计划'
+            }
+            downFilePost(url,{
+              accountIds:this.accountId,
+              userId:this.operate || '',
+              startDate:this.dateValue[0].format('YYYY-MM-DD'),
+              endDate:this.dateValue[1].format('YYYY-MM-DD'),
+              target:this.tableTab=='1'?'new':'valid',
+              order:this.order
+            }).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)
         if(this.value==2){

+ 11 - 7
src/views/modules/Statistics/refuseDataCreat.vue

@@ -67,7 +67,7 @@
     </a-row>
     <a-modal :title="editTitle" :visible="visible" @ok="handleOk" :confirmLoading="confirmLoading"
       @cancel="handleCancel">
-      <a-textarea v-model="editWord" autosize />
+      <a-textarea v-model="editWord" autosize   :maxLength='30'/>
     </a-modal>
     <a-modal title="一键重提" @cancel="handleClose" :visible="visibleAgain" @ok="handleOkAgain"
       :confirmLoading="againLoading" :width="650">
@@ -193,25 +193,29 @@
       title: '账号Id',
       dataIndex: 'accountId',
       key: 'accountId',
-      align: 'center'
+      align: 'center',
+      width:120,
     },
     {
       title: '计划Id',
       dataIndex: 'campaignId',
       key: 'campaignId',
-      align: 'center'
+      align: 'center',
+       width:120,
     },
     {
-      title: '广告组id',
+      title: '广告组Id',
       dataIndex: 'unitId',
       key: 'unitId',
-      align: 'center'
+      align: 'center',
+       width:120,
     },
     {
-      title: '创意id',
+      title: '创意Id',
       dataIndex: 'creativeId',
       key: 'photoClick',
-      align: 'center'
+      align: 'center',
+       width:120,
     },
     {
       title: '创意名称',

+ 17 - 8
src/views/modules/Statistics/refuseDataCreatNew.vue

@@ -67,7 +67,7 @@
     </a-row>
     <a-modal :title="editTitle" :visible="visible" @ok="handleOk" :confirmLoading="confirmLoading"
       @cancel="handleCancel">
-      <a-textarea v-model="editWord" autosize />
+      <a-textarea v-model="editWord" autosize :maxLength='editTitle=="广告语修改"?30:200' />
     </a-modal>
     <a-modal title="一键重提" @cancel="handleClose" :visible="visibleAgain" @ok="handleOkAgain"
       :confirmLoading="againLoading" :width="650">
@@ -193,25 +193,29 @@
       title: '账号Id',
       dataIndex: 'accountId',
       key: 'accountId',
-      align: 'center'
+      align: 'center',
+       width:120,
     },
     {
       title: '计划Id',
       dataIndex: 'campaignId',
       key: 'campaignId',
-      align: 'center'
+      align: 'center',
+       width:120,
     },
     {
-      title: '广告组id',
+      title: '广告组Id',
       dataIndex: 'unitId',
       key: 'unitId',
-      align: 'center'
+      align: 'center',
+       width:120,
     },
     {
-      title: '创意id',
+      title: '创意Id',
       dataIndex: 'creativeId',
       key: 'photoClick',
-      align: 'center'
+      align: 'center',
+       width:120,
     },
     {
       title: '创意名称',
@@ -668,7 +672,12 @@
       stopOtherVideo()
     },
     mounted: function () {
-      this.$nextTick(() => {})
+      this.$nextTick(() => {});
+      // console.log(this.$route);
+      if(this.$route.query){
+          this.appId=this.$route.query.accountId;
+          this.addUserKey()
+      }
     }
   }
 </script>

+ 113 - 33
src/views/modules/Statistics/videoStatics/KSvideoStatics.vue

@@ -10,20 +10,44 @@
         <span  @click="opendate">
           <DatePicker :openOptions='openOptions'  :parentDate='dateValue' left='-100px'></DatePicker>
         </span> 
+        <span style="margin-left:15px">设计负责人:</span> 
+        <span  >
+            <!-- <a-input placeholder="请输入剪辑的名字" v-model="clip" style="width:140px"  /> -->
+            <a-select v-model="leaderId" style="width: 140px" allowClear  show-search :filter-option="filterOption">
+              <a-select-option v-for="item in designList" :key="item.userId" :value='item.userId'>
+                {{item.companyName +'_'+item.userName  }}
+              </a-select-option>
+            </a-select>
+        </span>         
         <span style="margin-left:15px">剪辑:</span> 
         <span  >
-            <a-input placeholder="请输入剪辑的名字" v-model="clip" style="width:140px"  />
+            <!-- <a-input placeholder="请输入剪辑的名字" v-model="clip" style="width:140px"  /> -->
+            <a-select v-model="clip" style="width: 140px" allowClear  show-search :filter-option="filterOption">
+              <a-select-option v-for="item in designList" :key="item.userId" :value='item.userId'>
+                {{item.companyName +'_'+item.userName  }}
+              </a-select-option>
+            </a-select>
         </span>         
         <span style="margin-left:15px">拍摄:</span> 
         <span  >
-            <a-input placeholder="请输入拍摄的名字" v-model="shot" style="width:140px" />
+            <!-- <a-input placeholder="请输入拍摄的名字" v-model="shot" style="width:140px" /> -->
+            <a-select v-model="shot" style="width: 140px" allowClear  show-search :filter-option="filterOption">
+              <a-select-option v-for="item in designList" :key="item.userId" :value='item.userId'>
+                {{item.companyName +'_'+item.userName  }}
+              </a-select-option>
+            </a-select>
         </span>         
         <span style="margin-left:15px">编导:</span> 
         <span  >
-            <a-input placeholder="请输入编导的名字" v-model="plan" style="width:140px"  />
+            <!-- <a-input placeholder="请输入编导的名字" v-model="plan" style="width:140px"  /> -->
+            <a-select v-model="plan" style="width: 140px" allowClear  show-search :filter-option="filterOption">
+              <a-select-option v-for="item in designList" :key="item.userId" :value='item.userId'>
+                 {{item.companyName +'_'+item.userName  }}
+              </a-select-option>
+            </a-select>
         </span>         
       </div>
-      <a-button type="primary" @click="searchRes">查询</a-button>
+      <a-button type="primary" @click="searchRes" :loading='searchLoading'>查询</a-button>
     </div>
 
     <!-- <div style="margin:15px 0" class="btndiv">
@@ -115,7 +139,7 @@
                  @customHeaderCell="customHeaderCell(columns)"
               >
              
-                <div slot="converUrl" slot-scope="test,records">
+                <div slot="coverUrl" slot-scope="test,records">
                   <!-- {{test}} -->
                     <img
                     :src="test"
@@ -224,6 +248,7 @@
                 <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
                 <span slot="relativePeople" slot-scope="text,record">
                     <!-- <a href="javascript:;" @click.stop="showRelevantPeople(record)">查看相关人员</a> -->
+                    <p>负责人:{{record.designLeader || '无'}}</p>
                     <p>剪辑:{{record.clip || '无'}}</p>
                     <p>拍摄:{{record.shot || '无'}}</p>
                     <p>编导:{{record.plan || '无'}}</p>
@@ -270,12 +295,12 @@ import customColumn from '../components/customColumn.vue'
 const columnsFixd = [
   {
     title: '视频',
-    dataIndex: 'converUrl',
+    dataIndex: 'coverUrl',
     align: 'center',
     width: 100,
     fixed: 'left',
-    key: 'converUrl',
-    scopedSlots: { customRender: 'converUrl' }
+    key: 'coverUrl',
+    scopedSlots: { customRender: 'coverUrl' }
   },
   {
     title: '视频名称',
@@ -298,24 +323,31 @@ const columnsFixd = [
     width: 150,
     fixed: 'left'
   },
+  {
+    title: '渠道',
+    dataIndex: 'channel',
+    align: 'center',
+    width: 150,
+    fixed: 'left'
+  },
     {
     title:'相关人员',
     dataIndex:'relativePeople',
     key:'relativePeople',
     scopedSlots: { customRender: 'relativePeople' },
     align: 'center',
-    width:120,
-    fixed: 'left'
-  },
-    {
-    title:'操作',
-    dataIndex:'operation',
-    key:'operation',
-    scopedSlots: { customRender: 'operation' },
-    align: 'center',
-    width:90,
+    width:150,
     fixed: 'left'
   },
+  // {
+  //   title:'操作',
+  //   dataIndex:'operation',
+  //   key:'operation',
+  //   scopedSlots: { customRender: 'operation' },
+  //   align: 'center',
+  //   width:90,
+  //   fixed: 'left'
+  // },
 
   {
     title: '创建时间',
@@ -332,7 +364,7 @@ const initVariableColimns=[
    {
         title: '消耗(元)',
         dataIndex: 'cost',
-        width:150,
+        
         tip: '广告在投放期间的花费总额',
         align: 'center',
         scopedSlots: { customRender: 'cost' },
@@ -423,6 +455,22 @@ const initVariableColimns=[
         scopedSlots: { customRender: 'cpb' },
         sorter:() => {}
     },
+    {
+        title: '3s播放数',
+        dataIndex: 'play3sCount',
+        tip: '总花费/行为数',
+        align: 'center',    
+        scopedSlots: { customRender: 'play3sCount' },
+        sorter:() => {}
+    },
+    {
+        title: '3s播放率',
+        dataIndex: 'play3sRate',
+        tip: '总花费/行为数',
+        align: 'center',    
+        scopedSlots: { customRender: 'play3sRate' },
+        sorter:() => {}
+    },
 ]
 
 let detailColumn=[
@@ -456,10 +504,14 @@ let detailColumn=[
 export default {
   data() {
     return {
+      searchLoading:false,
+
+      designList:[],
        detailLoading:false,
       clip:undefined,
       shot:undefined,
       plan:undefined,
+      leaderId:undefined,
       //明细数据
       visibleDetail:false,
       detailColumn,
@@ -541,6 +593,11 @@ export default {
       
   },
   methods: {
+    filterOption(input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      );
+    },
     //点击查看明细按钮的事件
     opendetail(text, record) {
       console.log(text, record)
@@ -572,6 +629,7 @@ export default {
     },
       //自定义之后修改父元素表头
     changeColumn(val){
+      console.log(val)
         this.columns=[...val];
         if(this.columns.length> this.columnsFixd.length&&this.columns.length<9){
           this.scrollX=0;
@@ -585,7 +643,7 @@ export default {
           // this.scrollX=2000+200*(this.columns.length-this.columnsFixd.length)
         }else if(this.columns.length>=9){
           this.columns.forEach((element,index) => {
-            if(index<this.columnsFixd.length){
+            if(index<this.columnsFixd.length-1){
               element.width=120
               element.fixed='left'
             }             
@@ -673,6 +731,7 @@ export default {
     //网络请求table数据函数
     HttpPost(){
       this.loading=true;
+      this.searchLoading=true
       show = 0
       postAction('/ctop/kuaishou/videoReport/list', {
         startDate: this.dateValue[0].format('YYYY-MM-DD'),
@@ -682,13 +741,15 @@ export default {
         accountIds:this.appId,
         target:this.target,
         order:this.order,
-        clip:this.clip?this.clip:'',
-        shot:this.shot?this.shot:'',
-        plan:this.plan?this.plan:'',
+        clipId:this.clip?this.clip:'',
+        shotId:this.shot?this.shot:'',
+        planId:this.plan?this.plan:'',
+        leaderId:this.leaderId?this.leaderId:''
       }).then(res => {
         let resArr = []
         this.data=[];
-        this.loading = false
+        this.loading = false;
+        this.searchLoading=false;
         if (res.success) {
           // let result = res.result
           // this.data.push({ ...result, key: 1 })
@@ -717,9 +778,9 @@ export default {
         let column = this.columns.map((item, index) => {
           return item.dataIndex
         })      
-        columns=column.splice(7)
+        columns=column.splice(this.columnsFixd.length)
       }
-      downFilePost('/ctop/kuaishou/videoReport/excel', {
+      downFilePost('/ctop/kuaishou/videoReport/excelV2', {
         columns,
         target:this.target,
         order:this.order,
@@ -728,10 +789,10 @@ export default {
         accountIds:this.appId,
         exportType,
         signature: this.signature,
-        signature: this.signature,
-        clip:this.clip?this.clip:'',
-        shot:this.shot?this.shot:'',
-        plan:this.plan?this.plan:'',
+        clipId:this.clip?this.clip:'',
+        shotId:this.shot?this.shot:'',
+        planId:this.plan?this.plan:'',
+        leaderId:this.leaderId?this.leaderId:''
       }).then(res => {
         this.exportLoading=false;
         let blob = new Blob([res], {
@@ -834,6 +895,15 @@ export default {
     },
     
 
+    // 获取设计人员
+    getDesignList(){
+      postAction('/ctop/kuaishou/videoReport/getDesignList').then(res=>{
+        console.log(res);
+        if(res.success){
+            this.designList=res.result
+        }
+      })
+    }
     
    },
   
@@ -876,9 +946,19 @@ export default {
     })
     
   },
-  deactivated() {
+  // deactivated() {
+  //   let arr = JSON.stringify(this.columns)
+  //   console.log(arr)
+  //   postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
+  //     json: arr,
+  //     columnType: 4
+  //   }).then(res => {
+  //     // console.log(res)
+  //   })
+  // },
+  beforeDestroy() {
     let arr = JSON.stringify(this.columns)
-    // console.log(arr)
+    console.log(arr)
     postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
       json: arr,
       columnType: 4
@@ -986,7 +1066,7 @@ filters: {
   },
 
   mounted() {
-    
+      this.getDesignList()
     //请求自定义列的数据
     postAction('/toutiao/videoReportDaily/videoInfoListTotalExportExcelPermission').then(res => {
       console.log(res)

+ 5 - 3
src/views/modules/Statistics/videoStatics/TTvideoStatics.vue

@@ -189,7 +189,7 @@
     <!-- 明细表 -->
 
       <a-modal v-model="visibleDetail" title="详细信息" width="50%" :footer="null" >
-        <a-button type="default" @click="exportExcel('exportDetail')" id="mybtn">导出报表</a-button>
+        <a-button type="default" @click="exportExcel('exportDetail')" id="mybtn" :loading="visibleLoading">导出报表</a-button>
         <a-table
           :columns="detailColumn"
           :data-source="detailData"
@@ -359,6 +359,7 @@ const initVariableColimns=[
 export default {
   data() {
     return {
+      visibleLoading:false,
       noImg:require('@/assets/noImg.png'),
       detailLoading:false,
       clip:undefined,
@@ -487,7 +488,7 @@ export default {
           // this.scrollX=2000+200*(this.columns.length-this.columnsFixd.length)
         }else if(this.columns.length>=9){
           this.columns.forEach((element,index) => {
-            if(index<this.columnsFixd.length){
+            if(index<this.columnsFixd.length-1){
               element.width=120
               element.fixed='left'
             }             
@@ -616,7 +617,7 @@ export default {
       
         columns=column.splice(7)
       }else{
-        
+        this.visibleLoading = true
       }
       
       downFilePost('/ctop/byteDance/videoReport/excel', {
@@ -634,6 +635,7 @@ export default {
 
       }).then(res => {
         this.exportLoading=false;
+        this.visibleLoading = false
         let blob = new Blob([res], {
           type:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
         })

+ 6 - 7
src/views/modules/Statistics/yicheStatistics/dayStatistics.vue

@@ -76,10 +76,8 @@ th div {
             optionFilterProp="children"
             :filterOption="filterOption"
           >
-            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
-              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.projectId">
+              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
           <span style="margin-left:10px">日期选择:</span>
@@ -527,10 +525,11 @@ export default {
     },
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     getParticipateList() {
-      getAction('/ctop/projectMember/participateList', {
-        userId: this.userInfo().id
+      postAction('/ctop/projectMember/participateListByMediaId', {
+        userId: this.userInfo().id,
+        type: "kuaishou"
       }).then(res => {
-        if (res.code == 0) {
+        if (res.success) {
           this.dataElse = res.result
         }
       })

+ 6 - 7
src/views/modules/Statistics/yicheStatistics/timeStatistics.vue

@@ -76,10 +76,8 @@ th div {
             optionFilterProp="children"
             :filterOption="filterOption"
           >
-            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
-              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.projectId">
+              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
           <span style="margin-left:10px">日期选择:</span>
@@ -269,10 +267,11 @@ export default {
     },
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     getParticipateList() {
-      getAction('/ctop/projectMember/participateList', {
-        userId: this.userInfo().id
+      postAction('/ctop/projectMember/participateListByMediaId', {
+        userId: this.userInfo().id,
+        type: "kuaishou"
       }).then(res => {
-        if (res.code == 0) {
+        if (res.success) {
           this.dataElse = res.result
         }
       })

+ 49 - 16
src/views/modules/advertiser/AdvertiserList.vue

@@ -19,15 +19,13 @@
                 @search="getList"
               >
                 <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
-                  {{
-                  item.name
-                  }}
+                  {{ item.name }}
                 </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :md="8" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
               <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
@@ -44,18 +42,18 @@
       <a-tab-pane key="product" tab="产品列表">
         <a-tag
           color="blue"
-          style="height:30px;line-height:30px;font-size:14px;margin-bottom:20px"
+          style="height: 30px; line-height: 30px; font-size: 14px; margin-bottom: 20px"
           v-if="queryParam.advertiserId"
         >
-          {{advertiserName}}
+          {{ advertiserName }}
           <a-icon type="close" @click="clear('advertiserId')" />
         </a-tag>
-        <a-row :gutter="24" style="margin-bottom:20px">
+        <a-row :gutter="24" style="margin-bottom: 20px">
           <a-col :md="8" :sm="8">
             <a-input placeholder="请输入产品名称" v-model="queryParam.productName"></a-input>
           </a-col>
           <a-col :md="8" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
             </span>
           </a-col>
@@ -64,18 +62,18 @@
       <a-tab-pane key="project" tab="项目列表">
         <a-tag
           color="blue"
-          style="height:30px;line-height:30px;font-size:14px;margin-bottom:20px"
+          style="height: 30px; line-height: 30px; font-size: 14px; margin-bottom: 20px"
           v-if="queryParam.productId"
         >
-          {{advertiserName?advertiserName+' / '+productName:productName}}
+          {{ advertiserName ? advertiserName + ' / ' + productName : productName }}
           <a-icon type="close" @click="clear('productId')" />
         </a-tag>
-        <a-row :gutter="24" style="margin-bottom:20px">
+        <a-row :gutter="24" style="margin-bottom: 20px">
           <a-col :md="8" :sm="8">
             <a-input placeholder="请输入项目名称" v-model="queryParam.projectName"></a-input>
           </a-col>
           <a-col :md="8" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
             </span>
           </a-col>
@@ -96,6 +94,25 @@
         :loading="loading"
         @change="handleTableChange"
       >
+        <span slot="ocpxActionType" slot-scope="text">
+          <div v-if="text">
+            <span v-for="(item, index) of JSON.parse(text)" :key="index"
+              >{{ item | ocpxActionType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
+            >
+          </div>
+          <div v-else>-</div>
+
+          <!-- {{ text | ocpxActionType }} -->
+        </span>
+        <span slot="bidType" slot-scope="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
+            >
+          </div>
+          <div v-else>-</div>
+        </span>
+
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
@@ -105,7 +122,7 @@
           </a-popconfirm>
         </span>
         <span slot="actionProduct" slot-scope="text, record">
-          <a @click="handleEditElse(record,'product')">编辑</a>
+          <a @click="handleEditElse(record, 'product')">编辑</a>
 
           <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@@ -113,7 +130,7 @@
           </a-popconfirm>
         </span>
         <span slot="actionProject" slot-scope="text, record">
-          <a @click="handleEditElse(record,'project')">编辑</a>
+          <a @click="handleEditElse(record, 'project')">编辑</a>
 
           <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@@ -122,8 +139,8 @@
         </span>
         <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
         <span slot="maxDeepCpaBid" slot-scope="text">{{ text / 1000 }}</span>
-        <a slot="name" slot-scope="text,record" @click="toProduct(record,'product')">{{text}}</a>
-        <a slot="productName" slot-scope="text,record" @click="toProduct(record,'project')">{{text}}</a>
+        <a slot="name" slot-scope="text, record" @click="toProduct(record, 'product')">{{ text }}</a>
+        <a slot="productName" slot-scope="text, record" @click="toProduct(record, 'project')">{{ text }}</a>
       </a-table>
     </div>
     <!-- table区域-begin -->
@@ -256,6 +273,22 @@ const projectColumns = [
     },
   },
   {
+    title: '优化目标',
+    align: 'center',
+    dataIndex: 'bidType',
+    scopedSlots: {
+      customRender: 'bidType',
+    },
+  },
+  {
+    title: '转化目标',
+    align: 'center',
+    dataIndex: 'ocpxActionType',
+    scopedSlots: {
+      customRender: 'ocpxActionType',
+    },
+  },
+  {
     title: '供应商',
     align: 'center',
     dataIndex: 'supplierCode_dictText',

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

@@ -300,7 +300,9 @@ export default {
         324: '唤起应用',
         715: '微信复制优化目标',
         716: '多转化事件',
-        396:'注册优化目标'
+        396:'注册优化目标',
+        731:'广告观看5次',
+        732:'广告观看10次',
       }
       return data[sta]
     },

+ 3 - 1
src/views/modules/advertiser/ProjectMemberList.vue

@@ -70,7 +70,7 @@
             <a
               @click="projectLook(record)"
               v-if="noTitleKey == 'myProject'"
-              :disabled="record.needExamine == 0"
+              :disabled="record.needExamine == 0||record.needExamine == null"
             >待办事项</a>
           </a-badge>
         </span>
@@ -848,6 +848,7 @@ export default {
     },
     searchReset() {
       this.keyWord = ''
+      this.ipagination.current = 1
       // this.dataSource = this.dataElse
       if (this.noTitleKey == 'participation') {
         this.getParticipateList()
@@ -856,6 +857,7 @@ export default {
       }
     },
     searchQuery() {
+      this.ipagination.current=1
       if (this.noTitleKey == 'participation') {
         this.getParticipateList()
       } else {

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

@@ -300,7 +300,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { mapGetters } from 'vuex'
 import { httpAction, getAction, deleteAction } from '@/api/manage'
 
-import treeSelect from './modules/Treeselect'
+
 import moment from 'moment'
 import { postAction } from '../../../api/manage'
 import qs from 'qs'
@@ -309,7 +309,6 @@ export default {
   mixins: [JeecgListMixin],
   components: {
     UserAllocationModal,
-    treeSelect,
   },
   data() {
     return {

+ 76 - 29
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -30,7 +30,7 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="供应商"
-          v-if="model.mediaId=='2'||model.mediaId=='4'"
+          v-if="model.mediaId == '2' || model.mediaId == '4'"
         >
           <a-select
             optionFilterProp="children"
@@ -38,14 +38,8 @@
             :filterOption="filterOption"
             v-decorator="['supplierCode', validatorRules.supplierCode]"
           >
-            <a-select-option
-              :value="item.supplierCode"
-              v-for="(item, index) of supplierList"
-              :key="index"
-            >
-              {{
-              item.supplierName
-              }}
+            <a-select-option :value="item.supplierCode" v-for="(item, index) of supplierList" :key="index">
+              {{ item.supplierName }}
             </a-select-option>
           </a-select>
         </a-form-item>
@@ -59,9 +53,7 @@
             v-decorator="['advertiserId', validatorRules.advertiserId]"
           >
             <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
-              {{
-              item.name
-              }}
+              {{ item.name }}
             </a-select-option>
           </a-select>
         </a-form-item>
@@ -71,25 +63,50 @@
             showSearch
             :filterOption="filterOption"
             v-decorator="['productId', validatorRules.productId]"
-            :disabled="getFormFieldValue('advertiserId')==''||getFormFieldValue('advertiserId')==null"
+            :disabled="getFormFieldValue('advertiserId') == '' || getFormFieldValue('advertiserId') == null"
           >
             <a-select-option :value="item.id" v-for="(item, index) of listProduct" :key="index">
-              {{
-              item.productName
-              }}
+              {{ item.productName }}
             </a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
-          <a-input
-            placeholder="请输入最高出价"
-            v-decorator="['maxBid', validatorRules.maxBid]"
-            addonAfter="元"
-          />
+          <a-input placeholder="请输入最高出价" v-decorator="['maxBid', validatorRules.maxBid]" addonAfter="元" />
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高转化出价">
           <a-input placeholder="最高转化出价" v-decorator="['maxDeepCpaBid']" addonAfter="元" />
         </a-form-item>
+        <div v-if="model.mediaId == '2' || model.mediaId == '4'">
+          <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优化目标">
+            <a-select
+              v-decorator="['bidType', { rules: [{ required: true, message: '请输入表单名称' }], initialValue: 2 }]"
+              mode="multiple"
+            >
+              <a-select-option :value="2">点击数</a-select-option>
+              <a-select-option :value="10">OCPM</a-select-option>
+              <a-select-option :value="6">OCPC</a-select-option>
+            </a-select>
+          </a-form-item>
+          <div v-if="Array.isArray(getFormFieldValue('bidType'))">
+            <a-form-item
+              label="转化目标"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              v-show="
+                getFormFieldValue('bidType').findIndex((item) => item == 10) > -1 ||
+                getFormFieldValue('bidType').findIndex((item) => item == 6) > -1
+              "
+            >
+              <a-select v-model="model.ocpxActionType" mode="multiple">
+                <a-select-option :value="2">行为数</a-select-option>
+                <a-select-option :value="item.ocpxActionType" v-for="(item, index) in ocpxList" :key="index">{{
+                  item.ocpxActionName
+                }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </div>
+        </div>
+
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
           <a-select
             showSearch
@@ -103,7 +120,8 @@
               v-for="appModel in optionsElse"
               :key="appModel.userId + new Date().getTime()"
               :value="appModel.userId"
-            >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
+            >
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="运营负责人">
@@ -120,7 +138,8 @@
               v-for="appModel in options"
               :key="appModel.userId + new Date().getTime()"
               :value="appModel.userId"
-            >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
+            >
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="设计负责人">
@@ -137,7 +156,8 @@
               v-for="appModel in options"
               :key="appModel.userId + new Date().getTime()"
               :value="appModel.userId"
-            >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
+            >
           </a-select>
         </a-form-item>
       </a-form>
@@ -198,6 +218,7 @@ export default {
       optionsElse: [],
       supplierList: [],
       editAll: false,
+      ocpxList: [],
     }
   },
   created() {
@@ -205,7 +226,7 @@ export default {
   },
   methods: {
     validateInputCode(rule, value, callback) {
-      if ( value > 0) {
+      if (value > 0) {
         callback()
       } else {
         callback('请输入大于0的最高报价!')
@@ -238,7 +259,7 @@ export default {
       params.pageSize = 1000
       params.pageNo = 1
       console.log(params)
-      getAction(this.url.getList,params)
+      getAction(this.url.getList, params)
         .then((res) => {
           if (res.success) {
             console.log(res)
@@ -269,6 +290,7 @@ export default {
     edit(record) {
       this.getSupplierList()
       this.getList()
+      this.getOcpxList()
       if (record.advertiserId) {
         this.editAll = true
         getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
@@ -277,7 +299,18 @@ export default {
           }
         })
       }
-      var params = { ...record }
+
+      // var params = { ...record }
+      if (record.mediaId == '2' || record.mediaId == '4') {
+        console.log(record)
+        var params = { ...record }
+        params.bidType = record.bidType == null || record.bidType == '' ? [] : JSON.parse(record.bidType)
+        params.ocpxActionType =
+          record.ocpxActionType == null || record.ocpxActionType == '' ? [] : JSON.parse(record.ocpxActionType)
+      } else {
+        var { ocpxActionType, bidType, ...params } = record
+        this.showDian = false
+      }
 
       console.log(record)
       this.form.resetFields()
@@ -304,7 +337,8 @@ export default {
               'industryCode',
               'supplierCode',
               // 'advertiserType',
-              'saleId'
+              'saleId',
+              'bidType'
             )
           )
         } else {
@@ -323,7 +357,9 @@ export default {
               'industryCode',
               'supplierCode',
               // 'advertiserType',
-              'saleId'
+              'saleId',
+              'bidType',
+              'ocpxActionType'
             )
           )
         }
@@ -375,6 +411,10 @@ export default {
           formData.responsibleId = values.responsibleId
           formData.designResponsibleId = values.designResponsibleId
           formData.userId = formData.userId ? formData.userId : that.userInfo().id
+
+          formData.ocpxActionType =
+            formData.bidType == 2 ? JSON.stringify([0]) : JSON.stringify(formData.ocpxActionType)
+          formData.bidType = JSON.stringify(formData.bidType)
           httpAction(httpurl, formData, method)
             .then((res) => {
               if (res.success) {
@@ -401,6 +441,13 @@ export default {
       console.log(valueName, key)
       this.resId = key
     },
+    getOcpxList() {
+      this.getAction('/ocpx/kuaiShouOcpxActionTypeConfig/list').then((res) => {
+        if (res.success) {
+          this.ocpxList = res.result
+        }
+      })
+    },
   },
 }
 </script>

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

@@ -1,154 +0,0 @@
-<style lang="scss" scoped>
-.select-project {
-  width: 50%;
-}
-</style>
-<template>
-  <div class="select-project">
-    <treeselect
-      :multiple="multiple"
-      :disable-branch-nodes="!multiple"
-      :disable-fuzzy-matching="true"
-      :options="options"
-      :load-options="loadOptions"
-      placeholder="请选择项目"
-      v-model="value"
-      :value-consists-of="valueConsistsOf"
-      @select="update"
-      @input="emitValue"
-      :limit="2"
-      :limitText="
-        count => {
-          return '隐藏' + count + '条'
-        }
-      "
-      noChildrenText="该广告主下暂无项目"
-      noOptionsText="暂无项目"
-    />
-  </div>
-</template>
-
-<script>
-// import the component
-import Treeselect from '@riophae/vue-treeselect'
-// import the styles
-import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
-
-import { getAction, postAction } from '@/api/manage'
-import { mapGetters } from 'vuex'
-// We just use `setTimeout()` here to simulate an async operation
-// instead of requesting a real API server for demo purpose.
-
-export default {
-  data: () => ({
-    value: null,
-    valueConsistsOf: 'LEAF_PRIORITY',
-    options: [],
-    mediaId: ''
-  }),
-  props: {
-    multiple: {
-      type: Boolean,
-      default() {
-        return true
-      }
-    },
-    appId: {}
-  },
-  components: { Treeselect },
-  watch: {
-    $route(n, o) {},
-    appId: {
-      handler(n, o) {
-        console.log(n)
-        if (n.length == 0) {
-          if (this.multiple) {
-            this.value = []
-          } else {
-            this.value = ''
-          }
-        }
-      },
-      deep: true
-    }
-  },
-  methods: {
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    update(node, id) {
-      console.log(node, id)
-
-      getAction('/ctop/project/getProjectByAdvertiserAndMediaId', {
-        advertiserId: node.id,
-        mediaId: this.mediaId
-      }).then(res => {
-        console.log(res)
-        if (res.code == 0) {
-          if (res.result.length > 0) {
-            node.children = res.result.map(item => {
-              return {
-                id: item.id,
-                label: item.projectName
-              }
-            })
-          } else {
-          }
-        } else {
-          new Error('Failed to load options: network error.')
-        }
-      })
-    },
-    emitValue() {
-      this.$emit('update:appId', this.value)
-    },
-    getChildren() {},
-    loadOptions({ action, parentNode, callback }) {
-      // Typically, do the AJAX stuff here.
-      // Once the server has responded,
-      // assign children options to the parent node & call the callback.
-      if (action === LOAD_CHILDREN_OPTIONS) {
-        getAction('/ctop/project/getProjectByAdvertiserAndMediaId', {
-          advertiserId: parentNode.id,
-          mediaId: this.mediaId
-        }).then(res => {
-          console.log(res)
-          if (res.code == 0) {
-            if (res.result.length > 0) {
-              parentNode.children = res.result.map(item => {
-                return {
-                  id: item.id,
-                  label: item.projectName
-                }
-              })
-              callback()
-            } else {
-              parentNode.children = []
-              callback()
-            }
-          } else {
-            callback(new Error('Failed to load options: network error.'))
-          }
-        })
-      }
-    },
-    getParticipateList(mediaId) {
-      this.mediaId = mediaId
-      this.value = null
-      getAction('/ctop/advertiser/getAdvertiserByCompany', { userId: this.userInfo().id }).then(res => {
-        console.log(res)
-        if (res.code == 0) {
-          this.options = res.result.map(item => {
-            return {
-              id: item.id,
-              label: item.name,
-              children: null
-            }
-          })
-        }
-      })
-    }
-  },
-
-  mounted() {}
-}
-</script>

+ 15 - 21
src/views/modules/advertiser/modules/projectListModal.vue

@@ -95,26 +95,10 @@
               "
             >
               <a-select v-model="model.ocpxActionType" mode="multiple">
-
-
-
-                
                 <a-select-option :value="2">行为数</a-select-option>
-                <a-select-option :value="180">激活</a-select-option>
-                <a-select-option :value="53">表单提交</a-select-option>
-
-                <a-select-option :value="394">订单提交</a-select-option>
-                <a-select-option :value="348">使用有效线索</a-select-option>
-                <a-select-option :value="383">授信出价</a-select-option>
-                <a-select-option :value="384">完件出价</a-select-option>
-                <a-select-option :value="190">付费出价</a-select-option>
-                <a-select-option :value="191">首日ROI</a-select-option>
-                <a-select-option :value="396">注册优化目标</a-select-option>
-                <a-select-option :value="717">广告观看事件</a-select-option>
-                <a-select-option :value="324">唤起应用</a-select-option>
-
-                 <a-select-option :value="715">微信复制优化目标</a-select-option>
-                 <a-select-option :value="716">多转化事件</a-select-option>
+                <a-select-option :value="item.ocpxActionType" v-for="(item, index) in ocpxList" :key="index">{{
+                  item.ocpxActionName
+                }}</a-select-option>
               </a-select>
             </a-form-item>
           </div>
@@ -222,6 +206,7 @@ export default {
   },
   data() {
     return {
+      ocpxList: [],
       title: '操作',
       visible: false,
       model: {},
@@ -324,6 +309,7 @@ export default {
     edit(record) {
       this.getSupplierList()
       this.getList()
+      this.getOcpxList()
       if (record.advertiserId) {
         this.editAll = true
         getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
@@ -337,8 +323,9 @@ export default {
       //       }
       if (record.mediaId == '2' || record.mediaId == '4') {
         var params = { ...record }
-        params.bidType = (record.bidType == null||record.bidType == '') ? [] : JSON.parse(record.bidType)
-        params.ocpxActionType = (record.ocpxActionType == null||record.ocpxActionType == '') ? [] : 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
@@ -468,6 +455,13 @@ export default {
     get(valueName, key) {
       this.resId = key
     },
+    getOcpxList() {
+      this.getAction('/ocpx/kuaiShouOcpxActionTypeConfig/list').then((res) => {
+        if (res.success) {
+          this.ocpxList = res.result
+        }
+      })
+    },
   },
 }
 </script>

+ 759 - 0
src/views/modules/autoLaunch/accelerateExplorationList.vue

@@ -0,0 +1,759 @@
+<template>
+    <div class="toutiaoBatch">
+        
+        
+        <div class="toolbox-automate-rules-create-content_title">
+            <h3>加速探索列表</h3>
+            <!-- <a-button type='primary' @click="goNewConfigInfo" class="goNewConfigInfo">新建配置信息</a-button> -->
+        </div>
+        
+        <div class="topOptions">
+            <div >
+                <Treeselect :appId.sync="accountId" :multiple="false"  request="2,4"   ref="treeSelect" style="margin-bottom:8px;width:600px " />               
+            </div>
+            <span class="optionBtn">
+                <a-button type='primary' @click="search" class="searchBtn">查询</a-button>
+            </span>
+        </div>
+        <div class="tableArea">
+            <!-- <div class="tableOption" v-if="selectedRowKeys.length">
+                
+                
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+            </div> -->
+            <div class="table">
+                <a-table
+                    :columns="columns"
+                    :data-source="data"
+                    bordered
+                    :pagination="ipagination"
+                    :loading="loading"
+                    @change="sort"
+                    :scroll="{'x':scrollX}"
+                    
+                >
+                    <span slot="status" slot-scope="text,record">
+                        <a-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked='text==1'  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>    
+                        
+                    </span>
+                    <span slot="openProgramCreate" slot-scope="text,record">
+                        <a-spin :spinning="record.openProgramCreateSpin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked='text==1'  @change="openProgramCreateSwitchChange(text,record)"/>
+                            </div>
+                        </a-spin>    
+                        
+                    </span>
+                    <span slot="cpaBid" slot-scope="text">
+                        {{text/1000}}
+                    </span>
+                    <span slot="authName" slot-scope="text">
+                        <!-- <a href="javascript:;" >{{text}}</a> -->
+                        {{text || '-'}}
+                    </span>
+                    <span slot="time" slot-scope="text,record">
+                        {{record.startTime}}至{{record.endTime}}
+                    </span>
+                    <span slot="operator" slot-scope="text,record">
+                        <a href="javascript:;"  @click="goPlanList(record)">编辑</a>
+                        <a-divider type="vertical" />
+                        <a href="javascript:;"  @click="deleteRecord(record)">删除</a>
+                        <a-divider type="vertical" />
+                        <a-popover v-model="record.show" trigger="click" placement="topRight" @visibleChange='visibleChange'>
+                            <div slot="content">
+                                    <span style='font-weight:700;margin-right:15px;font-size:15px'>修改后重提</span>
+                                    <a-radio-group v-model="examineAgainType" >
+                                        <a-radio :value="1">修改广告语</a-radio>
+                                        <a-radio :value="0">修改封面</a-radio>
+                                    </a-radio-group>
+                                    <a-button type='default' @click="examineAgainCancel(record)" size='small' style='margin-right:10px'>取消</a-button>
+                                    <a-button type='primary' @click="examineAgainOk(record)" size='small'  class="ok">重提</a-button>
+                            </div>
+                            <a href="javascript:;"  type='primary' @click="()=>{record.show=true}">一键重提</a>
+                            
+                        </a-popover>
+                        <a-divider type="vertical" />
+                        <a-popover v-model="record.visible" trigger="click" placement="topLeft" @visibleChange='visibleChange'>
+                            <span slot="title">出价</span>
+                            <template  slot="content" style="width:300px;">
+                                <div style="margin:5px 0 0">
+                                    <span ><a-input-number :min="0" v-model="newBid" :step="0.1" placeholder="请输入出价" size="small" style='margin-right:20px;width:120px' /></span>
+                                    <p style="color:red;font-size:12px;height:16px;padding:5px 0">{{bidErrorMessage}}</p>
+                                </div>
+                                
+                                <div>
+                                    <a-button type='default' @click="bidChangeCancel(record)" size='small' style='margin-right:10px'>取消</a-button>
+                                    <a-button type='primary' @click="bidChangeOk(record)" size='small' class="ok">修改</a-button>
+                                </div>
+                                
+                            </template>
+                            <a href="javascript:;"  type='primary' @click="()=>{record.visible=true}">修改出价</a>
+                        </a-popover>
+                    </span>
+
+                </a-table>
+            </div>
+        </div>
+        
+       
+              
+    <!-- </a-spin> -->
+    </div>
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost,deleteAction } from '@/api/manage';
+// import { JeecgListMixin } from '@/mixins/ipagination'
+// import editableCell from './editableCell'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+import qs from 'qs'
+let typeValue='预算'
+
+
+const strategyColumns = [
+  
+  {
+    title: '广告组名称',
+    dataIndex: 'name',
+    key: 'name',
+    align: 'center',
+    scopedSlots: { customRender: 'name' },
+    width:200,
+    fixed: 'left'
+  },
+   {
+    title: '广告组ID',
+    dataIndex: 'authName',
+    key: 'authName',
+    align: 'center',
+    scopedSlots: { customRender: 'authName' }, 
+    width:150,
+    fixed: 'left'  
+  },
+  {
+    title: '所属广告账户',
+    dataIndex: 'accountId',
+    key: 'accountId',
+    align: 'center',
+    scopedSlots: { customRender: 'accountId' },   
+    width:200,
+    fixed: 'left' 
+  },
+  
+  {
+    title: '所属项目',
+    dataIndex: 'createTime',
+    key: 'createTime',
+    align: 'center',
+    scopedSlots: { customRender: 'createTime' },
+    width:150,
+    fixed: 'left' 
+  },
+  {
+    title: '探索状态',
+    dataIndex: 'createTsime',
+    key: 'createTime',
+    align: 'center',
+    scopedSlots: { customRender: 'createTime' },
+
+  },
+  {
+    title: '探索预算',
+    dataIndex: 'createTimes',
+    key: 'createTime',
+    align: 'center',
+    scopedSlots: { customRender: 'createTime' },
+    
+  },
+  {
+        title: '优化目标',
+        dataIndex: 'cpaBid',
+        align: 'center',    
+        scopedSlots: { customRender: 'cpaBid' },
+        // sorter:() => {}
+    },
+ 
+    {
+          title: '消耗(元)',
+          dataIndex: 'cost',
+          width:150,
+          tip: '广告在投放期间的花费总额',
+          align: 'center',
+          scopedSlots: { customRender: 'cost' },
+        //   sorter: () => {}
+        },
+        {
+          title: '封面曝光数',
+          dataIndex: 'photoShow',
+          tip: '广告在瀑布流被观看次数',
+          align: 'center',       
+          scopedSlots: { customRender: 'photoShow' },
+        //   sorter:() => {}
+        },
+        {
+          title: '封面点击数',
+          dataIndex: 'photoClick',
+          tip: '用户点击封面进入视频播放页的次数(数据会进行反作弊去重)',
+          align: 'center',
+        
+          scopedSlots: { customRender: 'photoClick' },
+        //   sorter: () => {}
+        },
+        {
+          title: '封面点击率',
+          dataIndex: 'clickRate',
+          tip: '封面点击数占封面展示数百分比',
+          align: 'center',    
+          scopedSlots: { customRender: 'clickRate' },
+        //   sorter:() => {}
+        },
+        {
+          title: '封面点击单价',
+          dataIndex: 'clickCost',
+          tip: '封面点击数占封面展示数百分比',
+          align: 'center',    
+          scopedSlots: { customRender: 'clickCost' },
+        //   sorter:() => {}
+        },
+        {
+          title: '转化数',
+          dataIndex: 'aclick',
+          tip: '用户进入视频播放页观看的次数(数据会进行反作弊去重)',
+          align: 'center',
+       
+          scopedSlots: { customRender: 'aClick' },
+        //   sorter:() => {}
+        },
+        {
+          title: '转化成本',
+          dataIndex: 'bclick',
+          tip: '用户在视频播放页单击转化按钮的次数/展示数*100%',
+          align: 'center',
+        
+          scopedSlots: { customRender: 'bClick' },
+        //   sorter:() => {}
+        },
+        
+        {
+          title: '转化率',
+          dataIndex: 'bClickRate',
+          tip: '行为数占素材曝光数百分比',
+          align: 'center',    
+          scopedSlots: { customRender: 'bClickRate' },
+        //   sorter:() => {}
+        },
+ {
+    title: '操作',
+    dataIndex: 'status',
+    key: 'status',
+    align: 'center',
+    scopedSlots: { customRender: 'status' },
+    width:150,
+    fixed:'right'
+  },
+
+];
+
+const publicColumns = [    
+    
+]
+
+export default {
+    name:'strategy-list',
+    components: {
+        // editableCell,
+        Treeselect,
+    },
+    // mixins: [JeecgListMixin],
+    data() {
+        return {
+            selectedRecord:{},
+            bidErrorMessage:'',
+            examineAgainType:1,
+            newBid:undefined,
+            examineAgain:false,
+            accountId:[],
+            accountList:[],
+            strategyState:undefined,
+            strategyName:'',
+            strategyId:undefined,
+            accountId:[],
+            scrollX:2500,
+            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;
+                }
+            },
+           
+            spinning:false,
+            moment,
+           
+            optionId:'',//input输入的id或关键词
+          
+           
+            selectDisable:true,
+            optValue:undefined,//操作设置的值 删除 暂停 开启
+            visible: false,//出价里的弹出框
+
+            //主页的表格
+            data:[],
+            columns:[...strategyColumns,...publicColumns],
+            selectedRowKeys:[],
+            
+            loading:false,
+            editID:0,
+
+            url: {               
+                list:'/ctop/aiKuaishouAdvertiserStrategy/list',
+                delete:'/ctop/aiKuaishouAdvertiserStrategy/delete',
+            },
+
+
+            xiugaiData:[],//存分别修改时候的数组
+        }
+    },
+    computed: {
+        hasSelected() {
+        return this.selectedRowKeys.length > 0;
+        },
+    },
+    methods: {
+        // 加速探索OK事件
+        targethandleOk(e){
+            this.targetVisible=true
+        },
+        //状态改变
+        switchChange(text,record){
+            // this.spinning=true;
+            console.log(text,record)
+            record.spin=true;
+            
+            
+            let status=text==1?0:1;
+            getAction(`/ctop/aiKuaishouAdvertiserStrategy/oprateStatus`,{
+                id:record.id,
+                status
+            }).then((res)=>{
+                
+                    record.spin=false;
+                if(res.success){
+                    this.getStrategyList()
+                    this.$message.success(res.message)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+           
+
+        },
+        //是否开启程序化创意状态改变
+        openProgramCreateSwitchChange(text,record){
+            // this.spinning=true;
+            console.log(text,record)
+            record.openProgramCreateSpin=true;
+            
+            
+            let status=text==1?0:1;
+            getAction(`/ctop/aiKuaishouAdvertiserStrategy/oprateCreativeStatus`,{
+                id:record.id,
+                status
+            }).then((res)=>{
+                
+                    record.openProgramCreateSpin=false;
+                if(res.success){
+                    this.getStrategyList()
+                    this.$message.success(res.message)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+           
+
+        },
+        examineAgainMethod(record){
+            console.log(record)
+            this.examineAgain=true;
+            this.selectedRecord=record
+        },
+        visibleChange(){
+            this.bidErrorMessage='';
+            this.examineAgainType=1;
+            this.newBid=undefined;
+            
+        },
+        bidChangeCancel(record){
+            record.visible=false;
+            this.newBid=undefined;
+            this.bidErrorMessage=''
+        },
+        bidChangeOk(record){
+            if(this.newBid){
+                record.visible=false;
+                postAction('/ai/batchUpdate/updateGroupBid',{
+                    accountId:record.accountId,
+                    bid:this.newBid*1000
+                }).then(res=>{
+                    console.log(res)
+                    if(res.code==0){
+                        this.$message.success(res.message)
+                        this.newBid=undefined;
+                        this.getStrategyList()
+                    }
+                    
+                })
+            }else{
+                this.bidErrorMessage='请正确填写出价'
+                // this.$message.error('请正确填写出价')
+            }
+            
+        },
+
+        examineAgainCancel(record){
+            record.show=false;
+            this.examineAgainType=1
+        },
+        examineAgainOk(record){
+            record.show=false;
+            postAction('/kuaishou/creative/again',{
+                accountId:record.accountId,
+                updateType:this.examineAgainType
+            }).then(res=>{
+                console.log(res);
+                if(res.code==0){
+                    this.$message.success('正在重提中,您可稍后查看结果')
+                }else{
+                    this.$message.success(res.message)
+                }
+                this.examineAgainType=1
+            })
+            
+        },
+        onSelectChange(selectedRowKeys) {
+            console.log('selectedRowKeys changed: ', selectedRowKeys);
+            this.selectedRowKeys = selectedRowKeys;
+        },
+        goNewConfigInfo(){
+            this.$router.push('/autoLaunch/configLaunchInfo')
+        },
+        goPlanList(record){
+            console.log(record)
+            this.$parent.currentStrategyId=record.id;
+            this.$router.push(`/autoLaunch/configLaunchInfo?id=${record.id}`)
+        },
+        deleteRecord(record){
+            this.loading=true
+            deleteAction(this.url.delete,{
+                id:record.id
+            }).then(res=>{
+                this.loading=false
+                if(res.success){
+                    this.$message.success(res.message);
+                    this.getStrategyList()
+                }else{
+                    this.$message.success(res.message);
+                }
+            })
+        },
+        filterOption(input, option) {
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+        },
+        
+        //查询按钮事件
+        search(){
+            this.ipagination.current=1;
+            this.getStrategyList()            
+        },
+        //点击分页
+        sort(pagination, filters, sorter, { currentDataSource }){
+            console.log(pagination)
+            this.ipagination.current=pagination.current;
+
+            this.ipagination.pageSize=pagination.pageSize;
+            this.getStrategyList()
+        },
+
+        getStrategyList(){
+            this.loading = true
+            console.log(this.accountId)
+            getAction(this.url.list,{
+                strategyId:this.strategyId==undefined?null:this.strategyId,
+                accountId:this.accountId,
+                pageNo:this.ipagination.current,
+                pageSize:this.ipagination.pageSize
+            }).then((res)=>{
+                this.data=[]
+                console.log(res)
+                this.loading = false
+                if(res.success){
+
+                    this.ipagination.total = res.result.total
+                    
+                    res.result.records.forEach((item)=>{
+                        item.key=item.id;
+                        item.show=false;
+                        item.visible=false;
+                        item.spin=false;
+                        item.openProgramCreateSpin=false;
+                    })
+
+                    this.data = res.result.records;
+                    this.selectedRowKeys=[];
+                }
+            })
+        },
+      
+    },
+    mounted() {
+       
+        this.getStrategyList()
+    },
+    
+    activated() {
+        this.getStrategyList()
+    },
+    beforeDestroy() {
+
+    },
+    filters: {
+        toPercentage(val) {
+            if(val){
+                if(typeof val != 'string'){
+                    return (val * 100).toFixed(2) + '%'
+                }else{
+                    return val
+                }
+            }else if(typeof val =='string'){
+                    return val
+                }
+            else{
+                return 0
+            }
+        },
+        //保留两位小数并且变成货币格式
+        decimalsHandle(val){
+
+            if(val && typeof val !='string'){
+                if(val>=0){
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0=str[0].split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return handleResult+'.'+str[1]
+                }else{
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0=str[0].substr(1).split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return '-'+handleResult+'.'+str[1]
+                }
+
+            }else if(typeof val =='string'){
+                return val
+            }
+            else{
+                return 0
+            }
+        },
+        //变成货币格式
+        formatCurrency(val){
+            if((val||val==0)&& typeof val !='string'){
+                let numberStr = val.toString()
+                let str = numberStr.split('').reverse()
+                for (let i = 0; i < str.length; i++) {
+                    if ((i + 1) % 4 === 0) {
+                    str.splice(i, 0, ',')
+                    }
+                }
+                str.reverse()
+                let handleResult = ''
+                for (let j = 0; j < str.length; j++) {
+                    handleResult += str[j]
+                }
+                return handleResult
+            }else if(typeof val =='string'){
+                    return val
+            }
+            else{
+                return '-'
+            }
+
+        },
+        
+        
+    }
+}
+</script>
+<style lang="scss">
+    #closeIcon{
+         color: #0E74D2;
+    }
+    .toutiaoBatch{
+        .ant-tag .anticon-close {      
+            color: #1890ff;        
+        }
+        .ant-tag .anticon-close:hover{      
+            color: rgba(0, 0, 0, 0.85);    
+        }
+
+    }
+    
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
+        background-color: #fff;
+        color: #333;
+    }
+    #batchModal{
+        .rules,.totalPrice{
+            font-weight: 600;
+        }
+
+        .selectePlan{
+            font-size: 14px;
+            font-weight: 700;
+            color: #333;
+            padding: 20px 0;
+        }
+        .totalPrice{
+            margin-left: 20px;
+        }
+        .modifyTable{
+            margin-top: 20px;
+            width: 100%;
+            height: 400px;
+            overflow: auto;
+            font-weight: 600;
+        }
+    }
+    #copyModal{
+        .ant-modal-header{
+            text-align: center;
+        }
+        .copyTip{
+            font-size: 12px;
+            color: #999;
+        }
+        .copyName{
+            width: 118px;
+            display: inline-block;
+            text-align: right;
+            .copyKeyStart{
+                color: red;
+            }
+        }
+        // font-weight: 600;
+    }
+</style>
+<style lang="scss" scoped>
+.toutiaoBatch{
+    .breadcrumb{
+            height: 22px;
+            font-size: 12px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #000000;
+            line-height: 22px;
+        }
+    background-color: #fff;
+    padding: 10px 20px;
+    position: relative;
+    width: 100%;
+    .OptinItem{
+        display: inline-block;
+        margin-right: 15px;
+        margin-top: 15px;
+        .ok{
+            margin-right: 15px;
+        }
+    }
+    .OptinItem:first-child{
+        margin-right: 10px;
+    }
+    .topOptions{
+        padding: 15px 0;
+        display: flex;
+        justify-content: space-between;
+        .topOpt{
+            width: 100%;
+            margin-bottom: 10px;
+        }
+    }
+    .optionBtn{
+        // display: inline-block;
+        float: right;
+        // .searchBtn{
+            // margin-right: 10px;
+        // }
+    }
+    .tableArea{
+        .tableOption{
+            padding: 20px 0;
+        }
+    }
+    .toolbox-automate-rules-create-content_title {
+        background-color: #fff;
+        display: flex;
+        flex-flow: row nowrap;
+        justify-content: flex-start;
+        align-items: center;
+        margin-bottom: 28px;
+        position: relative;
+        h3 {
+            font-size: 22px;
+            margin: 0;
+            font-weight: 400;
+            height: 30px;
+            line-height: 30px;
+        }
+        .goNewConfigInfo{
+            position: absolute;
+            right: 0;
+            top: 4px;
+        }
+    }
+
+}
+
+</style>

+ 647 - 0
src/views/modules/autoLaunch/appIdList.vue

@@ -0,0 +1,647 @@
+<template>
+    <div class="toutiaoBatch">
+        
+        
+        <div class="toolbox-automate-rules-create-content_title">
+            <h3>账户应用信息</h3>
+            <a-button type='primary' @click="goNewConfigInfo" class="goNewConfigInfo">添加应用</a-button>
+        </div>
+        
+        <div class="topOptions">
+            <div >
+                <Treeselect :appId.sync="accountId" :multiple="false"  request="2,4"   ref="treeSelect" style="margin-bottom:8px;width:600px " />               
+            </div>
+            <span class="optionBtn">
+                <a-button type='primary' @click="search" class="searchBtn">查询</a-button>
+            </span>
+        </div>
+        <div class="tableArea">
+            <!-- <div class="tableOption" v-if="selectedRowKeys.length">
+                
+                
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+            </div> -->
+            <div class="table">
+                <a-table
+                    :columns="columns"
+                    :data-source="data"
+                    bordered
+                    :pagination="ipagination"
+                    :loading="loading"
+                    @change="sort"
+                    :scroll="{'x':scrollX}"
+                    
+                >
+
+                    
+                    <span slot="authName" slot-scope="text">
+                        <!-- <a href="javascript:;" >{{text}}</a> -->
+                        {{text || '-'}}
+                    </span>
+                    <span slot="time" slot-scope="text,record">
+                        {{record.startTime}}至{{record.endTime}}
+                    </span>
+                    <span slot="status" slot-scope="text">
+                        {{text | handlerStatus}}
+                    </span>
+                    <span slot="operator" slot-scope="text,record">
+                        <a href="javascript:;"  @click="goPlanList(record)">编辑</a>
+                        <a-divider type="vertical" />
+                        <a href="javascript:;"  @click="deleteRecord(record)">删除</a>
+                        <a-divider type="vertical" />
+                        <a-popover v-model="record.show" trigger="click" placement="topRight" @visibleChange='visibleChange'>
+                            <div slot="content">
+                                    <span style='font-weight:700;margin-right:15px;font-size:15px'>修改后重提</span>
+                                    <a-radio-group v-model="examineAgainType" >
+                                        <a-radio :value="1">修改广告语</a-radio>
+                                        <a-radio :value="0">修改封面</a-radio>
+                                    </a-radio-group>
+                                    <a-button type='default' @click="examineAgainCancel(record)" size='small' style='margin-right:10px'>取消</a-button>
+                                    <a-button type='primary' @click="examineAgainOk(record)" size='small'  class="ok">重提</a-button>
+                            </div>
+                            <a href="javascript:;"  type='primary' @click="()=>{record.show=true}">一键重提</a>
+                            
+                        </a-popover>
+                        <a-divider type="vertical" />
+                        <a-popover v-model="record.visible" trigger="click" placement="topLeft" @visibleChange='visibleChange'>
+                            <span slot="title">出价</span>
+                            <template  slot="content" style="width:300px;">
+                                <div style="margin:5px 0 0">
+                                    <span ><a-input-number :min="0" v-model="newBid" :step="0.1" placeholder="请输入出价" size="small" style='margin-right:20px;width:120px' /></span>
+                                    <p style="color:red;font-size:12px;height:16px;padding:5px 0">{{bidErrorMessage}}</p>
+                                </div>
+                                
+                                <div>
+                                    <a-button type='default' @click="bidChangeCancel(record)" size='small' style='margin-right:10px'>取消</a-button>
+                                    <a-button type='primary' @click="bidChangeOk(record)" size='small' class="ok">修改</a-button>
+                                </div>
+                                
+                            </template>
+                            <a href="javascript:;"  type='primary' @click="()=>{record.visible=true}">修改出价</a>
+                        </a-popover>
+                    </span>
+
+                </a-table>
+            </div>
+        </div>
+        
+       
+              
+    <!-- </a-spin> -->
+    </div>
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost,deleteAction } from '@/api/manage';
+// import { JeecgListMixin } from '@/mixins/ipagination'
+// import editableCell from './editableCell'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+import qs from 'qs'
+let typeValue='预算'
+
+
+const strategyColumns = [
+  
+//   {
+//     title: 'ID',
+//     dataIndex: 'id',
+//     key: 'id',
+//     align: 'center',
+//     scopedSlots: { customRender: 'id' },
+//     width:110,
+    
+//   },
+//    {
+//     title: '所属账户名称',
+//     dataIndex: 'authName',
+//     key: 'authName',
+//     align: 'center',
+//     scopedSlots: { customRender: 'authName' }, 
+//     width:200  
+//   },
+  {
+    title: '所属账户ID',
+    dataIndex: 'accountId',
+    key: 'accountId',
+    align: 'center',
+    scopedSlots: { customRender: 'accountId' },   
+  },
+  
+  
+    {
+        title: '应用名称',
+        dataIndex: 'appName',
+        align: 'appName',    
+        scopedSlots: { customRender: 'appName' },
+        align: 'center',
+        // sorter:() => {}
+    },
+    {
+        title: '应用标识',
+        dataIndex: 'appVersion',
+        align: 'appVersion',    
+        scopedSlots: { customRender: 'appVersion' },
+        align: 'center',
+        // sorter:() => {}
+    },
+    {
+        title: '状态',
+        dataIndex: 'status',
+        align: 'status',    
+        scopedSlots: { customRender: 'status' },
+        align: 'center',
+        // sorter:() => {}
+    },
+    {
+        title: '备注',
+        dataIndex: 'remark',
+        align: 'remark',    
+        scopedSlots: { customRender: 'remark' },
+        align: 'center',
+        // sorter:() => {}
+    },
+    {
+        title: '创建时间',
+        dataIndex: 'createTime',
+        key: 'createTime',
+        align: 'center',
+        scopedSlots: { customRender: 'createTime' },
+            
+    },
+//  {
+//     title: '操作',
+//     dataIndex: 'operator',
+//     key: 'operator',
+//     align: 'center',
+//     scopedSlots: { customRender: 'operator' },
+//     width:350,
+   
+//   },
+
+];
+
+const publicColumns = [    
+    
+]
+
+export default {
+    name:'strategy-list',
+    components: {
+        // editableCell,
+        Treeselect,
+    },
+    // mixins: [JeecgListMixin],
+    data() {
+        return {
+            selectedRecord:{},
+            bidErrorMessage:'',
+            examineAgainType:1,
+            newBid:undefined,
+            examineAgain:false,
+            accountId:[],
+            accountList:[],
+            strategyState:undefined,
+            strategyName:'',
+            strategyId:undefined,
+            accountId:[],
+            scrollX:0,
+            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;
+                }
+            },
+           
+            spinning:false,
+            moment,
+           
+            optionId:'',//input输入的id或关键词
+          
+           
+            selectDisable:true,
+            optValue:undefined,//操作设置的值 删除 暂停 开启
+            visible: false,//出价里的弹出框
+
+            //主页的表格
+            data:[],
+            columns:[...strategyColumns,...publicColumns],
+            selectedRowKeys:[],
+            
+            loading:false,
+            editID:0,
+
+            url: {               
+                list:'/ai/aiKuaiShouAppInfo/pageList',
+                delete:'/ctop/aiKuaishouAdvertiserStrategy/delete',
+            },
+
+
+            
+        }
+    },
+    computed: {
+        hasSelected() {
+        return this.selectedRowKeys.length > 0;
+        },
+    },
+    methods: {
+        examineAgainMethod(record){
+            console.log(record)
+            this.examineAgain=true;
+            this.selectedRecord=record
+        },
+        visibleChange(){
+            this.bidErrorMessage='';
+            this.examineAgainType=1;
+            this.newBid=undefined;
+            
+        },
+        bidChangeCancel(record){
+            record.visible=false;
+            this.newBid=undefined;
+            this.bidErrorMessage=''
+        },
+        bidChangeOk(record){
+            if(this.newBid){
+                record.visible=false;
+                postAction('/ai/batchUpdate/updateGroupBid',{
+                    accountId:record.accountId,
+                    bid:this.newBid*1000
+                }).then(res=>{
+                    console.log(res)
+                    if(res.code==0){
+                        this.$message.success(res.message)
+                        this.newBid=undefined;
+                        this.getStrategyList()
+                    }
+                    
+                })
+            }else{
+                this.bidErrorMessage='请正确填写出价'
+                // this.$message.error('请正确填写出价')
+            }
+            
+        },
+
+        examineAgainCancel(record){
+            record.show=false;
+            this.examineAgainType=1
+        },
+        examineAgainOk(record){
+            record.show=false;
+            postAction('/kuaishou/creative/again',{
+                accountId:record.accountId,
+                updateType:this.examineAgainType
+            }).then(res=>{
+                console.log(res);
+                if(res.code==0){
+                    this.$message.success('正在重提中,您可稍后查看结果')
+                }else{
+                    this.$message.success(res.message)
+                }
+                this.examineAgainType=1
+            })
+            
+        },
+        onSelectChange(selectedRowKeys) {
+            console.log('selectedRowKeys changed: ', selectedRowKeys);
+            this.selectedRowKeys = selectedRowKeys;
+        },
+        goNewConfigInfo(){
+            this.$router.push('/autoLaunch/newAppId')
+        },
+        goPlanList(record){
+            console.log(record)
+            this.$parent.currentStrategyId=record.id;
+            this.$router.push(`/autoLaunch/configLaunchInfo?id=${record.id}`)
+        },
+        deleteRecord(record){
+            this.loading=true
+            deleteAction(this.url.delete,{
+                id:record.id
+            }).then(res=>{
+                this.loading=false
+                if(res.success){
+                    this.$message.success(res.message);
+                    this.getStrategyList()
+                }else{
+                    this.$message.success(res.message);
+                }
+            })
+        },
+        filterOption(input, option) {
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+        },
+        
+        //查询按钮事件
+        search(){
+            this.ipagination.current=1;
+            this.getStrategyList()            
+        },
+        //点击分页
+        sort(pagination, filters, sorter, { currentDataSource }){
+            console.log(pagination)
+            this.ipagination.current=pagination.current;
+
+            this.ipagination.pageSize=pagination.pageSize;
+            this.getStrategyList()
+        },
+
+        getStrategyList(){
+            this.loading = true
+            console.log(this.accountId)
+            getAction(this.url.list,{
+                strategyId:this.strategyId==undefined?null:this.strategyId,
+                accountId:this.accountId,
+                pageNo:this.ipagination.current,
+                pageSize:this.ipagination.pageSize
+            }).then((res)=>{
+                this.data=[]
+                console.log(res)
+                this.loading = false
+                if(res.success){
+
+                    this.ipagination.total = res.result.total
+                    
+                    res.result.records.forEach((item)=>{
+                        item.key=item.id;
+                        item.show=false;
+                        item.visible=false;
+                    })
+
+                    this.data = res.result.records;
+                    this.selectedRowKeys=[];
+                }
+            })
+        },
+      
+    },
+    mounted() {
+       
+        this.getStrategyList()
+    },
+    
+    activated() {
+        this.getStrategyList()
+    },
+    beforeDestroy() {
+
+    },
+    filters: {
+        toPercentage(val) {
+            if(val){
+                if(typeof val != 'string'){
+                    return (val * 100).toFixed(2) + '%'
+                }else{
+                    return val
+                }
+            }else if(typeof val =='string'){
+                    return val
+                }
+            else{
+                return 0
+            }
+        },
+        //保留两位小数并且变成货币格式
+        decimalsHandle(val){
+
+            if(val && typeof val !='string'){
+                if(val>=0){
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0=str[0].split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return handleResult+'.'+str[1]
+                }else{
+                    val=parseFloat(val).toFixed(2);
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0=str[0].substr(1).split('').reverse();
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return '-'+handleResult+'.'+str[1]
+                }
+
+            }else if(typeof val =='string'){
+                return val
+            }
+            else{
+                return 0
+            }
+        },
+        //变成货币格式
+        formatCurrency(val){
+            if((val||val==0)&& typeof val !='string'){
+                let numberStr = val.toString()
+                let str = numberStr.split('').reverse()
+                for (let i = 0; i < str.length; i++) {
+                    if ((i + 1) % 4 === 0) {
+                    str.splice(i, 0, ',')
+                    }
+                }
+                str.reverse()
+                let handleResult = ''
+                for (let j = 0; j < str.length; j++) {
+                    handleResult += str[j]
+                }
+                return handleResult
+            }else if(typeof val =='string'){
+                    return val
+            }
+            else{
+                return '-'
+            }
+
+        },
+        
+        handlerStatus(val){
+            let string='';
+            switch (val) {
+                case 0:
+                    string='待创建'
+                    break;
+                case 1:
+                    string='创建中'
+                    break;
+                case 2:
+                    string='创建成功'
+                    break;
+                case 3:
+                    string='创建失败'
+                    break;
+            
+                default:
+                    break;
+            }
+            return string
+        }
+    }
+}
+</script>
+<style lang="scss">
+    #closeIcon{
+         color: #0E74D2;
+    }
+    .toutiaoBatch{
+        .ant-tag .anticon-close {      
+            color: #1890ff;        
+        }
+        .ant-tag .anticon-close:hover{      
+            color: rgba(0, 0, 0, 0.85);    
+        }
+
+    }
+    
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
+        background-color: #fff;
+        color: #333;
+    }
+    #batchModal{
+        .rules,.totalPrice{
+            font-weight: 600;
+        }
+
+        .selectePlan{
+            font-size: 14px;
+            font-weight: 700;
+            color: #333;
+            padding: 20px 0;
+        }
+        .totalPrice{
+            margin-left: 20px;
+        }
+        .modifyTable{
+            margin-top: 20px;
+            width: 100%;
+            height: 400px;
+            overflow: auto;
+            font-weight: 600;
+        }
+    }
+    #copyModal{
+        .ant-modal-header{
+            text-align: center;
+        }
+        .copyTip{
+            font-size: 12px;
+            color: #999;
+        }
+        .copyName{
+            width: 118px;
+            display: inline-block;
+            text-align: right;
+            .copyKeyStart{
+                color: red;
+            }
+        }
+        // font-weight: 600;
+    }
+</style>
+<style lang="scss" scoped>
+.toutiaoBatch{
+    .breadcrumb{
+            height: 22px;
+            font-size: 12px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #000000;
+            line-height: 22px;
+        }
+    background-color: #fff;
+    padding: 10px 20px;
+    position: relative;
+    width: 100%;
+    .OptinItem{
+        display: inline-block;
+        margin-right: 15px;
+        margin-top: 15px;
+        .ok{
+            margin-right: 15px;
+        }
+    }
+    .OptinItem:first-child{
+        margin-right: 10px;
+    }
+    .topOptions{
+        padding: 15px 0;
+        display: flex;
+        justify-content: space-between;
+        .topOpt{
+            width: 100%;
+            margin-bottom: 10px;
+        }
+    }
+    .optionBtn{
+        // display: inline-block;
+        float: right;
+        // .searchBtn{
+            // margin-right: 10px;
+        // }
+    }
+    .tableArea{
+        .tableOption{
+            padding: 20px 0;
+        }
+    }
+    .toolbox-automate-rules-create-content_title {
+        background-color: #fff;
+        display: flex;
+        flex-flow: row nowrap;
+        justify-content: flex-start;
+        align-items: center;
+        margin-bottom: 28px;
+        position: relative;
+        h3 {
+            font-size: 22px;
+            margin: 0;
+            font-weight: 400;
+            height: 30px;
+            line-height: 30px;
+        }
+        .goNewConfigInfo{
+            position: absolute;
+            right: 0;
+            top: 4px;
+        }
+    }
+
+}
+
+</style>

+ 1 - 1
src/views/modules/autoLaunch/autoLaunchReport.vue

@@ -1987,7 +1987,7 @@ const publicColumns = [
 .autoLaunchReport{
 
 
-     .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+     .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

File diff suppressed because it is too large
+ 558 - 120
src/views/modules/autoLaunch/configLaunchInfo.vue


+ 256 - 62
src/views/modules/autoLaunch/configLaunchList.vue

@@ -8,34 +8,19 @@
         </div>
         
         <div class="topOptions">
-            <div>
-                <Treeselect :appId.sync="accountId" :multiple="false"  request="2,4"   ref="treeSelect" style="margin-bottom:8px;width:600px " />
-                <!-- <a-select mode="multiple"
-                    v-model="accountId"
-                    style="width: 600px"
-                    placeholder="请选择账户"
-                    :maxTagCount='1'
-                    allowClear
-                    show-search
-                    option-filter-prop="children"
-                    :filter-option="filterOption"
-                    >
-                    <a-select-option v-for="item in accountList" :key="item.account_id" :value='item.account_id'>
-                    {{ item.auth_name+'_('+(item.project_name||"无所属项目")+')' }}
-                    </a-select-option>
-                </a-select> -->
+            <div >
+                <Treeselect :appId.sync="accountId" :multiple="false"  request="2,4"   ref="treeSelect" style="margin-bottom:8px;width:600px " />               
             </div>
-            <!-- <span class="OptinItem">
-                <a-input-search placeholder="模板ID" v-model="strategyId" style="width: 280px"  />
-            </span> -->
             <span class="optionBtn">
                 <a-button type='primary' @click="search" class="searchBtn">查询</a-button>
             </span>
         </div>
         <div class="tableArea">
-            <div class="tableOption">
-               
-            </div>
+            <!-- <div class="tableOption" v-if="selectedRowKeys.length">
+                
+                
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+            </div> -->
             <div class="table">
                 <a-table
                     :columns="columns"
@@ -47,11 +32,26 @@
                     :scroll="{'x':scrollX}"
                     
                 >
-
+                    <span slot="status" slot-scope="text,record">
+                        <a-spin :spinning="record.spin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked='text==1'  @change="switchChange(text,record)"/>
+                            </div>
+                        </a-spin>    
+                        
+                    </span>
+                    <span slot="openProgramCreate" slot-scope="text,record">
+                        <a-spin :spinning="record.openProgramCreateSpin" size="small" >
+                            <div class="spin-content">
+                                <a-switch size="default" :checked='text==1'  @change="openProgramCreateSwitchChange(text,record)"/>
+                            </div>
+                        </a-spin>    
+                        
+                    </span>
                     <span slot="cpaBid" slot-scope="text">
                         {{text/1000}}
                     </span>
-                    <span slot="accountId_dictText" slot-scope="text">
+                    <span slot="authName" slot-scope="text">
                         <!-- <a href="javascript:;" >{{text}}</a> -->
                         {{text || '-'}}
                     </span>
@@ -62,13 +62,73 @@
                         <a href="javascript:;"  @click="goPlanList(record)">编辑</a>
                         <a-divider type="vertical" />
                         <a href="javascript:;"  @click="deleteRecord(record)">删除</a>
+                        <a-divider type="vertical" />
+                        <a-popover v-model="record.show" trigger="click" placement="topRight" @visibleChange='visibleChange'>
+                            <div slot="content">
+                                    <span style='font-weight:700;margin-right:15px;font-size:15px'>修改后重提</span>
+                                    <a-radio-group v-model="examineAgainType" >
+                                        <a-radio :value="1">修改广告语</a-radio>
+                                        <a-radio :value="0">修改封面</a-radio>
+                                    </a-radio-group>
+                                    <a-button type='default' @click="examineAgainCancel(record)" size='small' style='margin-right:10px'>取消</a-button>
+                                    <a-button type='primary' @click="examineAgainOk(record)" size='small'  class="ok">重提</a-button>
+                            </div>
+                            <a href="javascript:;"  type='primary' @click="()=>{record.show=true}">一键重提</a>
+                            
+                        </a-popover>
+                        <a-divider type="vertical" />
+                        <a-popover v-model="record.visible" trigger="click" placement="topLeft" @visibleChange='visibleChange'>
+                            <span slot="title">出价</span>
+                            <template  slot="content" style="width:300px;">
+                                <div style="margin:5px 0 0">
+                                    <span ><a-input-number :min="0" v-model="newBid" :step="0.1" placeholder="请输入出价" size="small" style='margin-right:20px;width:120px' /></span>
+                                    <p style="color:red;font-size:12px;height:16px;padding:5px 0">{{bidErrorMessage}}</p>
+                                </div>
+                                
+                                <div>
+                                    <a-button type='default' @click="bidChangeCancel(record)" size='small' style='margin-right:10px'>取消</a-button>
+                                    <a-button type='primary' @click="bidChangeOk(record)" size='small' class="ok">修改</a-button>
+                                </div>
+                                
+                            </template>
+                            <a href="javascript:;"  type='primary' @click="()=>{record.visible=true}">修改出价</a>
+                        </a-popover>
                     </span>
 
                 </a-table>
             </div>
         </div>
         
-       
+       <!-- 加速坍缩 -->
+        <!-- <a-modal v-model="targetVisible" title="加速探索" @ok="targethandleOk">
+            <div class="linkBody">
+                <a-row>
+                    <a-col :span="4">
+                        <p style="text-align:right">加速探索预算:</p>
+                    </a-col>
+                    <a-col :span="18">
+                        <a-input-number :min="100"  :step="0.01"  />
+                    </a-col>
+                </a-row>
+                <p></p>
+                <a-row>
+                    <a-col :span="4">
+                        <p style="text-align:right">最多探索量:
+                            <a-tooltip>
+                                <template slot="title">
+                                该广告账户中加速探索的广告组数量的最大值
+                                </template>
+                                <a-icon type="question-circle" />
+                            </a-tooltip>
+                        </p>
+                    </a-col>
+                    <a-col :span="18">
+                        <a-input-number :min="1" :max="10" :step="1"  />
+                    </a-col>
+                </a-row>
+                
+            </div>
+        </a-modal> -->
               
     <!-- </a-spin> -->
     </div>
@@ -87,24 +147,30 @@ let typeValue='预算'
 const strategyColumns = [
   
   {
-    title: 'ID',
-    dataIndex: 'id',
-    key: 'id',
+    title: '开关',
+    dataIndex: 'status',
+    key: 'status',
     align: 'center',
-    scopedSlots: { customRender: 'id' },
+    scopedSlots: { customRender: 'status' },
     width:110,
-    fixed: 'left' ,
+    
+  },
+   {
+    title: '所属账户名称',
+    dataIndex: 'authName',
+    key: 'authName',
+    align: 'center',
+    scopedSlots: { customRender: 'authName' }, 
+    width:300  
   },
-  
   {
-    title: '操作',
-    dataIndex: 'operator',
-    key: 'operator',
+    title: '所属账户ID',
+    dataIndex: 'accountId',
+    key: 'accountId',
     align: 'center',
-    scopedSlots: { customRender: 'operator' },
-    width:150,
-    fixed: 'left' ,
+    scopedSlots: { customRender: 'accountId' },   
   },
+  
   {
     title: '创建时间',
     dataIndex: 'createTime',
@@ -113,33 +179,35 @@ const strategyColumns = [
     scopedSlots: { customRender: 'createTime' },
         
   },
-  
-  {
-    title: '所属账户名称',
-    dataIndex: 'accountId_dictText',
-    key: 'accountId_dictText',
-    align: 'center',
-    scopedSlots: { customRender: 'accountId_dictText' }, 
-    width:200  
-  },
   {
-    title: '所属账户ID',
-    dataIndex: 'accountId',
-    key: 'accountId',
-    align: 'center',
-    scopedSlots: { customRender: 'accountId' },   
-  },
-
-];
-
-const publicColumns = [    
-    {
         title: '出价',
         dataIndex: 'cpaBid',
         align: 'center',    
         scopedSlots: { customRender: 'cpaBid' },
         // sorter:() => {}
     },
+//   {
+//         title: '是否开启程序化创建',
+//         dataIndex: 'openProgramCreate',
+//         align: 'center',    
+//         scopedSlots: { customRender: 'openProgramCreate' },
+//         sorter:() => {},
+//         width:180,
+//     },
+ {
+    title: '操作',
+    dataIndex: 'operator',
+    key: 'operator',
+    align: 'center',
+    scopedSlots: { customRender: 'operator' },
+    width:350,
+   
+  },
+
+];
+
+const publicColumns = [    
+    
 ]
 
 export default {
@@ -151,13 +219,19 @@ export default {
     // mixins: [JeecgListMixin],
     data() {
         return {
+            targetVisible:false,
+            selectedRecord:{},
+            bidErrorMessage:'',
+            examineAgainType:1,
+            newBid:undefined,
+            examineAgain:false,
             accountId:[],
             accountList:[],
             strategyState:undefined,
             strategyName:'',
             strategyId:undefined,
             accountId:[],
-            scrollX:1500,
+            scrollX:0,
             ipagination: {
                 current: 1,
                 pageSize: 10,
@@ -191,7 +265,7 @@ export default {
             data:[],
             columns:[...strategyColumns,...publicColumns],
             selectedRowKeys:[],
-            selectedRows:[],
+            
             loading:false,
             editID:0,
 
@@ -204,8 +278,122 @@ export default {
             xiugaiData:[],//存分别修改时候的数组
         }
     },
-    
+    computed: {
+        hasSelected() {
+        return this.selectedRowKeys.length > 0;
+        },
+    },
     methods: {
+        //状态改变
+        switchChange(text,record){
+            // this.spinning=true;
+            console.log(text,record)
+            record.spin=true;
+            
+            
+            let status=text==1?0:1;
+            getAction(`/ctop/aiKuaishouAdvertiserStrategy/oprateStatus`,{
+                id:record.id,
+                status
+            }).then((res)=>{
+                
+                    record.spin=false;
+                if(res.success){
+                    this.getStrategyList()
+                    this.$message.success(res.message)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+           
+
+        },
+        //是否开启程序化创意状态改变
+        openProgramCreateSwitchChange(text,record){
+            // this.spinning=true;
+            console.log(text,record)
+            record.openProgramCreateSpin=true;
+            
+            
+            let status=text==1?0:1;
+            getAction(`/ctop/aiKuaishouAdvertiserStrategy/oprateCreativeStatus`,{
+                id:record.id,
+                status
+            }).then((res)=>{
+                
+                    record.openProgramCreateSpin=false;
+                if(res.success){
+                    this.getStrategyList()
+                    this.$message.success(res.message)
+                }else{
+                    this.$message.error(res.message)
+                }
+            })
+           
+
+        },
+        examineAgainMethod(record){
+            console.log(record)
+            this.examineAgain=true;
+            this.selectedRecord=record
+        },
+        visibleChange(){
+            this.bidErrorMessage='';
+            this.examineAgainType=1;
+            this.newBid=undefined;
+            
+        },
+        bidChangeCancel(record){
+            record.visible=false;
+            this.newBid=undefined;
+            this.bidErrorMessage=''
+        },
+        bidChangeOk(record){
+            if(this.newBid){
+                record.visible=false;
+                postAction('/ai/batchUpdate/updateGroupBid',{
+                    accountId:record.accountId,
+                    bid:this.newBid*1000
+                }).then(res=>{
+                    console.log(res)
+                    if(res.code==0){
+                        this.$message.success(res.message)
+                        this.newBid=undefined;
+                        this.getStrategyList()
+                    }
+                    
+                })
+            }else{
+                this.bidErrorMessage='请正确填写出价'
+                // this.$message.error('请正确填写出价')
+            }
+            
+        },
+
+        examineAgainCancel(record){
+            record.show=false;
+            this.examineAgainType=1
+        },
+        examineAgainOk(record){
+            record.show=false;
+            postAction('/kuaishou/creative/again',{
+                accountId:record.accountId,
+                updateType:this.examineAgainType
+            }).then(res=>{
+                console.log(res);
+                if(res.code==0){
+                    this.$message.success('正在重提中,您可稍后查看结果')
+                }else{
+                    this.$message.success(res.message)
+                }
+                this.examineAgainType=1
+            })
+            
+        },
+        onSelectChange(selectedRowKeys) {
+            console.log('selectedRowKeys changed: ', selectedRowKeys);
+            this.selectedRowKeys = selectedRowKeys;
+        },
         goNewConfigInfo(){
             this.$router.push('/autoLaunch/configLaunchInfo')
         },
@@ -265,7 +453,11 @@ export default {
                     this.ipagination.total = res.result.total
                     
                     res.result.records.forEach((item)=>{
-                        item.key=item.id
+                        item.key=item.id;
+                        item.show=false;
+                        item.visible=false;
+                        item.spin=false;
+                        item.openProgramCreateSpin=false;
                     })
 
                     this.data = res.result.records;
@@ -393,7 +585,7 @@ export default {
 
     }
     
-    .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }
@@ -465,6 +657,8 @@ export default {
     }
     .topOptions{
         padding: 15px 0;
+        display: flex;
+        justify-content: space-between;
         .topOpt{
             width: 100%;
             margin-bottom: 10px;

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

@@ -367,7 +367,6 @@ export default {
 
 
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

+ 1 - 1
src/views/modules/autoLaunch/groupList.vue

@@ -977,7 +977,7 @@ export default {
 
     }
     
-    .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

+ 1 - 1
src/views/modules/autoLaunch/materialAndBid.vue

@@ -1982,7 +1982,7 @@ const publicColumns = [
 .autoLaunchReport{
 
 
-     .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+     .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

+ 494 - 0
src/views/modules/autoLaunch/newAppId.vue

@@ -0,0 +1,494 @@
+<template>
+  <div class="newAppId">
+    
+        <div class="moduler">
+            <div class="moduler-title">选择账户</div>
+            <div>
+            <div class="row-item">
+                <div class="hint-item"></div>
+                <div class="label-item">
+                <div class="text-item">账户</div>
+                <div class="required-item"></div>
+                </div>
+                <div class="input-item">                    
+                    <!-- <Treeselect :appId.sync="accountId" :multiple="false" request="2" reqUrl='/ctop/projectMember/getProjectAccountByUserId'  ref="treeSelect" style="margin-bottom:8px;width:580px " /> -->
+                   
+                    <Treeselect :appId.sync="accountId" :multiple="false"  request="2,4"   ref="treeSelect" style="margin-bottom:8px;width:600px " />               
+              
+                </div>
+            </div>
+            </div>
+        </div>
+     
+        
+    
+        <!-- 基础信息 -->
+        <div class="moduler">
+            <div class="moduler-title">应用信息</div>
+            <div class="row-item">
+                <div class="hint-item"></div>
+                    <div class="label-item">
+                    <div class="text-item">操作系统</div>
+                    <div class="required-item"></div>
+                </div>
+                <div class="input-item">
+                    <a-form-item>
+                          <a-radio-group  v-model="platform" >
+                            <a-radio-button :value="1">Android应用刚下载</a-radio-button>
+                            <a-radio-button :value="3">IOS应用下载</a-radio-button>
+                        </a-radio-group>
+                    </a-form-item>
+                </div>
+            </div>
+
+            <div class="row-item">
+            <div class="hint-item"> </div>
+            <div class="label-item">
+              <div class="text-item">上传应用图标</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+                
+              <uploadFile
+                  :value.sync="urlListImage.url"
+                  :checkFile="fileWater"
+                  @overUpload="overUploadImage"
+                  @removeUpload="deleteImage"
+                  :fileCount="1"
+                  uploadType="image"
+                  :disabled="!accountId"
+              />
+                
+            </div>
+            </div>
+            <div class="row-item">
+            <div class="hint-item"> </div>
+            <div class="label-item">
+              <div class="text-item">上传应用文件</div>
+              <div class="required-item"></div>
+            </div>
+            <div class="input-item">
+                
+                    <a :href="attachmentUrl" style="margin-right:20px;display:block" v-if="attachmentUrl">{{attachmentName}}</a>
+                    <a-upload
+                        name="file"
+                        :multiple="false"
+                        :action="uploadAction"
+                        :headers="tokenHeader"
+                        :file-list="fileList"
+                        :showUploadList="false"
+                        :beforeUpload="beforeUpload"
+                        @change="handleChange"
+                        style="margin-right:20px"
+                        
+                        >
+                            <a-button :disabled="!accountId&&!urlListImage.url || loadDisabled">
+                            <a-icon type="upload" />
+                                {{loadDisabled?'上传中,请稍后':'文件上传'}}
+                            </a-button>
+                    </a-upload>
+
+            </div>
+          </div>  
+            
+        </div>
+    
+      <div class="moduler">
+        <div class="opt">
+          <a-button type="default" style="margin-right:15px" @click="goBack">返回列表</a-button>
+         
+          <!-- <a-button type="primary" @click="goNext"  :loading="goNextloading">确定</a-button> -->
+        </div>
+      </div>
+
+  </div>
+</template>
+
+<script>
+import Vue from 'vue'
+import {ACCESS_TOKEN} from "@/store/mutation-types";
+import moment from 'moment'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+import { TreeSelect } from 'ant-design-vue';
+import qs from 'qs'
+const SHOW_PARENT = TreeSelect.SHOW_PARENT;
+// import selectCheckAll from './toutiaoTime'
+import BMF from 'browser-md5-file'
+import uploadFile from '@/components/uploadFile.vue'
+
+var str = ""
+for (let i = 0; i < 7*48; i++) {
+ str+='0'
+  
+}
+const fileSuffix = [
+  'xlsx',
+  'xls',
+  'zip'
+]
+export default {
+    components: {
+       
+        Treeselect,
+        uploadFile,
+    },
+    data() {
+        return {
+          platform:1,
+            urlListImage: {
+                url: '', 
+                md5:'',
+                signature:'',
+              imageToken:'',
+            },
+            attachmentName:'',
+            attachmentUrl:'',
+            treeData:[],
+            accountId:undefined,
+           
+            goNextloading:false,
+            goPlanShowloading:false,
+            
+            fileList:[],
+            isEidt:false,
+            loadDisabled:false,
+            tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
+            uploadAction:'',
+            imageinfo:{
+              signature:'',
+              imageToken:'',
+            }
+
+        }
+    },
+    watch: {
+        accountId(n,o){
+          this.urlListImage={
+                url: '',
+                signature:'',
+                imageToken:'',
+          }
+          this.fileList=[];
+          this. attachmentName='';
+            this.attachmentUrl='';
+        }
+    },
+    methods: {
+    
+        fileWater(file) {
+            console.log(file)
+            var bmf = new BMF()
+            var that = this
+            
+            this.urlListImage = {
+                url: '',
+                md5: '',
+                
+            }
+            
+            return new Promise( (resolve, reject)=> {
+                bmf.md5(file, (err, md5) => {
+                  that.urlListImage.name=file.name
+                  that.urlListImage.md5=md5
+                  that.urlListImage.size=file.size
+                })
+                resolve()
+            })
+        },
+        deleteImage(urls) {
+            console.log(urls, this.urlListImage.url)
+            this.urlListImage.url='';
+            
+        },
+        overUploadImage(urlAll) {
+            console.log(urlAll)
+            var that = this
+            that.material = []
+            that.imageArrList = []
+            var img
+            if (urlAll.length > 0) {
+                urlAll.forEach((ele,index)=>{
+
+                    this.urlListImage.url=ele.url
+                    postAction('/ai/aiKuaiShouAppInfo/uploadAppIconImage',{
+                      accountId:this.accountId,
+                      url:'http:'+this.urlListImage.url
+                    }).then(res=>{
+                      this.urlListImage.signature=res.signature
+                      this.urlListImage.imageToken=res.imageToken
+                    })
+                })
+                
+            } else {}
+        },
+        addImage(item) {
+            this.addImageVisible = true
+            this.addImageData = item
+        },
+        
+        //获取表单的某一个属性值
+        getFormData(className) {
+        return this.form.getFieldValue(className)
+        },
+       
+        goBack() {
+            this.$router.replace('/autoLaunch/appIdList')
+            this.$bus.$emit('remove', '/autoLaunch/newAppId')
+        },
+    
+       
+        //请求项目和账户内容
+        accountHttp(){
+            this.treeData=[];
+            this.accountIds=[];
+            getAction('/ctop/projectMember/getProjectAccountByUserId?mediaType=2', {}).then(res => {
+            if(res.success){
+                    // console.log(res);
+                    if(res.result){
+                        res.result.forEach((element,index) => {
+                        if(element){                  
+                            this.treeData.push({});                    
+                            this.treeData[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
+                            this.treeData[index].value='project'+element.project.projectId;
+                            this.treeData[index].key=element.project.projectId;
+                            this.treeData[index].mediaId=element.project.mediaId;
+                            this.treeData[index].children=[];
+                                                
+                            if(element.account.length){
+                            element.account.forEach((ele,i)=>{
+                                this.treeData[index].children.push({});
+                                this.treeData[index].children[i].title=ele.userName+'_'+ele.authName+'_'+element.project.projectName;
+                                this.treeData[index].children[i].value=ele.accountId;
+                                this.treeData[index].children[i].key=ele.accountId;
+                            })
+                                
+                            }                           
+                        }      
+                        });
+                        // console.log(this.treeData)
+                        
+                    }
+            }
+            })
+        },
+
+        
+        beforeUpload(file) {
+            // ${this.form.project}
+            if (process.env.NODE_ENV == 'development') { 
+                this.uploadAction= `/jeecg-boot/ai/aiKuaiShouAppInfo/importAppExcel?accountId=${this.accountId}&platform=${this.platform}&imageToken=${this.urlListImage.imageToken}`
+            } 
+            else if (process.env.NODE_ENV == 'debug') { 
+            } 
+            else if (process.env.NODE_ENV == 'production') { 
+
+              this.uploadAction= `${this.axios.defaults.baseURL}/ai/aiKuaiShouAppInfo/importAppExcel?accountId=${this.accountId}&platform=${this.platform}&imageToken=${this.urlListImage.imageToken}`
+            }
+
+            this.loadDisabled = true
+            const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
+            const fileName = file.name
+            const fileStrArr = fileName.split('.')
+            const suffix = fileStrArr[fileStrArr.length - 1]
+
+            let result = fileSuffix.some((item) => {
+                return item === suffix
+            })
+
+            if (!result) {
+                this.$message.error('不支持该文件类型')
+                this.loadDisabled = false
+                return false
+            }
+
+            // if (size > 10) {
+            //     this.$message.error('文件不能大于10MB')
+            //     this.loadDisabled = false
+            //     return false
+            // }
+            
+        },
+        handleChange(info) {
+            console.log(info)
+            let fileList = [...info.fileList];
+
+            // 1. Limit the number of uploaded files
+            //    Only to show two recent uploaded files, and old ones will be replaced by the new
+            fileList = fileList.slice(-2);
+
+            // 2. read from response and show file link
+            fileList = fileList.map(file => {
+                if (file.response) {
+                    // Component will show file.url as link
+                    file.url = file.response.url;
+                }
+                return file;
+            });
+            if(fileList.length>0){
+                this.fileList = [
+                    {
+                        ...fileList[fileList.length-1]
+                    }
+                ]
+            }else{
+                this.fileList=[]
+            }
+            // this.loadDisabled = false 
+            // this.$message.success('文件导入成功,异步创建中,请稍后查看...')
+            if (info.file.status !== 'uploading') {
+                console.log(info.file, info.fileList)
+            }
+            if (info.file.status === 'done') {
+                
+                this.loadDisabled = false 
+                if(info.file.response.code==0){
+                  this.$message.success(info.file.response.message)
+                  this.$router.replace('/autoLaunch/appIdList')
+                  this.$bus.$emit('remove', '/autoLaunch/newAppId')
+                }else{
+                  this.$message.error(info.file.response.message)
+                }
+                
+            } else if (info.file.status === 'error') {
+                this.$message.error(`${info.file.name}上传失败`)
+                this.loadDisabled = false
+            }
+
+            // console.log(this.form)
+        },
+        
+    },
+    
+  mounted() {
+    this.accountHttp()
+   
+  },
+}
+</script>
+<style lang="scss">
+.newAppId{
+  .ant-btn-danger {
+    background-color: #ff4d4f !important; 
+  }
+}
+
+
+.ant-tooltip-inner,
+.ant-tooltip-arrow::before {
+  background-color: #fff;
+  color: #333;
+}
+.ant-tooltip-inner {
+  span {
+    display: block;
+  }
+}
+.ant-tooltip {
+  max-width: 450px;
+}
+.newPlan {
+  .ant-radio-button-wrapper {
+    min-width: 80px;
+    text-align: center;
+  }
+  .ant-form-item {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin: 0;
+    padding: 0;
+    color: rgba(0, 0, 0, 0.65);
+    font-size: 14px;
+    font-variant: tabular-nums;
+    line-height: 1.5;
+    list-style: none;
+    -webkit-font-feature-settings: 'tnum';
+    font-feature-settings: 'tnum';
+    vertical-align: top;
+  }
+  .directedBody {
+    .ant-form-item {
+      margin-bottom: 20px;
+    }
+  }
+}
+</style>
+<style lang="scss" scoped>
+.newAppId {
+  font-family: PingFangSC-Regular, tahoma, arial, 'Hiragino Sans GB', 'Microsoft yahei', sans-serif;
+  color: #333;
+  ul,
+  li {
+    margin: 0;
+    padding: 0;
+    
+  }
+  .moduler {
+    background: #fff;
+    margin-bottom: 16px;
+    position: relative;
+    padding: 32px 24px 48px 32px;
+    border-radius: 4px;
+    box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
+    .moduler-title {
+      display: flex;
+      align-items: center;
+      font-size: 22px;
+      margin-bottom: 20px;
+    }
+    .row-item {
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      margin-bottom: 32px;
+    }
+    .row-item:last-of-type {
+      margin-bottom: 0;
+    }
+    .row-item .hint-item {
+      width: 24px;
+      min-width: 24px;
+      align-self: flex-start;
+      line-height: 20px;
+      height: 20px;
+      margin-top: 9px;
+    }
+    .row-item .label-item {
+      position: relative;
+      align-items: flex-start;
+      align-self: flex-start;
+      line-height: 20px;
+      height: 20px;
+      margin-top: 10px;
+      width: 80px;
+      min-width: 80px;
+      .text-item {
+        font-size: 14px;
+        width: 60px;
+      }
+    }
+    .row-item .required-item {
+      width: 4px;
+      height: 4px;
+      border-radius: 2px;
+      background: #f45858;
+      position: absolute;
+      right: 10px;
+      top: 50%;
+      transform: translateY(-50%);
+    }
+    .row-item .input-item {
+      min-width: 480px;
+      position: relative;
+      // height: 35px;
+      .tip {
+        font-size: 12px;
+        color: tomato;
+      }
+    }
+  }
+  .opt {
+    text-align: right;
+  }
+}
+</style>

+ 1 - 1
src/views/modules/autoLaunch/planList.vue

@@ -986,7 +986,7 @@ export default {
 
     }
     
-    .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

+ 2 - 3
src/views/modules/autoLaunch/setDirectional.vue

@@ -410,9 +410,9 @@
 
                                 <a-select-option :value="2">行为数</a-select-option>
                                 <a-select-option :value="180"
-                                v-if="strategyInfo.marketingGoal == '2' && groupTypeData.isActivate == '1'">激活</a-select-option>
+                                v-if=" groupTypeData.isActivate == '1'">激活</a-select-option>
                                 <a-select-option :value="53" v-if="
-                                    (strategyInfo.marketingGoal == '4' || strategyInfo.marketingGoal == '5') && groupTypeData.isFormSubmit == '1'
+                                     groupTypeData.isFormSubmit == '1'
                                 ">表单提交</a-select-option>
 
                                 <a-select-option :value="394" v-if="
@@ -1775,7 +1775,6 @@ export default {
     //     line-height: 32px;
     // }
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

+ 1 - 1
src/views/modules/autoLaunch/strategyList.vue

@@ -974,7 +974,7 @@ export default {
 
     }
     
-    .ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
+    .ant-tooltip-inner,.ant-tooltip-arrow::before{
         background-color: #fff;
         color: #333;
     }

+ 8 - 0
src/views/modules/columnConst/accountConst.js

@@ -1218,6 +1218,14 @@ export const KScustomFields= [
           scopedSlots: { customRender: 'eventCreditGrantAppRate' },
           sorter:() => {}
         },
+        {
+          title: '3s播放率',
+          dataIndex: 'play3sRate',
+          tip: '3s播放数/素材曝光数',
+          align: 'center',    
+          scopedSlots: { customRender: 'play3sRate' },
+          sorter:() => {}
+        },
       ]
     },
     {

File diff suppressed because it is too large
+ 1569 - 0
src/views/modules/columnConst/stockWatch.js


+ 21 - 39
src/views/modules/earlyWarningRules/pushTreeSelect.vue

@@ -81,7 +81,7 @@ export default {
   },
   methods: {
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
-  
+
     emitValue() {
       this.$emit('update:appId', this.value)
     },
@@ -90,52 +90,34 @@ export default {
       // Typically, do the AJAX stuff here.
       // Once the server has responded,
       // assign children options to the parent node & call the callback.
-      if (action === LOAD_CHILDREN_OPTIONS) {
-        getAction('/ctop/userAllocation/getAccountList', { projectId: parentNode.id, userId: this.userInfo().id }).then(
-          (res) => {
-            console.log(res)
-            if (res.code == 0) {
-              if (res.result.length > 0) {
-                parentNode.children = res.result.map((i) => {
-                  return {
-                    id: i.accountId,
-                    label:
-                      (i.userName.length == 2
-                        ? i.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
-                        : i.userName.length == 3
-                        ? i.userName + '\xa0\xa0\xa0\xa0'
-                        : i.userName) +
-                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
-                      i.accountId +
-                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
-                      i.authName,
-                  }
-                })
-                callback()
-              } else {
-                parentNode.children = []
-                callback()
-              }
-            } else {
-              callback(new Error('Failed to load options: network error.'))
-            }
-          }
-        )
-      }
     },
     getParticipateList() {
       //我参与的
-      getAction('/ctop/projectMember/participateListV2', {
+      this.postDataAction('/ctop/projectMember/participateListByMediaId', {
         userId: this.userInfo().id,
-        pageSize: 1000000,
-        pageNo: 1,
       }).then((res) => {
         if (res.code == 0) {
-          this.options = res.result.records.map((item) => {
+          this.options = res.result.map((item) => {
             return {
-              id: item.projectId,
+              id: item.projectId + 'projectId',
               label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
-              children: null,
+              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,
+                    }
+                  })
+                : [],
             }
           })
         }

+ 26 - 8
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -15,6 +15,7 @@
       <a-col :span="24" style="display: flex">
         <Treeselect :appId.sync="appId" :multiple="false" request="2,4" ref="treeSelect" style="margin: 8px 20px" />
         <a-button type="primary" style="margin: 10px" @click="addUser">搜索</a-button>
+        <a-button type="primary" style="margin: 10px; float: right" @click="newCreat">批量创建</a-button>
       </a-col>
     </a-row>
     <a-form layout="inline">
@@ -226,7 +227,14 @@
     </a-modal>
 
     <!-- 实时数据 -->
-    <a-modal v-model="realTimeVisiable" title="广告计划实时数据" @afterClose="clear" width="80%" :maskClosable="false">
+    <a-modal
+      v-model="realTimeVisiable"
+      title="广告计划实时数据"
+      @afterClose="clear"
+      width="80%"
+      :maskClosable="false"
+      :footer="false"
+    >
       <div class="optBody">
         <a-range-picker
           :disabled-date="disabledDate"
@@ -746,6 +754,13 @@ export default {
     },
   },
   methods: {
+    newCreat() {
+      if (this.appId) {
+        window.open('/user/new-batch?accountId=' + this.appId, '_blank')
+      } else {
+        window.open('/user/new-batch', '_blank')
+      }
+    },
     disabledDate(current) {
       // console.log(current)
       return (current && current > moment()) || (current && current < moment().subtract(7, 'days'))
@@ -869,7 +884,11 @@ export default {
       }
     },
     handleSubmit(e) {
-      this.$refs.copyGroup.handleSubmit(e)
+      if (this.unitId) {
+        this.$refs.copyGroup.handleSubmit(e)
+      } else {
+        this.$message.error('请选择广告组后操作')
+      }
     },
     toDetail(record) {
       localStorage.setItem('advertisingGroupKey', record.campaignId)
@@ -978,7 +997,6 @@ export default {
       this.searchLabel()
     },
     addUser() {
-      
       this.loading = true
       this.dataList = []
       var params = {}
@@ -988,7 +1006,7 @@ export default {
       if (this.appId) {
         this.getSpend(params)
         this.getCampaignList(params)
-        localStorage.setItem('accountId',this.appId)
+        localStorage.setItem('accountId', this.appId)
       } else {
         this.$message.error('请选择账户')
       }
@@ -1194,17 +1212,17 @@ export default {
     },
   },
   watch: {
-    allUnitCopy:function(n,o){
-      if(!n){
+    allUnitCopy: function (n, o) {
+      if (!n) {
         this.editUnit = '2'
       }
-    }
+    },
   },
 
   computed: {},
   activated() {
     this.manyTwo = this.many
-    this.$refs.treeSelect.getParticipateList()
+    // this.$refs.treeSelect.getParticipateList()
     if (this.appId == '') {
       return
     } else {

+ 22 - 8
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -1176,18 +1176,32 @@ let realTimeColumn=[
               ...res.result.appInfo,
               ...res.result.target
             }
-
+          if(this.campaignType=='2'||this.campaignType==2){
+            getAction('/kuaishou/batch/getIsActivate', {
+              accountId: localStorage.getItem('accountId'),
+              appId:this.copyData.appId,
+              campaignType:2
+            }).then(res => {
+              if (res.success) {
+                this.allForm.groupTypeData = res.result
+              }
+            })
+          }else{
+            getAction('/kuaishou/batch/getIsActivate', {
+              accountId: localStorage.getItem('accountId'),
+              campaignType:this.campaignType
+            }).then(res => {
+              if (res.success) {
+                this.allForm.groupTypeData = res.result
+              }
+            })
+          }
             this.copyLoading = false
           }
 
         })
-        getAction('/kuaishou/batch/getIsActivate', {
-          accountId: localStorage.getItem('accountId')
-        }).then(res => {
-          if (res.success) {
-            this.allForm.groupTypeData = res.result
-          }
-        })
+        
+       
       },
       toDetail(record) {
         // 点击改行时要做的事情

+ 19 - 21
src/views/modules/kuaishouapp/account/copyAllUnit.vue

@@ -197,12 +197,12 @@
         >
           <a-select v-model="item.ocpxActionType">
             <a-select-option :value="2">行为数</a-select-option>
-            <a-select-option :value="180" v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'"
+            <a-select-option :value="180" v-if=" allForm.groupTypeData.isActivate == '1'"
               >激活</a-select-option
             >
             <a-select-option
               :value="53"
-              v-if="(campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'"
+              v-if=" allForm.groupTypeData.isFormSubmit == '1'"
               >表单提交</a-select-option
             >
 
@@ -671,22 +671,22 @@ export default {
         }
       })
 
-        getAction('/kuaishou/batch/getWhiteList', {
-          accountId: item.accountId,
-        }).then((res) => {
-          if (res.success) {
-            // console.log(res)
-            if (res.result) {
-              // 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
-            } else {
-              this.allianceAccount = false
-              // this.creativeCategorySwitch = false
-              // this.actionbarClickUrlSwitch = false
-            }
+      getAction('/kuaishou/batch/getWhiteList', {
+        accountId: item.accountId,
+      }).then((res) => {
+        if (res.success) {
+          // console.log(res)
+          if (res.result) {
+            // 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
+          } else {
+            this.allianceAccount = false
+            // this.creativeCategorySwitch = false
+            // this.actionbarClickUrlSwitch = false
           }
-        })
+        }
+      })
       getAction('/kuaishou/batch/getProjectMaxBid', {
         accountId: item.accountId,
       }).then((res) => {
@@ -728,11 +728,9 @@ export default {
       this.templateList = []
       getAction('/batch/kuaishouTemplate/list', {
         accountId: accountId,
-        pageSize: 1000,
-        pageNo: 1,
       }).then((res) => {
         if (res.success) {
-          this.templateList = res.result.records.map((item, index) => {
+          this.templateList = res.result.map((item, index) => {
             return {
               ...item,
               key: index,
@@ -758,7 +756,7 @@ export default {
         unitNameCheck: false,
         deepConversionType: '',
         deepConversionBid: '',
-        ocpxActionType: this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+        ocpxActionType:  this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
       })
     },
     resData(index) {

+ 2 - 2
src/views/modules/kuaishouapp/account/copyGroup.vue

@@ -199,9 +199,9 @@
                       <a-radio-button :value="1">点击数</a-radio-button>
                       <a-radio-button :value="2">行为数</a-radio-button>
                       <a-radio-button :value="180"
-                        v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-radio-button>
+                        v-if=" allForm.groupTypeData.isActivate == '1'">激活</a-radio-button>
                       <a-radio-button :value="53"
-                        v-if="(campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'">
+                        v-if=" allForm.groupTypeData.isFormSubmit == '1'">
                         表单提交</a-radio-button>
                     </a-radio-group>
                   </a-form-item>

+ 41 - 36
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -236,9 +236,9 @@
 
                         <a-select-option :value="2">行为数</a-select-option>
                         <a-select-option :value="180"
-                          v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
+                          v-if=" allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
                         <a-select-option :value="53" v-if="
-                            (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
+                             allForm.groupTypeData.isFormSubmit == '1'
                           ">表单提交</a-select-option>
 
                         <a-select-option :value="394" v-if="
@@ -623,6 +623,45 @@
         this.$refs.application.showApplication()
       },
       handleOk(item, type, campaignId, unitNameCopy, isUpdateTrackUrl, clickTrackUrl) {
+        this.getAppList()
+        this.getCampaignList()
+        this.getMould()
+        getAction('/kuaishou/batch/getIsActivate', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.allForm.groupTypeData = res.result
+          }
+        })
+
+        getAction('/kuaishou/batch/getWhiteList',{
+          accountId:localStorage.getItem('accountId')
+        }).then(res=>{
+          if(res.success){
+            console.log(res)
+            if(res.result){
+              if(res.result.alliance_account == 1){
+                this.allianceAccount = true
+              }else{
+                this.allianceAccount = false
+              }
+            }else{
+              this.allianceAccount = false
+            }
+          }
+        })
+
+        getAction('/kuaishou/batch/getProjectMaxBid', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.maxBid = res.result / 1000
+          }
+        })
+
+
+
+
         this.checkedTrue = false
         this.nameValue = ''
         this.visible = true
@@ -991,41 +1030,7 @@
       },
     },
     activated: function () {
-      this.getAppList()
-      this.getCampaignList()
-      this.getMould()
-      getAction('/kuaishou/batch/getIsActivate', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.allForm.groupTypeData = res.result
-        }
-      })
 
-      getAction('/kuaishou/batch/getWhiteList',{
-        accountId:localStorage.getItem('accountId')
-      }).then(res=>{
-        if(res.success){
-          console.log(res)
-          if(res.result){
-            if(res.result.alliance_account == 1){
-              this.allianceAccount = true
-            }else{
-              this.allianceAccount = false
-            }
-          }else{
-            this.allianceAccount = false
-          }
-        }
-      })
-
-      getAction('/kuaishou/batch/getProjectMaxBid', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.maxBid = res.result / 1000
-        }
-      })
     }
   }
 </script>

+ 41 - 37
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -239,9 +239,9 @@
 
                         <a-select-option :value="2">行为数</a-select-option>
                         <a-select-option :value="180"
-                          v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
+                          v-if=" allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
                         <a-select-option :value="53" v-if="
-                            (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
+                             allForm.groupTypeData.isFormSubmit == '1'
                           ">表单提交</a-select-option>
 
                         <a-select-option :value="394" v-if="
@@ -636,6 +636,44 @@
         this.$refs.application.showApplication()
       },
       handleOk(item, type, campaignId, unitNameCopy, count, isUpdateTrackUrl, clickTrackUrl) {
+        this.getAppList()
+        this.getCampaignList()
+        this.getMould()
+        getAction('/kuaishou/batch/getIsActivate', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.allForm.groupTypeData = res.result
+          }
+        })
+
+        getAction('/kuaishou/batch/getWhiteList',{
+          accountId:localStorage.getItem('accountId')
+        }).then(res=>{
+          if(res.success){
+            console.log(res)
+            if(res.result){
+              if(res.result.alliance_account == 1){
+                this.allianceAccount = true
+              }else{
+                this.allianceAccount = false
+              }
+            }else{
+              this.allianceAccount = false
+            }
+          }
+        })
+
+        getAction('/kuaishou/batch/getProjectMaxBid', {
+          accountId: localStorage.getItem('accountId')
+        }).then(res => {
+          if (res.success) {
+            this.maxBid = res.result / 1000
+          }
+        })
+
+
+
         this.checkedTrue = false
         this.nameValue = ''
         this.visible = true
@@ -1024,41 +1062,7 @@
       },
     },
     activated: function () {
-      this.getAppList()
-      this.getCampaignList()
-      this.getMould()
-      getAction('/kuaishou/batch/getIsActivate', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.allForm.groupTypeData = res.result
-        }
-      })
-
-      getAction('/kuaishou/batch/getWhiteList',{
-        accountId:localStorage.getItem('accountId')
-      }).then(res=>{
-        if(res.success){
-          console.log(res)
-          if(res.result){
-            if(res.result.alliance_account == 1){
-              this.allianceAccount = true
-            }else{
-              this.allianceAccount = false
-            }
-          }else{
-            this.allianceAccount = false
-          }
-        }
-      })
-
-      getAction('/kuaishou/batch/getProjectMaxBid', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.maxBid = res.result / 1000
-        }
-      })
+     
     }
   }
 </script>

+ 14 - 1
src/views/modules/kuaishouapp/account/newMould.vue

@@ -47,7 +47,7 @@
         </span>
       </a-table>
     </a-row>
-    <a-modal v-model="visible" title="广告组创建信息" :width="900" v-if="visible" :maskClosable="false">
+    <a-modal v-model="visible" title="模板创建" :width="900" v-if="visible" :maskClosable="false" @cancel='newTemplateCancel'>
       <a-form-item label="模板名称" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
         <a-input placeholder="请输入模板名称" v-model="name" style="width:100%;position:relative;" />
@@ -147,6 +147,8 @@
       handleSubmit(e) {
         //   this.$refs.population.handleSubmit()
         e.preventDefault()
+        if(this.name){
+
         this.$refs.population.handleSubmit()
         var data = this.populationData
         console.log(JSON.stringify(data))
@@ -182,6 +184,10 @@
             }
           })
         }
+        
+        }else{
+          this.$message.error('请输入模板名字')
+        }
       },
       getData(className) {
         return this.form.getFieldValue(className)
@@ -195,6 +201,13 @@
         console.log(item.templateContent)
         this.visible = true
       },
+      newTemplateCancel(){
+        this.active = ''
+        this.editId = undefined
+        this.name = ''
+        this.populationData = {}
+        this.visible = false
+      },
       handleDelete(id) {
         deleteAction('/kuaishou/batch/deleteDirectionalTemplate', {
           id: id

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

@@ -45,7 +45,7 @@
         <creat-application ref="application" />
       </a-form-item>
       <a-form-item label="转化类型" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == '3'">
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" v-if="campaignType == 3">
         <a-radio-group buttonStyle="solid"
           v-decorator="['urlType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '1' }]">
           <a-radio-button value="1">淘宝商品</a-radio-button>
@@ -167,7 +167,7 @@
       </a-form-item>
       <a-form-item label=" " :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }" class="else-label" v-if="allForm.dayBudget == '1'">
-        <a-input placeholder="不小于100,不超过100000000,仅支持输入自然数" v-decorator="[
+        <a-input-number placeholder="不小于100,不超过100000000,仅支持输入自然数" style="width:100%" v-decorator="[
             'dayBudget',
             {
               rules: [{ required: true, message: '请填写预算' }, { validator: budgetValue }]
@@ -289,9 +289,9 @@
 
                         <a-select-option :value="2">行为数</a-select-option>
                         <a-select-option :value="180"
-                          v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
+                          v-if=" allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
                         <a-select-option :value="53" v-if="
-                            (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
+                             allForm.groupTypeData.isFormSubmit == '1'
                           ">表单提交</a-select-option>
 
                         <a-select-option :value="394" v-if="
@@ -591,7 +591,7 @@
           scheduleTime: '1',
           scheduleTimeData: '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
           group: [],
-          groupTypeData: null,
+          groupTypeData: {},
           fail: [],
           success: [],
           sceneId: [7],
@@ -672,18 +672,38 @@
         this.checkedTrue = e.target.checked
       },
       addGroup() {
-        this.allForm.group.push({
-          bidType:  10,
-          bid: '',
-          cpaBid: '',
-          showTipCheck: false,
-          deepConversionBidCheck: false,
-          unitName: '',
-          unitNameCheck: false,
-          deepConversionType: '',
-          deepConversionBid: '',
-          ocpxActionType:this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
-        })
+        if(this.campaignType=='2'||this.campaignType==2){
+          if(this.getData('appId')){
+            this.allForm.group.push({
+              bidType:  10,
+              bid: '',
+              cpaBid: '',
+              showTipCheck: false,
+              deepConversionBidCheck: false,
+              unitName: '',
+              unitNameCheck: false,
+              deepConversionType: '',
+              deepConversionBid: '',
+              ocpxActionType: this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+            })
+          }else{
+            this.$message.error('请选择目标应用之后添加广告组')
+          }
+        }else{
+           this.allForm.group.push({
+              bidType:  10,
+              bid: '',
+              cpaBid: '',
+              showTipCheck: false,
+              deepConversionBidCheck: false,
+              unitName: '',
+              unitNameCheck: false,
+              deepConversionType: '',
+              deepConversionBid: '',
+              ocpxActionType: this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+            })
+        }
+
       },
       resData(index) {
         this.allForm.group[index].bid = ''
@@ -959,7 +979,7 @@
                   var dataJson = JSON.stringify(dataElse)
                   localStorage.setItem('pans', dataJson)
                   localStorage.setItem('appId', this.getData('appId'))
-                 
+                  
                 }
               } else {
                 this.loading = false
@@ -974,6 +994,16 @@
       },
       handleChange(value) {
         //   this.$refs.population.getAppList(value)
+        this.allForm.group = []
+        getAction('/kuaishou/batch/getIsActivate', {
+          accountId: localStorage.getItem('accountId'),
+          appId:this.getData('appId'),
+          campaignType:2
+        }).then(res => {
+          if (res.success) {
+            this.allForm.groupTypeData = res.result
+          }
+        })
       },
       handleChangeMould(value) {
         if (value) {
@@ -1044,7 +1074,19 @@
         getAction('/kuaishou/batch/getCampaignList', params).then(res => {
           if (res.success) {
             this.campaignType = res.result.records[0].campaignType
-            console.log(this.campaignType)
+
+
+            if(this.campaignType!=2){
+              getAction('/kuaishou/batch/getIsActivate', {
+                accountId: localStorage.getItem('accountId'),
+                campaignType:this.campaignType
+              }).then(res => {
+                if (res.success) {
+                  this.allForm.groupTypeData = res.result
+                }
+              })
+            }
+            // console.log(this.campaignType)
           }
         })
       },
@@ -1062,13 +1104,8 @@
       this.getAppList()
       this.getCampaignList()
       this.getMould()
-      getAction('/kuaishou/batch/getIsActivate', {
-        accountId: localStorage.getItem('accountId')
-      }).then(res => {
-        if (res.success) {
-          this.allForm.groupTypeData = res.result
-        }
-      })
+
+
 
       getAction('/kuaishou/batch/getWhiteList',{
         accountId:localStorage.getItem('accountId')

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

@@ -2278,7 +2278,7 @@ export default {
   },
   mounted: function () {
     this.$nextTick(() => {
-      Splitting()
+      
       if (localStorage.getItem('pans')) {
         this.pans = JSON.parse(localStorage.getItem('pans')).map((item) => {
           return {
@@ -2397,6 +2397,7 @@ export default {
           }
         }
       })
+      Splitting()
     })
   },
 }

+ 31 - 4
src/views/modules/kuaishouapp/account/stepForm/Step4.vue

@@ -63,6 +63,9 @@
 .display-none-selset {
   display: none !important;
 }
+.only-step4 .ant-form-item-label {
+  text-align: left;
+}
 </style>
 <style scoped lang="scss">
 .actor-photo-list {
@@ -142,7 +145,7 @@ li.chouzhen.first:before {
 }
 </style>
 <template>
-  <a-card :body-style="{ padding: '24px 32px' }" :bordered="false" class="only-step3">
+  <a-card :body-style="{ padding: '24px 32px' }" :bordered="false" class="only-step4">
     <a-tabs style="width: 50%; margin: 0 auto" type="editable-card" hideAdd @edit="remove">
       <a-tab-pane
         v-for="(pane, bestIndex) in pans"
@@ -259,8 +262,8 @@ li.chouzhen.first:before {
                             >推荐封面</a
                           >
                           <br />
-                          <span v-for="(item, deleteIndex) of item.imageList" style="position: relative">
-                            <img :src="item.url" style="width: 18%; margin: 1%" :key="item.url" />
+                          <span v-for="(itemImg, deleteIndex) of item.imageList" style="position: relative">
+                            <img :src="itemImg.url" style="width: 18%; margin: 1%" :key="itemImg.url" />
                             <a-icon
                               type="close-circle"
                               @click="deleteData(index, bestIndex, deleteIndex)"
@@ -1725,7 +1728,31 @@ export default {
       if (this.pans.length == 0) {
         this.$bus.$emit('remove', '/account/stepForm')
       } else {
-        this.addCreative(0)
+         this.horizontalPhoto = [
+          {
+            videoList: [],
+            imageList: [],
+            creativeMaterialType: '2',
+            imageUrlList: [],
+            checkArrImage: [],
+            chouzhenShow: false,
+          },
+        ]
+        this.verticalPhoto = [
+          {
+            videoList: [],
+            imageList: [],
+            creativeMaterialType: '1',
+            imageUrlList: [],
+            checkArrImage: [],
+            chouzhenShow: false,
+          },
+        ]
+        this.captionsList = [{ captions: '' }]
+        this.stickerStylesValue = []
+        this.coverSlogansList = [{ coverSlogans: '' }]
+        this.addCreative(0)
+        this.addAdList(0)
         getAction('/kuaishou/batch/checkCreativeCount', {
           unitId: this.pansKey,
           accountId: localStorage.getItem('accountId'),

+ 4 - 0
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -1146,6 +1146,10 @@ export default {
       this.formAll.validateFields((err, values) => {
         if (!err) {
           //   this.checkArr
+          if(values.age){
+              values.min=values.age[0];
+              values.max=values.age[1];
+          }
           var json = {}
           if (this.allForm.appType == '2') {
             json.appIds = this.optionsAll

+ 44 - 38
src/views/modules/kuaishouapp/account/stepForm/stepModule/test.vue

@@ -3,10 +3,10 @@
     <table class="time_table table" v-on:mouseleave="mouseleave">
       <thead>
         <tr>
-          <th rowspan="2" style="width:120px">日期/时间</th>
+          <th rowspan="2" style="width: 120px">日期/时间</th>
         </tr>
         <tr>
-          <th class="unselectable" v-for="(num, index) in numData" :key="index" style="width:30px">{{ num }}</th>
+          <th class="unselectable" v-for="(num, index) in numData" :key="index" style="width: 30px">{{ num }}</th>
         </tr>
       </thead>
       <tbody>
@@ -41,8 +41,8 @@ export default {
       type: String,
       default() {
         return '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-      }
-    }
+      },
+    },
   },
   data() {
     return {
@@ -52,39 +52,39 @@ export default {
       timeData: [
         {
           date: '周一',
-          time: []
+          time: [],
         },
         {
           date: '周二',
-          time: []
+          time: [],
         },
         {
           date: '周三',
-          time: []
+          time: [],
         },
         {
           date: '周四',
-          time: []
+          time: [],
         },
         {
           date: '周五',
-          time: []
+          time: [],
         },
         {
           date: '周六',
-          time: []
+          time: [],
         },
         {
           date: '周日',
-          time: []
-        }
+          time: [],
+        },
       ],
       selectFlag: false,
       max: {
         x: 0,
-        y: 0
+        y: 0,
       },
-      dataString: ''
+      dataString: '',
     }
   },
   methods: {
@@ -102,7 +102,7 @@ export default {
     showOne(index, key) {
       //   this.timeData[index].time[key].isSelected = !this.timeData[index].time[key].isSelected
     },
-    mousedown: function(index, key) {
+    mousedown: function (index, key) {
       this.selectStart = []
       this.selectFlag = true
       if (this.timeData[index].time[key].value == false) {
@@ -114,10 +114,10 @@ export default {
       }
       this.selectStart.push({
         index: index,
-        key: key
+        key: key,
       })
     },
-    mouseover: function(index, key) {
+    mouseover: function (index, key) {
       // x 垂直方向  y 水平方向
       if (this.selectFlag) {
         if (index >= this.max.x) {
@@ -128,11 +128,11 @@ export default {
         }
         var start = {
           x: this.selectStart[0].index,
-          y: this.selectStart[0].key
+          y: this.selectStart[0].key,
         }
         var end = {
           x: index,
-          y: key
+          y: key,
         }
         for (var i = end.x; i <= this.max.x; i++) {
           for (var j = end.y; j <= this.max.y; j++) {
@@ -153,14 +153,14 @@ export default {
         }
       }
     },
-    mouseup: function(index, key) {
+    mouseup: function (index, key) {
       var start = {
         x: this.selectStart[0].index,
-        y: this.selectStart[0].key
+        y: this.selectStart[0].key,
       }
       var end = {
         x: index,
-        y: key
+        y: key,
       }
       /* 渲染选中的区域 */
       var data = []
@@ -179,7 +179,7 @@ export default {
         this.timeData[5].time,
         this.timeData[6].time
       )
-      this.dataString = arr.map(item => {
+      this.dataString = arr.map((item) => {
         if (item.isSelected) {
           return 1
         } else {
@@ -191,10 +191,10 @@ export default {
       this.selectFlag = false
       this.max = {
         x: 0,
-        y: 0
+        y: 0,
       }
     },
-    mouseleave: function() {
+    mouseleave: function () {
       this.selectFlag = false
     },
     setItemDate(sum) {
@@ -216,37 +216,43 @@ export default {
       }
     },
     init() {
-      var str = this.scheduleTime
+      var str = ''
+      if (this.scheduleTime) {
+        str = this.scheduleTime
+      } else {
+        str =
+          '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+      }
       var arr = str.split('')
       this.timeData = [
         {
           date: '周一',
-          time: []
+          time: [],
         },
         {
           date: '周二',
-          time: []
+          time: [],
         },
         {
           date: '周三',
-          time: []
+          time: [],
         },
         {
           date: '周四',
-          time: []
+          time: [],
         },
         {
           date: '周五',
-          time: []
+          time: [],
         },
         {
           date: '周六',
-          time: []
+          time: [],
         },
         {
           date: '周日',
-          time: []
-        }
+          time: [],
+        },
       ]
       for (let i = 0; i < arr.length; i++) {
         if (i < 24) {
@@ -265,16 +271,16 @@ export default {
           this.timeData[6].time.push({ isSelected: arr[i] == 1 ? true : false, move: false, value: false })
         }
       }
-    }
+    },
   },
   watch: {
     scheduleTime: {
       immediate: true, // immediate选项可以开启首次赋值监听
       handler(newVal, oldVal) {
         this.init()
-      }
-    }
-  }
+      },
+    },
+  },
 }
 </script>
 

+ 10 - 2
src/views/modules/kuaishouapp/batchCreation/campaignList.vue

@@ -15,6 +15,7 @@
       <a-col :span="24" style="display: flex">
         <Treeselect :appId.sync="appId" :multiple="false" request="2,4" ref="treeSelect" style="margin: 8px 20px" />
         <a-button type="primary" style="margin: 10px" @click="addUser">搜索</a-button>
+        <!-- <a-button type="primary" style="margin: 10px; float: right" @click="newCreat">批量创建</a-button> -->
       </a-col>
     </a-row>
     <a-form layout="inline">
@@ -671,6 +672,13 @@ export default {
     },
   },
   methods: {
+    newCreat() {
+      if (this.appId) {
+        window.open('/user/new-batch?accountId=' + this.appId, '_blank')
+      } else {
+        window.open('/user/new-batch', '_blank')
+      }
+    },
     getUnitData() {
       this.addUser()
       this.allUnitCopy = false
@@ -882,7 +890,7 @@ export default {
       if (this.appId) {
         this.getSpend(params)
         this.getCampaignList(params)
-        localStorage.setItem('campaignAccountId',this.appId)
+        localStorage.setItem('campaignAccountId', this.appId)
       } else {
         this.$message.error('请选择账户')
       }
@@ -1087,7 +1095,7 @@ export default {
   computed: {},
   activated() {
     this.manyTwo = this.many
-    this.$refs.treeSelect.getParticipateList()
+    // this.$refs.treeSelect.getParticipateList()
     if (this.appId == '') {
       return
     } else {

+ 5 - 7
src/views/modules/kuaishouapp/batchCreation/creat/creatUnit.vue

@@ -388,12 +388,12 @@
         >
           <a-select v-model="item.ocpxActionType">
             <a-select-option :value="2">行为数</a-select-option>
-            <a-select-option :value="180" v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'"
+            <a-select-option :value="180" v-if=" allForm.groupTypeData.isActivate == '1'"
               >激活</a-select-option
             >
             <a-select-option
               :value="53"
-              v-if="(campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'"
+              v-if=" allForm.groupTypeData.isFormSubmit == '1'"
               >表单提交</a-select-option
             >
 
@@ -1882,11 +1882,9 @@ export default {
       this.templateList = []
       getAction('/batch/kuaishouTemplate/list', {
         accountId: accountId,
-        pageSize: 1000,
-        pageNo: 1,
       }).then((res) => {
         if (res.success) {
-          this.templateList = res.result.records.map((item, index) => {
+          this.templateList = res.result.map((item, index) => {
             return {
               ...item,
               key: index,
@@ -1949,7 +1947,7 @@ export default {
         unitNameCheck: false,
         deepConversionType: '',
         deepConversionBid: '',
-        ocpxActionType: this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+        ocpxActionType:  this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
       })
     },
     resData(index) {
@@ -2348,7 +2346,7 @@ export default {
         viewComp: 7,
       }).then((res) => {
         if (res.success) {
-          this.siteList = res.result
+          this.siteLiRst = res.result
           if (this.siteList.length > 0) {
             this.showSite = true
           }

+ 7 - 9
src/views/modules/kuaishouapp/crossAccount/createUnit.vue

@@ -316,13 +316,13 @@
                     <a-form-model-item label="转化目标" v-if="unitName.bidType == 10">
                       <a-select v-model="unitName.ocpxActionType" style="width: 60%">
                         <a-select-option :value="2">行为数</a-select-option>
-                        <a-select-option :value="180" v-if="item.campaignType == '2' && groupTypeData.isActivate == '1'"
+                        <a-select-option :value="180" v-if=" groupTypeData.isActivate == '1'"
                           >激活</a-select-option
                         >
                         <a-select-option
                           :value="53"
                           v-if="
-                            (item.campaignType == '4' || item.campaignType == '5') && groupTypeData.isFormSubmit == '1'
+                             groupTypeData.isFormSubmit == '1'
                           "
                           >表单提交</a-select-option
                         >
@@ -683,13 +683,13 @@
                   <a-form-model-item label="转化目标" v-if="campaign.unitIdentical.bidType == 10">
                     <a-select v-model="campaign.unitIdentical.ocpxActionType" style="width: 60%">
                       <a-select-option :value="2">行为数</a-select-option>
-                      <a-select-option :value="180" v-if="item.campaignType == '2' && groupTypeData.isActivate == '1'"
+                      <a-select-option :value="180" v-if=" groupTypeData.isActivate == '1'"
                         >激活</a-select-option
                       >
                       <a-select-option
                         :value="53"
                         v-if="
-                          (item.campaignType == '4' || item.campaignType == '5') && groupTypeData.isFormSubmit == '1'
+                           groupTypeData.isFormSubmit == '1'
                         "
                         >表单提交</a-select-option
                       >
@@ -1027,12 +1027,12 @@
               <a-form-model-item label="转化目标" v-if="item.campaignOne.bidType == 10">
                 <a-select v-model="item.campaignOne.ocpxActionType" style="width: 60%">
                   <a-select-option :value="2">行为数</a-select-option>
-                  <a-select-option :value="180" v-if="item.campaignType == '2' && groupTypeData.isActivate == '1'"
+                  <a-select-option :value="180" v-if=" groupTypeData.isActivate == '1'"
                     >激活</a-select-option
                   >
                   <a-select-option
                     :value="53"
-                    v-if="(item.campaignType == '4' || item.campaignType == '5') && groupTypeData.isFormSubmit == '1'"
+                    v-if=" groupTypeData.isFormSubmit == '1'"
                     >表单提交</a-select-option
                   >
                   <a-select-option :value="394" v-if="groupTypeData.isOrderSubmit == '1'">订单提交</a-select-option>
@@ -1418,11 +1418,9 @@ export default {
       this.templateList = []
       getAction('/batch/kuaishouTemplate/list', {
         accountId: accountId,
-        pageSize: 1000,
-        pageNo: 1,
       }).then((res) => {
         if (res.success) {
-          this.templateList = res.result.records.map((item, index) => {
+          this.templateList = res.result.map((item, index) => {
             return {
               ...item,
               key: index,

+ 28 - 4
src/views/modules/kuaishouapp/crossAccount/templateModal.vue

@@ -42,7 +42,9 @@
       </a-form>
     </a-spin>
     <template slot="footer">
-      <a-button type="primary" @click="handleSubmit" :loading="loading"> 确定 </a-button>
+      <!-- <a-button type="primary" @click="handleSubmit" :loading="loading"> 确定 </a-button> -->
+      <a-button type="default" @click="()=>{this.visible=false}" > 取消 </a-button>
+      <a-button type="primary" @click="handleSubmit" :loading="loading"> {{this.type=='add'?'确定':'修改'}} </a-button>
     </template>
   </a-modal>
 </template>
@@ -68,6 +70,7 @@ export default {
 
       populationData: {},
       accountId: '',
+      templateId:undefined,
       type: 'add',
       loading: false,
     }
@@ -87,6 +90,8 @@ export default {
       this.type = type
       var params = {}
       params.templateId = templateId
+      this.templateId=templateId;
+      this.accountId = accountId
       getAction('/batch/kuaishouTemplateTarget/getDetailByTemplateId', params).then((res) => {
         if (res.success) {
           var dataJson = {
@@ -159,14 +164,15 @@ export default {
       this.$refs.population.handleSubmit()
       this.form.validateFieldsAndScroll((err, values) => {
         if (!err) {
-          this.loading = true
+          // this.loading = true
 
           var params = {
             ...this.populationData,
             templateName: values.templateName,
             accountId: this.accountId,
+            
           }
-
+          console.log(params)
           if (this.type == 'add') {
             postAction('/batch/kuaishouTemplate/createTemplate', params).then((res) => {
               if (res.success) {
@@ -186,7 +192,25 @@ export default {
               }
             })
           } else if (this.type == 'look') {
-            this.visible = false
+            params.templateId=this.templateId
+         
+            postAction('/batch/kuaishouTemplate/updateTemplate', params).then((res) => {
+              this.visible = false
+              if (res.success) {
+                this.loading = false
+
+                getAction('/batch/kuaishouTemplate/getTemplateByAccountId', {
+                  accountId: this.accountId,
+                }).then((res) => {
+                  if (res.success) {
+                    this.$emit('getData', this.accountId)
+                  }
+                })
+              } else {
+                this.loading = false
+                this.$message.error(res.result.message)
+              }
+            })
           }
         }
       })

File diff suppressed because it is too large
+ 4871 - 0
src/views/modules/kuaishouapp/newBatch/index.vue


File diff suppressed because it is too large
+ 1110 - 0
src/views/modules/kuaishouapp/newBatch/lookPreview.vue


+ 590 - 0
src/views/modules/kuaishouapp/newBatch/result.vue

@@ -0,0 +1,590 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="8" :sm="8">
+            <a-form-item label="广告主开户主体名称">
+              <!-- <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input> -->
+              <a-select
+                labelInValue
+                v-model="allIdUser"
+                placeholder="请选择广告主开户主体名称"
+                @keyup.enter.native="searchQueryOne"
+                @focus="getList"
+                showSearch
+                optionFilterProp="children"
+                :filterOption="filterOption"
+                @search="getList"
+              >
+                <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮区域 -->
+    <!-- <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </div>-->
+    <a-tabs @change="callbackTwo" v-model="active">
+      <a-tab-pane key="advertiser" tab="广告主列表"></a-tab-pane>
+      <a-tab-pane key="product" tab="产品列表">
+        <a-tag
+          color="blue"
+          style="height: 30px; line-height: 30px; font-size: 14px; margin-bottom: 20px"
+          v-if="queryParam.advertiserId"
+        >
+          {{ advertiserName }}
+          <a-icon type="close" @click="clear('advertiserId')" />
+        </a-tag>
+        <a-row :gutter="24" style="margin-bottom: 20px">
+          <a-col :md="8" :sm="8">
+            <a-input placeholder="请输入产品名称" v-model="queryParam.productName"></a-input>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-tab-pane>
+      <a-tab-pane key="project" tab="项目列表">
+        <a-tag
+          color="blue"
+          style="height: 30px; line-height: 30px; font-size: 14px; margin-bottom: 20px"
+          v-if="queryParam.productId"
+        >
+          {{ advertiserName ? advertiserName + ' / ' + productName : productName }}
+          <a-icon type="close" @click="clear('productId')" />
+        </a-tag>
+        <a-row :gutter="24" style="margin-bottom: 20px">
+          <a-col :md="8" :sm="8">
+            <a-input placeholder="请输入项目名称" v-model="queryParam.projectName"></a-input>
+          </a-col>
+          <a-col :md="8" :sm="8">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-tab-pane>
+      <a-button type="primary" slot="tabBarExtraContent" @click="addNew">新增</a-button>
+    </a-tabs>
+
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+        <span slot="ocpxActionType" slot-scope="text">
+          <div v-if="text">
+            <span v-for="(item, index) of JSON.parse(text)" :key="index"
+              >{{ item | ocpxActionType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
+            >
+          </div>
+          <div v-else>-</div>
+
+          <!-- {{ text | ocpxActionType }} -->
+        </span>
+        <span slot="bidType" slot-scope="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
+            >
+          </div>
+          <div v-else>-</div>
+        </span>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+        <span slot="actionProduct" slot-scope="text, record">
+          <a @click="handleEditElse(record, 'product')">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+        <span slot="actionProject" slot-scope="text, record">
+          <a @click="handleEditElse(record, 'project')">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+        <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
+        <span slot="maxDeepCpaBid" slot-scope="text">{{ text / 1000 }}</span>
+        <a slot="name" slot-scope="text, record" @click="toProduct(record, 'product')">{{ text }}</a>
+        <a slot="productName" slot-scope="text, record" @click="toProduct(record, 'project')">{{ text }}</a>
+      </a-table>
+    </div>
+    <!-- table区域-begin -->
+
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <j-select-user ref="userForm" @ok="modalFormOk"></j-select-user>
+  </a-card>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JTreeSelect from '@/components/jeecg/JTreeSelect'
+import AFormItem from 'ant-design-vue/es/form/FormItem'
+import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+import JSelectUser from '@/components/jeecgbiz/JSelectUser'
+import { postAction, getAction } from '@/api/manage'
+import { mapActions, mapGetters } from 'vuex'
+
+const advertiserColumns = [
+  {
+    title: '广告主开户主体名称',
+    align: 'center',
+    dataIndex: 'name',
+    scopedSlots: { customRender: 'name' },
+  },
+  {
+    title: '联系人姓名',
+    align: 'center',
+    dataIndex: 'contact',
+  },
+  {
+    title: '联系人手机',
+    align: 'center',
+    dataIndex: 'mobile',
+  },
+  {
+    title: '联系人邮箱',
+    align: 'center',
+    dataIndex: 'email',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    align: 'center',
+    scopedSlots: { customRender: 'action' },
+  },
+]
+const productColumns = [
+  {
+    title: '产品名',
+    align: 'center',
+    dataIndex: 'productName',
+    scopedSlots: { customRender: 'productName' },
+  },
+  {
+    title: '广告主名称',
+    align: 'center',
+    dataIndex: 'advertiserId_dictText',
+  },
+  {
+    title: '创建人',
+    align: 'center',
+    dataIndex: 'userId_dictText',
+  },
+  {
+    title: '行业',
+    align: 'center',
+    dataIndex: 'industryId_dictText',
+  },
+  {
+    title: '状态',
+    align: 'center',
+    dataIndex: 'productStatus',
+    customRender: function (text) {
+      if (text == 0) {
+        return '启动'
+      } else if (text == 1) {
+        return '暂停'
+      } else if (text == 2) {
+        return '删除'
+      }
+    },
+  },
+  {
+    title: '操作',
+    dataIndex: 'actionProduct',
+    align: 'center',
+    scopedSlots: { customRender: 'actionProduct' },
+  },
+]
+const projectColumns = [
+  {
+    title: '项目名称',
+    align: 'center',
+    dataIndex: 'projectName',
+  },
+  {
+    title: '产品名',
+    align: 'center',
+    dataIndex: 'productId_dictText',
+  },
+  {
+    title: '广告主名称',
+    align: 'center',
+    dataIndex: 'advertiserId_dictText',
+  },
+  {
+    title: '最高出价',
+    align: 'center',
+    dataIndex: 'maxBid',
+    scopedSlots: {
+      customRender: 'maxBid',
+    },
+  },
+  {
+    title: '最高转化出价',
+    align: 'center',
+    dataIndex: 'maxDeepCpaBid',
+    scopedSlots: {
+      customRender: 'maxDeepCpaBid',
+    },
+  },
+  {
+    title: '优化目标',
+    align: 'center',
+    dataIndex: 'bidType',
+    scopedSlots: {
+      customRender: 'bidType',
+    },
+  },
+  {
+    title: '转化目标',
+    align: 'center',
+    dataIndex: 'ocpxActionType',
+    scopedSlots: {
+      customRender: 'ocpxActionType',
+    },
+  },
+  {
+    title: '供应商',
+    align: 'center',
+    dataIndex: 'supplierCode_dictText',
+  },
+  {
+    title: '销售',
+    align: 'center',
+    dataIndex: 'saleId_dictText',
+  },
+  {
+    title: '运营负责人',
+    align: 'center',
+    dataIndex: 'responsibleId_dictText',
+  },
+  {
+    title: '设计负责人',
+    align: 'center',
+    dataIndex: 'designResponsibleId_dictText',
+  },
+  {
+    title: '操作',
+    dataIndex: 'actionProject',
+    align: 'center',
+    scopedSlots: {
+      customRender: 'actionProject',
+    },
+  },
+]
+export default {
+  name: 'AdvertiserList',
+  mixins: [JeecgListMixin],
+  components: {
+    AFormItem,
+    JTreeSelect,
+    JSelectUserByDep,
+    JSelectDepart,
+    JSelectUser,
+  },
+  data() {
+    return {
+      list: [],
+      allIdUser: {},
+      departDisabled: false, //是否是我的部门调用该页面
+      users: this.userInfo().realname, //用户名称
+      departmentId: this.userInfo().departId, //部门id
+      description: '广告主信息表管理页面',
+      visible: false,
+      accountName: '',
+      password: '',
+      mode: 'login',
+      showLogin: true,
+      showAuthorization: false,
+      authorizationType: 'kuaishou',
+      loginType: 'kuaishou',
+      form: this.$form.createForm(this),
+      active: 'advertiser',
+      advertiserName: '',
+      advertiserId: '',
+      productName: '',
+      examinelList: [
+        {
+          value: '0',
+          tab: '广告主列表',
+        },
+        {
+          value: '1',
+          tab: '产品列表',
+        },
+        {
+          value: '2',
+          tab: '项目列表',
+        },
+      ],
+      // 表头
+      columns: advertiserColumns,
+      url: {
+        list: '/ctop/advertiser/list',
+        delete: '/ctop/advertiser/delete',
+        deleteBatch: '/ctop/advertiser/deleteBatch',
+        exportXlsUrl: 'ctop/advertiser/exportXls',
+        importExcelUrl: 'ctop/advertiser/importExcel',
+        bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
+        bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
+        getLoginInfo: '/ctop/bindAccount/getLoginInfo',
+        userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
+        userWithDepart: '/sys/user/userDepartList', // 引入为指定用户查看部门信息需要的url
+      },
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    },
+  },
+  created() {
+    // this.queryParam.userId = this.userInfo().id
+    this.getList(null)
+  },
+  methods: {
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getList(value) {
+      var params = {}
+      // params.userId = this.userInfo().id
+      params.pageSize = 50
+      params.pageNo = 1
+      params.name = value
+      console.log(params)
+      getAction('/ctop/advertiser/list', params)
+        .then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.list = res.result.records
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+        .finally(() => {})
+    },
+    handleEditElse(item, type) {
+      if (type == 'product') {
+        this.$refs.modalFormTwo.edit(item)
+        this.$refs.modalFormTwo.title = '编辑'
+        this.$refs.modalFormTwo.disableSubmit = false
+      } else if (type == 'project') {
+        this.$refs.modalFormThree.edit(item)
+        this.$refs.modalFormThree.title = '编辑'
+        this.$refs.modalFormThree.disableSubmit = false
+      }
+    },
+    clear(type) {
+      this.queryParam.name = null
+      this.queryParam.advertiserId = null
+      this.queryParam.productId = null
+      this.queryParam.id = null
+      this.queryParam.productName = null
+      this.queryParam.projectName = null
+      this.allIdUser = {}
+      this.loadData(1)
+    },
+    addNew() {
+      if (this.active == 'advertiser') {
+        this.$refs.modalForm.add()
+        this.$refs.modalForm.title = '新增'
+        this.$refs.modalForm.disableSubmit = false
+      } else if (this.active == 'product') {
+        if (this.queryParam.advertiserId) {
+          this.$refs.modalFormTwo.add({ advertiserId: this.queryParam.advertiserId })
+        } else {
+          this.$refs.modalFormTwo.add()
+        }
+        this.$refs.modalFormTwo.title = '新增'
+        this.$refs.modalFormTwo.disableSubmit = false
+      } else if (this.active == 'project') {
+        this.$refs.modalFormThree.add({
+          advertiserId: this.queryParam.advertiserId
+            ? this.queryParam.advertiserId
+            : this.advertiserId
+            ? this.advertiserId
+            : undefined,
+          productId: this.queryParam.productId ? this.queryParam.productId : undefined,
+        })
+        this.$refs.modalFormThree.title = '新增'
+        this.$refs.modalFormThree.disableSubmit = false
+      }
+    },
+    toProduct(item, key) {
+      if (key == 'product') {
+        this.queryParam.advertiserId = item.id
+        this.advertiserName = item.name
+        this.queryParam.productId = null
+        this.productName = null
+        this.queryParam.productName = null
+        this.callbackTwo('product')
+      } else if (key == 'project') {
+        this.queryParam.productId = item.id
+        this.productName = item.productName
+        this.advertiserId = item.advertiserId
+        this.queryParam.projectName = null
+        this.callbackTwo('project')
+      }
+    },
+    callbackTwo(key) {
+      this.active = key
+      if (key == 'advertiser') {
+        this.columns = advertiserColumns
+        this.url.list = '/ctop/advertiser/list'
+        this.url.delete = '/ctop/advertiser/delete'
+      } else if (key == 'product') {
+        this.columns = productColumns
+        this.url.list = '/ctop/product/list'
+        this.url.delete = '/ctop/product/delete'
+      } else if (key == 'project') {
+        this.columns = projectColumns
+        this.url.list = '/ctop/project/list'
+        this.url.delete = '/ctop/project/delete'
+      }
+      this.searchQueryOne()
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    searchRe() {
+      this.queryParam.name = null
+      this.queryParam.advertiserId = null
+      this.queryParam.productId = null
+      this.queryParam.id = null
+      this.queryParam.productName = null
+      this.queryParam.projectName = null
+      this.allIdUser = {}
+      this.callbackTwo('advertiser')
+    },
+    searchQueryOne() {
+      console.log(this.allIdUser)
+      if (this.allIdUser.key) {
+        if (this.active == 'advertiser') {
+          this.queryParam.advertiserId = null
+          this.queryParam.id = this.allIdUser.key
+        } else {
+          this.queryParam.id = null
+          this.queryParam.advertiserId = this.allIdUser.key
+        }
+        this.advertiserName = this.allIdUser.label
+      } else {
+        // this.queryParam.advertiserId = null
+        // this.queryParam.productId = null
+        // this.queryParam.id = null
+      }
+      this.searchQuery()
+    },
+    handleSubmit() {
+      let params = {}
+      params.advertiserId = this.record.id
+      params.advertiser_name = this.record.name
+      params.userId = this.userInfo().id
+      params.userName = this.userInfo().realname
+      params.projectId = this.record.projectId
+      params.projectName = this.record.projectName
+
+      // 触发表单验证
+      this.form.validateFields((err) => {
+        if (!err) {
+          if (this.mode == 'login') {
+            params.accountName = this.accountName
+            params.password = this.password
+            params.loginType = this.loginType
+            if (this.loginType == 'kuaishou') {
+              params.mediaId = 2
+            } else if (this.loginType == 'bytedance') {
+              params.mediaId = 1
+            }
+            postAction(this.url.bindAccountLoginUrl, params).then((res) => {
+              if (res.success) {
+                alert('绑定成功')
+                this.accountName = ''
+                this.password = ''
+                this.loginType = ''
+              } else {
+                alert(res.message)
+              }
+            })
+          }
+          // 授权登录
+          if (this.mode == 'authorization') {
+            params.authorizationType = this.authorizationType
+            if (this.authorizationType == 'kuaishou') {
+              params.mediaId = 2
+            } else if (this.authorizationType == 'bytedance') {
+              params.mediaId = 1
+            }
+            postAction(this.url.bindAuthorizationUrl, params).then((res) => {
+              if (res.success) {
+                window.open(res.message, '_blank')
+              } else {
+                alert('绑定失败')
+              }
+            })
+          }
+        }
+      })
+    },
+
+    onChageLogin() {
+      console.log(this.mode)
+      if (this.mode == 'login') {
+        this.showLogin = true
+        this.showAuthorization = false
+      } else {
+        this.showLogin = false
+        this.showAuthorization = true
+      }
+    },
+    showModal(record) {
+      this.record = record
+      this.visible = true
+    },
+
+    handleCancel() {
+      this.close()
+    },
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 0 - 1
src/views/modules/kuaishouapp/populationAnalysis/index.vue

@@ -1287,7 +1287,6 @@ export default {
 
 <style lang="scss">
 .ant-tooltip-inner,
-.ant-tooltip,
 .ant-tooltip-arrow::before {
   background-color: #fff;
   color: #333;

+ 1 - 1
src/views/modules/material/musicTab.vue

@@ -172,7 +172,7 @@ export default {
 }
 </style>
 <style lang="less">
-.ant-tabs-bar {
+.music-tab .ant-tabs-bar {
   margin: 0 0 12px 0;
   /* height: 55px; */
   border-bottom: 1px solid #e8e8e8;

+ 1 - 1
src/views/modules/onlineTraining/onlineTrainingList.vue

@@ -164,7 +164,7 @@
           label="文件上传"
           v-show="(getData('title') && getData('topic')) || (oneList.length > 0 && getData('topicAll'))"
         >
-          <uploadFile :value.sync="fileUrl" :multiple="false" :checkFile="file" :fileCount="1" uploadType="video" />
+          <uploadFile :value.sync="fileUrl" :multiple="false" :checkFile="file" :fileCount="1" uploadType="video" :size='204800'/>
           <!-- <upload-to-ali v-model="fileUrl" :customDomain="customDomain" preview :region="region" :bucket="bucket"
             :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret" :before-upload="file" :dir="dirVideo" @loaded="overUpload">

File diff suppressed because it is too large
+ 2749 - 0
src/views/modules/stockWatch/accountPage.vue


+ 305 - 0
src/views/modules/stockWatch/modules/customColumn.vue

@@ -0,0 +1,305 @@
+<template>
+  <div class="customColumnKS">
+    <a-modal v-model="visibleOk" title="自定义列" on-ok="handleOk" @cancel="handleCancel" width="65%">
+      <template slot="footer">
+        <a-button key="back" @click="handleCancel">取消</a-button>
+        <a-button key="submit" type="primary" :loading="loading" @click="handleOk">应用</a-button>
+      </template>
+      <!-- <a-input-search placeholder="输入要添加的列的名称" style="width: 40%" enter-button @search="onSearch" /> -->
+      <div class="zhuti">
+        <div class="addlist">
+          <p>可添加的列</p>
+          <div class="selectionList">
+            <!--  v-for="(item,index) in addColumns" :key="index" -->
+            <!-- <div v-if="mediaType==1"> -->
+              <selectComponent
+              :showCol="mylistNum"
+              @getshowlist="getshowlist"
+              :fixedCol="fiexColumn"
+              :mediaType='mediaType'
+              
+              />
+            <!-- </div> -->
+            <!-- <div v-if="mediaType==2">
+              <selectComponentKS
+              :showCol="mylistNum"
+              @getshowlist="getshowlist"
+              :fixedCol="fiexColumn"
+              :mediaType='mediaType'
+              
+            />
+            </div> -->
+            
+          </div>
+        </div>
+        <div class="listNum">
+          <p>已选{{mylistNum.length}}列</p>
+          <a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
+          <ul class="selectlist">
+                <!-- draggable="true"
+                  @dragstart="handleDragStart($event, item.dataIndex)"
+                  @dragover.prevent="handleDragOver($event, item.dataIndex)"
+                  @dragenter="handleDragEnter($event, item.dataIndex)"
+                  @dragend="handleDragEnd($event, item.dataIndex)" -->
+            <li v-for="(item,index) in mylistNum" :key="index">
+              <span v-if=" index < fiexColumn.length">
+                <a-icon type="lock" />
+                <span class="listText">{{item.title}}</span>
+              </span>
+              <span v-else-if=" index >=fiexColumn.length"  >
+                <a-icon type="menu" style="color:#ccc" />
+                <span class="listText">{{item.title}}</span>
+                <a-icon
+                  type="close"
+                  @click="deleteCol(item,index)"
+                  id="closeStyle"
+                  style="fontSize:12px;"
+                />
+              </span>
+            </li>
+          </ul>
+        </div>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import selectComponent from './selectComponent'
+// import selectComponentKS from './selectComponentKS'
+export default {
+  components: {
+    selectComponent,
+    // selectComponentKS,
+  },
+  props: ['visible', 'listNum', 'fiexColumn','mediaType'],
+
+  data() {
+    return {
+      dragging: null,
+      dataKey: 0,
+      visibleOk: false,
+      mylistNum: [],
+      loading: false
+    }
+  },
+  watch: {
+    visible(n, o) {
+      // console.log(n,o)
+      this.visibleOk = this.visible
+    },
+    listNum: {
+      handler(newValue, oldValue) {
+        console.log(newValue, oldValue)
+        this.mylistNum = newValue
+      },
+      immediate: true
+      // deep: true
+    }
+  },
+  methods: {
+     //li展示里的关闭按钮 删除当前被选中的这一个列
+    deleteCol(item, index) {
+      this.mylistNum = this.mylistNum.filter((item1, num) => {
+        return num != index
+      })
+    },
+    handleDragStart(e, item) {
+      this.dragging = item
+    },
+    handleDragEnd(e, item) {
+      this.dragging = null
+    },
+    //首先把div变成可以放置的元素,即重写dragenter/dragover
+    handleDragOver(e) {
+      e.dataTransfer.dropEffect = 'move' // e.dataTransfer.dropEffect="move";//在dragenter中针对放置目标来设置!
+    },
+    handleDragEnter(e, item) {
+      e.dataTransfer.effectAllowed = 'move' //为需要移动的元素设置dragstart事件
+      if (item === this.dragging) {
+        return
+      }
+      const newItems = [...this.mylistNum]
+      console.log(newItems)
+      const src = newItems.findIndex(v => v.dataIndex === this.dragging)
+      const dst = newItems.findIndex(v => v.dataIndex === item)
+
+      newItems.splice(dst, 0, ...newItems.splice(src, 1))
+
+      this.mylistNum = newItems
+    },
+    //弹出框确定
+    handleOk(e) {
+      if(this.mylistNum.length<5){
+        this.$message.error('此处自定义列必须选择五项数据')
+      }else{
+        this.loading = false
+        this.visibleOk = false
+        this.$emit('closeCustomColumn', false)
+        this.$emit('changeColumn', this.mylistNum)
+      }
+      
+    },
+    //取消按钮
+    handleCancel() {
+      this.visibleOk = false
+      this.$emit('closeCustomColumn', false)
+    },
+    //清空全部
+    clearAllList() {
+      this.mylistNum = [...this.fiexColumn]
+    },
+    //从自定义列拿选择的项
+    getshowlist(val) {
+      var arr = []
+
+      // console.log(val)
+      if (val.length) {
+        if (val.flag) {
+          let newArr = val.arr
+          newVal.map((item, index) => {
+            // if(JSON.stringify(this.listNum).indexOf(JSON.stringify(item))==-1){
+            //  this.listNum.push(item); // 进行动态的操作
+            // }
+            var result = this.listNum.some(items => {
+              if (items.dataIndex == item.dataIndex) {
+                return true
+              }
+            })
+
+            // console.log(result)
+            if (result) {
+              newArr.splice(index, 1)
+            }
+          })
+
+          this.mylistNum = [...this.mylistNum, ...newArr]
+        } else {
+          //取消全选  清楚listNum中的val里的值
+          val.arr.map((item, index) => {
+            var result = this.mylistNum.some(items => {
+              if (items.dataIndex == item.dataIndex) {
+                return true
+              }
+            })
+            // console.log(result)
+            if (result) {
+              this.mylistNum.splice(index, 1)
+            }
+          })
+        }
+      } else {
+        arr = this.mylistNum.filter((item, index) => {
+          return item.dataIndex == val.dataIndex
+        })
+      }
+      if (arr.length) {
+        var index
+        this.mylistNum.map((item, ind) => {
+          if (item.dataIndex == val.dataIndex) {
+            index = ind
+          }
+        })
+        console.log(index)
+        this.mylistNum.splice(index, 1)
+      } else {
+        this.mylistNum.push(val)
+      }
+    }
+  },
+  mounted() {}
+}
+</script>
+
+<style lang="scss" scoped>
+
+
+.addlist {
+  float: left;
+  width: 70%;
+  border: 1px solid #eee;
+  .selectionList {
+    padding: 10px 15px;
+    height: 450px;
+    overflow: auto;
+    .leibie {
+      .leiName {
+        font-size: 26px;
+        text-align: left;
+      }
+    }
+    .jutixiang {
+      display: inline-block;
+      width: 32%;
+      box-sizing: border-box;
+      padding: 10px 3px;
+    }
+  }
+}
+.listNum {
+  float: right;
+  width: 28%;
+  border: 1px solid #eee;
+  position: relative;
+}
+.zhuti {
+  margin-top: 15px;
+  overflow: hidden;
+
+  p {
+    height: 40px;
+    line-height: 20px;
+    padding: 10px 15px;
+
+    background: rgb(249, 250, 253);
+    border-bottom: 1px solid #eee;
+  }
+  #btn {
+    position: absolute;
+    right: 0;
+    top: 5px;
+  }
+  .selectlist {
+    width: 100%;
+    list-style: none;
+    margin: 0;
+    height: 450px;
+    padding: 0 15px 10px;
+    overflow: auto;
+
+    li {
+      width: 100%;
+      padding: 5px 8px;
+      margin: 6px 0;
+      border-radius: 10px;
+      background: rgb(248, 248, 248);
+      height: 32px;
+      position: relative;
+      span {
+        width: 80%;
+        height: 100%;
+        display: inline-block;
+        margin: 0 10px;
+        // overflow:hidden;
+        // text-overflow:ellipsis;
+        // white-space: nowrap;
+      }
+      .listText {
+        position: absolute;
+        top: 2;
+        left: 10;
+        width: 60%;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+      #closeStyle {
+        position: absolute;
+        top: 9px;
+        right: 7px;
+      }
+    }
+  }
+}
+
+</style>

+ 294 - 0
src/views/modules/stockWatch/modules/selectComponent.vue

@@ -0,0 +1,294 @@
+<template>
+  <div>
+    <div v-for="(item,index) in customFields" :key="index">
+      <div class="leibie">
+        <p class="leiName">{{item.title}}</p>
+        <!-- <span class="jutixiang">
+          <a-checkbox
+            :value="index"
+            name="type"
+            @change="isSelectAll($event,index)"
+            :checked="item.checkall"
+          >全选</a-checkbox>
+        </span> -->
+        <!-- {{item.form}} -->
+        <a-checkbox-group v-model="item.form" >
+          <span class="jutixiang" v-for="(zhi,num) in item.specificFields " :key="num">
+
+            <a-checkbox :value="zhi.dataIndex" :disabled="zhi.disabled"  name="type" @change="checkboxClick(zhi)">
+              <a-tooltip
+                class="select-component"
+                placement="top"
+                :title="zhi.tip"
+                :overlayClassName="tooltipShow"
+              >{{zhi.title}}</a-tooltip>
+            </a-checkbox>
+          </span>
+        </a-checkbox-group>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import  {TTcustomFields ,KScustomFields}  from '../../columnConst/stockWatch.js'
+// let customFields=customFields
+export default {
+  props: ['showCol','fixedCol','mediaType'],
+  data() {
+    return {
+        // customFields,
+      customFields:[],
+      quanxuanflag: [],
+      hovered: false,
+      tooltipShow: 'tooltipShow',
+      toParentArr: []
+    }
+  },
+  watch: {
+    
+    showCol(n) {
+      console.log(n)
+      if(n.length>=5){
+        this.customFields.map((it, ind) => {
+          it.specificFields.map((i, d) => {
+            // if (i.dataIndex === item.dataIndex) {
+              i.disabled=true;
+            // }
+          })
+        })
+        
+      }else{
+        this.customFields.map((it, ind) => {
+          it.specificFields.map((i, d) => {
+            // if (i.dataIndex === item.dataIndex) {
+              i.disabled=false;
+            // }
+          })
+        })
+        this.fixedCol.map((item, index) => {
+          this.customFields.map((it, ind) => {
+            it.specificFields.map((i, d) => {
+              if (i.dataIndex === item.dataIndex) {
+                i.disabled=true;
+              }
+            })
+          })
+        })
+      }
+      //
+      if (this.showCol.length == this.fixedCol.length) {
+
+        for (let i = 0; i < this.customFields.length; i++) {
+          this.customFields[i].form=[]          
+        }
+        this.showCol.map((item, index) => {
+          this.customFields.map((it, ind) => {
+            it.specificFields.map((i, d) => {
+              if (i.dataIndex === item.dataIndex) {
+                it.form.push(item.dataIndex)
+              }else{
+
+              }
+            })
+          })
+        })
+      } else {
+        
+       for (let i = 0; i < this.customFields.length; i++) {
+          this.customFields[i].form=[]
+          
+        }
+        n.map((item, index) => {
+          this.customFields.map((it, ind) => {
+            it.specificFields.map((i, d) => {
+              if (i.dataIndex === item.dataIndex) {
+                it.form.push(item.dataIndex)
+              }else{
+
+              }
+            })
+          })
+        })
+      }
+      // console.log(this.form)
+    },
+  
+  },
+  mounted() {
+    if(this.mediaType==1){
+      //头条自定义列
+      this.customFields=TTcustomFields
+    }else if(this.mediaType==2){
+      //快手自定义列
+      this.customFields=KScustomFields
+    }
+    for (let i = 0; i < this.customFields.length; i++) {
+      this.customFields[i].form=[]
+    }
+    // console.log(1)
+    this.showCol.map((item, index) => {
+      this.customFields.map((it, ind) => {
+        it.specificFields.map((i, d) => {
+          if (i.dataIndex === item.dataIndex) {
+            it.form.push(item.dataIndex)
+          }
+        })
+      })
+    })
+    
+    this.fixedCol.map((item, index) => {
+      this.customFields.map((it, ind) => {
+        it.specificFields.map((i, d) => {
+          if (i.dataIndex === item.dataIndex) {
+            i.disabled=true;
+          }
+        })
+      })
+    })
+
+    if(this.showCol.length>=5){
+        this.customFields.map((it, ind) => {
+          it.specificFields.map((i, d) => {
+            // if (i.dataIndex === item.dataIndex) {
+              i.disabled=true;
+            // }
+          })
+        })
+        
+      }else{
+        this.customFields.map((it, ind) => {
+          it.specificFields.map((i, d) => {
+            // if (i.dataIndex === item.dataIndex) {
+              i.disabled=false;
+            // }
+          })
+        })
+        this.fixedCol.map((item, index) => {
+          this.customFields.map((it, ind) => {
+            it.specificFields.map((i, d) => {
+              if (i.dataIndex === item.dataIndex) {
+                i.disabled=true;
+              }
+            })
+          })
+        })
+      }
+    // console.log(this.customFields);
+    
+  },
+  methods: {
+    hide() {
+      this.clicked = false
+      this.hovered = false
+    },
+    handleHoverChange(visible) {
+      this.clicked = false
+      this.hovered = visible
+    },
+    getPopupContainer() {
+      console.log(this)
+    },
+
+    //全选框   判断是否全选
+    isSelectAll(e, val) {
+      //像父元素传递
+      // console.log(e, val)
+      let arr=JSON.parse(JSON.stringify(this.customFields[val].specificFields))
+      let valArr={
+        flag:true,
+        arr
+      }
+      this.customFields[val].checkall = e.target.checked
+      console.log(this.customFields[val].checkall)
+
+      if (this.customFields[val].checkall) {
+       
+        this.customFields[val].form=[]
+ 
+        this.customFields[val].specificFields.map((item, index) => {
+
+          this.customFields[val].form.push(item.dataIndex)
+
+        })
+        valArr.flag=true;
+        this.$emit('getshowlist', valArr)
+      } else {
+        console.log(this.customFields[val])
+        this.customFields[val].form=[];
+        valArr.flag=false;
+        console.log(this.customFields[val].form=[])
+        this.$emit('getshowlist', valArr)
+      }
+
+      console.log(this.form[val])
+    },
+
+    onChange(){
+        
+    },
+
+    //复选框的点击事件
+    checkboxClick(val) {
+      // console.log(val)
+    //   this.$emit('update:count',)
+      this.$emit('getshowlist', val)
+      // console.log(val,this.customFields[0].form)
+      // this.customFields[val].checkall=!this.customFields[val].checkall
+      // for (let i = 0; i < this.customFields.length; i++) {
+      //   // console.log(this.customFields[0].form,this.customFields[i].specificFields.length)
+      //   if(this.customFields[i].form.length==this.customFields[i].specificFields.length-1){
+      //       this.customFields[i].checkall=true;
+      //   }else{
+      //     this.customFields[i].checkall=false;
+      //   }
+          
+      //   }
+    }
+  }
+}
+</script>
+<style>
+.tooltipShow {
+  max-width: 30%;
+}
+.tooltipShow .ant-tooltip-content .ant-tooltip-inner {
+  background: white;
+  font-size: 10px;
+  color: #333;
+}
+.ant-tooltip-content .ant-tooltip-arrow::before {
+  background-color: white;
+}
+</style>
+<style lang="scss" scoped>
+.leibie {
+  width: 100%;
+  margin-bottom: 10px;
+  .leiName {
+    font-size: 20px;
+    text-align: left;
+    margin-bottom: 5px;
+    margin-top: 0px;
+  }
+}
+.jutixiang {
+  display: inline-block;
+  width: 32%;
+  box-sizing: border-box;
+  padding: 8px 3px;
+  height: 30px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.ant-tooltip-content .tooltipShow {
+  background: #eee;
+  font-size: 10px;
+  color: #333;
+}
+
+.ant-checkbox-group {
+  width: 100%;
+}
+</style>

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

@@ -20,7 +20,7 @@ export default {
 
     data() {
         return {
-            currentTabComponent:'designleaderPlatform',
+            currentTabComponent:'designleaderPlatform',//当前加载的组件名称
             orderStatus:undefined,//跳转到订单详情时需要里面的参数  status订单参数 role 当前角色
             role:'designLeader',
             materialStatus:undefined,

+ 9 - 2
src/views/modules/workBench/materialList.vue

@@ -1497,8 +1497,15 @@ export default {
 
 
         beforeUpload(file) {
-
-            this.uploadAction= `http://jiaoyangapi.shyouteng.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
+            if (process.env.NODE_ENV == 'development') { 
+                this.uploadAction= `/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
+            } 
+            else if (process.env.NODE_ENV == 'debug') { 
+            } 
+            else if (process.env.NODE_ENV == 'production') { 
+              this.uploadAction= `${this.axios.defaults.baseURL}/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.uploadAction= `http://192.168.1.43:8088/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
             this.loadDisabled = true

+ 9 - 1
src/views/modules/workBench/orderDetail.vue

@@ -1884,7 +1884,15 @@ export default {
 
 
         beforeUpload(file) {
-            this.uploadAction= `http://jiaoyangapi.shyouteng.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
+            if (process.env.NODE_ENV == 'development') { 
+                this.uploadAction= `/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
+            } 
+            else if (process.env.NODE_ENV == 'debug') { 
+            } 
+            else if (process.env.NODE_ENV == 'production') { 
+              this.uploadAction= `${this.axios.defaults.baseURL}/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://192.168.1.43:8088/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}`
 

+ 11 - 3
src/views/modules/workBench/placeOrder.vue

@@ -715,8 +715,16 @@ export default {
 
         beforeUpload(file) {
             // ${this.form.project}
-            this.uploadAction= `http://jiaoyangapi.shyouteng.com.cn/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
-            // this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadAttachment?projectId=772`
+            // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
+            // this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
+            if (process.env.NODE_ENV == 'development') { 
+                this.uploadAction= `/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
+            } 
+            else if (process.env.NODE_ENV == 'debug') { 
+            } 
+            else if (process.env.NODE_ENV == 'production') { 
+              this.uploadAction= `${this.axios.defaults.baseURL}/platform/file/uploadAttachment?projectId=${this.form.project}`
+            }
             this.loadDisabled = true
             const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
             const fileName = file.name
@@ -777,7 +785,7 @@ export default {
                 this.form.attachmentName=info.file.response.result.attachmentName || ''         
                 this.form.attachmentUrl=info.file.response.result.attachmentUrl || ''
             } else if (info.file.status === 'error') {
-                this.$message.error(`${info.file.name} file upload failed.`)
+                this.$message.error(`${info.file.name} 上传失败.`)
                 this.loadDisabled = false
             }
 

+ 2 - 2
src/views/oceanengine/HotMaterialList.vue

@@ -21,7 +21,7 @@
               </a-col>
             </a-row>-->
             <a-row :gutter="24">
-              <a-col :md="3" :sm="3">
+              <a-col :md="4" :sm="3">
                 <a-form-item label="排序">
                   <a-radio-group v-model="queryParam.orderByColumn">
                     <a-radio-button value="create_time">按抓取时间</a-radio-button>
@@ -46,7 +46,7 @@
                   </a-radio-group>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="4">
+              <a-col :md="6" :sm="4">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                 <a-button
                   type="primary"

+ 1 - 0
src/views/oceanengine/modules/HotMaterialModal.vue

@@ -6,6 +6,7 @@
     @cancel="handleCancel"
     cancelText="关闭"
     class="ad_cover_container"
+    :footer='false'
   >
     <div>
       <a-row>

+ 45 - 6
src/views/system/DepartList.vue

@@ -7,10 +7,10 @@
         <a-row style="margin-left: 14px">
           <a-button @click="handleAdd(1)" type="primary">添加部门</a-button>
           <a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
-          <a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
+          <!-- <a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
           <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
             <a-button type="primary" icon="import">导入</a-button>
-          </a-upload>
+          </a-upload> -->
           <a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
           <!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
         </a-row>
@@ -91,6 +91,20 @@
                   placeholder="无">
                 </a-tree-select>
               </a-form-item>
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门领导">
+                <a-select
+                  showSearch
+                  :filterOption="filterOption"
+                  style="width: 100%"
+                  placeholder="请选择部门领导"
+                  v-decorator="['leader', { rules: [{ required: true, message: '部门领导必选' }] }]"
+                  labelInValue
+                >
+                  <a-select-option v-for="(people, peopleindex) in peopleList" :key="peopleindex" :value="people.key">
+                    {{people.label}}
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
               <a-form-item
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
@@ -123,7 +137,7 @@
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
                 label="排序">
-                <a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
+                <a-input-number :min="0" v-decorator="[ 'departOrder',{'initialValue':0}]"/>
               </a-form-item>
               <a-form-item
                 :labelCol="labelCol"
@@ -145,7 +159,7 @@
               </a-form-item>
             </a-form>
             <div class="anty-form-btn">
-              <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">重置</a-button>
+              <!-- <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">重置</a-button> -->
               <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">保存</a-button>
             </div>
           </a-card>
@@ -219,6 +233,7 @@
     },
     data() {
       return {
+        peopleList: [],
         iExpandedKeys: [],
         loading: false,
         autoExpandParent: true,
@@ -279,6 +294,22 @@
       }
     },
     methods: {
+      getData(className) {
+        return this.form.getFieldValue(className)
+      },
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      getAllPeople() {
+        this.getAction('/sys/user/getAllUser',{status:1}).then((res) => {
+          if (res.success) {
+            this.peopleList = res.result.map((item) => {
+              return { key: item.userId, label: item.realName }
+            })
+            console.log(res,this.peopleList)
+          }
+        })
+      },
       loadData() {
         this.refresh();
       },
@@ -431,9 +462,14 @@
         }else{
           this.orgCategoryDisabled = false;
         }
+        if(record.leaderId){
+          record.leader = {key:record.leaderId,label:record.leaderName}
+        }else{
+          record.leader = undefined
+        }
         this.$nextTick(() => {
           this.form.getFieldDecorator('fax', {initialValue: ''})
-          this.form.setFieldsValue(pick(record, 'departName','orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
+          this.form.setFieldsValue(pick(record, 'departName','orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo','leader'))
         })
       },
       getCurrSelectedTitle() {
@@ -463,8 +499,10 @@
               this.$message.warning('请点击选择要修改部门!')
               return
             }
-
+            console.log(values)
             let formData = Object.assign(this.currSelected, values)
+            formData.leaderId = values.leader.key
+            formData.leaderName = values.leader.label.replace(/[\r\n]/g, "");
             console.log('Received values of form: ', formData)
             httpAction(this.url.edit, formData, 'put').then((res) => {
               if (res.success) {
@@ -589,6 +627,7 @@
     created() {
       this.currFlowId = this.$route.params.id
       this.currFlowName = this.$route.params.name
+      this.getAllPeople()
       // this.loadTree()
     },
 

+ 282 - 196
src/views/system/UserList.vue

@@ -1,24 +1,21 @@
 <template>
   <a-card :bordered="false">
-
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
-
           <a-col :md="6" :sm="12">
             <a-form-item label="账号">
               <a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>
             </a-form-item>
           </a-col>
 
-
           <a-col :md="6" :sm="12">
             <a-form-item label="姓名">
               <a-input placeholder="请输入姓名查询" v-model="queryParam.realname"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
+          <!-- <a-col :md="6" :sm="8">
             <a-form-item label="性别">
               <a-select v-model="queryParam.sex" placeholder="请选择性别查询">
                 <a-select-option value="">请选择性别查询</a-select-option>
@@ -26,39 +23,57 @@
                 <a-select-option value="2">女性</a-select-option>
               </a-select>
             </a-form-item>
+          </a-col> -->
+          <a-col :md="6" :sm="12">
+            <a-form-item label="汇报上级">
+              <a-input placeholder="请输入姓名查询" v-model="queryParam.leaderName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="12">
+            <a-form-item label="用户角色">
+              <a-input placeholder="请输入用户角色" v-model="queryParam.roleName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="12">
+            <a-form-item label="部门分配">
+              <a-tree-select
+                style="width: 100%"
+                :dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
+                :treeData="treeData"
+                v-model="queryParam.departId"
+                placeholder="无"
+              >
+              </a-tree-select>
+            </a-form-item>
           </a-col>
 
+          <a-col :md="6" :sm="8">
+            <a-form-item label="邮箱">
+              <a-input placeholder="请输入邮箱查询" v-model="queryParam.email"></a-input>
+            </a-form-item>
+          </a-col>
 
+          <!-- <a-col :md="6" :sm="8">
+            <a-form-item label="手机号码">
+              <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
+            </a-form-item>
+          </a-col> -->
 
-            <a-col :md="6" :sm="8">
-              <a-form-item label="邮箱">
-                <a-input placeholder="请输入邮箱查询" v-model="queryParam.email"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="手机号码">
-                <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="状态">
-                <a-select v-model="queryParam.status" placeholder="请选择用户状态查询">
-                  <a-select-option value="">请选择用户状态</a-select-option>
-                  <a-select-option value="1">正常</a-select-option>
-                  <a-select-option value="2">解冻</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="状态">
+              <a-select v-model="queryParam.status" placeholder="请选择用户状态查询">
+                <a-select-option value="1">正常</a-select-option>
+                <a-select-option value="2">冻结</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
 
           <a-col :md="6" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
-
         </a-row>
       </a-form>
     </div>
@@ -70,7 +85,6 @@
 
     <!-- table区域-begin -->
     <div>
-
       <a-table
         ref="table"
         bordered
@@ -80,22 +94,40 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        @change="handleTableChange">
-
+        @change="handleTableChange"
+      >
         <template slot="avatarslot" slot-scope="text, record">
           <div class="anty-img-wrap">
-            <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
+            <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user" />
           </div>
         </template>
+        <template slot="leaderName" slot-scope="text, record">
+          <span>
+            {{ text ? text : '-' }}
+          </span>
+        </template>
+        <template slot="sex" slot-scope="text, record">
+          <span>
+            {{ text ? (text == 1 ? '男' : '女') : '未填写' }}
+          </span>
+        </template>
+        <template slot="status" slot-scope="text, record">
+          <span>
+            {{ text ? (text == 1 ? '正常' : '冻结') : '未填写' }}
+          </span>
+        </template>
+        <template slot="departName" slot-scope="text, record">
+          <span>
+            {{ text ? text : '-' }}
+          </span>
+        </template>
 
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
-          <a-divider type="vertical"/>
+          <a-divider type="vertical" />
 
           <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多 <a-icon type="down"/>
-            </a>
+            <a class="ant-dropdown-link"> 更多 <a-icon type="down" /> </a>
             <a-menu slot="overlay">
               <a-menu-item>
                 <a href="javascript:;" @click="handleDetail(record)">详情</a>
@@ -111,14 +143,14 @@
                 </a-popconfirm>
               </a-menu-item>
 
-              <a-menu-item v-if="record.status==1">
-                <a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2)">
+              <a-menu-item v-if="record.status == 1">
+                <a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id, 2)">
                   <a>冻结</a>
                 </a-popconfirm>
               </a-menu-item>
 
-              <a-menu-item v-if="record.status==2">
-                <a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1)">
+              <a-menu-item v-if="record.status == 2">
+                <a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id, 1)">
                   <a>解冻</a>
                 </a-popconfirm>
               </a-menu-item>
@@ -126,12 +158,9 @@
               <a-menu-item>
                 <a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
               </a-menu-item>
-
             </a-menu>
           </a-dropdown>
         </span>
-
-
       </a-table>
     </div>
     <!-- table区域-end -->
@@ -145,27 +174,28 @@
 </template>
 
 <script>
-  import UserModal from './modules/UserModal'
-  import PasswordModal from './modules/PasswordModal'
-  import {putAction} from '@/api/manage';
-  import {frozenBatch} from '@/api/api'
-  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import SysUserAgentModal from "./modules/SysUserAgentModal";
-
-  export default {
-    name: "UserList",
-    mixins: [JeecgListMixin],
-    components: {
-      SysUserAgentModal,
-      UserModal,
-      PasswordModal
-    },
-    data() {
-      return {
-        description: '这是用户管理页面',
-        queryParam: {},
-        columns: [
-          /*{
+import UserModal from './modules/UserModal'
+import PasswordModal from './modules/PasswordModal'
+import { putAction } from '@/api/manage'
+import { frozenBatch, queryIdTree } from '@/api/api'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import SysUserAgentModal from './modules/SysUserAgentModal'
+
+export default {
+  name: 'UserList',
+  mixins: [JeecgListMixin],
+  components: {
+    SysUserAgentModal,
+    UserModal,
+    PasswordModal,
+  },
+  data() {
+    return {
+      description: '这是用户管理页面',
+      treeData: [],
+      queryParam: {},
+      columns: [
+        /*{
             title: '#',
             dataIndex: '',
             key:'rowIndex',
@@ -175,154 +205,210 @@
               return parseInt(index)+1;
             }
           },*/
-          {
-            title: '用户账号',
-            align: "center",
-            dataIndex: 'username',
-            width: 120
-          },
-          {
-            title: '真实姓名',
-            align: "center",
-            width: 100,
-            dataIndex: 'realname',
-          },
-          {
-            title: '头像',
-            align: "center",
-            width: 120,
-            dataIndex: 'avatar',
-            scopedSlots: {customRender: "avatarslot"}
-          },
+        {
+          title: '用户账号',
+          align: 'center',
+          dataIndex: 'username',
+          width: 120,
+        },
+        {
+          title: '真实姓名',
+          align: 'center',
+          width: 100,
+          dataIndex: 'realname',
+        },
+        {
+          title: '头像',
+          align: 'center',
+          width: 120,
+          dataIndex: 'avatar',
+          scopedSlots: { customRender: 'avatarslot' },
+        },
 
-          {
-            title: '性别',
-            align: "center",
-            width: 80,
-            dataIndex: 'sex_dictText',
-            sorter: true
-          },
-          {
-            title: '生日',
-            align: "center",
-            width: 180,
-            dataIndex: 'birthday'
-          },
-          {
-            title: '手机号码',
-            align: "center",
-            width: 100,
-            dataIndex: 'phone'
-          },
-          {
-            title: '邮箱',
-            align: "center",
-            dataIndex: 'email'
-          },
-          {
-            title: '状态',
-            align: "center",
-            width: 80,
-            dataIndex: 'status_dictText'
-          },
-          /* {
+        {
+          title: '性别',
+          align: 'center',
+          width: 80,
+          dataIndex: 'sex',
+          scopedSlots: { customRender: 'sex' },
+          sorter: true,
+        },
+        // {
+        //   title: '生日',
+        //   align: 'center',
+        //   width: 180,
+        //   dataIndex: 'birthday',
+        // },
+        {
+          title: '手机号码',
+          align: 'center',
+          width: 100,
+          dataIndex: 'phone',
+        },
+        {
+          title: '邮箱',
+          align: 'center',
+          dataIndex: 'email',
+        },
+        {
+          title: '汇报上级',
+          align: 'center',
+          dataIndex: 'leaderName',
+          scopedSlots: { customRender: 'leaderName' },
+        },
+        {
+          title: '所属部门',
+          align: 'center',
+          dataIndex: 'departName',
+          scopedSlots: { customRender: 'departName' },
+        },
+        {
+          title: '用户角色',
+          align: 'center',
+          dataIndex: 'roleName',
+          scopedSlots: { customRender: 'roleName' },
+        },
+
+        {
+          title: '状态',
+          align: 'center',
+          width: 80,
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' },
+        },
+        /* {
              title: '创建时间',
              align: "center",
              width: 150,
              dataIndex: 'createTime',
              sorter: true
            },*/
-          {
-            title: '操作',
-            dataIndex: 'action',
-            scopedSlots: {customRender: 'action'},
-            align: "center",
-            width: 170
+        {
+          title: '操作',
+          dataIndex: 'action',
+          scopedSlots: { customRender: 'action' },
+          align: 'center',
+          width: 170,
+        },
+      ],
+      url: {
+        imgerver: window._CONFIG['domianURL'] + '/sys/common/view',
+        syncUser: '/process/extActProcess/doSyncUser',
+        list: '/sys/user/list',
+        delete: '/sys/user/delete',
+        deleteBatch: '/sys/user/deleteBatch',
+        exportXlsUrl: '/sys/user/exportXls',
+        importExcelUrl: 'sys/user/importExcel',
+      },
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    },
+  },
+  created() {
+    this.$nextTick(() => {
+      this.loadTreeData()
+    })
+  },
+  methods: {
+    // loadTree() {
+    //   var that = this
+    //   that.treeData = []
+    //   that.departTree = []
+    //   queryDepartTreeList().then((res) => {
+    //     if (res.success) {
+    //       //部门全选后,再添加部门,选中数量增多
+    //       this.allTreeKeys = []
+    //       for (let i = 0; i < res.result.length; i++) {
+    //         let temp = res.result[i]
+    //         that.treeData.push(temp)
+    //         that.departTree.push(temp)
+    //         that.setThisExpandedKeys(temp)
+    //         that.getAllKeys(temp)
+    //         // console.log(temp.id)
+    //       }
+    //       this.loading = false
+    //     }
+    //   })
+    // },
+    loadTreeData() {
+      var that = this
+      queryIdTree().then((res) => {
+        if (res.success) {
+          that.treeData = []
+          for (let i = 0; i < res.result.length; i++) {
+            let temp = res.result[i]
+            that.treeData.push(temp)
           }
+        }
+      })
+    },
+    getAvatarView: function (avatar) {
+      return this.url.imgerver + '/' + avatar
+    },
 
-        ],
-        url: {
-          imgerver: window._CONFIG['domianURL'] + "/sys/common/view",
-          syncUser: "/process/extActProcess/doSyncUser",
-          list: "/sys/user/list",
-          delete: "/sys/user/delete",
-          deleteBatch: "/sys/user/deleteBatch",
-          exportXlsUrl: "/sys/user/exportXls",
-          importExcelUrl: "sys/user/importExcel",
-        },
+    batchFrozen: function (status) {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning('请选择一条记录!')
+        return false
+      } else {
+        let ids = ''
+        let that = this
+        that.selectedRowKeys.forEach(function (val) {
+          ids += val + ','
+        })
+        that.$confirm({
+          title: '确认操作',
+          content: '是否' + (status == 1 ? '解冻' : '冻结') + '选中账号?',
+          onOk: function () {
+            frozenBatch({ ids: ids, status: status }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.loadData()
+                that.onClearSelected()
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+          },
+        })
       }
     },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    handleMenuClick(e) {
+      if (e.key == 1) {
+        this.batchDel()
+      } else if (e.key == 2) {
+        this.batchFrozen(2)
+      } else if (e.key == 3) {
+        this.batchFrozen(1)
       }
     },
-    methods: {
-      getAvatarView: function (avatar) {
-        return this.url.imgerver + "/" + avatar;
-      },
-
-      batchFrozen: function (status) {
-        if (this.selectedRowKeys.length <= 0) {
-          this.$message.warning('请选择一条记录!');
-          return false;
+    handleFrozen: function (id, status) {
+      let that = this
+      frozenBatch({ ids: id, status: status }).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message)
+          that.loadData()
         } else {
-          let ids = "";
-          let that = this;
-          that.selectedRowKeys.forEach(function (val) {
-            ids += val + ",";
-          });
-          that.$confirm({
-            title: "确认操作",
-            content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
-            onOk: function () {
-              frozenBatch({ids: ids, status: status}).then((res) => {
-                if (res.success) {
-                  that.$message.success(res.message);
-                  that.loadData();
-                  that.onClearSelected();
-                } else {
-                  that.$message.warning(res.message);
-                }
-              });
-            }
-          });
+          that.$message.warning(res.message)
         }
-      },
-      handleMenuClick(e) {
-        if (e.key == 1) {
-          this.batchDel();
-        } else if (e.key == 2) {
-          this.batchFrozen(2);
-        } else if (e.key == 3) {
-          this.batchFrozen(1);
-        }
-      },
-      handleFrozen: function (id, status) {
-        let that = this;
-        frozenBatch({ids: id, status: status}).then((res) => {
-          if (res.success) {
-            that.$message.success(res.message);
-            that.loadData();
-          } else {
-            that.$message.warning(res.message);
-          }
-        });
-      },
-      handleChangePassword(username) {
-        this.$refs.passwordmodal.show(username);
-      },
-      handleAgentSettings(username) {
-        this.$refs.sysUserAgentModal.agentSettings(username);
-        this.$refs.sysUserAgentModal.title = "用户代理人设置";
-      },
-      passwordModalOk() {
-        //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
-      }
-    }
-
-  }
+      })
+    },
+    handleChangePassword(username) {
+      this.$refs.passwordmodal.show(username)
+    },
+    handleAgentSettings(username) {
+      this.$refs.sysUserAgentModal.agentSettings(username)
+      this.$refs.sysUserAgentModal.title = '用户代理人设置'
+    },
+    passwordModalOk() {
+      //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less'
+@import '~@assets/less/common.less';
 </style>

+ 207 - 180
src/views/system/modules/DepartModal.vue

@@ -2,222 +2,249 @@
   <a-modal
     :title="title"
     :width="800"
-    :ok=false
+    :ok="false"
     :visible="visible"
     :confirmLoading="confirmLoading"
-    :okButtonProps="{ props: {disabled: disableSubmit} }"
+    :okButtonProps="{ props: { disabled: disableSubmit } }"
     @ok="handleOk"
     @cancel="handleCancel"
-    cancelText="关闭">
-
+    cancelText="关闭"
+  >
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="机构名称"
-          :hidden="false"
-          hasFeedback >
-          <a-input id="departName" placeholder="请输入机构/部门名称" v-decorator="['departName', validatorRules.departName ]"/>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="机构名称" :hidden="false" hasFeedback>
+          <a-input
+            id="departName"
+            placeholder="请输入机构/部门名称"
+            v-decorator="['departName', validatorRules.departName]"
+          />
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :hidden="seen" label="上级部门" hasFeedback>
-        <a-tree-select
-          style="width:100%"
-          :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
-          :treeData="departTree"
-          v-model="model.parentId"
-          placeholder="请选择上级部门"
-          :disabled="condition">
-        </a-tree-select>
+          <a-tree-select
+            style="width: 100%"
+            :dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
+            :treeData="departTree"
+            v-model="model.parentId"
+            placeholder="请选择上级部门"
+            :disabled="condition"
+          >
+          </a-tree-select>
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门领导">
+          <a-select
+            showSearch
+            :filterOption="filterOption"
+            style="width: 100%"
+            placeholder="请选择部门领导"
+            v-decorator="['leader', { rules: [{ required: true, message: '部门领导必选' }] }]"
+            labelInValue
+          >
+            <a-select-option v-for="(people, peopleindex) in peopleList" :key="peopleindex" :value="people.key">
+              {{ people.label }}
+            </a-select-option>
+          </a-select>
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="机构类型">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="机构类型">
           <template v-if="seen">
-          <a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
-            <a-radio value="1">
-              公司
-            </a-radio>
-          </a-radio-group>
+            <a-radio-group v-decorator="['orgCategory', validatorRules.orgCategory]" placeholder="请选择机构类型">
+              <a-radio value="1"> 公司 </a-radio>
+            </a-radio-group>
           </template>
           <template v-else>
-            <a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
-              <a-radio value="2">
-                部门
-              </a-radio>
-              <a-radio value="3">
-                岗位
-              </a-radio>
+            <a-radio-group v-decorator="['orgCategory', validatorRules.orgCategory]" placeholder="请选择机构类型">
+              <a-radio value="2"> 部门 </a-radio>
+              <a-radio value="3"> 岗位 </a-radio>
             </a-radio-group>
           </template>
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="电话">
-          <a-input placeholder="请输入电话" v-decorator="['mobile',validatorRules.mobile]" />
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="电话">
+          <a-input placeholder="请输入电话" v-decorator="['mobile', validatorRules.mobile]" />
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="传真">
-          <a-input placeholder="请输入传真" v-decorator="['fax', {}]"  />
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="传真">
+          <a-input placeholder="请输入传真" v-decorator="['fax', {}]" />
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="地址">
-          <a-input placeholder="请输入地址" v-decorator="['address', {}]"  />
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="地址">
+          <a-input placeholder="请输入地址" v-decorator="['address', {}]" />
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="排序">
-          <a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]" />
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
+          <a-input-number :min="0" v-decorator="['departOrder', { initialValue: 0 }]" />
         </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="备注">
-          <a-textarea placeholder="请输入备注" v-decorator="['memo', {}]"  />
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
+          <a-textarea placeholder="请输入备注" v-decorator="['memo', {}]" />
         </a-form-item>
-
       </a-form>
     </a-spin>
   </a-modal>
 </template>
 
 <script>
-  import { httpAction } from '@/api/manage'
-  import { queryIdTree } from '@/api/api'
-  import pick from 'lodash.pick'
-  import ATextarea from 'ant-design-vue/es/input/TextArea'
-  export default {
-    name: "SysDepartModal",
-    components: { ATextarea },
-    data () {
-      return {
-        departTree:[],
-        orgTypeData:[],
-        phoneWarning:'',
-        departName:"",
-        title:"操作",
-        seen:false,
-        visible: false,
-        condition:true,
-        disableSubmit:false,
-        model: {},
-        menuhidden:false,
-        menuusing:true,
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
+import { httpAction } from '@/api/manage'
+import { queryIdTree } from '@/api/api'
+import pick from 'lodash.pick'
+import ATextarea from 'ant-design-vue/es/input/TextArea'
+export default {
+  name: 'SysDepartModal',
+  components: { ATextarea },
+  data() {
+    return {
+      peopleList: [],
+      departTree: [],
+      orgTypeData: [],
+      phoneWarning: '',
+      departName: '',
+      title: '操作',
+      seen: false,
+      visible: false,
+      condition: true,
+      disableSubmit: false,
+      model: {},
+      menuhidden: false,
+      menuusing: true,
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
 
-        confirmLoading: false,
-        form: this.$form.createForm(this),
-        validatorRules:{
-        departName:{rules: [{ required: true, message: '请输入机构/部门名称!' }]},
-        orgCode:{rules: [{ required: true, message: '请输入机构编码!' }]},
-         mobile:{rules: [{validator:this.validateMobile}]}
-        },
-        url: {
-          add: "/sys/sysDepart/add",
-        },
-        dictDisabled:true,
-      }
+      confirmLoading: false,
+      form: this.$form.createForm(this),
+      validatorRules: {
+        departName: { rules: [{ required: true, message: '请输入机构/部门名称!' }] },
+        orgCode: { rules: [{ required: true, message: '请输入机构编码!' }] },
+        mobile: { rules: [{ validator: this.validateMobile }] },
+      },
+      url: {
+        add: '/sys/sysDepart/add',
+      },
+      dictDisabled: true,
+    }
+  },
+  created() {},
+  methods: {
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     },
-    created () {
+    getAllPeople() {
+      this.getAction('/sys/user/getAllUser',{status:1}).then((res) => {
+        if (res.success) {
+          this.peopleList = res.result.map((item) => {
+            return { key: item.userId, label: item.realName }
+          })
+        }
+      })
     },
-    methods: {
-      loadTreeData(){
-        var that = this;
-        queryIdTree().then((res)=>{
-          if(res.success){
-            that.departTree = [];
-            for (let i = 0; i < res.result.length; i++) {
-              let temp = res.result[i];
-              that.departTree.push(temp);
-            }
+    loadTreeData() {
+      var that = this
+      queryIdTree().then((res) => {
+        if (res.success) {
+          that.departTree = []
+          for (let i = 0; i < res.result.length; i++) {
+            let temp = res.result[i]
+            that.departTree.push(temp)
           }
-
-        })
-      },
-      add (depart) {
-        if(depart){
-          this.seen = false;
-          this.dictDisabled = false;
-        }else{
-          this.seen = true;
-          this.dictDisabled = true;
         }
-        this.edit(depart);
-      },
-      edit (record) {
-          this.form.resetFields();
-          this.model = Object.assign({}, {});
-          this.visible = true;
-          this.loadTreeData();
-          this.model.parentId = record!=null?record.toString():null;
-          if(this.seen){
-            this.model.orgCategory = '1';
-          }else{
-            this.model.orgCategory = '2';
-          }
-          this.$nextTick(() => {
-            this.form.setFieldsValue(pick(this.model,'orgCategory','departName','departNameEn','departNameAbbr','departOrder','description','orgType','orgCode','mobile','fax','address','memo','status','delFlag'))
-          });
-      },
-      close () {
-        this.$emit('close');
-        this.disableSubmit = false;
-        this.visible = false;
-      },
-      handleOk () {
-        const that = this;
-        // 触发表单验证
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let formData = Object.assign(this.model, values);
-            //时间格式化
-            console.log(formData)
-            httpAction(this.url.add,formData,"post").then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.loadTreeData();
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
+      })
+    },
+    add(depart) {
+      if (depart) {
+        this.seen = false
+        this.dictDisabled = false
+      } else {
+        this.seen = true
+        this.dictDisabled = true
+      }
+      this.edit(depart)
+    },
+    edit(record) {
+      this.form.resetFields()
+      this.model = Object.assign({}, {})
+      this.visible = true
+      this.loadTreeData()
+      this.getAllPeople()
+      this.model.parentId = record != null ? record.toString() : null
+      if (this.seen) {
+        this.model.orgCategory = '1'
+      } else {
+        this.model.orgCategory = '2'
+      }
+
+      if(record.leaderId){
+        this.model.leader = {key:record.leaderId,label:record.leaderName}
+      }else{
+        this.model.leader = undefined
+      }
+      this.$nextTick(() => {
+        this.form.setFieldsValue(
+          pick(
+            this.model,
+            'orgCategory',
+            'departName',
+            'departNameEn',
+            'departNameAbbr',
+            'departOrder',
+            'description',
+            'orgType',
+            'orgCode',
+            'mobile',
+            'fax',
+            'address',
+            'memo',
+            'status',
+            'delFlag',
+            'leader'
+          )
+        )
+      })
+    },
+    close() {
+      this.$emit('close')
+      this.disableSubmit = false
+      this.visible = false
+    },
+    handleOk() {
+      const that = this
+      // 触发表单验证
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          that.confirmLoading = true
+          let formData = Object.assign(this.model, values)
+          formData.leaderId = values.leader.key
+          formData.leaderName = values.leader.label.replace(/[\r\n]/g, "");
+          //时间格式化
+          console.log(formData)
+          httpAction(this.url.add, formData, 'post')
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.loadTreeData()
+                that.$emit('ok')
+              } else {
+                that.$message.warning(res.message)
               }
-            }).finally(() => {
-              that.confirmLoading = false;
-              that.close();
             })
-
-          }
-        })
-      },
-      handleCancel () {
-        this.close()
-      },
-      validateMobile(rule,value,callback){
-        if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)){
-          callback();
-        }else{
-          callback("您的手机号码格式不正确!");
+            .finally(() => {
+              that.confirmLoading = false
+              that.close()
+            })
         }
-
+      })
+    },
+    handleCancel() {
+      this.close()
+    },
+    validateMobile(rule, value, callback) {
+      if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) {
+        callback()
+      } else {
+        callback('您的手机号码格式不正确!')
       }
-    }
-  }
+    },
+  },
+}
 </script>
 
 <style scoped>
-
 </style>

+ 0 - 0
src/views/system/modules/UserModal.vue


Some files were not shown because too many files changed in this diff