Browse Source

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

zhuxinbo 5 năm trước cách đây
mục cha
commit
81fa58eace

+ 18 - 5
src/views/modules/BatchCreate/crowedPackage.vue

@@ -66,7 +66,7 @@
             <div class="tableArea">
                 <a-table 
                 :columns="columns" 
-                :data-source="data" 
+                :data-source="dataSource" 
                 :row-selection="rowSelection" 
                 bordered
                 >
@@ -80,9 +80,16 @@
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
                     <span slot="options" slot-scope="record">
-                        <a href="javascript:;" style="margin-right:10px">编辑</a>
-                        <a href="javascript:;" v-if="tabkey=='plan'" @click="copyPlan(record)">复制</a>
-                        <a href="javascript:;" v-if="tabkey=='idea'">预览</a>
+                        <a href="javascript:;" style="margin-right:10px">推送</a>
+                        <a-popconfirm
+                            v-if="dataSource.length"
+                            title="Sure to delete?"
+                            @confirm="() => onDelete(record.key)"
+                            >
+                            <a href="javascript:;">删除</a>
+                        </a-popconfirm>
+                        
+                        
                     </span>
                     <span slot="parentGroup" slot-scope="text">
                         <a href="javascript:;" >{{text}}</a>
@@ -132,7 +139,7 @@ export default {
             accountId:[],
             dateValue:null,//日期选择器
              //主页的表格
-            data:[],
+            dataSource:[],
             columns,
             selectedRowKeys:[],
             rowSelection,
@@ -245,6 +252,12 @@ export default {
         search(){
 
         },
+
+        //表格里的删除按钮
+        onDelete(key) {
+            const dataSource = [...this.dataSource];
+            this.dataSource = dataSource.filter(item => item.key !== key);
+        },
     },
     filters: {
         toPercentage(val) {

+ 40 - 16
src/views/modules/Statistics/newHome.vue

@@ -628,25 +628,49 @@ export default {
               showNum:0
           }
            
+
+            var afterData=[];
            res.result.list.forEach((ele,index)=>{
-              if(!ele.costProportion){
+             if(ele.afterData){
+                if(!ele.afterData.costProportion){
+                  ele.afterData.costProportion='-'
+                }
+                if(ele.afterData.statHour||ele.afterData.statHour==0){
+                    ele.afterData.statHour=ele.afterData.statHour > 9 ? `${ele.afterData.statHour}:00` : ` 0${ele.afterData.statHour}:00`
+                    ele.afterData.statDate=ele.afterData.statDate+' '+ele.afterData.statHour
+                }
+                ele.afterData.key=index+1
+                total.click+=ele.afterData.click
+                total.cost+=ele.afterData.cost
+                total.showNum+=ele.afterData.showNum;
+                afterData.push(ele.afterData)
+             }else{
+                if(!ele.costProportion){
                   ele.costProportion='-'
-              }
-              if(ele.statHour||ele.statHour==0){
-                  ele.statHour=ele.statHour > 9 ? `${ele.statHour}:00` : ` 0${ele.statHour}:00`
-                  ele.statDate=ele.statDate+' '+ele.statHour
-              }
-              ele.key=index+1
-              total.click+=ele.click
-              total.cost+=ele.cost
-              total.showNum+=ele.showNum
+                }
+                if(ele.statHour||ele.statHour==0){
+                    ele.statHour=ele.statHour > 9 ? `${ele.statHour}:00` : ` 0${ele.statHour}:00`
+                    ele.statDate=ele.statDate+' '+ele.statHour
+                }
+                ele.key=index+1
+                total.click+=ele.click
+                total.cost+=ele.cost
+                total.showNum+=ele.showNum
+             }
+              
            })
-            total.cost=(total.cost).toFixed(2)
-           total.clickRate=(total.click/total.showNum*100).toFixed(2)+'%'
-           total.cp=(total.cost/total.click).toFixed(2)
-           total.cpm=(total.cost/total.showNum*1000).toFixed(2)
-           this.tableData=[total,...res.result.list]
-          }
+
+              total.cost=(total.cost).toFixed(2)
+              total.clickRate=(total.click/total.showNum*100).toFixed(2)+'%'
+              total.cp=(total.cost/total.click).toFixed(2)
+              total.cpm=(total.cost/total.showNum*1000).toFixed(2)
+              if(afterData.length>0){
+                this.tableData=[total,...afterData]
+              }else{
+                this.tableData=[total,...res.result.list]
+              }
+              
+            }
           }
         })
       })

+ 3 - 4
vue.config.js

@@ -64,17 +64,16 @@ module.exports = {
          }
        },*/
       '/jeecg-boot': {
-        target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
+        // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
         // target: 'http://192.168.1.23:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.22:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.0.111:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.54:8080', //请求本地 需要jeecg-boot后台项目  孙震
-        // target: 'http://192.168.1.165:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        target: 'http://192.168.1.165:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.251:80', //请求本地 需要jeecg-boot后台项目 ,
-        // target:'https://trac.tjyourong.com.cn',
+        // target: 'http://192.168.1.251:80', //请求本地 需要jeecg-boot后台项目 
         ws: false,
         changeOrigin: true,
         pathRewrite: {