update 同步ruoyi适配改动

This commit is contained in:
疯狂的狮子li 2021-09-23 19:04:09 +08:00
parent 03b31652a2
commit 071c4c1412
4 changed files with 24 additions and 46 deletions

View File

@ -324,7 +324,7 @@ export default {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.id != null) { if (this.form.id != null) {
updateDemo(this.form).then(response => { updateDemo(this.form).then(response => {
this.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => { }).finally(() => {
@ -332,7 +332,7 @@ export default {
}); });
} else { } else {
addDemo(this.form).then(response => { addDemo(this.form).then(response => {
this.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => { }).finally(() => {
@ -345,18 +345,16 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$confirm('是否确认删除测试单表编号为"' + ids + '"的数据项?', "警告", { this.$modal.confirm('是否确认删除测试单表编号为"' + ids + '"的数据项?').then(() => {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true; this.loading = true;
return delDemo(ids); return delDemo(ids);
}).then(() => { }).then(() => {
this.loading = false; this.loading = false;
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) }).finally(() => {
this.loading = false;
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

View File

@ -255,7 +255,7 @@ export default {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.id != null) { if (this.form.id != null) {
updateTree(this.form).then(response => { updateTree(this.form).then(response => {
this.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => { }).finally(() => {
@ -263,7 +263,7 @@ export default {
}); });
} else { } else {
addTree(this.form).then(response => { addTree(this.form).then(response => {
this.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => { }).finally(() => {
@ -275,18 +275,16 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$confirm('是否确认删除测试树表编号为"' + row.id + '"的数据项?', "警告", { this.$modal.confirm('是否确认删除测试树表编号为"' + row.id + '"的数据项?').then(() => {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true; this.loading = true;
return delTree(row.id); return delTree(row.id);
}).then(() => { }).then(() => {
this.loading = false; this.loading = false;
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) }).finally(() => {
this.loading = false;
});
} }
} }
}; };

View File

@ -351,7 +351,7 @@ export default {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.ossConfigId != null) { if (this.form.ossConfigId != null) {
updateOssConfig(this.form).then(response => { updateOssConfig(this.form).then(response => {
this.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => { }).finally(() => {
@ -359,7 +359,7 @@ export default {
}); });
} else { } else {
addOssConfig(this.form).then(response => { addOssConfig(this.form).then(response => {
this.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}).finally(() => { }).finally(() => {
@ -372,17 +372,13 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ossConfigIds = row.ossConfigId || this.ids; const ossConfigIds = row.ossConfigId || this.ids;
this.$confirm('是否确认删除对象存储配置编号为"' + ossConfigIds + '"的数据项?', "警告", { this.$modal.confirm('是否确认删除对象存储配置编号为"' + ossConfigIds + '"的数据项?').then(() => {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true; this.loading = true;
return delOssConfig(ossConfigIds); return delOssConfig(ossConfigIds);
}).then(() => { }).then(() => {
this.loading = false; this.loading = false;
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).finally(() => { }).finally(() => {
this.loading = false; this.loading = false;
}); });
@ -390,16 +386,11 @@ export default {
// //
handleStatusChange(row) { handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用"; let text = row.status === "0" ? "启用" : "停用";
this.$confirm( this.$modal.confirm('确认要"' + text + '""' + row.configKey + '"配置吗?').then(() => {
'确认要"' + text + '""' + row.configKey + '"配置吗?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
return changeOssConfigStatus(row.ossConfigId, row.status, row.configKey); return changeOssConfigStatus(row.ossConfigId, row.status, row.configKey);
}).then(() => { }).then(() => {
this.getList() this.getList()
this.msgSuccess(text + "成功"); this.$modal.msgSuccess(text + "成功");
}).catch(() => { }).catch(() => {
row.status = row.status === "0" ? "1" : "0"; row.status = row.status === "0" ? "1" : "0";
}) })

View File

@ -330,17 +330,13 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ossIds = row.ossId || this.ids; const ossIds = row.ossId || this.ids;
this.$confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?', "警告", { this.$modal.confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?').then(() => {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true; this.loading = true;
return delOss(ossIds); return delOss(ossIds);
}).then(() => { }).then(() => {
this.loading = false; this.loading = false;
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).finally(() => { }).finally(() => {
this.loading = false; this.loading = false;
}); });
@ -348,16 +344,11 @@ export default {
// //
handlePreviewListResource(previewListResource) { handlePreviewListResource(previewListResource) {
let text = previewListResource ? "启用" : "停用"; let text = previewListResource ? "启用" : "停用";
this.$confirm( this.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?').then(() => {
'确认要"' + text + '""预览列表图片"配置吗?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
return changePreviewListResource(previewListResource); return changePreviewListResource(previewListResource);
}).then(() => { }).then(() => {
this.getList() this.getList()
this.msgSuccess(text + "成功"); this.$modal.msgSuccess(text + "成功");
}).catch(() => { }).catch(() => {
this.previewListResource = previewListResource !== true; this.previewListResource = previewListResource !== true;
}) })