From 66223fb36c73a4060b80f96b1d1596726a230f9c Mon Sep 17 00:00:00 2001
From: heimawl <1785969728@qq.com>
Date: 星期一, 07 八月 2023 10:09:57 +0800
Subject: [PATCH] 11
---
src/views/system/label/index.vue | 54 ++++++++++++++++++++++++++++++------------------------
1 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/src/views/system/label/index.vue b/src/views/system/label/index.vue
index 513af3e..001f3df 100644
--- a/src/views/system/label/index.vue
+++ b/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,18 +325,21 @@
</template>
<script>
+import { changetagcategory } from "@/api/system/label";
import {
- toamendtag,
- addapitag,
- detailstag,
- deletetag,
- changetagcategory,
- toamendtagcategory,
- addtagcategory,
- deletetagcategory,
- listtag,
- tagclassifylist,
-} from "@/api/system/label";
+ 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";
@@ -510,7 +513,7 @@
methods: {
/** 鏌ヨ鏍囩鍒楄〃 */
getList() {
- listtag(this.addDateRange(this.queryParams)).then((response) => {
+ listbase_tag(this.addDateRange(this.queryParams)).then((response) => {
console.log(response);
this.total = response.total;
this.userList = response.rows;
@@ -543,13 +546,16 @@
// 娣诲姞/淇敼鏍囩
Maintenancetag() {
if (this.lstamendtag) {
- toamendtag(this.addDateRange(this.tagform)).then((response) => {
+ updatebase_tag(this.addDateRange(this.tagform)).then((response) => {
console.log(response);
+ this.lstamendtagVisible = false;
this.getList();
});
} else {
- addapitag(this.addDateRange(this.tagform)).then((response) => {
+ addbase_tag(this.addDateRange(this.tagform)).then((response) => {
console.log(response);
+ this.lstamendtagVisible = false;
+
this.getList();
});
}
@@ -564,7 +570,7 @@
// 鑾峰彇鏍囩鍒嗙被
gitclasify() {
- tagclassifylist(this.addDateRange(this.forms)).then((response) => {
+ listbase_tagcategory(this.addDateRange(this.forms)).then((response) => {
console.log(response);
this.numberlb = response.total;
this.editableTabs = response.rows;
@@ -574,14 +580,14 @@
submitsidecolumn() {
if (this.amendtag) {
this.classifyform.tagcategoryid = this.idds;
- toamendtagcategory(this.addDateRange(this.classifyform)).then(
+ updatebase_tagcategory(this.addDateRange(this.classifyform)).then(
(response) => {
console.log(response);
this.gitclasify();
}
);
} else {
- addtagcategory(this.addDateRange(this.classifyform)).then(
+ addbase_tagcategory(this.addDateRange(this.classifyform)).then(
(response) => {
console.log(response);
this.gitclasify();
@@ -597,7 +603,7 @@
//鍒犻櫎鍒嗙被
deletefenlei(row) {
if (this.deleteVisible) {
- deletetagcategory(this.idds).then((response) => {
+ delbase_tagcategory(this.idds).then((response) => {
console.log(response);
this.gitclasify();
});
@@ -637,17 +643,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 updatebase_tag(row);
})
.then(() => {
this.$modal.msgSuccess(text + "鎴愬姛");
})
.catch(function () {
- row.isupload = row.isupload == 0 ? 1 : 0;
+ row.isupload = row.isupload == "0" ? "1" : "0";
});
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -683,7 +689,7 @@
: "鏄惁纭鍒犻櫎閫変腑鐨勬暟鎹」锛�"
)
.then(function () {
- return deletetag(tagids);
+ return delbase_tag(tagids);
})
.then(() => {
this.getList();
--
Gitblit v1.9.3