| | |
| | | if (nextButton) nextButton.hidden = true; |
| | | var recoveryButton = this.buttons.find((x) => x.value == "TaskRecovery"); |
| | | if (recoveryButton) recoveryButton.hidden = true; |
| | | |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 70, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥ç</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel'); |
| | | if (TaskHandCancelBtn) { |
| | | TaskHandCancelBtn.onClick = function () { |
| | | this.$confirm("æ¯å¦ç¡®è®¤åæ¶ä»»å¡", "æå¨åæ¶ä»»å¡è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | center: true, |
| | | }).then(() => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .post("api/Task/TaskCancel?taskNum=" + param, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('ä»»å¡åæ¶æå.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); |
| | | if (TaskHandCompletedBtn) { |
| | | TaskHandCompletedBtn.onClick = function () { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å®æä»»å¡","æå¨ä»»å¡å®æè¦å",{ |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | center: true, |
| | | }).then(() => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .post("api/Task/TaskHandCompleted?taskNum="+param, "") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任塿å¨å®æ'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | // this.columns.push({ |
| | | // field: 'æä½', |
| | | // title: 'æä½', |
| | | // width: 70, |
| | | // fixed: 'right', |
| | | // align: 'center', |
| | | // formatter: (row) => { |
| | | // return ( |
| | | // '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥ç</i>' |
| | | // ); |
| | | // }, |
| | | // click: (row) => { |
| | | // this.$refs.gridBody.open(row); |
| | | // } |
| | | // }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |