Quellcode durchsuchen

合并代码,,骄阳

朱鑫波 vor 4 Jahren
Ursprung
Commit
cb1c2a4c8a
25 geänderte Dateien mit 2415 neuen und 1053 gelöschten Zeilen
  1. 5 3
      src/views/dashboard/Analysis.vue
  2. 1 0
      src/views/modules/Statistics/accountReport.vue
  3. 113 33
      src/views/modules/Statistics/videoStatics/KSvideoStatics.vue
  4. 5 3
      src/views/modules/Statistics/videoStatics/TTvideoStatics.vue
  5. 6 7
      src/views/modules/Statistics/yicheStatistics/dayStatistics.vue
  6. 6 7
      src/views/modules/Statistics/yicheStatistics/timeStatistics.vue
  7. 15 23
      src/views/modules/advertiser/modules/projectListModal.vue
  8. 110 39
      src/views/modules/autoLaunch/configLaunchInfo.vue
  9. 2 2
      src/views/modules/autoLaunch/setDirectional.vue
  10. 3 3
      src/views/modules/kuaishouapp/account/copyAllUnit.vue
  11. 2 2
      src/views/modules/kuaishouapp/account/copyGroup.vue
  12. 2 2
      src/views/modules/kuaishouapp/account/editGroup.vue
  13. 2 2
      src/views/modules/kuaishouapp/account/editGroupNew.vue
  14. 4 4
      src/views/modules/kuaishouapp/account/stepForm/Step2.vue
  15. 3 3
      src/views/modules/kuaishouapp/batchCreation/creat/creatUnit.vue
  16. 6 6
      src/views/modules/kuaishouapp/crossAccount/createUnit.vue
  17. 97 35
      src/views/modules/kuaishouapp/newBatch/index.vue
  18. 468 62
      src/views/modules/stockWatch/accountPage.vue
  19. 300 0
      src/views/modules/stockWatch/modules/customColumn.vue
  20. 240 0
      src/views/modules/stockWatch/modules/selectComponent.vue
  21. 45 6
      src/views/system/DepartList.vue
  22. 282 196
      src/views/system/UserList.vue
  23. 207 180
      src/views/system/modules/DepartModal.vue
  24. 490 434
      src/views/system/modules/UserModal.vue
  25. 1 1
      src/views/user/Login.vue

+ 5 - 3
src/views/dashboard/Analysis.vue

@@ -247,8 +247,10 @@
               <div class="updateBox">
                 <h3 class="textTitle">1.新功能上线</h3>
                 <ul class="updatelist">
-                  <li><span class="circular"></span>快手新上计划组 支持导出;</li>
-                  <li><span class="circular"></span>批量创建:支持同时创建多广告计划、组、创意;</li>
+                  <li><span class="circular"></span>组织架构;增加汇报上级、部门领导</li>
+                  <li><span class="circular"></span>自动投放账户配置回显问题;</li>
+                  <li><span class="circular"></span>批量创建-销售线索优化;</li>
+                  <li><span class="circular"></span>优化快手素材报表接口查询效率;</li>
                 </ul>
               </div>
               <!-- <div class="updateBox">
@@ -332,7 +334,7 @@
         indicator: <a-icon type="loading" style="font-size: 24px" spin />,
         roleCode: localStorage.getItem('roleCode'),
         visible:false,//更新通知消息提示框
-        updateTime:['2021-01-27'],
+        updateTime:['2021-03-03'],
         versionId:0,//存储版本号 判断通知什么时候显示
       }
     },

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

@@ -1249,6 +1249,7 @@ export default {
     })
   },
   beforeDestroy() {
+    
     let arr = JSON.stringify(this.columns)
     postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
       json: arr,

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

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

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

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

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

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

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

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

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

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

+ 110 - 39
src/views/modules/autoLaunch/configLaunchInfo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="newPlan">
+  <div class="configLaunchInfo">
     <a-spin :spinning="spinning">
     <a-form :form="form">
          <!-- 投放范围 -->
@@ -544,10 +544,9 @@
 
                                 <a-select-option :value="2">行为数</a-select-option>
                                 <!-- v-if="getFormData('campaignType') == 2 && groupTypeData.isActivate == 1 -->
-                                <a-select-option :value="180"
-                                v-if="getFormData('campaignType') == 2 && groupTypeData.isActivate == 1">激活</a-select-option>
+                                <a-select-option :value="180" >激活</a-select-option>
                                 <a-select-option :value="53" v-if="
-                                    (getFormData('campaignType') == 4 || getFormData('campaignType') == 5) && groupTypeData.isFormSubmit == '1'
+                                    groupTypeData.isFormSubmit == '1'
                                 ">表单提交</a-select-option>
 
                                 <a-select-option :value="394" v-if="
@@ -739,6 +738,22 @@
                     <div class="row-item">
                         <div class="hint-item"></div>
                         <div class="label-item">
+                        <div class="text-item">素材类型</div>
+                        <div class="required-item"></div>
+                        </div>
+                        <div class="input-item">
+                        <a-form-item>
+                            <a-radio-group v-decorator="['channelType', { initialValue:2 }]">
+                                <a-radio-button :value='2'>不限</a-radio-button>
+                                <a-radio-button :value="0">内部</a-radio-button>                            
+                                <a-radio-button :value="1">素造</a-radio-button>                            
+                            </a-radio-group>
+                        </a-form-item>                       
+                        </div>
+                    </div>
+                    <div class="row-item">
+                        <div class="hint-item"></div>
+                        <div class="label-item">
                         <div class="text-item">是否开启历史素材挖掘</div>
                         <div class="required-item"></div>
                         </div>
@@ -843,11 +858,11 @@
                         </a-form-item>
                         </div>
                     </div>
-                    <div class="row-item"  v-if="whiteList.actionbar_click_url_switch&&getFormData('generalTrack')==1">
+                    <!-- <div class="row-item"  v-if="whiteList.actionbar_click_url_switch&&getFormData('generalTrack')==1">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">第三方ActionBar点击监控链接</div>
-                        <!-- <div class="required-item"></div> -->
+                        <div class="required-item"></div>
                         </div>
                         <div class="input-item">
                             <a-form-item  >
@@ -864,18 +879,18 @@
                                 <span style="color: red; position: relative; top: -10px">仅加白使用</span>
                             </a-form-item>        
                         </div>
-                    </div>
-                    <div class="row-item">
+                    </div> -->
+                    <div class="row-item" v-if="whiteList.creative_category_switch==1">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">创意分类</div>
-                        <div class="required-item" v-show="whiteList.creative_category_switch"></div>
+                        <div class="required-item" ></div>
                         </div>
                         <div class="input-item">
                         <a-form-item >
                             <a-cascader
                                 :options="createOptions"
-                                v-decorator="['creativeCategory',{ rules: [{ initialValue:[],required: whiteList.creative_category_switch==1, message: '创意分类必填' }] }]"
+                                v-decorator="['creativeCategory',{ initialValue:[],rules: [{ required: whiteList.creative_category_switch==1, message: '创意分类必填' }] }]"
                                 :fieldNames="fieldNames"
                                 placeholder="请选择创意分类"
                                 
@@ -883,11 +898,11 @@
                         </a-form-item>
                         </div>
                     </div>
-                    <div class="row-item">
+                    <div class="row-item" v-if="whiteList.creative_category_switch==1">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">创意标签</div>
-                        <div class="required-item" v-show="whiteList.creative_category_switch"></div>
+                        <div class="required-item" ></div>
                         </div>
                         <div class="input-item">
                         <a-form-item>
@@ -895,7 +910,7 @@
                             mode="tags"
                             style="width: 100%"
                             placeholder="按回车生成标签"
-                            v-decorator="['creativeTag',{rules: [ {initialValue:[],required: whiteList.creative_category_switch==1, validator: creativeTagValid }]}]"
+                            v-decorator="['creativeTag',{initialValue:[],rules: [ {required: whiteList.creative_category_switch==1, validator: creativeTagValid }]}]"
                             dropdownClassName="display-none-selset"
                             :token-separators="[',', ' ', ',']"
                             >
@@ -1357,6 +1372,12 @@ export default {
     },
     watch: {
         accountId(newValue,oldValue){
+            setTimeout(()=>{
+                 this.form.setFieldsValue({
+                    appId:undefined,
+                    ocpxActionType:undefined
+                })
+            },0)
             if(newValue){
                 // this.treeData.forEach(item=>{
                 //     if(item.children){
@@ -1368,7 +1389,14 @@ export default {
                 //     }
                 // })
                 this.getAppList()
-                
+                getAction('/kuaishou/batch/getIsActivate', {
+                    accountId: this.accountId
+                }).then(res => {
+                    if (res.success) {
+                        this.groupTypeData = res.result
+                        
+                    }
+                })
                
 
                 getAction('/kuaishou/batch/getCreativeCategory', {
@@ -1652,7 +1680,7 @@ export default {
             
             // this.getPageList(val)
             if(this.getFormData('singleAppid')==0){
-                if(val.indexOf(0)>-1){
+                if(val&&val.indexOf(0)>-1){
                     let appidArr=this.appList.map(item=>{
                         return item.appId
                     })
@@ -1671,7 +1699,7 @@ export default {
                 }
             }
             
-           if(val!=undefined || val.length>0){
+           if(val!=undefined || (val&&val.length>0) ){
                 if(this.getFormData('campaignType')==2){
                     
                     if(this.getFormData('singleAppid')==1){
@@ -1935,7 +1963,7 @@ export default {
                     values.appIdArray=values.appId instanceof Array?JSON.stringify(values.appId):JSON.stringify([values.appId])
                     values.appId=undefined;
                     values.agesRange=JSON.stringify(this.agesRange)
-                    values.region=this.region.length?JSON.stringify(this.region):undefined;
+                    values.region=JSON.stringify(this.region);
                     
                     values.convertId=this.convertId==''?undefined:this.convertId;
 
@@ -1968,6 +1996,7 @@ export default {
                     }
                  
                     if(values.creativeCategory&&values.creativeCategory.length>0){
+                        
                         values.creativeCategory=values.creativeCategory[values.creativeCategory.length-1]
                     }else{
                          values.creativeCategory=undefined
@@ -2093,9 +2122,9 @@ export default {
                 appId:undefined,
                 platformOs:e.target.value
             })
-            if(this.getFormData('campaignType')==2 || this.getFormData('campaignType')==7){
-                this.appIdChange(this.getFormData('appId'))
-            }
+            // if(this.getFormData('campaignType')==2 || this.getFormData('campaignType')==7){
+            //     this.appIdChange(this.getFormData('appId'))
+            // }
             
             if(this.sysType==1){
                 this.appList=this.appListAll.filter(item=>{
@@ -2191,9 +2220,10 @@ export default {
                     
                     this.accountId=res.result.accountId;
                     this.description=res.result.description
-                    res.result.creativeCategory=res.result.creativeCategory?[parseInt(res.result.creativeCategory/10000),parseInt(res.result.creativeCategory/100),res.result.creativeCategory]:[]
+                    
                     //  res.result.creativeTag=res.result.creativeTag?res.result.creativeTag:[]
-                    new Promise((resolve,reject)=>{
+                    this.sysType=res.result.platformOs
+                    let fngetIsActivate=new Promise((resolve,reject)=>{
                         getAction('/kuaishou/batch/getIsActivate', {
                             accountId: this.accountId
                         }).then(res => {
@@ -2202,18 +2232,53 @@ export default {
                                 resolve()
                             }
                         })
-                    }).then(r=>{
+                    })
 
-                    
-                    this.form.setFieldsValue({
-                        ...res.result,
-                        creativeTag:res.result.creativeTag?JSON.parse(res.result.creativeTag):[],
-                        useAppMarket:res.result.useAppMarket==1?true:false,
-                        isOpen:res.result.isOpen?res.result.isOpen:0,
-                        cpaBid:res.result.cpaBid/1000,
-                        appId:res.singleAppid?JSON.parse(res.result.appIdArray)[0]:JSON.parse(res.result.appIdArray)
+                    let fngetWhite=new Promise((resolve,reject)=>{
+                        getAction('/kuaishou/batch/getIsActivate', {
+                            accountId: this.accountId
+                        }).then(res => {
+                            if (res.success) {
+                                this.groupTypeData = res.result
+                                resolve()
+                            }
+                        })
                     })
-                    if((this.getFormData('ocpxActionType') == 180 || this.getFormData('ocpxActionType') == 53) && this.groupTypeData.deepConversionTypes&&this.groupTypeData.deepConversionTypes.length > 0){
+
+                    Promise.all([fngetIsActivate,fngetWhite]).then(r=>{
+
+                    
+                    // this.form.setFieldsValue({
+                    //     ...res.result,
+                    //     creativeTag:res.result.creativeTag?JSON.parse(res.result.creativeTag):[],
+                    //     useAppMarket:res.result.useAppMarket==1?true:false,
+                    //     isOpen:res.result.isOpen?res.result.isOpen:0,
+                    //     cpaBid:res.result.cpaBid/1000,
+                    //     appId:res.singleAppid?JSON.parse(res.result.appIdArray)[0]:JSON.parse(res.result.appIdArray)
+                    // })
+              
+                    if(res.result.creativeCategory){
+                        // let arr=[];
+                        if(res.result.creativeCategory>10000){
+                            res.result.creativeCategory=res.result.creativeCategory?[parseInt(res.result.creativeCategory/10000),parseInt(res.result.creativeCategory/100),res.result.creativeCategory]:[];
+                        }else if(res.result.creativeCategory>100){
+                            res.result.creativeCategory=res.result.creativeCategory?[parseInt(res.result.creativeCategory/100),res.result.creativeCategory]:[];
+                        }else{
+                            res.result.creativeCategory=res.result.creativeCategory?[res.result.creativeCategory]:[];
+                        }
+                    }
+                    setTimeout(()=>{                       
+                        this.form.setFieldsValue({
+                             ...res.result,
+                            creativeTag:res.result.creativeTag?JSON.parse(res.result.creativeTag):[],
+                            useAppMarket:res.result.useAppMarket==1?true:false,
+                            isOpen:res.result.isOpen?res.result.isOpen:0,
+                            cpaBid:res.result.cpaBid/1000,
+                            appId:res.singleAppid?JSON.parse(res.result.appIdArray)[0]:JSON.parse(res.result.appIdArray)
+                        })
+                    },0)
+                    if((res.result.ocpxActionType == 180 || res.result.ocpxActionType == 53) && this.groupTypeData.deepConversionTypes&&this.groupTypeData.deepConversionTypes.length > 0){
+                        // console.log(1)
                         setTimeout(()=>{
                         this.form.setFieldsValue({
                             deepConversionType:res.result.deepConversionType,
@@ -2226,11 +2291,11 @@ export default {
                     },0)
                     }
                     
-                    console.log(this.getFormData('deepConversionBid'))
+                    // console.log(this.getFormData('deepConversionBid'))
                     this.noAreaBreak=res.result.noAreaBreak?true:false
                     this.noGenderBreak=res.result.noGenderBreak?true:false
                     this.noAgeBreak=res.result.noAgeBreak?true:false
-                    this.appStore=res.result.appStore?JSON.parse(res.result.appStore):this.appStore
+                    this.appStore=res.result.appStore?JSON.parse(res.result.appStore):[]
                     this.ageArr=[];
                     this.ageArr=JSON.parse(JSON.stringify(ageArr))
                     
@@ -2329,8 +2394,11 @@ export default {
         if(this.$route){
             let editRecordId=this.$route.query.id;
             if(editRecordId){
-                this.editRecordId=editRecordId;
-                this.editEchoPage()
+                this.$nextTick(()=>{
+                    this.editRecordId=editRecordId;
+                    this.editEchoPage()
+                })
+               
             }
         }
     },
@@ -2430,7 +2498,7 @@ export default {
 }
 </script>
 <style lang="scss">
-.newPlan{
+.configLaunchInfo{
 .display-none-selset {
   display: none !important;
 }
@@ -2454,7 +2522,7 @@ export default {
 .ant-tooltip {
   max-width: 450px;
 }
-.newPlan {
+.configLaunchInfo {
   .ant-radio-button-wrapper {
     min-width: 80px;
     text-align: center;
@@ -2495,7 +2563,10 @@ export default {
 }
 </style>
 <style lang="scss" scoped>
-.newPlan {
+.configLaunchInfo {
+    .region{
+        width: 100%;
+    }
   font-family: PingFangSC-Regular, tahoma, arial, 'Hiragino Sans GB', 'Microsoft yahei', sans-serif;
   color: #333;
   ul,

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

@@ -410,9 +410,9 @@
 
                                 <a-select-option :value="2">行为数</a-select-option>
                                 <a-select-option :value="180"
-                                v-if="strategyInfo.marketingGoal == '2' && groupTypeData.isActivate == '1'">激活</a-select-option>
+                                v-if=" groupTypeData.isActivate == '1'">激活</a-select-option>
                                 <a-select-option :value="53" v-if="
-                                    (strategyInfo.marketingGoal == '4' || strategyInfo.marketingGoal == '5') && groupTypeData.isFormSubmit == '1'
+                                     groupTypeData.isFormSubmit == '1'
                                 ">表单提交</a-select-option>
 
                                 <a-select-option :value="394" v-if="

+ 3 - 3
src/views/modules/kuaishouapp/account/copyAllUnit.vue

@@ -197,12 +197,12 @@
         >
           <a-select v-model="item.ocpxActionType">
             <a-select-option :value="2">行为数</a-select-option>
-            <a-select-option :value="180" v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'"
+            <a-select-option :value="180" v-if=" allForm.groupTypeData.isActivate == '1'"
               >激活</a-select-option
             >
             <a-select-option
               :value="53"
-              v-if="(campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'"
+              v-if=" allForm.groupTypeData.isFormSubmit == '1'"
               >表单提交</a-select-option
             >
 
@@ -756,7 +756,7 @@ export default {
         unitNameCheck: false,
         deepConversionType: '',
         deepConversionBid: '',
-        ocpxActionType: this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+        ocpxActionType:  this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
       })
     },
     resData(index) {

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

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

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

@@ -236,9 +236,9 @@
 
                         <a-select-option :value="2">行为数</a-select-option>
                         <a-select-option :value="180"
-                          v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
+                          v-if=" allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
                         <a-select-option :value="53" v-if="
-                            (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
+                             allForm.groupTypeData.isFormSubmit == '1'
                           ">表单提交</a-select-option>
 
                         <a-select-option :value="394" v-if="

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

@@ -239,9 +239,9 @@
 
                         <a-select-option :value="2">行为数</a-select-option>
                         <a-select-option :value="180"
-                          v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
+                          v-if=" allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
                         <a-select-option :value="53" v-if="
-                            (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
+                             allForm.groupTypeData.isFormSubmit == '1'
                           ">表单提交</a-select-option>
 
                         <a-select-option :value="394" v-if="

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

@@ -289,9 +289,9 @@
 
                         <a-select-option :value="2">行为数</a-select-option>
                         <a-select-option :value="180"
-                          v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
+                          v-if=" allForm.groupTypeData.isActivate == '1'">激活</a-select-option>
                         <a-select-option :value="53" v-if="
-                            (campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'
+                             allForm.groupTypeData.isFormSubmit == '1'
                           ">表单提交</a-select-option>
 
                         <a-select-option :value="394" v-if="
@@ -684,7 +684,7 @@
               unitNameCheck: false,
               deepConversionType: '',
               deepConversionBid: '',
-              ocpxActionType:this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+              ocpxActionType: this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
             })
           }else{
             this.$message.error('请选择目标应用之后添加广告组')
@@ -700,7 +700,7 @@
               unitNameCheck: false,
               deepConversionType: '',
               deepConversionBid: '',
-              ocpxActionType:this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+              ocpxActionType: this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
             })
         }
 

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

@@ -388,12 +388,12 @@
         >
           <a-select v-model="item.ocpxActionType">
             <a-select-option :value="2">行为数</a-select-option>
-            <a-select-option :value="180" v-if="campaignType == '2' && allForm.groupTypeData.isActivate == '1'"
+            <a-select-option :value="180" v-if=" allForm.groupTypeData.isActivate == '1'"
               >激活</a-select-option
             >
             <a-select-option
               :value="53"
-              v-if="(campaignType == '4' || campaignType == '5') && allForm.groupTypeData.isFormSubmit == '1'"
+              v-if=" allForm.groupTypeData.isFormSubmit == '1'"
               >表单提交</a-select-option
             >
 
@@ -1947,7 +1947,7 @@ export default {
         unitNameCheck: false,
         deepConversionType: '',
         deepConversionBid: '',
-        ocpxActionType: this.campaignType == '2' && this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
+        ocpxActionType:  this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
       })
     },
     resData(index) {

+ 6 - 6
src/views/modules/kuaishouapp/crossAccount/createUnit.vue

@@ -316,13 +316,13 @@
                     <a-form-model-item label="转化目标" v-if="unitName.bidType == 10">
                       <a-select v-model="unitName.ocpxActionType" style="width: 60%">
                         <a-select-option :value="2">行为数</a-select-option>
-                        <a-select-option :value="180" v-if="item.campaignType == '2' && groupTypeData.isActivate == '1'"
+                        <a-select-option :value="180" v-if=" groupTypeData.isActivate == '1'"
                           >激活</a-select-option
                         >
                         <a-select-option
                           :value="53"
                           v-if="
-                            (item.campaignType == '4' || item.campaignType == '5') && groupTypeData.isFormSubmit == '1'
+                             groupTypeData.isFormSubmit == '1'
                           "
                           >表单提交</a-select-option
                         >
@@ -683,13 +683,13 @@
                   <a-form-model-item label="转化目标" v-if="campaign.unitIdentical.bidType == 10">
                     <a-select v-model="campaign.unitIdentical.ocpxActionType" style="width: 60%">
                       <a-select-option :value="2">行为数</a-select-option>
-                      <a-select-option :value="180" v-if="item.campaignType == '2' && groupTypeData.isActivate == '1'"
+                      <a-select-option :value="180" v-if=" groupTypeData.isActivate == '1'"
                         >激活</a-select-option
                       >
                       <a-select-option
                         :value="53"
                         v-if="
-                          (item.campaignType == '4' || item.campaignType == '5') && groupTypeData.isFormSubmit == '1'
+                           groupTypeData.isFormSubmit == '1'
                         "
                         >表单提交</a-select-option
                       >
@@ -1027,12 +1027,12 @@
               <a-form-model-item label="转化目标" v-if="item.campaignOne.bidType == 10">
                 <a-select v-model="item.campaignOne.ocpxActionType" style="width: 60%">
                   <a-select-option :value="2">行为数</a-select-option>
-                  <a-select-option :value="180" v-if="item.campaignType == '2' && groupTypeData.isActivate == '1'"
+                  <a-select-option :value="180" v-if=" groupTypeData.isActivate == '1'"
                     >激活</a-select-option
                   >
                   <a-select-option
                     :value="53"
-                    v-if="(item.campaignType == '4' || item.campaignType == '5') && groupTypeData.isFormSubmit == '1'"
+                    v-if=" groupTypeData.isFormSubmit == '1'"
                     >表单提交</a-select-option
                   >
                   <a-select-option :value="394" v-if="groupTypeData.isOrderSubmit == '1'">订单提交</a-select-option>

+ 97 - 35
src/views/modules/kuaishouapp/newBatch/index.vue

@@ -184,7 +184,7 @@ li.chouzhen.first:before {
                     </a-form-item>
                   </a-col>
                 </a-row>
-                <a-row>
+                <a-row v-show="getData('campaignType', 'form') == 2">
                   <a-col :xl="14" :md="24">
                     <a-form-item label="推广平台">
                       <a-radio-group
@@ -342,7 +342,7 @@ li.chouzhen.first:before {
                       <div v-if="groupTemplateId == null">无</div>
 
                       <div v-else>
-                        {{ unitInfo.deepConversionType }}
+                        {{ setDeepConversionType(unitInfo.deepConversionType) }}
                       </div>
                     </a-form-item>
                   </a-col>
@@ -354,11 +354,11 @@ li.chouzhen.first:before {
                     </a-form-item>
                   </a-col>
                   <a-col :xl="10" :md="24" :pull="screenWidth >= 1200 ? 4 : 0" v-if="unitInfo.deepConversionBid">
-                    <a-form-item label="深度转化目标出价">
+                    <a-form-item label="深度转化出价">
                       <div v-if="groupTemplateId == null">无</div>
 
                       <div v-else>
-                        {{ unitInfo.deepConversionBid / 1000 }}
+                        {{ unitInfo.deepConversionBid }}
                       </div>
                     </a-form-item>
                   </a-col>
@@ -634,7 +634,9 @@ li.chouzhen.first:before {
               <div style="display: flex; justify-content: space-between; margin-bottom: 100px">
                 <a-button type="primary" @click="checkAppIds"> 预览应用/链接 </a-button>
                 <div>
-                  <a-button type="primary" style="margin-right: 15px" @click="handleSubmit" :loading="sumbitLoading"> 预览广告组 </a-button>
+                  <a-button type="primary" style="margin-right: 15px" @click="handleSubmit" :loading="sumbitLoading">
+                    预览广告组
+                  </a-button>
                   <a-button @click="clearAllData"> 清空配置 </a-button>
                 </div>
               </div>
@@ -1034,12 +1036,11 @@ li.chouzhen.first:before {
               v-if="
                 groupTypeData &&
                 (unitInfo.ocpxActionType == 180 || unitInfo.ocpxActionType == 53) &&
-                groupTypeData.deepConversionTypes.length > 0 &&
-                items.deepConversionType
+                groupTypeData.deepConversionTypes.length > 0
               "
             >
               <a-col :span="16">
-                <a-form-model-item label="深度转化目标出价">
+                <a-form-model-item label="深度转化出价">
                   <a-input-number
                     v-model="unitInfo.deepConversionBid"
                     style="width: 90%"
@@ -1049,7 +1050,7 @@ li.chouzhen.first:before {
                   <br />
                   <span v-if="unitInfo.deepConversionBid && (unitInfo.cpaBid || unitInfo.cpaBid > 0)"
                     >按照两个出价得到的期望目标深度转化率为{{
-                      (unitInfo.cpaBid / unitInfo.deepConversionBid) * 100
+                      ((unitInfo.cpaBid / unitInfo.deepConversionBid) * 100).toFixed(2)
                     }}%</span
                   >
                 </a-form-model-item>
@@ -1089,6 +1090,36 @@ li.chouzhen.first:before {
                 </a-form-model-item>
               </a-col>
             </a-row>
+            <a-row
+              :gutter="16"
+              v-if="
+                groupTypeData &&
+                (unitInfo.ocpxActionType == 180 || unitInfo.ocpxActionType == 53) &&
+                groupTypeData.deepConversionTypes.length > 0
+              "
+            >
+              <a-col :span="16">
+                <a-form-model-item label="深度转化出价">
+                  <a-input-number
+                    v-model="unitInfo.deepConversionBid"
+                    style="width: 90%"
+                    :min="unitInfo.bidMax ? unitInfo.bidMax : 0"
+                    :precision="2"
+                  />元
+                  <br />
+                  <span
+                    v-if="
+                      unitInfo.deepConversionBid &&
+                      (unitInfo.bidMin || unitInfo.bidMin > 0) &&
+                      (unitInfo.bidMax || unitInfo.bidMax > 0)
+                    "
+                    >按照两个出价得到的期望目标深度转化率为{{
+                      ((unitInfo.bidMin / unitInfo.deepConversionBid) * 100).toFixed(2)
+                    }}%~{{ ((unitInfo.bidMax / unitInfo.deepConversionBid) * 100).toFixed(2) }}%</span
+                  >
+                </a-form-model-item>
+              </a-col>
+            </a-row>
           </div>
         </div>
 
@@ -2462,7 +2493,7 @@ export default {
       templateName: '',
       groupCount: 0,
       showCount: false,
-      sumbitLoading:false
+      sumbitLoading: false,
     }
   },
   computed: {
@@ -2534,6 +2565,13 @@ export default {
               this.createOptions = res.result
             }
           })
+          this.getAction('/kuaishou/batch/getIsActivate', {
+            accountId: n,
+          }).then((res) => {
+            if (res.success) {
+              this.groupTypeData = res.result
+            }
+          })
           this.getAction('/kuaishou/batch/getCreativeWordStyles', {
             accountId: n,
           }).then((res) => {
@@ -2642,6 +2680,13 @@ export default {
           this.createOptions = res.result
         }
       })
+      this.getAction('/kuaishou/batch/getIsActivate', {
+        accountId: this.$route.query.accountId,
+      }).then((res) => {
+        if (res.success) {
+          this.groupTypeData = res.result
+        }
+      })
       this.getAction('/kuaishou/batch/getCreativeWordStyles', {
         accountId: this.$route.query.accountId,
       }).then((res) => {
@@ -2778,13 +2823,16 @@ export default {
 
         this.createTiveTemplateId = 'edit'
         this.creativeInfo.overlayType = dataJson.creativeJson.overlayType ? [dataJson.creativeJson.overlayType] : []
-        this.creativeInfo.creativeCategory = dataJson.creativeJson.creativeCategory
-          ? [
-              +(dataJson.creativeJson.creativeCategory + '').substring(0, 1),
-              +(dataJson.creativeJson.creativeCategory + '').substring(0, 3),
-              dataJson.creativeJson.creativeCategory,
-            ]
-          : []
+        this.creativeInfo.creativeCategory =
+          dataJson.creativeJson.creativeCategory > 10000
+            ? [
+                parseInt(dataJson.creativeJson.creativeCategory / 10000),
+                parseInt(dataJson.creativeJson.creativeCategory / 100),
+                dataJson.creativeJson.creativeCategory,
+              ]
+            : dataJson.creativeJson.creativeCategory > 100
+            ? [parseInt(dataJson.creativeJson.creativeCategory / 100), dataJson.creativeJson.creativeCategory]
+            : []
         this.creativeInfo.creativeTag = dataJson.creativeJson.creativeTag
           ? JSON.parse(dataJson.creativeJson.creativeTag)
           : []
@@ -2863,6 +2911,13 @@ export default {
     })
   },
   methods: {
+    setDeepConversionType(typeChange) {
+      // groupTypeData.deepConversionTypes
+      var data = this.groupTypeData.deepConversionTypes.filter((item) => {
+        return item.deepConversionType == typeChange
+      })
+      return data[0].desc
+    },
     checkVideoFun() {
       this.ipagination.current = 1
       this.checkMatemalVisible = true
@@ -3502,7 +3557,7 @@ export default {
       if (sum > dataCount) {
         this.$message.error('最多选择' + dataCount + '个素材')
         this.checkVideo = []
-        this.sumContent = this.sumContent - 50
+        this.sumContent = this.sumContent - this.dataSource.length
 
         if (this.activeTwo == 0) {
           this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
@@ -3643,16 +3698,16 @@ export default {
     getTemplateList() {
       this.loading = true
       this.templateList = []
-      this.getAction('/batch/kuaishouTemplate/list', {
-        accountId: this.accountId,
-        platformOs: this.getData('systemType', 'form') == 'Android' ? 1 : 2,
-        // this.getData('systemType', 'form') == 'Android' ? 1 : 2,
-      }).then((res) => {
+      var params = {}
+      params.accountId = this.accountId
+      if (this.getData('campaignType', 'form') == 2) {
+        params.platformOs = this.getData('systemType', 'form') == 'Android' ? 1 : 2
+      }
+
+      this.getAction('/batch/kuaishouTemplate/list', params).then((res) => {
         this.loading = false
         if (res.success) {
-          this.templateList = res.result.filter((item, index) => {
-            return item.platformOs == 0 || item.platformOs == (this.getData('systemType', 'form') == 'Android' ? 1 : 2)
-          })
+          this.templateList = res.result
           this.templateListAll = JSON.parse(JSON.stringify(this.templateList))
         } else {
           this.templateList = []
@@ -3859,7 +3914,6 @@ export default {
       e.preventDefault()
       this.form.validateFields((err, values) => {
         if (!err) {
-         
           var params = {}
           params.batchId = new Date().getTime()
           if (this.getData('newClick', 'form') == '2') {
@@ -3908,6 +3962,7 @@ export default {
               bid: this.unitInfo.bid ? this.unitInfo.bid * 1000 : null,
               bidMax: this.unitInfo.bidMax ? this.unitInfo.bidMax * 1000 : null,
               bidMin: this.unitInfo.bidMin ? this.unitInfo.bidMin * 1000 : null,
+              deepConversionBid: this.unitInfo.deepConversionBid ? this.unitInfo.deepConversionBid * 1000 : null,
             }
           } else {
             this.$message.error('请填写组内容')
@@ -4261,7 +4316,7 @@ export default {
           params.bid = this.unitInfo.bid ? this.unitInfo.bid * 1000 : 0
           params.bidMax = this.unitInfo.bidMax ? this.unitInfo.bidMax * 1000 : 0
           params.bidMin = this.unitInfo.bidMin ? this.unitInfo.bidMin * 1000 : 0
-
+          params.deepConversionBid = this.unitInfo.deepConversionBid ? this.unitInfo.deepConversionBid * 1000 : 0
           //      allianceAccount: '1',
           // dayBudgetType: '1',
           // unitTime: '1',
@@ -4364,13 +4419,16 @@ export default {
             // params.stickerTitle = this.creativeInfo.overlayType.length > 0 ? this.creativeInfo.stickerTitle : null
             this.createTiveTemplateId = data.id
             this.creativeInfo.overlayType = data.overlayType ? [data.overlayType] : []
-            this.creativeInfo.creativeCategory = data.creativeCategory
-              ? [
-                  +(data.creativeCategory + '').substring(0, 1),
-                  +(data.creativeCategory + '').substring(0, 3),
-                  data.creativeCategory,
-                ]
-              : []
+            this.creativeInfo.creativeCategory =
+              data.creativeCategory > 10000
+                ? [
+                    parseInt(data.creativeCategory / 10000),
+                    parseInt(data.creativeCategory / 100),
+                    data.creativeCategory,
+                  ]
+                : data.creativeCategory > 100
+                ? [parseInt(data.creativeCategory / 100), data.creativeCategory]
+                : []
             this.creativeInfo.creativeTag = data.creativeTag ? JSON.parse(data.creativeTag) : []
             this.creativeInfo.actionBarText = data.actionBarText
             this.creativeInfo.stickerTitle = data.stickerTitle
@@ -4470,6 +4528,10 @@ export default {
           // console.log('Received values of form: ', values)
           var params = { ...values }
           params.id = this.campaignTemplateId
+            ? this.campaignTemplateId == 'edit'
+              ? null
+              : this.campaignTemplateId
+            : null
           params.accountId = this.accountId
           params.systemType = this.getData('systemType', 'form')
           params.campaignType = this.getData('campaignType', 'form')

+ 468 - 62
src/views/modules/stockWatch/accountPage.vue

@@ -46,22 +46,67 @@
                         <div class="item">
                             <div class="todyCost">
                                 <span>{{667.15 | decimalsHandle}}</span>
-                                <span>
-                                    <a-icon type="rise" />
-                                    <a-icon type="fall" />
+                                <span class="sign">
+                                    <a-icon type="rise"  class="rise"/>
+                                    <!-- <a-icon type="fall" class="fall" /> -->
                                 </span>
                             </div>
                             <div class="yesterdayCost">
                                 /昨日:{{407.16 | decimalsHandle}}
                             </div>
-                            <div class="IndexName">
+                            <span class="IndexName" :class="{'IndexNameActive':isActive==1}" @click="getActiveIndexName(1)">
+                                激活成本
+                            </span>
+                        </div>
+                        <div class="item">
+                            <div class="todyCost">
+                                <span>{{667.15 | decimalsHandle}}</span>
+                                <span class="sign">
+                                    <a-icon type="rise"  class="rise"/>
+                                    <!-- <a-icon type="fall" class="fall" /> -->
+                                </span>
+                            </div>
+                            <div class="yesterdayCost">
+                                /昨日:{{407.16 | decimalsHandle}}
+                            </div>
+                            <span class="IndexName" :class="{'IndexNameActive':isActive==2}" @click="getActiveIndexName(2)">
                                 激活数
+                            </span>
+                        </div>
+                        <div class="item">
+                            <div class="todyCost">
+                                <span>{{667.15 | decimalsHandle}}</span>
+                                <span class="sign">
+                                    <a-icon type="rise"  class="rise"/>
+                                    <!-- <a-icon type="fall" class="fall" /> -->
+                                </span>
+                            </div>
+                            <div class="yesterdayCost">
+                                /昨日:{{407.16 | decimalsHandle}}
                             </div>
+                            <span class="IndexName" :class="{'IndexNameActive':isActive==3}" @click="getActiveIndexName(3)">
+                                激活数
+                            </span>
+                        </div>
+                        <div class="item">
+                            <div class="todyCost">
+                                <span>{{667.15 | decimalsHandle}}</span>
+                                <span class="sign">
+                                    <a-icon type="rise"  class="rise"/>
+                                    <!-- <a-icon type="fall" class="fall" /> -->
+                                </span>
+                            </div>
+                            <div class="yesterdayCost">
+                                /昨日:{{407.16 | decimalsHandle}}
+                            </div>
+                            <span class="IndexName" :class="{'IndexNameActive':isActive==4}" @click="getActiveIndexName(4)">
+                                激活数
+                            </span>
                         </div>
                     </div>
-                    <div class="echart">
+                    <div class="echart" style="margin-top:10px">
                         <a-spin :spinning="accountIndexEchartSpinning">
-                        <div class="accountIndexEchart" id="accountIndexEchart"  style='width:100%;height:350px;margin:0 auto;' ref="accountIndexEchart"></div>
+                            <div class="accountIndexEchart" id="accountIndexEchart"  style='width:100%;height:160px;margin:0 auto;' ref="accountIndexEchart"></div>
                         </a-spin>
                     </div>
                 </div>
@@ -112,7 +157,7 @@
                 </div>
                 <div class="table">
                     <a-table
-                    :columns="columns"
+                    :columns="newColumns"
                     :data-source="data"
                     
                     :pagination="ipagination"
@@ -302,13 +347,66 @@
             </div>
             </a-spin>
         </div>
+
+
+
+        <!-- 修改检测链接的modal -->
+        <a-modal v-model="linkVisible" title="修改链接" @ok="linkhandleOk" :width='800'>
+            <div class="linkBody">
+                <a-row>
+                    <a-col :span="4">
+                        <p style="text-align:right">第三方检测链接:</p>
+                    </a-col>
+                    <a-col :span="18">
+                        <span>{{"https://www.baidu.com/s?wd=echart%E5%AE%9E%E7%8E%B0%E4%B8%A4%E4%B8%AAx%E8%BD%B4%E4%B8%A4%E4%B8%AAy%E8%BD%B4&rsv_spt=1&rsv_iqid=0x9a6bd47e00238246&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_dl=tb&rsv_sug3=43&rsv_sug1=35&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=16314&rsv_sug4=17094"}}</span>
+                    </a-col>
+                </a-row>
+                <p></p>
+                <a-row>
+                    <a-col :span="4">
+                        <p style="text-align:right">修改链接:</p>
+                    </a-col>
+                    <a-col :span="18">
+                        <a-input placeholder="请输入监测链接" style="300px"  v-model="newLink"/>
+                    </a-col>
+                </a-row>
+            </div>
+        </a-modal>
+        <!-- 修改定向的modal -->
+        <a-modal v-model="targetVisible" title="修改定向" @ok="targethandleOk">
+            <div class="linkBody">
+                <a-row>
+                    <a-col :span="4">
+                        <p style="text-align:right">已有定向包:</p>
+                    </a-col>
+                    <a-col :span="18">
+                        <span>DM2021</span>
+                    </a-col>
+                </a-row>
+                <p></p>
+                <a-row>
+                    <a-col :span="4">
+                        <p style="text-align:right">修改定向包:</p>
+                    </a-col>
+                    <a-col :span="18">
+                        <a-select size="default" default-value="a1" style="width: 200px" >
+                            <a-select-option v-for="i in 25" :key="(i + 9).toString(36) + i">
+                                {{ (i + 9).toString(36) + i }}
+                            </a-select-option>
+                        </a-select>
+                    </a-col>
+                </a-row>
+                
+            </div>
+        </a-modal>
+         <customColumn :visible='visible'  :listNum='listNum' :fiexColumn='columnsFixd' :mediaType='2'  @closeCustomColumn='closeCustomColumn' @changeColumn='changeColumn' />
     </div>
 </template>
 
 <script>
 import moment from 'moment'
 import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
-
+import customColumn from './modules/customColumn.vue'
 import qs from 'qs'
 // 引入基本模板
 var echarts = require('echarts')
@@ -325,7 +423,7 @@ require('echarts/lib/component/graphic')
 require('echarts/lib/component/toolbox')
 require('echarts/lib/component/legend')
 
-const columns = [
+const newColumns = [
   
   
    {
@@ -505,17 +603,59 @@ const indexValue = [
     },
 ]
     
+const columnsFixd = [
+    {
+        title: '消耗',
+        dataIndex: 'cost',     
+        key:'date',
+    },
+  
+]
 
+const columns=[
+    {
+        title: '激活成本',
+        dataIndex: 'cost',     
+        key:'date',
+    },
+    {
+        title: '激活数',
+        dataIndex: 'cost',     
+        key:'date',
+    },
+    {
+        title: '行为数',
+        dataIndex: 'cost',     
+        key:'date',
+    },
+    {
+        title: '表单提交数',
+        dataIndex: 'cost',     
+        key:'date',
+    },
+]
     export default {
         name:'accountPage',
+         components:{
+            // DatePicker,
+            customColumn,
+        },
         data() {
             return {
+                columnsFixd,
+                columns:[...columnsFixd,...columns],
+                visible:false,
+                listNum:[],
+                newLink:'',
+                linkVisible:false,
+                targetVisible:false,
+                isActive:1,
                 moment,
                 materialDate:[moment().subtract(1,'days'),moment().subtract(1,'days')],
                 currentAccount:{},
                 dateValue:[moment(),moment()],
                 data:[],
-                columns:[...columns],           
+                newColumns:[...newColumns],           
                 loading:false,
                 ipagination: {
                     current: 1,
@@ -572,9 +712,61 @@ const indexValue = [
                 planBodyEchartSpinning:false,
             }
         },
+        
         methods: {
-            showIndexChangeBox(){
+            //自定义之后修改父元素表头
+            changeColumn(val){
+                this.columns=[...val];
+                this.columns=[...val];
+                if(this.columns.length> this.columnsFixd.length&&this.columns.length<8){
+                this.columns.forEach((element,index) => {
+                    if(index<this.columns.length-1){
+                    element.width='auto'
+                    element.fixed=false
+                    }             
+                });
+
+                // this.scrollX=2000+200*(this.columns.length-this.columnsFixd.length)
+                }else if(this.columns.length>=8){
+                this.columns.forEach((element,index) => {
+                    if(index<this.columnsFixd.length){
+                    element.width=200
+                    element.fixed='left'
+                    }             
+                });
+
+                this.scrollX=1000+200*(this.columns.length-this.columnsFixd.length)
+                } else{
+                this.scrollX=0;
+                this.columns.forEach(element => {
+                    element.width='auto'
+                    element.fixed=false
+                });
+                }
+            },
+            closeCustomColumn(){
+                this.visible=false;
+            },
+             //弹出框打开,自定义列
+            customColumns() {
+                this.visible = true
+                this.listNum = [...this.columns]
+            },
+            // 监测链接修改OK事件
+            linkhandleOk(e){
+                this.linkVisible=true
+            },
+            // 定向包修改OK事件
+            targethandleOk(e){
+                this.targetVisible=true
+            },
 
+            getActiveIndexName(val){
+                this.isActive=val
+            },
+            showIndexChangeBox(){
+                this.visible=true;
+                this.listNum = [...this.columns]
             },
             disabledDate(current) {
                 return current && current > moment() && current < moment().subtract(1,'months')
@@ -585,6 +777,83 @@ const indexValue = [
             materialDataChange(date, dateString){
                 console.log(date, dateString)
             },
+            initAccountIndexEchart(type,data){
+                // let type='激活'
+                let option = {
+                    tooltip: {
+                        trigger: 'axis',
+                        formatter: `${type}<br />{a0}  {b0}: {c0}<br />{a1}  {b1}: {c1}`
+                    },
+                    grid:{
+                        left:'5px',
+                        top:0,
+                        right:'5px',
+                        bottom:0
+                    },
+                    xAxis: {
+                        type: 'category',
+                        show:false,
+                        boundaryGap: false,
+                        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+                    },
+                    yAxis: {
+                        type: 'value',
+                        show:false,
+                    },
+                    series: [
+                        {
+                        name: '今天',
+                        data: [820, 932, 901, 934, 1290, 1330, 1320],
+                        type: 'line',
+                        smooth: true,
+                        showSymbol: false,
+                        symbol: 'circle',
+                        lineStyle: {                               
+                            color: '#2461F1',   
+                            width: 3,
+                        },
+                        itemStyle:{
+                            color:'#2461F1',
+                            borderWidth:2,
+                            borderColor:'#fff'
+                        },
+                        areaStyle: {
+                            color:{
+                                type: 'linear',
+                                x: 0,
+                                y: 0,
+                                x2: 0,
+                                y2: 1,
+                                colorStops: [{
+                                    offset: 0, color: '#2461F1' // 0% 处的颜色
+                                }, {
+                                    offset: 1, color: 'white' // 100% 处的颜色
+                                }],
+                            }
+                        }
+                    },
+                    {
+                        name: '昨天',
+                        data: [800, 962, 930, 950, 1200, 1380, 1420],
+                        type: 'line',
+                        smooth: true,
+                        showSymbol: false,
+                        symbol: 'circle',
+                        lineStyle: {                               
+                            color: '#3CC6A5',   
+                            width: 3,
+                        },
+                        itemStyle:{
+                            color:'#3CC6A5',
+                            borderWidth:2,
+                            borderColor:'#fff'
+                        },
+                        
+                    }
+                    ]
+                };
+                return option
+            },  
             initGaugechart(value){
                 var dataArr = value;
                 var colorSet = {
@@ -834,43 +1103,78 @@ const indexValue = [
             },
             initMaterialChart(data){
                 let  option={
-                    
-                    tooltip: {
-                        trigger: 'axis'
-                    },
                     legend: {
                         data: ['新上计划数', '新上组数', '新上创意数']
                     },
-                    xAxis: {
-                        type: 'category',
-                        data: ['新上素材数量', '新上素材使用数', '素材总数', '有效素材', '爆量素材', '新上素材使用率'],
-                        axisLine: {
-                            show:false,
-                        
+                    xAxis:[
+                        {   
+                            // name:"a",
+                            type: 'category',
+                            data: ['新上素材数量', '新上素材使用数',  '有效素材', '爆量素材', '新上素材使用率',''],
+                            axisLine: {
+                                show:false,
+                            
+                            },
+                            axisTick:{
+                                show:false,
+                            }
                         },
-                        axisTick:{
+                        {   
+                            // name:"b",
+                            type: 'category',
+                            data: ['素材总数','','','','',''],
+                            nameLocation: 'end',
+                            axisLine: {
+                                show:false,
+                            
+                            },
+                            axisTick:{
+                                show:false,
+                            },
+                            position: 'bottom',
+                            inverse: true
+                        },
+                    
+                    
+                    ] ,
+                    yAxis:[
+                        {
+                            type: 'value',
                             show:false,
-                        }
-                    },
-                    yAxis: {
-                        type: 'value',
-                        show:false,
-                        axisLine: {
-                            onZero: false,
+                            axisLine: {
+                                onZero: false,
+                                show:false,
+                                color: '#999',
+                                lineStyle: {
+                                    color: '#999'
+                                }
+                            },
+                        },
+                        {
+                            type: 'value',
                             show:false,
-                            color: '#999',
-                            lineStyle: {
-                                color: '#999'
-                            }
+                            axisLine: {
+                                onZero: false,
+                                show:false,
+                                color: '#999',
+                                lineStyle: {
+                                    color: '#999'
+                                }
+                            },
+                            position: 'right',
+                            // inverse: true
                         },
-                    },
+                        
+                        
+                    ] ,
                     
                     series: [
                         {   
                             
-                            data: [820, 932, 901, 934, 1290, 1330, 1320],
+                            data: [820, 932, 901, 934, 1290 ],
                             type: 'bar',
                             barWidth: '30%',
+                            xAxisIndex:0,
                             label:{
                                 show:true,
                                 position:'top',
@@ -895,6 +1199,37 @@ const indexValue = [
                                 
                             },
                         },
+                        {   
+                            
+                            data: [13200000000],
+                            type: 'bar',
+                            barWidth: '30%',
+                            xAxisIndex:1,
+                            yAxisIndex:1,
+                            label:{
+                                show:true,
+                                position:'top',
+                                distance: 10 ,
+
+                            },
+                            backgroundStyle:{
+                                borderRadius:[0, 0, 5, 5],
+                            },
+                            itemStyle:{
+                                
+                                // normal: {
+                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                                        offset: 0,
+                                        color: '#7820FF'
+                                    }, {
+                                        offset: 1,
+                                        color:  '#3470FF'
+                                    }]),
+                                    barBorderRadius:[10, 10, 0, 0],
+                                // },
+                                
+                            },
+                        },
                         
                     ]
                 }
@@ -1005,30 +1340,22 @@ const indexValue = [
 
 
             getPieOption(){
+                const colorList = ['#58D5FF', '#73ACFF', '#FDD56A', '#FDB36A', '#FD866A','#9E87FF']
                 let option = {
-                    // title: {
-                    //     text: '南丁格尔玫瑰图',
-                    //     subtext: '纯属虚构',
-                    //     left: 'center'
-                    // },
+                    
                     tooltip: {
                         trigger: 'item',
                         formatter: '{a} <br/>{b} : {c} ({d}%)'
                     },
                     legend: {
                         orient: 'vertical',
-                        left: '10%',
+                        left: '3%',
                         top:'center',
                         
                     },
                     toolbox: {
                         show: true,
-                        feature: {
-                            mark: {show: true},
-                            dataView: {show: true, readOnly: false},
-                            restore: {show: true},
-                            saveAsImage: {show: true}
-                        }
+                        
                     },
                     series: [
                         {
@@ -1037,18 +1364,27 @@ const indexValue = [
                             radius: [20, 140],
                             center: ['55%', '50%'],
                             roseType: 'area',
+                            labelLine:{
+                                length:5,
+                                length2:5
+                            },
+                            label:{
+                                position:'outside'
+                            },
                             itemStyle: {
-                                borderRadius: 5
+                                borderRadius: 5,
+                                color: (params) => {
+                                    return colorList[params.dataIndex]
+                                }
                             },
                             data: [
                                 {value: 30, name: 'rose 1'},
-                                {value: 28, name: 'rose 2'},
-                                {value: 26, name: 'rose 3'},
-                                {value: 24, name: 'rose 4'},
-                                {value: 22, name: 'rose 5'},
-                                {value: 20, name: 'rose 6'},
-                                {value: 18, name: 'rose 7'},
-                                {value: 16, name: 'rose 8'}
+                                {value: 25, name: 'rose 2'},
+                                {value: 22, name: 'rose 3'},
+                                {value: 20, name: 'rose 4'},
+                                {value: 16, name: 'rose 5'},
+                                {value: 10, name: 'rose 6'},
+
                             ]
                         }
                     ]
@@ -1131,7 +1467,7 @@ const indexValue = [
             echartIndexChange(val){
                 console.log(`Selected: ${val}`);
                 let type=this.handlerTypeOfIndex(val);
-
+                console.log(type)
                 this.initEchart('adPositionEchart',this.initAdpositionChart(type,[]))
                 this.initEchart('ageEchart',this.initAdpositionChart(type,[]))
                 this.initEchart('genderEchart',this.initAdpositionChart(type,[]))
@@ -1197,11 +1533,14 @@ const indexValue = [
 
 
             handlerTypeOfIndex(val){
-                return this.indexValue.map(item=>{
+                let type=''
+                this.indexValue.forEach(item=>{
                     if(item.value==val){
-                        return item.type
+                        type= item.type
                     }
                 })
+
+                return type
             }
         },
         mounted() {
@@ -1209,6 +1548,9 @@ const indexValue = [
                 this.initEchart('gaugeEchart',this.initGaugechart(30))
                 this.initEchart('newDataEchart',this.initNewDataChart())
                 this.initEchart('materialEchart',this.initMaterialChart())
+                this.initEchart('accountIndexEchart',this.initAccountIndexEchart('激活',[]))
+                this.echartIndexChange('cost')
+                
             })
             
         },
@@ -1288,6 +1630,7 @@ const indexValue = [
 <style lang="scss" scoped>
 // #
 .accountPage{
+    
     .echart{
         margin-top: 30px;
     }
@@ -1312,7 +1655,7 @@ const indexValue = [
     }
     .accountBodyRight{
         width: 25%;
-        flex-shrink: 0;
+        // flex-shrink: 0;
         padding: 25px;
     }
     .accountBodyLeft,.accountBodyRight{
@@ -1370,20 +1713,83 @@ const indexValue = [
         .top{
             display: flex;
             justify-content: space-between;
+            padding-top: 8px;
         }
         .item{
             width: 20%;
+            min-width: 100px;
+            
+        }
+        .todyCost{
+            font-size: 2em;
+            font-weight: 700;
+            color:#303133;
+            margin-bottom: 10px;
+            width: 100%;
+            
+        }
+        .sign{
+            font-size: 18px;
+            .rise{
+                color: #F2637B;
+                width: 16px;
+                height: 16px;
+                text-align: center;
+                // background-color: #F2637B;
+                // border-radius: 50%;
+                // color: white;
+                // font-size: 14px;
+                transform: rotate(-30deg);
+            }
+            .fall{
+                color: green;
+            }
+            .up{
+                width: 16px;
+                height: 16px;
+                text-align: center;
+                background-color: #F2637B;
+                border-radius: 5px;
+                color: white;
+            }
+        }
+        .yesterdayCost{
+            font-size: 15px;
+            font-weight: 500;
+            color:#303133;
+            margin-bottom:8px ;
+        }
+        .IndexName{
+            font-size: 15px;
+            font-weight: 600;
+            color:#303133;
+            display: inline-block;
+            cursor: pointer;
+        }
+        .IndexNameActive{
+            color:#2461F1;
+        }
+        .IndexNameActive::after{
+            content: '';
+            display: block;
+            width: 15px;
+            height: 3px;
+            background: #2461F1;
+            position: relative;
+            top: 5px;
+            left: 50%;
+            margin-left: -8px;
         }
-
         .showIndex{
             position: absolute;
             top: -5px;
             right: 0px;
-            font-size: 14px;
+            font-size: 12px;
             cursor: pointer;
+            color: #909399;
         }
         .showIndex:hover{
-            color:#1890ff
+            color:#2461F1
         }
     }
 

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

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

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

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

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

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

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

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

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

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

Datei-Diff unterdrückt, da er zu groß ist
+ 490 - 434
src/views/system/modules/UserModal.vue


+ 1 - 1
src/views/user/Login.vue

@@ -8,7 +8,7 @@
     <a-form :form="form" class="user-layout-login" ref="formLogin" id="formLogin">
       <a-tabs :activeKey="customActiveKey" :tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"
         @change="handleTabClick">
-        <a-tab-pane key="tab1" tab="企业微信扫码登录">
+        <a-tab-pane key="tab1" tab="企业微信扫码登录" forceRender>
           <a-form-item>
             <div id="wx_reg" style="display:flex;justify-content: center;margin-top:15px"></div>
             <div style="display:flex;justify-content: center;color:red;font-size:16px;">