zqwang 1 år sedan
förälder
incheckning
c048f2721d

+ 1 - 1
src/views/dataStatistics/rechargeStatistics/summaryStatistics.vue

@@ -3,7 +3,7 @@
     <div v-if="rolesIdentify.includes('optimizer')" class="w-full text-gray-500">
       *上半部分统计的是当前小程序的数据
     </div>
-    <div class="flex ">
+    <div class="flex">
       <el-card class="box-card" shadow="hover" v-action="'statistic.chargeTJ.todayCharge'">
         <template #header>
           <div class="flex items-center justify-between card-header">

+ 2 - 127
src/views/dataStatistics/userStatistics/index.vue

@@ -31,132 +31,6 @@
           :title_obj="titleObj" :extro_params="{ is_all: true, ...query }">
         </exportExcel>
       </template>
-     
-    </Search>
-	<div style="margin:8px 6px;">
-	          <el-card shadow="hover" :body-style="{ padding: '20px' }">
-	            <div class="stat-wrapper">
-	              <div>所选时间段内累计充新增用户数:
-	                <span class="ml-2 mr-4 stat">{{ statisticalData.new_user_num || '暂无数据' }}</span>
-	              </div>
-	              <div>累计新用户充值人数:
-	                <span class="ml-2 mr-4 stat">{{ statisticalData.new_user_recharge_num || '暂无数据' }}</span>
-	              </div>
-	            </div>
-	          </el-card>
-	        </div>
-	        <div class="table-default" >
-	          <el-table :data="tableData" class="mt-3" v-loading="loading">
-	            <el-table-column prop="date" min-width="120px" label="时间" />
-	            <el-table-column  v-if="!rolesIdentify.includes('optimizer')" prop="username" label="优化师" min-width="160px" />
-	            <el-table-column prop="miniprogram_name" label="小程序名称" min-width="160px" />
-	            <el-table-column label="当日新增用户数" prop="new_user_num" min-width="160px">
-	              <template #header>
-	                <div class="flex items-center">
-						<el-tooltip placement="top">
-						  <template #content>
-						    当天的新增用户<br />
-						  </template>
-						  <el-icon>
-						    <InfoFilled />
-						  </el-icon>
-						</el-tooltip>
-	                  <span>当日新增用户数</span>
-	                </div>
-	              </template>
-	              <template #default="scope">
-	                <div class="wrapper">
-	                  <div>{{ scope.row.new_user_num }}</div>
-	                </div>
-	              </template>
-	            </el-table-column>
-	            <el-table-column label="当日新增用户充值人数" prop="pay_count" min-width="180px">
-	              <template #header>
-	                <div class="flex items-center">
-						<el-tooltip placement="top">
-						  <template #content>
-						    当日新增用户充值人数<br />
-						  </template>
-						  <el-icon>
-						    <InfoFilled />
-						  </el-icon>
-						</el-tooltip>
-	                  <span>当日新增用户充值人数</span>
-	                  
-	                </div>
-	              </template>
-	              <template #default="scope">
-	                <div class="wrapper">
-	                  <div>{{ scope.row.new_user_recharge_num }}</div>
-	                </div>
-	              </template>
-	            </el-table-column>
-	           <el-table-column label="当日新增用户充率" prop="recharge_rate" min-width="180px">
-	             <template #header>
-	               <div class="flex items-center">
-	           		<el-tooltip placement="top">
-	           		  <template #content>
-	           		    当日新增用户充率<br />
-	           		  </template>
-	           		  <el-icon>
-	           		    <InfoFilled />
-	           		  </el-icon>
-	           		</el-tooltip>
-	                 <span>当日新增用户充率</span>
-	                 
-	               </div>
-	             </template>
-	             <template #default="scope">
-	               <div class="wrapper">
-	                 <div>{{ scope.row.recharge_rate }}</div>
-	               </div>
-	             </template>
-	           </el-table-column>
-	           	<el-table-column label="当日新增用户充总额" prop="new_user_recharge_total" min-width="180px">
-	           	  <template #header>
-	           	    <div class="flex items-center">
-	           			<el-tooltip placement="top">
-	           			  <template #content>
-	           			    当日新增用户充总额<br />
-	           			  </template>
-	           			  <el-icon>
-	           			    <InfoFilled />
-	           			  </el-icon>
-	           			</el-tooltip>
-	           	      <span>当日新增用户充总额</span>
-	           	      
-	           	    </div>
-	           	  </template>
-	           	  <template #default="scope">
-	           	    <div class="wrapper">
-	           	      <div>{{ scope.row.new_user_recharge_total }}</div>
-	           	    </div>
-	           	  </template>
-	           	</el-table-column>
-				<el-table-column label="新增用户人均充值" prop="recharge_mean" min-width="180px">
-				  <template #header>
-				    <div class="flex items-center">
-						<el-tooltip placement="top">
-						  <template #content>
-						    新增用户人均充值<br />
-						  </template>
-						  <el-icon>
-						    <InfoFilled />
-						  </el-icon>
-						</el-tooltip>
-				      <span>新增用户人均充值</span>
-				      
-				    </div>
-				  </template>
-				  <template #default="scope">
-				    <div class="wrapper">
-				      <div>{{ scope.row.recharge_mean }}</div>
-				    </div>
-				  </template>
-				</el-table-column>		   
-	          </el-table>
-	          <Paginate />
-	        </div>
       <template v-slot:content>
         <div style="margin:8px 6px;">
           <el-card shadow="hover" :body-style="{ padding: '20px' }">
@@ -173,7 +47,8 @@
         <div class="table-default">
           <el-table :data="tableData" class="mt-3" v-loading="loading">
             <el-table-column prop="date" min-width="120px" label="时间" />
-            <el-table-column prop="username" label="优化师" min-width="160px" />
+            <el-table-column  v-if="!rolesIdentify.includes('optimizer')" prop="username" label="优化师" min-width="160px" />
+
             <el-table-column prop="miniprogram_name" label="小程序名称" min-width="160px" />
             <el-table-column label="当日新增用户数" prop="new_user_num" min-width="160px">
               <template #header>

+ 8 - 8
src/views/dataStatistics/userStatistics/summaryStatistics.vue

@@ -221,17 +221,17 @@ const initTodayCharge = () => {
   })
 }
 const init = () => {
-  
-    statisticUserHistoryData({miniprogram_id:miniprogram_idJ.value}).then(res => {
-		currentMonth.value = res.data.month;
-		lastMonth.value = res.data.lastMonth;
-		totalData.value = res.data.history;
-    })
+
+  statisticUserHistoryData({ miniprogram_id: miniprogram_idJ.value }).then(res => {
+    currentMonth.value = res.data.month;
+    lastMonth.value = res.data.lastMonth;
+    totalData.value = res.data.history;
+  })
 }
 
 onMounted(() => {
- if (JSON.parse(Cache.get('nav_data'))?.app.id) {
-	miniprogram_idJ.value = JSON.parse(Cache.get('nav_data'))?.app.id
+  if (JSON.parse(Cache.get('nav_data'))?.app.id) {
+    miniprogram_idJ.value = JSON.parse(Cache.get('nav_data'))?.app.id
   }
   init()
   initTodayCharge()