From 04332cb7ab99f5744c79cd70686e86a878a14b7f Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 15 十二月 2023 11:14:36 +0800
Subject: [PATCH] 完成
---
src/views/system/label/index.vue | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/src/views/system/label/index.vue b/src/views/system/label/index.vue
index 001f3df..f910400 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,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,
@@ -512,9 +524,10 @@
methods: {
/** 鏌ヨ鏍囩鍒楄〃 */
- getList() {
- listbase_tag(this.addDateRange(this.queryParams)).then((response) => {
- console.log(response);
+ getList(row) {
+ console.log(row);
+ console.log(this.queryParams);
+ listtag(this.addDateRange(this.queryParams)).then((response) => {
this.total = response.total;
this.userList = response.rows;
});
@@ -546,13 +559,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 +583,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 +593,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 +616,7 @@
//鍒犻櫎鍒嗙被
deletefenlei(row) {
if (this.deleteVisible) {
- delbase_tagcategory(this.idds).then((response) => {
+ deletetagcategory(this.idds).then((response) => {
console.log(response);
this.gitclasify();
});
@@ -643,17 +656,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 +702,7 @@
: "鏄惁纭鍒犻櫎閫変腑鐨勬暟鎹」锛�"
)
.then(function () {
- return delbase_tag(tagids);
+ return deletetag(tagids);
})
.then(() => {
this.getList();
--
Gitblit v1.9.3