Commit 6691c085858697e66fac47af84fe19b874b21853

Authored by 芋道源码
Committed by Gitee
2 parents 0ae9d179 1179ca1a

!222 vue3

Merge pull request !222 from xingyu/master
Showing 28 changed files with 254 additions and 216 deletions
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/query/LambdaQueryWrapperX.java
@@ -94,6 +94,19 @@ public class LambdaQueryWrapperX<T> extends LambdaQueryWrapper<T> { @@ -94,6 +94,19 @@ public class LambdaQueryWrapperX<T> extends LambdaQueryWrapper<T> {
94 return this; 94 return this;
95 } 95 }
96 96
  97 + public LambdaQueryWrapperX<T> betweenIfPresent(SFunction<T, ?> column, Object[] values) {
  98 + if (values!= null && values.length >0 && values[0] != null && values[1] != null) {
  99 + return (LambdaQueryWrapperX<T>) super.between(column, values[0], values[1]);
  100 + }
  101 + if (values != null && values[0] != null) {
  102 + return (LambdaQueryWrapperX<T>) ge(column, values[0]);
  103 + }
  104 + if (values != null && values[1] != null) {
  105 + return (LambdaQueryWrapperX<T>) le(column, values[2]);
  106 + }
  107 + return this;
  108 + }
  109 +
97 // ========== 重写父类方法,方便链式调用 ========== 110 // ========== 重写父类方法,方便链式调用 ==========
98 111
99 @Override 112 @Override
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java
@@ -37,6 +37,10 @@ public class UserPageReqVO extends PageParam { @@ -37,6 +37,10 @@ public class UserPageReqVO extends PageParam {
37 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 37 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
38 private Date endTime; 38 private Date endTime;
39 39
  40 + @ApiModelProperty(value = "开始时间", example = "2020-10-24")
  41 + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
  42 + private Date[] createTime;
  43 +
40 @ApiModelProperty(value = "部门编号", example = "1024", notes = "同时筛选子部门") 44 @ApiModelProperty(value = "部门编号", example = "1024", notes = "同时筛选子部门")
41 private Long deptId; 45 private Long deptId;
42 46
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java
@@ -33,7 +33,8 @@ public interface AdminUserMapper extends BaseMapperX&lt;AdminUserDO&gt; { @@ -33,7 +33,8 @@ public interface AdminUserMapper extends BaseMapperX&lt;AdminUserDO&gt; {
33 .likeIfPresent(AdminUserDO::getUsername, reqVO.getUsername()) 33 .likeIfPresent(AdminUserDO::getUsername, reqVO.getUsername())
34 .likeIfPresent(AdminUserDO::getMobile, reqVO.getMobile()) 34 .likeIfPresent(AdminUserDO::getMobile, reqVO.getMobile())
35 .eqIfPresent(AdminUserDO::getStatus, reqVO.getStatus()) 35 .eqIfPresent(AdminUserDO::getStatus, reqVO.getStatus())
36 - .betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getBeginTime(), reqVO.getEndTime()) 36 + .betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getBeginTime(),reqVO.getEndTime())
  37 + .betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getCreateTime())
37 .inIfPresent(AdminUserDO::getDeptId, deptIds) 38 .inIfPresent(AdminUserDO::getDeptId, deptIds)
38 .orderByDesc(AdminUserDO::getId)); 39 .orderByDesc(AdminUserDO::getId));
39 40
yudao-ui-admin-vue3/package.json
1 { 1 {
2 "name": "ruoyi-vue-pro-vue3", 2 "name": "ruoyi-vue-pro-vue3",
3 - "version": "1.0.160", 3 + "version": "1.6.2.1601",
4 "description": "基于vue3、element-plus、typesScript、vite3", 4 "description": "基于vue3、element-plus、typesScript、vite3",
5 "author": "xingyu", 5 "author": "xingyu",
6 "private": false, 6 "private": false,
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 "devDependencies": { 56 "devDependencies": {
57 "@commitlint/cli": "^17.0.3", 57 "@commitlint/cli": "^17.0.3",
58 "@commitlint/config-conventional": "^17.0.3", 58 "@commitlint/config-conventional": "^17.0.3",
59 - "@iconify/json": "^2.1.79", 59 + "@iconify/json": "^2.1.80",
60 "@intlify/vite-plugin-vue-i18n": "^5.0.0", 60 "@intlify/vite-plugin-vue-i18n": "^5.0.0",
61 "@purge-icons/generated": "^0.8.1", 61 "@purge-icons/generated": "^0.8.1",
62 "@types/intro.js": "^5.1.0", 62 "@types/intro.js": "^5.1.0",
yudao-ui-admin-vue3/src/api/infra/redis/index.ts
@@ -23,3 +23,21 @@ export const getKeyListApi = (keyTemplate: string) =&gt; { @@ -23,3 +23,21 @@ export const getKeyListApi = (keyTemplate: string) =&gt; {
23 } 23 }
24 }) 24 })
25 } 25 }
  26 +// 获取缓存内容
  27 +export const getKeyValue = (key: string) => {
  28 + return request.get({ url: '/infra/redis/get-key-value?key=' + key })
  29 +}
  30 +
  31 +// 根据键名删除缓存
  32 +export const deleteKey = (key: string) => {
  33 + return request.delete({ url: '/infra/redis/delete-key?key=' + key })
  34 +}
  35 +
  36 +export const deleteKeys = (keyTemplate: string) => {
  37 + return request.delete({
  38 + url: '/infra/redis/delete-keys?',
  39 + params: {
  40 + keyTemplate
  41 + }
  42 + })
  43 +}
yudao-ui-admin-vue3/src/components/Form/src/helper.ts
1 -// import { useI18n } from '@/hooks/web/useI18n' 1 +import { useI18n } from '@/hooks/web/useI18n'
2 import type { Slots } from 'vue' 2 import type { Slots } from 'vue'
3 import { getSlot } from '@/utils/tsxHelper' 3 import { getSlot } from '@/utils/tsxHelper'
4 import { PlaceholderMoel } from './types' 4 import { PlaceholderMoel } from './types'
5 5
6 -// const { t } = useI18n()  
7 -  
8 /** 6 /**
9 * 7 *
10 * @param schema 对应组件数据 8 * @param schema 对应组件数据
@@ -12,12 +10,12 @@ import { PlaceholderMoel } from &#39;./types&#39; @@ -12,12 +10,12 @@ import { PlaceholderMoel } from &#39;./types&#39;
12 * @description 用于自动设置placeholder 10 * @description 用于自动设置placeholder
13 */ 11 */
14 export const setTextPlaceholder = (schema: FormSchema): PlaceholderMoel => { 12 export const setTextPlaceholder = (schema: FormSchema): PlaceholderMoel => {
  13 + const { t } = useI18n()
15 const textMap = ['Input', 'Autocomplete', 'InputNumber', 'InputPassword'] 14 const textMap = ['Input', 'Autocomplete', 'InputNumber', 'InputPassword']
16 const selectMap = ['Select', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect'] 15 const selectMap = ['Select', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect']
17 if (textMap.includes(schema?.component as string)) { 16 if (textMap.includes(schema?.component as string)) {
18 return { 17 return {
19 - // placeholder: t('common.inputText')  
20 - placeholder: '请输入' 18 + placeholder: t('common.inputText')
21 } 19 }
22 } 20 }
23 if (selectMap.includes(schema?.component as string)) { 21 if (selectMap.includes(schema?.component as string)) {
@@ -29,16 +27,13 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderMoel =&gt; { @@ -29,16 +27,13 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderMoel =&gt; {
29 ) 27 )
30 ) { 28 ) {
31 return { 29 return {
32 - // startPlaceholder: t('common.startTimeText'),  
33 - // endPlaceholder: t('common.endTimeText'),  
34 - startPlaceholder: '开始时间',  
35 - endPlaceholder: '结束时间', 30 + startPlaceholder: t('common.startTimeText'),
  31 + endPlaceholder: t('common.endTimeText'),
36 rangeSeparator: '-' 32 rangeSeparator: '-'
37 } 33 }
38 } else { 34 } else {
39 return { 35 return {
40 - // placeholder: t('common.selectText')  
41 - placeholder: '请选择' 36 + placeholder: t('common.selectText')
42 } 37 }
43 } 38 }
44 } 39 }
yudao-ui-admin-vue3/src/components/Logo/src/Logo.vue
@@ -59,7 +59,7 @@ watch( @@ -59,7 +59,7 @@ watch(
59 :class="[ 59 :class="[
60 prefixCls, 60 prefixCls,
61 layout !== 'classic' ? `${prefixCls}__Top` : '', 61 layout !== 'classic' ? `${prefixCls}__Top` : '',
62 - 'flex !h-[var(--logo-height)] items-center cursor-pointer pl-8px relative', 62 + 'flex !h-[var(--logo-height)] items-center cursor-pointer justify-center relative',
63 'dark:bg-[var(--el-bg-color)]' 63 'dark:bg-[var(--el-bg-color)]'
64 ]" 64 ]"
65 to="/" 65 to="/"
yudao-ui-admin-vue3/src/components/UserInfo/src/UserInfo.vue
@@ -43,7 +43,7 @@ const loginOut = () =&gt; { @@ -43,7 +43,7 @@ const loginOut = () =&gt; {
43 .catch(() => {}) 43 .catch(() => {})
44 } 44 }
45 const toProfile = async () => { 45 const toProfile = async () => {
46 - push('/user/profile') 46 + push('/userinfo/profile')
47 } 47 }
48 const toDocument = () => { 48 const toDocument = () => {
49 window.open('https://doc.iocoder.cn/') 49 window.open('https://doc.iocoder.cn/')
yudao-ui-admin-vue3/src/config/axios/index.ts
@@ -5,7 +5,6 @@ import { config } from &#39;@/config/axios/config&#39; @@ -5,7 +5,6 @@ import { config } from &#39;@/config/axios/config&#39;
5 import { getAccessToken, getRefreshToken, getTenantId } from '@/utils/auth' 5 import { getAccessToken, getRefreshToken, getTenantId } from '@/utils/auth'
6 import errorCode from './errorCode' 6 import errorCode from './errorCode'
7 import { useI18n } from '@/hooks/web/useI18n' 7 import { useI18n } from '@/hooks/web/useI18n'
8 -const { t } = useI18n()  
9 8
10 const tenantEnable = import.meta.env.VITE_APP_TENANT_ENABLE 9 const tenantEnable = import.meta.env.VITE_APP_TENANT_ENABLE
11 const BASE_URL = import.meta.env.VITE_BASE_URL 10 const BASE_URL = import.meta.env.VITE_BASE_URL
@@ -46,25 +45,27 @@ service.interceptors.request.use( @@ -46,25 +45,27 @@ service.interceptors.request.use(
46 const tenantId = getTenantId() 45 const tenantId = getTenantId()
47 if (tenantId) (config as Recordable).headers.common['tenant-id'] = tenantId 46 if (tenantId) (config as Recordable).headers.common['tenant-id'] = tenantId
48 } 47 }
  48 + const params = config.params || {}
  49 + const data = config.data || false
49 if ( 50 if (
50 - config.method === 'post' && 51 + config.method?.toUpperCase() === 'POST' &&
51 config!.headers!['Content-Type'] === 'application/x-www-form-urlencoded' 52 config!.headers!['Content-Type'] === 'application/x-www-form-urlencoded'
52 ) { 53 ) {
53 - config.data = qs.stringify(config.data) 54 + config.data = qs.stringify(data)
54 } 55 }
55 // get参数编码 56 // get参数编码
56 - if (config.method === 'get' && config.params) { 57 + if (config.method?.toUpperCase() === 'GET' && config.params) {
57 let url = config.url as string 58 let url = config.url as string
  59 + // 给 get 请求加上时间戳参数,避免从缓存中拿数据
  60 + // const now = new Date().getTime()
  61 + // params = params.substring(0, url.length - 1) + `?_t=${now}`
58 url += '?' 62 url += '?'
59 - const keys = Object.keys(config.params) 63 + const keys = Object.keys(params)
60 for (const key of keys) { 64 for (const key of keys) {
61 - if (config.params[key] !== void 0 && config.params[key] !== null) {  
62 - url += `${key}=${encodeURIComponent(config.params[key])}&` 65 + if (params[key] !== void 0 && params[key] !== null) {
  66 + url += `${key}=${encodeURIComponent(params[key])}&`
63 } 67 }
64 } 68 }
65 - // 给 get 请求加上时间戳参数,避免从缓存中拿数据  
66 - // const now = new Date().getTime()  
67 - // url = url.substring(0, url.length - 1) + `?_t=${now}`  
68 config.params = {} 69 config.params = {}
69 config.url = url 70 config.url = url
70 } 71 }
@@ -85,6 +86,7 @@ service.interceptors.response.use( @@ -85,6 +86,7 @@ service.interceptors.response.use(
85 // 返回“[HTTP]请求没有返回值”; 86 // 返回“[HTTP]请求没有返回值”;
86 throw new Error() 87 throw new Error()
87 } 88 }
  89 + const { t } = useI18n()
88 // 未设置状态码则默认成功状态 90 // 未设置状态码则默认成功状态
89 const code = data.code || result_code 91 const code = data.code || result_code
90 // 获取错误信息 92 // 获取错误信息
@@ -134,6 +136,7 @@ service.interceptors.response.use( @@ -134,6 +136,7 @@ service.interceptors.response.use(
134 (error: AxiosError) => { 136 (error: AxiosError) => {
135 console.log('err' + error) // for debug 137 console.log('err' + error) // for debug
136 let { message } = error 138 let { message } = error
  139 + const { t } = useI18n()
137 if (message === 'Network Error') { 140 if (message === 'Network Error') {
138 message = t('sys.api.errorMessage') 141 message = t('sys.api.errorMessage')
139 } else if (message.includes('timeout')) { 142 } else if (message.includes('timeout')) {
@@ -146,6 +149,7 @@ service.interceptors.response.use( @@ -146,6 +149,7 @@ service.interceptors.response.use(
146 } 149 }
147 ) 150 )
148 function handleAuthorized() { 151 function handleAuthorized() {
  152 + const { t } = useI18n()
149 if (!isRelogin.show) { 153 if (!isRelogin.show) {
150 isRelogin.show = true 154 isRelogin.show = true
151 ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), { 155 ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), {
yudao-ui-admin-vue3/src/hooks/web/useMessage.ts 0 → 100644
  1 +import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
  2 +import { useI18n } from './useI18n'
  3 +export const useMessage = () => {
  4 + const { t } = useI18n()
  5 + return {
  6 + // 消息提示
  7 + info(content: string) {
  8 + ElMessage.info(content)
  9 + },
  10 + // 错误消息
  11 + error(content: string) {
  12 + ElMessage.error(content)
  13 + },
  14 + // 成功消息
  15 + success(content: string) {
  16 + ElMessage.success(content)
  17 + },
  18 + // 警告消息
  19 + warning(content: string) {
  20 + ElMessage.warning(content)
  21 + },
  22 + // 弹出提示
  23 + alert(content: string) {
  24 + ElMessageBox.alert(content, t('common.confirmTitle'))
  25 + },
  26 + // 错误提示
  27 + alertError(content: string) {
  28 + ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'error' })
  29 + },
  30 + // 成功提示
  31 + alertSuccess(content: string) {
  32 + ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'success' })
  33 + },
  34 + // 警告提示
  35 + alertWarning(content: string) {
  36 + ElMessageBox.alert(content, t('common.confirmTitle'), { type: 'warning' })
  37 + },
  38 + // 通知提示
  39 + notify(content: string) {
  40 + ElNotification.info(content)
  41 + },
  42 + // 错误通知
  43 + notifyError(content: string) {
  44 + ElNotification.error(content)
  45 + },
  46 + // 成功通知
  47 + notifySuccess(content: string) {
  48 + ElNotification.success(content)
  49 + },
  50 + // 警告通知
  51 + notifyWarning(content: string) {
  52 + ElNotification.warning(content)
  53 + },
  54 + // 确认窗体
  55 + confirm(content: string, tip: string) {
  56 + return ElMessageBox.confirm(content, tip, {
  57 + confirmButtonText: t('common.ok'),
  58 + cancelButtonText: t('common.cancel'),
  59 + type: 'warning'
  60 + })
  61 + },
  62 + // 提交内容
  63 + prompt(content: string, tip: string) {
  64 + return ElMessageBox.prompt(content, tip, {
  65 + confirmButtonText: t('common.ok'),
  66 + cancelButtonText: t('common.cancel'),
  67 + type: 'warning'
  68 + })
  69 + }
  70 + }
  71 +}
yudao-ui-admin-vue3/src/router/modules/remaining.ts
@@ -41,7 +41,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ @@ -41,7 +41,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
41 ] 41 ]
42 }, 42 },
43 { 43 {
44 - path: '/user', 44 + path: '/userinfo',
45 component: Layout, 45 component: Layout,
46 name: 'UserInfo', 46 name: 'UserInfo',
47 meta: { 47 meta: {
yudao-ui-admin-vue3/src/views/infra/apiErrorLog/index.vue
@@ -8,7 +8,8 @@ import type { ApiErrorLogVO } from &#39;@/api/infra/apiErrorLog/types&#39; @@ -8,7 +8,8 @@ import type { ApiErrorLogVO } from &#39;@/api/infra/apiErrorLog/types&#39;
8 import { allSchemas } from './apiErrorLog.data' 8 import { allSchemas } from './apiErrorLog.data'
9 import * as ApiErrorLogApi from '@/api/infra/apiErrorLog' 9 import * as ApiErrorLogApi from '@/api/infra/apiErrorLog'
10 import { InfraApiErrorLogProcessStatusEnum } from '@/utils/constants' 10 import { InfraApiErrorLogProcessStatusEnum } from '@/utils/constants'
11 -import { ElMessage, ElMessageBox } from 'element-plus' 11 +import { useMessage } from '@/hooks/web/useMessage'
  12 +const message = useMessage()
12 const { t } = useI18n() // 国际化 13 const { t } = useI18n() // 国际化
13 14
14 // ========== 列表相关 ========== 15 // ========== 列表相关 ==========
@@ -36,14 +37,11 @@ const handleDetail = (row: ApiErrorLogVO) =&gt; { @@ -36,14 +37,11 @@ const handleDetail = (row: ApiErrorLogVO) =&gt; {
36 } 37 }
37 // 异常处理操作 38 // 异常处理操作
38 const handleProcessClick = (row: ApiErrorLogVO, processSttatus: number, type: string) => { 39 const handleProcessClick = (row: ApiErrorLogVO, processSttatus: number, type: string) => {
39 - ElMessageBox.confirm('确认标记为' + type + '?', t('common.reminder'), {  
40 - confirmButtonText: t('common.ok'),  
41 - cancelButtonText: t('common.cancel'),  
42 - type: 'warning'  
43 - }) 40 + message
  41 + .confirm('确认标记为' + type + '?', t('common.reminder'))
44 .then(async () => { 42 .then(async () => {
45 ApiErrorLogApi.updateApiErrorLogPageApi(row.id, processSttatus).then(() => { 43 ApiErrorLogApi.updateApiErrorLogPageApi(row.id, processSttatus).then(() => {
46 - ElMessage.success(t('common.updateSuccess')) 44 + message.success(t('common.updateSuccess'))
47 getList() 45 getList()
48 }) 46 })
49 }) 47 })
yudao-ui-admin-vue3/src/views/infra/codegen/index.vue
@@ -10,7 +10,8 @@ import ImportTable from &#39;./components/ImportTable.vue&#39; @@ -10,7 +10,8 @@ import ImportTable from &#39;./components/ImportTable.vue&#39;
10 import Preview from './components/Preview.vue' 10 import Preview from './components/Preview.vue'
11 import download from '@/utils/download' 11 import download from '@/utils/download'
12 import { useRouter } from 'vue-router' 12 import { useRouter } from 'vue-router'
13 -import { ElMessage, ElMessageBox } from 'element-plus' 13 +import { useMessage } from '@/hooks/web/useMessage'
  14 +const message = useMessage()
14 const { t } = useI18n() // 国际化 15 const { t } = useI18n() // 国际化
15 const { push } = useRouter() 16 const { push } = useRouter()
16 // ========== 列表相关 ========== 17 // ========== 列表相关 ==========
@@ -37,14 +38,12 @@ const handleEditTable = (row: CodegenTableVO) =&gt; { @@ -37,14 +38,12 @@ const handleEditTable = (row: CodegenTableVO) =&gt; {
37 const handleSynchDb = (row: CodegenTableVO) => { 38 const handleSynchDb = (row: CodegenTableVO) => {
38 // 基于 DB 同步 39 // 基于 DB 同步
39 const tableName = row.tableName 40 const tableName = row.tableName
40 - ElMessageBox.confirm('确认要强制同步' + tableName + '表结构吗?', t('common.reminder'), {  
41 - confirmButtonText: t('common.ok'),  
42 - cancelButtonText: t('common.cancel'),  
43 - type: 'warning'  
44 - }).then(async () => {  
45 - await CodegenApi.syncCodegenFromDBApi(row.id)  
46 - ElMessage.success('同步成功')  
47 - }) 41 + message
  42 + .confirm('确认要强制同步' + tableName + '表结构吗?', t('common.reminder'))
  43 + .then(async () => {
  44 + await CodegenApi.syncCodegenFromDBApi(row.id)
  45 + message.success('同步成功')
  46 + })
48 } 47 }
49 // 生成代码操作 48 // 生成代码操作
50 const handleGenTable = (row: CodegenTableVO) => { 49 const handleGenTable = (row: CodegenTableVO) => {
yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
1 <script setup lang="ts"> 1 <script setup lang="ts">
2 import { ref, unref } from 'vue' 2 import { ref, unref } from 'vue'
3 import dayjs from 'dayjs' 3 import dayjs from 'dayjs'
4 -import { ElMessage, ElMessageBox } from 'element-plus'  
5 import { DICT_TYPE } from '@/utils/dict' 4 import { DICT_TYPE } from '@/utils/dict'
6 import { useTable } from '@/hooks/web/useTable' 5 import { useTable } from '@/hooks/web/useTable'
7 import { useI18n } from '@/hooks/web/useI18n' 6 import { useI18n } from '@/hooks/web/useI18n'
@@ -9,6 +8,8 @@ import { FormExpose } from &#39;@/components/Form&#39; @@ -9,6 +8,8 @@ import { FormExpose } from &#39;@/components/Form&#39;
9 import type { FileConfigVO } from '@/api/infra/fileConfig/types' 8 import type { FileConfigVO } from '@/api/infra/fileConfig/types'
10 import { rules, allSchemas } from './fileConfig.data' 9 import { rules, allSchemas } from './fileConfig.data'
11 import * as FileConfigApi from '@/api/infra/fileConfig' 10 import * as FileConfigApi from '@/api/infra/fileConfig'
  11 +import { useMessage } from '@/hooks/web/useMessage'
  12 +const message = useMessage()
12 const { t } = useI18n() // 国际化 13 const { t } = useI18n() // 国际化
13 14
14 // ========== 列表相关 ========== 15 // ========== 列表相关 ==========
@@ -49,16 +50,12 @@ const handleUpdate = async (row: FileConfigVO) =&gt; { @@ -49,16 +50,12 @@ const handleUpdate = async (row: FileConfigVO) =&gt; {
49 50
50 // 主配置操作 51 // 主配置操作
51 const handleMaster = (row: FileConfigVO) => { 52 const handleMaster = (row: FileConfigVO) => {
52 - ElMessageBox.confirm('是否确认修改配置【 ' + row.name + ' 】为主配置?', t('common.reminder'), {  
53 - confirmButtonText: t('common.ok'),  
54 - cancelButtonText: t('common.cancel'),  
55 - type: 'warning'  
56 - }) 53 + message
  54 + .confirm('是否确认修改配置【 ' + row.name + ' 】为主配置?', t('common.reminder'))
57 .then(async () => { 55 .then(async () => {
58 await FileConfigApi.updateFileConfigMasterApi(row.id) 56 await FileConfigApi.updateFileConfigMasterApi(row.id)
59 await getList() 57 await getList()
60 }) 58 })
61 - .catch(() => {})  
62 } 59 }
63 60
64 // 提交按钮 61 // 提交按钮
@@ -69,10 +66,10 @@ const submitForm = async () =&gt; { @@ -69,10 +66,10 @@ const submitForm = async () =&gt; {
69 const data = unref(formRef)?.formModel as FileConfigVO 66 const data = unref(formRef)?.formModel as FileConfigVO
70 if (actionType.value === 'create') { 67 if (actionType.value === 'create') {
71 await FileConfigApi.createFileConfigApi(data) 68 await FileConfigApi.createFileConfigApi(data)
72 - ElMessage.success(t('common.createSuccess')) 69 + message.success(t('common.createSuccess'))
73 } else { 70 } else {
74 await FileConfigApi.updateFileConfigApi(data) 71 await FileConfigApi.updateFileConfigApi(data)
75 - ElMessage.success(t('common.updateSuccess')) 72 + message.success(t('common.updateSuccess'))
76 } 73 }
77 // 操作成功,重新加载列表 74 // 操作成功,重新加载列表
78 dialogVisible.value = false 75 dialogVisible.value = false
yudao-ui-admin-vue3/src/views/infra/job/index.vue
@@ -9,8 +9,9 @@ import { useTable } from &#39;@/hooks/web/useTable&#39; @@ -9,8 +9,9 @@ import { useTable } from &#39;@/hooks/web/useTable&#39;
9 import { useI18n } from '@/hooks/web/useI18n' 9 import { useI18n } from '@/hooks/web/useI18n'
10 import { FormExpose } from '@/components/Form' 10 import { FormExpose } from '@/components/Form'
11 import { rules, allSchemas } from './job.data' 11 import { rules, allSchemas } from './job.data'
12 -import { ElMessage, ElMessageBox } from 'element-plus'  
13 import { useRouter } from 'vue-router' 12 import { useRouter } from 'vue-router'
  13 +import { useMessage } from '@/hooks/web/useMessage'
  14 +const message = useMessage()
14 const { t } = useI18n() // 国际化 15 const { t } = useI18n() // 国际化
15 const { push } = useRouter() 16 const { push } = useRouter()
16 // ========== 列表相关 ========== 17 // ========== 列表相关 ==========
@@ -64,18 +65,11 @@ const handleJobLog = (row: JobVO) =&gt; { @@ -64,18 +65,11 @@ const handleJobLog = (row: JobVO) =&gt; {
64 } 65 }
65 // 执行一次 66 // 执行一次
66 const handleRun = (row: JobVO) => { 67 const handleRun = (row: JobVO) => {
67 - ElMessageBox.confirm('确认要立即执行一次' + row.name + '?', t('common.reminder'), {  
68 - confirmButtonText: t('common.ok'),  
69 - cancelButtonText: t('common.cancel'),  
70 - type: 'warning' 68 + message.confirm('确认要立即执行一次' + row.name + '?', t('common.reminder')).then(async () => {
  69 + await JobApi.runJobApi(row.id)
  70 + message.success('执行成功')
  71 + getList()
71 }) 72 })
72 - .then(async () => {  
73 - JobApi.runJobApi(row.id).then(() => {  
74 - ElMessage.success('执行成功')  
75 - getList()  
76 - })  
77 - })  
78 - .catch(() => {})  
79 } 73 }
80 // 提交按钮 74 // 提交按钮
81 const submitForm = async () => { 75 const submitForm = async () => {
@@ -85,10 +79,10 @@ const submitForm = async () =&gt; { @@ -85,10 +79,10 @@ const submitForm = async () =&gt; {
85 const data = unref(formRef)?.formModel as JobVO 79 const data = unref(formRef)?.formModel as JobVO
86 if (actionType.value === 'create') { 80 if (actionType.value === 'create') {
87 await JobApi.createJobApi(data) 81 await JobApi.createJobApi(data)
88 - ElMessage.success(t('common.createSuccess')) 82 + message.success(t('common.createSuccess'))
89 } else { 83 } else {
90 await JobApi.updateJobApi(data) 84 await JobApi.updateJobApi(data)
91 - ElMessage.success(t('common.updateSuccess')) 85 + message.success(t('common.updateSuccess'))
92 } 86 }
93 // 操作成功,重新加载列表 87 // 操作成功,重新加载列表
94 dialogVisible.value = false 88 dialogVisible.value = false
yudao-ui-admin-vue3/src/views/system/dept/index.vue
1 <script setup lang="ts"> 1 <script setup lang="ts">
2 import { useI18n } from '@/hooks/web/useI18n' 2 import { useI18n } from '@/hooks/web/useI18n'
3 -import { ElInput, ElCard, ElTree, ElTreeSelect, ElMessage, ElMessageBox } from 'element-plus' 3 +import { ElInput, ElCard, ElTree, ElTreeSelect } from 'element-plus'
4 import { handleTree } from '@/utils/tree' 4 import { handleTree } from '@/utils/tree'
5 import { onMounted, ref, unref, watch } from 'vue' 5 import { onMounted, ref, unref, watch } from 'vue'
6 import * as DeptApi from '@/api/system/dept' 6 import * as DeptApi from '@/api/system/dept'
7 import { Form, FormExpose } from '@/components/Form' 7 import { Form, FormExpose } from '@/components/Form'
8 import { modelSchema } from './dept.data' 8 import { modelSchema } from './dept.data'
9 import { DeptVO } from '@/api/system/dept/types' 9 import { DeptVO } from '@/api/system/dept/types'
  10 +import { useMessage } from '@/hooks/web/useMessage'
  11 +const message = useMessage()
10 interface Tree { 12 interface Tree {
11 id: number 13 id: number
12 name: string 14 name: string
@@ -29,10 +31,10 @@ const formRef = ref&lt;FormExpose&gt;() @@ -29,10 +31,10 @@ const formRef = ref&lt;FormExpose&gt;()
29 31
30 // ========== 创建部门树结构 ========== 32 // ========== 创建部门树结构 ==========
31 const filterText = ref('') 33 const filterText = ref('')
32 -const deptOptions = ref([]) // 树形结构 34 +const deptOptions = ref() // 树形结构
33 const treeRef = ref<InstanceType<typeof ElTree>>() 35 const treeRef = ref<InstanceType<typeof ElTree>>()
34 const getTree = async () => { 36 const getTree = async () => {
35 - const res = await DeptApi.listSimpleDeptApi() 37 + const res = await DeptApi.getDeptPageApi(null)
36 deptOptions.value = handleTree(res) 38 deptOptions.value = handleTree(res)
37 } 39 }
38 const filterNode = (value: string, data: Tree) => { 40 const filterNode = (value: string, data: Tree) => {
@@ -60,14 +62,11 @@ const handleUpdate = async (data: { id: number }) =&gt; { @@ -60,14 +62,11 @@ const handleUpdate = async (data: { id: number }) =&gt; {
60 } 62 }
61 // 删除 63 // 删除
62 const handleDelete = async (data: { id: number }) => { 64 const handleDelete = async (data: { id: number }) => {
63 - ElMessageBox.confirm(t('common.delDataMessage'), t('common.confirmTitle'), {  
64 - confirmButtonText: t('common.ok'),  
65 - cancelButtonText: t('common.cancel'),  
66 - type: 'warning'  
67 - }) 65 + message
  66 + .confirm(t('common.delDataMessage'), t('common.confirmTitle'))
68 .then(async () => { 67 .then(async () => {
69 await DeptApi.deleteDeptApi(data.id) 68 await DeptApi.deleteDeptApi(data.id)
70 - ElMessage.success(t('common.delSuccess')) 69 + message.success(t('common.delSuccess'))
71 }) 70 })
72 .catch(() => {}) 71 .catch(() => {})
73 await getTree() 72 await getTree()
@@ -118,6 +117,7 @@ onMounted(async () =&gt; { @@ -118,6 +117,7 @@ onMounted(async () =&gt; {
118 :highlight-current="true" 117 :highlight-current="true"
119 default-expand-all 118 default-expand-all
120 :filter-node-method="filterNode" 119 :filter-node-method="filterNode"
  120 + :expand-on-click-node="false"
121 > 121 >
122 <template #default="{ node, data }"> 122 <template #default="{ node, data }">
123 <span class="custom-tree-node"> 123 <span class="custom-tree-node">
yudao-ui-admin-vue3/src/views/system/errorCode/errorCode.data.ts
@@ -56,26 +56,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -56,26 +56,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
56 field: 'createTime', 56 field: 'createTime',
57 form: { 57 form: {
58 show: false 58 show: false
59 - }  
60 - },  
61 - {  
62 - label: t('common.createTime'),  
63 - field: 'daterange',  
64 - table: {  
65 - show: false  
66 - },  
67 - form: {  
68 - show: false  
69 - },  
70 - detail: {  
71 - show: false  
72 }, 59 },
73 search: { 60 search: {
74 show: true, 61 show: true,
75 component: 'DatePicker', 62 component: 'DatePicker',
76 componentProps: { 63 componentProps: {
77 - type: 'daterange',  
78 - valueFormat: 'YYYY-MM-DD' 64 + type: 'datetimerange',
  65 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
79 } 66 }
80 } 67 }
81 }, 68 },
yudao-ui-admin-vue3/src/views/system/loginlog/loginLog.data.ts
@@ -54,26 +54,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -54,26 +54,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
54 field: 'createTime', 54 field: 'createTime',
55 form: { 55 form: {
56 show: false 56 show: false
57 - }  
58 - },  
59 - {  
60 - label: t('common.createTime'),  
61 - field: 'daterange',  
62 - table: {  
63 - show: false  
64 - },  
65 - form: {  
66 - show: false  
67 - },  
68 - detail: {  
69 - show: false  
70 }, 57 },
71 search: { 58 search: {
72 show: true, 59 show: true,
73 component: 'DatePicker', 60 component: 'DatePicker',
74 componentProps: { 61 componentProps: {
75 - type: 'daterange',  
76 - valueFormat: 'YYYY-MM-DD' 62 + type: 'datetimerange',
  63 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
77 } 64 }
78 } 65 }
79 }, 66 },
yudao-ui-admin-vue3/src/views/system/menu/index.vue
@@ -16,16 +16,16 @@ import { @@ -16,16 +16,16 @@ import {
16 ElInput, 16 ElInput,
17 ElInputNumber, 17 ElInputNumber,
18 ElSelect, 18 ElSelect,
  19 + ElTreeSelect,
19 ElOption, 20 ElOption,
20 - ElMessageBox,  
21 - ElMessage,  
22 - ElCascader,  
23 ElRadioGroup, 21 ElRadioGroup,
24 ElRadioButton 22 ElRadioButton
25 } from 'element-plus' 23 } from 'element-plus'
26 import { MenuVO } from '@/api/system/menu/types' 24 import { MenuVO } from '@/api/system/menu/types'
27 import { SystemMenuTypeEnum, CommonStatusEnum } from '@/utils/constants' 25 import { SystemMenuTypeEnum, CommonStatusEnum } from '@/utils/constants'
28 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' 26 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
  27 +import { useMessage } from '@/hooks/web/useMessage'
  28 +const message = useMessage()
29 const { t } = useI18n() // 国际化 29 const { t } = useI18n() // 国际化
30 // ========== 创建菜单树结构 ========== 30 // ========== 创建菜单树结构 ==========
31 const loading = ref(true) 31 const loading = ref(true)
@@ -41,10 +41,13 @@ const menuProps = { @@ -41,10 +41,13 @@ const menuProps = {
41 label: 'name', 41 label: 'name',
42 value: 'id' 42 value: 'id'
43 } 43 }
44 -const menuOptions = ref([]) // 树形结构 44 +const menuOptions = ref() // 树形结构
45 const getTree = async () => { 45 const getTree = async () => {
46 const res = await MenuApi.listSimpleMenusApi() 46 const res = await MenuApi.listSimpleMenusApi()
47 - menuOptions.value = handleTree(res) 47 + const menu = { id: 0, name: '主类目', children: [] }
  48 + menu.children = handleTree(res)
  49 + console.info(menu)
  50 + menuOptions.value = menu
48 } 51 }
49 // ========== 查询 ========== 52 // ========== 查询 ==========
50 const queryParams = reactive({ 53 const queryParams = reactive({
@@ -108,14 +111,11 @@ const handleUpdate = async (row: MenuVO) =&gt; { @@ -108,14 +111,11 @@ const handleUpdate = async (row: MenuVO) =&gt; {
108 } 111 }
109 // 删除操作 112 // 删除操作
110 const handleDelete = async (row: MenuVO) => { 113 const handleDelete = async (row: MenuVO) => {
111 - ElMessageBox.confirm(t('common.delDataMessage'), t('common.confirmTitle'), {  
112 - confirmButtonText: t('common.ok'),  
113 - cancelButtonText: t('common.cancel'),  
114 - type: 'warning'  
115 - }) 114 + message
  115 + .confirm(t('common.delDataMessage'), t('common.confirmTitle'))
116 .then(async () => { 116 .then(async () => {
117 await MenuApi.deleteMenuApi(row.id) 117 await MenuApi.deleteMenuApi(row.id)
118 - ElMessage.success(t('common.delSuccess')) 118 + message.success(t('common.delSuccess'))
119 }) 119 })
120 .catch(() => {}) 120 .catch(() => {})
121 await getList() 121 await getList()
@@ -134,20 +134,20 @@ const submitForm = async () =&gt; { @@ -134,20 +134,20 @@ const submitForm = async () =&gt; {
134 ) { 134 ) {
135 if (!isExternal(menuForm.value.path)) { 135 if (!isExternal(menuForm.value.path)) {
136 if (menuForm.value.parentId === 0 && menuForm.value.path.charAt(0) !== '/') { 136 if (menuForm.value.parentId === 0 && menuForm.value.path.charAt(0) !== '/') {
137 - ElMessage.error('路径必须以 / 开头') 137 + message.error('路径必须以 / 开头')
138 return 138 return
139 } else if (menuForm.value.parentId !== 0 && menuForm.value.path.charAt(0) === '/') { 139 } else if (menuForm.value.parentId !== 0 && menuForm.value.path.charAt(0) === '/') {
140 - ElMessage.error('路径不能以 / 开头') 140 + message.error('路径不能以 / 开头')
141 return 141 return
142 } 142 }
143 } 143 }
144 } 144 }
145 if (actionType.value === 'create') { 145 if (actionType.value === 'create') {
146 await MenuApi.createMenuApi(menuForm.value) 146 await MenuApi.createMenuApi(menuForm.value)
147 - ElMessage.success(t('common.createSuccess')) 147 + message.success(t('common.createSuccess'))
148 } else { 148 } else {
149 await MenuApi.updateMenuApi(menuForm.value) 149 await MenuApi.updateMenuApi(menuForm.value)
150 - ElMessage.success(t('common.updateSuccess')) 150 + message.success(t('common.updateSuccess'))
151 } 151 }
152 // 操作成功,重新加载列表 152 // 操作成功,重新加载列表
153 dialogVisible.value = false 153 dialogVisible.value = false
@@ -264,13 +264,12 @@ onMounted(async () =&gt; { @@ -264,13 +264,12 @@ onMounted(async () =&gt; {
264 <el-row :gutter="24"> 264 <el-row :gutter="24">
265 <el-col :span="24"> 265 <el-col :span="24">
266 <el-form-item label="上级菜单"> 266 <el-form-item label="上级菜单">
267 - <el-cascader  
268 - :options="menuData"  
269 - :props="menuProps"  
270 - placeholder="请选择上级菜单" 267 + <el-tree-select
  268 + node-key="id"
271 v-model="menuForm.parentId" 269 v-model="menuForm.parentId"
272 - class="w-100"  
273 - clearable 270 + :props="menuProps"
  271 + :data="menuData"
  272 + check-strictly
274 /> 273 />
275 </el-form-item> 274 </el-form-item>
276 </el-col> 275 </el-col>
yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue
1 <script setup lang="ts"> 1 <script setup lang="ts">
2 import { ref, unref } from 'vue' 2 import { ref, unref } from 'vue'
3 import dayjs from 'dayjs' 3 import dayjs from 'dayjs'
4 -import { ElMessage, ElImage } from 'element-plus' 4 +import { ElMessage, ElImage, ElTag } from 'element-plus'
5 import { DICT_TYPE } from '@/utils/dict' 5 import { DICT_TYPE } from '@/utils/dict'
6 import { useTable } from '@/hooks/web/useTable' 6 import { useTable } from '@/hooks/web/useTable'
7 import { useI18n } from '@/hooks/web/useI18n' 7 import { useI18n } from '@/hooks/web/useI18n'
@@ -118,6 +118,16 @@ getList() @@ -118,6 +118,16 @@ getList()
118 <template #status="{ row }"> 118 <template #status="{ row }">
119 <DictTag :type="DICT_TYPE.COMMON_STATUS" :value="row.status" /> 119 <DictTag :type="DICT_TYPE.COMMON_STATUS" :value="row.status" />
120 </template> 120 </template>
  121 + <template #authorizedGrantTypes="{ row }">
  122 + <el-tag
  123 + :disable-transitions="true"
  124 + :key="index"
  125 + v-for="(authorizedGrantType, index) in row.authorizedGrantTypes"
  126 + :index="index"
  127 + >
  128 + {{ authorizedGrantType }}
  129 + </el-tag>
  130 + </template>
121 <template #createTime="{ row }"> 131 <template #createTime="{ row }">
122 <span>{{ dayjs(row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</span> 132 <span>{{ dayjs(row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</span>
123 </template> 133 </template>
yudao-ui-admin-vue3/src/views/system/operatelog/index.vue
@@ -68,7 +68,7 @@ getList() @@ -68,7 +68,7 @@ getList()
68 <span>{{ row.resultCode === 0 ? '成功' : '失败' }}</span> 68 <span>{{ row.resultCode === 0 ? '成功' : '失败' }}</span>
69 </template> 69 </template>
70 <template #startTime="{ row }"> 70 <template #startTime="{ row }">
71 - <span>{{ dayjs(row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</span> 71 + <span>{{ dayjs(row.startTime).format('YYYY-MM-DD HH:mm:ss') }}</span>
72 </template> 72 </template>
73 <template #action="{ row }"> 73 <template #action="{ row }">
74 <el-button link type="primary" @click="handleDetail(row)"> 74 <el-button link type="primary" @click="handleDetail(row)">
yudao-ui-admin-vue3/src/views/system/operatelog/operatelog.data.ts
@@ -41,7 +41,10 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -41,7 +41,10 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
41 }, 41 },
42 { 42 {
43 label: '操作人员', 43 label: '操作人员',
44 - field: 'userNickname' 44 + field: 'userNickname',
  45 + search: {
  46 + show: true
  47 + }
45 }, 48 },
46 { 49 {
47 label: '操作明细', 50 label: '操作明细',
@@ -63,41 +66,38 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -63,41 +66,38 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
63 }, 66 },
64 { 67 {
65 label: '操作结果', 68 label: '操作结果',
66 - field: 'resultCode'  
67 - },  
68 - {  
69 - label: '操作日期',  
70 - field: 'startTime',  
71 - form: {  
72 - show: false 69 + field: 'resultCode',
  70 + search: {
  71 + show: true,
  72 + component: 'Select',
  73 + componentProps: {
  74 + options: [
  75 + { label: '成功', value: true },
  76 + { label: '失败', value: false }
  77 + ]
  78 + }
73 } 79 }
74 }, 80 },
75 { 81 {
76 - label: '执行时长',  
77 - field: 'duration'  
78 - },  
79 - {  
80 label: '操作日期', 82 label: '操作日期',
81 - field: 'daterange',  
82 - table: {  
83 - show: false  
84 - }, 83 + field: 'startTime',
85 form: { 84 form: {
86 show: false 85 show: false
87 }, 86 },
88 - detail: {  
89 - show: false  
90 - },  
91 search: { 87 search: {
92 show: true, 88 show: true,
93 component: 'DatePicker', 89 component: 'DatePicker',
94 componentProps: { 90 componentProps: {
95 - type: 'daterange',  
96 - valueFormat: 'YYYY-MM-DD' 91 + type: 'datetimerange',
  92 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
97 } 93 }
98 } 94 }
99 }, 95 },
100 { 96 {
  97 + label: '执行时长',
  98 + field: 'duration'
  99 + },
  100 + {
101 label: t('table.action'), 101 label: t('table.action'),
102 field: 'action', 102 field: 'action',
103 width: '120px', 103 width: '120px',
yudao-ui-admin-vue3/src/views/system/role/role.data.ts
@@ -65,12 +65,15 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -65,12 +65,15 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
65 form: { 65 form: {
66 show: false 66 show: false
67 }, 67 },
  68 + detail: {
  69 + show: false
  70 + },
68 search: { 71 search: {
69 show: true, 72 show: true,
70 component: 'DatePicker', 73 component: 'DatePicker',
71 componentProps: { 74 componentProps: {
72 - type: 'daterange',  
73 - valueFormat: 'YYYY-MM-DD' 75 + type: 'datetimerange',
  76 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
74 } 77 }
75 } 78 }
76 }, 79 },
yudao-ui-admin-vue3/src/views/system/sms/smsChannel/sms.channel.data.ts
@@ -66,26 +66,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -66,26 +66,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
66 field: 'createTime', 66 field: 'createTime',
67 form: { 67 form: {
68 show: false 68 show: false
69 - }  
70 - },  
71 - {  
72 - label: t('common.createTime'),  
73 - field: 'daterange',  
74 - table: {  
75 - show: false  
76 - },  
77 - form: {  
78 - show: false  
79 - },  
80 - detail: {  
81 - show: false  
82 }, 69 },
83 search: { 70 search: {
84 show: true, 71 show: true,
85 component: 'DatePicker', 72 component: 'DatePicker',
86 componentProps: { 73 componentProps: {
87 - type: 'daterange',  
88 - valueFormat: 'YYYY-MM-DD' 74 + type: 'datetimerange',
  75 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
89 } 76 }
90 } 77 }
91 }, 78 },
yudao-ui-admin-vue3/src/views/system/sms/smsLog/sms.log.data.ts
@@ -79,23 +79,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -79,23 +79,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
79 field: 'createTime', 79 field: 'createTime',
80 form: { 80 form: {
81 show: false 81 show: false
82 - }  
83 - },  
84 - {  
85 - label: '接收时间',  
86 - field: 'daterange',  
87 - table: {  
88 - show: false  
89 - },  
90 - form: {  
91 - show: false  
92 }, 82 },
93 search: { 83 search: {
94 show: true, 84 show: true,
95 component: 'DatePicker', 85 component: 'DatePicker',
96 componentProps: { 86 componentProps: {
97 - type: 'daterange',  
98 - valueFormat: 'YYYY-MM-DD' 87 + type: 'datetimerange',
  88 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
99 } 89 }
100 } 90 }
101 }, 91 },
yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/sms.template.data.ts
@@ -77,26 +77,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -77,26 +77,13 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
77 field: 'createTime', 77 field: 'createTime',
78 form: { 78 form: {
79 show: false 79 show: false
80 - }  
81 - },  
82 - {  
83 - label: t('common.createTime'),  
84 - field: 'daterange',  
85 - table: {  
86 - show: false  
87 - },  
88 - form: {  
89 - show: false  
90 - },  
91 - detail: {  
92 - show: false  
93 }, 80 },
94 search: { 81 search: {
95 show: true, 82 show: true,
96 component: 'DatePicker', 83 component: 'DatePicker',
97 componentProps: { 84 componentProps: {
98 - type: 'daterange',  
99 - valueFormat: 'YYYY-MM-DD' 85 + type: 'datetimerange',
  86 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
100 } 87 }
101 } 88 }
102 }, 89 },
yudao-ui-admin-vue3/src/views/system/user/index.vue
@@ -3,7 +3,6 @@ import { onMounted, ref, unref, watch } from &#39;vue&#39; @@ -3,7 +3,6 @@ import { onMounted, ref, unref, watch } from &#39;vue&#39;
3 import dayjs from 'dayjs' 3 import dayjs from 'dayjs'
4 import { 4 import {
5 ElInput, 5 ElInput,
6 - ElMessage,  
7 ElCard, 6 ElCard,
8 ElTree, 7 ElTree,
9 ElTreeSelect, 8 ElTreeSelect,
@@ -14,7 +13,6 @@ import { @@ -14,7 +13,6 @@ import {
14 ElUpload, 13 ElUpload,
15 ElSwitch, 14 ElSwitch,
16 ElCheckbox, 15 ElCheckbox,
17 - ElMessageBox,  
18 UploadInstance, 16 UploadInstance,
19 UploadRawFile 17 UploadRawFile
20 } from 'element-plus' 18 } from 'element-plus'
@@ -32,6 +30,8 @@ import * as UserApi from &#39;@/api/system/user&#39; @@ -32,6 +30,8 @@ import * as UserApi from &#39;@/api/system/user&#39;
32 import download from '@/utils/download' 30 import download from '@/utils/download'
33 import { CommonStatusEnum } from '@/utils/constants' 31 import { CommonStatusEnum } from '@/utils/constants'
34 import { getAccessToken, getTenantId } from '@/utils/auth' 32 import { getAccessToken, getTenantId } from '@/utils/auth'
  33 +import { useMessage } from '@/hooks/web/useMessage'
  34 +const message = useMessage()
35 interface Tree { 35 interface Tree {
36 id: number 36 id: number
37 name: string 37 name: string
@@ -127,10 +127,10 @@ const submitForm = async () =&gt; { @@ -127,10 +127,10 @@ const submitForm = async () =&gt; {
127 data.postIds = postIds.value 127 data.postIds = postIds.value
128 if (actionType.value === 'create') { 128 if (actionType.value === 'create') {
129 await UserApi.createUserApi(data) 129 await UserApi.createUserApi(data)
130 - ElMessage.success(t('common.createSuccess')) 130 + message.success(t('common.createSuccess'))
131 } else { 131 } else {
132 await UserApi.updateUserApi(data) 132 await UserApi.updateUserApi(data)
133 - ElMessage.success(t('common.updateSuccess')) 133 + message.success(t('common.updateSuccess'))
134 } 134 }
135 // 操作成功,重新加载列表 135 // 操作成功,重新加载列表
136 dialogVisible.value = false 136 dialogVisible.value = false
@@ -142,16 +142,13 @@ const submitForm = async () =&gt; { @@ -142,16 +142,13 @@ const submitForm = async () =&gt; {
142 // 改变用户状态操作 142 // 改变用户状态操作
143 const handleStatusChange = async (row: UserVO) => { 143 const handleStatusChange = async (row: UserVO) => {
144 const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用' 144 const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用'
145 - ElMessageBox.confirm('确认要"' + text + '""' + row.username + '"用户吗?', t('common.reminder'), {  
146 - confirmButtonText: t('common.ok'),  
147 - cancelButtonText: t('common.cancel'),  
148 - type: 'warning'  
149 - }) 145 + message
  146 + .confirm('确认要"' + text + '""' + row.username + '"用户吗?', t('common.reminder'))
150 .then(async () => { 147 .then(async () => {
151 row.status = 148 row.status =
152 row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.ENABLE : CommonStatusEnum.DISABLE 149 row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.ENABLE : CommonStatusEnum.DISABLE
153 await UserApi.updateUserStatusApi(row.id, row.status) 150 await UserApi.updateUserStatusApi(row.id, row.status)
154 - ElMessage.success(text + '成功') 151 + message.success(text + '成功')
155 await getList() 152 await getList()
156 }) 153 })
157 .catch(() => { 154 .catch(() => {
@@ -161,12 +158,9 @@ const handleStatusChange = async (row: UserVO) =&gt; { @@ -161,12 +158,9 @@ const handleStatusChange = async (row: UserVO) =&gt; {
161 } 158 }
162 // 重置密码 159 // 重置密码
163 const handleResetPwd = (row: UserVO) => { 160 const handleResetPwd = (row: UserVO) => {
164 - ElMessageBox.prompt('请输入"' + row.username + '"的新密码', t('common.reminder'), {  
165 - confirmButtonText: t('common.ok'),  
166 - cancelButtonText: t('common.cancel')  
167 - }).then(({ value }) => { 161 + message.prompt('请输入"' + row.username + '"的新密码', t('common.reminder')).then(({ value }) => {
168 UserApi.resetUserPwdApi(row.id, value).then(() => { 162 UserApi.resetUserPwdApi(row.id, value).then(() => {
169 - ElMessage.success('修改成功,新密码是:' + value) 163 + message.success('修改成功,新密码是:' + value)
170 }) 164 })
171 }) 165 })
172 } 166 }
@@ -207,8 +201,8 @@ const beforeExcelUpload = (file: UploadRawFile) =&gt; { @@ -207,8 +201,8 @@ const beforeExcelUpload = (file: UploadRawFile) =&gt; {
207 file.type === 'application/vnd.ms-excel' || 201 file.type === 'application/vnd.ms-excel' ||
208 file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' 202 file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
209 const isLt5M = file.size / 1024 / 1024 < 5 203 const isLt5M = file.size / 1024 / 1024 < 5
210 - if (!isExcel) ElMessage.error('上传文件只能是 xls / xlsx 格式!')  
211 - if (!isLt5M) ElMessage.error('上传文件大小不能超过 5MB!') 204 + if (!isExcel) message.error('上传文件只能是 xls / xlsx 格式!')
  205 + if (!isLt5M) message.error('上传文件大小不能超过 5MB!')
212 return isExcel && isLt5M 206 return isExcel && isLt5M
213 } 207 }
214 // 文件上传 208 // 文件上传
@@ -224,7 +218,7 @@ const submitFileForm = () =&gt; { @@ -224,7 +218,7 @@ const submitFileForm = () =&gt; {
224 // 文件上传成功 218 // 文件上传成功
225 const handleFileSuccess = (response: any): void => { 219 const handleFileSuccess = (response: any): void => {
226 if (response.code !== 0) { 220 if (response.code !== 0) {
227 - ElMessage.error(response.msg) 221 + message.error(response.msg)
228 return 222 return
229 } 223 }
230 importDialogVisible.value = false 224 importDialogVisible.value = false
@@ -242,15 +236,15 @@ const handleFileSuccess = (response: any): void =&gt; { @@ -242,15 +236,15 @@ const handleFileSuccess = (response: any): void =&gt; {
242 for (const username in data.failureUsernames) { 236 for (const username in data.failureUsernames) {
243 text += '< ' + username + ': ' + data.failureUsernames[username] + ' >' 237 text += '< ' + username + ': ' + data.failureUsernames[username] + ' >'
244 } 238 }
245 - ElMessageBox.alert(text) 239 + message.alert(text)
246 } 240 }
247 // 文件数超出提示 241 // 文件数超出提示
248 const handleExceed = (): void => { 242 const handleExceed = (): void => {
249 - ElMessage.error('最多只能上传一个文件!') 243 + message.error('最多只能上传一个文件!')
250 } 244 }
251 // 上传错误提示 245 // 上传错误提示
252 const excelUploadError = (): void => { 246 const excelUploadError = (): void => {
253 - ElMessage.error('导入数据失败,请您重新上传!') 247 + message.error('导入数据失败,请您重新上传!')
254 } 248 }
255 // ========== 初始化 ========== 249 // ========== 初始化 ==========
256 onMounted(async () => { 250 onMounted(async () => {
yudao-ui-admin-vue3/src/views/system/user/user.data.ts
@@ -101,7 +101,7 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -101,7 +101,7 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
101 }, 101 },
102 { 102 {
103 label: t('common.createTime'), 103 label: t('common.createTime'),
104 - field: 'daterange', 104 + field: 'createTime',
105 table: { 105 table: {
106 show: false 106 show: false
107 }, 107 },
@@ -115,7 +115,7 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([ @@ -115,7 +115,7 @@ const crudSchemas = reactive&lt;CrudSchema[]&gt;([
115 show: true, 115 show: true,
116 component: 'DatePicker', 116 component: 'DatePicker',
117 componentProps: { 117 componentProps: {
118 - type: 'daterange', 118 + type: 'datetimerange',
119 valueFormat: 'YYYY-MM-DD HH:mm:ss' 119 valueFormat: 'YYYY-MM-DD HH:mm:ss'
120 } 120 }
121 } 121 }