From 8b0f2d39ff0685563c5bd9e1c3d3880ae8ca8f36 Mon Sep 17 00:00:00 2001 From: liuchen <23082234@qq.com> Date: Mon, 5 Feb 2024 15:08:16 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E5=A2=9E=E5=8A=A0dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- .env.test | 10 ++++---- Dockerfile | 7 ++++++ nginx.conf | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/.env.production b/.env.production index 40e5dd4..7b93ff4 100644 --- a/.env.production +++ b/.env.production @@ -31,7 +31,7 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist-pro +VITE_OUT_DIR=zhucheng # 积木报表请求路径 # VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:26110' diff --git a/.env.test b/.env.test index 23eb72d..2693866 100644 --- a/.env.test +++ b/.env.test @@ -4,10 +4,10 @@ NODE_ENV=test VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://dev.ccwin-in.com:26110' +VITE_BASE_URL='http://dev.ccwin-in.com:26100/api' # 上传路径 -VITE_UPLOAD_URL='http://dev.ccwin-in.com:26110/api/infra/file/upload' +VITE_UPLOAD_URL='http://dev.ccwin-in.com:26100/api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -28,10 +28,10 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist-test +VITE_OUT_DIR=zhucheng # 自定义接口路径 -VITE_INTERFACE_URL='http://dev.ccwin-in.com:26112/magic/web/index.html' +VITE_INTERFACE_URL='http://dev.ccwin-in.com:26110/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:26112' +VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:26110' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4f719fc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +# 设置基础镜像 +FROM nginx:WIN-1.25.3 + +WORKDIR /opt/zhucheng +COPY nginx.conf /usr/local/nginx/conf/nginx.conf +# 将dist文件中的内容复制到 /opt/zhucheng 这个目录下面 +COPY zhucheng/ /opt/zhucheng diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..539db9d --- /dev/null +++ b/nginx.conf @@ -0,0 +1,61 @@ +user root; +worker_processes 2; + +events { + worker_connections 1024; +} + +http { + include mime.types; + charset utf-8,gbk; + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"'; + + proxy_cache_path /opt/nginx_cache/ levels=1:2 keys_zone=my_zone:10m inactive=300s max_size=5g; + access_log logs/access.log main; + sendfile on; + #tcp_nopush on; + keepalive_timeout 600s; + client_max_body_size 200m; + gzip on; + gzip_min_length 10k; + gzip_comp_level 9; + gzip_buffers 4 16k; + gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + upstream zhucheng { + server localhost:26110 weight=10 max_fails=3 fail_timeout=10s; + } + server { + listen 26100; + server_name_in_redirect off; + server_name dev.ccwin-in.com; + location /api/ { + proxy_pass http://zhucheng/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location /profile/ { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + alias /opt/profile/; + index index.html index.htm; + } + location / { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + try_files $uri $uri/ /index.html; + root /opt/zhucheng; + index index.html index.htm; + } + } +} + From 31d94c366d69add080414de0d69bd26ec487ff86 Mon Sep 17 00:00:00 2001 From: liuchen <23082234@qq.com> Date: Mon, 5 Feb 2024 15:29:22 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.test b/.env.test index 2693866..e79d5bd 100644 --- a/.env.test +++ b/.env.test @@ -4,10 +4,10 @@ NODE_ENV=test VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://dev.ccwin-in.com:26100/api' +VITE_BASE_URL='http://dev.ccwin-in.com:27100/api' # 上传路径 -VITE_UPLOAD_URL='http://dev.ccwin-in.com:26100/api/infra/file/upload' +VITE_UPLOAD_URL='http://dev.ccwin-in.com:27100/api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -31,7 +31,7 @@ VITE_BASE_PATH=/ VITE_OUT_DIR=zhucheng # 自定义接口路径 -VITE_INTERFACE_URL='http://dev.ccwin-in.com:26110/magic/web/index.html' +VITE_INTERFACE_URL='http://dev.ccwin-in.com:27110/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:26110' +VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:27110' From 13191e1451f3acb68dcb6e2f2ad0f6e2125fe71b Mon Sep 17 00:00:00 2001 From: liuchen <23082234@qq.com> Date: Mon, 5 Feb 2024 15:30:34 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 539db9d..5490ce7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -27,10 +27,10 @@ http { gzip_vary on; gzip_disable "MSIE [1-6]\."; upstream zhucheng { - server localhost:26110 weight=10 max_fails=3 fail_timeout=10s; + server localhost:27110 weight=10 max_fails=3 fail_timeout=10s; } server { - listen 26100; + listen 27100; server_name_in_redirect off; server_name dev.ccwin-in.com; location /api/ { From 57a1a9b109a94997f690ba53191395a52e1250b9 Mon Sep 17 00:00:00 2001 From: liuchen <23082234@qq.com> Date: Mon, 5 Feb 2024 15:53:28 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.test b/.env.test index e79d5bd..52ae146 100644 --- a/.env.test +++ b/.env.test @@ -4,10 +4,10 @@ NODE_ENV=test VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://dev.ccwin-in.com:27100/api' +VITE_BASE_URL='http://dev.ccwin-in.com:27110/api' # 上传路径 -VITE_UPLOAD_URL='http://dev.ccwin-in.com:27100/api/infra/file/upload' +VITE_UPLOAD_URL='http://dev.ccwin-in.com:27110/api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= From 91df5a6b0e780ab13860ab2271a70c129cc318f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 5 Feb 2024 16:26:41 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 18 +- src/views/Home/Index.vue | 13 - src/views/Home/Index.vue.bark | 381 ------------------ src/views/Home/Index2.vue | 319 --------------- src/views/Home/echarts-data.ts | 308 -------------- src/views/Home/types.ts | 55 --- src/views/Login/Login.vue | 104 ----- src/views/Login/components/LoginForm.vue | 285 ------------- src/views/Login/components/LoginFormTitle.vue | 26 -- src/views/Login/components/MobileForm.vue | 225 ----------- src/views/Login/components/QrCodeForm.vue | 30 -- src/views/Login/components/RegisterForm.vue | 142 ------- src/views/Login/components/SSOLogin.vue | 199 --------- src/views/Login/components/index.ts | 8 - src/views/Login/components/useLogin.ts | 42 -- src/views/Profile/Index.vue | 64 --- src/views/Profile/components/BasicInfo.vue | 92 ----- src/views/Profile/components/ProfileUser.vue | 99 ----- src/views/Profile/components/ResetPwd.vue | 73 ---- src/views/Profile/components/UserAvatar.vue | 39 -- src/views/Profile/components/UserSocial.vue | 94 ----- src/views/Profile/components/index.ts | 7 - src/views/Redirect/Redirect.vue | 28 -- src/views/error/403.vue | 8 - src/views/error/404.vue | 7 - src/views/error/500.vue | 7 - 26 files changed, 9 insertions(+), 2664 deletions(-) delete mode 100644 src/views/Home/Index.vue delete mode 100644 src/views/Home/Index.vue.bark delete mode 100644 src/views/Home/Index2.vue delete mode 100644 src/views/Home/echarts-data.ts delete mode 100644 src/views/Home/types.ts delete mode 100644 src/views/Login/Login.vue delete mode 100644 src/views/Login/components/LoginForm.vue delete mode 100644 src/views/Login/components/LoginFormTitle.vue delete mode 100644 src/views/Login/components/MobileForm.vue delete mode 100644 src/views/Login/components/QrCodeForm.vue delete mode 100644 src/views/Login/components/RegisterForm.vue delete mode 100644 src/views/Login/components/SSOLogin.vue delete mode 100644 src/views/Login/components/index.ts delete mode 100644 src/views/Login/components/useLogin.ts delete mode 100644 src/views/Profile/Index.vue delete mode 100644 src/views/Profile/components/BasicInfo.vue delete mode 100644 src/views/Profile/components/ProfileUser.vue delete mode 100644 src/views/Profile/components/ResetPwd.vue delete mode 100644 src/views/Profile/components/UserAvatar.vue delete mode 100644 src/views/Profile/components/UserSocial.vue delete mode 100644 src/views/Profile/components/index.ts delete mode 100644 src/views/Redirect/Redirect.vue delete mode 100644 src/views/error/403.vue delete mode 100644 src/views/error/404.vue delete mode 100644 src/views/error/500.vue diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index d6349e6..6af560b 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -41,7 +41,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/redirect/:path(.*)', name: 'Redirect', - component: () => import('@/views/Redirect/Redirect.vue'), + component: () => import('@/views/redirect/redirect.vue'), meta: {} } ], @@ -59,7 +59,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'index', - component: () => import('@/views/Home/Index.vue'), + component: () => import('@/views/home/index.vue'), name: 'Index', meta: { title: t('router.home'), @@ -80,7 +80,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'profile', - component: () => import('@/views/Profile/Index.vue'), + component: () => import('@/views/profile/index.vue'), name: 'Profile', meta: { canTo: true, @@ -139,7 +139,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'edit', - component: () => import('@/views/infra/codegen/EditTable.vue'), + component: () => import('@/views/infra/codegen/editTable.vue'), name: 'InfraCodegenEditTable', meta: { noCache: true, @@ -177,7 +177,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/login', - component: () => import('@/views/Login/Login.vue'), + component: () => import('@/views/login/login.vue'), name: 'Login', meta: { hidden: true, @@ -187,7 +187,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/sso', - component: () => import('@/views/Login/Login.vue'), + component: () => import('@/views/login/login.vue'), name: 'SSOLogin', meta: { hidden: true, @@ -197,7 +197,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/403', - component: () => import('@/views/Error/403.vue'), + component: () => import('@/views/error/403.vue'), name: 'NoAccess', meta: { hidden: true, @@ -207,7 +207,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/404', - component: () => import('@/views/Error/404.vue'), + component: () => import('@/views/error/404.vue'), name: 'NoFound', meta: { hidden: true, @@ -217,7 +217,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/500', - component: () => import('@/views/Error/500.vue'), + component: () => import('@/views/error/500.vue'), name: 'Error', meta: { hidden: true, diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue deleted file mode 100644 index 114e8d5..0000000 --- a/src/views/Home/Index.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/src/views/Home/Index.vue.bark b/src/views/Home/Index.vue.bark deleted file mode 100644 index 121ec6a..0000000 --- a/src/views/Home/Index.vue.bark +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - {{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }} - - - {{ t('workplace.toady') }},20℃ - 32℃! - - - - - - - - {{ t('workplace.project') }} - - - - - {{ t('workplace.toDo') }} - - - - - {{ t('workplace.access') }} - - - - - - - - - - - - - - - {{ t('workplace.project') }} - {{ t('action.more') }} - - - - - - - - - {{ item.name }} - - {{ t(item.message) }} - - {{ item.personal }} - {{ formatTime(item.time, 'yyyy-MM-dd') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ t('workplace.shortcutOperation') }} - - - - - - - - - {{ item.name }} - - - - - - - - - - {{ t('workplace.notice') }} - {{ t('action.more') }} - - - - - - - - - - {{ item.type }} : {{ item.title }} - - - - {{ formatTime(item.date, 'yyyy-MM-dd') }} - - - - - - - - - - - diff --git a/src/views/Home/Index2.vue b/src/views/Home/Index2.vue deleted file mode 100644 index c9429ab..0000000 --- a/src/views/Home/Index2.vue +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - {{ t('analysis.newUser') }} - - - - - - - - - - - - - - - - - - - - - {{ t('analysis.unreadInformation') }} - - - - - - - - - - - - - - - - - - - - - {{ t('analysis.transactionAmount') }} - - - - - - - - - - - - - - - - - - - - - {{ t('analysis.totalShopping') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/Home/echarts-data.ts b/src/views/Home/echarts-data.ts deleted file mode 100644 index 56093f4..0000000 --- a/src/views/Home/echarts-data.ts +++ /dev/null @@ -1,308 +0,0 @@ -import { EChartsOption } from 'echarts' - -const { t } = useI18n() - -export const lineOptions: EChartsOption = { - title: { - text: t('analysis.monthlySales'), - left: 'center' - }, - xAxis: { - data: [ - t('analysis.january'), - t('analysis.february'), - t('analysis.march'), - t('analysis.april'), - t('analysis.may'), - t('analysis.june'), - t('analysis.july'), - t('analysis.august'), - t('analysis.september'), - t('analysis.october'), - t('analysis.november'), - t('analysis.december') - ], - boundaryGap: false, - axisTick: { - show: false - } - }, - grid: { - left: 20, - right: 20, - bottom: 20, - top: 80, - containLabel: true - }, - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'cross' - }, - padding: [5, 10] - }, - yAxis: { - axisTick: { - show: false - } - }, - legend: { - data: [t('analysis.estimate'), t('analysis.actual')], - top: 50 - }, - series: [ - { - name: t('analysis.estimate'), - smooth: true, - type: 'line', - data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123], - animationDuration: 2800, - animationEasing: 'cubicInOut' - }, - { - name: t('analysis.actual'), - smooth: true, - type: 'line', - itemStyle: {}, - data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123], - animationDuration: 2800, - animationEasing: 'quadraticOut' - } - ] -} - -export const pieOptions: EChartsOption = { - title: { - text: t('analysis.userAccessSource'), - left: 'center' - }, - tooltip: { - trigger: 'item', - formatter: '{a} {b} : {c} ({d}%)' - }, - legend: { - orient: 'vertical', - left: 'left', - data: [ - t('analysis.directAccess'), - t('analysis.mailMarketing'), - t('analysis.allianceAdvertising'), - t('analysis.videoAdvertising'), - t('analysis.searchEngines') - ] - }, - series: [ - { - name: t('analysis.userAccessSource'), - type: 'pie', - radius: '55%', - center: ['50%', '60%'], - data: [ - { value: 335, name: t('analysis.directAccess') }, - { value: 310, name: t('analysis.mailMarketing') }, - { value: 234, name: t('analysis.allianceAdvertising') }, - { value: 135, name: t('analysis.videoAdvertising') }, - { value: 1548, name: t('analysis.searchEngines') } - ] - } - ] -} - -export const barOptions: EChartsOption = { - title: { - text: t('analysis.weeklyUserActivity'), - left: 'center' - }, - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } - }, - grid: { - left: 50, - right: 20, - bottom: 20 - }, - xAxis: { - type: 'category', - data: [ - t('analysis.monday'), - t('analysis.tuesday'), - t('analysis.wednesday'), - t('analysis.thursday'), - t('analysis.friday'), - t('analysis.saturday'), - t('analysis.sunday') - ], - axisTick: { - alignWithLabel: true - } - }, - yAxis: { - type: 'value' - }, - series: [ - { - name: t('analysis.activeQuantity'), - data: [13253, 34235, 26321, 12340, 24643, 1322, 1324], - type: 'bar' - } - ] -} - -export const radarOption: EChartsOption = { - legend: { - data: [t('workplace.personal'), t('workplace.team')] - }, - radar: { - // shape: 'circle', - indicator: [ - { name: t('workplace.quote'), max: 65 }, - { name: t('workplace.contribution'), max: 160 }, - { name: t('workplace.hot'), max: 300 }, - { name: t('workplace.yield'), max: 130 }, - { name: t('workplace.follow'), max: 100 } - ] - }, - series: [ - { - name: `xxx${t('workplace.index')}`, - type: 'radar', - data: [ - { - value: [42, 30, 20, 35, 80], - name: t('workplace.personal') - }, - { - value: [50, 140, 290, 100, 90], - name: t('workplace.team') - } - ] - } - ] -} - -export const wordOptions = { - series: [ - { - type: 'wordCloud', - gridSize: 2, - sizeRange: [12, 50], - rotationRange: [-90, 90], - shape: 'pentagon', - width: 600, - height: 400, - drawOutOfBound: true, - textStyle: { - color: function () { - return ( - 'rgb(' + - [ - Math.round(Math.random() * 160), - Math.round(Math.random() * 160), - Math.round(Math.random() * 160) - ].join(',') + - ')' - ) - } - }, - emphasis: { - textStyle: { - shadowBlur: 10, - shadowColor: '#333' - } - }, - data: [ - { - name: 'Sam S Club', - value: 10000, - textStyle: { - color: 'black' - }, - emphasis: { - textStyle: { - color: 'red' - } - } - }, - { - name: 'Macys', - value: 6181 - }, - { - name: 'Amy Schumer', - value: 4386 - }, - { - name: 'Jurassic World', - value: 4055 - }, - { - name: 'Charter Communications', - value: 2467 - }, - { - name: 'Chick Fil A', - value: 2244 - }, - { - name: 'Planet Fitness', - value: 1898 - }, - { - name: 'Pitch Perfect', - value: 1484 - }, - { - name: 'Express', - value: 1112 - }, - { - name: 'Home', - value: 965 - }, - { - name: 'Johnny Depp', - value: 847 - }, - { - name: 'Lena Dunham', - value: 582 - }, - { - name: 'Lewis Hamilton', - value: 555 - }, - { - name: 'KXAN', - value: 550 - }, - { - name: 'Mary Ellen Mark', - value: 462 - }, - { - name: 'Farrah Abraham', - value: 366 - }, - { - name: 'Rita Ora', - value: 360 - }, - { - name: 'Serena Williams', - value: 282 - }, - { - name: 'NCAA baseball tournament', - value: 273 - }, - { - name: 'Point Break', - value: 265 - } - ] - } - ] -} diff --git a/src/views/Home/types.ts b/src/views/Home/types.ts deleted file mode 100644 index e6313d3..0000000 --- a/src/views/Home/types.ts +++ /dev/null @@ -1,55 +0,0 @@ -export type WorkplaceTotal = { - project: number - access: number - todo: number -} - -export type Project = { - name: string - icon: string - message: string - personal: string - time: Date | number | string -} - -export type Notice = { - title: string - type: string - keys: string[] - date: Date | number | string -} - -export type Shortcut = { - name: string - icon: string - url: string -} - -export type RadarData = { - personal: number - team: number - max: number - name: string -} -export type AnalysisTotalTypes = { - users: number - messages: number - moneys: number - shoppings: number -} - -export type UserAccessSource = { - value: number - name: string -} - -export type WeeklyUserActivity = { - value: number - name: string -} - -export type MonthlySales = { - name: string - estimate: number - actual: number -} diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue deleted file mode 100644 index d572905..0000000 --- a/src/views/Login/Login.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - {{ underlineToHump(appStore.getTitle) }} - - - - - - {{ t('login.welcome') }} - - {{ t('login.message') }} - - - - - - - - - - {{ underlineToHump(appStore.getTitle) }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue deleted file mode 100644 index 0d1745a..0000000 --- a/src/views/Login/components/LoginForm.vue +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ t('login.remember') }} - - - - {{ t('login.forgetPassword') }} - - - - - - - - - - - - - - - - - diff --git a/src/views/Login/components/LoginFormTitle.vue b/src/views/Login/components/LoginFormTitle.vue deleted file mode 100644 index cdf4fac..0000000 --- a/src/views/Login/components/LoginFormTitle.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - {{ getFormTitle }} - - - diff --git a/src/views/Login/components/MobileForm.vue b/src/views/Login/components/MobileForm.vue deleted file mode 100644 index ebb36b8..0000000 --- a/src/views/Login/components/MobileForm.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ t('login.getSmsCode') }} - - - {{ mobileCodeTimer }}秒后可重新获取 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/Login/components/QrCodeForm.vue b/src/views/Login/components/QrCodeForm.vue deleted file mode 100644 index 31d2845..0000000 --- a/src/views/Login/components/QrCodeForm.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - {{ t('login.qrcode') }} - - - - - - - - diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue deleted file mode 100644 index 23b3bd4..0000000 --- a/src/views/Login/components/RegisterForm.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/Login/components/SSOLogin.vue b/src/views/Login/components/SSOLogin.vue deleted file mode 100644 index f31ab0e..0000000 --- a/src/views/Login/components/SSOLogin.vue +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - 此第三方应用请求获得以下权限: - - - - {{ formatScope(scope) }} - - - - - - - 同意授权 - 授 权 中... - - 拒绝 - - - - - - diff --git a/src/views/Login/components/index.ts b/src/views/Login/components/index.ts deleted file mode 100644 index 204ad73..0000000 --- a/src/views/Login/components/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import LoginForm from './LoginForm.vue' -import MobileForm from './MobileForm.vue' -import LoginFormTitle from './LoginFormTitle.vue' -import RegisterForm from './RegisterForm.vue' -import QrCodeForm from './QrCodeForm.vue' -import SSOLoginVue from './SSOLogin.vue' - -export { LoginForm, MobileForm, LoginFormTitle, RegisterForm, QrCodeForm, SSOLoginVue } diff --git a/src/views/Login/components/useLogin.ts b/src/views/Login/components/useLogin.ts deleted file mode 100644 index b4a02f8..0000000 --- a/src/views/Login/components/useLogin.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Ref } from 'vue' - -export enum LoginStateEnum { - LOGIN, - REGISTER, - RESET_PASSWORD, - MOBILE, - QR_CODE, - SSO -} - -const currentState = ref(LoginStateEnum.LOGIN) - -export function useLoginState() { - function setLoginState(state: LoginStateEnum) { - currentState.value = state - } - const getLoginState = computed(() => currentState.value) - - function handleBackLogin() { - setLoginState(LoginStateEnum.LOGIN) - } - - return { - setLoginState, - getLoginState, - handleBackLogin - } -} - -export function useFormValid(formRef: Ref) { - async function validForm() { - const form = unref(formRef) - if (!form) return - const data = await form.validate() - return data as T - } - - return { - validForm - } -} diff --git a/src/views/Profile/Index.vue b/src/views/Profile/Index.vue deleted file mode 100644 index e813f04..0000000 --- a/src/views/Profile/Index.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - {{ t('profile.user.title') }} - - - - - - - - {{ t('profile.info.title') }} - - - - - - - - - - - - - - - - - - diff --git a/src/views/Profile/components/BasicInfo.vue b/src/views/Profile/components/BasicInfo.vue deleted file mode 100644 index e2189b1..0000000 --- a/src/views/Profile/components/BasicInfo.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - - {{ t('profile.user.man') }} - {{ t('profile.user.woman') }} - - - - - - - - - diff --git a/src/views/Profile/components/ProfileUser.vue b/src/views/Profile/components/ProfileUser.vue deleted file mode 100644 index b493499..0000000 --- a/src/views/Profile/components/ProfileUser.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - {{ t('profile.user.username') }} - {{ userInfo?.username }} - - - - {{ t('profile.user.mobile') }} - {{ userInfo?.mobile }} - - - - {{ t('profile.user.email') }} - {{ userInfo?.email }} - - - - {{ t('profile.user.dept') }} - {{ userInfo?.dept.name }} - - - - {{ t('profile.user.posts') }} - - {{ userInfo?.posts.map((post) => post.name).join(',') }} - - - - - {{ t('profile.user.roles') }} - - {{ userInfo?.roles.map((role) => role.name).join(',') }} - - - - - {{ t('profile.user.createTime') }} - {{ formatDate(userInfo?.createTime) }} - - - - - - - diff --git a/src/views/Profile/components/ResetPwd.vue b/src/views/Profile/components/ResetPwd.vue deleted file mode 100644 index 477be91..0000000 --- a/src/views/Profile/components/ResetPwd.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/views/Profile/components/UserAvatar.vue b/src/views/Profile/components/UserAvatar.vue deleted file mode 100644 index c20168f..0000000 --- a/src/views/Profile/components/UserAvatar.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - diff --git a/src/views/Profile/components/UserSocial.vue b/src/views/Profile/components/UserSocial.vue deleted file mode 100644 index 2f021ab..0000000 --- a/src/views/Profile/components/UserSocial.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - {{ row.title }} - - - - - - 已绑定 - - - - 未绑定 - - - - - - - diff --git a/src/views/Profile/components/index.ts b/src/views/Profile/components/index.ts deleted file mode 100644 index 9e1883c..0000000 --- a/src/views/Profile/components/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import BasicInfo from './BasicInfo.vue' -import ProfileUser from './ProfileUser.vue' -import ResetPwd from './ResetPwd.vue' -import UserAvatarVue from './UserAvatar.vue' -import UserSocial from './UserSocial.vue' - -export { BasicInfo, ProfileUser, ResetPwd, UserAvatarVue, UserSocial } diff --git a/src/views/Redirect/Redirect.vue b/src/views/Redirect/Redirect.vue deleted file mode 100644 index f7717ce..0000000 --- a/src/views/Redirect/Redirect.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - diff --git a/src/views/error/403.vue b/src/views/error/403.vue deleted file mode 100644 index a3ec487..0000000 --- a/src/views/error/403.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/src/views/error/404.vue b/src/views/error/404.vue deleted file mode 100644 index f6a08de..0000000 --- a/src/views/error/404.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/src/views/error/500.vue b/src/views/error/500.vue deleted file mode 100644 index 998487d..0000000 --- a/src/views/error/500.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - - From a1e4e79da6a0e35b25c904c769c90bbc8eb83748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 5 Feb 2024 16:27:07 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/error/403.vue | 8 + src/views/error/404.vue | 7 + src/views/error/500.vue | 7 + src/views/home/Index.vue.bark | 381 ++++++++++++++++++ src/views/home/Index2.vue | 319 +++++++++++++++ src/views/home/echarts-data.ts | 308 ++++++++++++++ src/views/home/index.vue | 13 + src/views/home/types.ts | 55 +++ src/views/login/components/LoginForm.vue | 285 +++++++++++++ src/views/login/components/LoginFormTitle.vue | 26 ++ src/views/login/components/MobileForm.vue | 225 +++++++++++ src/views/login/components/QrCodeForm.vue | 30 ++ src/views/login/components/RegisterForm.vue | 142 +++++++ src/views/login/components/SSOLogin.vue | 199 +++++++++ src/views/login/components/index.ts | 8 + src/views/login/components/useLogin.ts | 42 ++ src/views/login/login.vue | 104 +++++ src/views/profile/components/BasicInfo.vue | 92 +++++ src/views/profile/components/ProfileUser.vue | 99 +++++ src/views/profile/components/ResetPwd.vue | 73 ++++ src/views/profile/components/UserAvatar.vue | 39 ++ src/views/profile/components/UserSocial.vue | 94 +++++ src/views/profile/components/index.ts | 7 + src/views/profile/index.vue | 64 +++ src/views/redirect/redirect.vue | 28 ++ 25 files changed, 2655 insertions(+) create mode 100644 src/views/error/403.vue create mode 100644 src/views/error/404.vue create mode 100644 src/views/error/500.vue create mode 100644 src/views/home/Index.vue.bark create mode 100644 src/views/home/Index2.vue create mode 100644 src/views/home/echarts-data.ts create mode 100644 src/views/home/index.vue create mode 100644 src/views/home/types.ts create mode 100644 src/views/login/components/LoginForm.vue create mode 100644 src/views/login/components/LoginFormTitle.vue create mode 100644 src/views/login/components/MobileForm.vue create mode 100644 src/views/login/components/QrCodeForm.vue create mode 100644 src/views/login/components/RegisterForm.vue create mode 100644 src/views/login/components/SSOLogin.vue create mode 100644 src/views/login/components/index.ts create mode 100644 src/views/login/components/useLogin.ts create mode 100644 src/views/login/login.vue create mode 100644 src/views/profile/components/BasicInfo.vue create mode 100644 src/views/profile/components/ProfileUser.vue create mode 100644 src/views/profile/components/ResetPwd.vue create mode 100644 src/views/profile/components/UserAvatar.vue create mode 100644 src/views/profile/components/UserSocial.vue create mode 100644 src/views/profile/components/index.ts create mode 100644 src/views/profile/index.vue create mode 100644 src/views/redirect/redirect.vue diff --git a/src/views/error/403.vue b/src/views/error/403.vue new file mode 100644 index 0000000..a3ec487 --- /dev/null +++ b/src/views/error/403.vue @@ -0,0 +1,8 @@ + + + + diff --git a/src/views/error/404.vue b/src/views/error/404.vue new file mode 100644 index 0000000..f6a08de --- /dev/null +++ b/src/views/error/404.vue @@ -0,0 +1,7 @@ + + + + diff --git a/src/views/error/500.vue b/src/views/error/500.vue new file mode 100644 index 0000000..998487d --- /dev/null +++ b/src/views/error/500.vue @@ -0,0 +1,7 @@ + + + + diff --git a/src/views/home/Index.vue.bark b/src/views/home/Index.vue.bark new file mode 100644 index 0000000..121ec6a --- /dev/null +++ b/src/views/home/Index.vue.bark @@ -0,0 +1,381 @@ + + + + + + + + + + + {{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }} + + + {{ t('workplace.toady') }},20℃ - 32℃! + + + + + + + + {{ t('workplace.project') }} + + + + + {{ t('workplace.toDo') }} + + + + + {{ t('workplace.access') }} + + + + + + + + + + + + + + + {{ t('workplace.project') }} + {{ t('action.more') }} + + + + + + + + + {{ item.name }} + + {{ t(item.message) }} + + {{ item.personal }} + {{ formatTime(item.time, 'yyyy-MM-dd') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('workplace.shortcutOperation') }} + + + + + + + + + {{ item.name }} + + + + + + + + + + {{ t('workplace.notice') }} + {{ t('action.more') }} + + + + + + + + + + {{ item.type }} : {{ item.title }} + + + + {{ formatTime(item.date, 'yyyy-MM-dd') }} + + + + + + + + + + + diff --git a/src/views/home/Index2.vue b/src/views/home/Index2.vue new file mode 100644 index 0000000..c9429ab --- /dev/null +++ b/src/views/home/Index2.vue @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + {{ t('analysis.newUser') }} + + + + + + + + + + + + + + + + + + + + + {{ t('analysis.unreadInformation') }} + + + + + + + + + + + + + + + + + + + + + {{ t('analysis.transactionAmount') }} + + + + + + + + + + + + + + + + + + + + + {{ t('analysis.totalShopping') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/home/echarts-data.ts b/src/views/home/echarts-data.ts new file mode 100644 index 0000000..56093f4 --- /dev/null +++ b/src/views/home/echarts-data.ts @@ -0,0 +1,308 @@ +import { EChartsOption } from 'echarts' + +const { t } = useI18n() + +export const lineOptions: EChartsOption = { + title: { + text: t('analysis.monthlySales'), + left: 'center' + }, + xAxis: { + data: [ + t('analysis.january'), + t('analysis.february'), + t('analysis.march'), + t('analysis.april'), + t('analysis.may'), + t('analysis.june'), + t('analysis.july'), + t('analysis.august'), + t('analysis.september'), + t('analysis.october'), + t('analysis.november'), + t('analysis.december') + ], + boundaryGap: false, + axisTick: { + show: false + } + }, + grid: { + left: 20, + right: 20, + bottom: 20, + top: 80, + containLabel: true + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross' + }, + padding: [5, 10] + }, + yAxis: { + axisTick: { + show: false + } + }, + legend: { + data: [t('analysis.estimate'), t('analysis.actual')], + top: 50 + }, + series: [ + { + name: t('analysis.estimate'), + smooth: true, + type: 'line', + data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123], + animationDuration: 2800, + animationEasing: 'cubicInOut' + }, + { + name: t('analysis.actual'), + smooth: true, + type: 'line', + itemStyle: {}, + data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123], + animationDuration: 2800, + animationEasing: 'quadraticOut' + } + ] +} + +export const pieOptions: EChartsOption = { + title: { + text: t('analysis.userAccessSource'), + left: 'center' + }, + tooltip: { + trigger: 'item', + formatter: '{a} {b} : {c} ({d}%)' + }, + legend: { + orient: 'vertical', + left: 'left', + data: [ + t('analysis.directAccess'), + t('analysis.mailMarketing'), + t('analysis.allianceAdvertising'), + t('analysis.videoAdvertising'), + t('analysis.searchEngines') + ] + }, + series: [ + { + name: t('analysis.userAccessSource'), + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: [ + { value: 335, name: t('analysis.directAccess') }, + { value: 310, name: t('analysis.mailMarketing') }, + { value: 234, name: t('analysis.allianceAdvertising') }, + { value: 135, name: t('analysis.videoAdvertising') }, + { value: 1548, name: t('analysis.searchEngines') } + ] + } + ] +} + +export const barOptions: EChartsOption = { + title: { + text: t('analysis.weeklyUserActivity'), + left: 'center' + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + grid: { + left: 50, + right: 20, + bottom: 20 + }, + xAxis: { + type: 'category', + data: [ + t('analysis.monday'), + t('analysis.tuesday'), + t('analysis.wednesday'), + t('analysis.thursday'), + t('analysis.friday'), + t('analysis.saturday'), + t('analysis.sunday') + ], + axisTick: { + alignWithLabel: true + } + }, + yAxis: { + type: 'value' + }, + series: [ + { + name: t('analysis.activeQuantity'), + data: [13253, 34235, 26321, 12340, 24643, 1322, 1324], + type: 'bar' + } + ] +} + +export const radarOption: EChartsOption = { + legend: { + data: [t('workplace.personal'), t('workplace.team')] + }, + radar: { + // shape: 'circle', + indicator: [ + { name: t('workplace.quote'), max: 65 }, + { name: t('workplace.contribution'), max: 160 }, + { name: t('workplace.hot'), max: 300 }, + { name: t('workplace.yield'), max: 130 }, + { name: t('workplace.follow'), max: 100 } + ] + }, + series: [ + { + name: `xxx${t('workplace.index')}`, + type: 'radar', + data: [ + { + value: [42, 30, 20, 35, 80], + name: t('workplace.personal') + }, + { + value: [50, 140, 290, 100, 90], + name: t('workplace.team') + } + ] + } + ] +} + +export const wordOptions = { + series: [ + { + type: 'wordCloud', + gridSize: 2, + sizeRange: [12, 50], + rotationRange: [-90, 90], + shape: 'pentagon', + width: 600, + height: 400, + drawOutOfBound: true, + textStyle: { + color: function () { + return ( + 'rgb(' + + [ + Math.round(Math.random() * 160), + Math.round(Math.random() * 160), + Math.round(Math.random() * 160) + ].join(',') + + ')' + ) + } + }, + emphasis: { + textStyle: { + shadowBlur: 10, + shadowColor: '#333' + } + }, + data: [ + { + name: 'Sam S Club', + value: 10000, + textStyle: { + color: 'black' + }, + emphasis: { + textStyle: { + color: 'red' + } + } + }, + { + name: 'Macys', + value: 6181 + }, + { + name: 'Amy Schumer', + value: 4386 + }, + { + name: 'Jurassic World', + value: 4055 + }, + { + name: 'Charter Communications', + value: 2467 + }, + { + name: 'Chick Fil A', + value: 2244 + }, + { + name: 'Planet Fitness', + value: 1898 + }, + { + name: 'Pitch Perfect', + value: 1484 + }, + { + name: 'Express', + value: 1112 + }, + { + name: 'Home', + value: 965 + }, + { + name: 'Johnny Depp', + value: 847 + }, + { + name: 'Lena Dunham', + value: 582 + }, + { + name: 'Lewis Hamilton', + value: 555 + }, + { + name: 'KXAN', + value: 550 + }, + { + name: 'Mary Ellen Mark', + value: 462 + }, + { + name: 'Farrah Abraham', + value: 366 + }, + { + name: 'Rita Ora', + value: 360 + }, + { + name: 'Serena Williams', + value: 282 + }, + { + name: 'NCAA baseball tournament', + value: 273 + }, + { + name: 'Point Break', + value: 265 + } + ] + } + ] +} diff --git a/src/views/home/index.vue b/src/views/home/index.vue new file mode 100644 index 0000000..114e8d5 --- /dev/null +++ b/src/views/home/index.vue @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/src/views/home/types.ts b/src/views/home/types.ts new file mode 100644 index 0000000..e6313d3 --- /dev/null +++ b/src/views/home/types.ts @@ -0,0 +1,55 @@ +export type WorkplaceTotal = { + project: number + access: number + todo: number +} + +export type Project = { + name: string + icon: string + message: string + personal: string + time: Date | number | string +} + +export type Notice = { + title: string + type: string + keys: string[] + date: Date | number | string +} + +export type Shortcut = { + name: string + icon: string + url: string +} + +export type RadarData = { + personal: number + team: number + max: number + name: string +} +export type AnalysisTotalTypes = { + users: number + messages: number + moneys: number + shoppings: number +} + +export type UserAccessSource = { + value: number + name: string +} + +export type WeeklyUserActivity = { + value: number + name: string +} + +export type MonthlySales = { + name: string + estimate: number + actual: number +} diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue new file mode 100644 index 0000000..0d1745a --- /dev/null +++ b/src/views/login/components/LoginForm.vue @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('login.remember') }} + + + + {{ t('login.forgetPassword') }} + + + + + + + + + + + + + + + + + diff --git a/src/views/login/components/LoginFormTitle.vue b/src/views/login/components/LoginFormTitle.vue new file mode 100644 index 0000000..cdf4fac --- /dev/null +++ b/src/views/login/components/LoginFormTitle.vue @@ -0,0 +1,26 @@ + + + {{ getFormTitle }} + + + diff --git a/src/views/login/components/MobileForm.vue b/src/views/login/components/MobileForm.vue new file mode 100644 index 0000000..ebb36b8 --- /dev/null +++ b/src/views/login/components/MobileForm.vue @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ t('login.getSmsCode') }} + + + {{ mobileCodeTimer }}秒后可重新获取 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/login/components/QrCodeForm.vue b/src/views/login/components/QrCodeForm.vue new file mode 100644 index 0000000..31d2845 --- /dev/null +++ b/src/views/login/components/QrCodeForm.vue @@ -0,0 +1,30 @@ + + + + + + + + + + + {{ t('login.qrcode') }} + + + + + + + + diff --git a/src/views/login/components/RegisterForm.vue b/src/views/login/components/RegisterForm.vue new file mode 100644 index 0000000..23b3bd4 --- /dev/null +++ b/src/views/login/components/RegisterForm.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/login/components/SSOLogin.vue b/src/views/login/components/SSOLogin.vue new file mode 100644 index 0000000..f31ab0e --- /dev/null +++ b/src/views/login/components/SSOLogin.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + 此第三方应用请求获得以下权限: + + + + {{ formatScope(scope) }} + + + + + + + 同意授权 + 授 权 中... + + 拒绝 + + + + + + diff --git a/src/views/login/components/index.ts b/src/views/login/components/index.ts new file mode 100644 index 0000000..204ad73 --- /dev/null +++ b/src/views/login/components/index.ts @@ -0,0 +1,8 @@ +import LoginForm from './LoginForm.vue' +import MobileForm from './MobileForm.vue' +import LoginFormTitle from './LoginFormTitle.vue' +import RegisterForm from './RegisterForm.vue' +import QrCodeForm from './QrCodeForm.vue' +import SSOLoginVue from './SSOLogin.vue' + +export { LoginForm, MobileForm, LoginFormTitle, RegisterForm, QrCodeForm, SSOLoginVue } diff --git a/src/views/login/components/useLogin.ts b/src/views/login/components/useLogin.ts new file mode 100644 index 0000000..b4a02f8 --- /dev/null +++ b/src/views/login/components/useLogin.ts @@ -0,0 +1,42 @@ +import { Ref } from 'vue' + +export enum LoginStateEnum { + LOGIN, + REGISTER, + RESET_PASSWORD, + MOBILE, + QR_CODE, + SSO +} + +const currentState = ref(LoginStateEnum.LOGIN) + +export function useLoginState() { + function setLoginState(state: LoginStateEnum) { + currentState.value = state + } + const getLoginState = computed(() => currentState.value) + + function handleBackLogin() { + setLoginState(LoginStateEnum.LOGIN) + } + + return { + setLoginState, + getLoginState, + handleBackLogin + } +} + +export function useFormValid(formRef: Ref) { + async function validForm() { + const form = unref(formRef) + if (!form) return + const data = await form.validate() + return data as T + } + + return { + validForm + } +} diff --git a/src/views/login/login.vue b/src/views/login/login.vue new file mode 100644 index 0000000..d572905 --- /dev/null +++ b/src/views/login/login.vue @@ -0,0 +1,104 @@ + + + + + + + + {{ underlineToHump(appStore.getTitle) }} + + + + + + {{ t('login.welcome') }} + + {{ t('login.message') }} + + + + + + + + + + {{ underlineToHump(appStore.getTitle) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/profile/components/BasicInfo.vue b/src/views/profile/components/BasicInfo.vue new file mode 100644 index 0000000..e2189b1 --- /dev/null +++ b/src/views/profile/components/BasicInfo.vue @@ -0,0 +1,92 @@ + + + + + {{ t('profile.user.man') }} + {{ t('profile.user.woman') }} + + + + + + + + + diff --git a/src/views/profile/components/ProfileUser.vue b/src/views/profile/components/ProfileUser.vue new file mode 100644 index 0000000..b493499 --- /dev/null +++ b/src/views/profile/components/ProfileUser.vue @@ -0,0 +1,99 @@ + + + + + + + + + {{ t('profile.user.username') }} + {{ userInfo?.username }} + + + + {{ t('profile.user.mobile') }} + {{ userInfo?.mobile }} + + + + {{ t('profile.user.email') }} + {{ userInfo?.email }} + + + + {{ t('profile.user.dept') }} + {{ userInfo?.dept.name }} + + + + {{ t('profile.user.posts') }} + + {{ userInfo?.posts.map((post) => post.name).join(',') }} + + + + + {{ t('profile.user.roles') }} + + {{ userInfo?.roles.map((role) => role.name).join(',') }} + + + + + {{ t('profile.user.createTime') }} + {{ formatDate(userInfo?.createTime) }} + + + + + + + diff --git a/src/views/profile/components/ResetPwd.vue b/src/views/profile/components/ResetPwd.vue new file mode 100644 index 0000000..477be91 --- /dev/null +++ b/src/views/profile/components/ResetPwd.vue @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/views/profile/components/UserAvatar.vue b/src/views/profile/components/UserAvatar.vue new file mode 100644 index 0000000..c20168f --- /dev/null +++ b/src/views/profile/components/UserAvatar.vue @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/src/views/profile/components/UserSocial.vue b/src/views/profile/components/UserSocial.vue new file mode 100644 index 0000000..2f021ab --- /dev/null +++ b/src/views/profile/components/UserSocial.vue @@ -0,0 +1,94 @@ + + + + + + + {{ row.title }} + + + + + + 已绑定 + + + + 未绑定 + + + + + + + diff --git a/src/views/profile/components/index.ts b/src/views/profile/components/index.ts new file mode 100644 index 0000000..9e1883c --- /dev/null +++ b/src/views/profile/components/index.ts @@ -0,0 +1,7 @@ +import BasicInfo from './BasicInfo.vue' +import ProfileUser from './ProfileUser.vue' +import ResetPwd from './ResetPwd.vue' +import UserAvatarVue from './UserAvatar.vue' +import UserSocial from './UserSocial.vue' + +export { BasicInfo, ProfileUser, ResetPwd, UserAvatarVue, UserSocial } diff --git a/src/views/profile/index.vue b/src/views/profile/index.vue new file mode 100644 index 0000000..e813f04 --- /dev/null +++ b/src/views/profile/index.vue @@ -0,0 +1,64 @@ + + + + + + {{ t('profile.user.title') }} + + + + + + + + {{ t('profile.info.title') }} + + + + + + + + + + + + + + + + + + diff --git a/src/views/redirect/redirect.vue b/src/views/redirect/redirect.vue new file mode 100644 index 0000000..f7717ce --- /dev/null +++ b/src/views/redirect/redirect.vue @@ -0,0 +1,28 @@ + + + + From d447c716f9bdec5e1c7f285d97ac05f4b47a3d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 5 Feb 2024 16:33:40 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/codegen/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/infra/codegen/index.vue b/src/views/infra/codegen/index.vue index 4f99ce8..3018fb0 100644 --- a/src/views/infra/codegen/index.vue +++ b/src/views/infra/codegen/index.vue @@ -156,7 +156,7 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as CodegenApi from '@/api/infra/codegen' import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig' -import ImportTable from './ImportTable.vue' +import ImportTable from './importTable.vue' import PreviewCode from './PreviewCode.vue' defineOptions({ name: 'InfraCodegen' }) From 45c052305fd6262cc27f83adae29fd6d92673ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 5 Feb 2024 16:38:25 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pszc/cdannealing/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/pszc/cdannealing/index.vue b/src/views/pszc/cdannealing/index.vue index 4f21baf..c0099fc 100644 --- a/src/views/pszc/cdannealing/index.vue +++ b/src/views/pszc/cdannealing/index.vue @@ -56,7 +56,7 @@ From 6a028e8ba1d2025b9fdb4e93d34f2135c6de7cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 5 Feb 2024 16:44:23 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/codegen/editTable.vue | 83 +++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/views/infra/codegen/editTable.vue diff --git a/src/views/infra/codegen/editTable.vue b/src/views/infra/codegen/editTable.vue new file mode 100644 index 0000000..9c4e765 --- /dev/null +++ b/src/views/infra/codegen/editTable.vue @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + 保存 + 返回 + + + + + From fc31909d45cf20bddeb4e33d757c4ac9c6b90c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 5 Feb 2024 16:51:30 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pszc/cdelectricdata/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/pszc/cdelectricdata/index.vue b/src/views/pszc/cdelectricdata/index.vue index d709e49..c1fc6bd 100644 --- a/src/views/pszc/cdelectricdata/index.vue +++ b/src/views/pszc/cdelectricdata/index.vue @@ -56,7 +56,7 @@
{{ row.title }}