| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addUser, updateUser } from "@/api/system/user"; |
| | | import { |
| | | toamendtag, |
| | | addapitag, |
| | |
| | | // 标签状态修改 |
| | | handleStatusChange(row) { |
| | | console.log(row.isupload); |
| | | let text = row.isupload === "0" ? "启用" : "停用"; |
| | | let text = row.isupload == 0 ? "停用" : "启用"; |
| | | this.$modal |
| | | .confirm('确认要"' + text + '""' + row.tagname + '"标签吗?') |
| | | .then(function () { |
| | |
| | | this.$modal.msgSuccess(text + "成功"); |
| | | }) |
| | | .catch(function () { |
| | | row.isupload = row.isupload === "0" ? "1" : "0"; |
| | | row.isupload = row.isupload == 0 ? 1 : 0; |
| | | }); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | |
| | | 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, "删除弹窗"); |