chenlei1231 hace 4 meses
padre
commit
86ddf77242

+ 2 - 2
src/layouts/default/header/components/user-dropdown/index.vue

@@ -13,9 +13,9 @@
       <Menu @click="handleMenuClick">
         <MenuItem key="doc" :text="t('layout.header.dropdownItemDoc')" icon="ion:document-text-outline" v-if="getShowDoc" />
         <MenuDivider v-if="getShowDoc" />
-        <MenuItem key="account" :text="t('layout.header.dropdownItemSwitchAccount')" icon="ant-design:setting-outlined" />
+        <!-- <MenuItem key="account" :text="t('layout.header.dropdownItemSwitchAccount')" icon="ant-design:setting-outlined" /> -->
         <MenuItem key="password" :text="t('layout.header.dropdownItemSwitchPassword')" icon="ant-design:edit-outlined" />
-        <MenuItem key="depart" :text="t('layout.header.dropdownItemSwitchDepart')" icon="ant-design:cluster-outlined" />
+        <!-- <MenuItem key="depart" :text="t('layout.header.dropdownItemSwitchDepart')" icon="ant-design:cluster-outlined" /> -->
         <MenuItem key="cache" :text="t('layout.header.dropdownItemRefreshCache')" icon="ion:sync-outline" />
         <!-- <MenuItem
             v-if="getUseLockPage"

+ 4 - 4
src/settings/localeSetting.ts

@@ -23,8 +23,8 @@ export const localeList: DropMenu[] = [
     text: '简体中文',
     event: LOCALE.ZH_CN,
   },
-  {
-    text: 'English',
-    event: LOCALE.EN_US,
-  },
+  // {
+  //   text: 'English',
+  //   event: LOCALE.EN_US,
+  // },
 ];

+ 18 - 26
src/views/adweb/data/trafficAnalysis.vue

@@ -1,33 +1,25 @@
 <template>
   <div class="search-form">
     <!-- 站点选择和时间筛选 -->
-    <a-row class="r1">
-      <a-col :span="6">
+    <a-row class="r1" :gutter="8">
+      <a-col :xl="7" :xxl="6">
         <div class="choose-site">
           <span class="t1">站点:</span>
-          <select-site @set-site-info="changeSite" selectWidth="300px" />
+          <select-site @set-site-info="changeSite" select-width="100%" />
         </div>
       </a-col>
-      <a-col :span="8">
-        <span class="t1">统计时间:</span>
-        <a-range-picker @change="onChangeDatePicker" :disabledDate="disabledDate" :value="rangeDate"
-                        style="width:70%" />
+      <a-col :xl="8" :xxl="6">
+        <div class="choose-site">
+          <span class="t1">统计时间:</span>
+          <a-range-picker @change="onChangeDatePicker" :disabledDate="disabledDate" :value="rangeDate" style="width: 70%" />
+        </div>
       </a-col>
-      <a-col :span="10">
-        <a-button :class="queryParam.dateType == '' ? 'active' : ''" @click="setTime('')">全部时间
-        </a-button>
-        <a-button :class="queryParam.dateType == 'thirtyDay' ? 'active' : ''"
-                  @click="setTime('thirtyDay')">近30天
-        </a-button>
-        <a-button :class="queryParam.dateType == 'sevenDay' ? 'active' : ''"
-                  @click="setTime('sevenDay')">近一周
-        </a-button>
-        <a-button :class="queryParam.dateType == 'yesterday' ? 'active' : ''"
-                  @click="setTime('yesterday')">昨日
-        </a-button>
-        <a-button :class="queryParam.dateType == 'today' ? 'active' : ''" @click="setTime('today')">
-          今日
-        </a-button>
+      <a-col :xl="9" :xxl="12">
+        <a-button :class="queryParam.dateType == '' ? 'active' : ''" @click="setTime('')">全部时间 </a-button>
+        <a-button :class="queryParam.dateType == 'thirtyDay' ? 'active' : ''" @click="setTime('thirtyDay')">近30天 </a-button>
+        <a-button :class="queryParam.dateType == 'sevenDay' ? 'active' : ''" @click="setTime('sevenDay')">近一周 </a-button>
+        <a-button :class="queryParam.dateType == 'yesterday' ? 'active' : ''" @click="setTime('yesterday')">昨日 </a-button>
+        <a-button :class="queryParam.dateType == 'today' ? 'active' : ''" @click="setTime('today')"> 今日 </a-button>
       </a-col>
     </a-row>
   </div>
@@ -228,7 +220,6 @@ import selectSite from "@/components/Adweb/selectSite.vue";
 import areaChart from "./chart/areaChart.vue";
 import { reactive, ref } from "vue";
 import { getAction } from "@/api/manage/manage";
-import moment from "moment";
 import MapAdweb from "@/components/chart/mapAdweb.vue";
 import "flag-icon-css/css/flag-icons.css";
 import dayjs from 'dayjs';
@@ -514,7 +505,7 @@ const onChangeDatePicker = (date, dateString) => {
 
 //日期选择只能今天之前
 function disabledDate(current) {
-  return current && current > moment().subtract(0, "days");
+  return current && current > dayjs();
 }
 
 const setTime = (time) => {
@@ -585,10 +576,11 @@ const setTime = (time) => {
   }
 
   .t1 {
-    font-size: 16px;
+    font-size: 18px;
     font-weight: 400;
     letter-spacing: 0px;
-    line-height: 21px;
+    line-height: 32px;
+    margin-left: 10px;
   }
 
   .ant-form-item {

+ 52 - 0
src/views/adweb/logistics/AdwebLogistics.vue

@@ -0,0 +1,52 @@
+<template>
+  <div class="container">
+    <iframe :src="iframeSrc" class="full-iframe"></iframe>
+  </div>
+</template>
+
+<script lang="ts" setup>
+  import { ref, onMounted } from 'vue';
+  import { useUserStore } from '@/store/modules/user';
+  import { getAction } from '@/api/manage/manage';
+
+  // 使用 setup
+  const { userInfo } = useUserStore();
+  const iframeSrc = ref('');
+  onMounted(() => {
+    getUrl();
+  });
+  // 获取 动态url
+  function getUrl() {
+    getAction('/adweb/logistics/getMeiri56Token', null).then((res) => {
+      if (res.success) {
+        const siteCode = localStorage.getItem('siteCode') || '';
+        const realName = userInfo?.realname || '';
+        const userId = userInfo?.id || '';
+        // 获取 字典中存放的token
+        const token = res.result || '';
+        // 动态生成 URL
+        iframeSrc.value = `https://meiri56.com:7779?company=${encodeURIComponent(siteCode)}&companyName=${encodeURIComponent(realName)}&userId=${encodeURIComponent(userId)}&token=${encodeURIComponent(token)}`;
+      } else {
+        console.error('未获取到 token!');
+      }
+    });
+  }
+</script>
+
+<style scoped>
+  .container {
+    width: 100%;
+    height: 100vh;
+    margin: 0;
+    padding: 0;
+    overflow: hidden;
+    display: flex;
+  }
+
+  .full-iframe {
+    width: 100%;
+    height: 100%;
+    border: none;
+    display: block;
+  }
+</style>

+ 4 - 4
src/views/adweb/site/components/GtmAdd.vue

@@ -24,7 +24,7 @@
           <div>
             <p style="text-align: center; font-weight: bold">系统生成的跟踪代码已添加至网站,请勿重复添加跟踪代码。</p>
           </div>
-          <a-form-item label="Gtm Head" name="head">
+          <a-form-item label="GTM Head" name="head">
             <a-textarea
               v-model:value="googleGtmForm.head"
               id="googleGtmHead"
@@ -33,7 +33,7 @@
               :readOnly="true"
             />
           </a-form-item>
-          <a-form-item label="Gtm Body" name="body">
+          <a-form-item label="GTM Body" name="body">
             <a-textarea
               v-model:value="googleGtmForm.body"
               id="googleGtmBody"
@@ -94,8 +94,8 @@
   let googleGtmForm = reactive({ head: '', body: '' });
 
   const googleGtmFormRules = reactive({
-    head: [{ required: true, message: 'Gtm Head不能为空', trigger: 'blur' }],
-    body: [{ required: true, message: 'Gtm Body不能为空', trigger: 'blur' }],
+    head: [{ required: true, message: 'GTM Head不能为空', trigger: 'blur' }],
+    body: [{ required: true, message: 'GTM Body不能为空', trigger: 'blur' }],
   });
 
   function init(record) {