Conflicts:
	build/vite/optimize.ts
This commit is contained in:
YunaiV 2023-05-15 22:58:36 +08:00
commit 16561b1238
20 changed files with 138 additions and 122 deletions

View File

@ -11,6 +11,7 @@
* nodejs > 16.0.0 && pnpm > 7.30.0 * nodejs > 16.0.0 && pnpm > 7.30.0
* 演示地址【Vue3 + element-plus】<http://dashboard-vue3.yudao.iocoder.cn> * 演示地址【Vue3 + element-plus】<http://dashboard-vue3.yudao.iocoder.cn>
* 演示地址【Vue3 + vben(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
* 演示地址【Vue2 + element-ui】<http://dashboard.yudao.iocoder.cn> * 演示地址【Vue2 + element-ui】<http://dashboard.yudao.iocoder.cn>
* 启动文档:<https://doc.iocoder.cn/quick-start/> * 启动文档:<https://doc.iocoder.cn/quick-start/>
* 视频教程:<https://doc.iocoder.cn/video/> * 视频教程:<https://doc.iocoder.cn/video/>
@ -19,8 +20,8 @@
**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。 **芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
* 采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) * 采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) 实现
* 改换saas自动引入等功能 [vue-element-plus-admin](https://gitee.com/yudaocode/vue-element-plus-admin) * 改换 saas自动引入等功能
* 使用 Element Plus 免费开源的中后台模版,具备如下特性: * 使用 Element Plus 免费开源的中后台模版,具备如下特性:
![首页](preview/home.png) ![首页](preview/home.png)
@ -38,11 +39,11 @@
| 框架 | 说明 | 版本 | | 框架 | 说明 | 版本 |
|----------------------------------------------------------------------|------------------|--------| |----------------------------------------------------------------------|------------------|--------|
| [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.2.47 | | [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.2.47 |
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.1.4 | | [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.3.1 |
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.34 | | [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.3.3 |
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 4.9.5 | | [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 5.0.4 |
| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.33 | | [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.35 |
| [vueuse](https://vueuse.org/) | 常用工具集 | 9.13.0 | | [vueuse](https://vueuse.org/) | 常用工具集 | 10.1.0 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 | | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 |
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.1.6 | | [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.1.6 |
| [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 | | [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 |

View File

@ -17,7 +17,6 @@ const include = [
'cropperjs', 'cropperjs',
'lodash-es', 'lodash-es',
'nprogress', 'nprogress',
'animate.css',
'web-storage-cache', 'web-storage-cache',
'@iconify/iconify', '@iconify/iconify',
'@vueuse/core', '@vueuse/core',
@ -33,38 +32,58 @@ const include = [
'element-plus/es', 'element-plus/es',
'element-plus/es/locale/lang/zh-cn', 'element-plus/es/locale/lang/zh-cn',
'element-plus/es/locale/lang/en', 'element-plus/es/locale/lang/en',
'element-plus/es/components/backtop/style/index', 'element-plus/es/components/backtop/style/css',
'element-plus/es/components/form/style/index', 'element-plus/es/components/form/style/css',
'element-plus/es/components/radio-group/style/index', 'element-plus/es/components/radio-group/style/css',
'element-plus/es/components/radio/style/index', 'element-plus/es/components/radio/style/css',
'element-plus/es/components/checkbox/style/index', 'element-plus/es/components/checkbox/style/css',
'element-plus/es/components/checkbox-group/style/index', 'element-plus/es/components/checkbox-group/style/css',
'element-plus/es/components/switch/style/index', 'element-plus/es/components/switch/style/css',
'element-plus/es/components/time-picker/style/index', 'element-plus/es/components/time-picker/style/css',
'element-plus/es/components/date-picker/style/index', 'element-plus/es/components/date-picker/style/css',
'element-plus/es/components/col/style/index', 'element-plus/es/components/descriptions/style/css',
'element-plus/es/components/form-item/style/index', 'element-plus/es/components/descriptions-item/style/css',
'element-plus/es/components/alert/style/index', 'element-plus/es/components/link/style/css',
'element-plus/es/components/breadcrumb/style/index', 'element-plus/es/components/tooltip/style/css',
'element-plus/es/components/select/style/index', 'element-plus/es/components/drawer/style/css',
'element-plus/es/components/input/style/index', 'element-plus/es/components/dialog/style/css',
'element-plus/es/components/breadcrumb-item/style/index', 'element-plus/es/components/checkbox-button/style/css',
'element-plus/es/components/tag/style/index', 'element-plus/es/components/option-group/style/css',
'element-plus/es/components/pagination/style/index', 'element-plus/es/components/radio-button/style/css',
'element-plus/es/components/table/style/index', 'element-plus/es/components/cascader/style/css',
'element-plus/es/components/table-column/style/index', 'element-plus/es/components/color-picker/style/css',
'element-plus/es/components/card/style/index', 'element-plus/es/components/input-number/style/css',
'element-plus/es/components/row/style/index', 'element-plus/es/components/rate/style/css',
'element-plus/es/components/button/style/index', 'element-plus/es/components/select-v2/style/css',
'element-plus/es/components/menu/style/index', 'element-plus/es/components/tree-select/style/css',
'element-plus/es/components/sub-menu/style/index', 'element-plus/es/components/slider/style/css',
'element-plus/es/components/menu-item/style/index', 'element-plus/es/components/time-select/style/css',
'element-plus/es/components/option/style/index', 'element-plus/es/components/autocomplete/style/css',
'element-plus/es/components/dropdown/style/index', 'element-plus/es/components/image-viewer/style/css',
'element-plus/es/components/dropdown-menu/style/index', 'element-plus/es/components/upload/style/css',
'element-plus/es/components/dropdown-item/style/index', 'element-plus/es/components/col/style/css',
'element-plus/es/components/skeleton/style/index', 'element-plus/es/components/form-item/style/css',
'element-plus/es/components/alert/style/css',
'element-plus/es/components/breadcrumb/style/css',
'element-plus/es/components/select/style/css',
'element-plus/es/components/input/style/css',
'element-plus/es/components/breadcrumb-item/style/css',
'element-plus/es/components/tag/style/css',
'element-plus/es/components/pagination/style/css',
'element-plus/es/components/table/style/css',
'element-plus/es/components/table-v2/style/css',
'element-plus/es/components/table-column/style/css',
'element-plus/es/components/card/style/css',
'element-plus/es/components/row/style/css',
'element-plus/es/components/button/style/css',
'element-plus/es/components/menu/style/css',
'element-plus/es/components/sub-menu/style/css',
'element-plus/es/components/menu-item/style/css',
'element-plus/es/components/option/style/css',
'element-plus/es/components/dropdown/style/css',
'element-plus/es/components/dropdown-menu/style/css',
'element-plus/es/components/dropdown-item/style/css',
'element-plus/es/components/skeleton/style/css',
'element-plus/es/components/skeleton/style/css', 'element-plus/es/components/skeleton/style/css',
'element-plus/es/components/backtop/style/css', 'element-plus/es/components/backtop/style/css',
'element-plus/es/components/menu/style/css', 'element-plus/es/components/menu/style/css',
@ -78,20 +97,12 @@ const include = [
'element-plus/es/components/breadcrumb/style/css', 'element-plus/es/components/breadcrumb/style/css',
'element-plus/es/components/breadcrumb-item/style/css', 'element-plus/es/components/breadcrumb-item/style/css',
'element-plus/es/components/image/style/css', 'element-plus/es/components/image/style/css',
'element-plus/es/components/tag/style/css', 'element-plus/es/components/collapse-transition/style/css',
'element-plus/es/components/dialog/style/css', 'element-plus/es/components/timeline/style/css',
'element-plus/es/components/form/style/css', 'element-plus/es/components/timeline-item/style/css',
'element-plus/es/components/form-item/style/css', 'element-plus/es/components/collapse/style/css',
'element-plus/es/components/card/style/css', 'element-plus/es/components/collapse-item/style/css',
'element-plus/es/components/tooltip/style/css', 'element-plus/es/components/button-group/style/css'
'element-plus/es/components/radio-group/style/css',
'element-plus/es/components/radio/style/css',
'element-plus/es/components/input-number/style/css',
'element-plus/es/components/tree-select/style/css',
'element-plus/es/components/drawer/style/css',
'element-plus/es/components/image-viewer/style/css',
'element-plus/es/components/upload/style/css',
'element-plus/es/components/switch/style/css'
] ]
const exclude = ['@iconify/json'] const exclude = ['@iconify/json']

View File

@ -33,12 +33,12 @@
"@form-create/element-ui": "^3.1.17", "@form-create/element-ui": "^3.1.17",
"@iconify/iconify": "^3.1.0", "@iconify/iconify": "^3.1.0",
"@videojs-player/vue": "^1.0.0", "@videojs-player/vue": "^1.0.0",
"@vueuse/core": "^9.13.0", "@vueuse/core": "^10.1.0",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.10", "@wangeditor/editor-for-vue": "^5.1.10",
"@zxcvbn-ts/core": "^2.2.1", "@zxcvbn-ts/core": "^2.2.1",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"axios": "^1.3.5", "axios": "^1.3.6",
"benz-amr-recorder": "^1.1.5", "benz-amr-recorder": "^1.1.5",
"bpmn-js-token-simulation": "^0.10.0", "bpmn-js-token-simulation": "^0.10.0",
"camunda-bpmn-moddle": "^7.0.1", "camunda-bpmn-moddle": "^7.0.1",
@ -46,19 +46,19 @@
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"diagram-js": "^11.6.0", "diagram-js": "^11.6.0",
"echarts": "^5.4.1", "echarts": "^5.4.2",
"echarts-wordcloud": "^2.1.0", "echarts-wordcloud": "^2.1.0",
"element-plus": "2.3.3", "element-plus": "2.3.3",
"fast-xml-parser": "^4.1.3", "fast-xml-parser": "^4.2.2",
"highlight.js": "^11.7.0", "highlight.js": "^11.7.0",
"intro.js": "^7.0.1", "intro.js": "^7.0.1",
"jsencrypt": "^3.3.2", "jsencrypt": "^3.3.2",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"min-dash": "^4.0.0", "min-dash": "^4.1.0",
"mitt": "^3.0.0", "mitt": "^3.0.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "^2.0.34", "pinia": "^2.0.35",
"qrcode": "^1.5.1", "qrcode": "^1.5.3",
"qs": "^6.11.1", "qs": "^6.11.1",
"steady-xml": "^0.1.0", "steady-xml": "^0.1.0",
"url": "^0.11.0", "url": "^0.11.0",
@ -73,61 +73,60 @@
"xml-js": "^1.6.11" "xml-js": "^1.6.11"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^17.5.0", "@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.4.4", "@commitlint/config-conventional": "^17.6.1",
"@iconify/json": "^2.2.38", "@iconify/json": "^2.2.54",
"@intlify/unplugin-vue-i18n": "^0.10.0", "@intlify/unplugin-vue-i18n": "^0.10.0",
"@purge-icons/generated": "^0.9.0", "@purge-icons/generated": "^0.9.0",
"@types/intro.js": "^5.1.1", "@types/intro.js": "^5.1.1",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.7",
"@types/node": "^18.15.5", "@types/node": "^18.16.0",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0", "@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.56.0", "@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.56.0", "@typescript-eslint/parser": "^5.59.0",
"@vitejs/plugin-legacy": "^4.0.2", "@vitejs/plugin-legacy": "^4.0.2",
"@vitejs/plugin-vue": "^4.1.0", "@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue-jsx": "^3.0.1", "@vitejs/plugin-vue-jsx": "^3.0.1",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"bpmn-js": "^8.9.0", "bpmn-js": "^8.9.0",
"bpmn-js-properties-panel": "^0.46.0", "bpmn-js-properties-panel": "^0.46.0",
"consola": "^2.15.3", "consola": "^3.1.0",
"eslint": "^8.36.0", "eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
"eslint-define-config": "^1.17.0", "eslint-define-config": "^1.18.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.9.0", "eslint-plugin-vue": "^9.11.0",
"lint-staged": "^13.2.0", "lint-staged": "^13.2.1",
"postcss": "^8.4.21", "postcss": "^8.4.23",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-scss": "^4.0.6", "postcss-scss": "^4.0.6",
"prettier": "^2.8.6", "prettier": "^2.8.8",
"rimraf": "^4.4.1", "rimraf": "^5.0.0",
"rollup": "^3.20.0", "rollup": "^3.20.7",
"sass": "^1.59.3", "sass": "^1.62.0",
"stylelint": "^15.3.0", "stylelint": "^15.6.0",
"stylelint-config-html": "^1.1.0", "stylelint-config-html": "^1.1.0",
"stylelint-config-prettier": "^9.0.5", "stylelint-config-recommended": "^12.0.0",
"stylelint-config-recommended": "^11.0.0", "stylelint-config-standard": "^33.0.0",
"stylelint-config-standard": "^31.0.0",
"stylelint-order": "^6.0.3", "stylelint-order": "^6.0.3",
"terser": "^5.16.6", "terser": "^5.17.1",
"typescript": "5.0.2", "typescript": "5.0.4",
"unplugin-auto-import": "^0.15.1", "unplugin-auto-import": "^0.15.3",
"unplugin-element-plus": "^0.7.0", "unplugin-element-plus": "^0.7.1",
"unplugin-vue-components": "^0.24.1", "unplugin-vue-components": "^0.24.1",
"vite": "4.2.1", "vite": "4.3.1",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-ejs": "^1.6.4", "vite-plugin-ejs": "^1.6.4",
"vite-plugin-eslint": "^1.8.1", "vite-plugin-eslint": "^1.8.1",
"vite-plugin-progress": "^0.0.6", "vite-plugin-progress": "^0.0.7",
"vite-plugin-purge-icons": "^0.9.2", "vite-plugin-purge-icons": "^0.9.2",
"vite-plugin-svg-icons": "^2.0.1", "vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-top-level-await": "^1.3.0", "vite-plugin-top-level-await": "^1.3.0",
"vite-plugin-vue-setup-extend-plus": "^0.1.0", "vite-plugin-vue-setup-extend-plus": "^0.1.0",
"vite-plugin-windicss": "^1.8.10", "vite-plugin-windicss": "^1.8.10",
"vue-tsc": "^1.2.0", "vue-tsc": "^1.4.4",
"windicss": "^3.5.6" "windicss": "^3.5.6"
}, },
"engines": { "engines": {

View File

@ -39,7 +39,7 @@ export const updateNotifyTemplate = async (data: NotifyTemplateVO) => {
} }
// 删除站内信模板 // 删除站内信模板
export const deleteNotifyTemplateApi = async (id: number) => { export const deleteNotifyTemplate = async (id: number) => {
return await request.delete({ url: '/system/notify-template/delete?id=' + id }) return await request.delete({ url: '/system/notify-template/delete?id=' + id })
} }

View File

@ -17,6 +17,6 @@ export const getAccessTokenPage = (params: PageParam) => {
} }
// 删除 token // 删除 token
export const deleteAccessToken = (accessToken: number) => { export const deleteAccessToken = (accessToken: string) => {
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
} }

View File

@ -87,7 +87,7 @@
<MyProcessViewer <MyProcessViewer
key="designer" key="designer"
v-model="bpmnXML" v-model="bpmnXML"
:value="bpmnXML" :value="bpmnXML as any"
v-bind="bpmnControlForm" v-bind="bpmnControlForm"
:prefix="bpmnControlForm.prefix" :prefix="bpmnControlForm.prefix"
/> />

View File

@ -68,7 +68,7 @@ const formRules = reactive({
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }] status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const userList = ref([]) // const userList = ref<any[]>([]) //
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, id?: number) => { const open = async (type: string, id?: number) => {

View File

@ -117,6 +117,7 @@ import { dateFormatter } from '@/utils/formatTime'
import * as UserGroupApi from '@/api/bpm/userGroup' import * as UserGroupApi from '@/api/bpm/userGroup'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import UserGroupForm from './UserGroupForm.vue' import UserGroupForm from './UserGroupForm.vue'
import { UserVO } from '@/api/system/user'
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -131,7 +132,7 @@ const queryParams = reactive({
createTime: [] createTime: []
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const userList = ref([]) // const userList = ref<UserVO[]>([]) //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {

View File

@ -16,7 +16,7 @@
<!-- 流程属性器负责编辑每个流程节点的属性 --> <!-- 流程属性器负责编辑每个流程节点的属性 -->
<MyProcessPenal <MyProcessPenal
key="penal" key="penal"
:bpmnModeler="modeler" :bpmnModeler="modeler as any"
:prefix="controlForm.prefix" :prefix="controlForm.prefix"
class="process-panel" class="process-panel"
:model="model" :model="model"

View File

@ -219,7 +219,7 @@
<MyProcessViewer <MyProcessViewer
key="designer" key="designer"
v-model="bpmnXML" v-model="bpmnXML"
:value="bpmnXML" :value="bpmnXML as any"
v-bind="bpmnControlForm" v-bind="bpmnControlForm"
:prefix="bpmnControlForm.prefix" :prefix="bpmnControlForm.prefix"
/> />

View File

@ -28,7 +28,7 @@ const props = defineProps({
id: propTypes.number.def(undefined) id: propTypes.number.def(undefined)
}) })
const detailLoading = ref(false) // const detailLoading = ref(false) //
const detailData = ref({}) // const detailData = ref<any>({}) //
const queryId = query.id as unknown as number // URL id const queryId = query.id as unknown as number // URL id
/** 获得数据 */ /** 获得数据 */

View File

@ -43,7 +43,7 @@
</el-col> </el-col>
</el-card> </el-card>
<!-- 流程图预览 --> <!-- 流程图预览 -->
<ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML" /> <ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML as any" />
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts" name="BpmProcessInstanceCreate"> <script setup lang="ts" name="BpmProcessInstanceCreate">

View File

@ -33,6 +33,12 @@
import FcDesigner from '@form-create/designer' import FcDesigner from '@form-create/designer'
import { useClipboard } from '@vueuse/core' import { useClipboard } from '@vueuse/core'
import { isString } from '@/utils/is' import { isString } from '@/utils/is'
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import xml from 'highlight.js/lib/languages/java'
import json from 'highlight.js/lib/languages/json'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -112,10 +118,6 @@ const copy = async (text: string) => {
/** /**
* 代码高亮 * 代码高亮
*/ */
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import xml from 'highlight.js/lib/languages/java'
import json from 'highlight.js/lib/languages/json'
const highlightedCode = (code) => { const highlightedCode = (code) => {
// //
let language = 'json' let language = 'json'

View File

@ -59,6 +59,14 @@ import { useClipboard } from '@vueuse/core'
import { handleTree2 } from '@/utils/tree' import { handleTree2 } from '@/utils/tree'
import * as CodegenApi from '@/api/infra/codegen' import * as CodegenApi from '@/api/infra/codegen'
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import java from 'highlight.js/lib/languages/java'
import xml from 'highlight.js/lib/languages/java'
import javascript from 'highlight.js/lib/languages/javascript'
import sql from 'highlight.js/lib/languages/sql'
import typescript from 'highlight.js/lib/languages/typescript'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -184,13 +192,6 @@ const copy = async (text: string) => {
/** /**
* 代码高亮 * 代码高亮
*/ */
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import java from 'highlight.js/lib/languages/java'
import xml from 'highlight.js/lib/languages/java'
import javascript from 'highlight.js/lib/languages/javascript'
import sql from 'highlight.js/lib/languages/sql'
import typescript from 'highlight.js/lib/languages/typescript'
const highlightedCode = (item) => { const highlightedCode = (item) => {
const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1) const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1)
const result = hljs.highlight(language, item.code || '', true) const result = hljs.highlight(language, item.code || '', true)

View File

@ -122,7 +122,9 @@ const open = async (type: string, id?: number, dictType?: string) => {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
resetForm() resetForm()
if (dictType) {
formData.value.dictType = dictType formData.value.dictType = dictType
}
// //
if (id) { if (id) {
formLoading.value = true formLoading.value = true

View File

@ -17,9 +17,9 @@
<el-select v-model="formData.type" clearable placeholder="请选择公告类型"> <el-select v-model="formData.type" clearable placeholder="请选择公告类型">
<el-option <el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE)" v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_NOTICE_TYPE)"
:key="parseInt(dict.value)" :key="parseInt(dict.value as any)"
:label="dict.label" :label="dict.label"
:value="parseInt(dict.value)" :value="parseInt(dict.value as any)"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -27,9 +27,9 @@
<el-select v-model="formData.status" clearable placeholder="请选择状态"> <el-select v-model="formData.status" clearable placeholder="请选择状态">
<el-option <el-option
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)" v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key="parseInt(dict.value)" :key="parseInt(dict.value as any)"
:label="dict.label" :label="dict.label"
:value="parseInt(dict.value)" :value="parseInt(dict.value as any)"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@ -44,7 +44,6 @@
</Dialog> </Dialog>
</template> </template>
<script lang="ts" name="SystemNotifyTemplateSendForm" setup> <script lang="ts" name="SystemNotifyTemplateSendForm" setup>
import * as SmsTemplateApi from '@/api/system/sms/smsTemplate'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import * as NotifyTemplateApi from '@/api/system/notify/template' import * as NotifyTemplateApi from '@/api/system/notify/template'
const message = useMessage() // const message = useMessage() //
@ -102,8 +101,8 @@ const submitForm = async () => {
// //
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as SmsTemplateApi.SendSmsReqVO const data = formData.value as unknown as NotifyTemplateApi.NotifySendReqVO
const logId = await SmsTemplateApi.sendSms(data) const logId = await NotifyTemplateApi.sendNotify(data)
if (logId) { if (logId) {
message.success('提交发送成功!发送结果,见发送日志编号:' + logId) message.success('提交发送成功!发送结果,见发送日志编号:' + logId)
} }
@ -121,7 +120,7 @@ const resetForm = () => {
mobile: '', mobile: '',
templateCode: '', templateCode: '',
templateParams: new Map() templateParams: new Map()
} } as any
formRef.value?.resetFields() formRef.value?.resetFields()
} }
</script> </script>

View File

@ -80,7 +80,7 @@
<el-button <el-button
link link
type="danger" type="danger"
@click="handleForceLogout(scope.row.id)" @click="handleForceLogout(scope.row.accessToken)"
v-hasPermi="['system:oauth2-token:delete']" v-hasPermi="['system:oauth2-token:delete']"
> >
强退 强退
@ -142,12 +142,12 @@ const resetQuery = () => {
} }
/** 强制退出操作 */ /** 强制退出操作 */
const handleForceLogout = async (id: number) => { const handleForceLogout = async (accessToken: string) => {
try { try {
// //
await message.confirm('是否要强制退出用户') await message.confirm('是否要强制退出用户')
// //
await OAuth2AccessTokenApi.deleteAccessToken(id) await OAuth2AccessTokenApi.deleteAccessToken(accessToken)
message.success(t('common.success')) message.success(t('common.success'))
// //
await getList() await getList()

View File

@ -117,7 +117,7 @@ const resetForm = () => {
sort: undefined, sort: undefined,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: '' remark: ''
} } as any
formRef.value?.resetFields() formRef.value?.resetFields()
} }
</script> </script>

View File

@ -2,7 +2,7 @@ module.exports = {
root: true, root: true,
plugins: ['stylelint-order'], plugins: ['stylelint-order'],
customSyntax: 'postcss-html', customSyntax: 'postcss-html',
extends: ['stylelint-config-standard', 'stylelint-config-prettier'], extends: ['stylelint-config-standard'],
rules: { rules: {
'selector-pseudo-class-no-unknown': [ 'selector-pseudo-class-no-unknown': [
true, true,