| | |
| | | * 电源系统单点控制 |
| | | * 参数:id, num, val |
| | | */ |
| | | setPos(id, ip, num, val) { |
| | | setPos(id, dev_name, ip, num, val) { |
| | | let data = { |
| | | electric_id: id, |
| | | dev_name: dev_name, |
| | | electric_ip: ip, |
| | | num: num, |
| | | }; |
| | |
| | | * 设置组合界面的控制 |
| | | * 参数:id, num, val |
| | | */ |
| | | setGroupPos(id, ip, num, val) { |
| | | setGroupPos(id, name, ip, num, val) { |
| | | let data = { |
| | | electric_id: id, |
| | | dev_name: name[0] + '套', |
| | | electric_ip: ip, |
| | | num: num, |
| | | }; |
| | |
| | | case 7: |
| | | // 输出合闸1 |
| | | data.switchon1 = 1; |
| | | data.dev_name = name[1] + '套'; |
| | | break; |
| | | case 8: |
| | | // 输出合闸2 |
| | | data.switchon2 = 1; |
| | | data.dev_name = name[1] + '套'; |
| | | break; |
| | | case 9: |
| | | // 输出分闸1 |
| | | data.switchoff1 = 1; |
| | | data.dev_name = name[1] + '套'; |
| | | break; |
| | | case 10: |
| | | // 输出分闸2 |
| | | data.switchoff2 = 1; |
| | | data.dev_name = name[1] + '套'; |
| | | break; |
| | | case 11: |
| | | // 并联运行启动 |
| | |
| | | * 设定电压和电流 |
| | | * 参数:id, num, val |
| | | */ |
| | | giveVal(id, num, val) { |
| | | giveVal(id, dev_name, num, val) { |
| | | let data = { |
| | | electric_id: id, |
| | | dev_name: dev_name, |
| | | num: num, |
| | | }; |
| | | // 给定确认 |
| | |
| | | num: 20, |
| | | currset: this.local_set_cur, |
| | | electric2KW_id: this.electric2KW_id |
| | | ,dev_name: this.group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 7, |
| | | currset_confirm: 1, |
| | | electric2KW_id: this.electric2KW_id |
| | | ,dev_name: this.group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 21, |
| | | volset: this.local_set_vol, |
| | | electric2KW_id: this.electric2KW_id |
| | | ,dev_name: this.group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 6, |
| | | volset_confirm: 1, |
| | | electric2KW_id: this.electric2KW_id |
| | | ,dev_name: this.group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 3, |
| | | fault_reset: 1, |
| | | electric2KW_id: this.electric2KW_id |
| | | ,dev_name: this.group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 2, |
| | | remote_start: 1, |
| | | electric2KW_id: this.electric2KW_id |
| | | ,dev_name: this.group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 8, |
| | | remote_stop: 1, |
| | | electric2KW_id: this.electric2KW_id |
| | | ,dev_name: this.group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 20, |
| | | currset: this.local_set_cur, |
| | | electric2KW_id: this.groupInfo[this.current_grp].electric2KW_id |
| | | ,dev_name: this.current_grp + '机组' |
| | | }; |
| | | this.controlData[this.current_grp].local_set_cur = this.local_set_cur; |
| | | |
| | |
| | | num: 7, |
| | | currset_confirm: 1, |
| | | electric2KW_id: this.groupInfo[this.current_grp].electric2KW_id |
| | | ,dev_name: this.current_grp + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 21, |
| | | volset: this.local_set_vol, |
| | | electric2KW_id: this.groupInfo[this.current_grp].electric2KW_id |
| | | ,dev_name: this.current_grp + '机组' |
| | | }; |
| | | this.controlData[this.current_grp].local_set_vol = this.local_set_vol; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | |
| | | num: 6, |
| | | volset_confirm: 1, |
| | | electric2KW_id: this.groupInfo[this.current_grp].electric2KW_id |
| | | ,dev_name: this.current_grp + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 4, |
| | | conscurrswitch: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 11, |
| | | consvolswitch: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 10, |
| | | start_upper_set: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 9, |
| | | start_screen_set: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 5, |
| | | constantvol: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 12, |
| | | othermode: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 2, |
| | | remote_start: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 8, |
| | | remote_stop: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 10, |
| | | start_upper_set: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 9, |
| | | start_screen_set: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 4, |
| | | conscurrswitch: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 11, |
| | | consvolswitch: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 5, |
| | | constantvol: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 12, |
| | | othermode: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | let param = { |
| | | num: 0, |
| | | electric2KW_ip: this.groupInfo[group].electric2KW_ip |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | const value = this['list_' + group][type + '_' + idx]; |
| | | switch (idx) { |
| | |
| | | num: 21, |
| | | volset: this.local_set_vol, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 6, |
| | | volset_confirm: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 3, |
| | | fault_reset: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 2, |
| | | remote_start: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 8, |
| | | remote_stop: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 20, |
| | | currset: this.local_set_cur, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 7, |
| | | currset_confirm: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 21, |
| | | volset: this.local_set_vol, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 6, |
| | | volset_confirm: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 3, |
| | | fault_reset: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 2, |
| | | remote_start: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 8, |
| | | remote_stop: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 21, |
| | | volset: this.local_set_vol, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 6, |
| | | volset_confirm: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param1).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 3, |
| | | fault_reset: 1, |
| | | electric2KW_id: this.groupInfo[group].electric2KW_id |
| | | ,dev_name: group + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 2, |
| | | remote_start: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | num: 8, |
| | | remote_stop: 1, |
| | | electric2KW_id: this.groupInfo[v].electric2KW_id |
| | | ,dev_name: v + '机组' |
| | | }; |
| | | this.$api.chargepower.upDateControlData(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | |
| | | data: { |
| | | set_power: '', |
| | | dev_id: '', |
| | | dev_name: '', |
| | | dev_ip: '', |
| | | num: 0 |
| | | }, |
| | |
| | | data: { |
| | | delay: '', |
| | | dev_id: '', |
| | | dev_name: '', |
| | | dev_ip: '', |
| | | num: 0 |
| | | }, |
| | |
| | | // 根据机柜信息构造查询条件 |
| | | let searchParams = { |
| | | all_open: '1', |
| | | dev_name: obj.dev_name, |
| | | dev_id: obj.dev_id, |
| | | dev_ip: obj.dev_ip |
| | | }; |
| | |
| | | this.updateSetPower.data.set_power = obj.set_power; |
| | | this.updateSetPower.data.dev_id = obj.dev_id; |
| | | this.updateSetPower.data.dev_ip = obj.dev_ip; |
| | | this.updateSetPower.data.dev_name = obj.dev_name; |
| | | this.updateSetPower.data.num = obj.FZ_button_num; |
| | | this.updateSetPower.show = true; |
| | | } |
| | |
| | | // console.log(obj); |
| | | this.updateDelay.data.delay = obj.interval_time; |
| | | this.updateDelay.data.dev_id = obj.dev_id; |
| | | this.updateDelay.data.dev_name = obj.dev_name; |
| | | this.updateDelay.data.dev_ip = obj.dev_ip; |
| | | this.updateDelay.data.num = obj.FZ_button_num; |
| | | this.updateDelay.show = true; |
| | |
| | | let param = { |
| | | interval_time: this.updateDelay.data.delay, |
| | | dev_id: this.updateDelay.data.dev_id, |
| | | dev_name: this.updateDelay.data.dev_name, |
| | | dev_ip: this.updateDelay.data.dev_ip, |
| | | num: this.updateDelay.data.num |
| | | }; |
| | |
| | | let param = { |
| | | set_power: this.updateSetPower.data.set_power, |
| | | dev_id: this.updateSetPower.data.dev_id, |
| | | dev_name: this.updateSetPower.data.dev_name, |
| | | dev_ip: this.updateSetPower.data.dev_ip, |
| | | num: this.updateSetPower.data.num |
| | | }; |
| | |
| | | }); |
| | | return false; |
| | | }*/ |
| | | debugger; |
| | | // 根据机柜信息构造查询条件 |
| | | let searchParams = { |
| | | dev_id: item.dev_id, |
| | | dev_name: item.dev_name, |
| | | start_auto: 1, |
| | | dev_ip: item.dev_ip |
| | | }; |
| | |
| | | // 根据机柜信息构造查询条件 |
| | | let searchParams = { |
| | | dev_id: item.dev_id, |
| | | dev_name: item.dev_name, |
| | | stop_auto: 1, |
| | | dev_ip: item.dev_ip |
| | | }; |
| | |
| | | data: { |
| | | set_power: '', |
| | | dev_id: '', |
| | | dev_name: '', |
| | | dev_ip: '', |
| | | num: 0 |
| | | }, |
| | |
| | | // 根据机柜信息构造查询条件 |
| | | let searchParams = { |
| | | all_open: '1', |
| | | dev_name: obj.dev_name, |
| | | dev_id: obj.dev_id, |
| | | dev_ip: obj.dev_ip |
| | | }; |
| | |
| | | // console.log(obj); |
| | | this.updateSetPower.data.set_power = obj.set_power; |
| | | this.updateSetPower.data.dev_id = obj.dev_id; |
| | | this.updateSetPower.data.dev_name = obj.dev_name; |
| | | this.updateSetPower.data.dev_ip = obj.dev_ip; |
| | | this.updateSetPower.data.num = obj.FZ_button_num; |
| | | this.updateSetPower.show = true; |
| | |
| | | let param = { |
| | | set_power: this.updateSetPower.data.set_power, |
| | | dev_id: this.updateSetPower.data.dev_id, |
| | | dev_name: this.updateSetPower.data.dev_name, |
| | | dev_ip: this.updateSetPower.data.dev_ip, |
| | | num: this.updateSetPower.data.num |
| | | }; |
| | |
| | | let searchParams = { |
| | | sudden_crease: 1, |
| | | dev_id: item.dev_id, |
| | | dev_name: item.dev_name, |
| | | dev_ip: item.dev_ip |
| | | }; |
| | | // 查询后台 |
| | |
| | | // 根据机柜信息构造查询条件 |
| | | let searchParams = { |
| | | all_open: '1', |
| | | dev_name: obj.dev_name, |
| | | dev_id: obj.dev_id, |
| | | dev_ip: obj.dev_ip |
| | | }; |
| | |
| | | // 根据机柜信息和点击的按钮的编号构造查询条件 |
| | | let searchParams = { |
| | | dev_id: item.dev_id, |
| | | dev_name: item.dev_name, |
| | | num: index, |
| | | dev_ip: item.dev_ip |
| | | }; |
| | |
| | | powerstartflag: 0, |
| | | } |
| | | ], |
| | | itemName: this.$route.query.group, |
| | | item1: { |
| | | name: itemName[0], |
| | | type: ['km1', 'km2'], |
| | |
| | | let id = item.data.electric_id; |
| | | let ip = item.info.electric_ip; |
| | | let loading = this.$layer.loading(1); |
| | | let dev_name = [this.itemName, item.name]; |
| | | // 设置点位 |
| | | this.$api.electric.setGroupPos(id, ip, num, val).then((res)=>{ |
| | | this.$api.electric.setGroupPos(id, dev_name, ip, num, val).then((res)=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | // 关闭等待 |
| | | this.$layer.close(loading); |
| | |
| | | this.giveVal.vol = form.dcvol; |
| | | // 设置给定的电压值 |
| | | this.giveVal.volset = this.getVal(form.dcvol, 'vol'); |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, 13, this.giveVal.volset).then((res) => { |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, this.itemName, 13, this.giveVal.volset).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | if (res.code) { |
| | | this.$message({ |
| | |
| | | // 设置给定电流的值 |
| | | this.giveVal.currset = this.getVal(form.dccurr, 'curr'); |
| | | |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, 14, this.giveVal.currset).then((res) => { |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, this.itemName, 14, this.giveVal.currset).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | if (res.code) { |
| | | this.$message({ |
| | |
| | | // 显示等待框 |
| | | let loading = this.$layer.loading(1); |
| | | |
| | | let dev_name = [this.itemName, this.item1.name]; |
| | | |
| | | // 设置点位 |
| | | this.$api.electric.setGroupPos(electric_id, ip, num, value).then((res)=>{ |
| | | this.$api.electric.setGroupPos(electric_id, dev_name, ip, num, value).then((res)=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | if (rs.code) { |
| | | this.$message({ |
| | |
| | | title: '套电源设定电压', |
| | | form: { |
| | | electric_id: '4001', |
| | | dev_name: '', |
| | | electric_ip: '127.0.0.1', |
| | | dcvol: 0, |
| | | num: 2, |
| | |
| | | title: '套电源设定电流', |
| | | form: { |
| | | electric_id: '4001', |
| | | dev_name: '', |
| | | electric_ip: '127.0.0.1', |
| | | dccurr: 0, |
| | | num: 1, |
| | |
| | | } |
| | | ,setPos(item, num, val) { |
| | | let id = item.info.electric_id; |
| | | let dev_name = item.info.electric_name; |
| | | let ip = item.info.electric_ip; |
| | | let loading = this.$layer.loading(1); |
| | | // 设置点位 |
| | | this.$api.electric.setPos(id, ip, num, val).then((res)=>{ |
| | | this.$api.electric.setPos(id, dev_name, ip, num, val).then((res)=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | // 关闭等待 |
| | | this.$layer.close(loading); |
| | |
| | | this.set_vol_dialog.idx = item.idx; |
| | | this.set_vol_dialog.show = true; |
| | | // 设置form表单的值 |
| | | this.set_vol_dialog.form.dev_name = item.info.electric_name; |
| | | this.set_vol_dialog.form.electric_id = item.info.electric_id; |
| | | this.set_vol_dialog.form.electric_ip = item.info.electric_ip; |
| | | this.set_vol_dialog.form.dcvol = item.data.upsetvol; |
| | |
| | | let form = this.set_vol_dialog.form; |
| | | let loading = this.$layer.loading(1); |
| | | // 设置点位(电压值乘10) |
| | | this.$api.electric.setPos(form.electric_id, form.electric_ip, form.num, form.dcvol).then((res)=>{ |
| | | this.$api.electric.setPos(form.electric_id, form.dev_name, form.electric_ip, form.num, form.dcvol).then((res)=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | // 执行成功 |
| | | if(rs.code == 1) { |
| | |
| | | this.set_curr_dialog.idx = item.idx; |
| | | this.set_curr_dialog.show = true; |
| | | // 设置form表单的值 |
| | | this.set_curr_dialog.form.dev_name = item.info.electric_name; |
| | | this.set_curr_dialog.form.electric_id = item.info.electric_id; |
| | | this.set_curr_dialog.form.electric_ip = item.info.electric_ip; |
| | | this.set_curr_dialog.form.dccurr = item.data.upsetcurr; |
| | |
| | | let form = this.set_curr_dialog.form; |
| | | let loading = this.$layer.loading(1); |
| | | // 设置点位(电压值乘10) |
| | | this.$api.electric.setPos(form.electric_id, form.electric_ip, form.num, form.dccurr).then((res)=>{ |
| | | this.$api.electric.setPos(form.electric_id, form.dev_name, form.electric_ip, form.num, form.dccurr).then((res)=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | // 执行成功 |
| | | if(rs.code == 1) { |
| | |
| | | <el-option v-for="(item, index) in operateList" :key="'operate_' + index" :label="item.text" :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 操作 --> |
| | | <el-form-item label="操作人"> |
| | | <el-select v-model="uId" placeholder="选择操作人"> |
| | | <el-option label="全部" value="0"></el-option> |
| | | <el-option v-for="(item, index) in userList" :key="'operate_' + index" :label="item.text" :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="btn-grp"> |
| | | <div class="btn_3d" @click="getUserLog">查询</div> |
| | |
| | | :data="data_logs" |
| | | > |
| | | <el-table-column |
| | | prop="date" |
| | | label="日期"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="time" |
| | | prop="uOprateDay" |
| | | label="时间"> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | <el-table-column |
| | | prop="SystemType" |
| | | label="系统类型"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="uName" |
| | | label="操作人"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="uOprateMsg" |
| | |
| | | ,data_logs: [] |
| | | ,operate: "0" |
| | | ,system: "0" |
| | | ,uId: "0" |
| | | ,operateList: [] |
| | | ,systemList: [] |
| | | ,userList: [] |
| | | ,time_start: new Date(Date.now() - 1000 * 60 * 60 * 24 + 1000).format('yyyy-MM-dd hh:mm:ss') |
| | | ,time_end: new Date().format('yyyy-MM-dd hh:mm:ss') |
| | | } |
| | |
| | | this.systemList = list; |
| | | }); |
| | | } |
| | | // 查询所有用户 |
| | | ,getAllUsers () { |
| | | this.$api.user.getAllUsers().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let list = []; |
| | | if (res.code) { |
| | | list = res.data; |
| | | } |
| | | list.forEach((v) => { |
| | | v.value = v.UId; |
| | | v.text = v.UName; |
| | | }); |
| | | this.userList = list; |
| | | }); |
| | | } |
| | | // 查询日志 |
| | | ,getUserLog () { |
| | | let param = { |
| | |
| | | ,uSystemType: this.system |
| | | ,uOprateDay: this.time_start |
| | | ,uOprateDay1: this.time_end |
| | | ,uId: this.uId |
| | | ,page: { |
| | | pageCurr: this.pageCurr |
| | | ,pageSize: 10 |
| | |
| | | let list = []; |
| | | if (res.code) { |
| | | list = res.data; |
| | | this.log_len = list[list.length - 1].page.pageAll; |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | |
| | | }); |
| | | } |
| | | list.forEach((v) => { |
| | | let dateTime = v.uOprateDay.split(' '); |
| | | v.OprateType = operate_name[v.uOprateType]; |
| | | v.SystemType = system_name[v.uSystemType]; |
| | | v.date = dateTime[0]; |
| | | v.time = dateTime[1]; |
| | | }); |
| | | this.data_logs = list; |
| | | }).catch(e => { |
| | |
| | | mounted () { |
| | | this.getOperateList(); |
| | | this.getSystemList(); |
| | | this.getAllUsers(); |
| | | } |
| | | } |
| | | </script> |