From b967c4e01ed646e3a9b82db5ad646e7113311904 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Mon, 3 Apr 2023 16:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- build/vite/index.ts | 11 +- index.html | 4 +- package.json | 63 +++---- src/api/mp/account/index.ts | 7 +- src/api/mp/message/index.ts | 2 +- src/api/mp/tag/index.ts | 21 ++- .../ContentWrap/src/ContentWrap.vue | 2 +- src/components/Crontab/src/Crontab.vue | 5 +- .../Descriptions/src/Descriptions.vue | 2 +- src/components/DictTag/src/DictTag.vue | 2 +- src/components/Editor/src/Editor.vue | 2 +- src/components/Form/src/Form.vue | 8 +- src/components/Pagination/index.vue | 2 +- src/components/Search/src/Search.vue | 12 +- src/components/Table/src/Table.vue | 6 +- src/hooks/web/useCrudSchemas.ts | 10 ++ src/hooks/web/useTable.ts | 4 +- .../components/Breadcrumb/src/Breadcrumb.vue | 4 +- src/layout/components/Message/src/Message.vue | 4 +- src/locales/en.ts | 3 +- src/locales/zh-CN.ts | 3 +- src/router/modules/remaining.ts | 57 ++++++- src/store/modules/dict.ts | 6 +- src/types/auto-components.d.ts | 3 +- src/types/auto-imports.d.ts | 2 + src/types/descriptions.d.ts | 4 +- src/utils/dict.ts | 23 ++- src/utils/formatTime.ts | 154 ++++++++++++------ src/utils/index.ts | 18 ++ src/utils/tree.ts | 10 +- src/views/Profile/components/ProfileUser.vue | 4 +- src/views/infra/webSocket/index.vue | 4 +- tsconfig.json | 3 +- types/components.d.ts | 3 +- types/global.d.ts | 26 +-- types/router.d.ts | 4 +- vite.config.ts | 2 +- 38 files changed, 344 insertions(+), 158 deletions(-) diff --git a/.gitignore b/.gitignore index 3efc9c52..ac15926b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ dist-ssr pnpm-debug .idea -.history \ No newline at end of file +.history diff --git a/build/vite/index.ts b/build/vite/index.ts index 304ce0d5..dcec1aed 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -15,7 +15,7 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' -export function createVitePlugins(VITE_APP_TITLE: string) { +export function createVitePlugins() { const root = process.cwd() // 路径查找 function pathResolve(dir: string) { @@ -39,11 +39,14 @@ export function createVitePlugins(VITE_APP_TITLE: string) { imports: [ 'vue', 'vue-router', + // 可额外添加需要 autoImport 的组件 { '@/hooks/web/useI18n': ['useI18n'], - '@/hooks/web/useXTable': ['useXTable'], '@/hooks/web/useMessage': ['useMessage'], + '@/hooks/web/useXTable': ['useXTable'], '@/hooks/web/useVxeCrudSchemas': ['useVxeCrudSchemas'], + '@/hooks/web/useTable': ['useTable'], + '@/hooks/web/useCrudSchemas': ['useCrudSchemas'], '@/utils/formRules': ['required'], '@/utils/dict': ['DICT_TYPE'] } @@ -92,8 +95,6 @@ export function createVitePlugins(VITE_APP_TITLE: string) { ext: '.gz', // 生成的压缩包后缀 deleteOriginFile: false //压缩后是否删除源文件 }), - ViteEjsPlugin({ - title: VITE_APP_TITLE - }) + ViteEjsPlugin() ] } diff --git a/index.html b/index.html index cce65bdc..8cfcbefa 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ name="description" content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!" /> - <%= title %> + %VITE_APP_TITLE%
@@ -137,7 +137,7 @@
-
<%= title %>
+
%VITE_APP_TITLE%
diff --git a/package.json b/package.json index d067560f..683d09eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yudao-ui-admin-vue3", - "version": "1.7.1-snapshot.1941", + "version": "1.7.1-snapshot.1961", "description": "基于vue3、vite4、element-plus、typesScript", "author": "xingyu", "private": false, @@ -29,12 +29,14 @@ "@form-create/designer": "^3.1.0", "@form-create/element-ui": "^3.1.17", "@iconify/iconify": "^3.1.0", + "@videojs-player/vue": "^1.0.0", "@vueuse/core": "^9.13.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^2.2.1", "animate.css": "^4.1.1", "axios": "^1.3.4", + "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.5.13", @@ -43,7 +45,7 @@ "diagram-js": "^11.6.0", "echarts": "^5.4.1", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.2.34", + "element-plus": "2.3.1", "fast-xml-parser": "^4.1.3", "highlight.js": "^11.7.0", "intro.js": "^6.0.0", @@ -57,62 +59,63 @@ "qs": "^6.11.1", "steady-xml": "^0.1.0", "url": "^0.11.0", + "video.js": "^8.0.4", "vue": "3.2.47", "vue-i18n": "9.2.2", "vue-router": "^4.1.6", "vue-types": "^5.0.2", "vuedraggable": "^4.1.0", - "vxe-table": "^4.3.10", + "vxe-table": "^4.3.11", "web-storage-cache": "^1.1.1", "xe-utils": "^3.5.7", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.4.4", + "@commitlint/cli": "^17.5.0", "@commitlint/config-conventional": "^17.4.4", - "@iconify/json": "^2.2.31", - "@intlify/unplugin-vue-i18n": "^0.8.2", + "@iconify/json": "^2.2.38", + "@intlify/unplugin-vue-i18n": "^0.10.0", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", - "@types/lodash-es": "^4.17.6", - "@types/node": "^18.14.6", + "@types/lodash-es": "^4.17.7", + "@types/node": "^18.15.5", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.54.1", - "@typescript-eslint/parser": "^5.54.1", - "@vitejs/plugin-legacy": "^4.0.1", - "@vitejs/plugin-vue": "^4.0.0", - "@vitejs/plugin-vue-jsx": "^3.0.0", - "autoprefixer": "^10.4.13", + "@typescript-eslint/eslint-plugin": "^5.56.0", + "@typescript-eslint/parser": "^5.56.0", + "@vitejs/plugin-legacy": "^4.0.2", + "@vitejs/plugin-vue": "^4.1.0", + "@vitejs/plugin-vue-jsx": "^3.0.1", + "autoprefixer": "^10.4.14", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", "consola": "^2.15.3", - "eslint": "^8.35.0", - "eslint-config-prettier": "^8.7.0", - "eslint-define-config": "^1.15.0", + "eslint": "^8.36.0", + "eslint-config-prettier": "^8.8.0", + "eslint-define-config": "^1.17.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.9.0", - "lint-staged": "^13.1.2", + "lint-staged": "^13.2.0", "postcss": "^8.4.21", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", - "prettier": "^2.8.4", - "rimraf": "^4.3.1", - "rollup": "^3.18.0", - "sass": "^1.58.3", - "stylelint": "^15.2.0", + "prettier": "^2.8.6", + "rimraf": "^4.4.1", + "rollup": "^3.20.0", + "sass": "^1.59.3", + "stylelint": "^15.3.0", "stylelint-config-html": "^1.1.0", "stylelint-config-prettier": "^9.0.5", - "stylelint-config-recommended": "^10.0.1", - "stylelint-config-standard": "^30.0.1", - "stylelint-order": "^6.0.2", - "terser": "^5.16.5", - "typescript": "4.9.5", + "stylelint-config-recommended": "^11.0.0", + "stylelint-config-standard": "^31.0.0", + "stylelint-order": "^6.0.3", + "terser": "^5.16.6", + "typescript": "5.0.2", "unplugin-auto-import": "^0.15.1", "unplugin-element-plus": "^0.7.0", "unplugin-vue-components": "^0.24.1", - "vite": "4.1.4", + "vite": "4.2.1", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", @@ -125,7 +128,7 @@ "windicss": "^3.5.6" }, "engines": { - "node": ">=16.0.0" + "node": ">=16.18.0" }, "license": "MIT", "repository": { diff --git a/src/api/mp/account/index.ts b/src/api/mp/account/index.ts index cbdb1422..d641ef3c 100644 --- a/src/api/mp/account/index.ts +++ b/src/api/mp/account/index.ts @@ -1,5 +1,10 @@ import request from '@/config/axios' +export interface AccountVO { + id?: number + name: string +} + // 创建公众号账号 export const createAccount = async (data) => { return await request.post({ url: '/mp/account/create', data }) @@ -26,7 +31,7 @@ export const getAccountPage = async (query) => { } // 获取公众号账号精简信息列表 -export const getSimpleAccounts = async () => { +export const getSimpleAccountList = async () => { return request.get({ url: '/mp/account/list-all-simple' }) } diff --git a/src/api/mp/message/index.ts b/src/api/mp/message/index.ts index 8b7d3cbd..ad9b95dd 100644 --- a/src/api/mp/message/index.ts +++ b/src/api/mp/message/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' // 获得公众号消息分页 -export const getMessagePage = (query) => { +export const getMessagePage = (query: PageParam) => { return request.get({ url: '/mp/message/page', params: query diff --git a/src/api/mp/tag/index.ts b/src/api/mp/tag/index.ts index e681e2e1..50183a51 100644 --- a/src/api/mp/tag/index.ts +++ b/src/api/mp/tag/index.ts @@ -1,7 +1,14 @@ import request from '@/config/axios' +export interface TagVO { + id?: number + name: string + accountId: number + createTime: Date +} + // 创建公众号标签 -export const createTag = (data) => { +export const createTag = (data: TagVO) => { return request.post({ url: '/mp/tag/create', data: data @@ -9,7 +16,7 @@ export const createTag = (data) => { } // 更新公众号标签 -export const updateTag = (data) => { +export const updateTag = (data: TagVO) => { return request.put({ url: '/mp/tag/update', data: data @@ -17,21 +24,21 @@ export const updateTag = (data) => { } // 删除公众号标签 -export const deleteTag = (id) => { +export const deleteTag = (id: number) => { return request.delete({ url: '/mp/tag/delete?id=' + id }) } // 获得公众号标签 -export const getTag = (id) => { +export const getTag = (id: number) => { return request.get({ url: '/mp/tag/get?id=' + id }) } // 获得公众号标签分页 -export const getTagPage = (query) => { +export const getTagPage = (query: PageParam) => { return request.get({ url: '/mp/tag/page', params: query @@ -39,14 +46,14 @@ export const getTagPage = (query) => { } // 获取公众号标签精简信息列表 -export const getSimpleTags = () => { +export const getSimpleTagList = () => { return request.get({ url: '/mp/tag/list-all-simple' }) } // 同步公众号标签 -export const syncTag = (accountId) => { +export const syncTag = (accountId: number) => { return request.post({ url: '/mp/tag/sync?accountId=' + accountId }) diff --git a/src/components/ContentWrap/src/ContentWrap.vue b/src/components/ContentWrap/src/ContentWrap.vue index 51e50410..6890e214 100644 --- a/src/components/ContentWrap/src/ContentWrap.vue +++ b/src/components/ContentWrap/src/ContentWrap.vue @@ -13,7 +13,7 @@ defineProps({