Pārlūkot izejas kodu

需求193 英文研报uv统计 完

hbchen 4 mēneši atpakaļ
vecāks
revīzija
58f05d2c67

+ 7 - 2
src/api/modules/reportEnApi.js

@@ -142,12 +142,17 @@ export const saveCustomEamil=params=>{
 }
 
 /**
- * 点击量
+ * 点击量 PV
  */
 export const PVDetailList=params=>{
 	return http.get('/english_report/email/pv_list',params)
 }
-
+/**
+ * UV
+ */
+export const UVDetailList=params=>{
+	return http.get('/english_report/email/uv_list',params)
+}
 /**
  * 批量发送邮件
  */

+ 6 - 2
src/lang/modules/ReportManagement/ReportList.js

@@ -14,7 +14,9 @@ export const ReportListEn = {
   designated_personnel: "Designated personnel",
   designated_sender_information: "Designated sender information:",
   please_select_personnel: "Please select personnel",
-  click_through_details: "点击量详情 Click through details",
+  pv_detail:'PV Details',
+  uv_detail:'UV Details',
+  click_through_details: "Click through details",
   customer_name: "Customer Name",
   email_address: "e-mail address",
   Last_click_time: "Last click time",
@@ -130,8 +132,10 @@ export const ReportListZh = {
   designated_personnel: "指定人员",
   designated_sender_information: "指定发送人员信息:",
   please_select_personnel: "请选择人员",
+  pv_detail:'PV详情',
+  uv_detail:'UV详情',
   click_through_details: "点击量详情",
-  click_through_details: "客户名称",
+  customer_name:"客户名称",
   email_address: "邮箱地址",
   Last_click_time: "最近点击时间",
   hits_btn: "点击量",

+ 2 - 2
src/lang/modules/ReportManagement/SmartReport.js

@@ -79,7 +79,7 @@ export const SmartReportEn = {
     push: "Push",
     not_push: "Do not push",
   },
-  // tooltip_pv_show: "The number of times the report has been opened, calculated once each time it is opened (only for authorized users)",
+  tooltip_pv_show: "The number of times the report has been opened, calculated once each time it is opened (only for authorized users)",
   number_tooltip_pv_show: "Number of times the report has been opened, Counted each time it is opened",
   tooltip_uv_show: "The number of people accessing the report, and the same person accessing each report is only counted once (only authorized users are counted)",
   smart_msg: {
@@ -204,7 +204,7 @@ export const SmartReportZh = {
     push: "推送",
     not_push: "不推送",
   },
-  // tooltip_pv_show: "报告被打开的次数,每次打开都计算一次(只统计有权限用户)",
+  tooltip_pv_show: "报告被打开的次数,每次打开都计算一次(只统计有权限用户)",
   number_tooltip_pv_show: "报告被打开的次数,每次打开都计算一次",
   tooltip_uv_show: "访问报告的人数,每篇报告同一个人访问只计算一次(只统计有权限用户)",
   smart_msg: {

+ 23 - 13
src/views/report_manage/reportEn/reportlist.vue

@@ -186,12 +186,12 @@
               </span>
               <span v-else-if="item.key==='Stage'">第{{row.Stage}}期</span>
               <span v-else-if="item.key==='Pv'" >
-                <span @click="reportHandle(row,'PV')" 
+                <span v-if="!row.PvEmail && row.Pv" style="color:#333">{{row.Pv || 0}}</span>
+                <span @click="reportHandle(row,'PV')" v-else
                 :style="row.PvEmail?'cursor:pointer; color:#4099ef;':'color:#333'" >{{row.PvEmail||0}}</span>
-                <!-- <span v-if="row.PvEmail&&row.Pv" style="color:#333">/</span>
-                <span v-if="row.Pv" style="color:#333">{{row.Pv}}</span> -->
                 <span style="color:#333">/</span>
-                <span  style="color:#333">{{row.Uv||0}}</span>
+                <span  :style="row.UvEmail?'cursor:pointer; color:#4099ef;':'color:#333'" 
+                @click="reportHandle(row,'UV')">{{row.UvEmail||0}}</span>
               </span>
               <span v-else-if="item.key==='PublishTime'">
                 <template v-if="[1,2].includes(row.State)">
@@ -399,14 +399,14 @@
       :append-to-body="true" 
       :visible.sync="PVData.show" 
       width="900px" 
-      :title="$t('ReportManage.ReportList.click_through_details')"
+      :title="PVData.PvDetailTitle"
     >
       <div class="pv-static-wrap" style="padding-bottom:70px">
         <el-table :data="PVData.list" border height="600">
-          <el-table-column align="center" prop="Name" :label="$t('ReportManage.ReportList.click_through_details')"></el-table-column>
+          <el-table-column align="center" prop="Name" :label="$t('ReportManage.ReportList.customer_name')"></el-table-column>
           <el-table-column align="center" prop="Email" :label="$t('ReportManage.ReportList.email_address')"></el-table-column>
           <el-table-column align="center" prop="RecentClickTime" :label="$t('ReportManage.ReportList.Last_click_time')"></el-table-column>
-          <el-table-column align="center" prop="ClickNum" :label="$t('ReportManage.ReportList.hits_btn')"></el-table-column>   
+          <el-table-column align="center" prop="ClickNum" :label="$t('ReportManage.ReportList.hits_btn')" v-if="PVData.key == 'PV'"></el-table-column>   
         </el-table>
         <el-pagination 
           layout="total,prev,pager,next,jumper" 
@@ -512,9 +512,10 @@ export default {
         page:1,
         pageSize:15,
         total:0,
-        reportId:0
+        reportId:0,
+        PvDetailTitle:'',
+        key:''
       },
-
       showEdit:false,//显示编辑策略报告弹窗
       editId:0,//编辑策略报告id
 
@@ -652,6 +653,7 @@ export default {
         copylink: this.copyReportlink,
         sendEmail:this.sendEmail,
         PV:this.showPVDetail,
+        UV:this.showUVDetail,
         'view-log': this.goSendlog
       }
 
@@ -874,15 +876,22 @@ export default {
     handleDelSelectCompany(item,index){
         this.popData.customValue.splice(index,1)
     },
-    showPVDetail(item){
+    showPVDetail(item,key='PV'){
       if(!item.PvEmail) return 
+      this.PVData.key = key
+      this.PVData.PvDetailTitle = this.PVData.key == 'PV' ?this.$t('ReportManage.ReportList.pv_detail'):this.PVData.PvDetailTitle
       this.PVData.reportId=item.Id
+      this.PVData.page = 1
       this.getPVDetail()
-      this.PVData.show=true
     },
-
+    showUVDetail(item){
+      if(!item.UvEmail) return 
+      this.PVData.PvDetailTitle = this.$t('ReportManage.ReportList.uv_detail')
+      this.showPVDetail(item,'UV')
+    },
     async getPVDetail(){
-      const res=await reportEnInterface.PVDetailList({
+      let apiName = this.PVData.key=='PV'?"PVDetailList":"UVDetailList"
+      const res=await reportEnInterface[apiName]({
         CurrentIndex:this.PVData.page,
         PageSize:this.PVData.pageSize,
         ReportId:this.PVData.reportId
@@ -890,6 +899,7 @@ export default {
       if(res.Ret===200){
         this.PVData.list=res.Data.List||[]
         this.PVData.total=res.Data.Paging.Totals
+        this.PVData.show=true
       }
     },
     handlePVPageChange(e){

+ 1 - 1
src/views/report_manage/reportlist.vue

@@ -756,7 +756,7 @@ export default {
               slot: "content",
               attrs: { style: "display:block;padding:5px 0;width:420px;" },
             },
-            `pv:${this.$t('ReportManage.number_tooltip_pv_show')}`
+            `pv:${this.$t('ReportManage.tooltip_pv_show')}`
           ),
           this.hasUV?h(
             "p",

+ 1 - 1
src/views/smartReport/reportList.vue

@@ -762,7 +762,7 @@ export default {
                     slot: "content",
                     attrs: { style: "display:block;padding:5px 0;width:420px;" },
                     },
-                    `pv:${this.$t('ReportManage.number_tooltip_pv_show')}`
+                    `pv:${this.$t('ReportManage.tooltip_pv_show')}`
                 ),
                 this.hasUV?h(
                     "p",