|
@@ -924,56 +924,59 @@ export default {
|
|
|
this.handleAccountStatus = true
|
|
|
},
|
|
|
delAccount() {
|
|
|
- this.$confirm("即将删除数据, 是否删除?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$http({
|
|
|
- url: "/market/BomcProcessAccount/delBatch",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- data: { delId: this.AccountdelId },
|
|
|
- }).then((res) => {
|
|
|
- this.getAccountTable({}, this.pageSizeAccount)
|
|
|
- this.handleAccountStatus = false
|
|
|
- })
|
|
|
+ if (this.AccountdelId.length > 0) {
|
|
|
+ this.$confirm("即将删除数据, 是否删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .then(() => {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/BomcProcessAccount/delBatch",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: { delId: this.AccountdelId },
|
|
|
+ }).then((res) => {
|
|
|
+ this.getAccountTable({}, this.pageSizeAccount)
|
|
|
+ this.handleAccountStatus = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
+ }
|
|
|
},
|
|
|
delHost() {
|
|
|
- this.$confirm("即将删除数据, 是否删除?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$http({
|
|
|
- url: "/market/BomcProcessHost/delBatch",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- data: { delId: this.HostdelId },
|
|
|
- }).then((res) => {
|
|
|
- this.getHostTable({}, this.pageSizeHost)
|
|
|
- this.handleHostStatus = false
|
|
|
- })
|
|
|
+ if (this.HostdelId.length > 0) {
|
|
|
+ this.$confirm("即将删除数据, 是否删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
})
|
|
|
- .catch(() => { });
|
|
|
+ .then(() => {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/BomcProcessHost/delBatch",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: { delId: this.HostdelId },
|
|
|
+ }).then((res) => {
|
|
|
+ this.getHostTable({}, this.pageSizeHost)
|
|
|
+ this.handleHostStatus = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
+ }
|
|
|
},
|
|
|
handleSelectionChangeHost(val) {
|
|
|
this.HostdelId = []
|
|
|
val.map((item) => {
|
|
|
this.HostdelId.push(item.id)
|
|
|
})
|
|
|
- console.log(this.HostdelId);
|
|
|
},
|
|
|
handleSelectionChangeAccount(val) {
|
|
|
- this.HostdelId = []
|
|
|
+ this.AccountdelId = []
|
|
|
val.map((item) => {
|
|
|
this.AccountdelId.push(item.id)
|
|
|
})
|