| | |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | // this.boxOptions.labelWidth = 150; |
| | | this.pagination.order = "asc"; |
| | | this.columns.forEach(row=>{ |
| | | if(row.field=="stationCode"){ |
| | | row.sort=true; |
| | | } |
| | | }) |
| | | this.buttons.splice(1, 0, { |
| | | name: "ç§»åº", |
| | | icon: 'el-icon-document', |
| | | type: 'danger', |
| | | name: "åæ¶ç¦ç¨", |
| | | icon: 'md-refresh', |
| | | type: 'primary', |
| | | onClick: function () { |
| | | this.$refs.gridHeader.detialBox = true; |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©è¦åæ¶ç¦ç¨çæ°æ®"); |
| | | |
| | | this.$confirm('确认è¦åæ¶ç¦ç¨å?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | center: true |
| | | }).then(() => { |
| | | let data = []; |
| | | let parm = { |
| | | "data": data, |
| | | "type": "1" |
| | | } |
| | | rows.forEach(t => data.push(t.id)) |
| | | this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "åæ¶ç¦ç¨ä¸...").then(x => { |
| | | if (x.status) { |
| | | this.$Message.success("åæ¶ç¦ç¨æå!"); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(x.message); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }) |
| | | |
| | | this.buttons.splice(1, 0, { |
| | | name: "ç¦ç¨", |
| | | icon: 'md-refresh', |
| | | type: 'danger', |
| | | onClick: function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©è¦ç¦ç¨çæ°æ®"); |
| | | |
| | | this.$confirm('确认è¦ç¦ç¨å?', 'è¦å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | center: true |
| | | }).then(() => { |
| | | let data = []; |
| | | let parm = { |
| | | "data": data, |
| | | "type": "0" |
| | | } |
| | | rows.forEach(t => data.push(t.id)) |
| | | this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "éå®ä¸...").then(x => { |
| | | if (x.status) { |
| | | this.$Message.success("ç¦ç¨æåï¼"); |
| | | this.refresh(); |
| | | } else { |
| | | this.$Message.error(x.message); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }) |
| | | // this.buttons.splice(1, 0, { |
| | | // name: "ç§»åº", |
| | | // icon: 'el-icon-document', |
| | | // type: 'danger', |
| | | // onClick: function () { |
| | | // this.$refs.gridHeader.detialBox = true; |
| | | // } |
| | | // }) |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |