Browse Source

需求池193 代码冲突

hbchen 4 months ago
parent
commit
a6d4e8e240

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

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

+ 5 - 1
src/lang/modules/ReportManagement/ReportList.js

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

+ 35 - 15
src/views/report_manage/reportEn/reportlist.vue

@@ -153,8 +153,13 @@
 				>
 				>
           <template #header>
           <template #header>
             <span v-if="item.key==='Pv'">
             <span v-if="item.key==='Pv'">
-              PV
-              <el-tooltip class="item" effect="dark" :content="`pv:${$t('ReportManage.number_tooltip_pv_show')}`" placement="top-start">
+              {{ item.label }}
+              <el-tooltip class="item" effect="dark" 
+              placement="top-start">
+                <div slot="content" style="width:420px;">
+                  <p style="padding:5px 0;">pv:{{$t('ReportManage.number_tooltip_pv_show')}}</p>
+                  <p style="padding:5px 0;">uv:{{$t('ReportManage.tooltip_uv_show')}}</p>
+                </div>
                 <i class="el-icon-warning"/>
                 <i class="el-icon-warning"/>
               </el-tooltip>
               </el-tooltip>
             </span>
             </span>
@@ -184,10 +189,13 @@
                 <!-- 第{{row.Stage}}期 -->
                 <!-- 第{{row.Stage}}期 -->
                 {{ $t('ReportManage.smart_issue_bumber_text',{num:row.Stage}) }}
                 {{ $t('ReportManage.smart_issue_bumber_text',{num:row.Stage}) }}
               </span>
               </span>
-              <span v-else-if="item.key==='Pv'" style="cursor:pointer; color:#4099ef;" >
-                <span @click="reportHandle(row,'PV')" v-if="row.PvEmail">{{row.PvEmail}}</span>
-                <span v-if="row.PvEmail&&row.Pv" style="color:#333">/</span>
-                <span v-if="row.Pv" style="color:#333">{{row.Pv}}</span>
+              <span v-else-if="item.key==='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 style="color:#333">/</span>
+                <span  :style="row.UvEmail?'cursor:pointer; color:#4099ef;':'color:#333'" 
+                @click="reportHandle(row,'UV')">{{row.UvEmail||0}}</span>
               </span>
               </span>
               <span v-else-if="item.key==='PublishTime'">
               <span v-else-if="item.key==='PublishTime'">
                 <template v-if="[1,2].includes(row.State)">
                 <template v-if="[1,2].includes(row.State)">
@@ -443,14 +451,14 @@
       :append-to-body="true" 
       :append-to-body="true" 
       :visible.sync="PVData.show" 
       :visible.sync="PVData.show" 
       width="900px" 
       width="900px" 
-      :title="$t('ReportManage.ReportList.click_through_details')"
+      :title="PVData.PvDetailTitle"
     >
     >
       <div class="pv-static-wrap" style="padding-bottom:70px">
       <div class="pv-static-wrap" style="padding-bottom:70px">
         <el-table :data="PVData.list" border height="600">
         <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="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="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-table>
         <el-pagination 
         <el-pagination 
           layout="total,prev,pager,next,jumper" 
           layout="total,prev,pager,next,jumper" 
@@ -557,9 +565,10 @@ export default {
         page:1,
         page:1,
         pageSize:15,
         pageSize:15,
         total:0,
         total:0,
-        reportId:0
+        reportId:0,
+        PvDetailTitle:'',
+        key:''
       },
       },
-
       showEdit:false,//显示编辑策略报告弹窗
       showEdit:false,//显示编辑策略报告弹窗
       editId:0,//编辑策略报告id
       editId:0,//编辑策略报告id
 
 
@@ -644,6 +653,7 @@ export default {
         {
         {
             label: 'PV / UV',
             label: 'PV / UV',
             key: 'Pv',
             key: 'Pv',
+            widthsty: 140
         },
         },
         {
         {
             label:this.$t('Table.column_operations') || '操作',
             label:this.$t('Table.column_operations') || '操作',
@@ -730,6 +740,7 @@ export default {
         copylink: this.copyReportlink,
         copylink: this.copyReportlink,
         sendEmail:this.sendEmail,
         sendEmail:this.sendEmail,
         PV:this.showPVDetail,
         PV:this.showPVDetail,
+        UV:this.showUVDetail,
         'view-log': this.goSendlog
         'view-log': this.goSendlog
       }
       }
 
 
@@ -954,14 +965,22 @@ export default {
     handleDelSelectCompany(item,index){
     handleDelSelectCompany(item,index){
         this.popData.customValue.splice(index,1)
         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.reportId=item.Id
+      this.PVData.page = 1
       this.getPVDetail()
       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(){
     async getPVDetail(){
-      const res=await reportEnInterface.PVDetailList({
+      let apiName = this.PVData.key=='PV'?"PVDetailList":"UVDetailList"
+      const res=await reportEnInterface[apiName]({
         CurrentIndex:this.PVData.page,
         CurrentIndex:this.PVData.page,
         PageSize:this.PVData.pageSize,
         PageSize:this.PVData.pageSize,
         ReportId:this.PVData.reportId
         ReportId:this.PVData.reportId
@@ -969,6 +988,7 @@ export default {
       if(res.Ret===200){
       if(res.Ret===200){
         this.PVData.list=res.Data.List||[]
         this.PVData.list=res.Data.List||[]
         this.PVData.total=res.Data.Paging.Totals
         this.PVData.total=res.Data.Paging.Totals
+        this.PVData.show=true
       }
       }
     },
     },
     handlePVPageChange(e){
     handlePVPageChange(e){