@ -121,7 +121,7 @@
< el -skeleton :loading ="loading" animated >
< el -row >
< el -col v-for ="item in shortcut" :key="`team-${item.name}`" :span="8" class="mb-8px" >
< div class = "flex items-center" >
< div class = "flex items-center" @click ="navigateToRoute(item.url)" >
< Icon :icon ="item.icon" class = "mr-8px" / >
< el -link type = "default" :underline ="false" @click ="setWatermark(item.name)" >
{ { item . name } }
@ -166,13 +166,12 @@
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { formatTime } from '@/utils'
import { useUserStore } from '@/store/modules/user'
import { useWatermark } from '@/hooks/web/useWatermark'
import type { WorkplaceTotal , Project , Notice , Shortcut } from './types'
import { pieOptions , barOptions } from './echarts-data'
import { HomeApi } from "@/api/home/info" ;
import { WeatherVO } from "@/api/home/info" ;
import { WeatherVO } from "@/api/home/info" ;
defineOptions ( { name : 'Home' } )
@ -192,7 +191,7 @@ let totalSate = reactive<WorkplaceTotal>({
const weatherList = ref < WeatherVO [ ] > ( [ ] )
const weatherEnable = ref ( false )
let todayWeather = null
const todayWeather = ref ( { } as WeatherVO )
let weatherCity = ""
/** 初始化 **/
onMounted ( async ( ) => {
@ -201,7 +200,7 @@ onMounted(async () => {
weatherEnable . value = data . isEnable
if ( data . isEnable && weatherList ) {
weatherList . value = data . casts
todayWeather = weatherList . value [ 0 ]
todayWeather . value = weatherList . value [ 0 ]
weatherCity = data . city
}
@ -306,37 +305,44 @@ const getShortcut = async () => {
{
name : '生产任务' ,
icon : 'akar-icons:github-fill' ,
url : ' github.io '
url : ' /mes/plan '
} ,
{
name : '用户管理' ,
icon : 'logos:vue' ,
url : ' vuejs.org '
url : ' /system/user '
} ,
{
name : '采购订单' ,
icon : 'vscode-icons:file-type-vite' ,
url : ' https://vitejs.dev/ '
url : ' /erp/purchase/order '
} ,
{
name : '报表看板' ,
icon : 'logos:angular-icon' ,
url : ' github.io '
url : ' /erp/home '
} ,
{
name : '物联数据' ,
icon : 'logos:react' ,
url : ' github.io '
url : ' /iot/kanban '
} ,
{
name : '仓库管理' ,
icon : 'logos:webpack' ,
url : ' github.io '
url : ' /erp/stock/warehouse '
}
]
shortcut = Object . assign ( shortcut , data )
}
/ / 跳 转 路 由
const router = useRouter ( )
const navigateToRoute = ( url : string ) => {
router . push ( url )
}
/ / 用 户 来 源
const getUserAccessSource = async ( ) => {
const data = [