|
@@ -220,6 +220,7 @@
|
|
|
:visible.sync="dataSourceOpen"
|
|
|
width="500px"
|
|
|
append-to-body
|
|
|
+ class="loadingClass"
|
|
|
>
|
|
|
<el-radio-group
|
|
|
v-model="dataSourceType"
|
|
@@ -295,7 +296,13 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm1">确 定</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="submitForm1"
|
|
|
+ :disabled="dialogLoading"
|
|
|
+ :loading="dialogLoading"
|
|
|
+ >{{ dialogLoading ? "绑定中" : "确 定" }}</el-button
|
|
|
+ >
|
|
|
<el-button @click="cancel1">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -315,7 +322,7 @@ import {
|
|
|
initTenantMenuData,
|
|
|
} from "@/api/system/tenant";
|
|
|
import { getDataSourceInfo, insertDataSource } from "@/api/system/data";
|
|
|
-import { async } from "@/components/updateModule/k-form-design/lib/k-form-design.common";
|
|
|
+import { servicesLoading } from "@/utils/ruoyi";
|
|
|
|
|
|
export default {
|
|
|
name: "Tenant",
|
|
@@ -328,6 +335,8 @@ export default {
|
|
|
],
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 弹窗的加载提示
|
|
|
+ dialogLoading: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -569,6 +578,12 @@ export default {
|
|
|
submitForm1() {
|
|
|
this.$refs["dataSourceForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ // const loading = servicesLoading(
|
|
|
+ // ".loadingClass",
|
|
|
+ // "正在绑定数据源",
|
|
|
+ // true
|
|
|
+ // );
|
|
|
+ this.dialogLoading = true;
|
|
|
if (this.dataSourceForm.id != null) {
|
|
|
// bindDatasource(this.dataSourceForm).then((response) => {
|
|
|
// this.$modal.msgSuccess("修改成功");
|
|
@@ -597,6 +612,7 @@ export default {
|
|
|
if ((resp.code = 200)) {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.dataSourceOpen = false;
|
|
|
+ // loading.close();
|
|
|
this.getList();
|
|
|
}
|
|
|
}
|