Procházet zdrojové kódy

推广素材查看数据

zhaoxiaohai před 2 roky
rodič
revize
eff138e6f2

+ 2 - 2
src/HManagement/archives_ad/dataAnalysis/modules/adDownloadData.vue

@@ -7,7 +7,7 @@
             </div>
             <div style="flex:1;">
                 <div class="title-box">
-                    <div class="title">未下载{{ type == 'agency' ? '经销商' : '业务员' }}</div>
+                    <div class="title9">未下载{{ type == 'agency' ? '经销商' : '业务员' }}</div>
                     <exportExcel :tablecols="unDownload.tablecols" :param="unDownload.params"
                         :excelTitle="type == 'agency' ? '推广素材经销商未下载表' : '推广素材团队未下载表'" />
                 </div>
@@ -28,7 +28,7 @@
                     </el-pagination>
                 </div>
                 <div class="title-box" style="margin-top:30px">
-                    <div class="title">已下载{{ type == 'agency' ? '经销商' : '业务员' }}</div>
+                    <div class="title9">已下载{{ type == 'agency' ? '经销商' : '业务员' }}</div>
                     <exportExcel :tablecols="download.tablecols" :param="download.params"
                         :excelTitle="type == 'agency' ? '推广素材经销商已下载表' : '推广素材团队已下载表'" />
                 </div>

+ 2 - 2
src/HManagement/archives_ad/dataAnalysis/modules/adReadData.vue

@@ -8,7 +8,7 @@
 
             <div style="flex:1;">
                 <div class="title-box">
-                    <div class="title">未浏览{{ type == 'agency' ? '经销商' : '业务员' }}</div>
+                    <div class="title9">未浏览{{ type == 'agency' ? '经销商' : '业务员' }}</div>
                     <exportExcel :tablecols="unReadData.tablecols" :param="unReadData.params"
                         :excelTitle="type == 'agency' ? '推广素材经销商未浏览表' : '推广素材团队未浏览表'" />
                 </div>
@@ -30,7 +30,7 @@
                 </div>
 
                 <div class="title-box" style="margin-top:30px">
-                    <div class="title">已浏览{{ type == 'agency' ? '经销商' : '业务员' }}</div>
+                    <div class="title9">已浏览{{ type == 'agency' ? '经销商' : '业务员' }}</div>
                     <exportExcel :tablecols="readData.tablecols" :param="readData.params"
                         :excelTitle="type == 'agency' ? '推广素材经销商已浏览表' : '推广素材团队已浏览表'" />
                 </div>

+ 50 - 14
src/HManagement/archives_ad/dataAnalysis/modules/adShareData.vue

@@ -4,7 +4,7 @@
         <div class="chart">
             <div class="box">
                 <div class="title-box">
-                    <div class="title">分享次数</div>
+                    <div class="title9">分享次数</div>
                     <el-radio-group v-model="tabPosition" style="margin-right:33px;" size="small"
                         @change="getLineChartOfShare">
                         <el-radio-button label="1">年</el-radio-button>
@@ -16,22 +16,58 @@
             </div>
             <div class="box">
                 <div class="title-box">
-                    <div class="title">分享渠道</div>
+                    <div class="title9">分享渠道</div>
                 </div>
                 <div id="pie" style="width: calc(100% - 33px); height: 374px; margin-top: 40px;"></div>
             </div>
         </div>
+        <div class="title-box">
+            <div class="title9">分享数据</div>
+            <exportExcel :tablecols="tablecols" :param="params" excelTitle="推广素材经销商分享数据表" />
+        </div>
+        <tableLayout style="margin-top:16px" :layout="tablecols" :data="tableList" :custom="true">
+            <template v-slot:customcol="scope">
+                <p v-if="scope.column.columnname == 'region'">
+                    {{ scope.column.data['province'] }}{{ scope.column.data['city'] }}{{ scope.column.data['county'] }}
+                </p>
+                <p v-else-if="scope.column.columnname == 'operate'" style="color:#3874F6;">查看分享名单</p>
+                <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
+            </template>
+        </tableLayout>
+        <div style="margin-top:16px;text-align:right">
+            <el-pagination background small @current-change="handlCurrentChange" :current-page="params.pageNumber"
+                :page-size="params.pageSize" layout="total, prev, pager, next, jumper" :total="total">
+            </el-pagination>
+        </div>
     </div>
 </template>
 <script>
 import { Line, Pie } from '@antv/g2plot';
+import exportExcel from "@/components/export_excel";
+
 export default {
     name: "adShareData",
+    components: { exportExcel },
     data() {
         return {
             tabPosition: 1,//年月日
+            params: {
+                "classname": "webmanage.saletool.sharematerial.statistics.share",
+                "method": "getShareData",
+                "content": {
+                    "sat_sharematerialid": this.$route.query.id,
+                    "isAll": true,
+                    "pageNumber": 1,
+                    "pageSize": 10
+                }
+            },
+            tableList: [],
+            total: 0
         }
     },
+    created() {
+        this.tablecols = this.tool.tabelCol('archives_adlist')[`shareDataTable`].tablecols;
+    },
     mounted() {
         /* 折线图 */
         this.getLineChartOfShare();
@@ -98,19 +134,19 @@ export default {
             })
         },
         getShareData() {
-            this.$api.requested({
-                "classname": "webmanage.saletool.sharematerial.statistics.share",
-                "method": "getShareData",
-                "content": {
-                    "sat_sharematerialid": this.$route.query.id,
-                    "isAll": false,
-                    "pageNumber": 1,
-                    "pageSize": 10
-                }
-            }).then(res => {
-                console.log("sdsdsds",res)
+            let params = JSON.parse(JSON.stringify(this.params));
+            params.content.isAll = false;
+            console.log(this.params.content.isAll)
+            this.$api.requested(params).then(res => {
+                console.log("sdsdsds", res)
+                this.tableList = res.data
+                this.total = res.total
             })
-        }
+        },
+        handlCurrentChange(index) {
+            this.params.pageNumber = index;
+            this.getShareData();
+        },
     }
 }
 </script>

+ 2 - 3
src/HManagement/archives_ad/dataAnalysis/modules/public.css

@@ -20,7 +20,6 @@ header {
     display: flex;
 }
 
-
 .chart-box {
     display: flex;
     align-content: center;
@@ -38,7 +37,7 @@ header {
     box-sizing: border-box;
 }
 
-.title {
+.title9 {
     position: relative;
     font-size: 14px;
     font-family: PingFang SC-Bold, PingFang SC;
@@ -47,7 +46,7 @@ header {
     padding-left: 11px;
 }
 
-.title::after {
+.title9::after {
     position: absolute;
     content: '';
     display: block;