feat: 界面逻辑优化
This commit is contained in:
parent
6e447ec96e
commit
b5dee3a41d
@ -28,7 +28,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="mb20">
|
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="mb20">
|
||||||
<el-form-item :label="$t('数据源类型')" prop="dsType">
|
<el-form-item :label="$t('数据源类型')" prop="dsType">
|
||||||
<g-sys-dict v-model="state.ruleForm.dsType" code="ReportConfigDsTypeEnum" render-as="select" />
|
<!-- TODO:实现 Api 方式-->
|
||||||
|
<g-sys-dict v-model="state.ruleForm.dsType" code="ReportConfigDsTypeEnum" render-as="select" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="mb20" v-if="state.ruleForm.dsType === ReportConfigDsTypeEnum.NUMBER_0">
|
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="mb20" v-if="state.ruleForm.dsType === ReportConfigDsTypeEnum.NUMBER_0">
|
||||||
|
|||||||
@ -172,11 +172,15 @@ const handleExport = () => {
|
|||||||
cancelButtonText: t('取消'),
|
cancelButtonText: t('取消'),
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
state.isLoading = true;
|
||||||
getAPI(SysReportConfigApi)
|
getAPI(SysReportConfigApi)
|
||||||
.apiSysReportConfigExportToExcelPost({ id: Number(reportConfigId), execParams: state.queryParams }, { responseType: 'blob' })
|
.apiSysReportConfigExportToExcelPost({ id: Number(reportConfigId), execParams: state.queryParams }, { responseType: 'blob' })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
var fileName = getFileName(res.headers);
|
var fileName = getFileName(res.headers);
|
||||||
downloadByData(res.data as any, fileName);
|
downloadByData(res.data as any, fileName);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
state.isLoading = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents" :loading="state.isLoading">
|
||||||
<template #toolbar_buttons>
|
<template #toolbar_buttons>
|
||||||
<el-button icon="ele-Plus" type="primary" @click="handleAdd" v-auth="'sysTenant/add'"> 新增 </el-button>
|
<el-button icon="ele-Plus" type="primary" @click="handleAdd" v-auth="'sysTenant/add'"> 新增 </el-button>
|
||||||
<el-button type="danger" icon="ele-Refresh" @click="syncTenantDb"> 同步所有租户数据库 </el-button>
|
<el-button type="danger" icon="ele-Refresh" @click="syncTenantDb"> 同步所有租户数据库 </el-button>
|
||||||
@ -131,6 +131,8 @@ const state = reactive({
|
|||||||
defaultSort: { field: 'orderNo', order: 'asc', descStr: 'desc' },
|
defaultSort: { field: 'orderNo', order: 'asc', descStr: 'desc' },
|
||||||
},
|
},
|
||||||
title: '',
|
title: '',
|
||||||
|
/** 是否加载中 */
|
||||||
|
isLoading: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 本地存储参数
|
// 本地存储参数
|
||||||
@ -261,8 +263,13 @@ const createTenantDb = (row: any) => {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await getAPI(SysTenantApi).apiSysTenantInitTenantDbPost({ id: row.id });
|
try {
|
||||||
ElMessage.success('创建/更新租户数据库成功');
|
state.isLoading = true;
|
||||||
|
await getAPI(SysTenantApi).apiSysTenantInitTenantDbPost({ id: row.id });
|
||||||
|
ElMessage.success('创建/更新租户数据库成功');
|
||||||
|
} finally {
|
||||||
|
state.isLoading = false;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user