Commit e1a05c137475cf6d746e0152db6b87e645edec44
1 parent
c5f1cad0
vue3:review 代码生成、文件配置、文件列表、配置管理、访问日志、错误日志、定时任务
Showing
11 changed files
with
32 additions
and
3 deletions
yudao-ui-admin-vue3/src/views/infra/apiAccessLog/apiAccessLog.data.ts
| ... | ... | @@ -6,6 +6,7 @@ import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' |
| 6 | 6 | const crudSchemas = reactive<VxeCrudSchema>({ |
| 7 | 7 | primaryKey: 'id', |
| 8 | 8 | primaryType: 'seq', |
| 9 | + primaryTitle: '日志编号', | |
| 9 | 10 | action: true, |
| 10 | 11 | actionWidth: '80px', |
| 11 | 12 | columns: [ | ... | ... |
yudao-ui-admin-vue3/src/views/infra/apiErrorLog/apiErrorLog.data.ts
| ... | ... | @@ -6,6 +6,7 @@ import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' |
| 6 | 6 | const crudSchemas = reactive<VxeCrudSchema>({ |
| 7 | 7 | primaryKey: 'id', |
| 8 | 8 | primaryType: 'seq', |
| 9 | + primaryTitle: '日志编号', | |
| 9 | 10 | action: true, |
| 10 | 11 | actionWidth: '300', |
| 11 | 12 | columns: [ | ... | ... |
yudao-ui-admin-vue3/src/views/infra/codegen/components/ImportTable.vue
yudao-ui-admin-vue3/src/views/infra/codegen/index.vue
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | <!-- 列表 --> |
| 4 | 4 | <vxe-grid ref="xGrid" v-bind="gridOptions" class="xtable-scrollbar"> |
| 5 | 5 | <template #toolbar_buttons> |
| 6 | + <!-- 操作:导入 --> | |
| 6 | 7 | <XButton |
| 7 | 8 | type="primary" |
| 8 | 9 | preIcon="ep:zoom-in" |
| ... | ... | @@ -12,30 +13,35 @@ |
| 12 | 13 | /> |
| 13 | 14 | </template> |
| 14 | 15 | <template #actionbtns_default="{ row }"> |
| 16 | + <!-- 操作:预览 --> | |
| 15 | 17 | <XTextButton |
| 16 | 18 | preIcon="ep:view" |
| 17 | 19 | :title="t('action.preview')" |
| 18 | 20 | v-hasPermi="['infra:codegen:query']" |
| 19 | 21 | @click="handlePreview(row.id)" |
| 20 | 22 | /> |
| 23 | + <!-- 操作:编辑 --> | |
| 21 | 24 | <XTextButton |
| 22 | 25 | preIcon="ep:edit" |
| 23 | 26 | :title="t('action.edit')" |
| 24 | 27 | v-hasPermi="['infra:codegen:update']" |
| 25 | 28 | @click="handleUpdate(row.id)" |
| 26 | 29 | /> |
| 30 | + <!-- 操作:删除 --> | |
| 27 | 31 | <XTextButton |
| 28 | 32 | preIcon="ep:delete" |
| 29 | 33 | :title="t('action.del')" |
| 30 | 34 | v-hasPermi="['infra:codegen:delete']" |
| 31 | 35 | @click="handleDelete(row.id)" |
| 32 | 36 | /> |
| 37 | + <!-- 操作:同步 --> | |
| 33 | 38 | <XTextButton |
| 34 | 39 | preIcon="ep:refresh" |
| 35 | 40 | :title="t('action.sync')" |
| 36 | 41 | v-hasPermi="['infra:codegen:update']" |
| 37 | 42 | @click="handleSynchDb(row.id)" |
| 38 | 43 | /> |
| 44 | + <!-- 操作:生成 --> | |
| 39 | 45 | <XTextButton |
| 40 | 46 | preIcon="ep:download" |
| 41 | 47 | :title="t('action.generate')" |
| ... | ... | @@ -45,7 +51,9 @@ |
| 45 | 51 | </template> |
| 46 | 52 | </vxe-grid> |
| 47 | 53 | </ContentWrap> |
| 54 | + <!-- 弹窗:导入表 --> | |
| 48 | 55 | <ImportTable ref="importRef" @ok="handleQuery()" /> |
| 56 | + <!-- 弹窗:预览代码 --> | |
| 49 | 57 | <Preview ref="previewRef" /> |
| 50 | 58 | </template> |
| 51 | 59 | <script setup lang="ts" name="Codegen"> |
| ... | ... | @@ -78,12 +86,15 @@ const openImportTable = () => { |
| 78 | 86 | importRef.value.show() |
| 79 | 87 | } |
| 80 | 88 | // 预览操作 |
| 89 | +// TODO 星语:点击后报错 | |
| 81 | 90 | const previewRef = ref() |
| 82 | 91 | const handlePreview = (row: CodegenTableVO) => { |
| 83 | 92 | previewRef.value.show(row) |
| 84 | 93 | } |
| 85 | 94 | // 编辑操作 |
| 86 | 95 | const handleUpdate = (rowId: number) => { |
| 96 | + // TODO 星语:修改某个的时候,tab 要展示名字。例如说:"修改[" + tableName + "]生成配置" | |
| 97 | + // TODO 星语:【暗黑模式】编辑界面,周边有白色的边框,不太好看 | |
| 87 | 98 | push('/codegen/edit?id=' + rowId) |
| 88 | 99 | } |
| 89 | 100 | // 同步操作 | ... | ... |
yudao-ui-admin-vue3/src/views/infra/config/config.data.ts
| ... | ... | @@ -16,7 +16,7 @@ export const rules = reactive({ |
| 16 | 16 | // CrudSchema |
| 17 | 17 | const crudSchemas = reactive<VxeCrudSchema>({ |
| 18 | 18 | primaryKey: 'id', |
| 19 | - primaryType: 'seq', | |
| 19 | + primaryType: null, | |
| 20 | 20 | action: true, |
| 21 | 21 | columns: [ |
| 22 | 22 | { |
| ... | ... | @@ -91,4 +91,5 @@ const crudSchemas = reactive<VxeCrudSchema>({ |
| 91 | 91 | } |
| 92 | 92 | ] |
| 93 | 93 | }) |
| 94 | +// TODO 星语:“创建时间”的筛选,超过 table 的边框 | |
| 94 | 95 | export const { allSchemas } = useVxeCrudSchemas(crudSchemas) | ... | ... |
yudao-ui-admin-vue3/src/views/infra/fileConfig/fileConfig.data.ts
| ... | ... | @@ -28,6 +28,7 @@ export const rules = reactive({ |
| 28 | 28 | const crudSchemas = reactive<VxeCrudSchema>({ |
| 29 | 29 | primaryKey: 'id', |
| 30 | 30 | primaryType: 'seq', |
| 31 | + primaryTitle: '配置编号', | |
| 31 | 32 | action: true, |
| 32 | 33 | actionWidth: '400px', |
| 33 | 34 | columns: [ |
| ... | ... | @@ -39,14 +40,14 @@ const crudSchemas = reactive<VxeCrudSchema>({ |
| 39 | 40 | { |
| 40 | 41 | title: '存储器', |
| 41 | 42 | field: 'storage', |
| 42 | - dictType: DICT_TYPE.INFRA_FILE_STORAGE, | |
| 43 | + dictType: DICT_TYPE.INFRA_FILE_STORAGE, // TODO @星语:不同存储器,不同表单 | |
| 43 | 44 | dictClass: 'number', |
| 44 | 45 | isSearch: true |
| 45 | 46 | }, |
| 46 | 47 | { |
| 47 | 48 | title: '主配置', |
| 48 | 49 | field: 'master', |
| 49 | - dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, | |
| 50 | + dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, // TODO @星语:新增时,不选择主配置 | |
| 50 | 51 | dictClass: 'boolean' |
| 51 | 52 | }, |
| 52 | 53 | { | ... | ... |
yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
| ... | ... | @@ -13,30 +13,35 @@ |
| 13 | 13 | /> |
| 14 | 14 | </template> |
| 15 | 15 | <template #actionbtns_default="{ row }"> |
| 16 | + <!-- 操作:编辑 --> | |
| 16 | 17 | <XTextButton |
| 17 | 18 | preIcon="ep:edit" |
| 18 | 19 | :title="t('action.edit')" |
| 19 | 20 | v-hasPermi="['infra:file-config:update']" |
| 20 | 21 | @click="handleUpdate(row.id)" |
| 21 | 22 | /> |
| 23 | + <!-- 操作:详情 --> | |
| 22 | 24 | <XTextButton |
| 23 | 25 | preIcon="ep:view" |
| 24 | 26 | :title="t('action.detail')" |
| 25 | 27 | v-hasPermi="['infra:file-config:query']" |
| 26 | 28 | @click="handleDetail(row.id)" |
| 27 | 29 | /> |
| 30 | + <!-- 操作:主配置 --> | |
| 28 | 31 | <XTextButton |
| 29 | 32 | preIcon="ep:flag" |
| 30 | 33 | title="主配置" |
| 31 | 34 | v-hasPermi="['infra:file-config:update']" |
| 32 | 35 | @click="handleMaster(row)" |
| 33 | 36 | /> |
| 37 | + <!-- 操作:测试 --> | |
| 34 | 38 | <XTextButton |
| 35 | 39 | preIcon="ep:share" |
| 36 | 40 | :title="t('action.test')" |
| 37 | 41 | v-hasPermi="['infra:file-config:update']" |
| 38 | 42 | @click="handleUpdate(row.id)" |
| 39 | 43 | /> |
| 44 | + <!-- 操作:删除 --> | |
| 40 | 45 | <XTextButton |
| 41 | 46 | preIcon="ep:delete" |
| 42 | 47 | :title="t('action.del')" | ... | ... |
yudao-ui-admin-vue3/src/views/infra/fileList/index.vue
| ... | ... | @@ -84,6 +84,8 @@ import { useMessage } from '@/hooks/web/useMessage' |
| 84 | 84 | import { useVxeGrid } from '@/hooks/web/useVxeGrid' |
| 85 | 85 | import { VxeGridInstance } from 'vxe-table' |
| 86 | 86 | import { ElUpload, ElImage, UploadInstance, UploadRawFile } from 'element-plus' |
| 87 | +// 业务相关的 import | |
| 88 | +// TODO 星语:貌似这个界面打开 404 | |
| 87 | 89 | import { allSchemas } from './fileList.data' |
| 88 | 90 | import * as FileApi from '@/api/infra/fileList' |
| 89 | 91 | import { getAccessToken, getTenantId } from '@/utils/auth' | ... | ... |
yudao-ui-admin-vue3/src/views/infra/job/index.vue
| ... | ... | @@ -58,18 +58,21 @@ |
| 58 | 58 | v-hasPermi="['infra:job:delete']" |
| 59 | 59 | @click="handleDelete(row.id)" |
| 60 | 60 | /> |
| 61 | + <!-- 操作:执行 --> | |
| 61 | 62 | <XTextButton |
| 62 | 63 | preIcon="ep:view" |
| 63 | 64 | title="执行一次" |
| 64 | 65 | v-hasPermi="['infra:job:trigger']" |
| 65 | 66 | @click="handleRun(row)" |
| 66 | 67 | /> |
| 68 | + <!-- 操作:日志 --> | |
| 67 | 69 | <XTextButton |
| 68 | 70 | preIcon="ep:view" |
| 69 | 71 | title="调度日志" |
| 70 | 72 | v-hasPermi="['infra:job:query']" |
| 71 | 73 | @click="handleJobLog(row.id)" |
| 72 | 74 | /> |
| 75 | + <!-- TODO @星语:执行一次、任务详情、调度日志,可以收成【更多】 --> | |
| 73 | 76 | </template> |
| 74 | 77 | </vxe-grid> |
| 75 | 78 | </ContentWrap> |
| ... | ... | @@ -97,6 +100,7 @@ |
| 97 | 100 | <template #monitorTimeout="{ row }"> |
| 98 | 101 | <span>{{ row.monitorTimeout > 0 ? row.monitorTimeout + ' 毫秒' : '未开启' }}</span> |
| 99 | 102 | </template> |
| 103 | + <!-- TODO @星语:有个【后续执行时间】字段:2022-11-26 23:03:16; 2022-11-26 23:03:17; 2022-11-26 23:03:18; 2022-11-26 23:03:19; 2022-11-26 23:03:20 --> | |
| 100 | 104 | </Descriptions> |
| 101 | 105 | <!-- 操作按钮 --> |
| 102 | 106 | <template #footer> | ... | ... |
yudao-ui-admin-vue3/src/views/infra/job/job.data.ts