魏志佳 před 4 roky
rodič
revize
2b6abd6d34
75 změnil soubory, kde provedl 7990 přidání a 23232 odebrání
  1. 0 18943
      package-lock.json
  2. 1 1
      package.json
  3. 4 3
      public/index.html
  4. 1 1
      src/api/api.js
  5. 0 3
      src/components/ctop/vm-card.vue
  6. 4 4
      src/components/layouts/TabLayout.vue
  7. 4 4
      src/components/page/GlobalLayout.vue
  8. 2 2
      src/components/table/index.js
  9. 1 1
      src/components/tools/Breadcrumb.vue
  10. 2 2
      src/components/tools/HeaderNotice.vue
  11. 1 1
      src/components/tools/UserPassword.vue
  12. 3 3
      src/components/uploadFile.vue
  13. 3 4
      src/main.js
  14. 27 14
      src/mixins/JeecgListMixin.js
  15. 0 2
      src/permission.js
  16. 3 3
      src/store/modules/permission.js
  17. 3 3
      src/utils/authFilter.js
  18. 1 1
      src/utils/getDay.js
  19. 2 2
      src/utils/request.js
  20. 0 2
      src/views/activiti/applyHome.vue
  21. 268 0
      src/views/activiti/customerForm.vue
  22. 1 1
      src/views/activiti/todoManage.vue
  23. 44 10
      src/views/modules/LaunchHousekeeper/LaunchHousekeeperList.vue
  24. 6 1
      src/views/modules/LaunchHousekeeper/newProject.vue
  25. 98 60
      src/views/modules/LaunchHousekeeper/setProjectBudget.vue
  26. 25 6
      src/views/modules/LaunchHousekeeper/setProjectConvert.vue
  27. 678 154
      src/views/modules/LaunchHousekeeper/setProjectCreate.vue
  28. 23 9
      src/views/modules/LaunchHousekeeper/setProjectDirectional.vue
  29. 30 2
      src/views/modules/Statistics/accountMaterStatistics.vue
  30. 0 4
      src/views/modules/Statistics/accountReport.vue
  31. 1 1
      src/views/modules/Statistics/alipayStatistics.vue
  32. 1 1
      src/views/modules/Statistics/caicaicai/dayStatistics.vue
  33. 1 1
      src/views/modules/Statistics/companyDetail.vue
  34. 2 1
      src/views/modules/Statistics/companyStatistics.vue
  35. 1 1
      src/views/modules/Statistics/components/selecTable.vue
  36. 337 0
      src/views/modules/Statistics/components/selectPagination.vue
  37. 769 0
      src/views/modules/Statistics/imageStatics/imageCostReport.vue
  38. 18 0
      src/views/modules/Statistics/refuseDataCreat.vue
  39. 28 10
      src/views/modules/Statistics/refuseDataCreatNew.vue
  40. 1 1
      src/views/modules/Statistics/videoStatics/vDay.vue
  41. 1 1
      src/views/modules/Statistics/videoStatics/vMonth.vue
  42. 2 2
      src/views/modules/Statistics/videoStatics/vSummary.vue
  43. 1 1
      src/views/modules/Statistics/videoStatics/vWeek.vue
  44. 1 1
      src/views/modules/Statistics/yicheStatistics/dayStatistics.vue
  45. 1 1
      src/views/modules/Statistics/yicheStatistics/timeStatistics.vue
  46. 288 168
      src/views/modules/advertiser/AdvertiserList.vue
  47. 174 123
      src/views/modules/advertiser/ProjectList.vue
  48. 16 37
      src/views/modules/advertiser/ProjectMemberList.vue
  49. 380 277
      src/views/modules/advertiser/UserAllocationList.vue
  50. 0 29
      src/views/modules/advertiser/modules/AdvertiserModal.vue
  51. 0 31
      src/views/modules/advertiser/modules/ProjectMemberModal.vue
  52. 150 80
      src/views/modules/advertiser/modules/ProjectModal.vue
  53. 19 76
      src/views/modules/advertiser/modules/productModal.vue
  54. 1 1
      src/views/modules/kuaishouapp/account/editGroupNew.vue
  55. 10 6
      src/views/modules/kuaishouapp/account/stepForm/Step3.vue
  56. 169 112
      src/views/modules/kuaishouapp/account/stepForm/stepModule/newModulePop.vue
  57. 34 10
      src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue
  58. 307 634
      src/views/modules/material/labelMaterial.vue
  59. 660 0
      src/views/modules/material/labelNewMaterial.vue
  60. 8 5
      src/views/modules/material/materialList.vue
  61. 0 188
      src/views/modules/material/modules/DepartAuthModal.vue
  62. 107 136
      src/views/modules/material/modules/DepartModal.vue
  63. 415 0
      src/views/modules/material/modules/labelModal.vue
  64. 1 7
      src/views/modules/material/modules/videoList.vue
  65. 361 290
      src/views/modules/material/scriptFile.vue
  66. 2070 1561
      src/views/modules/material/videoMaterial.vue
  67. 11 7
      src/views/modules/material/videoTemplate.vue
  68. 0 3
      src/views/modules/yard/YardList.vue
  69. 0 3
      src/views/modules/yard/modules/yardDetail.vue
  70. 160 0
      src/views/report/JhsBakendDataList.vue
  71. 172 0
      src/views/report/modules/JhsBakendDataModal.vue
  72. 1 1
      src/views/system/modules/PasswordModal.vue
  73. 68 31
      src/views/ureport/UReportFileList.vue
  74. 8 8
      vue.config.js
  75. 0 140
      投放管家创建接口

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 18943
package-lock.json


+ 1 - 1
package.json

@@ -29,7 +29,6 @@
     "element-ui": "^2.13.0",
     "enquire.js": "^2.1.6",
     "html2canvas": "^1.0.0-rc.3",
-    "iview": "2.0.0-rc.17",
     "jquery": "^3.4.1",
     "js-cookie": "^2.2.0",
     "k-form-design": "^3.6.1",
@@ -47,6 +46,7 @@
     "vue-count-to": "^1.0.13",
     "vue-cropper": "^0.4.8",
     "vue-i18n": "^8.7.0",
+    "vue-infinite-scroll": "^2.0.2",
     "vue-layer": "^1.0.2",
     "vue-loader": "^15.7.0",
     "vue-ls": "^3.2.0",

+ 4 - 3
public/index.html

@@ -271,9 +271,10 @@
   <!-- 全局配置 -->
   <script>
     window._CONFIG = {};
-    window._CONFIG['domianURL'] = 'http://39.97.120.42:8080/jeecg-boot';
-    window._CONFIG['imgDomainURL'] = 'http://39.97.120.42:8080/jeecg-boot/sys/common/view';
-    window._CONFIG['pdfDomainURL'] = 'http://39.97.120.42:8080/jeecg-boot/sys/common/pdf/pdfPreviewIframe';
+    // window._CONFIG['domianURL'] = 'http://192.168.1.72:8088/jeecg-boot';
+    window._CONFIG['domianURL'] = 'http://139.186.31.213:8804/jeecg-boot';
+    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>
 </head>
 

+ 1 - 1
src/api/api.js

@@ -76,7 +76,7 @@ export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItem
 function getDictItemsFromCache(dictCode) {
   if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
     let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode];
-    console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems)
+    // console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems)
     return dictItems;
   }
 }

+ 0 - 3
src/components/ctop/vm-card.vue

@@ -12,9 +12,6 @@
 /* .ping-list:hover span {
   display: block;
 } */
-/* .ant-modal-body {
-  padding-top: 0px;
-} */
 li {
   list-style-type: none;
 }

+ 4 - 4
src/components/layouts/TabLayout.vue

@@ -235,7 +235,7 @@
           this.$message.warning('这是最后一页,不能再关闭了啦')
           return
         }
-        console.log("this.pageList ", this.pageList);
+        // console.log("this.pageList ", this.pageList);
         // this.pageList = this.pageList.filter(item => item.fullPath !== key)
         // let index = this.linkList.indexOf(key)
         // this.linkList = this.linkList.filter(item => item !== key)
@@ -287,14 +287,14 @@
         if (key == '/modules/BatchCreate/newGroup' && !(this.linkList.includes('/modules/BatchCreate/newCreate') || this
             .linkList.includes('/modules/BatchCreate/newPlan') || this.linkList.includes(
               '/modules/BatchCreate/TouTiaoBatch'))) {
-          console.log('newGroup')
+          // console.log('newGroup')
           localStorage.setItem('accountInfo', '')
           localStorage.setItem("groupInfo", '')
         }
         if (key == '/modules/BatchCreate/newPlan' && !(this.linkList.includes('/modules/BatchCreate/newCreate') || this
             .linkList.includes('/modules/BatchCreate/newGroup') || this.linkList.includes(
               '/modules/BatchCreate/TouTiaoBatch'))) {
-          console.log('newPlan')
+          // console.log('newPlan')
           localStorage.setItem('accountInfo', '')
           localStorage.setItem("groupInfo", '')
           localStorage.setItem("planInfo", '')
@@ -302,7 +302,7 @@
         if (key == '/modules/BatchCreate/newCreate' && !(this.linkList.includes('/modules/BatchCreate/TouTiaoBatch') ||
             this.linkList.includes('/modules/BatchCreate/newPlan') || this.linkList.includes(
               '/modules/BatchCreate/newGroup'))) {
-          console.log('newCreate')
+          // console.log('newCreate')
           localStorage.setItem('accountInfo', '')
           localStorage.setItem("groupInfo", '')
           localStorage.setItem("planInfo", '')

+ 4 - 4
src/components/page/GlobalLayout.vue

@@ -129,10 +129,10 @@
       //this.menus = this.mainRouters.find((item) => item.path === '/').children;
       this.menus = this.permissionMenuList
       // 根据后台配置菜单,重新排序加载路由信息
-      console.log('----加载菜单逻辑----')
-      console.log(this.mainRouters)
-      console.log(this.permissionMenuList)
-      console.log('----navTheme------'+this.navTheme)
+      // console.log('----加载菜单逻辑----')
+      // console.log(this.mainRouters)
+      // console.log(this.permissionMenuList)
+      // console.log('----navTheme------'+this.navTheme)
       //--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
     },
     methods: {

+ 2 - 2
src/components/table/index.js

@@ -57,13 +57,13 @@ export default {
       });
     },
     pageSize(val) {
-      console.log('pageSize:', val)
+      // console.log('pageSize:', val)
       Object.assign(this.localPagination, {
         pageSize: val
       });
     },
     showSizeChanger(val) {
-      console.log('showSizeChanger', val)
+      // console.log('showSizeChanger', val)
       Object.assign(this.localPagination, {
         showSizeChanger: val
       });

+ 1 - 1
src/components/tools/Breadcrumb.vue

@@ -23,7 +23,7 @@
     methods: {
       getBreadcrumb() {
 
-        console.log('this.$route.matched', this.$route.matched)
+        // console.log('this.$route.matched', this.$route.matched)
 
         this.breadList = []
         this.breadList.push({name: 'dashboard', path: '/dashboard/', meta: {title: '首页'}})

+ 2 - 2
src/components/tools/HeaderNotice.vue

@@ -151,9 +151,9 @@
               this.msg2Title = "系统消息(" + res.result.sysMsgTotal + ")";
             }
           }).catch(error => {
-            console.log("系统消息通知异常",error);//这行打印permissionName is undefined
+            // console.log("系统消息通知异常",error);//这行打印permissionName is undefined
             this.stopTimer = true;
-            console.log("清理timer");
+            // console.log("清理timer");
           });
         } catch (err) {
           this.stopTimer = true;

+ 1 - 1
src/components/tools/UserPassword.vue

@@ -112,7 +112,7 @@
           if (!err) {
             that.confirmLoading = true;
             let params = Object.assign({username:this.username},values)
-            console.log("修改密码提交数据",params)
+            // console.log("修改密码提交数据",params)
             putAction(this.url,params).then((res)=>{
               if(res.success){
                 console.log(res)

+ 3 - 3
src/components/uploadFile.vue

@@ -180,7 +180,7 @@
         }
       },
       removeFile(file) {
-        console.log(file)
+        // console.log(file)
         var index = this.fileList.findIndex(v => v.uid === file.uid)
         this.fileList.splice(index, 1)
         this.$emit('removeUpload', file)
@@ -196,7 +196,7 @@
         this.percent = 0
         this.loadingElse = true
         const fileOvesize = (file.size > this.size * oneKB)
-        console.log(fileOvesize)
+        // console.log(fileOvesize)
         if (fileOvesize) {
           this.onOversize()
           this.loadingElse = false
@@ -240,7 +240,7 @@
           }
 
         }
-        console.log(str + '-' + timeElse + '.' + arr[arr.length - 1])
+        // console.log(str + '-' + timeElse + '.' + arr[arr.length - 1])
         cos.putObject({
           Bucket: 'media-1301855440',
           /* 必须 */

+ 3 - 4
src/main.js

@@ -62,9 +62,9 @@ import JeecgComponents from '@/components/jeecg/index'
 // import iView from 'iview'
 import '!style-loader!css-loader!less-loader!./theme/index.less'
 
-// import ElementUI from 'element-ui';
-// import 'element-ui/lib/theme-chalk/index.css';
-
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+Vue.use(ElementUI);
 import {
   getDay,
   allWeeks
@@ -77,7 +77,6 @@ Vue.prototype.wps = WPS;
 
 Vue.prototype.$getDay = getDay
 Vue.prototype.allWeeks = allWeeks
-// Vue.use(ElementUI);
 
 Vue.config.productionTip = false
 // Vue.use(iView)

+ 27 - 14
src/mixins/JeecgListMixin.js

@@ -79,7 +79,7 @@ export const JeecgListMixin = {
                                 key:index
                             }
                         })
-                        console.log(record.innerData)
+                        // console.log(record.innerData)
                         record.innerData = transformTozTreeFormat( record.innerData)
                     }
                     if (res.code === 510) {
@@ -109,9 +109,9 @@ export const JeecgListMixin = {
         params.endDate = moment(params.createTime[1]).format('YYYY-MM-DD')
         params.createTime = null
       }
-      // if(params.startDate){
-      //   params.startDate = moment(params.startDate).format('YYYY-MM-DD')
-      // }
+      if(params.stateDate){
+        params.stateDate = moment(params.stateDate).format('YYYY-MM-DD')
+      }
       // if(params.endDate){
       //   params.endDate = moment(params.endDate).format('YYYY-MM-DD')
       // }
@@ -119,14 +119,27 @@ export const JeecgListMixin = {
       this.loading = true;
       await getAction(this.url.list, params).then((res) => {
         if (res.success) {
+          if(res.result.records){
             this.dataSource = res.result.records.map(item=>{
-                return {
-                    ...item,
-                    innerData:[],
-                    showVideo:false
-                }
+              return {
+                  ...item,
+                  innerData:[],
+                  showVideo:false
+              }
             })
             this.ipagination.total = res.result.total;
+          }else{
+            this.dataSource = res.result.map(item=>{
+              return {
+                  ...item,
+                  innerData:[],
+                  showVideo:false
+              }
+            })
+            // this.ipagination = null;
+            this.ipagination.pageSize=res.result.length
+          }
+            
         }
         if (res.code === 510) {
           this.$message.warning(res.message)
@@ -163,7 +176,7 @@ export const JeecgListMixin = {
       if (this.superQueryParams) {
         sqp['superQueryParams'] = encodeURI(this.superQueryParams)
       }
-      console.log(this.queryParam)
+      // console.log(this.queryParam)
       var param = {...this.queryParam,...this.isorter, ...this.filters}
       param.pageNo = this.ipagination.current;
       param.pageSize = this.ipagination.pageSize;
@@ -243,7 +256,7 @@ export const JeecgListMixin = {
       });
     },
     handleEdit: function (record,sign) {
-        console.log(record,sign)
+        // console.log(record,sign)
       this.$refs.modalForm.edit(record,sign);
       this.$refs.modalForm.title = "编辑";
       this.$refs.modalForm.disableSubmit = false;
@@ -281,7 +294,7 @@ export const JeecgListMixin = {
     },
     modalFormOk() {
       // 新增/修改 成功时,重载列表
-      this.loadData();
+      this.loadData(1);
     },
     handleDetail: function (record) {
       this.$refs.modalForm.edit(record);
@@ -302,7 +315,7 @@ export const JeecgListMixin = {
       if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
         param['selections'] = this.selectedRowKeys.join(",")
       }
-      console.log("导出参数", param)
+      // console.log("导出参数", param)
       downFile(this.url.exportXlsUrl, param).then((data) => {
         if (!data) {
           this.$message.warning("文件下载失败")
@@ -326,7 +339,7 @@ export const JeecgListMixin = {
     /* 导入 */
     handleImportExcel(info) {
       if (info.file.status !== 'uploading') {
-        console.log(info.file, info.fileList);
+        // console.log(info.file, info.fileList);
       }
       if (info.file.status === 'done') {
         if (info.file.response.success) {

+ 0 - 2
src/permission.js

@@ -23,10 +23,8 @@ router.beforeEach((to, from, next) => {
     } else {
       if (store.getters.permissionList.length === 0) {
         store.dispatch('GetPermissionList').then(res => {
-          console.log(res,34567890)
           const menuData = res.result.menu;
           localStorage.setItem("roleCode",res.result.roleCode)
-          console.log(res.message)
           if (menuData === null || menuData === "" || menuData === undefined) {
             return;
           }

+ 3 - 3
src/store/modules/permission.js

@@ -60,17 +60,17 @@ const permission = {
     SET_ROUTERS: (state, data) => {
       state.addRouters = data
       state.routers = constantRouterMap.concat(data)
-      console.log('-----mutations---SET_ROUTERS----', data)
+      // console.log('-----mutations---SET_ROUTERS----', data)
     }
   },
   actions: {
     GenerateRoutes({ commit }, data) {
       return new Promise(resolve => {
         const { roles } = data
-        console.log('-----mutations---data----', data)
+        // console.log('-----mutations---data----', data)
         let accessedRouters
         accessedRouters = filterAsyncRouter(asyncRouterMap, roles)
-        console.log('-----mutations---accessedRouters----', accessedRouters)
+        // console.log('-----mutations---accessedRouters----', accessedRouters)
         commit('SET_ROUTERS', accessedRouters)
         resolve()
       })

+ 3 - 3
src/utils/authFilter.js

@@ -9,7 +9,7 @@ export function disabledAuthFilter(code, formData) {
 }
 
 function nodeDisabledAuth(code, formData) {
-  console.log("页面权限禁用--NODE--开始");
+  // console.log("页面权限禁用--NODE--开始");
   var permissionList = [];
   try {
     var obj = formData;
@@ -40,7 +40,7 @@ function nodeDisabledAuth(code, formData) {
   } else {
     for (var item2 of permissionList) {
       if (code === item2.action) {
-        console.log("页面权限禁用--NODE--生效");
+        // console.log("页面权限禁用--NODE--生效");
         return true;
       }
     }
@@ -49,7 +49,7 @@ function nodeDisabledAuth(code, formData) {
 }
 
 function globalDisabledAuth(code) {
-  console.log("页面禁用权限--Global--开始");
+  // console.log("页面禁用权限--Global--开始");
 
   var permissionList = [];
   var allPermissionList = [];

+ 1 - 1
src/utils/getDay.js

@@ -65,7 +65,7 @@ export  function allWeeks(now_month) {
     let start = new Date(year, month, 1); // 得到当月第一天
     let end = new Date(year, month + 1, 0); // 得到当月最后一天
     let start_day = start.getDay(); // 当月第一天是周几
-    console.log(start.format("yyyy-MM-dd"), end.format("yyyy-MM-dd")); // 每月的起始日期
+    // console.log(start.format("yyyy-MM-dd"), end.format("yyyy-MM-dd")); // 每月的起始日期
     switch (start_day) {
       case 0:
         i = 0 - 1;

+ 2 - 2
src/utils/request.js

@@ -28,8 +28,8 @@ const err = (error) => {
   if (error.esponse) {
     let data = error.response.data
     const token = Vue.ls.get(ACCESS_TOKEN)
-    console.log("------异常响应------", token)
-    console.log("------异常响应------", error.response.status)
+    // console.log("------异常响应------", token)
+    // console.log("------异常响应------", error.response.status)
     switch (error.response.status) {
       case 403:
         notification.error({message: '系统提示', description: '拒绝访问', duration: 4})

+ 0 - 2
src/views/activiti/applyHome.vue

@@ -30,8 +30,6 @@
           </a-list>
         </a-collapse-panel>
       </a-collapse>
-      <k-form-design style="border:2px solid #ccc" :fields="typeList" :toolbars="['save', 'preview', 'reset', 'close' ]"
-        :showHead="false" toolbarsTop showToolbarsText @save="saveJson" />
     </div>
     <!--流程表单-->
     <a-modal :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%">

+ 268 - 0
src/views/activiti/customerForm.vue

@@ -0,0 +1,268 @@
+<style>
+.form-designer-container-9136076486841527 {
+  height: 55vh !important;
+}
+</style>
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="表单名称">
+              <a-input placeholder="请输入表单名称" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAddForm" type="primary" icon="plus">新增</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+        <span slot="action" slot-scope="text, record">
+          <a @click="lookView(record)">预览</a>
+        </span>
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+    <a-modal
+      :maskClosable="false"
+      title="表单新增"
+      v-model="addForm"
+      :footer="null"
+      :width="1200"
+      :okButtonProps="{ props: { disabled: false } }"
+      :cancelButtonProps="{ props: { disabled: false } }"
+    >
+      <a-form :form="form">
+        <a-form-item
+          label="表单名称"
+          :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-input
+            v-decorator="[
+            'name',
+            {rules: [{ required: true, message: '请输入表单名称' }]}
+          ]"
+            placeholder="请输入表单名称"
+          />
+        </a-form-item>
+        <k-form-design
+          v-if="addForm"
+          style="border:2px solid #ccc"
+          :fields="typeList"
+          :toolbars="['save', 'preview', 'reset', 'close' ]"
+          :showHead="false"
+          toolbarsTop
+          showToolbarsText
+          @save="saveJson"
+        />
+      </a-form>
+    </a-modal>
+    <a-modal
+      :maskClosable="false"
+      title="表单预览"
+      v-model="viewLookVisible"
+      :footer="null"
+      :width="1200"
+      :okButtonProps="{ props: { disabled: false } }"
+      :cancelButtonProps="{ props: { disabled: false } }"
+    >
+      <k-form-build
+        v-if="viewLookVisible"
+        :defaultValue="defaultValue"
+        :value="jsonData"
+        ref="KFB"
+      />
+    </a-modal>
+
+    <!-- 表单区域 -->
+    <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 } from '../../api/manage'
+import { mapActions, mapGetters } from 'vuex'
+
+export default {
+  name: 'AdvertiserList',
+  mixins: [JeecgListMixin],
+  components: {
+    AFormItem,
+    JTreeSelect,
+    JSelectUserByDep,
+    JSelectDepart,
+    JSelectUser,
+  },
+  data() {
+    return {
+      typeList: [
+        'input',
+        'textarea',
+        'number',
+        'select',
+        'checkbox',
+        'radio',
+        'date',
+        'time',
+        'rate',
+        'slider',
+        'uploadFile',
+        'uploadImg',
+        'switch',
+        'button',
+        'text',
+        'card',
+        'grid',
+        'table',
+      ], //"alert","html", "divider",
+      addForm: false,
+      viewLookVisible: false,
+      jsonData: {},
+      defaultValue: {},
+      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),
+      // 表头
+      columns: [
+        {
+          title: '表单名称',
+          align: 'center',
+          dataIndex: 'name',
+        },
+        {
+          title: '创建人',
+          align: 'center',
+          dataIndex: 'userId_dictText',
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' },
+        },
+      ],
+      url: {
+        list: '/ctop/actCustomForm/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
+  },
+  methods: {
+    lookView(item) {
+      this.viewLookVisible = true
+      this.jsonData = JSON.parse(item.text)
+    },
+    saveJson(json) {
+      console.log(json)
+      this.form.validateFields((err) => {
+        if (!err) {
+          var params = {}
+          params.name = this.getData('name')
+          params.text = json
+          postAction('/ctop/actCustomForm/add', params).then((res) => {
+            if (res.success) {
+              this.addForm = false
+              this.loadData(1)
+            }
+          })
+        }
+      })
+    },
+    handleAddForm() {
+      this.addForm = true
+    },
+    getData(className) {
+      return this.form.getFieldValue(className)
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    searchRe() {
+      this.queryParam.name = ''
+      this.queryParam.industryId = ''
+      this.loadData()
+    },
+    handleSubmit() {
+      // 触发表单验证
+    },
+
+    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>

+ 1 - 1
src/views/activiti/todoManage.vue

@@ -303,7 +303,7 @@ export default {
       this.$refs.table.selectAll(false);
     },
     handelSubmit() {
-      console.log("提交")
+      // console.log("提交")
       this.submitLoading = true;
       var formData = Object.assign({},this.form);
       formData.assignees = formData.assignees.join(",");

+ 44 - 10
src/views/modules/LaunchHousekeeper/LaunchHousekeeperList.vue

@@ -147,7 +147,13 @@
                         <a-divider type="vertical" />
                         <a href="javascript:;" @click="planAnalysis(record)">计划分析</a>
                         <a-divider type="vertical" />
-                        <a href="javascript:;" @click="deleteProject(record)">删除</a>
+                        <a-popconfirm
+                            title="确定删除该投放项目吗?"
+                            @confirm="deleteProject(record)"                            
+                        >
+                            <a href="javascript:;" >删除</a>
+                        </a-popconfirm>
+                        
                     </span>
                 </a-table>
             </div>
@@ -486,11 +492,13 @@ export default {
                 let params=[];
                 params=this.selectedRows.map(item=>{
                     return {
-                        accountId:record.accountId,
-                        groupId:record.id,
-                        
+                        accountId:item.accountId,
+                        groupId:item.id,    
+                        userId:this.userInfo.value.id,
+                        optStatus:'DELETED',                   
                     }
                 })
+                this.batchEditStatus(params)
             }
         },
 
@@ -501,16 +509,17 @@ export default {
                 let params=[];
                 params=this.selectedRows.map(item=>{
                     return {
-                        accountId:record.accountId,
-                        groupId:record.id,
-                        optStatus:'DELETE',
+                        accountId:item.accountId,
+                        groupId:item.id,
+                        userId:this.userInfo.value.id,
+                        optStatus:'DELETED',
                     }
                 })
             
                 if(this.optValue=='pause'){   
                     this.loading=true;
                     params.forEach(item=>{
-                        item.optStatus='ENABLE';
+                        item.optStatus='ENABLED';
                     })
                     // this.batchEditStatus(params)
                 }else if(this.optValue=='open'){
@@ -524,6 +533,7 @@ export default {
                 
             }
             
+
         },
 
         sort(pagination, filters, sorter, { currentDataSource }){
@@ -542,6 +552,7 @@ export default {
                     this.tableListHttp();
                 }else{
                     this.$message.success('修改失败')
+
                 }
             })
         },
@@ -554,10 +565,12 @@ export default {
 
             let params=[];
             params.push({
+                userId:this.userInfo.value.id,
                 accountId:record.accountId,
                 groupId:record.id,
-                optStatus:record.optStatus=="DISABLED"?'ENABLE':'DISABLED'
+                optStatus:record.optStatus=="DISABLED"?'ENABLED':'DISABLED'
             })
+            
             postAction('/adlab/ctopAdlabProjectDetail/edit',params).then(res=>{
                 console.log(res)
                 record.spin=false;
@@ -585,7 +598,28 @@ export default {
             console.log(records)
         },
         deleteProject(records){
-            console.log(records)
+            console.log(records);
+          
+            let params=[];
+             params.push({
+                userId:this.userInfo.value.id,
+                accountId:records.accountId,
+                groupId:records.id,
+                optStatus:records.optStatus=="DISABLED"?'ENABLED':'DISABLED'
+            })
+            // postAction('/adlab/ctopAdlabProjectDetail/edit',params).then(res=>{
+            //     console.log(res)
+            //     record.spin=false;
+            //     if(res.success){
+            //         this.$message.success('修改成功');
+            //         record.checkedStatus=!record.checkedStatus
+            //     }else{
+            //         this.$message.success('修改失败')
+            //     }
+            // })
+            this.batchEditStatus(params)
+
+            
         },
 
         // 请求账户的列表

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

@@ -154,7 +154,7 @@
          <a-modal v-model="visible" title="提示"  @ok="handleOk" :keyboard='false' :maskClosable='false'>
             <ul>
               <li v-for="(item,index) in errorInfo" :key="index">
-                  <span>账户id{{item.accountId}}:</span>{{item.message || '创建成功'}}
+                  <span>账户{{LHKaccountInfo[index].title}}:</span>{{item.message || '投放项目创建成功,下一步去设置转化信息'}}
               </li>
             </ul>
             <template slot="footer">
@@ -191,6 +191,7 @@ export default {
   },
   data() {
     return {
+        LHKaccountInfo:{},
         treeValue: [],
         treeData: [],
         SHOW_PARENT,
@@ -468,6 +469,10 @@ export default {
     goNext() {
       this.$nextTick(()=>{
         if (this.name) {
+           let LHKaccountInfo=sessionStorage.getItem('LHKaccountInfo');
+            if(LHKaccountInfo){
+                this.LHKaccountInfo=JSON.parse(LHKaccountInfo)
+            }
           this.form.validateFields((err, values) => {
             if (!err) {
 

+ 98 - 60
src/views/modules/LaunchHousekeeper/setProjectBudget.vue

@@ -29,7 +29,7 @@
                         </div>
                         <div class="input-item">
                         <a-form-item>
-                            <a-radio-group v-decorator="['scheduleType', { initialValue:'SCHEDULE_FROM_NOW' }]">
+                            <a-radio-group v-decorator="['scheduleType', { initialValue:'SCHEDULE_FROM_NOW' }]" @change="scheduleTypeChange">
                             <a-radio-button value="SCHEDULE_FROM_NOW">从今天起长期投放</a-radio-button>
                             <a-radio-button value="SCHEDULE_START_END">设置开始和结束时间</a-radio-button>
                             </a-radio-group>
@@ -37,6 +37,7 @@
                             <a-range-picker
                                 @change="dateChange"
                                 v-model="dateRange"
+                                :disabled-date="disabledDate" 
                                 v-if="getFormData('scheduleType')=='SCHEDULE_START_END'"
                             />
                             </p>
@@ -51,9 +52,9 @@
                         </div>
                         <div class="input-item">
                         <a-form-item>
-                            <a-radio-group v-decorator="['scheduleTime', { initialValue:'' }]">
-                            <a-radio-button value=''>不限</a-radio-button>
-                            <a-radio-button value="SpecifiedTImePeriod">指定时间段</a-radio-button>
+                            <a-radio-group v-decorator="['scheduleTime', { initialValue:'' }]" >
+                              <a-radio-button value=''>不限</a-radio-button>
+                              <a-radio-button value="SpecifiedTImePeriod">指定时间段</a-radio-button>
                             </a-radio-group>
                             <div
                             v-show="getFormData('scheduleTime')=='SpecifiedTImePeriod'"
@@ -84,10 +85,10 @@
                       <div class="input-item">
                         <a-form-item>
                           <a-input-group compact>
-                            <a-select :disabled="true" v-decorator="['budgetMode', { initialValue:'BUDGET_MODE_DAY' }]">
-                              <a-select-option value="BUDGET_MODE_DAY" >日预算</a-select-option>
+                            <a-select :disabled="true" v-decorator="['budgetMode', { initialValue:'DAILY' }]">
+                              <a-select-option value="DAILY" >日预算</a-select-option>
                               <!-- <a-select-option
-                                value="BUDGET_MODE_TOTAL"
+                                value="TOTAL"
                                 v-if="getFormData('smartBidType')=='SMART_BID_CUSTOM'"
                               >总预算</a-select-option> -->
                             </a-select>
@@ -132,7 +133,7 @@
                         <a-form-item>
                           <a-input-number
                             style="width:200px"
-                            :max="1500"
+                            :max="10000"
                             :step="0.1"
                             v-decorator="['bid', {rules:validationRules.bid} ]"
                           />
@@ -145,8 +146,18 @@
                         >请输入预期成本,不少于0.1元,不超过10000元</span>
                       </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-button type='primary' @click="isSetDeepConvert" > 是否设置深度转化 </a-button>
+                        </div>
+                    </div>
+
+                    <div class="row-item" v-if="isDeepConvert">
                       <div class="hint-item"> </div>
                       <div class="label-item">
                         <div class="text-item">深度优化方式</div>
@@ -162,7 +173,7 @@
                         </a-form-item>
                       </div>
                     </div>
-                    <div class="row-item" >
+                    <div class="row-item" v-if="isDeepConvert">
                       <div class="hint-item"> </div>
                       <div class="label-item">
                         <div class="text-item">深度转化出价</div>
@@ -220,7 +231,7 @@
                 <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>
+                <a-button type="primary" @click="goNext"  :loading="goNextloading">开始投放</a-button>
                 </div>
             </div>
         
@@ -230,7 +241,7 @@
          <a-modal v-model="visible" title="提示"  @ok="handleOk" :keyboard='false' :maskClosable='false'>
             <ul>
               <li v-for="(item,index) in errorInfo" :key="index">
-                  <span>账户{{LHKaccountInfo[index].title}}:</span>{{item.message || '设置转化信息成功'}}
+                  <span>账户{{LHKaccountInfo[index].title}}:</span>{{item.message || '设置预算与出价信息成功'}}
               </li>
             </ul>
             <template slot="footer">
@@ -238,7 +249,7 @@
                 返回本页
               </a-button>
               <a-button key="submit" type="primary"  @click="handleOk">
-                下一步
+                返回投放管家页面
               </a-button>
             </template>
           </a-modal>
@@ -263,6 +274,8 @@ export default {
   },
   data() {
     return {
+        userInfo:{},
+        isDeepConvert:false,
         projectInfo:[],
         LHKaccountInfo:[],
         
@@ -312,17 +325,28 @@ export default {
     
   },
   methods: {
-    
+    // 投放日期改变
+    scheduleTypeChange(val){
+      console.log(val)
+      if(val=='SCHEDULE_FROM_NOW'){
+        this.dateRange=[moment(),moment().add(10,'years')]
+        
+      }else{
+        this.dateRange=[moment(),moment().add(10,'days')]
+      }
+    },
     callback(val) {
       console.log(val);
     },
 
-    
+    isSetDeepConvert(){
+      this.isDeepConvert=!this.isDeepConvert
+    },
     
     handleOk(e) {
         this.visible=false;
       // this.$router.push('/LaunchHousekeeper/setProjectDirectional')
-        this.$router.push({path:'/LaunchHousekeeper/setProjectDirectional'})
+        this.$router.push({path:'/modules/LaunchHousekeeper/LaunchHousekeeperList'})
         this.$bus.$emit('remove', '/LaunchHousekeeper/setProjectConvert')
         
     },
@@ -342,8 +366,8 @@ export default {
       this.form.getFieldDecorator('startTime')
       this.form.getFieldDecorator('endTime')
       this.form.setFieldsValue({
-        startTime: date[0].format('YYYY-MM-DD HH:mm'),
-        endTime:  date[1].format('YYYY-MM-DD HH:mm'),
+        startTime: date[0].format('YYYY-MM-DD'),
+        endTime:  date[1].format('YYYY-MM-DD'),
       })
     },
     
@@ -391,11 +415,14 @@ export default {
         }
     },
 
-   
+    disabledDate(current) {
+            // console.log(current)
+            return current && current < moment()
+      },
     
     goBack() {
       this.$router.replace('/modules/LaunchHousekeeper/LaunchHousekeeperList')
-      this.$bus.$emit('remove', '/LaunchHousekeeper/setProjectConvert')
+      this.$bus.$emit('remove', '/LaunchHousekeeper/setProjectBudget')
     },
     
     // 保存并新建创意
@@ -403,52 +430,59 @@ export default {
       this.$nextTick(()=>{
         
           this.form.validateFields((err, values) => {
-            if (!err) {
+            if(this.getFormData('bid')<this.getFormData('budget')){
 
-              console.log('Received values of form: ', values)
-              
-              this.goNextloading=true;
-              if(this.getFormData('scheduleTime')!=''){
-                  values.weekTime=this.scheduleTimeData
-              }
-              
-              values.startTime=this.dateRange[0].format('YYYY-MM-DD HH:mm');
-              values.endTime= this.dateRange[1].format('YYYY-MM-DD HH:mm');
+              if (!err) {
 
-              let params=[];
-              params=this.projectInfo.map((item,index)=>{
-                return {
-                  ...item,
-                  ...values,
+                console.log('Received values of form: ', values)
+                
+                this.goNextloading=true;
+                if(this.getFormData('scheduleTime')!=''){
+                    values.weekTime=this.scheduleTimeData
+                }else{
+                    values.weekTime=''
+                }
+                if(this.getFormData('scheduleType')=='SCHEDULE_FROM_NOW'){
+                  values.startTime=this.dateRange[0].format('YYYY-MM-DD');
+                  values.endTime= this.dateRange[1].add(10,"years").format('YYYY-MM-DD');
+                  
+                }else{
+                    values.startTime=this.dateRange[0].format('YYYY-MM-DD');
+                    values.endTime= this.dateRange[1].format('YYYY-MM-DD');
                 }
-              })
-              console.log(values)
-              postAction('/adlab/Project/setBudget', params).then((res) => {
-                console.log(res)
-                if (res.success) {
-                  this.goNextloading=false;
                 
-                    if(res.result){
-                        // this.errorInfo=res.result;
-                        // this.visible=true;
-
-                        // let projectInfo=[]
-                        // res.result.forEach(item=>{
-                        //     if(item.code==0){
-                        //       projectInfo.push(item)
-                        //     }
-                        // })
 
-                        //  sessionStorage.setItem('projectInfo',JSON.stringify(projectInfo))
-                    }
-                 
-                } else {
-                   this.goNextloading=false;
-                  this.$message.error(res.message)
-                }
-              })
+                let params=[];
+                params=this.projectInfo.map((item,index)=>{
+                  return {
+                    ...item,
+                    ...values,
+                    userId:this.userInfo.value.id
+                  }
+                })
+                console.log(values)
+                postAction('/adlab/Project/setBudget', params).then((res) => {
+                  console.log(res)
+                  if (res.success) {
+                    this.goNextloading=false;
+                  
+                      if(res.result){
+                          this.errorInfo=res.result;
+                          this.visible=true;
+ 
+                      }
+                  
+                  } else {
+                    this.goNextloading=false;
+                    this.$message.error(res.message)
+                  }
+                })
+              }else{
+                this.$message.error('请正确填写必填项目')
+              }
+                          
             }else{
-              this.$message.error('请正确填写必填项目')
+              this.$message.error('出价不得高于组预算')
             }
           })
         
@@ -476,6 +510,10 @@ export default {
         if(editLHKProjectInfo){
           this.LHKaccountInfo.push(editLHKProjectInfo);
         }
+        let userInfo=localStorage.getItem('pro__Login_Userinfo')
+        if(userInfo){
+            this.userInfo=JSON.parse(userInfo)        
+        }
         
   },
 }

+ 25 - 6
src/views/modules/LaunchHousekeeper/setProjectConvert.vue

@@ -21,7 +21,7 @@
             <a-form :form="form">
                 <div class="moduler-title">投放链接</div>
                 <div class="ad-range">
-                    <div class="row-item">
+                    <div class="row-item" v-if="projectInfo.length>0&&projectInfo[0].landingType=='APP'" >
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">下载方式</div>              
@@ -31,7 +31,7 @@
                             <a-form-item>
                                 <a-radio-group
                                 v-decorator="['downloadType',{ initialValue:'DOWNLOAD_URL' }]"
-                                v-if="projectInfo.length>0&&projectInfo[0].landingType=='APP'"  @change="downloadTypeChange">
+                                 @change="downloadTypeChange">
                                     <a-radio-button value="DOWNLOAD_URL">下载链接</a-radio-button>
                                     <a-radio-button value="EXTERNAL_URL">落地页</a-radio-button>
                                 </a-radio-group>
@@ -47,7 +47,7 @@
                         <div class="input-item">
                             <a-form-item>
                                 <a-radio-group v-decorator="['appType', { initialValue:'APP_IOS' }]" @change="appTypeChange">
-                                <a-radio-button value="" v-if="getFormData('downloadType')=='EXTERNAL_URL'">不限</a-radio-button>
+                                <a-radio-button value="" v-if="getFormData('downloadType')=='EXTERNAL_URL' || (projectInfo.length>0&&projectInfo[0].landingType=='LINK')">不限</a-radio-button>
                                 <a-radio-button value="APP_IOS">IOS</a-radio-button>
                                 <a-radio-button value="APP_ANDROID">安卓</a-radio-button>
                                 
@@ -63,19 +63,20 @@
                         </div>
                         <div class="input-item">
                             <a-form-item>
-                                <a-input v-decorator="['url', {rules:validationRules.url}]" />
+                                <a-input v-decorator="['url', {rules:validationRules.url}]" @change="UrlChange" />
                             </a-form-item>
                         </div>
                     </div>    
                     <div class="row-item" v-if="getFormData('downloadType')=='DOWNLOAD_URL'&&getFormData('appType')=='APP_ANDROID'">
                         <div class="hint-item"></div>
                         <div class="label-item">
+                          
                         <div class="text-item">应用包名</div>
                         <div class="required-item"></div>
                         </div>
                         <div class="input-item">
                         <a-form-item>
-                            <a-input v-decorator="['adlabPackage', {rules:validationRules.name}]" />
+                            <a-input v-decorator="['adlabPackage', {rules:validationRules.name}]" :disabled="true" />
                         </a-form-item>
                         </div>
                     </div>
@@ -255,7 +256,25 @@ export default {
       console.log(val);
     },
 
-    
+    // 链接地址改变
+    UrlChange(e){
+      console.log(e.target.value);
+      if(this.IsURL(e.target.value)&&this.getFormData('appType')=='APP_ANDROID'&&this.projectInfo[0].landingType=='APP'){
+        postAction('/ctop/queryTool/parseInstallPackage',qs.stringify({
+          installUrl:e.target.value,
+          appType:this.getFormData('appType')
+        })).then(res=>{
+          console.log(res)
+          if(res.success){
+            this.form.setFieldsValue({
+              adlabPackage:res.result.package
+            })
+          }else{
+            this.$message.error(res.message)
+          }
+        })
+      }
+    },
     
     handleOk(e) {
         this.visible=false;

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 678 - 154
src/views/modules/LaunchHousekeeper/setProjectCreate.vue


+ 23 - 9
src/views/modules/LaunchHousekeeper/setProjectDirectional.vue

@@ -30,7 +30,7 @@
                             <a-radio-group v-model="adposition" @change="adpositionChange">
                             <a-radio-button value="smartInventorys" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='DEFAULT'">优选广告位</a-radio-button>
                             <a-radio-button value="inventoryTypes" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='DEFAULT'">按媒体指定位置</a-radio-button>
-                            <a-radio-button value="UNION" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='UNION'">穿山甲</a-radio-button>
+                            <a-radio-button :value="900000000" v-if="projectInfo.length>0&&projectInfo[0].deliveryRange=='UNION'">穿山甲</a-radio-button>
                             <!-- <a-radio-button value="sceneInventorys">按场景指定位置</a-radio-button> -->
                             </a-radio-group>
                         </a-form-item>
@@ -96,19 +96,19 @@
                             <a-form-item>
                                 <a-radio-group   v-model="district" @change="cityChange">
                                     <a-radio-button value="NONE">不限</a-radio-button>
-                                    <a-radio-button value="REGION_LEVEL_CITY">按省市</a-radio-button>
-                                    <a-radio-button value="REGION_LEVEL_DISTRICT">按区县</a-radio-button>
+                                    <a-radio-button value="CITY">按省市</a-radio-button>
+                                    <a-radio-button value="COUNTY">按区县</a-radio-button>
                                     
                                 </a-radio-group>
                             </a-form-item>
                             <div class="region" v-show="district!='NONE'">
                                 <!-- 省市 -->
-                                <div class="provincyCity" v-if="district=='REGION_LEVEL_CITY'">          
+                                <div class="provincyCity" v-if="district=='CITY'">          
                                                         
                                     <linkMultiSelect title='省份' :listArr='[]' :maxLayers='2' :listUrl='regionCityListUrl' @getSelectedArr='getSelectedCityArr'/>
                                 </div>
                                 <!-- 区县 -->
-                                <div class="district" v-else-if="district=='REGION_LEVEL_DISTRICT'">
+                                <div class="district" v-else-if="district=='COUNTY'">
                                     
                                     <linkMultiSelect title='省份' :listArr='[]' :maxLayers='3' :listUrl='regionCityListUrl'  @getSelectedArr='getSelectedCountyArr'/>
                                 </div>
@@ -228,7 +228,7 @@
                                 <a-radio-group   v-decorator="['superiorPopularityType', { initialValue:'NONE'}]">
                                     <a-radio-button value="NONE">不限</a-radio-button>
                                     <!-- <a-radio-button value="APP " :disabled='getFormData("deliveryRange")!="UNION"'>应用软件精选</a-radio-button> -->
-                                    <a-radio-button value="GAME" :disabled='getFormData("deliveryRange")!="UNION"'>游戏精选</a-radio-button>
+                                    <a-radio-button value="GAME" >游戏精选</a-radio-button>
                                 </a-radio-group>                       
                             </a-form-item>
                         </div>
@@ -707,7 +707,7 @@ export default {
     
     goBack() {
       this.$router.replace('/modules/LaunchHousekeeper/LaunchHousekeeperList')
-      this.$bus.$emit('remove', '/LaunchHousekeeper/newProject')
+      this.$bus.$emit('remove', '/LaunchHousekeeper/setProjectDirectional')
     },
     
     // 保存并新建创意
@@ -718,12 +718,20 @@ export default {
             if (!err) {
 
                 console.log('Received values of form: ', values)
+                if(this.district!='NONE'){
+                  values.district=this.district
+                }
+                
                 console.log(this.excludeSelectedKeys,this.incluedSelectedKeys)
                 this.goNextloading=true;
 
                 if(this.adposition!='inventoryTypes'){
                     this.checkedList=[];
                 }
+                if(this.projectInfo.length>0&&this.projectInfo[0].deliveryRange=='UNION'){
+                  this.checkedList=[];
+                  this.checkedList.push(900000000)
+                }
 
                 let params=[];
             
@@ -757,8 +765,8 @@ export default {
                         autoExtendEnabled:this.autoExtendEnabled,
                         autoExtendTargets:this.autoExtendTargets,
                         inventoryType:this.checkedList,
-                        // district:this.district=='NONE'?'':this.district,
-                        district:'',
+                        district:this.district=='NONE'?'':this.district,
+                        
                     }
 
                 }
@@ -831,6 +839,12 @@ export default {
                 }
             })
         })
+
+        if(this.projectInfo.length>0&&this.projectInfo[0].deliveryRange=='UNION'){
+          this.checkedList=[];
+          this.checkedList.push(900000000)
+          this.adposition=900000000
+        }
   },
 }
 </script>

+ 30 - 2
src/views/modules/Statistics/accountMaterStatistics.vue

@@ -10,6 +10,7 @@
   margin-right: 10px;
   padding: 5px 10px;
   cursor: pointer;
+  
 }
 </style>
 <style>
@@ -45,7 +46,7 @@ th div {
         <a-button @click="dianji">进入素材报表</a-button>
       </div>
       <a-row type="flex" align="middle" justify="space-between" class="panel-body">
-        <div class="search-bar" style="width:100%">
+        <div class="search-bar" style="width:100%;position:relative">
           <span>账户选择:</span>
           <treeselect :appId.sync="appId" request="2,4"/>
           <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
@@ -57,6 +58,7 @@ th div {
             >刷新</a-button
           >
           <a-button type="primary" style="margin:10px" @click="getDataResetAll">重置</a-button>
+          <a-button type='primary' class="export" @click="exportExcel" style="position: absolute;right:0;">导出报表</a-button>
         </div>
       </a-row>
       <a-row>
@@ -135,7 +137,8 @@ import { JeecgListMixin } from '@/mixins/ipagination'
 
 // import the component
 import Treeselect from './components/Treeselect.vue'
-import { getAction } from '../../../api/manage'
+// import { getAction } from '../../../api/manage'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
 
 // 引入基本模板
 let echarts = require('echarts/lib/echarts')
@@ -490,6 +493,31 @@ export default {
       this.appId = []
       this.data = []
     },
+    //导出报表
+    exportExcel() {
+     
+        var params = {}
+        params.accountIds = JSON.stringify(this.appId)
+        params.type = this.active
+        if (this.active == 9) {
+          params.startDate = this.allValue[0]
+          params.endDate = this.allValue[1]
+        }
+      downFilePost('/materialReport/materialReport/excel', params).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对象
+      })
+    },
+
     addUser() {
       this.loading = true
       var that = this

+ 0 - 4
src/views/modules/Statistics/accountReport.vue

@@ -105,11 +105,7 @@
                   </span>
                 </a-tooltip>
             </div>
-            <div class="infoNum"> 
-                <span class="red">{{showNumLink.showNum | formatCurrency }}</span> 
-                <span class="green" v-if="dateValue[0].format('YYYY-MM-DD')==dateValue[1].format('YYYY-MM-DD')"><span class="huanbi">环比: </span> {{ showNumLink.showNumLink|toPercentage  }}</span> 
             </div>
-        </div>
         <div class="showBox">
             <div class="title">
                 <div class="infotitle">转化数</div>

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

@@ -508,7 +508,7 @@ export default {
       params.discount = this.discount
       downFilePost('/ctop/daily/exportDailyReport', params).then(res => {
         let blob = new Blob([res], {
-          type: 'application/vnd.ms-excel'
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
         })
         let downloadElement = document.createElement('a')
         let href = window.URL.createObjectURL(blob) //创建下载的链接

+ 1 - 1
src/views/modules/Statistics/caicaicai/dayStatistics.vue

@@ -373,7 +373,7 @@ export default {
       })[0].projectName
       downFilePost('/ctop/advertiser/exportXxlDailyReport', param).then(res => {
         let blob = new Blob([res], {
-          type: 'application/vnd.ms-excel'
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
         })
         let downloadElement = document.createElement('a')
         let href = window.URL.createObjectURL(blob) //创建下载的链接

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

@@ -299,7 +299,7 @@ export default {
       downFilePost('/agent/kuaiShouDailyAgent/companyReportAccountDetailListExportExcel', params).then(
         res => {
           let blob = new Blob([res], {
-            type: 'application/vnd.ms-excel'
+            type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
           })
           let downloadElement = document.createElement('a')
           let href = window.URL.createObjectURL(blob) //创建下载的链接

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

@@ -387,7 +387,8 @@ export default {
     exportExcel() {
       downFilePost('/agent/kuaiShouDailyAgent/companyReportExportExcel', this.params).then(res => {
         let blob = new Blob([res], {
-          type: 'application/vnd.ms-excel'
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+          
         })
         let downloadElement = document.createElement('a')
         let href = window.URL.createObjectURL(blob) //创建下载的链接

+ 1 - 1
src/views/modules/Statistics/components/selecTable.vue

@@ -236,4 +236,4 @@ export default {
 /*.clear{*/
 /*  margin:20px 0px 20px 0px;*/
 /*}*/
-</style>
+</style>

+ 337 - 0
src/views/modules/Statistics/components/selectPagination.vue

@@ -0,0 +1,337 @@
+<style>
+.select-table .ant-table-thead > tr > th,
+.select-table .ant-table-tbody > tr > td {
+  padding: 0 !important;
+}
+.select-table .ant-table {
+  font-size: 12px;
+}
+.demo-infinite-container {
+  border: 1px solid #e8e8e8;
+  border-radius: 4px;
+  overflow: auto;
+  padding: 8px 24px;
+  height: 300px;
+}
+.demo-loading-container {
+  position: absolute;
+  bottom: 40px;
+  width: 100%;
+  text-align: center;
+}
+</style>
+<template>
+  <a-form-item
+    label="项目名称"
+    :label-col="labelCol"
+    :wrapper-col="wrapperCol"
+    v-clickoutside="handleClose"
+    style="width:100%"
+    class="select-table"
+  >
+    <a-input placeholder="请选择项目" @focus="topMiddle = true" v-model="keyValue" @change="getData" />
+    <div
+      v-show="topMiddle"
+      v-infinite-scroll="handleInfiniteOnLoad"
+      style="background:white;padding:10px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);position:relative;z-index:1000"
+      class="demo-infinite-container"
+      :infinite-scroll-disabled="busy"
+      :infinite-scroll-distance="80"
+    >
+      <a-list :data-source="data">
+        <a-list-item slot="renderItem" slot-scope="item" @click="showProject(item)">
+          <a-list-item-meta :description="'广告主名称:'+item.advertiserName">
+            <a slot="title">项目名称:{{ item.projectName }}</a>
+          </a-list-item-meta>
+          <div>
+            {{item.mediaId == '1'
+            ? '头条'
+            : item.mediaId == '2'
+            ? '快手'
+            : item.mediaId == '3'
+            ? '头条内广'
+            : '快手内广'}}
+          </div>
+        </a-list-item>
+        <div v-if="loading && !busy" class="demo-loading-container">
+          <a-spin />
+        </div>
+      </a-list>
+    </div>
+  </a-form-item>
+</template>
+
+<script>
+import { getAction, postAction } from '@/api/manage'
+import moment from 'moment'
+import { mapGetters } from 'vuex'
+import jq from 'jquery'
+import infiniteScroll from 'vue-infinite-scroll'
+const clickoutside = {
+  // 初始化指令
+  bind(el, binding, vnode) {
+    function documentHandler(e) {
+      // 这里判断点击的元素是否是本身,是本身,则返回
+      if (el.contains(e.target)) {
+        return false
+      }
+      // 判断指令中是否绑定了函数
+      if (binding.expression) {
+        // 如果绑定了函数 则调用那个函数,此处binding.value就是handleClose方法
+        binding.value(e)
+      }
+    }
+    // 给当前元素绑定个私有变量,方便在unbind中可以解除事件监听
+    el.__vueClickOutside__ = documentHandler
+    document.addEventListener('click', documentHandler)
+  },
+  update() {},
+  unbind(el, binding) {
+    // 解除事件监听
+    document.removeEventListener('click', el.__vueClickOutside__)
+    delete el.__vueClickOutside__
+  },
+}
+export default {
+  name: 'select-pagination',
+  components: {},
+  directives: { clickoutside, infiniteScroll },
+  props: {
+    projectId: {
+      type: String,
+      default() {
+        return ''
+      },
+    },
+  },
+
+  data() {
+    return {
+      loading: false,
+      busy: false,
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 12 },
+      },
+      selectedRowKeys: [],
+      selectedRowKeysValue: [],
+      topMiddle: false,
+      keyValue: '',
+      data: [],
+      dataElse: [],
+      ipagination: {
+        current: 0,
+        pageSize: 20,
+      },
+      rowClick: (record, index) => ({
+        // 事件
+        on: {
+          click: () => {
+            var str =
+              record.mediaId == '1'
+                ? '头条'
+                : record.mediaId == '2'
+                ? '快手'
+                : record.mediaId == '3'
+                ? '头条内广'
+                : '快手内广'
+            this.keyValue = record.projectName + ' ' + str
+            this.topMiddle = false
+            this.data = this.dataElse
+            this.$emit('update:projectId', record.projectId)
+          },
+        },
+      }),
+    }
+  },
+  computed: {},
+  filters: {},
+  methods: {
+    showProject(record) {
+      var str =
+        record.mediaId == '1'
+          ? '头条'
+          : record.mediaId == '2'
+          ? '快手'
+          : record.mediaId == '3'
+          ? '头条内广'
+          : '快手内广'
+      this.keyValue = record.projectName
+      this.topMiddle = false
+      this.$emit('update:projectId', record.projectId)
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    onSelectChange(selectedRowKeys, selectionRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRowKeysValue = selectionRows.map((item) => {
+        return { orientationId: item.orientationId, orientationName: item.orientationName }
+      })
+    },
+    getData() {
+      if(this.keyValue == ''){
+        this.$emit('update:projectId', "")
+      }
+      this.ipagination.current = 1
+      getAction('/ctop/projectMember/participateListV2', {
+        userId: this.userInfo().id,
+        pageNo:  this.ipagination.current,
+        projectName: this.keyValue,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.data = res.result.records.map((item, index) => {
+            return {
+              ...item,
+              projectId: item.projectId + '',
+              key: index,
+            }
+          })
+          // this.dataElse = res.result.records.map((item, index) => {
+          //   return {
+          //     ...item,
+          //     projectId: item.projectId + '',
+          //     key: index,
+          //   }
+          // })
+        }
+      })
+    },
+    handleClose() {
+      this.topMiddle = false
+    },
+    // allData() {
+    //   getAction('/ctop/projectMember/participateListV2', {
+    //     userId: this.userInfo().id,
+    //     pageSize: this.ipagination.pageSize,
+    //     pageNo: this.ipagination.current,
+    //   }).then((res) => {
+    //     if (res.code == 0) {
+    //       this.data = res.result.records.map((item, index) => {
+    //         return {
+    //           ...item,
+    //           projectId: item.projectId + '',
+    //           key: index,
+    //         }
+    //       })
+    //       this.dataElse = res.result.records.map((item, index) => {
+    //         return {
+    //           ...item,
+    //           projectId: item.projectId + '',
+    //           key: index,
+    //         }
+    //       })
+    //     }
+    //   })
+    // },
+    handleInfiniteOnLoad() {
+      const data = this.data
+      this.loading = true
+      this.ipagination.current++
+      // this.fetchData((res) => {
+      //   this.data = data.concat(res.results)
+      //   this.loading = false
+      // })
+      getAction('/ctop/projectMember/participateListV2', {
+        userId: this.userInfo().id,
+        pageSize: this.ipagination.pageSize,
+        pageNo: this.ipagination.current,
+        projectName: this.keyValue,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.busy = true
+          this.data = data.concat(
+            res.result.records.map((item, index) => {
+              return {
+                ...item,
+                projectId: item.projectId + '',
+              }
+            })
+          )
+
+          // this.data = res.result.records.map((item, index) => {
+          //   return {
+          //     ...item,
+          //     projectId: item.projectId + '',
+          //     key: index,
+          //   }
+          // })
+          // this.dataElse = res.result.records.map((item, index) => {
+          //   return {
+          //     ...item,
+          //     projectId: item.projectId + '',
+          //     key: index,
+          //   }
+          // })
+        }
+      })
+    },
+  },
+  watch: {
+    projectId(n, o) {
+      if (n == '') {
+        this.keyValue = ''
+      } else {
+      }
+    },
+  },
+  mounted: function () {
+    // this.handleInfiniteOnLoad()
+  },
+}
+</script>
+
+<style type="text/css">
+.plug-timer-grid {
+  width: 100%;
+}
+
+.plug-timer-grid td,
+.plug-timer-grid th {
+  border: 1px solid #97b4d1;
+  text-align: center; /*cursor:pointer;*/
+  font-size: 10px;
+  line-height: 10px;
+}
+
+.Selected {
+  background-color: rgb(102, 162, 243);
+  opacity: 0.5;
+}
+
+.plug-timer-grid {
+  border-collapse: collapse;
+  z-index: 4;
+}
+
+.plug-timer-grid thead tr {
+  display: table-row;
+  vertical-align: inherit;
+  border-color: inherit;
+}
+
+.group-creat table td {
+  height: 20px;
+  max-width: 5px;
+  font-size: 12px;
+  text-align: center;
+  vertical-align: middle;
+  overflow: hidden;
+  transition: background 0.5s;
+  -webkit-transition: background 0.5s;
+}
+
+.plug-timer-grid tbody th {
+  width: 4%;
+}
+
+.plug-timer-grid tbody tr td {
+  width: 2%;
+}
+
+/*.clear{*/
+/*  margin:20px 0px 20px 0px;*/
+/*}*/
+</style>

+ 769 - 0
src/views/modules/Statistics/imageStatics/imageCostReport.vue

@@ -0,0 +1,769 @@
+<template>
+  <div class="vsummary">
+      <div class="tabspane">
+        <a-tabs v-model="tabKeys" @change="tabChange">
+            <a-tab-pane :key="1" tab="头条">           
+            </a-tab-pane>
+            <a-tab-pane :key="2" tab="快手" >               
+            </a-tab-pane>
+        </a-tabs>
+      </div>
+    <div class="xiangmuxuanze">
+      <span>项目选择:</span>
+       
+        <a-tree-select
+            v-model="accountIds"
+            show-search
+            style="width: 600px;height:30px"
+            :dropdownMatchSelectWidth='true'
+            :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"              
+            tree-checkable
+            searchPlaceholder='请输入账户关键字搜索'
+            :show-checked-strategy="SHOW_PARENT"
+            placeholder="请选择项目和账户或搜索账户关键字"
+            treeNodeFilterProp="title"
+            :allowClear="true"
+            @change="treeChange"                               
+            :maxTagCount='1'    
+            :tree-data="treeData"
+            :filterOption='filterOption'
+        >
+        
+        </a-tree-select>
+        
+    </div>
+    <div class="timeDiv">
+      <div>
+        <span>时间范围:</span>
+
+        <a-range-picker
+          :disabled-date="disabledDate"
+          format="YYYY-MM-DD"
+          style="width: 250px;"
+          @change="dateChange"
+          v-model="dateRange"
+        />
+        
+      </div>
+      <div>
+        <span>图片ID:</span>
+        <a-input class="myinput" v-model="videoID" style="width:250px" />
+      </div>
+
+      <a-button type="primary" @click="searchRes">查询</a-button>
+    </div>
+
+    <div style="display:flex;margin:15px 0" class="btndiv">
+      <a-button type="primary" @click="exportExcel" id="mybtn" v-show="exportExcelIsOk">导出报表</a-button>
+    </div>
+
+   
+    <div class="tableBody">
+
+        <a-table
+        size="middle"
+        :columns="columns"
+        :dataSource="data"
+        bordered
+        id="outTable"
+        :pagination="ipagination"
+        :scroll="{ x: scrollX }"
+        :loading="loading"
+        @change="sort"
+        style="word-break: break-all;padding:0 15px"
+        >
+        <div slot="imageUrl" slot-scope="text,records">
+            <img
+            :src="text"
+            alt
+            style="width:80px"
+            @click="openVideo(records.imageUrl)"
+            @load="loadShow"
+            />
+        </div>
+        <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
+        
+
+        </a-table>
+    
+    </div>
+    <a-modal v-model="relevantPeopleVisible" title="相关人员" :footer="null" :centered='true'>
+        <p>编导:{{relevantPeopleData.planName || '暂无数据'}}</p>
+        <p>剪辑:{{relevantPeopleData.clipName || '暂无数据'}}</p>
+        <p>拍摄:{{relevantPeopleData.shotName || '暂无数据'}}</p>
+    </a-modal>
+    <a-modal v-model="Videovisible" title="视频详情" @ok="videoOk" :footer="null" width="50%">
+      <img
+        @click.stop
+        class="video"
+        :src="videoUrl"
+        controls="controls"
+        style="height:600px;width:100%"
+      />
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+// import { JeecgListMixin } from '@/mixins/ipagination'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+
+import { TreeSelect } from 'ant-design-vue';
+const SHOW_PARENT = TreeSelect.SHOW_PARENT;
+
+// import selectComponent from './selectComponent'
+// import Treeselect from '../components/Treeselect'
+const TTcolumns = [
+  {
+    title: '图片',
+    dataIndex: 'imageUrl',
+    align: 'center',
+    width: 100,
+    fixed: 'left',
+    key: 'imageUrl',
+    scopedSlots: { customRender: 'imageUrl' }
+  },
+  {
+    title: '图片ID',
+    dataIndex: 'signature',
+    align: 'center',
+    width: 150,
+    fixed: 'left'
+  },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 200,
+    fixed: 'left'
+  },
+    {
+    title:'相关人员',
+    dataIndex:'operation',
+    key:'operation',
+    scopedSlots: { customRender: 'operation' },
+    align: 'center',
+    width:100,
+    fixed: 'left'
+  },
+  
+  {
+    title: '消耗',
+    dataIndex: 'cost',
+
+    scopedSlots: { customRender: 'cost' },
+    align: 'center',
+    sorter: () => {}
+  },
+  {
+    title: '点击数',
+    dataIndex: 'click',
+    align: 'center',
+
+    scopedSlots: { customRender: 'click' },
+    sorter: () => {}
+    // (a, b) => a.clickMaterial - b.clickMaterial
+  },
+  {
+    title: '展示数',
+    dataIndex: 'showNum',
+    align: 'center',
+
+    scopedSlots: { customRender: 'showNum' },
+    sorter: () => {}
+  },   
+  {
+    title: '转化数',
+    dataIndex: 'convert',
+    align: 'center',
+
+    scopedSlots: { customRender: 'convert' },
+    sorter: () => {}
+  },
+  {
+    title: '上传时间',
+    dataIndex: 'statDate',
+    scopedSlots: { customRender: 'statDate' },
+    align: 'center',
+    sorter: () => {}
+  },
+]
+const KScolumns = [
+  {
+    title: '图片',
+    dataIndex: 'videoU',
+    align: 'center',
+    width: 100,
+    fixed: 'left',
+    key: 'videoU',
+    scopedSlots: { customRender: 'videoU' }
+  },
+  {
+    title: '图片ID',
+    dataIndex: 'signature',
+    align: 'center',
+    width: 150,
+    fixed: 'left'
+  },
+  {
+    title: '项目名称',
+    dataIndex: 'projectName',
+    align: 'center',
+    width: 200,
+    fixed: 'left'
+  },
+    {
+    title:'相关人员',
+    dataIndex:'operation',
+    key:'operation',
+    scopedSlots: { customRender: 'operation' },
+    align: 'center',
+    width:100,
+    fixed: 'left'
+  },
+  
+  {
+    title: '消耗',
+    dataIndex: 'cost',
+
+    scopedSlots: { customRender: 'cost' },
+    align: 'center',
+    sorter: () => {}
+  },
+  {
+    title: '点击数',
+    dataIndex: 'clickMaterial',
+    align: 'center',
+
+    scopedSlots: { customRender: 'clickMaterial' },
+    sorter: () => {}
+    // (a, b) => a.clickMaterial - b.clickMaterial
+  },
+  {
+    title: '展示数',
+    dataIndex: 'showMaterial',
+    align: 'center',
+
+    scopedSlots: { customRender: 'showMaterial' },
+    sorter: () => {}
+  },   
+  {
+    title: '转化数',
+    dataIndex: 'convertMaterial',
+    align: 'center',
+
+    scopedSlots: { customRender: 'convertMaterial' },
+    sorter: () => {}
+  },
+  {
+    title: '上传时间',
+    dataIndex: 'materialUploadTime',
+    scopedSlots: { customRender: 'materialUploadTime' },
+    align: 'center',
+    sorter: () => {}
+  },
+]
+
+
+let show = 0
+
+export default {
+  data() {
+    return {
+        tabKeys:1,
+        
+        accountIds:[],
+        treeData:[],
+        SHOW_PARENT,
+        KSaccountList:[],
+        TTaccountList:[],
+        accountID:undefined,
+        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;
+            }
+        },
+
+
+
+        relevantPeopleVisible:false,
+      relevantPeopleData:{},
+      roleCode: localStorage.getItem('roleCode'),
+       //下拉选择框的数据
+      projectArr:[],
+      selectValue:'',
+      appId:[],
+      //设置表格的列宽
+      tableWidth: '',
+
+      //gudinglie
+  
+
+      //是否打开视频
+      Videovisible: false,
+      videoUrl: '',
+
+      //是否显示导出按钮
+      exportExcelIsOk: true,
+      consumeValue: 0,
+
+      columns: [...TTcolumns],
+      TTcolumns,
+      KScolumns,
+      data: [],
+      totalSelect: 0,
+      daysFlag: false,
+      dateRange: [],
+      dataElse: [],
+      loading: false,
+      visible: false,
+      //自定义列的搜索框
+      searchInput: '',
+      //弹出框中现实的选中列数
+      scrollX: 0,
+      listNum: [],
+      //
+      form: [],
+      videoID: '',
+      timedata: []
+    }
+  },
+  // mixins: [JeecgListMixin],
+  components: {
+    // selectComponent,
+    // Treeselect
+  },
+    methods: {
+        tabChange(val){
+          this.accountIds=[];
+            if(this.tabKeys==1){
+                this.treeData=this.TTaccountList;
+                this.columns=this.TTcolumns;
+                
+            }else if (this.tabKeys==2){
+                this.treeData=this.KSaccountList;
+                this.columns=this.KScolumns
+            }
+        },
+        treeChange(val) {
+        // console.log(this.treeData)
+            console.log(val)
+            this.accountIds = [];
+            
+            if(val){
+                val.forEach((ele,index)=>{
+                if(ele*1){
+                    this.accountIds.push(ele)
+                }else{              
+                    let projectArr=this.treeData.filter((item)=>{
+                        return item.value==ele
+                    });
+                    // console.log(projectArr)
+                    projectArr[0].children.forEach((element)=>{
+                        this.accountIds.push(element.value)
+                    })
+                }
+
+
+                })       
+            }
+            
+            console.log(this.accountIds);
+            
+
+        
+        },
+        
+        
+        filterOption(input, option){
+            console.log(input, option)
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+                );
+        },
+
+        // 查看相关人员
+        showRelevantPeople(record){
+        this.relevantPeopleVisible=true;
+        console.log(record)
+        getAction('/ctop/materialAscription/getDetail',{
+            code:record.signature
+        }).then(res=>{
+            console.log(res);
+            if(res.result&&res.success){
+            this.relevantPeopleData=res.result
+            }
+            
+        })
+        },
+        sort(pagination, filters, sorter, { currentDataSource }){
+            console.log(pagination, filters, sorter)
+            if(sorter.order == 'ascend'){
+                this.HttpPost(sorter.columnKey+'+')
+                return 
+            }else if(sorter.order == 'descend'){
+                this.HttpPost(sorter.columnKey+'-')
+                return 
+            }
+            this.ipagination.current=pagination.current
+            this.HttpPost()
+        },
+        moment,
+        //select切换---项目
+        selectChange(key){
+            this.selectValue=key;
+        },
+        //打开视频
+        openVideo(val) {
+          this.Videovisible = true
+          this.videoUrl = val
+        },
+        videoOk() {
+          this.Videovisible = false
+        },
+
+        disabledDate(current) {
+        // console.log(current)
+          return current && current > moment().subtract(1, 'day')
+        },
+
+        consumeOnChange() {},
+        //查询按钮
+        searchRes() {
+            this.date = []
+            this.HttpPost()       
+        },
+        loadShow(){
+            show++
+            if(this.data.length>0){
+                if(show == (this.data.length*2)){
+                    this.data = [...this.data]
+                }
+            }
+        },
+        //网络请求table数据函数
+        HttpPost(sort){
+          this.loading=true;
+          show = 0
+          postAction('/image/bytedance/cost', {
+              startDate: this.timedata[0],
+              endDate: this.timedata[1],        
+              code: this.videoID,
+              pageNumber:this.ipagination.current,
+              pageSize:this.ipagination.pageSize,
+              accountList:this.accountIds,
+              // sort:sort?sort:''
+          }).then(res => {
+              let resArr = []
+              this.loading=false;
+              if (res.success) {
+              //   let result = res.result
+              //   this.data.push({ ...result, key: 1 })
+              //   result.map((item, index) => {
+              //     item.key = index
+              //   })
+              this.data = res.data.list.map((item,index)=>{
+                  return {
+                      ...item,
+                      key:index
+                  }
+              })
+              this.ipagination.total = res.data.total
+              this.loading = false
+              
+              }else{
+                  this.loading = false
+              }
+          })
+        },
+        //导出报表
+        exportExcel() {
+        // var params = {}
+        // params.projectId = this.projectId
+        // params.disCount = this.discount
+        // params.statDate = this.statDate.format('YYYY-MM-DD')
+        // var name = this.dataElse.filter(item => {
+        //   return item.projectId == this.projectId
+        // })[0].projectName
+        // downFilePost('/ctop/yiche/report/exportDailyReport', params).then(res => {
+        //   let blob = new Blob([res], {
+        //     type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+        let column = this.columns.map((item, index) => {
+            return item.dataIndex
+        })
+            let columns=['url',...column]
+            
+        downFilePost('/toutiao/videoReportDaily/bytedanceVideoInfoListTotalExportExcel', {
+            columns,
+            signature: this.videoID,
+            startDate: this.timedata[0],
+            endDate: this.timedata[1],
+            cost: this.consumeValue,
+            accountIds:this.appId,
+        }).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 = this.statDate.format('YYYY-MM-DD') + '视频汇总.xlsx' //下载后文件名
+            document.body.appendChild(downloadElement)
+            downloadElement.click() //点击下载
+            document.body.removeChild(downloadElement) //下载完成移除元素
+            window.URL.revokeObjectURL(href) //释放掉blob对象
+        })
+        },
+
+        //日期选择回调
+        dateChange(data, dataString) {
+        if (data.length) {
+            this.timedata = dataString
+            this.dateRange[0] = data[0]
+            this.totalSelect = (data[1]._d - data[0]._d) / (24 * 60 * 60 * 1000) + 1
+            this.daysFlag = true
+            if (this.totalSelect > 92) {
+            this.$message.error('时间跨度太长啦,选小一点好嘛?')
+            this.daysFlag = false
+            this.dateRange = []
+            }
+        } else {
+            this.daysFlag = false
+            this.dateRange = []
+        }
+        },
+
+        //请求项目和账户内容
+        accountHttp(type){
+            this.accountID=undefined;
+            getAction(`/ctop/projectMember/getProjectAccountByUserId?mediaType=${type}`, {}).then(res => {
+                if(res.success){                   
+                    if(res.result){
+                        res.result.forEach((element,index) => {
+                        if(element){
+                            if(type==1){
+                                this.TTaccountList.push({});
+                                this.TTaccountList[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
+                                this.TTaccountList[index].value='project'+element.project.projectId;
+                                this.TTaccountList[index].key=element.project.projectId;
+                                this.TTaccountList[index].mediaId=element.project.mediaId;
+                                this.TTaccountList[index].children=[];
+
+                                if(element.account.length){
+                                    element.account.forEach((ele,i)=>{
+                                        this.TTaccountList[index].children.push({});
+                                        this.TTaccountList[index].children[i].title=ele.userName+'_'+ele.authName;
+                                        this.TTaccountList[index].children[i].value=ele.accountId;
+                                        this.TTaccountList[index].children[i].key=ele.accountId;
+                                    })
+
+                                }
+                                this.treeData=this.TTaccountList
+                            }else if(type==2){
+                                this.KSaccountList.push({});
+                                this.KSaccountList[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
+                                this.KSaccountList[index].value='project'+element.project.projectId;
+                                this.KSaccountList[index].key=element.project.projectId;
+                                this.KSaccountList[index].mediaId=element.project.mediaId;
+                                this.KSaccountList[index].children=[];
+
+                                if(element.account.length){
+                                    element.account.forEach((ele,i)=>{
+                                        this.KSaccountList[index].children.push({});
+                                        this.KSaccountList[index].children[i].title=ele.userName+'_'+ele.authName;
+                                        this.KSaccountList[index].children[i].value=ele.accountId;
+                                        this.KSaccountList[index].children[i].key=ele.accountId;
+                                    })
+
+                                }
+                                this.treeData=this.KSaccountList
+                            }
+                            
+                        }
+                        });
+                        // console.log(this.treeData)
+
+                    }
+                }
+            })
+        },
+  },
+  // watch:{
+  //     'ipagination.current':function(n,o){
+  //         console.log(n,o)
+  //         this.HttpPost()
+  //     }
+  // },
+ 
+  filters: {
+    toPercentage(val) {
+      return (val * 100).toFixed(2) + '%'
+      // return val
+    },
+    toshowTime(val) {
+      // console.log(val, this.timedata)
+      // return this.timedata[0] + '~' + this.timedata[1]
+      return val
+    },
+    tofixed(val) {
+      return Number(val).toFixed(2)
+    }
+  },
+
+  mounted() {
+    
+    //进入页面默认展示昨天到今天的数据
+    this.dateRange=[moment().subtract(1,'days'),moment()]
+    this.timedata=[moment().subtract(1
+    ,'days').format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')]
+    // this.loading=true;
+   
+    this.HttpPost()
+    this.accountHttp(1);
+    this.accountHttp(2);
+    
+    
+  }
+}
+</script>
+<style lang="less">
+// .ant-table .ant-table-fixed-left .ant-table-thead {
+//   height: 108px !important ;
+// }
+.vsummary{
+  .ant-table .ant-table-thead .ant-table-header-column .ant-table-column-title {
+    // display:block;
+    white-space: normal;
+    word-break: break-all;
+  }
+}
+
+</style>
+
+<style lang="scss" scoped>
+.vsummary {
+  width: 100%;
+  height: 100%;
+  background:  #fff;
+  padding: 20px;
+  box-sizing: border-box;
+}
+.tableBody{
+   margin-top: 20px;
+}
+.xiangmuxuanze{
+  margin-bottom: 20px;;
+}
+.timeDiv {
+  display: flex;
+  justify-content: space-between;
+}
+span {
+  margin-left: 5px;
+}
+.myinput {
+  width: 40%;
+}
+
+.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: 40%;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+      #closeStyle {
+        position: absolute;
+        top: 9px;
+        right: 7px;
+      }
+    }
+  }
+}
+</style>

+ 18 - 0
src/views/modules/Statistics/refuseDataCreat.vue

@@ -20,6 +20,17 @@
             <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0"
               :loading="loadingList">一键重提
             </a-button>
+            <a-radio-group v-model="putStatus" button-style="solid" style="margin-left:10px" @change="changeSlide">
+              <a-radio-button value="0">
+                全部
+              </a-radio-button>
+              <a-radio-button value="1">
+                开启
+              </a-radio-button>
+              <a-radio-button value="2">
+                已关闭
+              </a-radio-button>
+            </a-radio-group>
             <a-button type="primary" style="position:absolute;right:0" @click="syncCreative"
               :loading="loadingSyncCreative">
               同步创意
@@ -256,6 +267,7 @@
 
     data: function () {
       return {
+        putStatus: '0',
         title: '被拒创意列表',
         visibleFail: false,
         visibleAgain: false,
@@ -356,6 +368,9 @@
       }
     },
     methods: {
+      changeSlide() {
+        this.addUser()
+      },
       // 广告语改变
       DescriptionChange(e){
         console.log(e.target.value);
@@ -594,12 +609,15 @@
       addUser() {
         this.loading = true
         var params = {}
+        this.selectedRowKeys = []
+        this.selectedRowKeysValue = []
         //  localStorage.setItem('accountIdCreat', record.campaignId)
         // localStorage.setItem('accountIdCreatNow', this.appId)
         params.accountId = localStorage.getItem('accountIdCreatNow')
         params.campaignId = localStorage.getItem('accountIdCreat')
         params.pageSize = this.ipagination.pageSize
         params.pageNo = this.ipagination.current
+        params.putStatus = this.putStatus == "0" ? null : this.putStatus
         getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
           if (res.code == 0) {
             this.dataList = res.result.records.map((v, index) => {

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

@@ -20,6 +20,17 @@
             <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0"
               :loading="loadingList">一键重提
             </a-button>
+            <a-radio-group v-model="putStatus" button-style="solid" style="margin-left:10px" @change="changeSlide">
+              <a-radio-button value="0">
+                全部
+              </a-radio-button>
+              <a-radio-button value="1">
+                开启
+              </a-radio-button>
+              <a-radio-button value="2">
+                已关闭
+              </a-radio-button>
+            </a-radio-group>
             <a-button type="primary" style="position:absolute;right:0" @click="syncCreative"
               :loading="loadingSyncCreative">
               同步创意
@@ -59,7 +70,7 @@
       <a-textarea v-model="editWord" autosize />
     </a-modal>
     <a-modal title="一键重提" @cancel="handleClose" :visible="visibleAgain" @ok="handleOkAgain"
-      :confirmLoading="againLoading" :width="650" >
+      :confirmLoading="againLoading" :width="650">
       <a-form :form="form">
         <a-form-item label="是否修改" :labelCol="{ lg: { span: 4 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">
@@ -256,6 +267,7 @@
 
     data: function () {
       return {
+        putStatus: '0',
         title: '被拒创意列表',
         visibleFail: false,
         visibleAgain: false,
@@ -303,7 +315,7 @@
         dataOne: [],
         value: '',
 
-        updateDescription:'',//广告语的字符
+        updateDescription: '', //广告语的字符
       }
     },
     filters: {
@@ -357,11 +369,14 @@
       }
     },
     methods: {
+      changeSlide() {
+          this.addUser()
+      },
       // 广告语改变
-      DescriptionChange(e){
+      DescriptionChange(e) {
         console.log(e.target.value);
-        if(e.target.value.length>30){
-          
+        if (e.target.value.length > 30) {
+
           // this.updateDescription=e.target.value.substr(0,30);
           // console.log(this.updateDescription)
           this.$message.error('广告语最多30字!')
@@ -381,7 +396,7 @@
         // this.form.setFieldsValue({
         //   updateDescription: item.title
         // })
-        this.updateDescription=item.title;
+        this.updateDescription = item.title;
         this.cunTitleVisible = false;
         this.cunTitleList = []
       },
@@ -390,7 +405,7 @@
         // this.form.setFieldsValue({
         //   updateDescription: item
         // })
-        this.updateDescription=item;
+        this.updateDescription = item;
         this.titleVisible = false;
         this.dataOne = []
         this.value = ""
@@ -522,13 +537,13 @@
         //    this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
       },
       handleOkAgain(e) {
-        if(this.updateDescription.length>30&&this.getData('type')==1){
+        if (this.updateDescription.length > 30 && this.getData('type') == 1) {
           this.$message.error('广告语最多30个字,请修正后再次提交!')
-        }else{
+        } else {
           this.againLoading = true
           this.form.validateFields((err, values) => {
             if (!err) {
-              values.updateDescription=this.updateDescription;
+              values.updateDescription = this.updateDescription;
               var params = {
 
                 ...values,
@@ -592,12 +607,15 @@
       addUser() {
         this.loading = true
         var params = {}
+        this.selectedRowKeys = []
+        this.selectedRowKeysValue = []
         //  localStorage.setItem('accountIdCreat', record.campaignId)
         // localStorage.setItem('accountIdCreatNow', this.appId)
         params.accountId = this.appId
         // params.campaignId = localStorage.getItem('accountIdCreat')
         params.pageSize = this.ipagination.pageSize
         params.pageNo = this.ipagination.current
+        params.putStatus = this.putStatus == "0" ? null : this.putStatus
         getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
           if (res.code == 0) {
             this.dataList = res.result.records.map((v, index) => {

+ 1 - 1
src/views/modules/Statistics/videoStatics/vDay.vue

@@ -300,7 +300,7 @@ export default {
       videoUrl:'',
 
       //消耗的值
-      consumeValue: 1000,
+      consumeValue: 0,
       //视频ID
       videoID: '',
       columns: [...columnsFixd, ...variableCol],

+ 1 - 1
src/views/modules/Statistics/videoStatics/vMonth.vue

@@ -388,7 +388,7 @@ export default {
       //明细里的数据
       detailData: [],
 
-      consumeValue: 1000,
+      consumeValue: 0,
       //视频ID
       videoID: null,
       columns: [...columnsFixd, ...variableCol],

+ 2 - 2
src/views/modules/Statistics/videoStatics/vSummary.vue

@@ -323,7 +323,7 @@ export default {
 
       //是否显示导出按钮
       exportExcelIsOk: true,
-      consumeValue: 1000,
+      consumeValue: 0,
 
       columns: [...columnsFixd, ...variableCol],
       addColumns: [],
@@ -448,7 +448,7 @@ export default {
       // })[0].projectName
       // downFilePost('/ctop/yiche/report/exportDailyReport', params).then(res => {
       //   let blob = new Blob([res], {
-      //     type: 'application/vnd.ms-excel'
+      //     type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
       let column = this.columns.map((item, index) => {
         return item.dataIndex
       })

+ 1 - 1
src/views/modules/Statistics/videoStatics/vWeek.vue

@@ -381,7 +381,7 @@ export default {
       //明细里的数据
       detailData: [],
 
-      consumeValue: 1000,
+      consumeValue: 0,
       //视频ID
       videoID: '',
       columns: [...columnsFixd, ...variableCol],

+ 1 - 1
src/views/modules/Statistics/yicheStatistics/dayStatistics.vue

@@ -637,7 +637,7 @@ export default {
       })[0].projectName
       downFilePost('/ctop/yiche/report/exportDailyReport', params).then(res => {
         let blob = new Blob([res], {
-          type: 'application/vnd.ms-excel'
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
         })
         let downloadElement = document.createElement('a')
         let href = window.URL.createObjectURL(blob) //创建下载的链接

+ 1 - 1
src/views/modules/Statistics/yicheStatistics/timeStatistics.vue

@@ -383,7 +383,7 @@ export default {
       })[0].projectName
       downFilePost('/ctop/yiche/report/exportHourReport', params).then(res => {
         let blob = new Blob([res], {
-          type: 'application/vnd.ms-excel'
+          type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
         })
         let downloadElement = document.createElement('a')
         let href = window.URL.createObjectURL(blob) //创建下载的链接

+ 288 - 168
src/views/modules/advertiser/AdvertiserList.vue

@@ -9,19 +9,6 @@
               <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="6">
-            <a-form-item label="行业">
-              <j-tree-select
-                v-model="queryParam.industryId"
-                ref="treeSelect"
-                placeholder="请选择行业"
-                dict="sys_category,name,id"
-                pidField="pid"
-                pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
-              >
-              </j-tree-select>
-            </a-form-item>
-          </a-col>
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
@@ -33,11 +20,34 @@
     </div>
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
+    <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-    </div>
+    </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-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-tab-pane>
+      <a-button type="primary" slot="tabBarExtraContent" @click="addNew">新增</a-button>
+    </a-tabs>
 
-    <!-- table区域-begin -->
     <div>
       <a-table
         ref="table"
@@ -58,124 +68,44 @@
             <a>删除</a>
           </a-popconfirm>
         </span>
-      </a-table>
-      <a-modal
-        title="账号绑定"
-        v-model="visible"
-        @ok="handleSubmit"
-        :width="800"
-        :okButtonProps="{ props: { disabled: false } }"
-        :cancelButtonProps="{ props: { disabled: false } }"
-      >
-        <a-form>
-          <a-form-item
-            label="选择方式"
-            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-          >
-            <a-radio-group buttonStyle="solid" @change="onChageLogin" v-model="mode">
-              <a-radio-button value="login">登录</a-radio-button>
-              <a-radio-button value="authorization">授权</a-radio-button>
-            </a-radio-group>
-          </a-form-item>
-
-          <a-form-item v-if="showLogin">
-            <a-form :form="form">
-              <!-- @submit="loginForm">-->
-              <a-form-item
-                label="账号:"
-                :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
-              >
-                <a-input v-model="accountName" placeholder="请输入账户名" />
-              </a-form-item>
-              <a-form-item
-                label="密码:"
-                :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
-              >
-                <a-input type="password" v-model="password" placeholder="请输入密码" />
-              </a-form-item>
-              <a-form-item
-                label="媒体:"
-                :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
-              >
-                <a-radio-group buttonStyle="outline" v-model="loginType">
-                  <a-radio-button value="kuaishou">快手</a-radio-button>
-                  <a-radio-button value="bytedance">头条</a-radio-button>
-                </a-radio-group>
-              </a-form-item>
-
-              <a-form-item
-                label="部门分配"
-                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-                v-show="!departDisabled"
-              >
-                <j-select-depart v-model="departmentId" :multi="false"></j-select-depart>
-              </a-form-item>
-
-              <a-form-item
-                label="用户选择"
-                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-              >
-                <j-select-user-by-dep v-model="users"></j-select-user-by-dep>
-              </a-form-item>
-            </a-form>
-          </a-form-item>
-
-          <a-form-item
-            v-if="showAuthorization"
-            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-          >
-            <a-form :form="form">
-              <!--@submit="authorizationForm"-->
+        <span slot="actionProduct" slot-scope="text, record">
+          <a @click="handleEditElse(record,'product')">编辑</a>
 
-              <a-form-item
-                label="媒体:"
-                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-              >
-                <a-radio-group buttonStyle="outline" v-model="authorizationType">
-                  <a-radio-button value="kuaishou">快手</a-radio-button>
-                  <a-radio-button value="bytedance">头条</a-radio-button>
-                </a-radio-group>
-              </a-form-item>
-
-              <a-form-item
-                label="部门分配"
-                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-                v-show="!departDisabled"
-              >
-                <j-select-depart v-model="departmentId" :multi="false"></j-select-depart>
-              </a-form-item>
+          <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-form-item
-                label="用户选择"
-                :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-                :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-              >
-                <j-select-user-by-dep v-model="users"></j-select-user-by-dep>
-              </a-form-item>
-            </a-form>
-          </a-form-item>
-        </a-form>
-      </a-modal>
+          <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 -->
 
     <!-- 表单区域 -->
     <advertiser-modal ref="modalForm" @ok="modalFormOk"></advertiser-modal>
+    <product-modal ref="modalFormTwo" @ok="modalFormOk"></product-modal>
+    <project-modal ref="modalFormThree" @ok="modalFormOk"></project-modal>
     <j-select-user ref="userForm" @ok="modalFormOk"></j-select-user>
   </a-card>
 </template>
 
 <script>
 import AdvertiserModal from './modules/AdvertiserModal'
+import productModal from './modules/productModal'
+import ProjectModal from './modules/ProjectModal'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JTreeSelect from '@/components/jeecg/JTreeSelect'
 import AFormItem from 'ant-design-vue/es/form/FormItem'
@@ -185,6 +115,139 @@ import JSelectUser from '@/components/jeecgbiz/JSelectUser'
 import { postAction } 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: '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],
@@ -194,7 +257,9 @@ export default {
     JTreeSelect,
     JSelectUserByDep,
     JSelectDepart,
-    JSelectUser
+    JSelectUser,
+    productModal,
+    ProjectModal,
   },
   data() {
     return {
@@ -211,46 +276,26 @@ export default {
       authorizationType: 'kuaishou',
       loginType: 'kuaishou',
       form: this.$form.createForm(this),
-      // 表头
-      columns: [
-        {
-          title: '广告主开户主体名称',
-          align: 'center',
-          dataIndex: 'name'
-        },
-        {
-          title: '行业',
-          align: 'center',
-          dataIndex: 'industryId_dictText'
-        },
-        {
-          title: '联系人姓名',
-          align: 'center',
-          dataIndex: 'contact'
-        },
+      active: 'advertiser',
+      advertiserName: '',
+      advertiserId: '',
+      productName: '',
+      examinelList: [
         {
-          title: '联系人手机',
-          align: 'center',
-          dataIndex: 'mobile'
+          value: '0',
+          tab: '广告主列表',
         },
         {
-          title: '联系人邮箱',
-          align: 'center',
-          dataIndex: 'email'
+          value: '1',
+          tab: '产品列表',
         },
         {
-          title: '销售',
-          align: 'center',
-          dataIndex: 'saleId_dictText'
+          value: '2',
+          tab: '项目列表',
         },
-
-        {
-          title: '操作',
-          dataIndex: 'action',
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
-        }
       ],
+      // 表头
+      columns: advertiserColumns,
       url: {
         list: '/ctop/advertiser/list',
         delete: '/ctop/advertiser/delete',
@@ -261,24 +306,99 @@ export default {
         bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
         getLoginInfo: '/ctop/bindAccount/getLoginInfo',
         userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
-        userWithDepart: '/sys/user/userDepartList' // 引入为指定用户查看部门信息需要的url
-      }
+        userWithDepart: '/sys/user/userDepartList', // 引入为指定用户查看部门信息需要的url
+      },
     }
   },
   computed: {
-    importExcelUrl: function() {
+    importExcelUrl: function () {
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
-    }
+    },
   },
   created() {
-    this.queryParam.userId = this.userInfo().id
+    // this.queryParam.userId = this.userInfo().id
   },
   methods: {
+    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.advertiserId = null
+      this.advertiserName = ''
+
+      this.queryParam.productId = null
+      this.productName = ''
+      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
+            : null,
+          productId: this.queryParam.productId,
+        })
+        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.callbackTwo('product')
+      } else if (key == 'project') {
+        this.queryParam.productId = item.id
+        this.productName = item.productName
+        this.advertiserId = item.advertiserId
+        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.loadData(1)
+    },
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     searchRe() {
-      this.queryParam.name = ''
-      this.queryParam.industryId = ''
-      this.loadData()
+      this.queryParam.name = null
+      this.queryParam.advertiserId = null
+      this.queryParam.productId = null
+      this.callbackTwo('advertiser')
     },
     handleSubmit() {
       let params = {}
@@ -290,7 +410,7 @@ export default {
       params.projectName = this.record.projectName
 
       // 触发表单验证
-      this.form.validateFields(err => {
+      this.form.validateFields((err) => {
         if (!err) {
           if (this.mode == 'login') {
             params.accountName = this.accountName
@@ -301,7 +421,7 @@ export default {
             } else if (this.loginType == 'bytedance') {
               params.mediaId = 1
             }
-            postAction(this.url.bindAccountLoginUrl, params).then(res => {
+            postAction(this.url.bindAccountLoginUrl, params).then((res) => {
               if (res.success) {
                 alert('绑定成功')
                 this.accountName = ''
@@ -320,7 +440,7 @@ export default {
             } else if (this.authorizationType == 'bytedance') {
               params.mediaId = 1
             }
-            postAction(this.url.bindAuthorizationUrl, params).then(res => {
+            postAction(this.url.bindAuthorizationUrl, params).then((res) => {
               if (res.success) {
                 window.open(res.message, '_blank')
               } else {
@@ -349,8 +469,8 @@ export default {
 
     handleCancel() {
       this.close()
-    }
-  }
+    },
+  },
 }
 </script>
 <style scoped>

+ 174 - 123
src/views/modules/advertiser/ProjectList.vue

@@ -19,11 +19,21 @@
             <a-col :md="6" :sm="8">
               <a-form-item label="运营负责人">
                 <!-- <a-input placeholder="请输入负责人" v-model="queryParam.responsible"></a-input> -->
-                <a-select placeholder="请选择运营负责人" showSearch optionFilterProp="children" style="width: 100%"
-                  :filterOption="filterOption" v-model="queryParam.responsibleId">
-                  <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
-                    :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}
-                  </a-select-option>
+                <a-select
+                  placeholder="请选择运营负责人"
+                  showSearch
+                  optionFilterProp="children"
+                  style="width: 100%"
+                  :filterOption="filterOption"
+                  v-model="queryParam.responsibleId"
+                  @search="search"
+                  @focus="getAllUserList"
+                >
+                  <a-select-option
+                    v-for="appModel in options"
+                    :key="appModel.userId + new Date().getTime()"
+                    :value="appModel.userId"
+                  >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -32,36 +42,50 @@
             <a-col :md="6" :sm="8">
               <a-form-item label="设计负责人">
                 <!-- <a-input placeholder="请输入负责人" v-model="queryParam.responsible"></a-input> -->
-                <a-select placeholder="请选择设计负责人" showSearch optionFilterProp="children" style="width: 100%"
-                  :filterOption="filterOption" v-model="queryParam.designResponsibleId">
-                  <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
-                    :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}
-                  </a-select-option>
+                <a-select
+                  placeholder="请选择设计负责人"
+                  showSearch
+                  optionFilterProp="children"
+                  style="width: 100%"
+                  :filterOption="filterOption"
+                  v-model="queryParam.designResponsibleId"
+                  @search="search"
+                  @focus="getAllUserList"
+                >
+                  <a-select-option
+                    v-for="appModel in options"
+                    :key="appModel.userId + new Date().getTime()"
+                    :value="appModel.userId"
+                  >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="6">
-            <a-form-item label="行业">
+              <a-form-item label="行业">
                 <j-tree-select
-                    v-model="queryParam.industryId"
-                    ref="treeSelect"
-                    placeholder="请选择行业"
-                    dict="sys_category,name,id"
-                    pidField="pid"
-                    pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
-                >
-                </j-tree-select>
-                </a-form-item>
+                  v-model="queryParam.industryId"
+                  ref="treeSelect"
+                  placeholder="请选择行业"
+                  dict="sys_category,name,id"
+                  pidField="pid"
+                  pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
+                ></j-tree-select>
+              </a-form-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
               <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
                 {{ toggleSearchStatus ? '收起' : '展开' }}
                 <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a> -->
+              </a>-->
             </span>
           </a-col>
         </a-row>
@@ -76,8 +100,17 @@
     <!-- table区域-begin -->
     <!-- 供应商 -->
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
         <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
         <span slot="maxDeepCpaBid" slot-scope="text">{{ text / 1000 }}</span>
 
@@ -100,116 +133,134 @@
 </template>
 
 <script>
-  import ProjectModal from './modules/ProjectModal'
-  import JTreeSelect from '@/components/jeecg/JTreeSelect'
-  import {
-    httpAction,
-    getAction
-  } from '@/api/manage'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
+import ProjectModal from './modules/ProjectModal'
+import JTreeSelect from '@/components/jeecg/JTreeSelect'
+import { httpAction, getAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
-  export default {
-    name: 'ProjectList',
-    mixins: [JeecgListMixin],
-    components: {
-      ProjectModal,
-      JTreeSelect
-    },
-    data() {
-      return {
-        description: '项目管理页面',
-        // 表头
-        columns: [{
-            title: '项目名称',
-            align: 'center',
-            dataIndex: 'projectName'
-          },
-          {
-            title: '广告主名称',
-            align: 'center',
-            dataIndex: 'advertiserName'
-          },
-          {
-            title: '行业类型',
-            align: 'center',
-            dataIndex: 'industryId_dictText'
-          },
-          {
-            title: '最高出价',
-            align: 'center',
-            dataIndex: 'maxBid',
-            scopedSlots: {
-              customRender: 'maxBid'
-            }
-          },
-          {
-            title: '最高转化出价',
-            align: 'center',
-            dataIndex: 'maxDeepCpaBid',
-            scopedSlots: {
-              customRender: 'maxDeepCpaBid'
-            }
-          },
-          {
-            title: '供应商',
-            align: 'center',
-            dataIndex: 'supplierCode_dictText'
-          },
-          {
-            title: '销售',
-            align: 'center',
-            dataIndex: 'saleId_dictText'
+export default {
+  name: 'ProjectList',
+  mixins: [JeecgListMixin],
+  components: {
+    ProjectModal,
+    JTreeSelect,
+  },
+  data() {
+    return {
+      description: '项目管理页面',
+      // 表头
+      columns: [
+        {
+          title: '项目名称',
+          align: 'center',
+          dataIndex: 'projectName',
+        },
+        {
+          title: '广告主名称',
+          align: 'center',
+          dataIndex: 'advertiserName',
+        },
+        {
+          title: '行业类型',
+          align: 'center',
+          dataIndex: 'industryId_dictText',
+        },
+        {
+          title: '最高出价',
+          align: 'center',
+          dataIndex: 'maxBid',
+          scopedSlots: {
+            customRender: 'maxBid',
           },
-          {
-            title: '运营负责人',
-            align: 'center',
-            dataIndex: 'responsibleName'
+        },
+        {
+          title: '最高转化出价',
+          align: 'center',
+          dataIndex: 'maxDeepCpaBid',
+          scopedSlots: {
+            customRender: 'maxDeepCpaBid',
           },
-          {
-            title: '设计负责人',
-            align: 'center',
-            dataIndex: 'designResponsibleName'
+        },
+        {
+          title: '供应商',
+          align: 'center',
+          dataIndex: 'supplierCode_dictText',
+        },
+        {
+          title: '销售',
+          align: 'center',
+          dataIndex: 'saleId_dictText',
+        },
+        {
+          title: '运营负责人',
+          align: 'center',
+          dataIndex: 'responsibleName',
+        },
+        {
+          title: '设计负责人',
+          align: 'center',
+          dataIndex: 'designResponsibleName',
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action',
           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: {
-              customRender: 'action'
-            }
-          }
-        ],
-        url: {
-          list: '/ctop/project/list',
-          delete: '/ctop/project/delete',
-          deleteBatch: '/ctop/project/deleteBatch',
-          exportXlsUrl: 'ctop/project/exportXls',
-          importExcelUrl: 'ctop/project/importExcel'
         },
-        options: []
-      }
-    },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
-      }
-    },
-    methods: {
-      filterOption(input, option) {
-        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      ],
+      url: {
+        list: '/ctop/project/list',
+        delete: '/ctop/project/delete',
+        deleteBatch: '/ctop/project/deleteBatch',
+        exportXlsUrl: 'ctop/project/exportXls',
+        importExcelUrl: 'ctop/project/importExcel',
       },
+      options: [],
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
-    mounted() {
-      getAction('/sys/user/getAllUserList', '').then(res => {
+  },
+  methods: {
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getAllUserList(value) {
+      this.options = []
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.options = res.result
+          this.options = res.result.list
         }
       })
     },
-  }
+    search(value) {
+      this.options = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
+      }
+    },
+  },
+  mounted() {
+    this.getAllUserList()
+    // getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: '' }).then((res) => {
+    //   if (res.success) {
+    //     this.options = res.result.list
+    //   }
+    // })
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

+ 16 - 37
src/views/modules/advertiser/ProjectMemberList.vue

@@ -182,7 +182,6 @@
 </template>
 
 <script>
-  import ProjectMemberModal from './modules/ProjectMemberModal'
   import {
     httpAction,
     getAction,
@@ -202,7 +201,6 @@
   export default {
     name: 'ProjectMemberList',
     components: {
-      ProjectMemberModal,
       JSelectUserByDep
     },
     mixins: [JeecgListMixin],
@@ -569,16 +567,19 @@
           }
         })
       },
+      getAllUserList(value){
+        getAction('/sys/user/getAllUserList', {pageSize:50,pageNo:1,userName:value}).then(res => {
+          if (res.success) {
+            this.list = res.result.list
+            this.options = res.result.list
+          }
+        })
+      },
       addParams(item) {
         if (this.noTitleKey == 'myProject') {
           this.visibleAdd = true
           this.itemJson = item
-          getAction('/sys/user/getAllUserList', '').then(res => {
-            if (res.success) {
-              this.list = res.result
-              this.options = res.result
-            }
-          })
+          this.getAllUserList()
         } else {
           this.visibleAccount = true
           this.titleAccount = item.projectName
@@ -699,40 +700,18 @@
       },
       handleBlur() {},
       handleFocus() {
-        if (this.appId.length > 0) {
-          this.options = []
-          for (let i = 0; i < this.list.length; i++) {
-            for (let j = 0; j < this.appId.length; j++) {
-              if (this.list[i].userId == this.appId[j]) {
-                this.options.push(this.list[i])
-              }
-            }
-          }
-        } else {
-          this.options = this.list
-        }
       },
       search(value) {
         this.options = []
         if (value != '') {
-          this.options = this.list.filter(item => {
-            var data = item.realName + ' ' + item.roleName
-            return data.toLowerCase().indexOf(value.toLowerCase()) > -1
-          })
-          this.options = [...this.options]
+          // this.options = this.list.filter(item => {
+          //   var data = item.realName + ' ' + item.roleName
+          //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+          // })
+          // this.options = [...this.options]
+          this.getAllUserList(value)
         } else {
-          if (this.appId.length > 0) {
-            this.options = []
-            for (let i = 0; i < this.list.length; i++) {
-              for (let j = 0; j < this.appId.length; j++) {
-                if (this.list[i].userId == this.appId[j]) {
-                  this.options.push(this.list[i])
-                }
-              }
-            }
-          } else {
-            this.options = this.list
-          }
+          this.getAllUserList()
         }
       }
     },

+ 380 - 277
src/views/modules/advertiser/UserAllocationList.vue

@@ -6,12 +6,22 @@
         <a-row :gutter="24">
           <a-col :md="8" :sm="8">
             <a-form-item label="账号所属人">
-
-              <a-select placeholder="请选择所属人" showSearch optionFilterProp="children" style="width: 100%"
-                :filterOption="filterOption" v-model="queryParam.userId" v-if="userInfo().username == 'admin'">
-                <a-select-option v-for="appModel in optionsAll" :key="appModel.userId + new Date().getTime()"
-                  :value="appModel.userId">{{ appModel.realName }}
-                </a-select-option>
+              <a-select
+                placeholder="请选择所属人"
+                showSearch
+                optionFilterProp="children"
+                style="width: 100%"
+                :filterOption="filterOption"
+                v-model="queryParam.userId"
+                v-if="userInfo().username == 'admin'"
+                @search="search"
+                @focus="getAllUserList"
+              >
+                <a-select-option
+                  v-for="appModel in optionsAll"
+                  :key="appModel.userId + new Date().getTime()"
+                  :value="appModel.userId"
+                >{{ appModel.realName }}</a-select-option>
               </a-select>
               <a-input placeholder="请输入所属人" v-model="queryParam.userName" v-else></a-input>
             </a-form-item>
@@ -33,12 +43,16 @@
           </a-col>
           <a-col :md="8" :sm="8">
             <a-form-item label="项目名称">
-              <a-select v-model="queryParam.projectId" showSearch optionFilterProp="children"
-                :filterOption="filterOption">
+              <a-select
+                v-model="queryParam.projectId"
+                showSearch
+                optionFilterProp="children"
+                :filterOption="filterOption"
+              >
                 <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
                   {{ item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
-                   }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                    item.projectName
+                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                  item.projectName
                   }}
                 </a-select-option>
               </a-select>
@@ -52,7 +66,12 @@
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
             </span>
           </a-col>
         </a-row>
@@ -62,12 +81,24 @@
     <br />
     <!-- table区域-begin -->
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
         <span slot="accountStatus" slot-scope="text, record">
           <!-- {{ text == 0 ? '启用' : '禁用' }} -->
 
-          <a-switch v-model="record.accountStatus == 0 ? true : false" @change="onChangeSwitch(record)" />
+          <a-switch
+            v-model="record.accountStatus == 0 ? true : false"
+            @change="onChangeSwitch(record)"
+          />
         </span>
         <span slot="mediaId" slot-scope="text">{{ text == 1 ? '头条' : '快手' }}</span>
         <span slot="action" slot-scope="text, record">
@@ -80,7 +111,11 @@
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" v-show="roleCode == 'admin'" />
-          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-show="roleCode == 'admin'">
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+            v-show="roleCode == 'admin'"
+          >
             <a>删除</a>
           </a-popconfirm>
         </span>
@@ -91,34 +126,72 @@
     <!-- 表单区域 -->
     <userAllocation-modal ref="modalForm" @ok="modalFormOk"></userAllocation-modal>
     <!--  添加项目成员 -->
-    <a-modal title="账户转让" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading" :width="800">
+    <a-modal
+      title="账户转让"
+      v-model="visibleAdd"
+      @ok="handleOkAdd"
+      :confirmLoading="confirmLoading"
+      :width="800"
+    >
       <a-form :form="form">
-        <a-form-item label="转户人" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="['transferor']" showSearch optionFilterProp="children" :filterOption="filterOption"
-            style="width:100%" disabled>
-            <a-select-option :value="item.userId" v-for="(item, index) of options" :key="index">
-              {{ item.realName }}
-            </a-select-option>
+        <a-form-item
+          label="转户人"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="['transferor']"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+            style="width:100%"
+            disabled
+          >
+            <a-select-option
+              :value="item.userId"
+              v-for="(item, index) of options"
+              :key="index"
+            >{{ item.realName }}</a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item label="受让人" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="['assignee', { rules: [{ required: true, message: '请选择受让人' }] }]" placeholder="请选择受让人"
-            showSearch optionFilterProp="children" :filterOption="filterOption" style="width:100%">
-            <a-select-option :value="item.userId" v-for="(item, index) of options" :key="index">
-              {{ item.realName }}
-            </a-select-option>
+        <a-form-item
+          label="受让人"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="['assignee', { rules: [{ required: true, message: '请选择受让人' }] }]"
+            placeholder="请选择受让人"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+            style="width:100%"
+          >
+            <a-select-option
+              :value="item.userId"
+              v-for="(item, index) of options"
+              :key="index"
+            >{{ item.realName }}</a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item label="转户人绩效截止日期" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-date-picker v-decorator="['transferorDate', { rules: [{ required: true, message: '请选择转户人绩效截止日期' }] }]" />
+        <a-form-item
+          label="转户人绩效截止日期"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-date-picker
+            v-decorator="['transferorDate', { rules: [{ required: true, message: '请选择转户人绩效截止日期' }] }]"
+          />
           <!-- , { initialValue:moment(new Date(), 'YYYY-MM-DD') } -->
         </a-form-item>
-        <a-form-item label="受让人绩效开始日期" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-date-picker v-decorator="['assigneeDate', { rules: [{ required: true, message: '请选择受让人绩效截止日期' }] }]" />
+        <a-form-item
+          label="受让人绩效开始日期"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-date-picker
+            v-decorator="['assigneeDate', { rules: [{ required: true, message: '请选择受让人绩效截止日期' }] }]"
+          />
         </a-form-item>
         <!-- 
         <a-form-item
@@ -132,30 +205,53 @@
         -->
       </a-form>
     </a-modal>
-    <a-modal title="项目转移" v-model="visibleAccount" @ok="handleOkAccount" :confirmLoading="accountLoading" :width="800">
+    <a-modal
+      title="项目转移"
+      v-model="visibleAccount"
+      @ok="handleOkAccount"
+      :confirmLoading="accountLoading"
+      :width="800"
+    >
       <a-form :form="formAccount">
-        <a-form-item label="原项目" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="[
+        <a-form-item
+          label="原项目"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="[
               'projectId', // 给表单赋值或拉取表单时,该input对应的key
               { rules: [{ required: true, message: '请选择项目!' }] }
-            ]" showSearch optionFilterProp="children" :filterOption="filterOption" disabled>
+            ]"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+            disabled
+          >
             <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
               {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-               item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
               }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item label="转移项目" :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }">
-          <a-select v-decorator="[
+        <a-form-item
+          label="转移项目"
+          :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+          :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
+        >
+          <a-select
+            v-decorator="[
               'projectNewId', // 给表单赋值或拉取表单时,该input对应的key
               { rules: [{ required: true, message: '请选择项目!' }] }
-            ]" showSearch optionFilterProp="children" :filterOption="filterOption">
+            ]"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+          >
             <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
               {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-               item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+              item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
               }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
@@ -176,259 +272,266 @@
 </template>
 
 <script>
-  import UserAllocationModal from './modules/UserAllocationModal'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
-  import {
-    mapGetters
-  } from 'vuex'
-  import {
-    httpAction,
-    getAction,
-    deleteAction
-  } from '@/api/manage'
+import UserAllocationModal from './modules/UserAllocationModal'
+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'
-  export default {
-    name: 'UserAllocationList',
-    mixins: [JeecgListMixin],
-    components: {
-      UserAllocationModal,
-      treeSelect
-    },
-    data() {
-      return {
-        description: '账号绑定管理页面',
-        visibleAdd: false,
-        visibleAccount: false,
-        options: [],
-        optionsAll: [],
-        dataElse: [],
-        // 表头
-        columns: [{
-            title: '账号所属人',
-            align: 'center',
-            dataIndex: 'userName'
-          },
-          {
-            title: '授权',
-            align: 'center',
-            dataIndex: 'accountId'
-          },
-          {
-            title: '广告主名称',
-            align: 'center',
-            dataIndex: 'advertiserName'
-          },
-          {
-            title: '项目名称',
-            align: 'center',
-            dataIndex: 'projectName'
-          },
-          //    {
-          //     title: '输入账号  --登陆',
-          //     align:"center",
-          //     dataIndex: 'accountName'
-          //    },
-          {
-            title: '授权名称',
-            align: 'center',
-            dataIndex: 'authName'
-          },
-          {
-            title: '平台类型',
-            align: 'center',
-            dataIndex: 'mediaId',
-            scopedSlots: {
-              customRender: 'mediaId'
-            }
-          },
-          {
-            title: '预警金额',
-            align: 'center',
-            dataIndex: 'warningAmount'
-          },
-          {
-            title: '预警比例',
-            align: 'center',
-            dataIndex: 'warningProportion'
+import treeSelect from './modules/Treeselect'
+import moment from 'moment'
+import { postAction } from '../../../api/manage'
+import qs from 'qs'
+export default {
+  name: 'UserAllocationList',
+  mixins: [JeecgListMixin],
+  components: {
+    UserAllocationModal,
+    treeSelect,
+  },
+  data() {
+    return {
+      description: '账号绑定管理页面',
+      visibleAdd: false,
+      visibleAccount: false,
+      options: [],
+      optionsAll: [],
+      dataElse: [],
+      // 表头
+      columns: [
+        {
+          title: '账号所属人',
+          align: 'center',
+          dataIndex: 'userName',
+        },
+        {
+          title: '授权',
+          align: 'center',
+          dataIndex: 'accountId',
+        },
+        {
+          title: '广告主名称',
+          align: 'center',
+          dataIndex: 'advertiserName',
+        },
+        {
+          title: '项目名称',
+          align: 'center',
+          dataIndex: 'projectName',
+        },
+        //    {
+        //     title: '输入账号  --登陆',
+        //     align:"center",
+        //     dataIndex: 'accountName'
+        //    },
+        {
+          title: '授权名称',
+          align: 'center',
+          dataIndex: 'authName',
+        },
+        {
+          title: '平台类型',
+          align: 'center',
+          dataIndex: 'mediaId',
+          scopedSlots: {
+            customRender: 'mediaId',
           },
-          // accountStatus:0启用;1禁用
-          {
-            title: '账户状态',
-            dataIndex: 'accountStatus',
-            align: 'center',
-            scopedSlots: {
-              customRender: 'accountStatus'
-            }
+        },
+        {
+          title: '预警金额',
+          align: 'center',
+          dataIndex: 'warningAmount',
+        },
+        {
+          title: '预警比例',
+          align: 'center',
+          dataIndex: 'warningProportion',
+        },
+        // accountStatus:0启用;1禁用
+        {
+          title: '账户状态',
+          dataIndex: 'accountStatus',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'accountStatus',
           },
+        },
 
-          {
-            title: '系统名称',
-            dataIndex: 'systemType',
-            align: 'center'
+        {
+          title: '系统名称',
+          dataIndex: 'systemType',
+          align: 'center',
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action',
           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: {
-              customRender: 'action'
-            }
-          }
-        ],
-        url: {
-          list: '/ctop/userAllocation/list',
-          delete: '/ctop/userAllocation/delete',
-          deleteBatch: '/ctop/userAllocation/deleteBatch',
-          exportXlsUrl: 'ctop/userAllocation/exportXls',
-          importExcelUrl: 'ctop/userAllocation/importExcel'
         },
-        confirmLoading: false,
-        accountLoading: false,
-        projectId: '',
-        accountId: '',
-        mediaId: '',
-        form: this.$form.createForm(this),
-        formAccount: this.$form.createForm(this),
-        roleCode: localStorage.getItem('roleCode'),
-        dataElse: []
-      }
+      ],
+      url: {
+        list: '/ctop/userAllocation/list',
+        delete: '/ctop/userAllocation/delete',
+        deleteBatch: '/ctop/userAllocation/deleteBatch',
+        exportXlsUrl: 'ctop/userAllocation/exportXls',
+        importExcelUrl: 'ctop/userAllocation/importExcel',
+      },
+      confirmLoading: false,
+      accountLoading: false,
+      projectId: '',
+      accountId: '',
+      mediaId: '',
+      form: this.$form.createForm(this),
+      formAccount: this.$form.createForm(this),
+      roleCode: localStorage.getItem('roleCode'),
+      dataElse: [],
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+  },
+  mounted() {
+    this.getParticipateList()
+  },
+  methods: {
+    moment,
+    search(value) {
+      this.optionsAll = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
       }
     },
-    mounted() {
-      this.getParticipateList()
-      getAction('/sys/user/getAllUserList', '').then(res => {
+    getAllUserList(value) {
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.optionsAll = res.result
+          this.optionsAll = res.result.list
         }
       })
+    },
+    onChangeSwitch(item) {
+      var params = {}
+      params.id = item.id
+      params.accountStatus = item.accountStatus == 0 ? 1 : 0
 
+      httpAction('/ctop/userAllocation/edit', params, 'put').then((res) => {
+        if (res.success) {
+          this.loadData()
+        }
+      })
+    },
+    getParticipateList() {
+      getAction('/ctop/projectMember/participateList', {
+        userId: this.userInfo().id,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.dataElse = res.result
+        }
+      })
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    getALLperson() {
+      getAction('/sys/user/getAllUserListByCompany', {
+        userId: this.userInfo().id,
+      }).then((res) => {
+        if (res.success) {
+          this.options = res.result
+        }
+      })
     },
-    methods: {
-      moment,
-      onChangeSwitch(item) {
-        var params = {}
-        params.id = item.id
-        params.accountStatus = item.accountStatus == 0 ? 1 : 0
+    project(item) {
+      this.visibleAdd = true
+      this.accountId = item.accountId
+      this.projectId = item.projectId
 
-        httpAction('/ctop/userAllocation/edit', params, 'put').then(res => {
-          if (res.success) {
-            this.loadData()
-          }
-        })
-      },
-      getParticipateList() {
-        getAction('/ctop/projectMember/participateList', {
-          userId: this.userInfo().id
-        }).then(res => {
-          if (res.code == 0) {
-            this.dataElse = res.result
-          }
+      setTimeout(() => {
+        this.form.setFieldsValue({
+          transferor: item.userId,
         })
-      },
-      filterOption(input, option) {
-        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      },
-      ...mapGetters(['nickname', 'avatar', 'userInfo']),
-      getALLperson() {
-        getAction('/sys/user/getAllUserListByCompany', {
-          userId: this.userInfo().id
-        }).then(res => {
-          if (res.success) {
-            this.options = res.result
-          }
+      }, 0)
+      this.getALLperson()
+    },
+    account(item) {
+      this.visibleAccount = true
+      this.accountId = item.accountId
+      this.projectId = item.projectId
+      this.accountLoading = false
+      setTimeout(() => {
+        this.formAccount.setFieldsValue({
+          projectId: item.projectId,
         })
-      },
-      project(item) {
-        this.visibleAdd = true
-        this.accountId = item.accountId
-        this.projectId = item.projectId
+      }, 0)
+    },
+    handleOkAccount(e) {
+      
 
-        setTimeout(() => {
-          this.form.setFieldsValue({
-            transferor: item.userId
+      this.formAccount.validateFieldsAndScroll((err, values) => {
+        if (err) {
+          // 这里做逻辑处理
+        } else {
+          this.accountLoading = true
+          var params = qs.stringify({
+            projectId: values.projectNewId,
+            accountId: this.accountId,
           })
-        }, 0)
-        this.getALLperson()
-      },
-      account(item) {
-        this.visibleAccount = true
-        this.accountId = item.accountId
-        this.projectId = item.projectId
-
-        setTimeout(() => {
-          this.formAccount.setFieldsValue({
-            projectId: item.projectId
+          postAction('/ctop/projectTransferRecord/add', params).then((res) => {
+            if (res.success) {
+              this.accountLoading = false
+              this.visibleAccount = false
+              this.formAccount.resetFields()
+              this.loadData()
+            } else {
+              this.$message.error(res.message)
+            }
           })
-        }, 0)
-      },
-      handleOkAccount(e) {
-        this.accountLoading = true
+        }
+      })
+    },
+    handleOkAdd(e) {
+      
 
-        this.formAccount.validateFieldsAndScroll((err, values) => {
-          if (err) {
-            // 这里做逻辑处理
-          } else {
-            var params = qs.stringify({
-              projectId: values.projectNewId,
-              accountId: this.accountId
-            })
-            postAction('/ctop/projectTransferRecord/add', params).then(res => {
-              if (res.success) {
-                this.accountLoading = false
-                this.visibleAccount = false
-                this.formAccount.resetFields()
-                this.loadData()
-              } else {
-                this.$message.error(res.message)
-              }
-            })
+      this.form.validateFieldsAndScroll((err, values) => {
+        if (err) {
+          // 这里做逻辑处理
+        } else {
+          this.confirmLoading = true
+          var params = {
+            ...values,
           }
-        })
-      },
-      handleOkAdd(e) {
-        this.confirmLoading = true
-
-        this.form.validateFieldsAndScroll((err, values) => {
-          if (err) {
-            // 这里做逻辑处理
-          } else {
-            var params = {
-              ...values
+          params.transferorDate = moment(values.transferorDate).format('YYYY-MM-DD')
+          params.assigneeDate = moment(values.assigneeDate)
+            // .add(1, 'day')
+            .format('YYYY-MM-DD')
+          params.projectId = this.projectId
+          params.accountId = this.accountId
+          params.status = 0
+          postAction('/ctop/transferAccount/add', params).then((res) => {
+            if (res.success) {
+              this.confirmLoading = false
+              this.visibleAdd = false
+              this.form.resetFields()
+            } else {
+              this.$message.error(res.message)
             }
-            params.transferorDate = moment(values.transferorDate).format('YYYY-MM-DD')
-            params.assigneeDate = moment(values.assigneeDate)
-              // .add(1, 'day')
-              .format('YYYY-MM-DD')
-            params.projectId = this.projectId
-            params.accountId = this.accountId
-            params.status = 0
-            postAction('/ctop/transferAccount/add', params).then(res => {
-              if (res.success) {
-                this.confirmLoading = false
-                this.visibleAdd = false
-                this.form.resetFields()
-              } else {
-                this.$message.error(res.message)
-              }
-            })
-          }
-        })
-      }
-    }
-  }
+          })
+        }
+      })
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

+ 0 - 29
src/views/modules/advertiser/modules/AdvertiserModal.vue

@@ -8,35 +8,6 @@
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主开户主体名称">
           <a-input placeholder="请输入广告主开户主体名称" v-decorator="['name', validatorRules.name ]" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="行业">
-          <j-tree-select ref="treeSelect" placeholder="请选择行业" v-decorator="['industryId', validatorRules.pid]"
-            dict="sys_category,name,id" pidField="pid" pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76">
-          </j-tree-select>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户类型">
-          <a-select v-decorator="['advertiserType',{ rules: [{ required: true, message: '请选择客户类型' }] }]" 
-          @change="changeData">
-            <a-select-option :value="1">自拓客户</a-select-option>
-            <a-select-option :value="2">公司客户</a-select-option>
-            <a-select-option :value="3">代理商</a-select-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售"
-          v-if="model.advertiserType==1||model.advertiserType==2">
-          <a-select showSearch optionFilterProp="children" style="width: 100%" :filterOption="filterOption"
-            v-decorator="['saleId', { rules: [{  required: true,message: '请选择销售' }] }]">
-            <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="代理商"
-          v-if="model.advertiserType==3">
-          <a-select showSearch optionFilterProp="children" style="width: 100%" :filterOption="filterOption"
-            v-decorator="['agentId', { rules: [{  required: true,message: '请选择代理商' }] }]">
-            <a-select-option v-for="appModel in optionsTwo" :key="appModel.id + new Date().getTime()"
-              :value="appModel.id">{{ appModel.name }}</a-select-option>
-          </a-select>
-        </a-form-item>
 
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="联系人姓名">
           <a-input placeholder="请输入联系人姓名" v-decorator="['contact', validatorRules.contact ]" />

+ 0 - 31
src/views/modules/advertiser/modules/ProjectMemberModal.vue

@@ -83,38 +83,7 @@
       handleOk () {
         const that = this;
         // 触发表单验证
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
-            }
-            let formData = Object.assign(this.model, values);
-            //时间格式化
-            
-            console.log(formData)
-            httpAction(httpurl,formData,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-              that.close();
-            })
 
-
-
-          }
-        })
       },
       handleCancel () {
         this.close()

+ 150 - 80
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -21,49 +21,88 @@
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="项目名称">
           <a-input placeholder="请输入项目名称" v-decorator="['projectName', validatorRules.projectName]" />
         </a-form-item>
-         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="行业">
+        <!-- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="行业">
           <j-tree-select ref="treeSelect" placeholder="请选择行业" v-decorator="['industryId']"
             dict="sys_category,name,id" pidField="pid" pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76">
           </j-tree-select>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商" v-if="model.mediaId=='2'||model.mediaId=='4'">
-           <a-select
+        </a-form-item>-->
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="供应商"
+          v-if="model.mediaId=='2'||model.mediaId=='4'"
+        >
+          <a-select
             optionFilterProp="children"
             showSearch
             :filterOption="filterOption"
             v-decorator="['supplierCode', validatorRules.supplierCode]"
           >
-            <a-select-option :value="item.supplierCode" v-for="(item, index) of supplierList" :key="index">{{
+            <a-select-option
+              :value="item.supplierCode"
+              v-for="(item, index) of supplierList"
+              :key="index"
+            >
+              {{
               item.supplierName
-            }}</a-select-option>
+              }}
+            </a-select-option>
           </a-select>
         </a-form-item>
-        
+
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主名称">
           <a-select
             @change="handleChange"
-            labelInValue
             optionFilterProp="children"
             showSearch
             :filterOption="filterOption"
             v-decorator="['advertiserId', validatorRules.advertiserId]"
           >
-            <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">{{
+            <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
+              {{
               item.name
-            }}</a-select-option>
+              }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="产品名称">
+          <a-select
+            optionFilterProp="children"
+            showSearch
+            :filterOption="filterOption"
+            v-decorator="['productId', validatorRules.productId]"
+            :disabled="getFormFieldValue('advertiserId')==''||getFormFieldValue('advertiserId')==null"
+          >
+            <a-select-option :value="item.id" v-for="(item, index) of listProduct" :key="index">
+              {{
+              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>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
-          <a-select showSearch optionFilterProp="children" style="width: 100%" :filterOption="filterOption"
-            v-decorator="['saleId', { rules: [{  required: true,message: '请选择销售' }] }]">
-            <a-select-option v-for="appModel in optionsElse" :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+          <a-select
+            showSearch
+            optionFilterProp="children"
+            style="width: 100%"
+            :filterOption="filterOption"
+            v-decorator="['saleId', { rules: [{  required: true,message: '请选择销售' }] }]"
+          >
+            <a-select-option
+              v-for="appModel in optionsElse"
+              :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId"
+            >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="运营负责人">
@@ -73,7 +112,6 @@
             style="width: 100%"
             @focus="handleFocus"
             @blur="handleBlur"
-            @change="handleChange"
             :filterOption="filterOption"
             v-decorator="['responsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]"
           >
@@ -81,8 +119,7 @@
               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="设计负责人">
@@ -92,7 +129,6 @@
             style="width: 100%"
             @focus="handleFocus"
             @blur="handleBlur"
-            @change="handleChange"
             :filterOption="filterOption"
             v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]"
           >
@@ -100,8 +136,7 @@
               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>
@@ -122,7 +157,7 @@ export default {
   components: {
     JSelectUserByDep,
     JSelectDepart,
-    JTreeSelect
+    JTreeSelect,
   },
   data() {
     return {
@@ -131,38 +166,41 @@ export default {
       model: {},
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 5 }
+        sm: { span: 5 },
       },
       wrapperCol: {
         xs: { span: 24 },
-        sm: { span: 16 }
+        sm: { span: 16 },
       },
-      industryId:'',
+      industryId: '',
       confirmLoading: false,
       form: this.$form.createForm(this),
       validatorRules: {
         projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
         industryId: { rules: [{ required: true, message: '请选择行业!' }] },
         advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
-        supplierCode:{ rules: [{ required: true, message: '请选择供应商!' }],initialValue:'kuaishou_001'},
+        productId: { rules: [{ required: true, message: '请选择产品!' }] },
+        supplierCode: { rules: [{ required: true, message: '请选择供应商!' }], initialValue: 'kuaishou_001' },
         responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
         maxBid: { rules: [{ required: true, message: '请输入最高出价!' }, { validator: this.validateInputCode }] },
       },
       url: {
         add: '/ctop/project/add',
         edit: '/ctop/project/edit',
-        getList: '/ctop/advertiser/list'
+        getList: '/ctop/advertiser/list',
       },
       list: [],
+      listProduct: [],
       resId: '',
       shejiId: '',
       options: [],
-      optionsElse:[],
-      supplierList:[]
+      optionsElse: [],
+      supplierList: [],
+      editAll: false,
     }
   },
   created() {
-      this.getSupplierList()
+    this.getSupplierList()
   },
   methods: {
     validateInputCode(rule, value, callback) {
@@ -176,9 +214,13 @@ export default {
     onChange(e) {
       console.log(`checked = ${e.target.value}`)
     },
-    handleChange() {},
     handleChange(value) {
-      console.log(`selected ${value}`)
+      console.log(value)
+      getAction('/ctop/product/list', { advertiserId: value, pageSize: 1000 }).then((res) => {
+        if (res.success) {
+          this.listProduct = res.result.records
+        }
+      })
     },
     handleBlur() {
       console.log('blur')
@@ -191,47 +233,52 @@ export default {
     },
     getList() {
       var params = {}
-      params.userId = this.userInfo().id
+      // params.userId = this.userInfo().id
+      params.pageSize = 1000
+      params.pageNo = 1
       console.log(params)
-      getAction(this.url.getList, { userId: this.userInfo().id })
-        .then(res => {
+      getAction(this.url.getList,params)
+        .then((res) => {
           if (res.success) {
             console.log(res)
             this.list = res.result.records
-            
           } else {
             this.$message.warning(res.message)
           }
         })
         .finally(() => {})
     },
-    getSupplierList(){
-        var params = {}
-        getAction('/ctop/supplierList/list').then(res=>{
-            if(res.success){
-                this.supplierList = res.result.records
-            } else {
-                this.$message.warning(res.message)
-            }
-        })
+    getSupplierList() {
+      var params = {}
+      getAction('/ctop/supplierList/list').then((res) => {
+        if (res.success) {
+          this.supplierList = res.result.records
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
     },
-    add() {
+    add(item) {
+      this.editAll = false
       this.edit({
         responsibleId: this.userInfo().id, //用户Id
-        mediaId: '2'
+        mediaId: '2',
+        ...item,
       })
     },
     edit(record) {
       this.getSupplierList()
       this.getList()
-      
-      var params = { ...record }
-      if (params.advertiserId) {
-        params.advertiserId = { key: params.advertiserId, label: params.advertiserName }
+      if (record.advertiserId) {
+        this.editAll = true
+        getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
+          if (res.success) {
+            this.listProduct = res.result.records
+          }
+        })
       }
-    //   if (params.industryId) {
-    //     params.industryId = { key: params.industryId, label: params.industryId_dictText }
-    //   }
+      var params = { ...record }
+
       console.log(record)
       this.form.resetFields()
       this.model = Object.assign({}, params)
@@ -240,33 +287,56 @@ export default {
       this.visible = true
       this.$nextTick(() => {
         console.log(this.model)
-        this.form.setFieldsValue(
-          pick(
-            this.model,
-            'projectName',
-            'industryId',
-            'advertiserId',
-            'responsibleName',
-            'maxBid',
-            'maxDeepCpaBid',
-            'userId',
-            'designResponsibleId',
-            'responsibleId',
-            'industryCode',
-            'supplierCode',
-            // 'advertiserType',
-            'saleId'
+        if (record.advertiserId) {
+          this.form.setFieldsValue(
+            pick(
+              this.model,
+              'projectName',
+              'industryId',
+              'advertiserId',
+              'productId',
+              'responsibleName',
+              'maxBid',
+              'maxDeepCpaBid',
+              'userId',
+              'designResponsibleId',
+              'responsibleId',
+              'industryCode',
+              'supplierCode',
+              // 'advertiserType',
+              'saleId'
+            )
+          )
+        } else {
+          this.form.setFieldsValue(
+            pick(
+              this.model,
+              'projectName',
+              'industryId',
+              'advertiserId',
+              'responsibleName',
+              'maxBid',
+              'maxDeepCpaBid',
+              'userId',
+              'designResponsibleId',
+              'responsibleId',
+              'industryCode',
+              'supplierCode',
+              // 'advertiserType',
+              'saleId'
+            )
           )
-        )
+        }
+
         // this.resId = record.responsibleId
         // this.shejiId = record.designResponsibleId
-        getAction('/sys/user/getAllUserList', '').then(res => {
+        getAction('/sys/user/getAllUserListV1', '').then((res) => {
           console.log(res)
           if (res.success) {
             this.options = res.result
           }
         })
-         getAction('/sys/user/getAllSaleList', '').then(res => {
+        getAction('/sys/user/getAllSaleList', '').then((res) => {
           console.log(res)
           if (res.success) {
             this.optionsElse = res.result
@@ -296,17 +366,17 @@ export default {
           }
           var data = values.advertiserId
           let formData = Object.assign(this.model, values)
-        //   if(this.model.mediaId)
+          //   if(this.model.mediaId)
           formData.maxBid = formData.maxBid * 1000
-          formData.maxDeepCpaBid = formData.maxDeepCpaBid*1000
+          formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
           //时间格式化
-          formData.advertiserId = data.key
-          formData.advertiserName = data.label
+          // formData.advertiserId = data.key
+          // formData.advertiserName = data.label
           formData.responsibleId = values.responsibleId
           formData.designResponsibleId = values.designResponsibleId
           formData.userId = formData.userId ? formData.userId : that.userInfo().id
           httpAction(httpurl, formData, method)
-            .then(res => {
+            .then((res) => {
               if (res.success) {
                 that.$message.success(res.message)
                 that.$emit('ok')
@@ -330,8 +400,8 @@ export default {
     get(valueName, key) {
       console.log(valueName, key)
       this.resId = key
-    }
-  }
+    },
+  },
 }
 </script>
 

+ 19 - 76
src/views/modules/advertiser/modules/productModal.vue

@@ -3,17 +3,9 @@
     @cancel="handleCancel" cancelText="关闭">
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="媒体类型">
-          <a-radio-group @change="onChange" v-model="model.mediaId">
-            <a-radio-button value="1">头条</a-radio-button>
-            <a-radio-button value="2">快手</a-radio-button>
-            <!-- <a-radio-button value="3">头条内广</a-radio-button>
-            <a-radio-button value="4">快手内广</a-radio-button> -->
-          </a-radio-group>
-        </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主名称">
-          <a-select @change="handleChangeAd" labelInValue optionFilterProp="children" showSearch
-            :filterOption="filterOption" v-decorator="['advertiserId', validatorRules.advertiserId]" :disabled="addDis">
+          <a-select optionFilterProp="children" showSearch
+            :filterOption="filterOption" v-decorator="['advertiserId', validatorRules.advertiserId]">
             <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">{{
               item.name
             }}</a-select-option>
@@ -23,29 +15,10 @@
           <a-input placeholder="请输入产品名称" v-decorator.trim="['productName', validatorRules.projectName]"
             @keyup="form.setFieldsValue({'productName':getFormFieldValue('productName')?getFormFieldValue('productName').replace(/\s+/g,''):''})" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="项目列表">
-          <a-select optionFilterProp="children" showSearch :filterOption="filterOption" mode="multiple"
-            v-decorator="['projectIds', validatorRules.supplierCode]" @blur="getPerson" :disabled="addDis">
-            <a-select-option :value="item.id" v-for="(item, index) of supplierList" :key="index">
-              {{
-              item.projectName
-            }}({{
-              item.mediaId=='1'?'头条':'快手'
-            }})
-
-            </a-select-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="运营"
-          v-if="getFormFieldValue('projectIds')&&getFormFieldValue('projectIds').length>0&&optionsElse.length>0">
-
-          <span v-for="(item,index) in optionsElse" :key="index">
-            {{item.userName?item.userName:item.realname}}{{index==(optionsElse.length-1)?'':','}}</span>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售"
-          v-if="getFormFieldValue('projectIds')&&getFormFieldValue('projectIds').length>0&&options.length>0">
-          <span v-for="(item,index) in options"
-            :key="index">{{item.saleName}}{{index==(options.length-1)?'':','}}</span>
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="行业">
+          <j-tree-select ref="treeSelect" placeholder="请选择行业" v-decorator="['industryId', validatorRules.pid]"
+            dict="sys_category,name,id" pidField="pid" pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76">
+          </j-tree-select>
         </a-form-item>
       </a-form>
     </a-spin>
@@ -138,9 +111,9 @@
           },
         },
         url: {
-          add: '/ctop/product/insertOrUpdateProduct',
-          edit: '/ctop/product/insertOrUpdateProduct',
-          getList: '/ctop/product/advertiserList'
+          add: '/ctop/product/add',
+          edit: '/ctop/product/edit',
+          getList: '/ctop/advertiser/list'
 
         },
         list: [],
@@ -168,19 +141,6 @@
         console.log(`checked = ${e.target.value}`)
       },
       handleChange() {},
-      handleChangeAd(value) {
-        console.log(value)
-        this.form.setFieldsValue({
-          'projectIds': []
-        })
-        postAction('/ctop/product/getProjectListByAdvertiserId', {
-          "advertiserId": value.key
-        }).then(res => {
-          if (res.success) {
-            this.supplierList = res.result
-          }
-        })
-      },
       getPerson() {
         if (this.getFormFieldValue('projectIds')) {
           postAction('/ctop/product/getSaleAndYunyingListByProjectIds', {
@@ -205,13 +165,15 @@
       },
       getList() {
         var params = {}
-        params.userId = this.userInfo().id
+        // params.userId = this.userInfo().id
+        params.pageSize = 1000
+        params.pageNo = 1
         console.log(params)
-        getAction(this.url.getList)
+        getAction(this.url.getList,params)
           .then(res => {
             if (res.success) {
               console.log(res)
-              this.list = res.result
+              this.list = res.result.records
 
             } else {
               this.$message.warning(res.message)
@@ -229,11 +191,9 @@
           }
         })
       },
-      add() {
+      add(item) {
         this.addDis = false
-        this.edit({
-          mediaId: '2'
-        })
+        this.edit(item)
       },
       edit(record) {
         // this.getSupplierList()
@@ -242,23 +202,6 @@
         var params = {
           ...record
         }
-        if (params.advertiserId) {
-          this.addDis = true
-          this.options = params.saleList
-          this.optionsElse = params.yunyingList
-          params.advertiserId = {
-            key: params.advertiserId,
-            label: params.advertiserName
-          }
-          postAction('/ctop/product/getProjectListByAdvertiserId', {
-            "advertiserId": params.advertiserId.key
-          }).then(res => {
-            if (res.success) {
-              this.supplierList = res.result
-            }
-          })
-
-        }
         //   if (params.industryId) {
         //     params.industryId = { key: params.industryId, label: params.industryId_dictText }
         //   }
@@ -273,7 +216,7 @@
               this.model,
               'productName',
               'advertiserId',
-              'projectIds'
+              'industryId'
             )
           )
           // this.resId = record.responsibleId
@@ -317,8 +260,8 @@
 
             //   if(this.model.mediaId)
             //时间格式化
-            formData.advertiserId = data.key
-            formData.advertiserName = data.label
+            // formData.advertiserId = data.key
+            formData.userId = this.userInfo().id
             if (formData.id) {
               formData.productId = formData.id
             }

+ 1 - 1
src/views/modules/kuaishouapp/account/editGroupNew.vue

@@ -830,7 +830,7 @@
                   bid: item.bid != '' ? item.bid * 1000 : '',
                   deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
                   ocpxActionType: item.bidType,
-                  bidType: item.bidType == 1 ? 2 : 6
+                  bidType: item.bidType == 1 ? 2 : 10
                 }
               })[0]
               console.log(groupArrTwo)

+ 10 - 6
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -1004,8 +1004,10 @@
         params.channelType = this.channelType
         params.status = 0
         if (this.time.length > 0) {
-          params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
-          params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+          // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+          // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+          params.startDate = moment(this.time[0]).format('YYYY-MM-DD')+" 00:00:00"
+          params.endDate = moment(this.time[1]).format('YYYY-MM-DD')+" 23:59:59"
         }
         this.showVideoList('/kuaishou/batch/getVideoList', params)
       },
@@ -1219,8 +1221,10 @@
             params.status = 0
             params.channelType = this.channelType
             if (this.time.length > 0) {
-              params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
-              params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+              // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+              // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+              params.startDate = moment(this.time[0]).format('YYYY-MM-DD')+" 00:00:00"
+              params.endDate = moment(this.time[1]).format('YYYY-MM-DD')+" 23:59:59"
             }
             this.showVideoList('/kuaishou/batch/getVideoList', params)
           } else {
@@ -1680,8 +1684,8 @@
           params.pageNo = 1
           params.status = 0
           params.channelType = this.channelType
-          params.startDate = moment(n[0]).format('YYYY-MM-DD')
-          params.endDate = moment(n[1]).format('YYYY-MM-DD')
+          params.startDate = moment(n[0]).format('YYYY-MM-DD')+" 00:00:00"
+          params.endDate = moment(n[1]).format('YYYY-MM-DD')+" 23:59:59"
           this.showVideoList('/kuaishou/batch/getVideoList', params)
         } else {
           var params = {}

+ 169 - 112
src/views/modules/kuaishouapp/account/stepForm/stepModule/newModulePop.vue

@@ -93,7 +93,10 @@ li:hover {
               getCheckboxProps: getCheckboxProps
             }"
           >
-            <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
+            <span
+              slot="orientationName"
+              slot-scope="text, record"
+            >{{ text }}({{ record.orientationId }})</span>
             <span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
             <span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
           </a-table>
@@ -131,7 +134,10 @@ li:hover {
               getCheckboxProps: getCheckboxPropsNo
             }"
           >
-            <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
+            <span
+              slot="orientationName"
+              slot-scope="text, record"
+            >{{ text }}({{ record.orientationId }})</span>
             <span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
             <span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
           </a-table>
@@ -166,9 +172,11 @@ li:hover {
         <a-radio-button value="ageCustom">自定义年龄段</a-radio-button>
       </a-radio-group>
       <div v-if="allForm.ageType == 'ageLimit'">
-        <a-checkbox-group v-decorator="['agesRange', { rules: [{ required: true, message: '请选择年龄段' }] }]">
+        <a-checkbox-group
+          v-decorator="['agesRange', { rules: [{ required: true, message: '请选择年龄段' }] }]"
+        >
           <!-- <a-checkbox :value="0">0-11岁</a-checkbox>
-          <a-checkbox :value="12">12-17岁</a-checkbox> -->
+          <a-checkbox :value="12">12-17岁</a-checkbox>-->
           <a-checkbox :value="18">18-23岁</a-checkbox>
           <a-checkbox :value="24">24-30岁</a-checkbox>
           <a-checkbox :value="31">31-40岁</a-checkbox>
@@ -349,9 +357,11 @@ li:hover {
         :filterOption="filterOption"
         v-decorator="['appInterest', { rules: [{ required: true, message: '请选择APP行为' }] }]"
       >
-        <a-select-option v-for="item in optionsAppActive" :key="item.tagId" :value="item.tagId">{{
+        <a-select-option v-for="item in optionsAppActive" :key="item.tagId" :value="item.tagId">
+          {{
           item.tagName
-        }}</a-select-option>
+          }}
+        </a-select-option>
       </a-select>
     </a-form-item>
     <a-form-item
@@ -379,22 +389,30 @@ li:hover {
                 @change="onCheckAllChange"
                 :indeterminate="indeterminate"
                 :checked="checkAll"
-              ></a-checkbox
-              >全选
+              ></a-checkbox>全选
             </li>
-            <a-checkbox-group @change="onChange" v-model="checkArr" class="home-card" style="width:100%">
+            <a-checkbox-group v-model="checkArr" @change="onChange" class="home-card" style="width:100%">
               <li style="padding:0 10px;width:100%;" v-for="item of optionsApp" :key="item.appId">
-                <a-checkbox :value="item.appId" style="float:left;margin:0 5px"></a-checkbox>{{ item.appName }}
+                <a-checkbox
+                  :value="item.appId"
+                  style="float:left;margin:0 5px"
+                  
+                ></a-checkbox>
+                {{ item.appName }}
               </li>
             </a-checkbox-group>
           </ul>
         </div>
-        <div style="width:100%" v-if="checkArr.length > 0">
+
+        <div style="width:100%" v-if="optionsAll.length > 0">
           <a-button @click="clearAll">清空</a-button>
           <br />
-          <a-tag v-for="item of checkArr" :key="item" closable :afterClose="() => log(item)">
-            {{ showAppName(item) }}
-          </a-tag>
+          <a-tag
+            v-for="item of optionsAll"
+            :key="item"
+            closable
+            :afterClose="() => log(item)"
+          >{{ showAppName(item) }}</a-tag>
         </div>
       </div>
     </a-form-item>
@@ -403,13 +421,19 @@ li:hover {
       :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
       :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
     >
-      <a-radio-group buttonStyle="solid" @change="businessInterest" v-model="allForm.businessInterestType">
+      <a-radio-group
+        buttonStyle="solid"
+        @change="businessInterest"
+        v-model="allForm.businessInterestType"
+      >
         <a-radio-button :value="0">不限</a-radio-button>
         <a-radio-button :value="1">智能推荐</a-radio-button>
         <a-radio-button :value="2">兴趣标签</a-radio-button>
       </a-radio-group>
-      <br>
-      <span v-if="allForm.businessInterestType==1">商业兴趣定向会根据您的投放计划,智能精选出最匹配人群,帮助您获取更满足投放意图的人群,以达到最好的投放效果。</span>
+      <br />
+      <span
+        v-if="allForm.businessInterestType==1"
+      >商业兴趣定向会根据您的投放计划,智能精选出最匹配人群,帮助您获取更满足投放意图的人群,以达到最好的投放效果。</span>
     </a-form-item>
     <a-form-item
       label=" "
@@ -426,9 +450,11 @@ li:hover {
         :filterOption="filterOption"
         v-decorator="['businessInterest', { rules: [{ required: true, message: '请选择商业兴趣' }] }]"
       >
-        <a-select-option v-for="item in businessOptions" :key="item.tagId" :value="item.tagId">{{
+        <a-select-option v-for="item in businessOptions" :key="item.tagId" :value="item.tagId">
+          {{
           item.tagName
-        }}</a-select-option>
+          }}
+        </a-select-option>
       </a-select>
     </a-form-item>
     <a-form-item
@@ -476,9 +502,11 @@ li:hover {
         :filterOption="filterOption"
         v-decorator="['fansStar', { rules: [{ required: true, message: '请选择网红类别' }] }]"
       >
-        <a-select-option v-for="item in fansStarOptions" :key="item.tagId" :value="item.tagId">{{
+        <a-select-option v-for="item in fansStarOptions" :key="item.tagId" :value="item.tagId">
+          {{
           item.tagName
-        }}</a-select-option>
+          }}
+        </a-select-option>
       </a-select>
     </a-form-item>
 
@@ -508,9 +536,11 @@ li:hover {
         :filterOption="filterOption"
         v-decorator="['interestVideo', { rules: [{ required: true, message: '请选择视频标签' }] }]"
       >
-        <a-select-option v-for="item in interestVideoOptions" :key="item.tagId" :value="item.tagId">{{
+        <a-select-option v-for="item in interestVideoOptions" :key="item.tagId" :value="item.tagId">
+          {{
           item.tagName
-        }}</a-select-option>
+          }}
+        </a-select-option>
       </a-select>
     </a-form-item>
 
@@ -524,7 +554,7 @@ li:hover {
           {
             initialValue: '0'
           }
-        ]" -->
+      ]"-->
       <a-radio-group buttonStyle="solid" v-model="allForm.isOpen">
         <a-radio-button :value="0">关闭</a-radio-button>
         <a-radio-button :value="1">开启</a-radio-button>
@@ -537,15 +567,21 @@ li:hover {
       class="else-label"
       v-if="allForm.isOpen == 1"
     >
-      <a-checkbox :disabled="allForm.ageType == 'noLimit'" :checked="allForm.noAgeBreak" @change="getAge"
-        >不可突破年龄</a-checkbox
-      >
-      <a-checkbox :disabled="getData('gender') == '0'" :checked="allForm.noGenderBreak" @change="getGender"
-        >不可突破性别</a-checkbox
-      >
-      <a-checkbox :disabled="allForm.regionType != 'limit'||allForm.region.length==0" :checked="allForm.noAreaBreak" @change="getArea"
-        >不可突破地域</a-checkbox
-      >
+      <a-checkbox
+        :disabled="allForm.ageType == 'noLimit'"
+        :checked="allForm.noAgeBreak"
+        @change="getAge"
+      >不可突破年龄</a-checkbox>
+      <a-checkbox
+        :disabled="getData('gender') == '0'"
+        :checked="allForm.noGenderBreak"
+        @change="getGender"
+      >不可突破性别</a-checkbox>
+      <a-checkbox
+        :disabled="allForm.regionType != 'limit'||allForm.region.length==0"
+        :checked="allForm.noAreaBreak"
+        @change="getArea"
+      >不可突破地域</a-checkbox>
     </a-form-item>
   </a-form>
 </template>
@@ -582,7 +618,7 @@ const clickoutside = {
     // 解除事件监听
     document.removeEventListener('click', el.__vueClickOutside__)
     delete el.__vueClickOutside__
-  }
+  },
 }
 
 const columns = [
@@ -590,7 +626,7 @@ const columns = [
     title: '人群',
     dataIndex: 'orientationName',
     scopedSlots: { customRender: 'orientationName' },
-    width: 150
+    width: 150,
   },
   {
     title: '属性',
@@ -612,22 +648,18 @@ const columns = [
       { text: '固化标签', value: '14' },
       { text: '行业偏好', value: '15' },
       { text: '第三方标签', value: '16' },
-      { text: '产品关键词', value: '17' }
+      { text: '产品关键词', value: '17' },
     ],
-    onFilter: (value, record) =>
-      record.populationType
-        .toString()
-        .toLowerCase()
-        .includes(value.toLowerCase()),
+    onFilter: (value, record) => record.populationType.toString().toLowerCase().includes(value.toLowerCase()),
     scopedSlots: { customRender: 'populationType' },
-    width: 150
+    width: 150,
   },
   {
     title: '创建时间',
     dataIndex: 'putTime',
     scopedSlots: { customRender: 'putTime' },
-    sorter: (a, b) => a.putTime - b.putTime
-  }
+    sorter: (a, b) => a.putTime - b.putTime,
+  },
 ]
 
 export default {
@@ -638,14 +670,14 @@ export default {
       type: String,
       default() {
         return null
-      }
+      },
     },
     platform: {
       default() {
         return null
-      }
+      },
     },
-    populationData: {}
+    populationData: {},
   },
   filters: {
     getDate(value) {
@@ -662,7 +694,7 @@ export default {
         1: 'Android应用下载',
         2: 'Android网页游戏',
         3: 'iOS应用下载',
-        4: 'iOS网页游戏'
+        4: 'iOS网页游戏',
       }
       return data[str]
     },
@@ -684,10 +716,10 @@ export default {
         14: '固化标签',
         15: '行业偏好',
         16: '第三方标签',
-        17: '产品关键词'
+        17: '产品关键词',
       }
       return data[str]
-    }
+    },
   },
   watch: {
     platform(n, o) {
@@ -716,7 +748,7 @@ export default {
 
           this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
           this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
-          this.getPeople().then(res => {
+          this.getPeople().then((res) => {
             if (n.excludePopulation) {
               this.keyValueNo = ''
               this.selectedRowKeysValueNo = []
@@ -726,7 +758,7 @@ export default {
                     this.keyValueNo += res[i].orientationName + '   '
                     this.selectedRowKeysValueNo.push({
                       orientationId: res[i].orientationId,
-                      orientationName: res[i].orientationName
+                      orientationName: res[i].orientationName,
                     })
                     this.selectedRowKeysNo.push()
                   }
@@ -742,7 +774,7 @@ export default {
                     this.keyValue += res[i].orientationName + '   '
                     this.selectedRowKeysValue.push({
                       orientationId: res[i].orientationId,
-                      orientationName: res[i].orientationName
+                      orientationName: res[i].orientationName,
                     })
                   }
                 }
@@ -763,7 +795,7 @@ export default {
                 'iosOsv',
                 'deviceBrand',
                 'devicePrice',
-                'businessInterest'
+                'businessInterest',
               ])
             )
           })
@@ -790,11 +822,28 @@ export default {
             isOpen: 0,
             noAgeBreak: false,
             noGenderBreak: false,
-            noAreaBreak: false
+            noAreaBreak: false,
+          }
+        }
+      },
+    },
+    checkArr(n, o) {
+      console.log(n, o)
+      this.optionsAll.push(...n)
+      this.optionsAll = [...new Set(this.optionsAll)]
+      if (n.length != o.length) {
+        if (n.length < o.length) {
+          var a = new Set(n)
+          var b = new Set(o)
+          var c = new Set([...b].filter((item) => !a.has(item))) // {1}
+          console.log(...c)
+          var d = this.optionsAll.indexOf(...c)
+          if (d > 0) {
+            this.optionsAll.splice(d, 1)
           }
         }
       }
-    }
+    },
   },
   directives: { clickoutside },
   data() {
@@ -811,7 +860,7 @@ export default {
         40: '40岁',
         45: '45岁',
         50: '50岁',
-        55: '55岁'
+        55: '55岁',
       },
       step: 0,
       loading: false,
@@ -838,19 +887,20 @@ export default {
         topMiddle: false,
         topMiddleNo: false,
         keyValue: '',
-        keyValueNo: ''
+        keyValueNo: '',
       },
       options: [],
-      optionsAll: [],
       optionProps: {
         value: 'regionId',
         label: 'name',
         children: 'children',
         multiple: true,
-        emitPath: false
+        emitPath: false,
         // checkStrictly: true
       },
+      optionsAll: [],
       optionsApp: [],
+      checkElse: [],
       optionsAppActive: [],
       checkOptions: [],
       businessOptions: [],
@@ -861,7 +911,7 @@ export default {
         label: 'tagName',
         children: 'children',
         multiple: true,
-        emitPath: false
+        emitPath: false,
       },
       getApp: '0',
       closeDialog: false,
@@ -878,26 +928,28 @@ export default {
       selectedRowKeysValue: [],
       selectedRowKeysNo: [],
       selectedRowKeysValueNo: [],
-      dataList: []
+      dataList: [],
     }
   },
   computed: {},
   methods: {
     getPeople() {
       return new Promise((resolve, reject) => {
-        getAction('/kuaishou/batch/getPopulationList', { accountId: localStorage.getItem('accountIdNewMoudle') }).then(res => {
-          if (res.success) {
-            if (res.result) {
-              this.dataList = res.result.map((item, index) => {
-                return {
-                  ...item,
-                  key: index
-                }
-              })
-              resolve(res.result)
+        getAction('/kuaishou/batch/getPopulationList', { accountId: localStorage.getItem('accountIdNewMoudle') }).then(
+          (res) => {
+            if (res.success) {
+              if (res.result) {
+                this.dataList = res.result.map((item, index) => {
+                  return {
+                    ...item,
+                    key: index,
+                  }
+                })
+                resolve(res.result)
+              }
             }
           }
-        })
+        )
       })
     },
     radioChange() {
@@ -910,28 +962,28 @@ export default {
     },
     onSelectChange(selectedRowKeys, selectionRows) {
       this.selectedRowKeys = selectedRowKeys
-      this.selectedRowKeysValue = selectionRows.map(item => {
+      this.selectedRowKeysValue = selectionRows.map((item) => {
         return { orientationId: item.orientationId, orientationName: item.orientationName }
       })
     },
     getCheckboxProps(record) {
       return {
         props: {
-          disabled: this.selectedRowKeysValueNo.some(item => item.orientationId === record.orientationId)
-        }
+          disabled: this.selectedRowKeysValueNo.some((item) => item.orientationId === record.orientationId),
+        },
       }
     },
     onSelectChangeNo(selectedRowKeys, selectionRows) {
       this.selectedRowKeysNo = selectedRowKeys
-      this.selectedRowKeysValueNo = selectionRows.map(item => {
+      this.selectedRowKeysValueNo = selectionRows.map((item) => {
         return { orientationId: item.orientationId, orientationName: item.orientationName }
       })
     },
     getCheckboxPropsNo(record) {
       return {
         props: {
-          disabled: this.selectedRowKeysValue.some(item => item.orientationId === record.orientationId)
-        }
+          disabled: this.selectedRowKeysValue.some((item) => item.orientationId === record.orientationId),
+        },
       }
     },
     okSelect() {
@@ -973,15 +1025,15 @@ export default {
       }
     },
     showAppName(appId) {
-      var data = this.checkOptions.filter(item => {
+      var data = this.checkOptions.filter((item) => {
         return item.appId == appId
       })
       return data[0].appName
     },
     log(appId) {
-      var index = this.checkArr.findIndex(item => item === appId)
-      this.checkArr.splice(index, 1)
-      if (this.checkArr.length == 0) {
+      var index = this.optionsAll.findIndex((item) => item === appId)
+      this.optionsAll.splice(index, 1)
+      if (this.optionsAll.length == 0) {
         this.indeterminate = false
         this.checkAll = false
       }
@@ -991,33 +1043,39 @@ export default {
     },
     clearAll() {
       this.checkArr = []
+      this.optionsAll = []
       this.indeterminate = false
       this.checkAll = false
     },
     onChange(checkedList) {
+      console.log(checkedList, this.checkArr)
       this.indeterminate =
         !!checkedList.length &&
         checkedList.length <
-          this.optionsApp.map(item => {
+          this.optionsApp.map((item) => {
             return item.appId
           }).length
       this.checkAll =
         checkedList.length ===
-        this.optionsApp.map(item => {
+        this.optionsApp.map((item) => {
           return item.appId
         }).length
+
+      // if (this.checkArr.indexOf(checkedList) > 0) {
+      //   var index = this.optionsAll.indexOf(checkedList)
+      // }
     },
     onCheckAllChange(e) {
       Object.assign(this, {
         checkArr: e.target.checked
-          ? this.optionsApp.map(item => {
+          ? this.optionsApp.map((item) => {
               return item.appId
             })
           : [],
         indeterminate: false,
-        checkAll: e.target.checked
+        checkAll: e.target.checked,
       })
-      if (this.checkArr.length > 20) {
+      if (this.optionsAll.length > 20) {
         this.$message.error('最多选择20个APP行为')
         this.checkArr = []
         this.indeterminate = false
@@ -1039,35 +1097,35 @@ export default {
           //   this.checkArr
           var json = {}
           if (this.allForm.appType == '2') {
-            json.appIds = this.checkArr
+            json.appIds = this.optionsAll
           }
           if (this.allForm.regionType == 'limit') {
-            json.region = this.allForm.region.map(item => {
+            json.region = this.allForm.region.map((item) => {
               return item.value
             })
           }
           var jsonData = {}
-          if(this.people == '3'){
+          if (this.people == '3') {
             if (this.targeted == '2') {
-                jsonData.population = this.selectedRowKeysValue.map(item => {
+              jsonData.population = this.selectedRowKeysValue.map((item) => {
                 return item.orientationId
-                })
+              })
             } else if (this.targeted == '3') {
-                jsonData.excludePopulation = this.selectedRowKeysValueNo.map(item => {
+              jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
                 return item.orientationId
-                })
+              })
             } else if (this.targeted == '4') {
-                jsonData.population = this.selectedRowKeysValue.map(item => {
+              jsonData.population = this.selectedRowKeysValue.map((item) => {
                 return item.orientationId
-                })
-                jsonData.excludePopulation = this.selectedRowKeysValueNo.map(item => {
+              })
+              jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
                 return item.orientationId
-                })
+              })
             } else {
-                jsonData = {}
+              jsonData = {}
             }
           }
-          
+
           var dataJson = {
             ...values,
             platformOs: this.allForm.platform_os,
@@ -1078,7 +1136,7 @@ export default {
             noGenderBreak: this.allForm.noGenderBreak ? 1 : 0,
             noAreaBreak: this.allForm.noAreaBreak ? 1 : 0,
             allForm: this.allForm,
-            ...jsonData
+            ...jsonData,
           }
           this.$emit('update:populationData', dataJson)
         }
@@ -1101,10 +1159,10 @@ export default {
     },
     search(e) {},
     put() {
-      var data = this.allForm.region.map(item => {
+      var data = this.allForm.region.map((item) => {
         return item[1] + ''
       })
-      var dataElse = data.map(item => {
+      var dataElse = data.map((item) => {
         return [item.substring(0, 2), item]
       })
     },
@@ -1112,8 +1170,8 @@ export default {
       if (e.target.value !== '') {
         getAction('/kuaishou/batch/getAppSearch', {
           accountId: localStorage.getItem('accountId'),
-          appName: e.target.value
-        }).then(res => {
+          appName: e.target.value,
+        }).then((res) => {
           if (res.result) {
             this.optionsApp = res.result
             this.checkOptions.push(...res.result)
@@ -1133,7 +1191,7 @@ export default {
       this.formAll.setFieldsValue({ appInterest: [] })
       this.checkArr = []
       if (e.target.value == '1') {
-        getAction('/kuaishou/batch/getTargetList', { tagType: 'APP_INTEREST' }).then(res => {
+        getAction('/kuaishou/batch/getTargetList', { tagType: 'APP_INTEREST' }).then((res) => {
           if (res.success) {
             this.optionsApp = res.result
           }
@@ -1160,7 +1218,7 @@ export default {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     },
     getDataType(type, dataList) {
-      getAction('/kuaishou/batch/getTargetList', { tagType: type }).then(res => {
+      getAction('/kuaishou/batch/getTargetList', { tagType: type }).then((res) => {
         if (res.success) {
           this[dataList] = res.result
         }
@@ -1168,15 +1226,14 @@ export default {
     },
     getData(className) {
       return this.formAll.getFieldValue(className)
-    }
+    },
   },
-  mounted: function() {
+  mounted: function () {
     this.getDataType('APP_INTEREST', 'optionsAppActive')
     this.getDataType('BUSINESS_INTEREST', 'businessOptions')
     this.getDataType('FANS_STAR', 'fansStarOptions')
     this.getDataType('INTEREST_VIDEO', 'interestVideoOptions')
-
-  }
+  },
 }
 </script>
 

+ 34 - 10
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -394,10 +394,10 @@ li:hover {
             </a-checkbox-group>
           </ul>
         </div>
-        <div style="width:100%" v-if="checkArr.length > 0">
+        <div style="width:100%" v-if="optionsAll.length > 0">
           <a-button @click="clearAll">清空</a-button>
           <br />
-          <a-tag v-for="item of checkArr" :key="item" closable :afterClose="() => log(item)">
+          <a-tag v-for="item of optionsAll" :key="item" closable :afterClose="() => log(item)">
             {{ showAppName(item)?showAppName(item):item }}
           </a-tag>
         </div>
@@ -711,6 +711,7 @@ export default {
     populationData: {
       immediate: true, // immediate选项可以开启首次赋值监听
       handler(n, oldVal) {
+        console.log(n)
         if (n.allForm) {
           this.allForm = n.allForm
           this.allForm.noAgeBreak = n.noAgeBreak == '0' ? false : true
@@ -718,7 +719,7 @@ export default {
           this.allForm.noAreaBreak = n.noAreaBreak == '0' ? false : true
           this.selectedRowKeys = n.population ? n.population : []
           this.selectedRowKeysNo = n.excludePopulation ? n.excludePopulation : []
-          this.checkArr = n.allForm.checkArr
+          this.optionsAll = n.appIds
           this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
           this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
           this.getPeople().then(res => {
@@ -799,11 +800,29 @@ export default {
           }
         }
       }
-    }
+    },
+    checkArr(n, o) {
+      console.log(n, o)
+      this.optionsAll.push(...n)
+      this.optionsAll = [...new Set(this.optionsAll)]
+      if (n.length != o.length) {
+        if (n.length < o.length) {
+          var a = new Set(n)
+          var b = new Set(o)
+          var c = new Set([...b].filter((item) => !a.has(item))) // {1}
+          console.log(...c)
+          var d = this.optionsAll.indexOf(...c)
+          if (d > 0) {
+            this.optionsAll.splice(d, 1)
+          }
+        }
+      }
+    },
   },
   directives: { clickoutside },
   data() {
     return {
+      optionsAll:[],
       formAll: this.$form.createForm(this),
       marks: {
         5: '5岁',
@@ -997,16 +1016,21 @@ export default {
             var data = this.checkOptions.filter(item => {
                 return item.appId == appId
             })
-            return data[0].appName
+            if(data[0]){
+              return data[0].appName
+            }else{
+              return null
+            }
+            
         }else{
             return null
         }
      
     },
     log(appId) {
-      var index = this.checkArr.findIndex(item => item === appId)
-      this.checkArr.splice(index, 1)
-      if (this.checkArr.length == 0) {
+      var index = this.optionsAll.findIndex((item) => item === appId)
+      this.optionsAll.splice(index, 1)
+      if (this.optionsAll.length == 0) {
         this.indeterminate = false
         this.checkAll = false
       }
@@ -1046,7 +1070,7 @@ export default {
         indeterminate: false,
         checkAll: e.target.checked
       })
-      if (this.checkArr.length > 20) {
+      if (this.optionsAll.length > 20) {
         this.$message.error('最多选择20个APP行为')
         this.checkArr = []
         this.indeterminate = false
@@ -1068,7 +1092,7 @@ export default {
           //   this.checkArr
           var json = {}
           if (this.allForm.appType == '2') {
-            json.appIds = this.checkArr
+            json.appIds = this.optionsAll
           }
           if (this.allForm.regionType == 'limit') {
             json.region = this.allForm.region.map(item => {

+ 307 - 634
src/views/modules/material/labelMaterial.vue

@@ -1,657 +1,330 @@
-<template xmlns:background-color="http://www.w3.org/1999/xhtml">
-  <a-row :gutter="10">
-    <a-col :md="12" :sm="24">
-      <a-card :bordered="false">
+<template>
+  <a-card :bordered="false">
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="6">
+            <a-form-item label="标签名称">
+              <a-input placeholder="请输入标签名称" v-model="queryParam.tagName"></a-input>
+            </a-form-item>
+          </a-col>
+          <!--  -->
+          <a-col :md="6" :sm="6">
+            <a-form-item label="标签分类">
+              <a-select v-model="queryParam.tagCategoryId" placeholder="请选择">
+                <a-select-option value="1">形式</a-select-option>
+                <a-select-option value="2">基调</a-select-option>
+                <a-select-option value="3">内容</a-select-option>
+                <a-select-option value="4">场景</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="6">
+            <a-form-item label="标签等级">
+              <a-select v-model="queryParam.level" placeholder="请选择">
+                <a-select-option value="1">一级标签</a-select-option>
+                <a-select-option value="2">二级标签</a-select-option>
+                <a-select-option value="3">三级标签</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
 
-        <!-- 按钮操作区域 -->
-        <a-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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-            <a-button type="primary" icon="import">导入</a-button>
-          </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>
-        <div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
-          <a-alert type="info" :showIcon="true">
-            <div slot="message">
-              当前选择:<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
-              <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">取消选择</a>
-            </div>
-          </a-alert>
-          <a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
-          <!-- 树-->
-          <a-col :md="10" :sm="24">
-            <template>
-              <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
-               <span>
-            <a-tree
-              checkable
-              multiple
-              @select="onSelect"
-              @check="onCheck"
-              @rightClick="rightHandle"
-              :selectedKeys="selectedKeys"
-              :checkedKeys="checkedKeys"
-              :treeData="departTree"
-              :checkStrictly="checkStrictly"
-              :expandedKeys="iExpandedKeys"
-              :autoExpandParent="autoExpandParent"
-              @expand="onExpand"/>
-                </span>
-                <!--新增右键点击事件,和增加添加和删除功能-->
-                <a-menu slot="overlay">
-                  <a-menu-item @click="handleAdd(3)" key="1">添加</a-menu-item>
-                  <a-menu-item @click="handleDelete" key="2">删除</a-menu-item>
-                  <a-menu-item @click="closeDrop" key="3">取消</a-menu-item>
-                </a-menu>
-              </a-dropdown>
-            </template>
+          <a-col :md="6" :sm="6">
+            <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>
-        </div>
-      </a-card>
-      <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
-      <div class="drawer-bootom-button">
-        <a-dropdown :trigger="['click']" placement="topCenter">
-          <a-menu slot="overlay">
-            <a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>
-            <a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>
-            <a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item>
-            <a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item>
-            <a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
-            <a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
-          </a-menu>
-          <a-button>
-            树操作 <a-icon type="up" />
-          </a-button>
-        </a-dropdown>
-      </div>
-      <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
-    </a-col>
-    <a-col :md="12" :sm="24">
-      <a-tabs defaultActiveKey="1">
-        <a-tab-pane tab="基本信息" key="1" >
-          <a-card :bordered="false" v-if="selectedKeys.length>0">
-            <a-form :form="form">
-              <a-form-item
-                :labelCol="labelCol"
-                :wrapperCol="wrapperCol"
-                label="机构名称">
-                <a-input placeholder="请输入机构/部门名称" v-decorator="['departName', validatorRules.departName ]"/>
-              </a-form-item>
-              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
-                <a-tree-select
-                  style="width:100%"
-                  :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
-                  :treeData="treeData"
-                  :disabled="disable"
-                  v-model="model.parentId"
-                  placeholder="无">
-                </a-tree-select>
-              </a-form-item>
-              <a-form-item
-                :labelCol="labelCol"
-                :wrapperCol="wrapperCol"
-                label="机构编码">
-                <a-input disabled placeholder="请输入机构编码" v-decorator="['orgCode', validatorRules.orgCode ]"/>
-              </a-form-item>
-              <a-form-item
-                :labelCol="labelCol"
-                :wrapperCol="wrapperCol"
-                label="机构类型">
-                <template v-if="orgCategoryDisabled">
-                  <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>
-                </template>
-              </a-form-item>
-              <a-form-item
-                :labelCol="labelCol"
-                :wrapperCol="wrapperCol"
-                label="排序">
-                <a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
-              </a-form-item>
-              <a-form-item
-                :labelCol="labelCol"
-                :wrapperCol="wrapperCol"
-                label="手机号">
-                <a-input placeholder="请输入手机号" v-decorator="['mobile', {'initialValue':''}]"/>
-              </a-form-item>
-              <a-form-item
-                :labelCol="labelCol"
-                :wrapperCol="wrapperCol"
-                label="地址">
-                <a-input placeholder="请输入地址" v-decorator="['address', {'initialValue':''}]"/>
-              </a-form-item>
-              <a-form-item
-                :labelCol="labelCol"
-                :wrapperCol="wrapperCol"
-                label="备注">
-                <a-textarea placeholder="请输入备注" v-decorator="['memo', {'initialValue':''}]"/>
-              </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="submitCurrForm" type="primary" htmlType="button" icon="form">保存</a-button>
-            </div>
-          </a-card>
-          <a-card v-else >
-            <a-empty>
-              <span slot="description"> 请先选择一个部门! </span>
-            </a-empty>
-          </a-card>
-        </a-tab-pane>
-        <a-tab-pane tab="部门权限" key="2" forceRender>
-          <depart-auth-modal ref="departAuth"/>
-        </a-tab-pane>
-      </a-tabs>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <!-- <a-button @click="batchDel" v-if="selectedRowKeys.length > 0" ghost type="primary" icon="delete">批量删除
+      </a-button>-->
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table       
+        size="middle"
+        
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+        <span slot="tagName" slot-scope="text,record">
+          <span v-if="record.status == 1">{{text}}</span>
+          <span v-else-if="record.status == 0" style="color:red">{{text}}(未审核)</span>
+          <span v-else>{{text}}(已驳回)</span>
+        </span>
+        <span slot="action" slot-scope="text, record">
+          <a href="javascript:;" @click="handleAddSub(record)" :disabled="record.level==3">添加下级</a>
+          <a-divider type="vertical" />
+          <a @click="handleDeleteModel(record)" :disabled="!IsURL(record.model)">查看示例</a>
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link" @click="e => e.preventDefault()">更多</a>
+            <a-menu slot="overlay">
+              <!-- <a-menu-item key="4" :disabled="!IsURL(record.model)">
+                <a style="margin-right:20px" @click="handleDeleteModel(record)">查看示例</a>
+              </a-menu-item>-->
+              <a-menu-item key="0">
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteElse(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+              <a-menu-item key="1" :disabled="record.status==1">
+                <a
+                  href="javascript:;"
+                  @click="handleDeleteStatus(record.id,'1')"
+                  :disabled="record.status==1"
+                >通过</a>
+              </a-menu-item>
+              <a-menu-item key="3" :disabled="record.status==1">
+                <a
+                  style="margin-right:20px"
+                  @click="handleDeleteStatus(record.id,'2')"
+                  :disabled="record.status==1"
+                >驳回</a>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+        <!-- 字符串超长截取省略号显示-->
+        <span slot="model" slot-scope="text">
+          <!-- <j-ellipsis :value="text" /> -->
+          <video :src="text" v-if="text" style="width: 100%" controls="controls">您的浏览器不支持 video 标签。</video>
+          <span v-else>-</span>
+        </span>
+      </a-table>
+    </div>
+    <!-- table区域-end -->
 
-    </a-col>
-    <depart-modal ref="departModal" @ok="loadTree"></depart-modal>
-  </a-row>
+    <permission-modal ref="modalForm" @ok="modalFormOk"></permission-modal>
+  </a-card>
 </template>
+
 <script>
-  import DepartModal from './modules/DepartModal'
-  import pick from 'lodash.pick'
-  import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api'
-  import {httpAction, deleteAction} from '@/api/manage'
-  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import DepartAuthModal from './modules/DepartAuthModal'
-  // 表头
-  const columns = [
-    {
-      title: '机构名称',
-      dataIndex: 'departName'
-    },
-    {
-      title: '机构类型',
-      align: 'center',
-      dataIndex: 'orgType'
-    },
-    {
-      title: '机构编码',
-      dataIndex: 'orgCode',
+import PermissionModal from './modules/DepartModal'
+import { getPermissionList } from '@/api/api'
+import { httpAction, deleteAction, getAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+//   import PermissionDataRuleList from './PermissionDataRuleList'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+const columns = [
+  
+  {
+    title: '标签名称',
+    dataIndex: 'tagName',
+    key: 'tagName',
+    align: 'left',
+    scopedSlots: {
+      customRender: 'tagName',
     },
-    {
-      title: '手机号',
-      dataIndex: 'mobile'
-    },
-    {
-      title: '传真',
-      dataIndex: 'fax'
+  },
+  /*{
+         title: '菜单类型',
+         dataIndex: 'menuType',
+         key: 'menuType',
+         customRender: function(text) {
+           if (text == 0) {
+             return '菜单'
+           } else if (text == 1) {
+             return '菜单'
+           } else if (text == 2) {
+             return '按钮/权限'
+           } else {
+             return text
+           }
+         }
+       },*/
+  {
+    title: '标签层级',
+    dataIndex: 'level',
+    key: 'level',
+    customRender: function (text) {
+      if (text == 1) {
+        return '一级标签'
+      } else if (text == 2) {
+        return '二级标签'
+      } else if (text == 3) {
+        return '三级标签'
+      }
     },
-    {
-      title: '地址',
-      dataIndex: 'address'
+    align: 'left',
+  },
+  // {
+  //   title: '所属一级标签',
+  //   dataIndex: 'firstTagId_dictText',
+  //   key: 'firstTagId_dictText',
+  //   customRender: function (text) {
+  //     if (text == null) {
+  //       return '-'
+  //     } else {
+  //       return text
+  //     }
+  //   },
+  //   align: 'center',
+  // },
+  // {
+  //   title: '所属二级标签',
+  //   dataIndex: 'secendTagId_dictText',
+  //   key: 'secendTagId_dictText',
+  //   customRender: function (text) {
+  //     if (text == null) {
+  //       return '-'
+  //     } else {
+  //       return text
+  //     }
+  //   },
+  //   align: 'center',
+  // },
+  {
+    title: '标签分类',
+    dataIndex: 'tagCategoryName',
+    key: 'tagCategoryName',
+    align: 'left',
+  },
+  {
+    title: '描述',
+    dataIndex: 'description',
+    key: 'description',
+    customRender: function (text) {
+      if (text == null) {
+        return '-'
+      } else {
+        return text
+      }
     },
-    {
-      title: '排序',
-      align: 'center',
-      dataIndex: 'departOrder'
+    align: 'left',
+    width: 400,
+  },
+  // {
+  //   title: '标签示例',
+  //   dataIndex: 'model',
+  //   key: 'model',
+  //   scopedSlots: {
+  //     customRender: 'model'
+  //   },
+  //   //   customRender: function (text) {
+  //   //     if (text == null) {
+  //   //       return '-'
+  //   //     } else {
+  //   //       return text
+  //   //     }
+  //   //   },
+  //   align: 'center',
+  //   width: 200
+  // },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    scopedSlots: {
+      customRender: 'action',
     },
-    {
-      title: '操作',
-      align: 'center',
-      dataIndex: 'action',
-      scopedSlots: {customRender: 'action'}
+    align: 'left',
+    width: 250,
+  },
+]
+export default {
+  name: 'label-material',
+  mixins: [JeecgListMixin],
+  components: {
+    PermissionModal,
+    JEllipsis
+  },
+  data() {
+    return {
+      description: '标签管理',
+      // 表头
+      columns: columns,
+      loading: false,
+      // 展开的行,受控属性
+      expandedRowKeys: [],
+      url: {
+        list: '/ctop/tagInfo/treeList',
+        delete: '/ctop/tagInfo/edit',
+        deleteBatch: '/sys/permission/deleteBatch',
+      },
     }
-  ]
-  export default {
-    name: 'DepartList',
-    mixins: [JeecgListMixin],
-    components: {
-      DepartAuthModal,
-      DepartModal
-    },
-    data() {
-      return {
-        iExpandedKeys: [],
-        loading: false,
-        autoExpandParent: true,
-        currFlowId: '',
-        currFlowName: '',
-        disable: true,
-        treeData: [],
-        visible: false,
-        departTree: [],
-        rightClickSelectedKey: '',
-        rightClickSelectedOrgCode: '',
-        hiding: true,
-        model: {},
-        dropTrigger: '',
-        depart: {},
-        columns: columns,
-        disableSubmit: false,
-        checkedKeys: [],
-        selectedKeys: [],
-        autoIncr: 1,
-        currSelected: {},
-
-        allTreeKeys:[],
-        checkStrictly: true,
-
-        form: this.$form.createForm(this),
-        labelCol: {
-          xs: {span: 24},
-          sm: {span: 5}
-        },
-        wrapperCol: {
-          xs: {span: 24},
-          sm: {span: 16}
-        },
-        graphDatasource: {
-          nodes: [],
-          edges: []
-        },
-        validatorRules: {
-          departName: {rules: [{required: true, message: '请输入机构/部门名称!'}]},
-          orgCode: {rules: [{required: true, message: '请输入机构编码!'}]},
-          orgCategory: {rules: [{required: true, message: '请输入机构类型!'}]},
-          mobile: {rules: [{validator: this.validateMobile}]}
-        },
-        url: {
-          delete: '/sys/sysDepart/delete',
-          edit: '/sys/sysDepart/edit',
-          deleteBatch: '/sys/sysDepart/deleteBatch',
-          exportXlsUrl: "sys/sysDepart/exportXls",
-          importExcelUrl: "sys/sysDepart/importExcel",
-        },
-        orgCategoryDisabled:false,
+  },
+  methods: {
+    IsURL(res) {
+      //   var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/
+      var strRegex = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+(.+[A-Za-z0-9-~\/])+$/
+      var re = new RegExp(strRegex)
+      // console.log(re.test(res))
+      if (re.test(res)) {
+        return true
+      } else {
+        return false
       }
     },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    handleDeleteModel(record) {
+      if (record.model) {
+        if (this.IsURL(record.model)) {
+          window.open(record.model, '_blank')
+        }
       }
     },
-    methods: {
-      loadData() {
-        this.refresh();
-      },
-      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
-          }
-        })
-      },
-      setThisExpandedKeys(node) {
-        if (node.children && node.children.length > 0) {
-          this.iExpandedKeys.push(node.key)
-          for (let a = 0; a < node.children.length; a++) {
-            this.setThisExpandedKeys(node.children[a])
-          }
-        }
-      },
-      refresh() {
-        this.loading = true
-        this.loadTree()
-      },
-      // 右键操作方法
-      rightHandle(node) {
-        this.dropTrigger = 'contextmenu'
-        console.log(node.node.eventKey)
-        this.rightClickSelectedKey = node.node.eventKey
-        this.rightClickSelectedOrgCode = node.node.dataRef.orgCode
-      },
-      onExpand(expandedKeys) {
-        console.log('onExpand', expandedKeys)
-        // if not set autoExpandParent to false, if children expanded, parent can not collapse.
-        // or, you can remove all expanded children keys.
-        this.iExpandedKeys = expandedKeys
-        this.autoExpandParent = false
-      },
-      backFlowList() {
-        this.$router.back(-1)
-      },
-      // 右键点击下拉框改变事件
-      dropStatus(visible) {
-        if (visible == false) {
-          this.dropTrigger = ''
-        }
-      },
-      // 右键店家下拉关闭下拉框
-      closeDrop() {
-        this.dropTrigger = ''
-      },
-      addRootNode() {
-        this.$refs.nodeModal.add(this.currFlowId, '')
-      },
-      batchDel: function () {
-        console.log(this.checkedKeys)
-        if (this.checkedKeys.length <= 0) {
-          this.$message.warning('请选择一条记录!')
-        } else {
-          var ids = ''
-          for (var a = 0; a < this.checkedKeys.length; a++) {
-            ids += this.checkedKeys[a] + ','
-          }
-          var that = this
-          this.$confirm({
-            title: '确认删除',
-            content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
-            onOk: function () {
-              deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
-                if (res.success) {
-                  that.$message.success(res.message)
-                  that.loadTree()
-                  that.onClearSelected()
-                } else {
-                  that.$message.warning(res.message)
-                }
-              })
-            }
-          })
-        }
-      },
-      onSearch(value) {
-        let that = this
-        if (value) {
-          searchByKeywords({keyWord: value}).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)
-              }
-            } else {
-              that.$message.warning(res.message)
-            }
-          })
+    handleDeleteStatus(id, status) {
+      httpAction(
+        '/ctop/tagInfo/edit',
+        {
+          id: id,
+          status: status,
+        },
+        'post'
+      ).then((res) => {
+        if (res.success) {
+          //删除成功后,去除已选中中的数据
+          this.loadData(1)
         } else {
-          that.loadTree()
-        }
-
-      },
-      nodeModalOk() {
-        this.loadTree()
-      },
-      nodeModalClose() {
-      },
-      hide() {
-        console.log(111)
-        this.visible = false
-      },
-      onCheck(checkedKeys, info) {
-        console.log('onCheck', checkedKeys, info)
-        this.hiding = false
-        //this.checkedKeys = checkedKeys.checked
-        // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
-        if(this.checkStrictly){
-          this.checkedKeys = checkedKeys.checked;
-        }else{
-          this.checkedKeys = checkedKeys
+          this.$message.warning(res.message)
         }
-        // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
-      },
-      onSelect(selectedKeys, e) {
-        console.log('selected', selectedKeys, e)
-        this.hiding = false
-        let record = e.node.dataRef
-        console.log('onSelect-record', record)
-        this.currSelected = Object.assign({}, record)
-        this.model = this.currSelected
-        this.selectedKeys = [record.key]
-        this.model.parentId = record.parentId
-        this.setValuesToForm(record)
-        this.$refs.departAuth.show(record.id);
-
-      },
-      // 触发onSelect事件时,为部门树右侧的form表单赋值
-      setValuesToForm(record) {
-        if(record.orgCategory == '1'){
-          this.orgCategoryDisabled = true;
-        }else{
-          this.orgCategoryDisabled = false;
-        }
-        this.$nextTick(() => {
-          this.form.getFieldDecorator('fax', {initialValue: ''})
-          this.form.setFieldsValue(pick(record, 'departName','orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
-        })
-      },
-      getCurrSelectedTitle() {
-        return !this.currSelected.title ? '' : this.currSelected.title
-      },
-      onClearSelected() {
-        this.hiding = true
-        this.checkedKeys = []
-        this.currSelected = {}
-        this.form.resetFields()
-        this.selectedKeys = []
-        this.$refs.departAuth.departId = ''
-      },
-      handleNodeTypeChange(val) {
-        this.currSelected.nodeType = val
-      },
-      notifyTriggerTypeChange(value) {
-        this.currSelected.notifyTriggerType = value
-      },
-      receiptTriggerTypeChange(value) {
-        this.currSelected.receiptTriggerType = value
-      },
-      submitCurrForm() {
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            if (!this.currSelected.id) {
-              this.$message.warning('请点击选择要修改部门!')
-              return
-            }
-
-            let formData = Object.assign(this.currSelected, values)
-            console.log('Received values of form: ', formData)
-            httpAction(this.url.edit, formData, 'put').then((res) => {
-              if (res.success) {
-                this.$message.success('保存成功!')
-                this.loadTree()
-              } else {
-                this.$message.error(res.message)
-              }
-            })
-          }
-        })
-      },
-      emptyCurrForm() {
-        this.form.resetFields()
-      },
-      nodeSettingFormSubmit() {
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            console.log('Received values of form: ', values)
-          }
-        })
-      },
-      openSelect() {
-        this.$refs.sysDirectiveModal.show()
-      },
-      handleAdd(num) {
-        if (num == 1) {
-          this.$refs.departModal.add()
-          this.$refs.departModal.title = '新增'
-        } else if (num == 2) {
-          let key = this.currSelected.key
-          if (!key) {
-            this.$message.warning('请先点击选中上级部门!')
-            return false
-          }
-          this.$refs.departModal.add(this.selectedKeys)
-          this.$refs.departModal.title = '新增'
+      })
+    },
+    handleDeleteElse(id) {
+      httpAction(
+        '/ctop/tagInfo/edit',
+        {
+          id: id,
+          delFlag: 1,
+        },
+        'post'
+      ).then((res) => {
+        if (res.success) {
+          //删除成功后,去除已选中中的数据
+          this.loadData(1)
         } else {
-          this.$refs.departModal.add(this.rightClickSelectedKey)
-          this.$refs.departModal.title = '新增'
+          this.$message.warning('删除失败!')
         }
-      },
-      handleDelete() {
-        var that = this
-        this.$confirm({
-          title: '确认删除',
-          content: '确定要删除此部门以及子节点数据吗?',
-          onOk: function () {
-            deleteByDepartId({id: that.rightClickSelectedKey}).then((resp) => {
-              if (resp.success) {
-                //删除成功后,去除已选中中的数据
-                that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1);
-                that.$message.success('删除成功!')
-                that.loadTree()
-                //删除后同步清空右侧基本信息内容
-                let orgCode=that.form.getFieldValue("orgCode");
-                if(orgCode && orgCode === that.rightClickSelectedOrgCode){
-                  that.onClearSelected()
-                }
-              } else {
-                that.$message.warning('删除失败!')
-              }
-            })
-          }
-        })
-      },
-      selectDirectiveOk(record) {
-        console.log('选中指令数据', record)
-        this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode})
-        this.currSelected.sysCode = record.sysCode
-      },
-      getFlowGraphData(node) {
-        this.graphDatasource.nodes.push({
-          id: node.id,
-          text: node.flowNodeName
-        })
-        if (node.children.length > 0) {
-          for (let a = 0; a < node.children.length; a++) {
-            let temp = node.children[a]
-            this.graphDatasource.edges.push({
-              source: node.id,
-              target: temp.id
-            })
-            this.getFlowGraphData(temp)
-          }
-        }
-      },
-     // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
-      expandAll () {
-        this.iExpandedKeys = this.allTreeKeys
-      },
-      closeAll () {
-        this.iExpandedKeys = []
-      },
-      checkALL () {
-        this.checkStriccheckStrictlytly = false
-        this.checkedKeys = this.allTreeKeys
-      },
-      cancelCheckALL () {
-        //this.checkedKeys = this.defaultCheckedKeys
-        this.checkedKeys = []
-      },
-      switchCheckStrictly (v) {
-        if(v==1){
-          this.checkStrictly = false
-        }else if(v==2){
-          this.checkStrictly = true
-        }
-      },
-      getAllKeys(node) {
-        // console.log('node',node);
-        this.allTreeKeys.push(node.key)
-        if (node.children && node.children.length > 0) {
-          for (let a = 0; a < node.children.length; a++) {
-            this.getAllKeys(node.children[a])
-          }
-        }
-      }
-      // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
-      
+      })
     },
-    created() {
-      this.currFlowId = this.$route.params.id
-      this.currFlowName = this.$route.params.name
-      // this.loadTree()
+    handleAddSub(record) {
+      this.$refs.modalForm.title = '添加子标签'
+      this.$refs.modalForm.edit({
+        status: '1',
+        parentId: record.id,
+        tagCategoryId: record.tagCategoryId,
+      })
     },
-
-  }
+    handleExpandedRowsChange(expandedRows) {
+      this.expandedRowKeys = expandedRows
+    },
+  },
+}
 </script>
 <style scoped>
-  .ant-card-body .table-operator {
-    margin: 15px;
-  }
-
-  .anty-form-btn {
-    width: 100%;
-    text-align: center;
-  }
-
-  .anty-form-btn button {
-    margin: 0 5px;
-  }
-
-  .anty-node-layout .ant-layout-header {
-    padding-right: 0
-  }
-
-  .header {
-    padding: 0 8px;
-  }
-
-  .header button {
-    margin: 0 3px
-  }
-
-  .ant-modal-cust-warp {
-    height: 100%
-  }
-
-  .ant-modal-cust-warp .ant-modal-body {
-    height: calc(100% - 110px) !important;
-    overflow-y: auto
-  }
-
-  .ant-modal-cust-warp .ant-modal-content {
-    height: 90% !important;
-    overflow-y: hidden
-  }
-
-  #app .desktop {
-    height: auto !important;
-  }
-
-  /** Button按钮间距 */
-  .ant-btn {
-    margin-left: 3px
-  }
-
-  .drawer-bootom-button {
-    /*position: absolute;*/
-    bottom: 0;
-    width: 100%;
-    border-top: 1px solid #e8e8e8;
-    padding: 10px 16px;
-    text-align: left;
-    left: 0;
-    background: #fff;
-    border-radius: 0 0 2px 2px;
-  }
+@import '~@assets/less/common.less';
 </style>

+ 660 - 0
src/views/modules/material/labelNewMaterial.vue

@@ -0,0 +1,660 @@
+<template xmlns:background-color="http://www.w3.org/1999/xhtml">
+  <a-row :gutter="10">
+    <a-col :md="12" :sm="24">
+      <a-card :bordered="false">
+
+        <!-- 按钮操作区域 -->
+        <a-row style="margin-left: 14px">
+          <a-button @click="handleAdd(1)" type="primary">添加标签</a-button>
+          <a-button @click="handleAdd(2)" type="primary" style="margin-left: 14px">添加下级</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-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button> -->
+          <!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
+        </a-row>
+        <div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
+          <a-alert type="info" :showIcon="true">
+            <div slot="message">
+              当前选择:<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
+              <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">取消选择</a>
+            </div>
+          </a-alert>
+          <a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入标签名称" />
+          <!-- {{departValue}}
+          <el-cascader placeholder="试试搜索:指南" :options="departTree"
+            :props="{ multiple: true,value:'id',label:'tagName',emitPath:false}" filterable v-model="departValue">
+          </el-cascader> -->
+          <!-- 树-->
+          <a-col :md="10" :sm="24">
+            <template>
+              <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
+                <span>
+                  <a-tree  @select="onSelect" @check="onCheck" @rightClick="rightHandle"
+                    :selectedKeys="selectedKeys" :checkedKeys="checkedKeys" :treeData="departTree"
+                    :checkStrictly="checkStrictly" :expandedKeys="iExpandedKeys" :autoExpandParent="autoExpandParent"
+                    @expand="onExpand" />
+                </span>
+                <!--新增右键点击事件,和增加添加和删除功能-->
+                <a-menu slot="overlay">
+                  <a-menu-item @click="handleAdd(3)" key="1">添加</a-menu-item>
+                  <a-menu-item @click="handleDelete" key="2">删除</a-menu-item>
+                  <a-menu-item @click="closeDrop" key="3">取消</a-menu-item>
+                </a-menu>
+              </a-dropdown>
+            </template>
+          </a-col>
+        </div>
+      </a-card>
+      <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+      <div class="drawer-bootom-button">
+        <a-dropdown :trigger="['click']" placement="topCenter">
+          <a-menu slot="overlay">
+            <a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>
+            <a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>
+            <a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item>
+            <a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item>
+            <a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
+            <a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
+          </a-menu>
+          <a-button>
+            树操作
+            <a-icon type="up" />
+          </a-button>
+        </a-dropdown>
+      </div>
+      <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+    </a-col>
+    <a-col :md="12" :sm="24">
+      <a-tabs defaultActiveKey="1">
+        <a-tab-pane tab="基本信息" key="1">
+          <a-card :bordered="false" v-if="selectedKeys.length>0">
+            <a-form :form="form">
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="标签名称">
+                <a-input placeholder="请输入标签名称" v-decorator="['tagName', validatorRules.departName ]" />
+              </a-form-item>
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级标签">
+                <a-tree-select style="width:100%" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
+                  :treeData="treeData" :disabled="disable" v-model="model.parentId" placeholder="无">
+                </a-tree-select>
+              </a-form-item>
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="标签描述">
+                <a-input placeholder="请输入标签描述" v-decorator="['description' ]" />
+              </a-form-item>
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="标签编码">
+                <a-input disabled placeholder="请输入标签编码" v-decorator="['tagCode', validatorRules.orgCode ]" />
+              </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="submitCurrForm" type="primary" htmlType="button" icon="form">保存</a-button>
+            </div>
+          </a-card>
+          <a-card v-else>
+            <a-empty>
+              <span slot="description"> 请先选择一个标签! </span>
+            </a-empty>
+          </a-card>
+        </a-tab-pane>
+      </a-tabs>
+
+    </a-col>
+    <depart-modal ref="departModal" @ok="loadTree"></depart-modal>
+  </a-row>
+</template>
+<script>
+  import DepartModal from './modules/DepartModal'
+  import pick from 'lodash.pick'
+  import {
+    queryDepartTreeList,
+    searchByKeywords,
+    deleteByDepartId
+  } from '@/api/api'
+  import {
+    httpAction,
+    deleteAction,
+    getAction
+  } from '@/api/manage'
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  // 表头
+  const columns = [{
+      title: '机构名称',
+      dataIndex: 'departName'
+    },
+    {
+      title: '机构类型',
+      align: 'center',
+      dataIndex: 'orgType'
+    },
+    {
+      title: '机构编码',
+      dataIndex: 'orgCode',
+    },
+    {
+      title: '手机号',
+      dataIndex: 'mobile'
+    },
+    {
+      title: '传真',
+      dataIndex: 'fax'
+    },
+    {
+      title: '地址',
+      dataIndex: 'address'
+    },
+    {
+      title: '排序',
+      align: 'center',
+      dataIndex: 'departOrder'
+    },
+    {
+      title: '操作',
+      align: 'center',
+      dataIndex: 'action',
+      scopedSlots: {
+        customRender: 'action'
+      }
+    }
+  ]
+  export default {
+    name: 'DepartList',
+    mixins: [JeecgListMixin],
+    components: {
+      DepartModal
+    },
+    data() {
+      return {
+        departValue: [],
+        iExpandedKeys: [],
+        loading: false,
+        autoExpandParent: true,
+        currFlowId: '',
+        currFlowName: '',
+        disable: true,
+        treeData: [],
+        visible: false,
+        departTree: [],
+        rightClickSelectedKey: '',
+        rightClickSelectedOrgCode: '',
+        hiding: true,
+        model: {},
+        dropTrigger: '',
+        depart: {},
+        columns: columns,
+        disableSubmit: false,
+        checkedKeys: [],
+        selectedKeys: [],
+        autoIncr: 1,
+        currSelected: {},
+
+        allTreeKeys: [],
+        checkStrictly: true,
+
+        form: this.$form.createForm(this),
+        labelCol: {
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 5
+          }
+        },
+        wrapperCol: {
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 16
+          }
+        },
+        graphDatasource: {
+          nodes: [],
+          edges: []
+        },
+        validatorRules: {
+          departName: {
+            rules: [{
+              required: true,
+              message: '请输入机构/部门名称!'
+            }]
+          },
+          orgCode: {
+            rules: [{
+              required: true,
+              message: '请输入机构编码!'
+            }]
+          },
+          orgCategory: {
+            rules: [{
+              required: true,
+              message: '请输入机构类型!'
+            }]
+          },
+          mobile: {
+            rules: [{
+              validator: this.validateMobile
+            }]
+          }
+        },
+        url: {
+          delete: '/ctop/tagInfo/edit',
+          edit: '/ctop/tagInfo/edit',
+          deleteBatch: '/sys/sysDepart/deleteBatch',
+          exportXlsUrl: "sys/sysDepart/exportXls",
+          importExcelUrl: "sys/sysDepart/importExcel",
+        },
+        orgCategoryDisabled: false,
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      loadData() {
+        this.refresh();
+      },
+      loadTree() {
+        var that = this
+        that.treeData = []
+        that.departTree = []
+        getAction('/ctop/tagInfo/queryTreeList').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
+          }
+        })
+      },
+      setThisExpandedKeys(node) {
+        if (node.children && node.children.length > 0) {
+          this.iExpandedKeys.push(node.key)
+          for (let a = 0; a < node.children.length; a++) {
+            this.setThisExpandedKeys(node.children[a])
+          }
+        }
+      },
+      refresh() {
+        this.loading = true
+        this.loadTree()
+      },
+      // 右键操作方法
+      rightHandle(node) {
+        this.dropTrigger = 'contextmenu'
+        console.log(node.node.eventKey)
+        this.rightClickSelectedKey = node.node.eventKey
+        this.rightClickSelectedOrgCode = node.node.dataRef.orgCode
+      },
+      onExpand(expandedKeys) {
+        console.log('onExpand', expandedKeys)
+        // if not set autoExpandParent to false, if children expanded, parent can not collapse.
+        // or, you can remove all expanded children keys.
+        this.iExpandedKeys = expandedKeys
+        this.autoExpandParent = false
+      },
+      backFlowList() {
+        this.$router.back(-1)
+      },
+      // 右键点击下拉框改变事件
+      dropStatus(visible) {
+        if (visible == false) {
+          this.dropTrigger = ''
+        }
+      },
+      // 右键店家下拉关闭下拉框
+      closeDrop() {
+        this.dropTrigger = ''
+      },
+      addRootNode() {
+        this.$refs.nodeModal.add(this.currFlowId, '')
+      },
+      batchDel: function () {
+        console.log(this.checkedKeys)
+        if (this.checkedKeys.length <= 0) {
+          this.$message.warning('请选择一条记录!')
+        } else {
+          var ids = ''
+          for (var a = 0; a < this.checkedKeys.length; a++) {
+            ids += this.checkedKeys[a] + ','
+          }
+          var that = this
+          this.$confirm({
+            title: '确认删除',
+            content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
+            onOk: function () {
+              deleteAction(that.url.deleteBatch, {
+                ids: ids
+              }).then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message)
+                  that.loadTree()
+                  that.onClearSelected()
+                } else {
+                  that.$message.warning(res.message)
+                }
+              })
+            }
+          })
+        }
+      },
+      onSearch(value) {
+        let that = this
+        if (value) {
+          searchByKeywords({
+            keyWord: value
+          }).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)
+              }
+            } else {
+              that.$message.warning(res.message)
+            }
+          })
+        } else {
+          that.loadTree()
+        }
+
+      },
+      nodeModalOk() {
+        this.loadTree()
+      },
+      nodeModalClose() {},
+      hide() {
+        console.log(111)
+        this.visible = false
+      },
+      onCheck(checkedKeys, info) {
+        console.log('onCheck', checkedKeys, info)
+        this.hiding = false
+        //this.checkedKeys = checkedKeys.checked
+        // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+        if (this.checkStrictly) {
+          this.checkedKeys = checkedKeys.checked;
+        } else {
+          this.checkedKeys = checkedKeys
+        }
+        // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+      },
+      onSelect(selectedKeys, e) {
+        console.log('selected', selectedKeys, e)
+        this.hiding = false
+        let record = e.node.dataRef
+        console.log('onSelect-record', record)
+        this.currSelected = Object.assign({}, record)
+        this.model = this.currSelected
+        this.selectedKeys = [record.key]
+        this.model.parentId = record.parentId
+        this.setValuesToForm(record)
+
+      },
+      // 触发onSelect事件时,为部门树右侧的form表单赋值
+      setValuesToForm(record) {
+        // if (record.orgCategory == '1') {
+        //   this.orgCategoryDisabled = true;
+        // } else {
+        //   this.orgCategoryDisabled = false;
+        // }
+        console.log(record)
+        this.$nextTick(() => {
+          //   this.form.getFieldDecorator('fax', {
+          //     initialValue: ''
+          //   })
+
+          //   this.form.setFieldsValue(pick(dataJson, ['appId', 'urlType', 'url', 'dayBudget', 'speed',
+          //     'showMode'
+          //   ]))
+          this.form.setFieldsValue(pick(record, ['tagName', 'tagCode', 'description']))
+        })
+      },
+      getCurrSelectedTitle() {
+        return !this.currSelected.title ? '' : this.currSelected.title
+      },
+      onClearSelected() {
+        this.hiding = true
+        this.checkedKeys = []
+        this.currSelected = {}
+        this.form.resetFields()
+        this.selectedKeys = []
+      },
+      handleNodeTypeChange(val) {
+        this.currSelected.nodeType = val
+      },
+      notifyTriggerTypeChange(value) {
+        this.currSelected.notifyTriggerType = value
+      },
+      receiptTriggerTypeChange(value) {
+        this.currSelected.receiptTriggerType = value
+      },
+      submitCurrForm() {
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            if (!this.currSelected.id) {
+              this.$message.warning('请点击选择要修改部门!')
+              return
+            }
+
+            let formData = Object.assign(this.currSelected, values)
+            console.log('Received values of form: ', formData)
+            httpAction(this.url.edit, formData, 'post').then((res) => {
+              if (res.success) {
+                this.$message.success('保存成功!')
+                this.loadTree()
+              } else {
+                this.$message.error(res.message)
+              }
+            })
+          }
+        })
+      },
+      emptyCurrForm() {
+        this.form.resetFields()
+      },
+      nodeSettingFormSubmit() {
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            console.log('Received values of form: ', values)
+          }
+        })
+      },
+      openSelect() {
+        this.$refs.sysDirectiveModal.show()
+      },
+      handleAdd(num) {
+        console.log(this.currSelected)
+        if (num == 1) {
+          this.$refs.departModal.add()
+          this.$refs.departModal.title = '新增'
+        } else if (num == 2) {
+          if (this.currSelected.level == 3) {
+            this.$message.warning('标签最多只能存在三级')
+          } else {
+            let key = this.currSelected.key
+            if (!key) {
+              this.$message.warning('请先点击选中上级标签!')
+              return false
+            }
+            this.$refs.departModal.add(this.selectedKeys)
+            this.$refs.departModal.title = '新增'
+          }
+
+        } else {
+          this.$refs.departModal.add(this.rightClickSelectedKey)
+          this.$refs.departModal.title = '新增'
+        }
+      },
+      handleDelete() {
+        var that = this
+        this.$confirm({
+          title: '确认删除',
+          content: '确定要删除此标签以及子节点数据吗?',
+          onOk: function () {
+            httpAction('/ctop/tagInfo/edit', {
+              id: that.rightClickSelectedKey,
+              delFlag: 1
+            }, 'post').then(res => {
+              if (res.success) {
+                //删除成功后,去除已选中中的数据
+                that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey),
+                  1);
+                that.$message.success('删除成功!')
+                that.loadTree()
+                //删除后同步清空右侧基本信息内容
+                let orgCode = that.form.getFieldValue("orgCode");
+                if (orgCode && orgCode === that.rightClickSelectedOrgCode) {
+                  that.onClearSelected()
+                }
+              } else {
+                that.$message.warning('删除失败!')
+              }
+            })
+            // deleteByDepartId({
+            //   id: that.rightClickSelectedKey
+            // }).then((resp) => {
+
+            // })
+          }
+        })
+      },
+      selectDirectiveOk(record) {
+        console.log('选中指令数据', record)
+        this.nodeSettingForm.setFieldsValue({
+          directiveCode: record.directiveCode
+        })
+        this.currSelected.sysCode = record.sysCode
+      },
+      getFlowGraphData(node) {
+        this.graphDatasource.nodes.push({
+          id: node.id,
+          text: node.flowNodeName
+        })
+        if (node.children.length > 0) {
+          for (let a = 0; a < node.children.length; a++) {
+            let temp = node.children[a]
+            this.graphDatasource.edges.push({
+              source: node.id,
+              target: temp.id
+            })
+            this.getFlowGraphData(temp)
+          }
+        }
+      },
+      // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+      expandAll() {
+        this.iExpandedKeys = this.allTreeKeys
+      },
+      closeAll() {
+        this.iExpandedKeys = []
+      },
+      checkALL() {
+        this.checkStriccheckStrictlytly = false
+        this.checkedKeys = this.allTreeKeys
+      },
+      cancelCheckALL() {
+        //this.checkedKeys = this.defaultCheckedKeys
+        this.checkedKeys = []
+      },
+      switchCheckStrictly(v) {
+        if (v == 1) {
+          this.checkStrictly = false
+        } else if (v == 2) {
+          this.checkStrictly = true
+        }
+      },
+      getAllKeys(node) {
+        // console.log('node',node);
+        this.allTreeKeys.push(node.key)
+        if (node.children && node.children.length > 0) {
+          for (let a = 0; a < node.children.length; a++) {
+            this.getAllKeys(node.children[a])
+          }
+        }
+      }
+      // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+
+    },
+    created() {
+      this.currFlowId = this.$route.params.id
+      this.currFlowName = this.$route.params.name
+      // this.loadTree()
+    },
+
+  }
+</script>
+<style scoped>
+  .ant-card-body .table-operator {
+    margin: 15px;
+  }
+
+  .anty-form-btn {
+    width: 100%;
+    text-align: center;
+  }
+
+  .anty-form-btn button {
+    margin: 0 5px;
+  }
+
+  .anty-node-layout .ant-layout-header {
+    padding-right: 0
+  }
+
+  .header {
+    padding: 0 8px;
+  }
+
+  .header button {
+    margin: 0 3px
+  }
+
+  .ant-modal-cust-warp {
+    height: 100%
+  }
+
+  .ant-modal-cust-warp .ant-modal-body {
+    height: calc(100% - 110px) !important;
+    overflow-y: auto
+  }
+
+  .ant-modal-cust-warp .ant-modal-content {
+    height: 90% !important;
+    overflow-y: hidden
+  }
+
+  #app .desktop {
+    height: auto !important;
+  }
+
+  /** Button按钮间距 */
+  .ant-btn {
+    margin-left: 3px
+  }
+
+  .drawer-bootom-button {
+    /*position: absolute;*/
+    bottom: 0;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: left;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 8 - 5
src/views/modules/material/materialList.vue

@@ -413,7 +413,7 @@ import { getAction, postAction, postFile, downFile, downFilePost, deleteAction,
 import { mapGetters } from 'vuex'
 import moment from 'moment'
 
-import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
 
 import BMF from 'browser-md5-file'
 
@@ -766,11 +766,14 @@ export default {
     },
     getList(value) {
       if (value) {
-        this.mediaId = this.dataElse.filter(item => {
-          if (value == item.projectId) {
-            return item
+       getAction('/ctop/projectMember/participateListV2', {
+          userId: this.userInfo().id,
+          projectId: value,
+        }).then((res) => {
+          if (res.code == 0) {
+            this.mediaId = res.result.records[0].mediaId
           }
-        })[0].mediaId
+        })
       }
 
       this.loadData()

+ 0 - 188
src/views/modules/material/modules/DepartAuthModal.vue

@@ -1,188 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <template v-if="this.departId">
-      <a-form>
-        <a-form-item label='所拥有的权限'>
-          <a-tree
-            checkable
-            @check="onCheck"
-            :checkedKeys="checkedKeys"
-            :treeData="treeData"
-            @expand="onExpand"
-            @select="onTreeNodeSelect"
-            :selectedKeys="selectedKeys"
-            :expandedKeys="expandedKeysss"
-            :checkStrictly="checkStrictly"
-            style="height:500px;overflow: auto;">
-            <span slot="hasDatarule" slot-scope="{slotTitle,ruleFlag}">
-              {{ slotTitle }}
-              <a-icon v-if="ruleFlag" type="align-left" style="margin-left:5px;color: red;"></a-icon>
-            </span>
-          </a-tree>
-        </a-form-item>
-      </a-form>
-      <div class="anty-form-btn">
-        <a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
-          <a-menu slot="overlay">
-            <!-- 简化Tree逻辑,使用默认checkStrictly为false的行为,即默认父子关联
-            <a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>
-            <a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>
-            -->
-            <a-menu-item key="3" @click="checkALL">全部勾选</a-menu-item>
-            <a-menu-item key="4" @click="cancelCheckALL">取消全选</a-menu-item>
-            <a-menu-item key="5" @click="expandAll">展开所有</a-menu-item>
-            <a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
-          </a-menu>
-          <a-button>
-            树操作 <a-icon type="up" />
-          </a-button>
-        </a-dropdown>
-        <a-button style="float: right" @click="handleSubmit" type="primary" htmlType="button" icon="form">保存</a-button>
-      </div>
-    </template>
-    <a-card v-else :bordered="false" style="height:200px">
-      <a-empty>
-        <span slot="description"> 请先选择一个部门! </span>
-      </a-empty>
-    </a-card>
-    <depart-datarule-modal ref="datarule"/>
-  </a-card>
-</template>
-
-<script>
-  import {queryTreeListForRole,queryDepartPermission,saveDepartPermission} from '@/api/api'
-  import DepartDataruleModal from './DepartDataruleModal'
-
-  export default {
-    name: 'DepartAuthModal',
-    components: { DepartDataruleModal },
-    data(){
-      return {
-        departId:"",
-        treeData: [],
-        defaultCheckedKeys:[],
-        checkedKeys:[],
-        halfCheckedKeys:[],
-        expandedKeysss:[],
-        allTreeKeys:[],
-        autoExpandParent: true,
-        checkStrictly: false,
-        title:"部门权限配置",
-        visible: false,
-        loading: false,
-        selectedKeys:[]
-      }
-    },
-    methods: {
-      onTreeNodeSelect(id){
-        if(id && id.length>0){
-          this.selectedKeys = id
-        }
-        this.$refs.datarule.show(this.selectedKeys[0],this.departId)
-      },
-      onCheck (checkedKeys, { halfCheckedKeys }) {
-        // 保存选中的和半选中的,后面保存的时候合并提交
-        this.checkedKeys = checkedKeys
-        this.halfCheckedKeys = halfCheckedKeys
-      },
-      show(departId){
-        this.departId=departId
-        this.loadData();
-      },
-      close () {
-        this.reset()
-        this.$emit('close');
-        this.visible = false;
-      },
-      onExpand(expandedKeys){
-        this.expandedKeysss = expandedKeys;
-        this.autoExpandParent = false
-      },
-      reset () {
-        this.expandedKeysss = []
-        this.checkedKeys = []
-        this.defaultCheckedKeys = []
-        this.loading = false
-      },
-      expandAll () {
-        this.expandedKeysss = this.allTreeKeys
-      },
-      closeAll () {
-        this.expandedKeysss = []
-      },
-      checkALL () {
-        this.checkedKeys = this.allTreeKeys
-      },
-      cancelCheckALL () {
-        this.checkedKeys = []
-      },
-      handleCancel () {
-        this.close()
-      },
-      handleSubmit() {
-        let that = this;
-        if(!that.departId){
-          this.$message.warning('请点击选择一个部门!')
-        }
-        let checkedKeys = [...that.checkedKeys, ...that.halfCheckedKeys]
-        const permissionIds = checkedKeys.join(",")
-        let params =  {
-          departId:that.departId,
-          permissionIds,
-          lastpermissionIds:that.defaultCheckedKeys.join(","),
-        };
-        that.loading = true;
-        saveDepartPermission(params).then((res)=>{
-          if(res.success){
-            that.$message.success(res.message);
-            that.loading = false;
-            that.loadData();
-          }else {
-            that.$message.error(res.message);
-            that.loading = false;
-          }
-        })
-      },
-      convertTreeListToKeyLeafPairs(treeList, keyLeafPair = []) {
-        for(const {key, isLeaf, children} of treeList) {
-          keyLeafPair.push({key, isLeaf})
-          if(children && children.length > 0) {
-            this.convertTreeListToKeyLeafPairs(children, keyLeafPair)
-          }
-        }
-        return keyLeafPair;
-      },
-      emptyCurrForm() {
-        this.form.resetFields()
-      },
-      loadData(){
-        queryTreeListForRole().then((res) => {
-          this.treeData = res.result.treeList
-          this.allTreeKeys = res.result.ids
-          const keyLeafPairs = this.convertTreeListToKeyLeafPairs(this.treeData)
-          queryDepartPermission({departId:this.departId}).then((res)=>{
-            // 过滤出 leaf node 即可,即选中的
-            // Tree组件中checkStrictly默认为false的时候,选中子节点,父节点会自动设置选中或半选中
-            // 保存 checkedKeys 以及 halfCheckedKeys 以便于未做任何操作时提交表单数据
-            const checkedKeys = [...res.result].filter(key => {
-              const keyLeafPair = keyLeafPairs.filter(item => item.key === key)[0]
-              return keyLeafPair && keyLeafPair.isLeaf
-            })
-            const halfCheckedKeys = [...res.result].filter(key => {
-              const keyLeafPair = keyLeafPairs.filter(item => item.key === key)[0]
-              return keyLeafPair && !keyLeafPair.isLeaf
-            })
-            this.checkedKeys = [...checkedKeys];
-            this.halfCheckedKeys = [...halfCheckedKeys]
-            this.defaultCheckedKeys = [...halfCheckedKeys, ...checkedKeys];
-            this.expandedKeysss = this.allTreeKeys;
-          })
-        })
-      }
-    },
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 107 - 136
src/views/modules/material/modules/DepartModal.vue

@@ -1,86 +1,29 @@
 <template>
-  <a-modal
-    :title="title"
-    :width="800"
-    :ok=false
-    :visible="visible"
-    :confirmLoading="confirmLoading"
-    :okButtonProps="{ props: {disabled: disableSubmit} }"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    cancelText="关闭">
-
+  <a-modal :title="title" :width="800" :ok=false :visible="visible" :confirmLoading="confirmLoading"
+    :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" 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>
-        <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-form-item>
-        <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>
-          </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>
-          </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="标签分类" :hidden="false" hasFeedback>
+          <a-select v-decorator="['tagCategoryId', {rules: [{ required: true, message: '请选择标签分类'}]} ]"
+            placeholder="请选择">
+            <a-select-option :value="1">形式</a-select-option>
+            <a-select-option :value="2">基调</a-select-option>
+            <a-select-option :value="3">内容</a-select-option>
+            <a-select-option :value="4">场景</a-select-option>
+          </a-select>
         </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="标签名称" :hidden="false" hasFeedback>
+          <a-input id="tagName" placeholder="请输入标签名称" v-decorator="['tagName', validatorRules.departName ]" />
         </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="请输入标签编码,以字母加数字拼接,如A001" v-decorator="['tagCode',validatorRules.orgCode]" :maxLength="4" />
         </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 placeholder="请输入标签描述" v-decorator="['description']" />
         </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-input placeholder="请输入标签示例" v-decorator="['model']" />
         </a-form-item>
 
       </a-form>
@@ -89,56 +32,90 @@
 </template>
 
 <script>
-  import { httpAction } from '@/api/manage'
-  import { queryIdTree } from '@/api/api'
+  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 () {
+    components: {
+      ATextarea
+    },
+    data() {
       return {
-        departTree:[],
-        orgTypeData:[],
-        phoneWarning:'',
-        departName:"",
-        title:"操作",
-        seen:false,
+        departTree: [],
+        orgTypeData: [],
+        phoneWarning: '',
+        departName: "",
+        title: "操作",
+        seen: false,
         visible: false,
-        condition:true,
-        disableSubmit:false,
+        condition: true,
+        disableSubmit: false,
         model: {},
-        menuhidden:false,
-        menuusing:true,
+        menuhidden: false,
+        menuusing: true,
         labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
+          xs: {
+            span: 24
+          },
+          sm: {
+            span: 5
+          },
         },
         wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
+          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}]}
+        validatorRules: {
+          departName: {
+            rules: [{
+              required: true,
+              message: '请输入标签名称!'
+            }]
+          },
+          orgCode: {
+            rules: [{
+              required: true,
+              message: '请输入标签编码!'
+            }], validator: this.validate
+          },
+          mobile: {
+            rules: [{
+              validator: this.validateMobile
+            }]
+          }
         },
         url: {
-          add: "/sys/sysDepart/add",
+          add: "/ctop/tagInfo/add",
         },
-        dictDisabled:true,
+        dictDisabled: true,
       }
     },
-    created () {
-    },
+    created() {},
     methods: {
-      loadTreeData(){
+      validate(rule, value, callback) {
+        const regex = /^http(.*)$/
+        if (!regex.test(value)) {
+          callback('需要以 http 开头')
+        }
+        callback()
+      },
+      loadTreeData() {
         var that = this;
-        queryIdTree().then((res)=>{
-          if(res.success){
+        queryIdTree().then((res) => {
+          if (res.success) {
             that.departTree = [];
             for (let i = 0; i < res.result.length; i++) {
               let temp = res.result[i];
@@ -148,37 +125,31 @@
 
         })
       },
-      add (depart) {
-        if(depart){
-          this.seen = false;
-          this.dictDisabled = false;
-        }else{
-          this.seen = true;
-          this.dictDisabled = true;
-        }
+      add(depart) {
         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'))
-          });
+      edit(record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, {});
+        this.visible = true;
+        // this.loadTreeData();
+        this.model = record
+        console.log(this.model)
+        //   if(this.seen){
+        //     this.model.orgCategory = '1';
+        //   }else{
+        //     this.model.orgCategory = '2';
+        //   }
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model, 'tagCategoryId'))
+        });
       },
-      close () {
+      close() {
         this.$emit('close');
         this.disableSubmit = false;
         this.visible = false;
       },
-      handleOk () {
+      handleOk() {
         const that = this;
         // 触发表单验证
         this.form.validateFields((err, values) => {
@@ -187,12 +158,12 @@
             let formData = Object.assign(this.model, values);
             //时间格式化
             console.log(formData)
-            httpAction(this.url.add,formData,"post").then((res)=>{
-              if(res.success){
+            httpAction(this.url.add, formData, "post").then((res) => {
+              if (res.success) {
                 that.$message.success(res.message);
                 that.loadTreeData();
                 that.$emit('ok');
-              }else{
+              } else {
                 that.$message.warning(res.message);
               }
             }).finally(() => {
@@ -203,13 +174,13 @@
           }
         })
       },
-      handleCancel () {
+      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)){
+      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{
+        } else {
           callback("您的手机号码格式不正确!");
         }
 

+ 415 - 0
src/views/modules/material/modules/labelModal.vue

@@ -0,0 +1,415 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="drawerWidth"
+    @close="handleCancel"
+    :visible="visible"
+    :confirmLoading="confirmLoading">
+
+    <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+
+        <a-form-item label="菜单类型" :labelCol="labelCol" :wrapperCol="wrapperCol" >
+          <a-radio-group @change="onChangeMenuType" v-decorator="['menuType',{'initialValue':localMenuType}]">
+            <a-radio :value="0">一级菜单</a-radio>
+            <a-radio :value="1">子菜单</a-radio>
+            <a-radio :value="2">按钮/权限</a-radio>
+          </a-radio-group>
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          :label="menuLabel"
+          hasFeedback >
+          <a-input placeholder="请输入菜单名称" v-decorator="[ 'name', validatorRules.name]" :readOnly="disableSubmit"/>
+        </a-form-item>
+
+
+        <a-form-item
+          v-show="localMenuType!=0"
+          label="上级菜单"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          :validate-status="validateStatus"
+          :hasFeedback="true"
+          :required="true">
+          <span slot="help">{{ validateStatus=='error'?'请选择上级菜单':'&nbsp;&nbsp;' }}</span>
+          <a-tree-select
+            style="width:100%"
+            :dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
+            :treeData="treeData"
+            v-model="model.parentId"
+            placeholder="请选择父级菜单"
+            :disabled="disableSubmit"
+            @change="handleParentIdChange">
+          </a-tree-select>
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="菜单路径">
+          <a-input placeholder="请输入菜单路径" v-decorator="[ 'url',validatorRules.url]" :readOnly="disableSubmit"/>
+        </a-form-item>
+
+        <a-form-item
+          v-show="show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="前端组件">
+          <a-input placeholder="请输入前端组件" v-decorator="[ 'component',validatorRules.component]" :readOnly="disableSubmit"/>
+        </a-form-item>
+
+        <a-form-item
+          v-show="localMenuType==0"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="默认跳转地址">
+          <a-input placeholder="请输入路由参数 redirect" v-decorator="[ 'redirect',{}]" :readOnly="disableSubmit"/>
+        </a-form-item>
+
+        <a-form-item
+          v-show="!show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="授权标识">
+          <a-input placeholder="多个用逗号分隔, 如: user:list,user:create" v-decorator="[ 'perms', {rules:[{ required: false, message: '请输入授权标识!' },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
+        </a-form-item>
+
+        <a-form-item
+          v-show="!show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="授权策略">
+          <j-dict-select-tag  v-decorator="['permsType', {}]" placeholder="请选择授权策略" :type="'radio'" :triggerChange="true" dictCode="global_perms_type"/>
+
+
+        </a-form-item>
+        <a-form-item
+          v-show="!show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="状态">
+          <j-dict-select-tag  v-decorator="['status', {}]" placeholder="请选择状态" :type="'radio'" :triggerChange="true" dictCode="valid_status"/>
+
+        </a-form-item>
+
+
+        <a-form-item
+          v-show="show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="排序">
+          <a-input-number placeholder="请输入菜单排序" style="width: 200px" v-decorator="[ 'sortNo',validatorRules.sortNo]" :readOnly="disableSubmit"/>
+        </a-form-item>
+
+        <a-form-item
+          v-show="show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="是否路由菜单">
+          <a-switch checkedChildren="是" unCheckedChildren="否" v-model="routeSwitch"/>
+        </a-form-item>
+
+        <a-form-item
+          v-show="show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="隐藏路由">
+          <a-switch checkedChildren="是" unCheckedChildren="否" v-model="menuHidden"/>
+        </a-form-item>
+
+        <a-form-item
+          v-show="show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="是否缓存路由">
+          <a-switch checkedChildren="是" unCheckedChildren="否" v-model="isKeepalive"/>
+        </a-form-item>
+
+
+        <a-form-item
+          v-show="show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="聚合路由">
+          <a-switch checkedChildren="是" unCheckedChildren="否" v-model="alwaysShow"/>
+        </a-form-item>
+
+        <!--update_begin author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
+        <a-form-item
+          v-show="show"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="打开方式">
+          <a-switch checkedChildren="外部" unCheckedChildren="内部" v-model="internalOrExternal"/>
+        </a-form-item>
+        <!--update_end author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
+
+
+      </a-form>
+
+      <!-- 选择图标 -->
+    </a-spin>
+      <a-row :style="{textAlign:'right'}">
+        <a-button :style="{marginRight: '8px'}" @click="handleCancel">
+          关闭
+        </a-button>
+        <a-button :disabled="disableSubmit" @click="handleOk" type="primary">确定</a-button>
+      </a-row>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+  import {addPermission,editPermission,queryTreeList, duplicateCheck} from '@/api/api'
+  import pick from 'lodash.pick'
+
+  export default {
+    name: "PermissionModal",
+    data () {
+      return {
+        drawerWidth:700,
+        treeData:[],
+        treeValue: '0-0-4',
+        title:"操作",
+        visible: false,
+        disableSubmit:false,
+        model: {},
+        localMenuType:0,
+        alwaysShow:false,//表单元素-聚合路由
+        menuHidden:false,//表单元素-隐藏路由
+        routeSwitch:true, //是否路由菜单
+        /*update_begin author:wuxianquan date:20190908 for:定义变量,初始值代表内部打开*/
+        internalOrExternal:false,//菜单打开方式
+        /*update_end author:wuxianquan date:20190908 for:定义变量,初始值代表内部打开*/
+        isKeepalive:true, //是否缓存路由
+        show:true,//根据菜单类型,动态显示隐藏表单元素
+        menuLabel:'菜单名称',
+        isRequrie:true,  // 是否需要验证
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+
+        iconChooseVisible: false,
+        validateStatus:""
+      }
+    },
+    computed:{
+      validatorRules:function() {
+        return {
+          name:{rules: [{ required: true, message: '请输入菜单标题!' }]},
+          component:{rules: [{ required: this.show, message: '请输入前端组件!' }]},
+          url:{rules: [{ required: this.show, message: '请输入菜单路径!' }]},
+          permsType:{rules: [{ required: true, message: '请输入授权策略!' }]},
+          sortNo:{initialValue:1.0},
+        }
+      }
+    },
+    created () {
+      this.initDictConfig();
+    },
+    methods: {
+      loadTree(){
+        var that = this;
+        queryTreeList().then((res)=>{
+          if(res.success){
+            console.log('----queryTreeList---')
+            console.log(res)
+            that.treeData = [];
+            let treeList = res.result.treeList
+            for(let a=0;a<treeList.length;a++){
+              let temp = treeList[a];
+              temp.isLeaf = temp.leaf;
+              that.treeData.push(temp);
+            }
+          }
+        });
+      },
+      add () {
+        // 默认值
+        this.edit({status:'1',permsType:'1',route:true});
+      },
+      edit (record) {
+        this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        //--------------------------------------------------------------------------------------------------
+        //根据菜单类型,动态展示页面字段
+        console.log(record)
+        this.alwaysShow = !record.alwaysShow?false:true;
+        this.menuHidden = !record.hidden?false:true;
+
+        if(record.route!=null){
+          this.routeSwitch = record.route?true:false;
+        }
+
+        if(record.keepAlive!=null){
+          this.isKeepalive = record.keepAlive?true:false;
+        }else{
+          this.isKeepalive = false; // 升级兼容 如果没有(后台没有传过来、或者是新建)默认为false
+        }
+
+        /*update_begin author:wuxianquan date:20190908 for:编辑初始化数据*/
+        if(record.internalOrExternal!=null){
+          this.internalOrExternal = record.internalOrExternal?true:false;
+        }else{
+          this.internalOrExternal = false;
+        }
+        /*update_end author:wuxianquan date:20190908 for:编辑初始化数据*/
+
+
+        //console.log('record.menuType', record.menuType);
+        this.show = record.menuType==2?false:true;
+        this.menuLabel = record.menuType==2?'按钮/权限':'菜单名称';
+
+        if(this.model.parentId){
+          this.localMenuType = 1;
+        }else{
+          this.localMenuType = 0;
+        }
+        //----------------------------------------------------------------------------------------------
+
+        this.visible = true;
+        this.loadTree();
+        let fieldsVal = pick(this.model,'name','perms','permsType','component','url','sortNo','menuType','status');
+        this.$nextTick(() => {
+          this.form.setFieldsValue(fieldsVal)
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.disableSubmit = false;
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            this.model.alwaysShow = this.alwaysShow;
+            this.model.hidden = this.menuHidden;
+            this.model.route = this.routeSwitch;
+            this.model.keepAlive = this.isKeepalive;
+            /*update_begin author:wuxianquan date:20190908 for:获取值*/
+            this.model.internalOrExternal = this.internalOrExternal;
+            /*update_end author:wuxianquan date:20190908 for:获取值*/
+
+            let formData = Object.assign(this.model, values);
+            if ((formData.menuType == 1 || formData.menuType == 2) && !formData.parentId) {
+              that.validateStatus = 'error';
+              that.$message.error("请检查你填的类型以及信息是否正确!");
+              return;
+            } else {
+              that.validateStatus = 'success';
+            }
+            that.confirmLoading = true;
+            console.log(formData);
+            let obj;
+            if (!this.model.id) {
+              obj = addPermission(formData);
+            } else {
+              obj = editPermission(formData);
+            }
+            obj.then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit('ok');
+              } else {
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            });
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+      validateNumber(rule, value, callback){
+        if(!value || new RegExp(/^[0-9]*[1-9][0-9]*$/).test(value)){
+          callback();
+        }else{
+          callback("请输入正整数!");
+        }
+      },
+      validatePerms(rule, value, callback){
+        if(value && value.length>0){
+          //校验授权标识是否存在
+          var params = {
+            tableName: 'sys_permission',
+            fieldName: 'perms',
+            fieldVal: value,
+            dataId: this.model.id
+          };
+          duplicateCheck(params).then((res) => {
+            if (res.success) {
+              callback()
+            } else {
+              callback("授权标识已存在!")
+            }
+          })
+        }else{
+          callback()
+        }
+      },
+      onChangeMenuType(e) {
+        //console.log('localMenuType checked', e.target.value)
+        this.localMenuType=e.target.value
+        if(e.target.value == 2){
+          this.show = false;
+          this.menuLabel = '按钮/权限';
+        }else{
+          this.show = true;
+          this.menuLabel = '菜单名称';
+        }
+        this.$nextTick(() => {
+          this.form.validateFields(['url','component'], { force: true });
+        });
+      },
+      handleIconCancel () {
+        this.iconChooseVisible = false
+      },
+      handleIconChoose (value) {
+        console.log(value)
+        this.model.icon = value
+        this.form.icon = value
+        this.iconChooseVisible = false
+      },
+      // 根据屏幕变化,设置抽屉尺寸
+      resetScreenSize(){
+        let screenWidth = document.body.clientWidth;
+        if(screenWidth < 500){
+          this.drawerWidth = screenWidth;
+        }else{
+          this.drawerWidth = 700;
+        }
+      },
+      initDictConfig() {
+      },
+      handleParentIdChange(value){
+        if(!value){
+          this.validateStatus="error"
+        }else{
+          this.validateStatus="success"
+        }
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 7
src/views/modules/material/modules/videoList.vue

@@ -99,7 +99,6 @@
           }
         ],
         url: {},
-        options: []
       }
     },
     computed: {
@@ -113,12 +112,7 @@
       },
     },
     mounted() {
-      getAction('/sys/user/getAllUserList', '').then(res => {
-        console.log(res)
-        if (res.success) {
-          this.options = res.result
-        }
-      })
+  
     },
   }
 </script>

+ 361 - 290
src/views/modules/material/scriptFile.vue

@@ -1,7 +1,7 @@
 <style>
-  #wps-iframe {
-    height: 100%
-  }
+#wps-iframe {
+  height: 100%;
+}
 </style>
 <template>
   <a-card :bordered="false">
@@ -20,28 +20,53 @@
           <a-col :md="6" :sm="8">
             <a-form-item label="创建人">
               <!-- <a-input placeholder="请输入创建人" v-model="queryParam.creator_dictText"></a-input> -->
-              <a-select v-model="queryParam.creator" showSearch allowClear placeholder="请选择创建人"
-                optionFilterProp="children" style="width: 100%" :filterOption="true">
-                <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
-                  :value="appModel.userId">
+              <a-select
+                v-model="queryParam.creator"
+                showSearch
+                allowClear
+                placeholder="请选择创建人"
+                optionFilterProp="children"
+                style="width: 100%"
+                :filterOption="true"
+                @search="search"
+                @focus="getAllUserList"
+              >
+                <a-select-option
+                  v-for="appModel in options"
+                  :key="appModel.userId + new Date().getTime()"
+                  :value="appModel.userId"
+                >
                   {{ appModel.realName }}
-                  &#12288;&#12288;{{ appModel.roleName }}</a-select-option>
+                  &#12288;&#12288;{{ appModel.roleName }}
+                </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
             </span>
           </a-col>
-
         </a-row>
       </a-form>
     </div>
     <div style="float:right;margin:0 0 20px 20px">
-      <a-upload name="file" :multiple="false" :action="uploadAction" :headers="tokenHeader" :showUploadList="false"
-        :beforeUpload="beforeUpload" @change="handleChange" style="margin-right:20px">
+      <a-upload
+        name="file"
+        :multiple="false"
+        :action="uploadAction"
+        :headers="tokenHeader"
+        :showUploadList="false"
+        :beforeUpload="beforeUpload"
+        @change="handleChange"
+        style="margin-right:20px"
+      >
         <a-button :disabled="loadingElse">
           <a-icon type="upload" />
           {{loadingElse?'上传中,请稍后':'文件上传'}}
@@ -51,13 +76,16 @@
         <a-button>新增</a-button>
         <a-menu slot="overlay">
           <a-menu-item>
-            <a-icon type="file-word" /><span style="text-align: center" @click="creatWps('word')">文字文档</span>
+            <a-icon type="file-word" />
+            <span style="text-align: center" @click="creatWps('word')">文字文档</span>
           </a-menu-item>
           <a-menu-item>
-            <a-icon type="file-excel" /><span style="text-align: center" @click="creatWps('excel')">表格文档</span>
+            <a-icon type="file-excel" />
+            <span style="text-align: center" @click="creatWps('excel')">表格文档</span>
           </a-menu-item>
           <a-menu-item>
-            <a-icon type="file-ppt" /><span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
+            <a-icon type="file-ppt" />
+            <span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
           </a-menu-item>
 
           <!-- <a-menu-item>
@@ -68,14 +96,23 @@
           </a-menu-item>
           <a-menu-item>
             <a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">3rd menu item</a>
-          </a-menu-item> -->
+          </a-menu-item>-->
         </a-menu>
       </a-dropdown>
     </div>
     <div style="clear:both"></div>
     <div>
-      <a-table ref="table" size="middle" bordered rowKey="name" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="name"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
         <span slot="modifyTime" slot-scope="text">{{text|getDate}}</span>
         <span slot="size" slot-scope="text">{{text|sizeShow}}</span>
         <span slot="projectId_dictText" slot-scope="text">{{text?text:'-'}}</span>
@@ -90,26 +127,32 @@
             <a>删除</a>
           </a-popconfirm>
         </span>
-
       </a-table>
     </div>
     <!-- <div id="show"></div> -->
-    <a-modal :maskClosable="false" :title="type=='add'?'脚本新建':'脚本编辑'" v-model="visibleBind" :width="1200"
-      :footer="null">
-
+    <a-modal
+      :maskClosable="false"
+      :title="type=='add'?'脚本新建':'脚本编辑'"
+      v-model="visibleBind"
+      :width="1200"
+      :footer="null"
+    >
       <iframe :src="src" frameborder="0" style="width:100%;height:600px" v-if="type=='add'"></iframe>
       <div id="showWps" style="height:600px" v-show="type=='edit'"></div>
-
-
     </a-modal>
     <a-modal :maskClosable="false" title="绑定项目" v-model="visibleProject" @ok="handleOk">
       <span>项目选择:</span>
-      <a-select v-model="projectId" showSearch style="width:300px" optionFilterProp="children"
-        :filterOption="filterOption">
+      <a-select
+        v-model="projectId"
+        showSearch
+        style="width:300px"
+        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 }}
+          item.mediaId == "1" ? '头条' :item.mediaId == "2"? '快手':item.mediaId == "3"?'头条内广':'快手内广'
+          }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
         </a-select-option>
       </a-select>
     </a-modal>
@@ -117,296 +160,324 @@
 
     <!-- 表单区域 -->
     <wpsFile-modal ref="modalForm" @ok="modalFormOk"></wpsFile-modal>
-
   </a-card>
 </template>
 
 <script>
-  import {
-    getAction,
-    postAction,
-    postFile,
-    deleteAction,
-    putAction
-  } from '@/api/manage'
-  import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
-  import WpsFileModal from './modules/WpsFileModal'
-  import {
-    mapGetters
-  } from 'vuex'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
-  import qs from 'qs';
-  const fileSuffix = [
-    'xls', 'xlt', 'et', 'xlsx', 'xltx', 'csv', 'xlsm', 'xltm',
-    'doc', 'dot', 'wps', 'wpt', 'docx', 'dotx', 'docm', 'dotm',
-    'ppt', 'pptx', 'pptm', 'ppsx', 'ppsm', 'pps', 'potx', 'potm', 'dpt', 'dps',
-    'pdf'
-  ];
-  export default {
-    name: "WpsFileList",
-    mixins: [JeecgListMixin],
-    components: {
-      WpsFileModal,
-      selectTable
-    },
-    data() {
-      return {
-        description: 'wps文件管理页面',
-        dataElse: [],
-        projectId: '',
-        visibleProject: false,
-        // 表头
-        visibleBind: false,
-        wpsType: 'word',
-        type: "add",
-        uploadAction: "http://api.tjyourong.com.cn/jeecg-boot/ctop/wpsFile/uploadFile",
-        columns: [{
-            title: '脚本名称',
-            align: "center",
-            dataIndex: 'name'
-          },
-          {
-            title: '文件大小(KB)',
-            align: "center",
-            dataIndex: 'size',
-            scopedSlots: {
-              customRender: 'size'
-            },
+import { getAction, postAction, postFile, deleteAction, putAction } from '@/api/manage'
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
+import WpsFileModal from './modules/WpsFileModal'
+import { mapGetters } from 'vuex'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import qs from 'qs'
+const fileSuffix = [
+  'xls',
+  'xlt',
+  'et',
+  'xlsx',
+  'xltx',
+  'csv',
+  'xlsm',
+  'xltm',
+  'doc',
+  'dot',
+  'wps',
+  'wpt',
+  'docx',
+  'dotx',
+  'docm',
+  'dotm',
+  'ppt',
+  'pptx',
+  'pptm',
+  'ppsx',
+  'ppsm',
+  'pps',
+  'potx',
+  'potm',
+  'dpt',
+  'dps',
+  'pdf',
+]
+export default {
+  name: 'WpsFileList',
+  mixins: [JeecgListMixin],
+  components: {
+    WpsFileModal,
+    selectTable,
+  },
+  data() {
+    return {
+      description: 'wps文件管理页面',
+      dataElse: [],
+      projectId: '',
+      visibleProject: false,
+      // 表头
+      visibleBind: false,
+      wpsType: 'word',
+      type: 'add',
+      uploadAction: 'http://api.tjyourong.com.cn/jeecg-boot/ctop/wpsFile/uploadFile',
+      columns: [
+        {
+          title: '脚本名称',
+          align: 'center',
+          dataIndex: 'name',
+        },
+        {
+          title: '文件大小(KB)',
+          align: 'center',
+          dataIndex: 'size',
+          scopedSlots: {
+            customRender: 'size',
           },
-          {
-            title: '绑定项目',
-            align: "center",
-            dataIndex: 'projectId_dictText',
-            scopedSlots: {
-              customRender: 'projectId_dictText'
-            },
+        },
+        {
+          title: '绑定项目',
+          align: 'center',
+          dataIndex: 'projectId_dictText',
+          scopedSlots: {
+            customRender: 'projectId_dictText',
           },
-          {
-            title: '创建人',
-            align: "center",
-            dataIndex: 'creator_dictText'
+        },
+        {
+          title: '创建人',
+          align: 'center',
+          dataIndex: 'creator_dictText',
+        },
+        {
+          title: '发布时间',
+          align: 'center',
+          dataIndex: 'modifyTime',
+          scopedSlots: {
+            customRender: 'modifyTime',
           },
-          {
-            title: '发布时间',
-            align: "center",
-            dataIndex: 'modifyTime',
-            scopedSlots: {
-              customRender: 'modifyTime'
-            },
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action',
           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: "center",
-            scopedSlots: {
-              customRender: 'action'
-            },
-          }
-        ],
-        url: {
-          list: "/ctop/wpsFile/list",
-          delete: "/ctop/wpsFile/delete",
-          deleteBatch: "/ctop/wpsFile/deleteBatch",
-          exportXlsUrl: "ctop/wpsFile/exportXls",
-          importExcelUrl: "ctop/wpsFile/importExcel",
         },
-        src: "",
-        loadingElse: false,
-        fileId: '',
-        loadingOk: false,
-        options: []
-      }
+      ],
+      url: {
+        list: '/ctop/wpsFile/list',
+        delete: '/ctop/wpsFile/delete',
+        deleteBatch: '/ctop/wpsFile/deleteBatch',
+        exportXlsUrl: 'ctop/wpsFile/exportXls',
+        importExcelUrl: 'ctop/wpsFile/importExcel',
+      },
+      src: '',
+      loadingElse: false,
+      fileId: '',
+      loadingOk: false,
+      options: [],
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
-    computed: {
-      importExcelUrl: function () {
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+  },
+  watch: {
+    visibleBind(n, o) {
+      if (!n) {
+        this.src = ''
+        this.loadData(1)
       }
     },
-    watch: {
-      visibleBind(n, o) {
-        if (!n) {
-          this.src = ''
-          this.loadData(1)
-        }
-      }
+  },
+  filters: {
+    getDate(value) {
+      let date = new Date(value)
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      return y + '-' + MM + '-' + d
     },
-    filters: {
-      getDate(value) {
-        let date = new Date(value)
-        let y = date.getFullYear()
-        let MM = date.getMonth() + 1
-        MM = MM < 10 ? '0' + MM : MM
-        let d = date.getDate()
-        d = d < 10 ? '0' + d : d
-        return y + '-' + MM + '-' + d
-      },
-      sizeShow(value) {
-        return (value / 1024).toFixed(2)
+    sizeShow(value) {
+      return (value / 1024).toFixed(2)
+    },
+  },
+  mounted() {
+    this.getParticipateList()
+    // getAction('/sys/user/getAllUserList', '').then((res) => {
+    //   if (res.success) {
+    //     this.options = res.result
+    //   }
+    // })
+  },
+  methods: {
+    search(value) {
+      this.options = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
       }
     },
-    mounted() {
-      this.getParticipateList()
-      getAction('/sys/user/getAllUserList', '').then(res => {
+    getAllUserList(value) {
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.options = res.result
+          this.options = res.result.list
+        }
+      })
+    },
+    downLoad(item) {
+      let downloadElement = document.createElement('a')
+      downloadElement.href = item.downloadUrl
+      downloadElement.download = item.name //下载后文件名
+      document.body.appendChild(downloadElement)
+      downloadElement.click() //点击下载
+      document.body.removeChild(downloadElement) //下载完成移除元素
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    getParticipateList() {
+      getAction('/ctop/projectMember/participateList', {
+        userId: this.userInfo().id,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.dataElse = res.result
         }
       })
     },
-    methods: {
-      downLoad(item) {
-        let downloadElement = document.createElement('a')
-        downloadElement.href = item.downloadUrl
-        downloadElement.download = item.name //下载后文件名
-        document.body.appendChild(downloadElement)
-        downloadElement.click() //点击下载
-        document.body.removeChild(downloadElement) //下载完成移除元素
+    beforeUpload(file) {
+      this.loadingElse = true
+      const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
+      const fileName = file.name
+      const fileStrArr = fileName.split('.')
+      const suffix = fileStrArr[fileStrArr.length - 1]
 
-      },
-      filterOption(input, option) {
-        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      },
-      ...mapGetters(['nickname', 'avatar', 'userInfo']),
-      getParticipateList() {
-        getAction('/ctop/projectMember/participateList', {
-          userId: this.userInfo().id
-        }).then(res => {
-          if (res.code == 0) {
-            this.dataElse = res.result
-          }
-        })
-      },
-      beforeUpload(file) {
-        this.loadingElse = 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
+      })
 
-        let result = fileSuffix.some((item) => {
-          return item === suffix
-        });
+      if (!result) {
+        this.$message.error('不支持该文件类型')
+        this.loadingElse = false
+        return false
+      }
 
-        if (!result) {
-          this.$message.error("不支持该文件类型");
-          this.loadingElse = false
-          return false;
+      if (size > 10) {
+        this.$message.error('文件不能大于10MB')
+        this.loadingElse = false
+        return false
+      }
+    },
+    handleChange(info) {
+      if (info.file.status !== 'uploading') {
+        console.log(info.file, info.fileList)
+      }
+      if (info.file.status === 'done') {
+        this.$message.success(`${info.file.name} 上传成功`)
+        this.loadingElse = false
+        this.loadData(1)
+      } else if (info.file.status === 'error') {
+        this.$message.error(`${info.file.name} file upload failed.`)
+        this.loadingElse = false
+      }
+    },
+    handleOk(e) {
+      this.loadingOk = true
+      var params = qs.stringify({
+        projectId: this.projectId,
+        fileId: this.fileId,
+      })
+      postAction('/ctop/wpsFile/bindProject', params).then((res) => {
+        if (res.success) {
+          this.visibleProject = false
+          this.projectId = ''
+          this.loadingOk = false
+          this.loadData()
+        } else {
+          this.$message.error('绑定失败')
+          this.loadingOk = false
         }
-
-        if (size > 10) {
-          this.$message.error("文件不能大于10MB");
-          this.loadingElse = false
-          return false;
+      })
+    },
+    creatWps(type) {
+      console.log(type)
+      this.visibleBind = true
+      this.wpsType = type
+      this.type = 'add'
+      getAction('/ctop/wpsFile/createTemplateFile', {
+        template: type,
+      }).then((res) => {
+        console.log(res)
+        if (res.code == 200) {
+          this.src = res.msg
+          console.log(this.src)
+        } else {
+          this.$message.error('请求错误!')
         }
-      },
-      handleChange(info) {
+      })
+      // getCreateFilePath({
+      //   template: type
+      // }).then(res => {
+      //   console.log(res)
+      //   // if (res.data.data){
+      //   this.src = res.data.msg;
+      //   // }else {
+      //   // this.showErrMeg('请求错误!');
+      //   // }
+      // }).catch(() => {
+      //   this.showErrMeg('请求错误!');
+      // });
+    },
 
-        if (info.file.status !== 'uploading') {
-          console.log(info.file, info.fileList);
-        }
-        if (info.file.status === 'done') {
-          this.$message.success(`${info.file.name} 上传成功`);
-          this.loadingElse = false
-          this.loadData(1)
-        } else if (info.file.status === 'error') {
-          this.$message.error(`${info.file.name} file upload failed.`);
-          this.loadingElse = false
+    bindProject(item) {
+      this.visibleProject = true
+      this.projectId = ''
+      this.fileId = item.id
+      // this.getParticipateList()
+    },
+    getViewUrlDbPath(item) {
+      // this.loading = true;
+      const params = {
+        fileId: item.id,
+        userId: item.creator,
+      }
+      getAction('/v1/api/file/getViewUrlDbPath', params).then((res) => {
+        console.log(res)
+        if (res.data) {
+          let r = res.data
+          this.visibleBind = true
+          // this.src = r.wpsUrl;
+          this.type = 'edit'
+          this.openWps(r.wpsUrl, r.token)
+        } else {
+          this.$message.error('请求错误')
         }
-      },
-      handleOk(e) {
-        this.loadingOk = true
-        var params = qs.stringify({
-          projectId: this.projectId,
-          fileId: this.fileId
-        })
-        postAction('/ctop/wpsFile/bindProject', params).then(res => {
-          if (res.success) {
-            this.visibleProject = false
-            this.projectId = ""
-            this.loadingOk = false
-            this.loadData()
-          } else {
-            this.$message.error('绑定失败')
-            this.loadingOk = false
-          }
-        })
-      },
-      creatWps(type) {
-        console.log(type)
-        this.visibleBind = true
-        this.wpsType = type
-        this.type = 'add'
-        getAction('/ctop/wpsFile/createTemplateFile', {
-          template: type
-        }).then(res => {
-          console.log(res)
-          if (res.code == 200) {
-            this.src = res.msg;
-            console.log(this.src)
-          } else {
-            this.$message.error('请求错误!')
-          }
-        })
-        // getCreateFilePath({
-        //   template: type
-        // }).then(res => {
-        //   console.log(res)
-        //   // if (res.data.data){
-        //   this.src = res.data.msg;
-        //   // }else {
-        //   // this.showErrMeg('请求错误!');
-        //   // }
-        // }).catch(() => {
-        //   this.showErrMeg('请求错误!');
-        // });
-
-      },
-
-      bindProject(item) {
-        this.visibleProject = true
-        this.projectId = ''
-        this.fileId = item.id
-        // this.getParticipateList()
-      },
-      getViewUrlDbPath(item) {
-        // this.loading = true;
-        const params = {
-          fileId: item.id,
-          userId: item.creator
-        };
-        getAction('/v1/api/file/getViewUrlDbPath', params).then((res) => {
-          console.log(res)
-          if (res.data) {
-            let r = res.data;
-            this.visibleBind = true
-            // this.src = r.wpsUrl;
-            this.type = 'edit'
-            this.openWps(r.wpsUrl, r.token)
-
-          } else {
-            this.$message.error('请求错误')
-          }
+      })
+    },
+    openWps(url, token) {
+      this.$nextTick(() => {
+        let _this = this
+        const wps = _this.wps.config({
+          mode: 'simple',
+          mount: document.querySelector('#showWps'),
+          wpsUrl: url,
         })
-      },
-      openWps(url, token) {
-
-        this.$nextTick(() => {
-          let _this = this;
-          const wps = _this.wps.config({
-            mode: 'simple',
-            mount: document.querySelector('#showWps'),
-            wpsUrl: url,
-          });
-          wps.setToken({
-            "token": token
-          });
-          let app = wps.Application;
+        wps.setToken({
+          token: token,
         })
-      }
-    }
-  }
+        let app = wps.Application
+      })
+    },
+  },
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 2070 - 1561
src/views/modules/material/videoMaterial.vue


+ 11 - 7
src/views/modules/material/videoTemplate.vue

@@ -157,10 +157,12 @@
       </template>
       <a-form :form="form">
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="视频素材上传">
-          <upload-to-ali v-model="urlList.url" :customDomain="customDomain" preview :region="region" :bucket="bucket"
+          <!-- <upload-to-ali v-model="urlList.url" :customDomain="customDomain" preview :region="region" :bucket="bucket"
             :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret" :before-upload="file" :dir="dirVideo" @loaded="overUpload">
-          </upload-to-ali>
+          </upload-to-ali> -->
+          <uploadFile :value.sync="urlList.url" :fileCount="1" uploadType="video" :multiple="false"
+            @overUpload="overUpload" />
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="模板标题">
           <a-input placeholder="请输入模板标题" v-decorator="['title',{ rules: [{ required: true, message: '请输入模板标题' }]}]" />
@@ -199,10 +201,12 @@
         </div>
         <div style="flex:3;padding:10px;box-sizing:border-box;">
           <span style="color:black;font-size:18px;text-align:center;width:100%">合成视频上传</span>
-          <upload-to-ali v-model="urlListMerge.url" :customDomain="customDomain" preview :region="region"
+          <!-- <uploadFile v-model="urlListMerge.url" :customDomain="customDomain" preview :region="region"
             :bucket="bucket" :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId"
             :accessKeySecret="accessKeySecret" :before-upload="file" :dir="dirMerge" @loaded="overUploadMerge">
-          </upload-to-ali>
+          </uploadFile> -->
+          <uploadFile :value.sync="urlListMerge.url" :fileCount="1" uploadType="video" :multiple="false"
+            @overUpload="overUploadMerge" />
         </div>
       </div>
     </a-modal>
@@ -221,7 +225,7 @@
     JeecgListMixin
   } from '@/mixins/JeecgListMixin'
   import BMF from 'browser-md5-file'
-  import UploadToAli from '@femessage/upload-to-ali'
+  import uploadFile from '@/components/uploadFile.vue'
   import {
     stopOtherVideo,
     closeAllVideoFun
@@ -229,7 +233,7 @@
   export default {
     mixins: [JeecgListMixin],
     components: {
-      UploadToAli,
+      uploadFile,
     },
 
     data() {
@@ -244,7 +248,7 @@
         url: {
           list: '/ctop/modelVideoInfo/list'
         },
-        columns:[],
+        columns: [],
         urlList: {
           url: '',
           md5: ''

+ 0 - 3
src/views/modules/yard/YardList.vue

@@ -1,7 +1,4 @@
 <style>
-  .ant-modal-body {
-    padding-top: 0px;
-  }
 
   li {
     list-style-type: none;

+ 0 - 3
src/views/modules/yard/modules/yardDetail.vue

@@ -12,9 +12,6 @@
 /* .ping-list:hover span {
   display: block;
 } */
-.ant-modal-body {
-  padding-top: 0px;
-}
 li {
   list-style-type: none;
 }

+ 160 - 0
src/views/report/JhsBakendDataList.vue

@@ -0,0 +1,160 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="选择日期">
+              <!--              <a-input placeholder="请输入stateDate" v-model="queryParam.stateDate"></a-input>-->
+              <a-date-picker v-model="queryParam.stateDate" format="YYYY-MM-DD" style="width:100%" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-upload
+        name="file"
+        :showUploadList="false"
+        :multiple="false"
+        :headers="tokenHeader"
+        :action="importExcelUrl"
+        @change="handleImportExcel"
+      >
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <a-button type="primary" style="margin-left:20px" @click="openNewWindow">日报预览</a-button>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel">
+            <a-icon type="delete" />删除
+          </a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px">
+          批量操作
+          <a-icon type="down" />
+        </a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <jhsBakendData-modal ref="modalForm" @ok="modalFormOk"></jhsBakendData-modal>
+  </a-card>
+</template>
+
+<script>
+import JhsBakendDataModal from './modules/JhsBakendDataModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+export default {
+  name: 'JhsBakendDataList',
+  mixins: [JeecgListMixin],
+  components: {
+    JhsBakendDataModal,
+  },
+  data() {
+    return {
+      description: '聚划算后端数据管理页面',
+      // 表头
+      columns: [
+        {
+          title: '日期',
+          align: 'center',
+          dataIndex: 'stateDate',
+        },
+        {
+          title: '产品线',
+          align: 'center',
+          dataIndex: 'productLine',
+        },
+        {
+          title: '任务名称',
+          align: 'center',
+          dataIndex: 'taskName',
+        },
+        {
+          title: '客户端',
+          align: 'center',
+          dataIndex: 'clientName',
+        },
+        {
+          title: '渠道id',
+          align: 'center',
+          dataIndex: 'channelId',
+        },
+        {
+          title: '渠道名称',
+          align: 'center',
+          dataIndex: 'channelName',
+        },
+        {
+          title: '计划id',
+          align: 'center',
+          dataIndex: 'adId',
+        },
+        {
+          title: '页面访问UV',
+          align: 'center',
+          dataIndex: 'pageView',
+        },
+        {
+          title: '成交笔数',
+          align: 'center',
+          dataIndex: 'dealNumber',
+        },
+      ],
+      url: {
+        list: '/okr/jhsBakendData/list',
+        delete: '/okr/jhsBakendData/delete',
+        deleteBatch: '/okr/jhsBakendData/deleteBatch',
+        exportXlsUrl: 'okr/jhsBakendData/exportXls',
+        importExcelUrl: 'okr/jhsBakendData/importExcel',
+      },
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    },
+  },
+  methods: {
+    openNewWindow(){
+      window.open("http://139.186.29.76:8804/jeecg-boot/ureport/preview?_u=mysql:%E8%81%9A%E5%88%92%E7%AE%97%E8%B4%A6%E6%88%B7%E6%8A%A5%E8%A1%A8-%E5%A4%B4%E6%9D%A1.ureport.xml", '_blank')
+    }
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 172 - 0
src/views/report/modules/JhsBakendDataModal.vue

@@ -0,0 +1,172 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="stateDate">
+          <a-input placeholder="请输入stateDate" v-decorator="['stateDate', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="productLine">
+          <a-input placeholder="请输入productLine" v-decorator="['productLine', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="taskName">
+          <a-input placeholder="请输入taskName" v-decorator="['taskName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="clientName">
+          <a-input placeholder="请输入clientName" v-decorator="['clientName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="channelId">
+          <a-input placeholder="请输入channelId" v-decorator="['channelId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="channelName">
+          <a-input placeholder="请输入channelName" v-decorator="['channelName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="adId">
+          <a-input placeholder="请输入adId" v-decorator="['adId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="pageView">
+          <a-input placeholder="请输入pageView" v-decorator="['pageView', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="dealNumber">
+          <a-input placeholder="请输入dealNumber" v-decorator="['dealNumber', {}]" />
+        </a-form-item>
+		
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+  export default {
+    name: "JhsBakendDataModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        },
+        url: {
+          add: "/okr/jhsBakendData/add",
+          edit: "/okr/jhsBakendData/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'stateDate','productLine','taskName','clientName','channelId','channelName','adId','pageView','dealNumber'))
+		  //时间格式化
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 1 - 1
src/views/system/modules/PasswordModal.vue

@@ -97,7 +97,7 @@
           if (!err) {
             this.confirmLoading = true;
             let formData = Object.assign(this.model, values);
-            changPassword(formData).then((res) => {
+            changePassword(formData).then((res) => {
               if (res.success) {
                 this.$message.success(res.message);
                 this.$emit('ok');

+ 68 - 31
src/views/ureport/UReportFileList.vue

@@ -12,18 +12,23 @@
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+              >重置</a-button>
             </span>
           </a-col>
         </a-row>
       </a-form>
     </div>
     <a-row :gutter="24" style="margin-bottom:10px">
-        <a-col :md="6" :sm="8">
+      <a-col :md="6" :sm="8">
         <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-button type="primary" @click="addData">新增</a-button>
+          <a-button type="primary" @click="addData">新增</a-button>
         </span>
-        </a-col>
+      </a-col>
     </a-row>
     <!-- table区域-begin -->
     <div>
@@ -56,7 +61,13 @@
     <uReportFile-modal ref="modalForm" @ok="modalFormOk"></uReportFile-modal>
 
     <!--  查看成员,接触绑定 -->
-    <a-modal title="解除绑定" v-model="visible" @ok="handleOk" width="800px" class="close-account-my-project">
+    <a-modal
+      title="解除绑定"
+      v-model="visible"
+      @ok="handleOk"
+      width="800px"
+      class="close-account-my-project"
+    >
       <div style="display:flex;line-height:50px;flex-wrap: wrap;">
         <div style="width:25%;text-align:center;" v-for="(item, index) of memberList" :key="index">
           <a-tag color="#2db7f5" @close="log(item.userId)" closable>{{ item.userName }}</a-tag>
@@ -77,6 +88,7 @@
         style="width: 100%"
         :filterOption="filterOption"
         :maxTagCount="1"
+        @search="search"
       >
         <a-select-option
           v-for="appModel in options"
@@ -84,8 +96,8 @@
           :value="appModel.userId"
         >
           {{ appModel.realName }}
-          &#12288;&#12288;{{ appModel.roleName }}</a-select-option
-        >
+          &#12288;&#12288;{{ appModel.roleName }}
+        </a-select-option>
       </a-select>
     </a-modal>
   </a-card>
@@ -101,7 +113,7 @@ export default {
   name: 'UReportFileList',
   mixins: [JeecgListMixin],
   components: {
-    UReportFileModal
+    UReportFileModal,
   },
   data() {
     return {
@@ -111,21 +123,21 @@ export default {
         {
           title: '报表模板名称',
           align: 'center',
-          dataIndex: 'name'
+          dataIndex: 'name',
         },
         {
           title: '操作',
           dataIndex: 'action',
           align: 'center',
-          scopedSlots: { customRender: 'action' }
-        }
+          scopedSlots: { customRender: 'action' },
+        },
       ],
       url: {
         list: '/ctop/uReportFile/list',
         delete: '/ctop/uReportFile/delete',
         deleteBatch: '/ctop/uReportFile/deleteBatch',
         exportXlsUrl: 'ctop/uReportFile/exportXls',
-        importExcelUrl: 'ctop/uReportFile/importExcel'
+        importExcelUrl: 'ctop/uReportFile/importExcel',
       },
       visibleAdd: false,
       itemJson: null,
@@ -135,22 +147,25 @@ export default {
       appId: [],
       memberList: [],
       visible: false,
-      fileId: ''
+      fileId: '',
     }
   },
   computed: {
-    importExcelUrl: function() {
+    importExcelUrl: function () {
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
-    }
+    },
   },
   methods: {
-    subscribe(record){
-      console.log(record);
-      postAction('/ctop/uReportFileBindUser/subscribe',qs.stringify({
-        fileId:record.id
-      })).then(res=>{
-        console.log(res);
-        if(res.success){  
+    subscribe(record) {
+      console.log(record)
+      postAction(
+        '/ctop/uReportFileBindUser/subscribe',
+        qs.stringify({
+          fileId: record.id,
+        })
+      ).then((res) => {
+        console.log(res)
+        if (res.success) {
           this.$message.success('订阅成功')
         }
       })
@@ -161,15 +176,37 @@ export default {
     addParams(item) {
       this.visibleAdd = true
       this.itemJson = item
-      getAction('/sys/user/getAllUserList', '').then(res => {
+      // getAction('/sys/user/getAllUserList', '').then(res => {
+      //   if (res.success) {
+      //     this.list = res.result
+      //     this.options = res.result
+      //   }
+      // })
+      this.getAllUserList()
+    },
+    getAllUserList(value) {
+      getAction('/sys/user/getAllUserList', { pageSize: 50, pageNo: 1, userName: value }).then((res) => {
         if (res.success) {
-          this.list = res.result
-          this.options = res.result
+          this.list = res.result.list
+          this.options = res.result.list
         }
       })
     },
+    search(value) {
+      this.options = []
+      if (value != '') {
+        // this.options = this.list.filter(item => {
+        //   var data = item.realName + ' ' + item.roleName
+        //   return data.toLowerCase().indexOf(value.toLowerCase()) > -1
+        // })
+        // this.options = [...this.options]
+        this.getAllUserList(value)
+      } else {
+        this.getAllUserList()
+      }
+    },
     log(id) {
-      httpAction('/ctop/uReportFile/unbindUser', { fileId: this.fileId, userId: id }, 'post').then(res => {
+      httpAction('/ctop/uReportFile/unbindUser', { fileId: this.fileId, userId: id }, 'post').then((res) => {
         if (res.success) {
           this.getMemberList(this.fileId)
           this.$message.success('删除成功')
@@ -186,7 +223,7 @@ export default {
       params.fileId = this.itemJson.id
       params.userIds = this.appId.join()
       this.confirmLoading = true
-      httpAction('/ctop/uReportFile/bindUser', params, 'post').then(res => {
+      httpAction('/ctop/uReportFile/bindUser', params, 'post').then((res) => {
         this.confirmLoading = false
         if (res.success) {
           this.visibleAdd = false
@@ -210,7 +247,7 @@ export default {
       }
       window.open(url, '_blank')
     },
-    addData(){
+    addData() {
       var url = ''
       if (process.env.NODE_ENV === 'development') {
         url = 'http://api.tjyourong.com.cn/jeecg-boot/ureport/designer'
@@ -221,14 +258,14 @@ export default {
     },
     getMemberList(id) {
       this.memberList = []
-      httpAction('/ctop/uReportFileBindUser/userList', { fileId: id }, 'post').then(res => {
+      httpAction('/ctop/uReportFileBindUser/userList', { fileId: id }, 'post').then((res) => {
         if (res.success) {
           this.visible = true
           this.memberList = res.data
         }
       })
-    }
-  }
+    },
+  },
 }
 </script>
 <style scoped>

+ 8 - 8
vue.config.js

@@ -60,25 +60,25 @@ module.exports = {
       '/jeecg-boot': {
         //  target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
-        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8080', //请求本地 需要jeecg-boot后台项目  毕洁泉
 
-        target: 'http://192.168.1.74:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        // target: 'http://192.168.1.74:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.170:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
-         
-        // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
-        // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目 
-        // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目 
-        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
+        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
+         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',
 
 
         ws: false,
+
         changeOrigin: true,
         // pathRewrite: {
         //     '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉

+ 0 - 140
投放管家创建接口

@@ -1,140 +0,0 @@
-step1:创建项目 post /adlab/Project/create
-入参{
-     "accountId":"",账户id
-	 "name":"",项目名称,不允许超过100个字
-	 "scenario":"",项目场景
-	 "adTarget":"",投放方式
-	 "deliveryRange":"",投放媒体
-	 "landingType":""推广目的
-}
-step2:设置项目转化信息 post /adlab/Project/setConvert
-入参{
-     "accountId":"",账户id
-	 "groupId":"",项目id
-	 "platform":"",
-	 "adTarget":"",
-	 "url":"",
-	 "downloadMode":"",
-	 "adlabPackage":"",
-	 "webUrl":"",
-	 "convertId":"",
-	 "openUrl":"",
-	 "downloadType":"",
-	 "appType":""
-}
-step3:设置项目定向信息 post /adlab/Project/setAudience
-入参{
-     "accountId":"",
-	 "groupId":"",
-	 "inventoryType":[],
-	 "unionVideoType":"",
-	 "age":"",
-	 "city":"",
-	 "district":"",
-	 "gender":"",
-	 "retargetingTagsExclude":"",
-	 "retargetingTagsInclude":"",
-	 "superiorPopularityType":"",
-	 "excludeFlowPackage":"",
-	 "flowPackage":"",
-	 "autoExtendEnabled":"",
-	 "autoExtendTargets":"",
-	 "inventoryTypes":"",
-}
-step4:设置项目创意信息 post /adlab/Project/setCreative
-入参{
-     "accountId":"",
-	 "groupId":"",
-	 "imageInfo":[
-	 {
-	   "web_uri":"",
-	   "height":"",
-	   "width":""},
-	 {
-	   "web_uri":"",
-	   "height":"",
-	   "width":""},
-	 {
-	   "web_uri":"",
-	   "height":"",
-	   "width":""},
-	 ],
-	 "video_info":[
-	 {
-	   "video_id":"",
-	   "url":"",
-	   "during":""
-	   "height":"",
-	   "width":"",
-	   "size":""},
-	 {
-	   "video_id":"",
-	   "url":"",
-	   "during":""
-	   "height":"",
-	   "width":"",
-	   "size":""},
-	 {
-	   "video_id":"",
-	   "url":"",
-	   "during":""
-	   "height":"",
-	   "width":"",
-	   "size":""},
-	 ],
-	 "title":"",
-	 "appName":"",
-	 "source":"",
-	 "isFollowMaterial":"",
-	 "thirdIndustryId":"",
-	 "adKeywords":[],
-	 "playableUrl":"",
-	 "actionTrackUrl":"",
-	 "trackUrl":"",
-	 "videoPlayTrackUrl":"",
-	 "videoPlayDoneTrackUrl":"",
-	 "videoPlayEffectiveTrackUrl":"",
-	 "creativeAutoGenerateSwitch":"",
-}
-step5:设置项目预算信息 post /adlab/Project/setBudget
-入参{
-     "accountId":"",
-	 "groupId":"",
-	 "bid":"",
-	 "budgetMode":"",
-	 "budget":"",
-	 "autoStop":"",
-	 "deepBid":"",
-	 "startTime":"",
-	 "endTime":"",
-	 "weekTime":number[number[]],
-}
-
-/ctop/queryTool/parseInstallPackage
-入参 表单
-@RequestParam String installUrl,
-@RequestParam String appType
-
-
-post
-
-
-ANDROID  IOS
-
-
-
-系统推荐标题
-/ctop/creativeTitle/getTitleLabel
-
-/ctop/creativeTitle/titleSearch
-入参:{firstCategory: 
-1
-secondCategory: 
-65
-keywords: 
-波波
-}
-
-
-投放管家的列表
-/adlab/ctopAdlabProjectDetail/list