Commit 1d0dc7fd741f96ed6d31b071d5771151c7ccd614

Authored by boyang
1 parent 5b4ea797

修改销售额bug

src/store/modules/user.ts
@@ -15,7 +15,7 @@ import { usePermissionStore } from '/@/store/modules/permission'; @@ -15,7 +15,7 @@ import { usePermissionStore } from '/@/store/modules/permission';
15 import { RouteRecordRaw } from 'vue-router'; 15 import { RouteRecordRaw } from 'vue-router';
16 import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; 16 import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
17 import { isArray } from '/@/utils/is'; 17 import { isArray } from '/@/utils/is';
18 -import { h } from 'vue'; 18 +import { h, ref } from 'vue';
19 19
20 interface UserState { 20 interface UserState {
21 userInfo: Nullable<UserInfo>; 21 userInfo: Nullable<UserInfo>;
@@ -188,3 +188,6 @@ export const useUserStore = defineStore({ @@ -188,3 +188,6 @@ export const useUserStore = defineStore({
188 export function useUserStoreWithOut() { 188 export function useUserStoreWithOut() {
189 return useUserStore(store); 189 return useUserStore(store);
190 } 190 }
  191 +
  192 +//分析台切换页面变量
  193 +export const exchangeTab = ref('tab1');
src/views/dashboard/analysis/components/SiteAnalysis.vue
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
18 import { Card } from 'ant-design-vue'; 18 import { Card } from 'ant-design-vue';
19 import VisitAnalysis from './VisitAnalysis.vue'; 19 import VisitAnalysis from './VisitAnalysis.vue';
20 import VisitAnalysisBar from './VisitAnalysisBar.vue'; 20 import VisitAnalysisBar from './VisitAnalysisBar.vue';
  21 + import { exchangeTab } from '@/store/modules/user';
21 22
22 const activeKey = ref('tab1'); 23 const activeKey = ref('tab1');
23 24
@@ -26,13 +27,14 @@ @@ -26,13 +27,14 @@
26 key: 'tab1', 27 key: 'tab1',
27 tab: '订单趋势', 28 tab: '订单趋势',
28 }, 29 },
29 - // {  
30 - // key: 'tab2',  
31 - // tab: '访问量',  
32 - // }, 30 + {
  31 + key: 'tab2',
  32 + tab: '销售额完成率',
  33 + },
33 ]; 34 ];
34 35
35 function onTabChange(key) { 36 function onTabChange(key) {
36 activeKey.value = key; 37 activeKey.value = key;
  38 + exchangeTab.value = key;
37 } 39 }
38 </script> 40 </script>
src/views/dashboard/analysis/components/VisitAnalysisBar.vue
@@ -41,6 +41,17 @@ @@ -41,6 +41,17 @@
41 type: 'bar', 41 type: 'bar',
42 barMaxWidth: 80, 42 barMaxWidth: 80,
43 }, 43 },
  44 + {
  45 + smooth: true,
  46 + data: [111, 222, 4000, 1800, 3333, 555, 666, 333],
  47 + type: 'line',
  48 + areaStyle: {
  49 + color: 'rgba(255, 255, 255, 0)',
  50 + },
  51 + itemStyle: {
  52 + color: 'rgba(124, 205, 214)',
  53 + },
  54 + },
44 ], 55 ],
45 }); 56 });
46 }); 57 });
src/views/dashboard/analysis/index.vue
@@ -10,14 +10,20 @@ @@ -10,14 +10,20 @@
10 </div> 10 </div>
11 </template> 11 </template>
12 <script lang="ts" setup> 12 <script lang="ts" setup>
13 - import { onMounted, ref } from 'vue'; 13 + import { onMounted, ref, watch } from 'vue';
14 import GrowCard from './components/GrowCard.vue'; 14 import GrowCard from './components/GrowCard.vue';
15 import SiteAnalysis from './components/SiteAnalysis.vue'; 15 import SiteAnalysis from './components/SiteAnalysis.vue';
16 import { useDataStoreWithOut } from '/@/store/modules/data'; 16 import { useDataStoreWithOut } from '/@/store/modules/data';
  17 + import { exchangeTab } from '@/store/modules/user';
17 18
18 const loading = ref(true); 19 const loading = ref(true);
19 const dataStore = useDataStoreWithOut(); 20 const dataStore = useDataStoreWithOut();
20 - 21 + watch(
  22 + () => exchangeTab.value,
  23 + () => {
  24 + console.log(exchangeTab.value, 56562);
  25 + },
  26 + );
21 onMounted(() => { 27 onMounted(() => {
22 dataStore.getFetchData(); 28 dataStore.getFetchData();
23 dataStore.getFetchChartData(); 29 dataStore.getFetchChartData();
src/views/project/config/data.tsx
@@ -96,7 +96,7 @@ export const COLUMNS = { @@ -96,7 +96,7 @@ export const COLUMNS = {
96 }, 96 },
97 { 97 {
98 title: '销售额', 98 title: '销售额',
99 - dataIndex: 'salesAmount', 99 + dataIndex: 'relationValue',
100 width: 150, 100 width: 150,
101 editComponent: 'InputNumber', 101 editComponent: 'InputNumber',
102 editRow: true, 102 editRow: true,