| | |
| | | }); |
| | | } |
| | | } |
| | | let EnableRoadwayBtn = this.buttons.find( |
| | | (x) => x.value == "EnableRoadway", |
| | | ); |
| | | if (EnableRoadwayBtn) { |
| | | EnableRoadwayBtn.onClick = function () { |
| | | this.$prompt("è¯·éæ©å··é (1-5)", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | inputPattern: /^[1-5]$/, |
| | | inputErrorMessage: "请è¾å
¥1-5ä¹é´çæ°å", |
| | | }) |
| | | .then(({ value }) => { |
| | | this.http |
| | | .post( |
| | | `api/LocationInfo/EnableAllLocationsInRoadway?roadwayNo=${value}`, |
| | | null, |
| | | "æ°æ®å¤çä¸", |
| | | ) |
| | | .then((x) => { |
| | | console.log(x); |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success(x.message || "æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message.info("已忶æä½"); |
| | | }); |
| | | }; |
| | | } |
| | | |
| | | let DisableRoadwayBtn = this.buttons.find( |
| | | (x) => x.value == "DisableRoadway", |
| | | ); |
| | | if (DisableRoadwayBtn) { |
| | | DisableRoadwayBtn.onClick = function () { |
| | | this.$prompt("è¯·éæ©å··é (1-5)", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | inputPattern: /^[1-5]$/, |
| | | inputErrorMessage: "请è¾å
¥1-5ä¹é´çæ°å", |
| | | }) |
| | | .then(({ value }) => { |
| | | this.http |
| | | .post( |
| | | `api/LocationInfo/DisableAllLocationsInRoadway?roadwayNo=${value}`, |
| | | null, |
| | | "æ°æ®å¤çä¸", |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success(x.message || "æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message.info("已忶æä½"); |
| | | }); |
| | | }; |
| | | } |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |