diff --git a/.env.production b/.env.production
index 069cc48..9fd6051 100644
--- a/.env.production
+++ b/.env.production
@@ -6,7 +6,7 @@ ENV = 'production'
VITE_APP_BASE_API = '/prod-api'
# 路由前缀
-VITE_APP_ROUTER_PREFIX = '/'
+VITE_APP_ROUTER_PREFIX = '/vue3/'
# 默认上传地址
VITE_APP_UPLOAD_URL = '/Common/UploadFile'
diff --git a/index.html b/index.html
index 2f874e4..8f7a6b9 100644
--- a/index.html
+++ b/index.html
@@ -9,6 +9,16 @@
ZRAdmin.NET管理系统
+
+
diff --git a/src/views/index_v1.vue b/src/views/index_v1.vue
index 443c3d9..42956c0 100644
--- a/src/views/index_v1.vue
+++ b/src/views/index_v1.vue
@@ -1,48 +1,85 @@
-
+
-
+
+
+ {{ $t('layout.myWorkbench') }}
+
-
-
-
+
-
+
- {{ userInfo.welcomeMessage }} {{ userInfo.nickName }} {{ userInfo.welcomeContent }}
+ {{ userInfo.welcomeMessage + ',' + userInfo.nickName + ' ,' + userInfo.welcomeContent }}
+
+
+
+
+ {{ $t('common.nickName') }}:
+ {{ userInfo.nickName }}
+
+
+ {{ $t('layout.identity') }}:
+
+
+ {{ item.roleName }}
+
+
+
+
+
+
+
+
+ IP:
+
+ {{ userInfo.loginIP }}
+
+
+
+ {{ $t('common.time') }}:
+
+ {{ currentTime }}
+
+
+
+
+
+
+ {{ $t('layout.modifyInformation') }}
+
-
-
-
- {{ $t('layout.modifyInformation') }}
-
-
-
- {{ currentTime }} {{ weekName }}
- 上次登录时间:{{ userInfo.loginDate }}
-
-
-
-
-
-
+
- {{ $t('layout.commonFuncs') }}
-
-
{{ $t('btn.add') }}
+
+ {{ $t('layout.onlineUsers') }}
+ {{ $t('btn.more') }}
@@ -50,11 +87,16 @@
-
+
+
+
+
+
+
@@ -74,13 +116,6 @@
-
@@ -90,12 +125,13 @@ import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
-// import WordCloudChat from './dashboard/WordCloud.vue'
-import CommonMenu from './components/CommonMenu'
+import WordCloudChat from './dashboard/WordCloud.vue'
+
+import dayjs from 'dayjs'
import useUserStore from '@/store/modules/user'
-import { getWeek } from '@/utils/ruoyi'
-const showEdit = ref(false)
+import useSocketStore from '@/store/modules/socket'
+
const data = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
@@ -112,16 +148,68 @@ const data = {
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
- }
+ },
+ wordCloud: [
+ {
+ name: 'Vue3',
+ value: 144
+ },
+ {
+ name: '.net6',
+ value: 928
+ },
+ {
+ name: 'Sqlsugar',
+ value: 906
+ },
+ {
+ name: 'Redis',
+ value: 825
+ },
+ {
+ name: '代码生成',
+ value: 514
+ },
+ {
+ name: '开源免费',
+ value: 486
+ },
+ {
+ name: '代码简单',
+ value: 53
+ },
+ {
+ name: '打赏',
+ value: 163
+ },
+ {
+ name: '国际化',
+ value: 163
+ },
+ {
+ name: 'Composition api',
+ value: 1163
+ },
+ {
+ name: 'Quartz.Net',
+ value: 190
+ },
+ {
+ name: 'Element UI',
+ value: 190
+ }
+ ]
}
const { proxy } = getCurrentInstance()
const userInfo = computed(() => {
return useUserStore().userInfo
})
const currentTime = computed(() => {
- return proxy.parseTime(new Date(), 'YYYY-MM-DD')
+ return proxy.parseTime(new Date())
+})
+const onlineUsers = computed(() => {
+ return useSocketStore().onlineUsers
})
-const weekName = getWeek()
let lineChartData = reactive([])
const dataType = ref(null)
@@ -130,14 +218,27 @@ function handleSetLineChartData(type) {
lineChartData = data[type]
}
handleSetLineChartData('newVisitis')
-
-function handleAdd() {
- proxy.$modal.msg('请通过搜索添加')
+function onOpenGitee() {}
+function onChat(item) {
+ proxy
+ .$prompt('请输入通知内容', '', {
+ confirmButtonText: '发送',
+ cancelButtonText: '取消',
+ inputPattern: /\S/,
+ inputErrorMessage: '消息内容不能为空'
+ })
+ .then(({ value }) => {
+ proxy.signalr.SR.invoke('SendMessage', item.connnectionId, item.name, value).catch(function (err) {
+ console.error(err.toString())
+ })
+ })
+ .catch(() => {})
}