| | |
| | | style="display: block" |
| | | v-model="valueSystem" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | inactive-color="#A64036" |
| | | active-text="系统运行中..." |
| | | inactive-text="系统已停止!" |
| | | @change='upDateValueSystem'> |
| | |
| | | } |
| | | }); |
| | | }, |
| | | upDateValueSystem: function (){ |
| | | upDateValueSystem(){ |
| | | let that = this; |
| | | let operatorTypeI = 0; |
| | | if (that.valueSystem){ |
| | |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/console/system/switch", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: { |
| | | operatorType : operatorTypeI |
| | | }, |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {operatorType : operatorTypeI}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data.status) { |
| | | that.valueSystem = true; |
| | | } else { |
| | | that.valueSystem = false; |
| | | } |
| | | that.valueSystem = res.data.status; |
| | | } |
| | | } |
| | | }); |