| | |
| | | |
| | | }, 1000) |
| | | }, |
| | | |
| | | verifyPassword(callback) { |
| | | this.$prompt('请输入管理员密码', '验证', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | inputType: 'password', |
| | | inputPattern: /^root$/, |
| | | inputErrorMessage: '密码错误' |
| | | }).then(({ value }) => { |
| | | if (value === 'root') { |
| | | callback(); |
| | | } |
| | | }).catch(() => { |
| | | this.$message.info('已取消操作'); |
| | | }); |
| | | }, |
| | | handleChange(val) { |
| | | console.log(val); |
| | | if (val.length === 0){ |
| | |
| | | }, |
| | | upDateValueSystem(){ |
| | | let that = this; |
| | | let operatorTypeI = 0; |
| | | if (that.valueSystem){ |
| | | operatorTypeI = 1; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/console/system/switch", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {operatorType : operatorTypeI}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | that.valueSystem = res.data.status; |
| | | } |
| | | this.verifyPassword(() => { |
| | | let operatorTypeI = 0; |
| | | if (that.valueSystem){ |
| | | operatorTypeI = 1; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/console/system/switch", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {operatorType : operatorTypeI}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | that.valueSystem = res.data.status; |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | getTableDataLeft() { |