Commit ed7e3338f8c4517c6ca8041acff5b86a20060c97

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