Commit e16f8abc3ae59c03c942b188fcc8e37b8ba01037

Authored by xingyu
1 parent 4825e3a2

refactor:vue3 export function

yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm
@@ -19,11 +19,6 @@ @@ -19,11 +19,6 @@
19 }) 19 })
20 const { getList, setSearchParams, delList, exportList } = methods 20 const { getList, setSearchParams, delList, exportList } = methods
21 21
22 - // 导出操作  
23 - const handleExport = async () => {  
24 - await exportList('数据.xls')  
25 - }  
26 -  
27 // ========== CRUD 相关 ========== 22 // ========== CRUD 相关 ==========
28 const actionLoading = ref(false) // 遮罩层 23 const actionLoading = ref(false) // 遮罩层
29 const actionType = ref('') // 操作按钮的类型 24 const actionType = ref('') // 操作按钮的类型
@@ -103,7 +98,7 @@ @@ -103,7 +98,7 @@
103 type="warning" 98 type="warning"
104 v-hasPermi="['${permissionPrefix}:export']" 99 v-hasPermi="['${permissionPrefix}:export']"
105 :loading="tableObject.exportLoading" 100 :loading="tableObject.exportLoading"
106 - @click="handleExport" 101 + @click="exportList('数据.xls')"
107 > 102 >
108 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 103 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
109 </el-button> 104 </el-button>
yudao-ui-admin-vue3/src/views/infra/apiErrorLog/index.vue
@@ -23,10 +23,6 @@ const { getList, setSearchParams, exportList } = methods @@ -23,10 +23,6 @@ const { getList, setSearchParams, exportList } = methods
23 const detailRef = ref() // 详情 Ref 23 const detailRef = ref() // 详情 Ref
24 const dialogVisible = ref(false) // 是否显示弹出层 24 const dialogVisible = ref(false) // 是否显示弹出层
25 const dialogTitle = ref('') // 弹出层标题 25 const dialogTitle = ref('') // 弹出层标题
26 -// 导出操作  
27 -const handleExport = async () => {  
28 - await exportList('错误数据.xls')  
29 -}  
30 26
31 // 详情操作 27 // 详情操作
32 const handleDetail = (row: ApiErrorLogVO) => { 28 const handleDetail = (row: ApiErrorLogVO) => {
@@ -57,7 +53,7 @@ getList() @@ -57,7 +53,7 @@ getList()
57 <Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> 53 <Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
58 </ContentWrap> 54 </ContentWrap>
59 <ContentWrap> 55 <ContentWrap>
60 - <el-button v-hasPermi="['infra:api-error-log:export']" @click="handleExport"> 56 + <el-button v-hasPermi="['infra:api-error-log:export']" @click="exportList('错误数据.xls')">
61 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 57 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
62 </el-button> 58 </el-button>
63 <!-- 列表 --> 59 <!-- 列表 -->
yudao-ui-admin-vue3/src/views/infra/config/index.vue
@@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;ConfigVO&gt;({ @@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;ConfigVO&gt;({
19 }) 19 })
20 const { getList, setSearchParams, delList, exportList } = methods 20 const { getList, setSearchParams, delList, exportList } = methods
21 21
22 -// 导出操作  
23 -const handleExport = async () => {  
24 - await exportList('参数配置.xls')  
25 -}  
26 -  
27 // ========== CRUD 相关 ========== 22 // ========== CRUD 相关 ==========
28 const actionLoading = ref(false) // 遮罩层 23 const actionLoading = ref(false) // 遮罩层
29 const actionType = ref('') // 操作按钮的类型 24 const actionType = ref('') // 操作按钮的类型
@@ -103,7 +98,7 @@ getList() @@ -103,7 +98,7 @@ getList()
103 type="warning" 98 type="warning"
104 v-hasPermi="['infra:config:export']" 99 v-hasPermi="['infra:config:export']"
105 :loading="tableObject.exportLoading" 100 :loading="tableObject.exportLoading"
106 - @click="handleExport" 101 + @click="exportList('参数配置.xls')"
107 > 102 >
108 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 103 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
109 </el-button> 104 </el-button>
yudao-ui-admin-vue3/src/views/infra/job/JobLog.vue
@@ -25,10 +25,6 @@ const getTableList = async () =&gt; { @@ -25,10 +25,6 @@ const getTableList = async () =&gt; {
25 } 25 }
26 await getList() 26 await getList()
27 } 27 }
28 -// 导出操作  
29 -const handleExport = async () => {  
30 - await exportList('定时任务日志.xls')  
31 -}  
32 28
33 // ========== CRUD 相关 ========== 29 // ========== CRUD 相关 ==========
34 const dialogVisible = ref(false) // 是否显示弹出层 30 const dialogVisible = ref(false) // 是否显示弹出层
@@ -63,7 +59,7 @@ onMounted(() =&gt; { @@ -63,7 +59,7 @@ onMounted(() =&gt; {
63 type="warning" 59 type="warning"
64 v-hasPermi="['infra:job:export']" 60 v-hasPermi="['infra:job:export']"
65 :loading="tableObject.exportLoading" 61 :loading="tableObject.exportLoading"
66 - @click="handleExport" 62 + @click="exportList('定时任务日志.xls')"
67 > 63 >
68 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 64 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
69 </el-button> 65 </el-button>
yudao-ui-admin-vue3/src/views/infra/job/index.vue
@@ -22,11 +22,6 @@ const { register, tableObject, methods } = useTable&lt;JobVO&gt;({ @@ -22,11 +22,6 @@ const { register, tableObject, methods } = useTable&lt;JobVO&gt;({
22 }) 22 })
23 const { getList, setSearchParams, delList, exportList } = methods 23 const { getList, setSearchParams, delList, exportList } = methods
24 24
25 -// 导出操作  
26 -const handleExport = async () => {  
27 - await exportList('定时任务.xls')  
28 -}  
29 -  
30 // ========== CRUD 相关 ========== 25 // ========== CRUD 相关 ==========
31 const actionLoading = ref(false) // 遮罩层 26 const actionLoading = ref(false) // 遮罩层
32 const actionType = ref('') // 操作按钮的类型 27 const actionType = ref('') // 操作按钮的类型
@@ -121,7 +116,7 @@ getList() @@ -121,7 +116,7 @@ getList()
121 type="warning" 116 type="warning"
122 v-hasPermi="['infra:job:export']" 117 v-hasPermi="['infra:job:export']"
123 :loading="tableObject.exportLoading" 118 :loading="tableObject.exportLoading"
124 - @click="handleExport" 119 + @click="exportList('定时任务.xls')"
125 > 120 >
126 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 121 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
127 </el-button> 122 </el-button>
yudao-ui-admin-vue3/src/views/pay/app/index.vue
@@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;AppVO&gt;({ @@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;AppVO&gt;({
19 }) 19 })
20 const { getList, setSearchParams, delList, exportList } = methods 20 const { getList, setSearchParams, delList, exportList } = methods
21 21
22 -// 导出操作  
23 -const handleExport = async () => {  
24 - await exportList('应用数据.xls')  
25 -}  
26 -  
27 // ========== CRUD 相关 ========== 22 // ========== CRUD 相关 ==========
28 const actionLoading = ref(false) // 遮罩层 23 const actionLoading = ref(false) // 遮罩层
29 const actionType = ref('') // 操作按钮的类型 24 const actionType = ref('') // 操作按钮的类型
@@ -103,7 +98,7 @@ getList() @@ -103,7 +98,7 @@ getList()
103 type="warning" 98 type="warning"
104 v-hasPermi="['system:post:export']" 99 v-hasPermi="['system:post:export']"
105 :loading="tableObject.exportLoading" 100 :loading="tableObject.exportLoading"
106 - @click="handleExport" 101 + @click="exportList('应用数据.xls')"
107 > 102 >
108 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 103 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
109 </el-button> 104 </el-button>
yudao-ui-admin-vue3/src/views/pay/merchant/index.vue
@@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;MerchantVO&gt;({ @@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;MerchantVO&gt;({
19 }) 19 })
20 const { getList, setSearchParams, delList, exportList } = methods 20 const { getList, setSearchParams, delList, exportList } = methods
21 21
22 -// 导出操作  
23 -const handleExport = async () => {  
24 - await exportList('商户数据.xls')  
25 -}  
26 -  
27 // ========== CRUD 相关 ========== 22 // ========== CRUD 相关 ==========
28 const actionLoading = ref(false) // 遮罩层 23 const actionLoading = ref(false) // 遮罩层
29 const actionType = ref('') // 操作按钮的类型 24 const actionType = ref('') // 操作按钮的类型
@@ -103,7 +98,7 @@ getList() @@ -103,7 +98,7 @@ getList()
103 type="warning" 98 type="warning"
104 v-hasPermi="['system:post:export']" 99 v-hasPermi="['system:post:export']"
105 :loading="tableObject.exportLoading" 100 :loading="tableObject.exportLoading"
106 - @click="handleExport" 101 + @click="exportList('商户数据.xls')"
107 > 102 >
108 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 103 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
109 </el-button> 104 </el-button>
yudao-ui-admin-vue3/src/views/pay/order/index.vue
@@ -17,10 +17,6 @@ const { register, tableObject, methods } = useTable&lt;OrderVO&gt;({ @@ -17,10 +17,6 @@ const { register, tableObject, methods } = useTable&lt;OrderVO&gt;({
17 exportListApi: OrderApi.exportOrderApi 17 exportListApi: OrderApi.exportOrderApi
18 }) 18 })
19 const { getList, setSearchParams, delList, exportList } = methods 19 const { getList, setSearchParams, delList, exportList } = methods
20 -// 导出操作  
21 -const handleExport = async () => {  
22 - await exportList('订单数据.xls')  
23 -}  
24 // ========== CRUD 相关 ========== 20 // ========== CRUD 相关 ==========
25 const actionLoading = ref(false) // 遮罩层 21 const actionLoading = ref(false) // 遮罩层
26 const actionType = ref('') // 操作按钮的类型 22 const actionType = ref('') // 操作按钮的类型
@@ -100,7 +96,7 @@ getList() @@ -100,7 +96,7 @@ getList()
100 type="warning" 96 type="warning"
101 v-hasPermi="['pay:order:export']" 97 v-hasPermi="['pay:order:export']"
102 :loading="tableObject.exportLoading" 98 :loading="tableObject.exportLoading"
103 - @click="handleExport" 99 + @click="exportList('订单数据.xls')"
104 > 100 >
105 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 101 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
106 </el-button> 102 </el-button>
yudao-ui-admin-vue3/src/views/pay/refund/index.vue
@@ -17,11 +17,6 @@ const { register, tableObject, methods } = useTable&lt;RefundVO&gt;({ @@ -17,11 +17,6 @@ const { register, tableObject, methods } = useTable&lt;RefundVO&gt;({
17 }) 17 })
18 const { getList, setSearchParams, delList, exportList } = methods 18 const { getList, setSearchParams, delList, exportList } = methods
19 19
20 -// 导出操作  
21 -const handleExport = async () => {  
22 - await exportList('退款订单.xls')  
23 -}  
24 -  
25 // ========== CRUD 相关 ========== 20 // ========== CRUD 相关 ==========
26 const dialogVisible = ref(false) // 是否显示弹出层 21 const dialogVisible = ref(false) // 是否显示弹出层
27 const dialogTitle = ref('edit') // 弹出层标题 22 const dialogTitle = ref('edit') // 弹出层标题
@@ -53,7 +48,7 @@ getList() @@ -53,7 +48,7 @@ getList()
53 type="warning" 48 type="warning"
54 v-hasPermi="['system:post:export']" 49 v-hasPermi="['system:post:export']"
55 :loading="tableObject.exportLoading" 50 :loading="tableObject.exportLoading"
56 - @click="handleExport" 51 + @click="exportList('退款订单.xls')"
57 > 52 >
58 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 53 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
59 </el-button> 54 </el-button>
yudao-ui-admin-vue3/src/views/system/operatelog/index.vue
@@ -18,10 +18,6 @@ const detailRef = ref() // 详情 Ref @@ -18,10 +18,6 @@ const detailRef = ref() // 详情 Ref
18 const dialogVisible = ref(false) // 是否显示弹出层 18 const dialogVisible = ref(false) // 是否显示弹出层
19 const dialogTitle = ref(t('action.detail')) // 弹出层标题 19 const dialogTitle = ref(t('action.detail')) // 弹出层标题
20 const { getList, setSearchParams, exportList } = methods 20 const { getList, setSearchParams, exportList } = methods
21 -// 导出操作  
22 -const handleExport = async () => {  
23 - await exportList('操作日志.xls')  
24 -}  
25 // 详情 21 // 详情
26 const handleDetail = (row: OperateLogVO) => { 22 const handleDetail = (row: OperateLogVO) => {
27 // 设置数据 23 // 设置数据
@@ -41,7 +37,7 @@ getList() @@ -41,7 +37,7 @@ getList()
41 type="warning" 37 type="warning"
42 v-hasPermi="['system:operate-log:export']" 38 v-hasPermi="['system:operate-log:export']"
43 :loading="tableObject.exportLoading" 39 :loading="tableObject.exportLoading"
44 - @click="handleExport" 40 + @click="exportList('操作日志.xls')"
45 > 41 >
46 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 42 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
47 </el-button> 43 </el-button>
yudao-ui-admin-vue3/src/views/system/post/index.vue
@@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;PostVO&gt;({ @@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable&lt;PostVO&gt;({
19 }) 19 })
20 const { getList, setSearchParams, delList, exportList } = methods 20 const { getList, setSearchParams, delList, exportList } = methods
21 21
22 -// 导出操作  
23 -const handleExport = async () => {  
24 - await exportList('岗位数据.xls')  
25 -}  
26 -  
27 // ========== CRUD 相关 ========== 22 // ========== CRUD 相关 ==========
28 const actionLoading = ref(false) // 遮罩层 23 const actionLoading = ref(false) // 遮罩层
29 const actionType = ref('') // 操作按钮的类型 24 const actionType = ref('') // 操作按钮的类型
@@ -103,7 +98,7 @@ getList() @@ -103,7 +98,7 @@ getList()
103 type="warning" 98 type="warning"
104 v-hasPermi="['system:post:export']" 99 v-hasPermi="['system:post:export']"
105 :loading="tableObject.exportLoading" 100 :loading="tableObject.exportLoading"
106 - @click="handleExport" 101 + @click="exportList('岗位数据.xls')"
107 > 102 >
108 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 103 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
109 </el-button> 104 </el-button>
yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
@@ -19,10 +19,6 @@ const { register, tableObject, methods } = useTable&lt;SensitiveWordVO&gt;({ @@ -19,10 +19,6 @@ const { register, tableObject, methods } = useTable&lt;SensitiveWordVO&gt;({
19 }) 19 })
20 const { getList, setSearchParams, delList, exportList } = methods 20 const { getList, setSearchParams, delList, exportList } = methods
21 21
22 -// 导出操作  
23 -const handleExport = async () => {  
24 - await exportList('敏感词数据.xls')  
25 -}  
26 // 获取标签 22 // 获取标签
27 const tagsOptions = ref() 23 const tagsOptions = ref()
28 const getTags = async () => { 24 const getTags = async () => {
@@ -111,7 +107,7 @@ onMounted(async () =&gt; { @@ -111,7 +107,7 @@ onMounted(async () =&gt; {
111 type="warning" 107 type="warning"
112 v-hasPermi="['system:post:export']" 108 v-hasPermi="['system:post:export']"
113 :loading="tableObject.exportLoading" 109 :loading="tableObject.exportLoading"
114 - @click="handleExport" 110 + @click="exportList('敏感词数据.xls')"
115 > 111 >
116 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 112 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
117 </el-button> 113 </el-button>
yudao-ui-admin-vue3/src/views/system/tenant/index.vue
@@ -21,10 +21,6 @@ const { register, tableObject, methods } = useTable&lt;TenantVO&gt;({ @@ -21,10 +21,6 @@ const { register, tableObject, methods } = useTable&lt;TenantVO&gt;({
21 }) 21 })
22 const { getList, setSearchParams, delList, exportList } = methods 22 const { getList, setSearchParams, delList, exportList } = methods
23 23
24 -// 导出操作  
25 -const handleExport = async () => {  
26 - await exportList('租户数据.xls')  
27 -}  
28 // ========== 套餐 ========== 24 // ========== 套餐 ==========
29 const tenantPackageId = ref() // 套餐 25 const tenantPackageId = ref() // 套餐
30 const tenantPackageOptions = ref<TenantPackageVO[]>([]) //套餐列表 26 const tenantPackageOptions = ref<TenantPackageVO[]>([]) //套餐列表
@@ -129,7 +125,7 @@ onMounted(async () =&gt; { @@ -129,7 +125,7 @@ onMounted(async () =&gt; {
129 type="warning" 125 type="warning"
130 v-hasPermi="['system:tenant:export']" 126 v-hasPermi="['system:tenant:export']"
131 :loading="tableObject.exportLoading" 127 :loading="tableObject.exportLoading"
132 - @click="handleExport" 128 + @click="exportList('租户数据.xls')"
133 > 129 >
134 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 130 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
135 </el-button> 131 </el-button>
yudao-ui-admin-vue3/src/views/system/user/index.vue
@@ -165,11 +165,6 @@ const handleResetPwd = (row: UserVO) =&gt; { @@ -165,11 +165,6 @@ const handleResetPwd = (row: UserVO) =&gt; {
165 }) 165 })
166 } 166 }
167 167
168 -// 导出操作  
169 -const handleExport = async () => {  
170 - await exportList('用户数据.xls')  
171 -}  
172 -  
173 // ========== 详情相关 ========== 168 // ========== 详情相关 ==========
174 const detailRef = ref() 169 const detailRef = ref()
175 170
@@ -296,7 +291,11 @@ getList() @@ -296,7 +291,11 @@ getList()
296 > 291 >
297 <Icon icon="ep:upload" class="mr-5px" /> {{ t('action.import') }} 292 <Icon icon="ep:upload" class="mr-5px" /> {{ t('action.import') }}
298 </el-button> 293 </el-button>
299 - <el-button type="warning" v-hasPermi="['system:user:export']" @click="handleExport"> 294 + <el-button
  295 + type="warning"
  296 + v-hasPermi="['system:user:export']"
  297 + @click="exportList('用户数据.xls')"
  298 + >
300 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 299 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
301 </el-button> 300 </el-button>
302 </div> 301 </div>