htc 1 天之前
父節點
當前提交
d823124ef3

+ 7 - 0
src/api/agent/indexTwo.js

@@ -75,6 +75,13 @@ export function getUserTeamList(query) {
     params: query
   })
 }
+export function getUserReportList(query) {
+  return request({
+    url: `/core/report/team/member/generatedReportList`,
+    method: 'get',
+    params: query
+  })
+}
 export function getInvitationRecordList(query) {
   return request({
     url: `/core/register/record/page`,

+ 130 - 0
src/components/reportPdf/index2.vue

@@ -0,0 +1,130 @@
+<template>
+    <div class="page adffcacjc">
+        <div class="content">
+            <div class="c_pdf">
+                <div id="pdf-content" style="width: 630px;">
+                    <pdf2 :reportData="reportData" v-if="isMajor"></pdf2>
+                    <pdf-user2 :reportData="reportData" v-else></pdf-user2>
+                </div>
+            </div>
+            <div class="c_footer adfac">
+                <el-button type="defalut" @click="cancel">关闭</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script lang="ts" setup name="">
+    import pdf2 from './pdf2.vue'
+    import pdfUser2 from './pdfUser2.vue'
+    const props = defineProps({
+        isMajor: {
+            type: Boolean,
+            default: false
+        },
+        reportData:{
+            type: Object,
+            default: () => {}
+        },
+    })
+
+    import { ref, onMounted } from 'vue'
+    const reportData = ref(props.reportData);
+    const isMajor = ref(props.isMajor)
+
+    const emit = defineEmits(['cancel']);
+    const cancel = () => {
+        emit('cancel');
+    }
+    onMounted(() => {
+        
+    });
+</script>
+
+<style scoped lang="scss">
+    .page{
+        width: 100%;
+        height: 100vh;
+        position: fixed;
+        left: 0;
+        right: 0;
+        top: 0;
+        bottom: 0;
+        z-index: 99999;
+        background: rgba($color: #000000, $alpha: .4);
+
+        .content{
+            width: 685px;
+            height: calc(100% - 100px);
+            background: #FFFFFF;
+            padding: 0 20px;
+            box-sizing: border-box;
+            display: flex;
+            flex-direction: column;
+
+            .c_pdf{
+                width: 645px;
+                flex: 1;
+                padding-bottom: 20px;
+                box-sizing: border-box;
+                overflow-y: auto;
+                #pdf-content {
+                    width: 100%;
+                    background-color: white;
+                    word-break: break-all;
+                    .cd_box{
+                        width: 100%;
+                        height: 891px;
+                        font-size: 30px;
+                        font-weight: bold;
+                    }
+                }
+            }
+
+            .c_footer{
+                justify-content: flex-end;
+                padding: 20px 0;
+                border-top: 1px solid #E5E7EB;
+            }
+        }
+    }
+    .cus_dialog_content{
+        width: 500px;
+        background: linear-gradient( 180deg, #FDF2FB 0%, #FFFFFF 100%);
+        border-radius: 6px;
+        padding: 36px 68px;
+        box-sizing: border-box;
+        position: relative;
+        .cdc_title{
+            font-family: PingFang-SC, PingFang-SC;
+            font-weight: bold;
+            font-size: 16px;
+            color: #252525;
+            line-height: 16px;
+            text-align: center;
+        }
+        .cdc_close{
+            position: absolute;
+            right: 30px;
+            top: 36px;
+            cursor: pointer;
+        }
+        img{
+            width: 100%;
+        }
+        p{
+            font-family: PingFangSC, PingFang SC;
+            font-weight: 400;
+            font-size: 14px;
+            color: #393939;
+            line-height: 24px;
+            text-align: center;
+            span{
+                color: #F31616;
+            }
+        }
+        .zt_btn{
+            margin-top: 40px;
+        }
+    }
+</style>

+ 9 - 2
src/components/reportPdf/pdf2.scss

@@ -1,10 +1,10 @@
 .cd_box{
     padding: 20px 0 30px;
     box-sizing: border-box;
-    border-top: 1px solid red !important;
     position: relative;
     height: 890px;
     color: #111111;
+    background-size: 100% 100%;
     .cb_db{
         .cb_db_l{
             font-family: STSongti-SC, STSongti-SC;
@@ -84,9 +84,16 @@
         width: 163px;
         height: 44px;
         position: absolute;
-        top: 48px;
+        top: 38px;
         left: 30px;
     }
+    .fm2-logo2{
+        width: 116px;
+        height: 46px;
+        position: absolute;
+        top: 38px;
+        right: 31px;
+    }
     .fm2-perill{
         width: 308px;
         height: 58px;

文件差異過大導致無法顯示
+ 29 - 27
src/components/reportPdf/pdf2.vue


文件差異過大導致無法顯示
+ 39 - 38
src/components/reportPdf/pdfUser2.vue


+ 2 - 2
src/views/modules/wechatUser/inviteRecord.vue

@@ -47,7 +47,7 @@
     
     const queryParams = ref({
         page: 1,
-        pageSize: 10,
+        limit: 10,
         referrerId: ''
     })
     const dataList = ref([])
@@ -55,7 +55,7 @@
     const loading = ref(false)
 
     const handleSizeChange = (val) => {
-        queryParams.value.pageSize = val;
+        queryParams.value.limit = val;
         getList();
     }
 

+ 2 - 2
src/views/modules/wechatUser/payRecord.vue

@@ -46,7 +46,7 @@
     
     const queryParams = ref({
         page: 1,
-        pageSize: 10,
+        limit: 10,
         tradeRecord:1,
         userId:''
     })
@@ -60,7 +60,7 @@
     const loading = ref(false)
 
     const handleSizeChange = (val) => {
-        queryParams.value.pageSize = val;
+        queryParams.value.limit = val;
         getList();
     }
 

+ 2 - 2
src/views/modules/wechatUser/questionnaireManager.vue

@@ -47,7 +47,7 @@
     
     const queryParams = ref({
         page: 1,
-        pageSize: 10,
+        limit: 10,
         userId:''
     })
     const typeCfg = ref({
@@ -64,7 +64,7 @@
     const loading = ref(false)
     
     const handleSizeChange = (val) => {
-        queryParams.value.pageSize = val;
+        queryParams.value.limit = val;
         getList();
     }
 

+ 37 - 13
src/views/modules/wechatUser/reportRecord.vue

@@ -1,21 +1,21 @@
 <template>
     <div class="page">
-        <el-table :data="list" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无报告记录" max-height="578px" style="margin-top: 18px;">
+        <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无报告记录" max-height="578px" style="margin-top: 18px;">
             <el-table-column label="序号" width="50">
                 <template #default="scope">
                     {{ scope.$index + 1 }}
                 </template>
             </el-table-column>
-            <el-table-column label="报告名称" prop="xx"></el-table-column>
+            <el-table-column label="报告名称" prop="reportName"></el-table-column>
             <el-table-column label="报告类型" prop="xx">
-                <template #default="scope"></template>
+                <template #default="scope">{{ typeDict[scope.row.type]||'' }}</template>
             </el-table-column>
-            <el-table-column label="报告状态" prop="xx">
+            <!-- <el-table-column label="报告状态" prop="xx">
                 <template #default="scope"></template>
             </el-table-column>
-            <el-table-column label="发送人" prop="xx"></el-table-column>
-            <el-table-column label="团队名称" prop="xx"></el-table-column>
-            <el-table-column label="创建时间" prop="xx"></el-table-column>
+            <el-table-column label="发送人" prop="xx"></el-table-column> -->
+            <el-table-column label="团队名称" prop="teamName"></el-table-column>
+            <el-table-column label="创建时间" prop="createDate"></el-table-column>
             <el-table-column label="操作" width="150">
                 <template #default="scope">
                     <el-button link type="text" size="mini" @click="handleReview(scope.row)">查看</el-button>
@@ -39,23 +39,34 @@
 
 <script setup name="">
     const props = defineProps({
-        list:{
-            typeof:Array,
-            default:()=>[]
+        userId:{
+            typeof:'String',
+            default:''
+
         }
     });
-    import { ref, getCurrentInstance } from 'vue'
+    import { ref, getCurrentInstance, onMounted } from 'vue'
     const { proxy } = getCurrentInstance();
+    import { 
+        getUserReportList
+    } from '@/api/agent/indexTwo.js'
     
     const queryParams = ref({
         page: 1,
-        pageSize: 10
+        limit: 10,
+        coachId:''
+    })
+    const typeDict = ref({
+        1:'基础版',
+        2:'专业版',
+        3:'专家版'
     })
+    const dataList = ref([])
     const total = ref(0)
     const loading = ref(false)
 
     const handleSizeChange = (val) => {
-        queryParams.value.pageSize = val;
+        queryParams.value.limit = val;
         proxy.$emit('handleSizeChange', queryParams);
     }
 
@@ -63,6 +74,19 @@
         queryParams.value.page = val;
         proxy.$emit('handleCurrentChange', queryParams);
     }
+    const getList = async () => {
+        let query = JSON.parse(JSON.stringify(queryParams.value));
+        loading.value = true;
+        const res = await getUserReportList(query);
+        dataList.value = res.data.list;
+        total.value = res.data.total;
+        loading.value = false;
+    }
+
+    onMounted(() => {
+        queryParams.value.coachId = props.userId;
+        getList();
+    })
 
     const handleReview = (row) => {
         proxy.$emit('handleReview', row);

+ 2 - 2
src/views/modules/wechatUser/teamManager.vue

@@ -55,7 +55,7 @@
     
     const queryParams = ref({
         page: 1,
-        pageSize: 10,
+        limit: 10,
         coachId:''
     })
     const dataList = ref([])
@@ -63,7 +63,7 @@
     const loading = ref(false)
 
     const handleSizeChange = (val) => {
-        queryParams.value.pageSize = val;
+        queryParams.value.limit = val;
         getList();
     }
 

+ 2 - 2
src/views/modules/wechatUser/teamUser.vue

@@ -45,7 +45,7 @@
     
     const queryParams = ref({
         page: 1,
-        pageSize: 10,
+        limit: 10,
         coachId:''
     })
     const dataList = ref([])
@@ -53,7 +53,7 @@
     const loading = ref(false)
 
     const handleSizeChange = (val) => {
-        queryParams.value.pageSize = val;
+        queryParams.value.limit = val;
         getList();
     }
 

+ 19 - 1
src/views/modules/wechatUserDetail.vue

@@ -83,9 +83,12 @@
                 <QuestionnaireManager v-if="tidx===2&&userInfo.id" :userId="userInfo.id"></QuestionnaireManager>
                 <TeamUser v-if="tidx===3&&userInfo.id" :userId="userInfo.id"></TeamUser>
                 <PayRecord v-if="tidx===4&&userInfo.id" :userId="userInfo.id"></PayRecord>
-                <ReportRecord v-if="tidx===5&&userInfo.id" :userId="userInfo.id"></ReportRecord>
+                <ReportRecord v-if="tidx===5&&userInfo.id" :userId="userInfo.id" @handleReview="handleReview"></ReportRecord>
             </div>
         </div>
+        <template v-if="pdfShow">
+            <report-pdf2 :reportData="reportData" :isMajor="isMajor" @cancel="pdfCancel"></report-pdf2>
+        </template>
     </div>
 </template>
 
@@ -96,6 +99,7 @@
     import TeamUser from './wechatUser/teamUser.vue'
     import PayRecord from './wechatUser/payRecord.vue'
     import ReportRecord from './wechatUser/reportRecord.vue'
+    import reportPdf2 from '@/components/reportPdf/index2.vue'
     import { ref, getCurrentInstance, onMounted } from 'vue'
     const { proxy } = getCurrentInstance();
     const { channel_type } = proxy.useDict("channel_type");
@@ -112,6 +116,9 @@
         2:'专业版',
         3:'专家版'
     })
+    const reportData = ref({})
+    const pdfShow = ref(false)
+    const isMajor = ref(false)
     const tabList = ref(['团队管理','邀请记录','问卷管理','团队成员','交易记录','报告记录'])
 
     const handleBack = () => {
@@ -122,6 +129,17 @@
         tidx.value = index
     }
 
+    const handleReview = (row) => {
+        isMajor.value = row.type==2?true:false;
+        pdfShow.value = true;
+    }
+
+    const pdfCancel = () => {
+        pdfShow.value = false;
+        isMajor.value = false;
+        reportData.value = {}
+    }
+
     onMounted(() => {
         const id = proxy.$route.query.id
         getWechatUserInfoById(id).then((res) => {