Commit ed7e3338f8c4517c6ca8041acff5b86a20060c97
1 parent
e63e5ffe
perf: 优化代码
Showing
30 changed files
with
44 additions
and
224 deletions
yudao-ui-admin-vue3/src/views/infra/apiErrorLog/index.vue
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | type="warning" |
| 9 | 9 | preIcon="ep:download" |
| 10 | 10 | :title="t('action.export')" |
| 11 | - @click="handleExport()" | |
| 11 | + @click="exportList('错误数据.xls')" | |
| 12 | 12 | /> |
| 13 | 13 | </template> |
| 14 | 14 | <template #duration_default="{ row }"> |
| ... | ... | @@ -81,10 +81,7 @@ const handleDetail = (row: ApiErrorLogApi.ApiErrorLogVO) => { |
| 81 | 81 | dialogTitle.value = t('action.detail') |
| 82 | 82 | dialogVisible.value = true |
| 83 | 83 | } |
| 84 | -// 导出 | |
| 85 | -const handleExport = async () => { | |
| 86 | - await exportList('错误数据.xls') | |
| 87 | -} | |
| 84 | + | |
| 88 | 85 | // 异常处理操作 |
| 89 | 86 | const handleProcessClick = ( |
| 90 | 87 | row: ApiErrorLogApi.ApiErrorLogVO, | ... | ... |
yudao-ui-admin-vue3/src/views/infra/codegen/index.vue
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | preIcon="ep:delete" |
| 33 | 33 | :title="t('action.del')" |
| 34 | 34 | v-hasPermi="['infra:codegen:delete']" |
| 35 | - @click="handleDelete(row.id)" | |
| 35 | + @click="deleteData(row.id)" | |
| 36 | 36 | /> |
| 37 | 37 | <!-- 操作:同步 --> |
| 38 | 38 | <XTextButton |
| ... | ... | @@ -52,7 +52,7 @@ |
| 52 | 52 | </XTable> |
| 53 | 53 | </ContentWrap> |
| 54 | 54 | <!-- 弹窗:导入表 --> |
| 55 | - <ImportTable ref="importRef" @ok="handleQuery()" /> | |
| 55 | + <ImportTable ref="importRef" @ok="reload()" /> | |
| 56 | 56 | <!-- 弹窗:预览代码 --> |
| 57 | 57 | <Preview ref="previewRef" /> |
| 58 | 58 | </template> |
| ... | ... | @@ -103,17 +103,10 @@ const handleSynchDb = (row: CodegenTableVO) => { |
| 103 | 103 | message.success('同步成功') |
| 104 | 104 | }) |
| 105 | 105 | } |
| 106 | + | |
| 106 | 107 | // 生成代码操作 |
| 107 | 108 | const handleGenTable = async (row: CodegenTableVO) => { |
| 108 | 109 | const res = await CodegenApi.downloadCodegenApi(row.id) |
| 109 | 110 | download.zip(res, 'codegen-' + row.className + '.zip') |
| 110 | 111 | } |
| 111 | -// 删除操作 | |
| 112 | -const handleDelete = async (rowId: number) => { | |
| 113 | - await deleteData(rowId) | |
| 114 | -} | |
| 115 | -// 查询操作 | |
| 116 | -const handleQuery = async () => { | |
| 117 | - await reload() | |
| 118 | -} | |
| 119 | 112 | </script> | ... | ... |
yudao-ui-admin-vue3/src/views/infra/config/index.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | preIcon="ep:download" |
| 18 | 18 | :title="t('action.export')" |
| 19 | 19 | v-hasPermi="['infra:config:export']" |
| 20 | - @click="handleExport()" | |
| 20 | + @click="exportList('配置.xls')" | |
| 21 | 21 | /> |
| 22 | 22 | </template> |
| 23 | 23 | <template #visible_default="{ row }"> |
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | preIcon="ep:delete" |
| 44 | 44 | :title="t('action.del')" |
| 45 | 45 | v-hasPermi="['infra:config:delete']" |
| 46 | - @click="handleDelete(row.id)" | |
| 46 | + @click="deleteData(row.id)" | |
| 47 | 47 | /> |
| 48 | 48 | </template> |
| 49 | 49 | </XTable> |
| ... | ... | @@ -123,11 +123,6 @@ const handleCreate = () => { |
| 123 | 123 | setDialogTile('create') |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | -// 导出操作 | |
| 127 | -const handleExport = async () => { | |
| 128 | - await exportList('配置.xls') | |
| 129 | -} | |
| 130 | - | |
| 131 | 126 | // 修改操作 |
| 132 | 127 | const handleUpdate = async (rowId: number) => { |
| 133 | 128 | setDialogTile('update') |
| ... | ... | @@ -143,11 +138,6 @@ const handleDetail = async (rowId: number) => { |
| 143 | 138 | detailData.value = res |
| 144 | 139 | } |
| 145 | 140 | |
| 146 | -// 删除操作 | |
| 147 | -const handleDelete = async (rowId: number) => { | |
| 148 | - await deleteData(rowId) | |
| 149 | -} | |
| 150 | - | |
| 151 | 141 | // 提交按钮 |
| 152 | 142 | const submitForm = async () => { |
| 153 | 143 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/infra/dataSourceConfig/index.vue
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | preIcon="ep:delete" |
| 32 | 32 | :title="t('action.del')" |
| 33 | 33 | v-hasPermi="['infra:data-source-config:delete']" |
| 34 | - @click="handleDelete(row.id)" | |
| 34 | + @click="deleteData(row.id)" | |
| 35 | 35 | /> |
| 36 | 36 | </template> |
| 37 | 37 | </XTable> |
| ... | ... | @@ -121,11 +121,6 @@ const handleDetail = async (rowId: number) => { |
| 121 | 121 | setDialogTile('detail') |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | -// 删除操作 | |
| 125 | -const handleDelete = async (rowId: number) => { | |
| 126 | - await deleteData(rowId) | |
| 127 | -} | |
| 128 | - | |
| 129 | 124 | // 提交按钮 |
| 130 | 125 | const submitForm = async () => { |
| 131 | 126 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | preIcon="ep:delete" |
| 42 | 42 | :title="t('action.del')" |
| 43 | 43 | v-hasPermi="['infra:file-config:delete']" |
| 44 | - @click="handleDelete(row.id)" | |
| 44 | + @click="deleteData(row.id)" | |
| 45 | 45 | /> |
| 46 | 46 | </template> |
| 47 | 47 | </XTable> |
| ... | ... | @@ -283,11 +283,6 @@ const handleTest = async (rowId: number) => { |
| 283 | 283 | message.alert('测试通过,上传文件成功!访问地址:' + res) |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | -// 删除操作 | |
| 287 | -const handleDelete = async (rowId: number) => { | |
| 288 | - await deleteData(rowId) | |
| 289 | -} | |
| 290 | - | |
| 291 | 286 | // 提交按钮 |
| 292 | 287 | const submitForm = async (formEl: FormInstance | undefined) => { |
| 293 | 288 | if (!formEl) return | ... | ... |
yudao-ui-admin-vue3/src/views/infra/fileList/index.vue
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | preIcon="ep:delete" |
| 22 | 22 | :title="t('action.del')" |
| 23 | 23 | v-hasPermi="['infra:file:delete']" |
| 24 | - @click="handleDelete(row.id)" | |
| 24 | + @click="deleteData(row.id)" | |
| 25 | 25 | /> |
| 26 | 26 | </template> |
| 27 | 27 | </XTable> |
| ... | ... | @@ -162,11 +162,6 @@ const handleDetail = (row: FileApi.FileVO) => { |
| 162 | 162 | dialogVisible.value = true |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | -// 删除操作 | |
| 166 | -const handleDelete = async (rowId: number) => { | |
| 167 | - await deleteData(rowId) | |
| 168 | -} | |
| 169 | - | |
| 170 | 165 | // ========== 复制相关 ========== |
| 171 | 166 | const handleCopy = async (text: string) => { |
| 172 | 167 | const { copy, copied, isSupported } = useClipboard({ source: text }) | ... | ... |
yudao-ui-admin-vue3/src/views/infra/job/JobLog.vue
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | preIcon="ep:download" |
| 9 | 9 | :title="t('action.export')" |
| 10 | 10 | v-hasPermi="['infra:job:export']" |
| 11 | - @click="handleExport()" | |
| 11 | + @click="exportList('定时任务详情.xls')" | |
| 12 | 12 | /> |
| 13 | 13 | </template> |
| 14 | 14 | <template #beginTime_default="{ row }"> |
| ... | ... | @@ -77,8 +77,4 @@ const handleDetail = async (row: JobLogApi.JobLogVO) => { |
| 77 | 77 | dialogTitle.value = t('action.detail') |
| 78 | 78 | dialogVisible.value = true |
| 79 | 79 | } |
| 80 | -// 导出操作 | |
| 81 | -const handleExport = async () => { | |
| 82 | - await exportList('定时任务详情.xls') | |
| 83 | -} | |
| 84 | 80 | </script> | ... | ... |
yudao-ui-admin-vue3/src/views/infra/job/index.vue
| ... | ... | @@ -17,14 +17,14 @@ |
| 17 | 17 | preIcon="ep:download" |
| 18 | 18 | :title="t('action.export')" |
| 19 | 19 | v-hasPermi="['infra:job:export']" |
| 20 | - @click="handleExport()" | |
| 20 | + @click="exportList('定时任务.xls')" | |
| 21 | 21 | /> |
| 22 | 22 | <XButton |
| 23 | 23 | type="info" |
| 24 | 24 | preIcon="ep:zoom-in" |
| 25 | 25 | title="执行日志" |
| 26 | 26 | v-hasPermi="['infra:job:query']" |
| 27 | - @click="handleJobLog" | |
| 27 | + @click="handleJobLog()" | |
| 28 | 28 | /> |
| 29 | 29 | </template> |
| 30 | 30 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | preIcon="ep:delete" |
| 47 | 47 | :title="t('action.del')" |
| 48 | 48 | v-hasPermi="['infra:job:delete']" |
| 49 | - @click="handleDelete(row.id)" | |
| 49 | + @click="deleteData(row.id)" | |
| 50 | 50 | /> |
| 51 | 51 | <el-dropdown class="p-0.5" v-hasPermi="['infra:job:trigger', 'infra:job:query']"> |
| 52 | 52 | <XTextButton :title="t('action.more')" postIcon="ep:arrow-down" /> |
| ... | ... | @@ -179,11 +179,6 @@ const handleCreate = () => { |
| 179 | 179 | setDialogTile('create') |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | -// 导出操作 | |
| 183 | -const handleExport = async () => { | |
| 184 | - await exportList('定时任务.xls') | |
| 185 | -} | |
| 186 | - | |
| 187 | 182 | // 修改操作 |
| 188 | 183 | const handleUpdate = async (rowId: number) => { |
| 189 | 184 | setDialogTile('update') |
| ... | ... | @@ -248,10 +243,6 @@ const parseTime = (time) => { |
| 248 | 243 | return time_str |
| 249 | 244 | } |
| 250 | 245 | |
| 251 | -// 删除操作 | |
| 252 | -const handleDelete = async (rowId: number) => { | |
| 253 | - await deleteData(rowId) | |
| 254 | -} | |
| 255 | 246 | const handleChangeStatus = async (row: JobApi.JobVO) => { |
| 256 | 247 | const text = row.status === InfraJobStatusEnum.STOP ? '开启' : '关闭' |
| 257 | 248 | const status = |
| ... | ... | @@ -275,7 +266,7 @@ const handleChangeStatus = async (row: JobApi.JobVO) => { |
| 275 | 266 | }) |
| 276 | 267 | } |
| 277 | 268 | // 执行日志 |
| 278 | -const handleJobLog = (rowId: number) => { | |
| 269 | +const handleJobLog = (rowId?: number) => { | |
| 279 | 270 | if (rowId) { |
| 280 | 271 | push('/job/job-log?id=' + rowId) |
| 281 | 272 | } else { | ... | ... |
yudao-ui-admin-vue3/src/views/pay/app/index.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | preIcon="ep:download" |
| 18 | 18 | :title="t('action.export')" |
| 19 | 19 | v-hasPermi="['pay:app:export']" |
| 20 | - @click="handleExport()" | |
| 20 | + @click="exportList('应用信息.xls')" | |
| 21 | 21 | /> |
| 22 | 22 | </template> |
| 23 | 23 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | preIcon="ep:delete" |
| 41 | 41 | :title="t('action.del')" |
| 42 | 42 | v-hasPermi="['pay:app:delete']" |
| 43 | - @click="handleDelete(row.id)" | |
| 43 | + @click="deleteData(row.id)" | |
| 44 | 44 | /> |
| 45 | 45 | </template> |
| 46 | 46 | </XTable> |
| ... | ... | @@ -115,11 +115,6 @@ const handleCreate = () => { |
| 115 | 115 | setDialogTile('create') |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | -// 导出操作 | |
| 119 | -const handleExport = async () => { | |
| 120 | - await exportList('应用信息.xls') | |
| 121 | -} | |
| 122 | - | |
| 123 | 118 | // 修改操作 |
| 124 | 119 | const handleUpdate = async (rowId: number) => { |
| 125 | 120 | setDialogTile('update') |
| ... | ... | @@ -135,11 +130,6 @@ const handleDetail = async (rowId: number) => { |
| 135 | 130 | detailData.value = res |
| 136 | 131 | } |
| 137 | 132 | |
| 138 | -// 删除操作 | |
| 139 | -const handleDelete = async (rowId: number) => { | |
| 140 | - await deleteData(rowId) | |
| 141 | -} | |
| 142 | - | |
| 143 | 133 | // 提交按钮 |
| 144 | 134 | const submitForm = async () => { |
| 145 | 135 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/pay/merchant/index.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | preIcon="ep:download" |
| 18 | 18 | :title="t('action.export')" |
| 19 | 19 | v-hasPermi="['pay:merchant:export']" |
| 20 | - @click="handleExport()" | |
| 20 | + @click="exportList('商户列表.xls')" | |
| 21 | 21 | /> |
| 22 | 22 | </template> |
| 23 | 23 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | preIcon="ep:delete" |
| 41 | 41 | :title="t('action.del')" |
| 42 | 42 | v-hasPermi="['pay:merchant:delete']" |
| 43 | - @click="handleDelete(row.id)" | |
| 43 | + @click="deleteData(row.id)" | |
| 44 | 44 | /> |
| 45 | 45 | </template> |
| 46 | 46 | </XTable> |
| ... | ... | @@ -113,11 +113,6 @@ const handleCreate = () => { |
| 113 | 113 | setDialogTile('create') |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | -// 导出操作 | |
| 117 | -const handleExport = async () => { | |
| 118 | - await exportList('商户列表.xls') | |
| 119 | -} | |
| 120 | - | |
| 121 | 116 | // 修改操作 |
| 122 | 117 | const handleUpdate = async (rowId: number) => { |
| 123 | 118 | setDialogTile('update') |
| ... | ... | @@ -133,11 +128,6 @@ const handleDetail = async (rowId: number) => { |
| 133 | 128 | detailData.value = res |
| 134 | 129 | } |
| 135 | 130 | |
| 136 | -// 删除操作 | |
| 137 | -const handleDelete = async (rowId: number) => { | |
| 138 | - await deleteData(rowId) | |
| 139 | -} | |
| 140 | - | |
| 141 | 131 | // 提交按钮 |
| 142 | 132 | const submitForm = async () => { |
| 143 | 133 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/pay/order/index.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | preIcon="ep:download" |
| 18 | 18 | :title="t('action.export')" |
| 19 | 19 | v-hasPermi="['pay:order:export']" |
| 20 | - @click="handleExport()" | |
| 20 | + @click="exportList('订单数据.xls')" | |
| 21 | 21 | /> |
| 22 | 22 | </template> |
| 23 | 23 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -72,10 +72,6 @@ const setDialogTile = (type: string) => { |
| 72 | 72 | const handleCreate = () => { |
| 73 | 73 | setDialogTile('create') |
| 74 | 74 | } |
| 75 | -// 导出操作 | |
| 76 | -const handleExport = async () => { | |
| 77 | - await exportList('订单数据.xls') | |
| 78 | -} | |
| 79 | 75 | |
| 80 | 76 | // 详情操作 |
| 81 | 77 | const handleDetail = async (rowId: number) => { | ... | ... |
yudao-ui-admin-vue3/src/views/pay/refund/index.vue
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | preIcon="ep:download" |
| 10 | 10 | :title="t('action.export')" |
| 11 | 11 | v-hasPermi="['pay:refund:export']" |
| 12 | - @click="handleExport()" | |
| 12 | + @click="exportList('退款订单.xls')" | |
| 13 | 13 | /> |
| 14 | 14 | </template> |
| 15 | 15 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -49,11 +49,6 @@ const [registerTable, { exportList }] = useXTable({ |
| 49 | 49 | exportListApi: RefundApi.exportRefundApi |
| 50 | 50 | }) |
| 51 | 51 | |
| 52 | -// 导出操作 | |
| 53 | -const handleExport = async () => { | |
| 54 | - await exportList('退款订单.xls') | |
| 55 | -} | |
| 56 | - | |
| 57 | 52 | // ========== CRUD 相关 ========== |
| 58 | 53 | const dialogVisible = ref(false) // 是否显示弹出层 |
| 59 | 54 | const detailData = ref() // 详情 Ref | ... | ... |
yudao-ui-admin-vue3/src/views/system/dept/index.vue
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | preIcon="ep:delete" |
| 31 | 31 | :title="t('action.del')" |
| 32 | 32 | v-hasPermi="['system:dept:delete']" |
| 33 | - @click="handleDelete(row.id)" | |
| 33 | + @click="deleteData(row.id)" | |
| 34 | 34 | /> |
| 35 | 35 | </template> |
| 36 | 36 | </XTable> |
| ... | ... | @@ -173,11 +173,6 @@ const submitForm = async () => { |
| 173 | 173 | }) |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | -// 删除操作 | |
| 177 | -const handleDelete = async (rowId: number) => { | |
| 178 | - await deleteData(rowId) | |
| 179 | -} | |
| 180 | - | |
| 181 | 176 | const userNicknameFormat = (row) => { |
| 182 | 177 | if (!row || !row.leaderUserId) { |
| 183 | 178 | return '未设置' | ... | ... |
yudao-ui-admin-vue3/src/views/system/dict/index.vue
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | preIcon="ep:delete" |
| 32 | 32 | :title="t('action.del')" |
| 33 | 33 | v-hasPermi="['system:dict:delete']" |
| 34 | - @click="handleTypeDelete(row.id)" | |
| 34 | + @click="typeDeleteData(row.id)" | |
| 35 | 35 | /> |
| 36 | 36 | </template> |
| 37 | 37 | </XTable> |
| ... | ... | @@ -74,7 +74,7 @@ |
| 74 | 74 | v-hasPermi="['system:dict:delete']" |
| 75 | 75 | preIcon="ep:delete" |
| 76 | 76 | :title="t('action.del')" |
| 77 | - @click="handleDataDelete(row.id)" | |
| 77 | + @click="dataDeleteData(row.id)" | |
| 78 | 78 | /> |
| 79 | 79 | </template> |
| 80 | 80 | </XTable> |
| ... | ... | @@ -202,15 +202,6 @@ const setDialogTile = (type: string) => { |
| 202 | 202 | dialogVisible.value = true |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | -// 删除操作 | |
| 206 | -const handleTypeDelete = async (rowId: number) => { | |
| 207 | - await typeDeleteData(rowId) | |
| 208 | -} | |
| 209 | - | |
| 210 | -const handleDataDelete = async (rowId: number) => { | |
| 211 | - await dataDeleteData(rowId) | |
| 212 | -} | |
| 213 | - | |
| 214 | 205 | // 提交按钮 |
| 215 | 206 | const submitTypeForm = async () => { |
| 216 | 207 | const elForm = unref(typeFormRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/errorCode/index.vue
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | preIcon="ep:delete" |
| 33 | 33 | :title="t('action.del')" |
| 34 | 34 | v-hasPermi="['system:error-code:delete']" |
| 35 | - @click="handleDelete(row.id)" | |
| 35 | + @click="deleteData(row.id)" | |
| 36 | 36 | /> |
| 37 | 37 | </template> |
| 38 | 38 | </XTable> |
| ... | ... | @@ -121,11 +121,6 @@ const handleDetail = async (rowId: number) => { |
| 121 | 121 | detailData.value = res |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | -// 删除操作 | |
| 125 | -const handleDelete = async (rowId: number) => { | |
| 126 | - await deleteData(rowId) | |
| 127 | -} | |
| 128 | - | |
| 129 | 124 | // 提交新增/修改的表单 |
| 130 | 125 | const submitForm = async () => { |
| 131 | 126 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/loginlog/index.vue
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | type="warning" |
| 9 | 9 | preIcon="ep:download" |
| 10 | 10 | :title="t('action.export')" |
| 11 | - @click="handleExport()" | |
| 11 | + @click="exportList('登录列表.xls')" | |
| 12 | 12 | /> |
| 13 | 13 | </template> |
| 14 | 14 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -54,9 +54,4 @@ const handleDetail = async (row: LoginLogVO) => { |
| 54 | 54 | detailData.value = row |
| 55 | 55 | dialogVisible.value = true |
| 56 | 56 | } |
| 57 | - | |
| 58 | -// 导出操作 | |
| 59 | -const handleExport = async () => { | |
| 60 | - await exportList('登录列表.xls') | |
| 61 | -} | |
| 62 | 57 | </script> | ... | ... |
yudao-ui-admin-vue3/src/views/system/menu/index.vue
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | preIcon="ep:delete" |
| 32 | 32 | :title="t('action.del')" |
| 33 | 33 | v-hasPermi="['system:menu:delete']" |
| 34 | - @click="handleDelete(row.id)" | |
| 34 | + @click="deleteData(row.id)" | |
| 35 | 35 | /> |
| 36 | 36 | </template> |
| 37 | 37 | </XTable> |
| ... | ... | @@ -334,10 +334,4 @@ const submitForm = async () => { |
| 334 | 334 | const isExternal = (path: string) => { |
| 335 | 335 | return /^(https?:|mailto:|tel:)/.test(path) |
| 336 | 336 | } |
| 337 | - | |
| 338 | -// ========== 删除 ========== | |
| 339 | -// 删除操作 | |
| 340 | -const handleDelete = async (rowId: number) => { | |
| 341 | - await deleteData(rowId) | |
| 342 | -} | |
| 343 | 337 | </script> | ... | ... |
yudao-ui-admin-vue3/src/views/system/notice/index.vue
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | preIcon="ep:delete" |
| 33 | 33 | :title="t('action.del')" |
| 34 | 34 | v-hasPermi="['system:notice:delete']" |
| 35 | - @click="handleDelete(row.id)" | |
| 35 | + @click="deleteData(row.id)" | |
| 36 | 36 | /> |
| 37 | 37 | </template> |
| 38 | 38 | </XTable> |
| ... | ... | @@ -126,11 +126,6 @@ const handleDetail = async (rowId: number) => { |
| 126 | 126 | detailData.value = res |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | -// 删除操作 | |
| 130 | -const handleDelete = async (rowId: number) => { | |
| 131 | - await deleteData(rowId) | |
| 132 | -} | |
| 133 | - | |
| 134 | 129 | // 提交新增/修改的表单 |
| 135 | 130 | const submitForm = async () => { |
| 136 | 131 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | preIcon="ep:delete" |
| 49 | 49 | :title="t('action.del')" |
| 50 | 50 | v-hasPermi="['system:oauth2-client:delete']" |
| 51 | - @click="handleDelete(row.id)" | |
| 51 | + @click="deleteData(row.id)" | |
| 52 | 52 | /> |
| 53 | 53 | </template> |
| 54 | 54 | </XTable> |
| ... | ... | @@ -184,11 +184,6 @@ const handleDetail = async (rowId: number) => { |
| 184 | 184 | detailData.value = res |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | -// 删除操作 | |
| 188 | -const handleDelete = async (rowId: number) => { | |
| 189 | - await deleteData(rowId) | |
| 190 | -} | |
| 191 | - | |
| 192 | 187 | // 提交新增/修改的表单 |
| 193 | 188 | const submitForm = async () => { |
| 194 | 189 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/oauth2/token/index.vue
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <template #actionbtns_default="{ row }"> |
| 6 | 6 | <!-- 操作:详情 --> |
| 7 | 7 | <XTextButton preIcon="ep:view" :title="t('action.detail')" @click="handleDetail(row)" /> |
| 8 | - <!-- 操作:删除 --> | |
| 8 | + <!-- 操作:登出 --> | |
| 9 | 9 | <XTextButton |
| 10 | 10 | preIcon="ep:delete" |
| 11 | 11 | :title="t('action.logout')" | ... | ... |
yudao-ui-admin-vue3/src/views/system/operatelog/index.vue
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | preIcon="ep:download" |
| 10 | 10 | :title="t('action.export')" |
| 11 | 11 | v-hasPermi="['system:operate-log:export']" |
| 12 | - @click="handleExport()" | |
| 12 | + @click="exportList('操作日志.xls')" | |
| 13 | 13 | /> |
| 14 | 14 | </template> |
| 15 | 15 | <template #duration="{ row }"> |
| ... | ... | @@ -68,9 +68,4 @@ const handleDetail = (row: OperateLogApi.OperateLogVO) => { |
| 68 | 68 | detailData.value = row |
| 69 | 69 | dialogVisible.value = true |
| 70 | 70 | } |
| 71 | - | |
| 72 | -// 导出操作 | |
| 73 | -const handleExport = async () => { | |
| 74 | - await exportList('操作日志.xls') | |
| 75 | -} | |
| 76 | 71 | </script> | ... | ... |
yudao-ui-admin-vue3/src/views/system/post/index.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | preIcon="ep:download" |
| 18 | 18 | :title="t('action.export')" |
| 19 | 19 | v-hasPermi="['system:post:export']" |
| 20 | - @click="handleExport()" | |
| 20 | + @click="exportList('岗位列表.xls')" | |
| 21 | 21 | /> |
| 22 | 22 | </template> |
| 23 | 23 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | preIcon="ep:delete" |
| 41 | 41 | :title="t('action.del')" |
| 42 | 42 | v-hasPermi="['system:post:delete']" |
| 43 | - @click="handleDelete(row.id)" | |
| 43 | + @click="deleteData(row.id)" | |
| 44 | 44 | /> |
| 45 | 45 | </template> |
| 46 | 46 | </XTable> |
| ... | ... | @@ -117,11 +117,6 @@ const handleCreate = () => { |
| 117 | 117 | modelLoading.value = false |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | -// 导出操作 | |
| 121 | -const handleExport = async () => { | |
| 122 | - await exportList('岗位列表.xls') | |
| 123 | -} | |
| 124 | - | |
| 125 | 120 | // 修改操作 |
| 126 | 121 | const handleUpdate = async (rowId: number) => { |
| 127 | 122 | setDialogTile('update') |
| ... | ... | @@ -139,11 +134,6 @@ const handleDetail = async (rowId: number) => { |
| 139 | 134 | modelLoading.value = false |
| 140 | 135 | } |
| 141 | 136 | |
| 142 | -// 删除操作 | |
| 143 | -const handleDelete = async (rowId: number) => { | |
| 144 | - await deleteData(rowId) | |
| 145 | -} | |
| 146 | - | |
| 147 | 137 | // 提交新增/修改的表单 |
| 148 | 138 | const submitForm = async () => { |
| 149 | 139 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/role/index.vue
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | preIcon="ep:delete" |
| 47 | 47 | :title="t('action.del')" |
| 48 | 48 | v-hasPermi="['system:role:delete']" |
| 49 | - @click="handleDelete(row.id)" | |
| 49 | + @click="deleteData(row.id)" | |
| 50 | 50 | /> |
| 51 | 51 | </template> |
| 52 | 52 | </XTable> |
| ... | ... | @@ -217,11 +217,6 @@ const handleDetail = async (rowId: number) => { |
| 217 | 217 | detailData.value = res |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | -// 删除操作 | |
| 221 | -const handleDelete = async (rowId: number) => { | |
| 222 | - await deleteData(rowId) | |
| 223 | -} | |
| 224 | - | |
| 225 | 220 | // 提交按钮 |
| 226 | 221 | const submitForm = async () => { |
| 227 | 222 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | preIcon="ep:download" |
| 18 | 18 | :title="t('action.export')" |
| 19 | 19 | v-hasPermi="['system:sensitive-word:export']" |
| 20 | - @click="handleExport()" | |
| 20 | + @click="exportList('敏感词数据.xls')" | |
| 21 | 21 | /> |
| 22 | 22 | </template> |
| 23 | 23 | <template #tags_default="{ row }"> |
| ... | ... | @@ -50,7 +50,7 @@ |
| 50 | 50 | preIcon="ep:delete" |
| 51 | 51 | :title="t('action.del')" |
| 52 | 52 | v-hasPermi="['system:sensitive-word:delete']" |
| 53 | - @click="handleDelete(row.id)" | |
| 53 | + @click="deleteData(row.id)" | |
| 54 | 54 | /> |
| 55 | 55 | </template> |
| 56 | 56 | </XTable> |
| ... | ... | @@ -147,11 +147,6 @@ const handleCreate = () => { |
| 147 | 147 | setDialogTile('create') |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | -// 导出操作 | |
| 151 | -const handleExport = async () => { | |
| 152 | - await exportList('敏感词数据.xls') | |
| 153 | -} | |
| 154 | - | |
| 155 | 150 | // 修改操作 |
| 156 | 151 | const handleUpdate = async (rowId: number) => { |
| 157 | 152 | setDialogTile('update') |
| ... | ... | @@ -167,11 +162,6 @@ const handleDetail = async (rowId: number) => { |
| 167 | 162 | detailData.value = res |
| 168 | 163 | } |
| 169 | 164 | |
| 170 | -// 删除操作 | |
| 171 | -const handleDelete = async (rowId: number) => { | |
| 172 | - await deleteData(rowId) | |
| 173 | -} | |
| 174 | - | |
| 175 | 165 | // 提交按钮 |
| 176 | 166 | const submitForm = async () => { |
| 177 | 167 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/sms/smsChannel/index.vue
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | preIcon="ep:delete" |
| 33 | 33 | :title="t('action.del')" |
| 34 | 34 | v-hasPermi="['system:sms-channel:delete']" |
| 35 | - @click="handleDelete(row.id)" | |
| 35 | + @click="deleteData(row.id)" | |
| 36 | 36 | /> |
| 37 | 37 | </template> |
| 38 | 38 | </XTable> |
| ... | ... | @@ -123,11 +123,6 @@ const handleDetail = async (rowId: number) => { |
| 123 | 123 | detailData.value = res |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | -// 删除操作 | |
| 127 | -const handleDelete = async (rowId: number) => { | |
| 128 | - await deleteData(rowId) | |
| 129 | -} | |
| 130 | - | |
| 131 | 126 | // 提交按钮 |
| 132 | 127 | const submitForm = async () => { |
| 133 | 128 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/sms/smsLog/index.vue
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | type="warning" |
| 9 | 9 | preIcon="ep:download" |
| 10 | 10 | :title="t('action.export')" |
| 11 | - @click="handleExport()" | |
| 11 | + @click="exportList('短信日志.xls')" | |
| 12 | 12 | /> |
| 13 | 13 | </template> |
| 14 | 14 | <template #actionbtns_default="{ row }"> |
| ... | ... | @@ -57,9 +57,4 @@ const handleDetail = (row: SmsLoglApi.SmsLogVO) => { |
| 57 | 57 | detailData.value = row |
| 58 | 58 | dialogVisible.value = true |
| 59 | 59 | } |
| 60 | - | |
| 61 | -// 导出操作 | |
| 62 | -const handleExport = async () => { | |
| 63 | - await exportList('短信日志.xls') | |
| 64 | -} | |
| 65 | 60 | </script> | ... | ... |
yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | preIcon="ep:delete" |
| 39 | 39 | :title="t('action.del')" |
| 40 | 40 | v-hasPermi="['system:sms-template:delete']" |
| 41 | - @click="handleDelete(row.id)" | |
| 41 | + @click="deleteData(row.id)" | |
| 42 | 42 | /> |
| 43 | 43 | </template> |
| 44 | 44 | </XTable> |
| ... | ... | @@ -166,11 +166,6 @@ const handleDetail = async (rowId: number) => { |
| 166 | 166 | detailData.value = res |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | -// 删除操作 | |
| 170 | -const handleDelete = async (rowId: number) => { | |
| 171 | - await deleteData(rowId) | |
| 172 | -} | |
| 173 | - | |
| 174 | 169 | // 提交按钮 |
| 175 | 170 | const submitForm = async () => { |
| 176 | 171 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/tenant/index.vue
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | preIcon="ep:download" |
| 17 | 17 | :title="t('action.export')" |
| 18 | 18 | v-hasPermi="['system:tenant:export']" |
| 19 | - @click="handleExport()" | |
| 19 | + @click="exportList('租户列表.xls')" | |
| 20 | 20 | /> |
| 21 | 21 | </template> |
| 22 | 22 | <template #accountCount_default="{ row }"> |
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | preIcon="ep:delete" |
| 47 | 47 | :title="t('action.del')" |
| 48 | 48 | v-hasPermi="['system:tenant:delete']" |
| 49 | - @click="handleDelete(row.id)" | |
| 49 | + @click="deleteData(row.id)" | |
| 50 | 50 | /> |
| 51 | 51 | </template> |
| 52 | 52 | </XTable> |
| ... | ... | @@ -149,16 +149,6 @@ const handleDetail = async (rowId: number) => { |
| 149 | 149 | setDialogTile('detail') |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | -// 删除操作 | |
| 153 | -const handleDelete = async (rowId: number) => { | |
| 154 | - await deleteData(rowId) | |
| 155 | -} | |
| 156 | - | |
| 157 | -// 导出操作 | |
| 158 | -const handleExport = async () => { | |
| 159 | - await exportList('租户列表.xls') | |
| 160 | -} | |
| 161 | - | |
| 162 | 152 | // 提交按钮 |
| 163 | 153 | const submitForm = async () => { |
| 164 | 154 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | </template> |
| 13 | 13 | <template #actionbtns_default="{ row }"> |
| 14 | 14 | <XTextButton preIcon="ep:edit" :title="t('action.edit')" @click="handleUpdate(row.id)" /> |
| 15 | - <XTextButton preIcon="ep:delete" :title="t('action.del')" @click="handleDelete(row.id)" /> | |
| 15 | + <XTextButton preIcon="ep:delete" :title="t('action.del')" @click="deleteData(row.id)" /> | |
| 16 | 16 | </template> |
| 17 | 17 | </XTable> |
| 18 | 18 | </ContentWrap> |
| ... | ... | @@ -132,11 +132,6 @@ const handleUpdate = async (rowId: number) => { |
| 132 | 132 | unref(treeRef)?.setCheckedKeys(res.menuIds) |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | -// 删除操作 | |
| 136 | -const handleDelete = async (rowId: number) => { | |
| 137 | - await deleteData(rowId) | |
| 138 | -} | |
| 139 | - | |
| 140 | 135 | // 提交按钮 |
| 141 | 136 | const submitForm = async () => { |
| 142 | 137 | const elForm = unref(formRef)?.getElFormRef() | ... | ... |
yudao-ui-admin-vue3/src/views/system/user/index.vue
| ... | ... | @@ -112,7 +112,7 @@ |
| 112 | 112 | preIcon="ep:delete" |
| 113 | 113 | :title="t('action.del')" |
| 114 | 114 | v-hasPermi="['system:user:delete']" |
| 115 | - @click="handleDelete(row.id)" | |
| 115 | + @click="deleteData(row.id)" | |
| 116 | 116 | /> |
| 117 | 117 | </el-dropdown-item> |
| 118 | 118 | </el-dropdown-menu> |
| ... | ... | @@ -405,10 +405,7 @@ const handleDetail = async (rowId: number) => { |
| 405 | 405 | detailData.value = res |
| 406 | 406 | await setDialogTile('detail') |
| 407 | 407 | } |
| 408 | -// 删除操作 | |
| 409 | -const handleDelete = async (rowId: number) => { | |
| 410 | - await deleteData(rowId) | |
| 411 | -} | |
| 408 | + | |
| 412 | 409 | // 提交按钮 |
| 413 | 410 | const submitForm = async () => { |
| 414 | 411 | loading.value = true | ... | ... |