Prechádzať zdrojové kódy

盯盘运营经理修改、账户页面修改接口

liubei@c-top.com.cn 3 rokov pred
rodič
commit
d52511b6f4

+ 4 - 1
.env.development

@@ -19,4 +19,7 @@ VUE_APP_BASE_MATERIAL_URL = http://192.168.0.195:9999/material
 # 测试环境 http://192.168.0.195:9999
 # 西安环境 http://192.168.1.59:7006
 
-
+#盯盘相关接口
+VUE_APP_BASE_STARE_URL = http://192.168.0.195:9999/material
+# 字安接口 http://192.168.1.43:9999
+# 测试环境 http://192.168.0.195:9999

BIN
src/assets/greendown.png


BIN
src/assets/upred.png


+ 78 - 31
src/views/modules/stockWatch/modules/new-keepManage/account-newkeepManage.vue

@@ -34,7 +34,8 @@
 
                 <a-card class="card-content echarts-card" style="margin-bottom: 20px;">
                 <div slot="title">
-                    <span style="font-weight: bolder;">数据趋势</span> &nbsp;&nbsp; <span style="font-size: 12px;">更新时间:{{updateTime | formatDate}}</span> 
+                    <span style="font-weight: bolder;">数据趋势</span>
+                     <!-- &nbsp;&nbsp; <span style="font-size: 12px;">更新时间:{{updateTime | formatDate}}</span>  -->
                 </div>
                 <div class="person-content-title" slot="extra">
                     <div class="content-title-acount"></div>
@@ -91,11 +92,19 @@
                 id="outTable"
                 :pagination="false"
                 :loading="echartsLoading"
-                :scroll="{ x: scrollX }"
                 ref="accountTable"
+                :scroll="{ x: scrollX }"
                 >
-                <span slot="unitStatus" slot-scope="text, record">
-                    <a-switch :checked="text === 0" />
+                <!-- <span slot="status" slot-scope="text, record">
+                    <a-switch :checked="text == 1"  @change="switchChange(text,record)"/>
+                </span> -->
+                <span slot="status" slot-scope="text,record">
+                    <a-spin :spinning="record.spin" size="small" >
+                        <div class="spin-content">
+                            <a-switch size="default" :checked='text==1'  @change="switchChange(text,record)"/>
+                        </div>
+                    </a-spin>    
+                    
                 </span>
                 <span slot="operator" slot-scope="text,record">
                     <a-popover v-model="record.visible" trigger="click" placement="topLeft" @visibleChange='visibleChange'>
@@ -149,7 +158,8 @@
             
             <a-card class="card-content echarts-card" style="margin-bottom: 20px;">
                 <div slot="title">
-                  <span style="font-weight:bolder">素材相关</span>  &nbsp;&nbsp; <span style="font-size: 12px;">更新时间:{{updateRelated | formatDate}}</span> 
+                  <span style="font-weight:bolder">素材相关</span> 
+                   <!-- &nbsp;&nbsp; <span style="font-size: 12px;">更新时间:{{updateRelated | formatDate}}</span>  -->
                 </div>
                 <div class="person-content-title" slot="extra">
                     <div class="content-title-acount"></div>
@@ -305,8 +315,8 @@
                 targetVisible:false,
                 listNum:[],
                 visible:false,
-                scrollX: 1500,
-                columnsFixd:keepPersonData.setNoDeleteColumns(),
+                scrollX:1500,
+                columnsFixd:keepPersonData.groupDelivery(),
                 valueBtn:['花费'],
                 plainOptions:[
                     {label:'花费',value:'花费'},
@@ -330,13 +340,14 @@
                     dataIndex: 'status',
                     key: 'status',
                     align: 'center',
-                    scopedSlots: { customRender: 'unitStatus' },
+                    scopedSlots: { customRender: 'status' },
                     },
                     {
                     title: '组名称',
                     dataIndex: 'unitName',
                     key: 'unitName',
                     align: 'center',
+                    width:300,
                     },{
                     title: '花费',
                     dataIndex: 'charge',
@@ -366,13 +377,13 @@
                     dataIndex: 'operationAgree',
                     key: 'operationAgree',
                     align: 'center',
+                   
                     },{
                     title: '操作',
                     dataIndex: 'operator',
                     key: 'operator',
                     align: 'center',
                     scopedSlots: { customRender: 'operator' },
-                    width:150
                     },
                 ],
                 sourceMaterial:[
@@ -484,6 +495,7 @@
       }
     },
         mounted() {
+            this.showColumn();
             // 获取折线图
             this.getQueryNewlyData();
             // 第一个饼图
@@ -493,10 +505,36 @@
             this.getAccountNameData();
             this.getGroupLaunchData();
             this.getEchartOnePieData();
-            this.showColumn();
+           
         },
         
         methods: {
+             //状态改变
+             switchChange(text,record){
+                // this.spinning=true;
+                // console.log(res);(text,record)
+                record.spin=true;
+                
+                
+                let putStatus=text==1?2:1;
+                postAction(`/kuaishou/batch/batchUpdateUnitStatus`,{
+                    accountId:this.accountId,
+                    unitIds:[record.unit_id],
+                    id:record.id,
+                    putStatus
+                }).then((res)=>{
+                    
+                        record.spin=false;
+                    if(res.success){
+                        this.getGroupDataList()
+                        this.$message.success(res.message)
+                    }else{
+                        this.$message.error(res.message)
+                    }
+                })
+            
+
+            },
              // 自定义列
              customColumn(){
                 this.visible = true;
@@ -508,7 +546,7 @@
             },
             showColumn() {
             this.postDataAction('/toutiao/videoReportDaily/getColumnJson', {
-                columnType: 102,
+                columnType: 103,
             }).then((res) => {
                 // console.log(res)
                 if (res.success) {
@@ -530,7 +568,7 @@
                     }
                 }
 
-                this.changeColumn(this.columns)
+                // this.changeColumn(this.columns)
                 }
             })
         },
@@ -543,7 +581,7 @@
                    
                     element.width = 'auto'
                     element.fixed = false
-                    
+                    element.visible = false
                 }
                 })
 
@@ -552,8 +590,11 @@
             else if (this.columns.length >= 8) {
                 this.columns.forEach((element, index) => {
                     if (index < this.columnsFixd.length) {
-                        element.width = 150
-                        element.fixed = 'left'
+                       
+                           element.width = 180
+                            element.fixed = 'left'
+                        element.visible = false
+                             
                     }
                 })
 
@@ -565,14 +606,14 @@
 
                     element.width = 'auto'
                     element.fixed = false
-                    
+                    element.visible = false
                 })
             }
 
             let arr = JSON.stringify(this.columns)
             this.postDataAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
                 json: arr,
-                columnType: 102,
+                columnType: 103,
             }).then((res) => {
                 // console.log(res)
             })
@@ -783,8 +824,14 @@
                     pageNum:this.tablePag.pageNum,
                     pageSize:this.tablePag.pageSize
                 }
-                getAction('/kuaishou/realTime/getUnitDateInfo',params).then(res=>{
+                getAction('http://139.186.29.76:8804/jeecg-boot/kuaishou/realTime/getUnitDateInfo',params).then(res=>{
                     if (res.code == 200) {
+                        res.result.forEach((item)=>{
+                            // item.key=item.id;
+                            // item.show=false;
+                            item.visible=false;
+                            item.spin=false;
+                        })
                         this.updateTimeGroup = res.timestamp;
                         this.echartsData = res.result
                         this.totalAll = res.result[0].totalCount
@@ -818,14 +865,14 @@
                     getAction('/kuaishou/dingpan/updateBid',{
                         accountId:record.accountId,
                         bid:this.newBid*1000,
-                        unitId:record.unitId,
+                        unitId:record.unit_id,
                         bidType:record.bidType
                     }).then(res=>{
                         // console.log(res);(res)
                         if(res.code==0){
                             this.$message.success(res.message)
                             this.newBid=undefined;
-                            this.getLaunchData()
+                            this.getGroupDataList()
                         }
                         
                     })
@@ -860,7 +907,7 @@
                 this.targetVisible=false;
                 getAction('/kuaishou/dingpan/updateTemplate',{
                     accountId:this.accountId,
-                    unitId:this.currentUnit.unitId,
+                    unitId:this.currentUnit.unit_id,
                     templateId:this.selectDirectionalId
                 }).then(res=>{
                     
@@ -878,7 +925,7 @@
                 this.linkVisible=true;
                 getAction('/kuaishou/dingpan/getClickTrackUrlByUnitId',{
                     accountId:this.accountId,
-                    unitId:record.unitId
+                    unitId:record.unit_id
                 }).then(res=>{
                     // console.log(res);(res);
                     if(res.result){
@@ -892,7 +939,7 @@
                 this.linkVisible=false;
                 getAction('/kuaishou/dingpan/updateClickTrackUrlByUnitId',{
                     accountId:this.accountId,
-                    unitId:this.currentUnit.unitId,
+                    unitId:this.currentUnit.unit_id,
                     clickTrackUr:this.newLink
                 }).then(res=>{
                     // console.log(res);(res)
@@ -932,11 +979,11 @@
                                 today.data = res.result.map(itemprice=>{
                                 return itemprice.tCost
                                 });
-                                today.name = '花费(today)'
+                                today.name = '花费(今天)'
                                 yesterday.data = res.result.map(itemyes=>{
                                 return itemyes.yCost
                                 });
-                                yesterday.name = '花费(yesterday)'
+                                yesterday.name = '花费(昨天)'
                            }else{
                             today.data = [];
                             today.name = '';
@@ -949,12 +996,12 @@
                                 activation.data = res.result.map(itemprice=>{
                                 return itemprice.tActivationPrice
                                 });
-                                activation.name = '激活成本(today)'
+                                activation.name = '激活成本(今天)'
 
                                 activationyes.data = res.result.map(itemyes=>{
                                 return itemyes.yActivationPrice
                                 });
-                                activationyes.name = '激活成本(yesterday)'
+                                activationyes.name = '激活成本(昨天)'
                            }else{
                             activation.data = [];
                             activation.name = '';
@@ -967,12 +1014,12 @@
                                 pay.data = res.result.map(itemprice=>{
                                 return itemprice.tEventNewUserPayCost
                                 });
-                                pay.name = '新增付费成本(today)'
+                                pay.name = '新增付费成本(今天)'
 
                                 payyes.data = res.result.map(itemyes=>{
                                 return itemyes.yEventNewUserPayCost
                                 });
-                                payyes.name = '新增付费成本(yesterday)'
+                                payyes.name = '新增付费成本(昨天)'
                            }else{
                             pay.data = [];
                             pay.name = '';
@@ -985,12 +1032,12 @@
                                 Secondary.data = res.result.map(itemprice=>{
                                 return itemprice.tLeave
                                 });
-                                Secondary.name = '次留率(today)'
+                                Secondary.name = '次留率(今天)'
 
                                 Secondaryyes.data = res.result.map(itemyes=>{
                                 return itemyes.yLeave
                                 });
-                                Secondaryyes.name = '次留率(yesterday)'
+                                Secondaryyes.name = '次留率(昨天)'
                            }else{
                             Secondary.data = [];
                             Secondary.name = '';

+ 1 - 14
src/views/modules/stockWatch/modules/new-keepManage/acountProjectData.js

@@ -1220,20 +1220,7 @@ export const KScustomFields= [
                 align: 'center',
                 scopedSlots: { customRender: 'formCountPrice' },
                 sorter: (a, b) => a.formCountPrice - b.formCountPrice,
-              },{
-                title: '操作建议',
-                dataIndex: 'operationAgree',
-                tip: '',
-                align: 'center',
-                scopedSlots: { customRender: 'operationAgree' },
-            },{
-                title: '操作',
-                dataIndex: 'operator',         
-                tip: '',
-                align: 'center',
-                width:150,
-                scopedSlots: { customRender: 'operator' },
-              },
+              }
 
 
 

+ 32 - 15
src/views/modules/stockWatch/modules/new-keepManage/group-keepManage.vue

@@ -4,7 +4,8 @@
             <a-col :sm="18" :md="18" :xl="18" class="keep-manage-col">
                 <a-card class="card-content echarts-card">
                     <div slot="title">
-                       <span style="font-weight:bolder;">数据总览</span> &nbsp;&nbsp; <span style="font-size:13px;">更新时间:{{updateAccountEchart | formatDate}}</span> 
+                       <span style="font-weight:bolder;">数据总览</span> 
+                       <!-- &nbsp;&nbsp; <span style="font-size:13px;">更新时间:{{updateAccountEchart | formatDate}}</span>  -->
                     </div>
                     <div class="person-content-title" slot="extra">
 
@@ -47,15 +48,16 @@
                                          今日消耗: <span style="font-weight: bold;">{{todayCost | formatNum}}</span> 
                                     </li>
                                     <li>
-                                        <span  style="margin-left:20%;" v-if="compare.indexOf('-') == 0">
-                                            <img style=" width: 25px;height: 25px;" class="title-radio-img" src="@/assets/down.png" alt="">
-                                            <span style="color: red;">{{compare}}</span>
-                                        </span>
-                                        <span style="margin-left:20%;" v-else-if="compare.indexOf('-') == -1">
-                                            <img style=" width: 25px;height: 25px;" class="title-radio-img" src="@/assets/up.png" alt="">
+                                        <span style="margin-left:20%;" v-if="compare.indexOf('-') == 0">
+                                            <img style=" width: 25px;height: 25px;" class="title-radio-img" src="@/assets/greendown.png" alt="">
                                             <span style="color: green;">{{compare}}</span>
                                             
                                         </span>
+                                        <span  style="margin-left:20%;" v-else-if="compare.indexOf('-') == -1" >
+                                            <img style=" width: 25px;height: 25px;" class="title-radio-img" src="@/assets/upred.png" alt="">
+                                            <span style="color: red;">{{compare}}</span>
+                                        </span>
+                                       
                                         
                                         <a-tooltip placement="top">
                                             <template slot="title">
@@ -117,15 +119,15 @@
                 <a slot="userName" slot-scope="text,record" @click="userNameClick(record)">{{ text }}</a>
                 <span slot="newEffectNum" slot-scope="text">
                     <span v-if="text">{{text}}</span>
-                    <span v-else>-</span>
+                    <span v-else>0</span>
                 </span>
                 <span slot="newCampaignNum" slot-scope="text">
                     <span v-if="text">{{text}}</span>
-                    <span v-else>-</span>
+                    <span v-else>0</span>
                 </span>
                 <span slot="newUnitNum" slot-scope="text">
                     <span v-if="text">{{text}}</span>
-                    <span v-else>-</span>
+                    <span v-else>0</span>
                 </span>
             </a-table>
                 
@@ -753,7 +755,7 @@
                           this.timeData = res.result.yesterdayList.map((itemdate)=>{
                             return itemdate.hour
                         })
-                          this.lengthData = ['today','yesterday'];
+                          this.lengthData = ['今天','昨天'];
                          let consumptionSummary = [];
                           this.initEchart('accountIndexEchart',this.initAccountIndexEchart(this.todayList,this.yesterdayList,consumptionSummary,this.timeData,this.lengthData,this.yestadyNum))
                       }else if(res.message == '查询-日报-汇总成功。'){
@@ -942,7 +944,7 @@
                     },
                     series:[
                         {
-                            name: 'today',
+                            name: '今天',
                             type: 'line',
                             smooth: true,
                             symbol: 'circle',
@@ -958,7 +960,7 @@
                             },
                         },
                         {
-                            name: 'yesterday',
+                            name: '昨天',
                             type: 'line',
                             smooth: true,
                             symbol: 'circle',
@@ -1105,8 +1107,23 @@
             else if (this.columnsProject.length >= 8) {
                 this.columnsProject.forEach((element, index) => {
                     if (index < this.columnsFixd.length) {
-                        element.width = 150
-                        element.fixed = 'left'
+                        if (element.dataIndex=='accountNum') {
+                            element.width = 100
+                            element.fixed = 'left'
+                        }else if(element.dataIndex == 'userNum'){
+                            element.width = 100
+                            element.fixed = 'left'
+                        }else if(element.dataIndex == 'yearOnYear'){
+                            element.width = 100
+                            element.fixed = 'left'
+                        }else if(element.dataIndex == 'equallyRate'){
+                            element.width = 100
+                            element.fixed = 'left'
+                        } else{
+                            element.width = 130
+                            element.fixed = 'left'
+                        }
+                       
                     }
                 })
 

+ 48 - 1
src/views/modules/stockWatch/modules/new-keepManage/new-keep-data.js

@@ -102,7 +102,54 @@
             
         ]
     }
- 
+    groupDelivery(){
+        return [
+            {
+                title: '状态操作',
+                dataIndex: 'status',
+                align: 'center',
+                scopedSlots: { customRender: 'status' },
+                },
+                {
+                title: '组名称',
+                dataIndex: 'unitName',
+                align: 'center',
+                width:350,
+                },{
+                title: '花费',
+                dataIndex: 'charge',
+                align: 'center',
+                sorter: (a, b) => a.charge - b.charge,
+                },{
+                title: '出价',
+                dataIndex: 'bid',
+                align: 'center',
+                sorter: (a, b) => a.bid - b.bid,
+                },{
+                title: '激活数',
+                dataIndex: 'activation',
+                align: 'center',
+                sorter: (a, b) => a.activation - b.activation,
+                },{
+                title: '激活成本',
+                dataIndex: 'activationCost',
+                align: 'center',
+                sorter: (a, b) => a.activationCost - b.activationCost,
+                },{
+                    title: '操作建议',
+                    dataIndex: 'operationAgree',
+                    key: 'operationAgree',
+                    align: 'center',
+                   
+                    },{
+                    title: '操作',
+                    dataIndex: 'operator',
+                    key: 'operator',
+                    align: 'center',
+                    scopedSlots: { customRender: 'operator' },
+                    },
+        ]
+    }
      // 默认初始展示列
      setDefaultColumns() {
          return [