| | |
| | | <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> |
| | |
| | | </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, |
| | |
| | | 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; |
| | |
| | | // 添加/修改标签 |
| | | 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; |
| | | |
| | |
| | | |
| | | // 获取标签分类 |
| | | 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; |
| | |
| | | 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(); |
| | |
| | | //删除分类 |
| | | deletefenlei(row) { |
| | | if (this.deleteVisible) { |
| | | delbase_tagcategory(this.idds).then((response) => { |
| | | deletetagcategory(this.idds).then((response) => { |
| | | console.log(response); |
| | | this.gitclasify(); |
| | | }); |
| | |
| | | // 标签状态修改 |
| | | 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; |
| | | }); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | |
| | | : "是否确认删除选中的数据项?" |
| | | ) |
| | | .then(function () { |
| | | return delbase_tag(tagids); |
| | | return deletetag(tagids); |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |