WXL
2023-11-21 6d3e75d248256fe9860beb91161265af3b39e982
src/views/system/label/index.vue
@@ -325,19 +325,33 @@
</template>
<script>
import { addUser, updateUser } from "@/api/system/user";
import {
  changetagcategory,
  toamendtag,
  toamendtagcategory,
  addapitag,
  addtagcategory,
  detailstag,
  deletetag,
  changetagcategory,
  toamendtagcategory,
  addtagcategory,
  deletetagcategory,
  exporttag,
  listtag,
  tagclassifylist,
} from "@/api/system/label";
import {
  listbase_tag,
  getbase_tag,
  addbase_tag,
  updatebase_tag,
  delbase_tag,
} from "@/api/smartorpor/base_tag";
import {
  listbase_tagcategory,
  getbase_tagcategory,
  addbase_tagcategory,
  updatebase_tagcategory,
  delbase_tagcategory,
} from "@/api/smartorpor/base_tagcategory";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -546,11 +560,14 @@
      if (this.lstamendtag) {
        toamendtag(this.addDateRange(this.tagform)).then((response) => {
          console.log(response);
          this.lstamendtagVisible = false;
          this.getList();
        });
      } else {
        addapitag(this.addDateRange(this.tagform)).then((response) => {
          console.log(response);
          this.lstamendtagVisible = false;
          this.getList();
        });
      }
@@ -638,17 +655,17 @@
    // 标签状态修改
    handleStatusChange(row) {
      console.log(row.isupload);
      let text = row.isupload === "0" ? "启用" : "停用";
      let text = row.isupload == 0 ? "停用" : "启用";
      this.$modal
        .confirm('确认要"' + text + '""' + row.tagname + '"标签吗?')
        .then(function () {
          return changetagcategory(row.tagid, row.isupload);
          return toamendtag(row);
        })
        .then(() => {
          this.$modal.msgSuccess(text + "成功");
        })
        .catch(function () {
          row.isupload = row.isupload === "0" ? "1" : "0";
          row.isupload = row.isupload == 0 ? 1 : 0;
        });
    },
    /** 搜索按钮操作 */
@@ -671,26 +688,6 @@
      this.multiple = !selection.length;
    },
    /** 更新/修改提交按钮 */
    submitForm: function () {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.userId != undefined) {
            updateUser(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      console.log(row, "删除弹窗");