mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 02:38:43 +08:00 
			
		
		
		
	fix: todo
This commit is contained in:
		| @@ -45,18 +45,24 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|     }, | ||||
|     { | ||||
|       title: '访问令牌的有效期', | ||||
|       field: 'accessTokenValiditySeconds' // TODO @星语:数字输入框 | ||||
|       field: 'accessTokenValiditySeconds', | ||||
|       form: { | ||||
|         component: 'InputNumber' | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       title: '刷新令牌的有效期', | ||||
|       field: 'refreshTokenValiditySeconds' // TODO @星语:数字输入框 | ||||
|       field: 'refreshTokenValiditySeconds', | ||||
|       form: { | ||||
|         component: 'InputNumber' | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       title: '授权类型', | ||||
|       field: 'authorizedGrantTypes', | ||||
|       dictType: DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE, | ||||
|       form: { | ||||
|         component: 'Select' // TODO @星语:多选 | ||||
|         component: 'SelectV2' // TODO @星语:多选 | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
| @@ -102,7 +108,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||||
|     { | ||||
|       title: t('common.createTime'), | ||||
|       field: 'createTime', | ||||
|       formatter: 'formatDate', // TODO @星语:宽度,保证时间可以展示出来 | ||||
|       formatter: 'formatDate', | ||||
|       isForm: false | ||||
|     } | ||||
|   ] | ||||
|   | ||||
| @@ -57,7 +57,6 @@ | ||||
|       :rules="rules" | ||||
|     /> | ||||
|     <!-- 表单:详情 --> | ||||
|     <!-- TODO @星语:展示详情时,有点小丑,可额能得看看 --> | ||||
|     <Descriptions | ||||
|       v-if="actionType === 'detail'" | ||||
|       :schema="allSchemas.detailSchema" | ||||
|   | ||||
| @@ -58,10 +58,10 @@ const handleDetail = async (row: TokenApi.OAuth2TokenVO) => { | ||||
| // 强退操作 | ||||
| const handleForceLogout = (rowId: number) => { | ||||
|   message | ||||
|     .delConfirm() | ||||
|     .confirm('是否要强制退出用户') | ||||
|     .then(async () => { | ||||
|       await TokenApi.deleteAccessTokenApi(rowId) | ||||
|       message.success(t('common.delSuccess')) // TODO 星语:提示内容不对 | ||||
|       message.success(t('common.success')) | ||||
|     }) | ||||
|     .finally(() => { | ||||
|       // 刷新列表 | ||||
|   | ||||
| @@ -45,6 +45,7 @@ | ||||
| // 全局相关的 import | ||||
| import { ref } from 'vue' | ||||
| import { useI18n } from '@/hooks/web/useI18n' | ||||
| import { useMessage } from '@/hooks/web/useMessage' | ||||
| import { useVxeGrid } from '@/hooks/web/useVxeGrid' | ||||
| import { VxeGridInstance } from 'vxe-table' | ||||
| // 业务相关的 import | ||||
| @@ -53,6 +54,7 @@ import { allSchemas } from './operatelog.data' | ||||
| import download from '@/utils/download' | ||||
|  | ||||
| const { t } = useI18n() // 国际化 | ||||
| const message = useMessage() // 消息弹窗 | ||||
| // 列表相关的变量 | ||||
| const xGrid = ref<VxeGridInstance>() // 列表 Grid Ref | ||||
| const { gridOptions } = useVxeGrid<OperateLogApi.OperateLogVO>({ | ||||
| @@ -73,13 +75,14 @@ const handleDetail = (row: OperateLogApi.OperateLogVO) => { | ||||
| } | ||||
|  | ||||
| // 导出操作 | ||||
| // TODO @星语:导出需要有二次确认哈 | ||||
| const handleExport = async () => { | ||||
|   const queryParams = Object.assign( | ||||
|     {}, | ||||
|     JSON.parse(JSON.stringify(xGrid.value?.getRefMaps().refForm.value.data)) // TODO @星语:这个有没办法,封装个 util 获取哈? | ||||
|   ) | ||||
|   const res = await OperateLogApi.exportOperateLogApi(queryParams) | ||||
|   download.excel(res, '岗位列表.xls') | ||||
|   message.exportConfirm().then(async () => { | ||||
|     const queryParams = Object.assign( | ||||
|       {}, | ||||
|       JSON.parse(JSON.stringify(xGrid.value?.getRefMaps().refForm.value.data)) // TODO @星语:这个有没办法,封装个 util 获取哈? | ||||
|     ) | ||||
|     const res = await OperateLogApi.exportOperateLogApi(queryParams) | ||||
|     download.excel(res, '岗位列表.xls') | ||||
|   }) | ||||
| } | ||||
| </script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 xingyu4j
					xingyu4j