疯狂的狮子li
2021-12-24 5ca038d888922e93bf45c7bd37f3c6dce849dcff
ruoyi-ui/src/views/system/oss/index.vue
@@ -188,7 +188,6 @@
<script>
import { listOss, delOss, changePreviewListResource } from "@/api/system/oss";
import { downLoadOss } from "@/utils/download";
export default {
  name: "Oss",
@@ -325,22 +324,18 @@
    },
    /** 下载按钮操作 */
    handleDownload(row) {
      downLoadOss(row.ossId)
      this.$download.oss(row.ossId)
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ossIds = row.ossId || this.ids;
      this.$confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
      }).then(() => {
      this.$modal.confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?').then(() => {
        this.loading = true;
        return delOss(ossIds);
      }).then(() => {
        this.loading = false;
        this.getList();
        this.msgSuccess("删除成功");
        this.$modal.msgSuccess("删除成功");
      }).finally(() => {
        this.loading = false;
      });
@@ -348,16 +343,11 @@
    // 预览列表图片状态修改
    handlePreviewListResource(previewListResource) {
      let text = previewListResource ? "启用" : "停用";
      this.$confirm(
        '确认要"' + text + '""预览列表图片"配置吗?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
      }).then(() => {
      this.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?').then(() => {
        return changePreviewListResource(previewListResource);
      }).then(() => {
        this.getList()
        this.msgSuccess(text + "成功");
        this.$modal.msgSuccess(text + "成功");
      }).catch(() => {
        this.previewListResource = previewListResource !== true;
      })