| | |
| | | import detailMethods from './detailMethods.js'; |
| | | import axios from "axios"; |
| | | //ä¸å¡å¤çæ¹æ³,å
¨é¨å¯ä»¥ç±å¼åè¦ç |
| | | import serviceFilter from './serviceFilter.js'; |
| | | let methods = { |
| | |
| | | this.modelOpenProcess(); |
| | | // this.modelOpenAfter(); |
| | | }, |
| | | async complete(rows) { |
| | | this.boxOptions.title = 'ç«å³å®æ'; |
| | | this.currentAction = this.const.EDIT; |
| | | if (rows) { |
| | | if (!(rows instanceof Array)) { |
| | | rows = [rows]; |
| | | } |
| | | } else { |
| | | rows = this.$refs.table.getSelected(); |
| | | } |
| | | if (rows.length == 0) { |
| | | return this.$error('è¯·éæ©è¦ç¼è¾çè¡!'); |
| | | } |
| | | if (rows.length != 1) { |
| | | return this.$error('åªè½éæ©ä¸è¡æ°æ®è¿è¡ç¼è¾!'); |
| | | } |
| | | //è®°å½å½åç¼è¾çè¡ |
| | | this.currentRow = rows[0]; |
| | | let w = this.currentRow.taskId; |
| | | axios.post("api/Task/AtOnceUpdate/?taskid=" + w, {}).then(x => { |
| | | alert("宿"); |
| | | |
| | | }) |
| | | }, |
| | | async speciadelete(rows) { |
| | | this.boxOptions.title = 'ç¹æ®å é¤1'; |
| | | this.currentAction = this.const.EDIT; |
| | | if (rows) { |
| | | if (!(rows instanceof Array)) { |
| | | rows = [rows]; |
| | | } |
| | | } else { |
| | | rows = this.$refs.table.getSelected(); |
| | | } |
| | | if (rows.length == 0) { |
| | | return this.$error('è¯·éæ©è¦ç¼è¾çè¡!'); |
| | | } |
| | | if (rows.length != 1) { |
| | | return this.$error('åªè½éæ©ä¸è¡æ°æ®è¿è¡ç¼è¾!'); |
| | | } |
| | | //è®°å½å½åç¼è¾çè¡ |
| | | this.currentRow = rows[0]; |
| | | axios.post("api/Task/speciadelete/", this.currentRow).then(x => { |
| | | if (x.data.message == 1) { |
| | | alert("失败"); |
| | | } else { |
| | | alert("宿"); |
| | | this.refresh(); |
| | | } |
| | | }) |
| | | }, |
| | | async speciaupdate(rows) { |
| | | this.boxOptions.title = 'ç¹æ®ç¼è¾'; |
| | | this.currentAction = this.const.EDIT; |
| | | if (rows) { |
| | | if (!(rows instanceof Array)) { |
| | | rows = [rows]; |
| | | } |
| | | } else { |
| | | rows = this.$refs.table.getSelected(); |
| | | } |
| | | if (rows.length == 0) { |
| | | return this.$error('è¯·éæ©è¦ç¼è¾çè¡!'); |
| | | } |
| | | if (rows.length != 1) { |
| | | return this.$error('åªè½éæ©ä¸è¡æ°æ®è¿è¡ç¼è¾!'); |
| | | } |
| | | //è®°å½å½åç¼è¾çè¡ |
| | | this.currentRow = rows[0]; |
| | | let w = this.currentRow.taskId; |
| | | axios.post("api/Task/speciaupdate/", this.currentRow).then(x => { |
| | | if (x.data.message != 1) { |
| | | alert("失败"); |
| | | } else { |
| | | alert("宿"); |
| | | this.refresh(); |
| | | } |
| | | }) |
| | | }, |
| | | async edit(rows) { |
| | | this.boxOptions.title = 'ç¼è¾'; |
| | | //ç¼è¾ |
| | |
| | | } |
| | | //è®°å½å½åç¼è¾çè¡ |
| | | this.currentRow = rows[0]; |
| | | |
| | | |
| | | console.log("123", this.currentRow); |
| | | |
| | | |
| | | //åå§åå¼¹åºæ¡ |
| | | if (!(await this.initBox())) return; |
| | | this.setContinueAdd(false); |