Просмотр исходного кода

Merge branch 'dev-cmn' of https://s-20coaj910c.zht2.com/cmy/data-marketing-platform into dev-ly

luoy 1 день назад
Родитель
Сommit
0d03d76a8d

+ 19 - 3
src/views/count/churn/overview/index.vue

@@ -165,11 +165,27 @@ const paginatedData = computed(() => {
   return dataList.value.slice(start, end);
 });
 
+const getDate = (day: string, num: number) => {
+  const [year, month, date] = day.split('-').map(item => parseInt(item));
+  return formatDate(new Date(new Date(year, month-1, date - num)), 'YYYY-mm-dd');
+}
+
 const getUninstallTrend = () => {
+  const today = new Date();
+  let startDate = '';
+  let endDate = '';
+  let day = today.getDay();
+  if (day>=4) {
+    startDate = getDate(formatDate(today, 'YYYY-mm-dd'), day - 4 + 7);
+    endDate = getDate(formatDate(today, 'YYYY-mm-dd'), day - 4 + 1);
+  } else {
+    startDate = getDate(formatDate(today, 'YYYY-mm-dd'), 14 - 4 + day);
+    endDate = getDate(formatDate(today, 'YYYY-mm-dd'), 7 - 4 + day + 1);
+  }
   uninstallTrend({
-    startDate: formatDate(new Date(new Date().setDate(new Date().getDate() - 7)), 'YYYY-mm-dd'),
-    endDate: formatDate(new Date(), 'YYYY-mm-dd'),
-    timeUnit: 'day',
+    startDate: startDate,
+    endDate: endDate,
+    timeUnit: 'week',
     pageNum: state.pagination!.current,
     pageSize: state.pagination!.size,
   }).then(res => {

+ 5 - 1
src/views/count/churn/portrait/components/DataTable.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-table class="table" :data="data" row-key="name" style="width: 100%" :cell-style="{
+  <el-table class="table" :data="newData" row-key="name" style="width: 100%" :cell-style="{
     ...cellStyle,
     ...props.cellStyle
   }" :header-cell-style="{
@@ -67,6 +67,10 @@ const state = reactive<BasicTableProps>({
   }
 })
 const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state);
+const newData = ref(props.data);
+watch(props.data, () => {
+  newData.value = props.data;
+});
 </script>
 <style scoped lang="scss">
 .percent-box {

+ 1 - 1
src/views/count/device/device/index.vue

@@ -10,7 +10,7 @@
       <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
         <el-card shadow="none">
           <div class="device-container">
-            <div class="title">TOP10机型
+            <div class="title">TOP10{{ wayType[form.tab - 1] }}
               <el-tooltip effect="light" content="" placement="right-start">
                 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
                   <path

+ 1 - 1
src/views/count/device/location/index.vue

@@ -10,7 +10,7 @@
       <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
         <el-card shadow="none">
           <div class="location-container">
-            <div class="title">TOP10省市
+            <div class="title">TOP10{{ form.tab === 1 ? '省市' : '国家/地区' }}
               <el-tooltip effect="light" content="" placement="right-start">
                 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
                   <path

+ 29 - 1
src/views/count/device/network/index.vue

@@ -10,7 +10,35 @@
       <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
         <el-card shadow="none">
           <div class="device-container">
-            <div class="title">TOP10联网方式</div>
+            <div class="title">TOP10{{ form.tab === 1 ? '联网方式' : '运营商' }}
+              <el-tooltip effect="light" content="" placement="right-start">
+                <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+                  <path
+                    d="M7 14C8.93298 14 10.683 13.2165 11.9497 11.9497C13.2165 10.683 14 8.93298 14 7C14 5.06702 13.2165 3.31702 11.9497 2.05025C10.683 0.783503 8.93298 0 7 0C5.06702 0 3.31702 0.783503 2.05025 2.05025C0.783503 3.31702 0 5.06702 0 7C0 8.93298 0.783503 10.683 2.05025 11.9497C3.31702 13.2165 5.06702 14 7 14Z"
+                    fill="#1B4D88" fill-opacity="0.4" />
+                  <path fill-rule="evenodd" clip-rule="evenodd"
+                    d="M6.99957 1.94434C7.5365 1.94434 7.97179 2.37962 7.97179 2.91656C7.97179 3.4535 7.5365 3.88878 6.99957 3.88878C6.46263 3.88878 6.02734 3.4535 6.02734 2.91656C6.02734 2.37962 6.46263 1.94434 6.99957 1.94434Z"
+                    fill="white" />
+                  <path
+                    d="M6.99957 1.94434C7.5365 1.94434 7.97179 2.37962 7.97179 2.91656C7.97179 3.4535 7.5365 3.88878 6.99957 3.88878C6.46263 3.88878 6.02734 3.4535 6.02734 2.91656C6.02734 2.37962 6.46263 1.94434 6.99957 1.94434ZM6.99957 2.33322C6.6774 2.33322 6.41623 2.5944 6.41623 2.91656C6.41623 3.23872 6.6774 3.49989 6.99957 3.49989C7.32173 3.49989 7.5829 3.23872 7.5829 2.91656C7.5829 2.5944 7.32173 2.33322 6.99957 2.33322Z"
+                    fill="white" />
+                  <path d="M7.19477 10.8888V5.44434H6.80588H6.41699" fill="white" />
+                  <path
+                    d="M6.41645 10.8892V6.22255C5.98689 6.22255 5.63867 5.87432 5.63867 5.44477C5.63867 5.01522 5.98689 4.66699 6.41645 4.66699H7.19423L7.27398 4.67079C7.66608 4.71071 7.97201 5.04213 7.97201 5.44477V10.8892C7.97201 11.3188 7.70354 11.3452 7.27398 11.3452C6.84443 11.3452 6.41645 11.3188 6.41645 10.8892Z"
+                    fill="white" />
+                  <path
+                    d="M8.55566 10C8.98522 10 9.33344 10.3482 9.33344 10.7778C9.33344 11.2073 8.98522 11.5556 8.55566 11.5556H5.83344C5.40389 11.5556 5.05566 11.2073 5.05566 10.7778C5.05566 10.3482 5.40389 10 5.83344 10H8.55566Z"
+                    fill="white" />
+                </svg>
+                <template #content>
+                  <div style="width: 300px;">
+                    您可以查看在指定时段(1天、7天、30天)内用户运营商的分布情况,并可以进行版本、渠道和分群的交叉筛选。
+                    <br />
+                    筛选只展示昨日及之前的数据,启动次数指标只支持昨日之前的查询。
+                  </div>
+                </template>
+              </el-tooltip>
+            </div>
             <div class="card-tabs">
               <div class="card-tab" :class="{ active: echartsTab === 'newUser' }" @click="handleTabClick('newUser')">
                 新增用户

+ 5 - 12
src/views/marketing/push-logs/index.vue

@@ -64,6 +64,9 @@
             {{ row.pushStatus ? '已推送' : '未推送' }}
           </template>
         </el-table-column>
+        <el-table-column :formatter="statusFormatter" :label="'客户端ID'" prop="clientID" min-width="120"
+          show-overflow-tooltip>
+        </el-table-column>
         <el-table-column :formatter="statusFormatter" :label="'推送详情'" prop="pushDetail" min-width="250">
           <template #default="{ row }">
             <div class="trigger-info" @click="showTriggerInfo(row)">
@@ -161,16 +164,6 @@ const disabledDate = (time: Date) => {
   return time.getTime() > Date.now();
 }
 
-interface SourceData {
-  ruleName: string;
-  triggerCondition: string;
-  triggerTime: string;
-  pushStatus: string;
-  pushContent: string;
-  pushFrequency: string;
-  pushTime: string;
-}
-
 const richContentDialogRef = ref();
 const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state);
 
@@ -225,8 +218,8 @@ const formatNum = (value: string | number = 0) => {
 	return '--';
 };
 
-onMounted(() => {
-  getFetchItemList();
+onMounted(async () => {
+  await getFetchItemList();
   query();
 });