| | |
| | | **åå°æä½è§ï¼http://v2.volcore.xyz/document/netCoreDev |
| | | *****************************************************************************************/ |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | import addTask from "@/views/dialog/addTask.vue" |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridHeader: addTask, |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | |
| | | // this.$Message.success('ç¹å»äºæé®'); |
| | | // } |
| | | // }); |
| | | // this.buttons.forEach(x => { |
| | | // if(x.value=='Add'){ |
| | | // x.name='ç§»åº' |
| | | // x.icon='el-icon-document' |
| | | // } |
| | | // }); |
| | | let AddTaskBtn = this.buttons.find(r => r.name == "䏿任å¡"); |
| | | if(null!=AddTaskBtn){ |
| | | AddTaskBtn.onClick = function (){ |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©ä¸æä½!"); |
| | | let addkeys = rows.map(x => { |
| | | return x[this.table.key]; |
| | | }); |
| | | if (!addkeys || addkeys.Length == 0) return this.$error("æªè·åå°ä¸æä½!"); |
| | | this.$confirm("æ¯å¦ç¡®è®¤è¦æ·»å 䏿任å¡ï¼","æç¤º",{ |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText:"确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | // cancelBtn:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | showClose: true,//æ¯å¦æ¾ç¤ºå³ä¸è§å
³éæé® |
| | | type: "warning",//æç¤ºç±»å success:æå/info:ä¿¡æ¯/warning:è¦å/error:æ¥é |
| | | }).then(()=>{ |
| | | let params = { |
| | | MainData: null, |
| | | DetailData: null, |
| | | DelKeys: addkeys |
| | | } |
| | | this.http.post("/api/dt_stationinfo/SendAGVTask", params, "æ£å¨æ·»å ä»»å¡....").then(x => { |
| | | if (!x.status) return this.$error(x.message); |
| | | this.$success(x.message); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | |
| | | let TrayswitchingBtn = this.buttons.find(r => r.name == "忢æç"); |
| | | if(null!=TrayswitchingBtn){ |
| | | TrayswitchingBtn.onClick = function (){ |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©ä¸æä½!"); |
| | | let addkeys = rows.map(x => { |
| | | return x[this.table.key]; |
| | | }); |
| | | if (!addkeys || addkeys.Length == 0) return this.$error("æªè·åå°ä¸æä½!"); |
| | | this.$confirm("æ¯å¦ç¡®è®¤åæ¢æçï¼","æç¤º",{ |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText:"确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | // cancelBtn:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | showClose: true,//æ¯å¦æ¾ç¤ºå³ä¸è§å
³éæé® |
| | | type: "warning",//æç¤ºç±»å success:æå/info:ä¿¡æ¯/warning:è¦å/error:æ¥é |
| | | }).then(()=>{ |
| | | let params = { |
| | | MainData: null, |
| | | DetailData: null, |
| | | DelKeys: addkeys |
| | | } |
| | | this.http.post("/api/dt_stationinfo/Trayswitching", params, "æ£å¨åæ¢....").then(x => { |
| | | if (!x.status) return this.$error(x.message); |
| | | this.$success(x.message); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | // this.boxOptions.labelWidth = 150; |
| | | this.pagination.order = "asc"; |
| | | this.columns.forEach(row=>{ |
| | | if(row.field=="stationCode"){ |
| | | row.sort=true; |
| | | } |
| | | }) |
| | | |
| | | let EnableBtn = this.buttons.find(r => r.name == "åæ¶ç¦ç¨"); |
| | | if(null!=EnableBtn){ |
| | | EnableBtn.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": "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: 'primary', |
| | | // 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": "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); |
| | | // } |
| | | // }) |
| | | // }); |
| | | // } |
| | | // }) |
| | | let DisEnableBtn = this.buttons.find(r => r.name == "ç¦ç¨"); |
| | | if(null!=DisEnableBtn){ |
| | | DisEnableBtn.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: '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() { |
| | | //æ¡æ¶åå§åé
ç½®å |