yxh
2023-11-21 dacf3c6ae5ede1c0a8a8b4afb24e2a3b62f0e368
src/views/system/label/index.vue
@@ -195,8 +195,8 @@
                <template slot-scope="scope">
                  <el-switch
                    v-model="scope.row.isupload"
                    :active-value="'1'"
                    :inactive-value="'0'"
                    :active-value="1"
                    :inactive-value="0"
                    active-color="#13ce66"
                    @change="handleStatusChange(scope.row)"
                  ></el-switch>
@@ -325,7 +325,19 @@
</template>
<script>
import { changetagcategory } from "@/api/system/label";
import {
  changetagcategory,
  toamendtag,
  toamendtagcategory,
  addapitag,
  addtagcategory,
  detailstag,
  deletetag,
  deletetagcategory,
  exporttag,
  listtag,
  tagclassifylist,
} from "@/api/system/label";
import {
  listbase_tag,
  getbase_tag,
@@ -513,7 +525,7 @@
  methods: {
    /** 查询标签列表 */
    getList() {
      listbase_tag(this.addDateRange(this.queryParams)).then((response) => {
      listtag(this.addDateRange(this.queryParams)).then((response) => {
        console.log(response);
        this.total = response.total;
        this.userList = response.rows;
@@ -546,13 +558,13 @@
    // 添加/修改标签
    Maintenancetag() {
      if (this.lstamendtag) {
        updatebase_tag(this.addDateRange(this.tagform)).then((response) => {
        toamendtag(this.addDateRange(this.tagform)).then((response) => {
          console.log(response);
          this.lstamendtagVisible = false;
          this.getList();
        });
      } else {
        addbase_tag(this.addDateRange(this.tagform)).then((response) => {
        addapitag(this.addDateRange(this.tagform)).then((response) => {
          console.log(response);
          this.lstamendtagVisible = false;
@@ -570,7 +582,7 @@
    // 获取标签分类
    gitclasify() {
      listbase_tagcategory(this.addDateRange(this.forms)).then((response) => {
      tagclassifylist(this.addDateRange(this.forms)).then((response) => {
        console.log(response);
        this.numberlb = response.total;
        this.editableTabs = response.rows;
@@ -580,14 +592,14 @@
    submitsidecolumn() {
      if (this.amendtag) {
        this.classifyform.tagcategoryid = this.idds;
        updatebase_tagcategory(this.addDateRange(this.classifyform)).then(
        toamendtagcategory(this.addDateRange(this.classifyform)).then(
          (response) => {
            console.log(response);
            this.gitclasify();
          }
        );
      } else {
        addbase_tagcategory(this.addDateRange(this.classifyform)).then(
        addtagcategory(this.addDateRange(this.classifyform)).then(
          (response) => {
            console.log(response);
            this.gitclasify();
@@ -603,7 +615,7 @@
    //删除分类
    deletefenlei(row) {
      if (this.deleteVisible) {
        delbase_tagcategory(this.idds).then((response) => {
        deletetagcategory(this.idds).then((response) => {
          console.log(response);
          this.gitclasify();
        });
@@ -643,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 updatebase_tag(row);
          return toamendtag(row);
        })
        .then(() => {
          this.$modal.msgSuccess(text + "成功");
        })
        .catch(function () {
          row.isupload = row.isupload == "0" ? "1" : "0";
          row.isupload = row.isupload == 0 ? 1 : 0;
        });
    },
    /** 搜索按钮操作 */
@@ -689,7 +701,7 @@
            : "是否确认删除选中的数据项?"
        )
        .then(function () {
          return delbase_tag(tagids);
          return deletetag(tagids);
        })
        .then(() => {
          this.getList();