| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * |
| | | * |
| | | */ |
| | | |
| | | /** |
| | | * Ac230v_upsAction_prt_serchByInfo |
| | | * // AC230V不间断电源设备实时数据显示(前100笔数据服务器的时间) |
| | | * 参数json:{"dev_id":"15001"} |
| | |
| | | * Electrical_monitor_stationAction_prt_serchByInfo |
| | | * 电气综合监控台实时数据显示(前100笔数据服务器的时间) |
| | | * 参数json:{"dev_id":"8001"} |
| | | * |
| | | * Battery_monitorAction_prt_serchByInfo |
| | | * 蓄电池充电与监测装置实时数据显示(前100笔数据服务器的时间) |
| | | * 参数json:{"dev_id":"14001"} |
| | | * |
| | | * |
| | | */ |
| | |
| | | url = 'get100Data_TODO_13'; |
| | | break; |
| | | case 14: |
| | | url = 'get100Data_TODO_14'; |
| | | url = 'Battery_monitorAction_prt_serchByInfo'; |
| | | break; |
| | | case 15: |
| | | url = 'Ac230v_upsAction_prt_serchByInfo'; |
| | |
| | | * Electrical_monitor_stationAction_prt_serchHistory |
| | | * 电气综合监控台设备历史数据查询 |
| | | * 参数json:{"dev_id":"8001","record_time":"2020-11-04 15:44:29","record_time1":"2020-11-04 15:54:29"} |
| | | * |
| | | * Battery_monitorAction_prt_serchHistory |
| | | * 蓄电池充电与监测装置设备历史数据查询 |
| | | * 参数json:{"dev_id":"14001","record_time":"2020-11-04 15:44:29","record_time1":"2020-11-04 15:54:29"} |
| | | * |
| | | */ |
| | | ,getHisData (data) { |
| | |
| | | url = 'getHisData_TODO_13'; |
| | | break; |
| | | case 14: |
| | | url = 'getHisData_TODO_14'; |
| | | url = 'Battery_monitorAction_prt_serchHistory'; |
| | | break; |
| | | case 15: |
| | | url = 'Ac230v_upsAction_prt_serchHistory'; |
| | |
| | | * json:{"dev_name":"1号舱室配电板","dev_id":"17001","export_num":"17","table_name":"2020_11_04","record_time":"2020-11-04 14:25:45","record_time1":"2020-11-04 14:25:54","states":"三相线电压AB,三相线电压BC,三相线电压CA,频率","tablists":"threeAB_vol,threeBC_vol,threeCA_vol,Q1F"} |
| | | * json:{"dev_name":"1号可靠分配电板","dev_id":"18001","export_num":"18","table_name":"2020_11_04","record_time":"2020-11-04 14:29:40","record_time1":"2020-11-04 14:29:46","states":"三相线电压AB,三相线电压BC,三相线电压CA,频率","tablists":"threeAB_vol,threeBC_vol,threeCA_vol,Q1F"} |
| | | * |
| | | * CsvFileDownloadAction!searchDownloadFile_partinsystem |
| | | * 历史数据导出 |
| | | * 传参 |
| | | * json:{"dev_name":"1号蓄电池充电与监测装置","dev_id":"14001","export_num":"14","table_name":"2020_11_04","record_time":"2020-11-04 14:20:54","record_time1":"2020-11-04 14:29:56","states":"电池组电压,电池组电流,最高温度,平均电压,1号单体电压","tablists":"group_vol,group_curr,max_tmp,avg_vol,mon_vol1"} |
| | | * |
| | | */ |
| | | ,download (data) { |
| | | return self.$axios({ |
| | |
| | | return res; |
| | | } |
| | | |
| | | function isArray (target) { |
| | | return Object.prototype.toString.call(target) === '[object Array]'; |
| | | } |
| | | |
| | | // 一维数组去重 得用filter |
| | | function unique (arr) { |
| | | return arr.filter(function (v, i, a) { |
| | |
| | | getCurrentDate, |
| | | RAF, |
| | | CAF, |
| | | isArray, |
| | | // throttle, |
| | | setLocalStorage(key,val){ |
| | | const _val = (typeof val == 'object') ? JSON.stringify(val) : val; |
| | |
| | | ,"mon_tmp400": '℃' |
| | | } |
| | | } |
| | | const test = { |
| | | status: ['Q100', 'Q200', 'Q300', 'Q400'] |
| | | ,unit: {} |
| | | } |
| | | const emptyObj = { |
| | | unit: {} |
| | | } |
| | |
| | | import CONFIG from '@/script/config_subject'; |
| | | import Loading from '@/components/Loading' |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | import common from '@/script/common'; |
| | | |
| | | // 设定值的备份 因为要处理最后的余项 |
| | | let category_len = 10; |
| | |
| | | let config = null; |
| | | // 图表实例对象 |
| | | let G = null; |
| | | const isArray = common.isArray; |
| | | let dev_idx = 0; |
| | | export default { |
| | | name: 'subject_history', |
| | | components: { |
| | |
| | | } |
| | | // 选择设备 |
| | | ,selectDev (data) { |
| | | // console.log(data, 'selectdev'); |
| | | console.log(data, 'selectdev'); |
| | | // 设定设备名称 |
| | | this.cur_devname = data.dev_name; |
| | | this.cur_devid = data.dev_id; |
| | |
| | | let selectedLegends = []; |
| | | if (config) { |
| | | // console.log(config); |
| | | Object.keys(config).forEach((v) => { |
| | | /*Object.keys(config).forEach((v) => { |
| | | if (v != 'unit') { |
| | | allLegends.push({ |
| | | key: v, |
| | |
| | | }); |
| | | selectedLegends.push(v); |
| | | } |
| | | }); |
| | | });*/ |
| | | |
| | | let idx = idx || 0; |
| | | |
| | | let props = Object.keys(config); |
| | | for (let i = 0, j = props.length; i < j; i++) { |
| | | const v = props[i]; |
| | | if (v != 'unit') { |
| | | allLegends.push({ |
| | | key: v, |
| | | label: isArray(config[v]) ? config[v][idx] : config[v], |
| | | unit: config.unit[v] |
| | | }); |
| | | selectedLegends.push(v); |
| | | } |
| | | } |
| | | } |
| | | this.allLegends = allLegends; |
| | | this.selectedLegends = selectedLegends; |
| | |
| | | this.$api.subject.checkHis(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | if (res.code) { |
| | | console.log(res.data, 'data========='); |
| | | // console.log(res.data, 'data========='); |
| | | let data = res.data; |
| | | let start = data[0] == '0' ? 0 : new Date(data[0] + ' 00:00:00').getTime(); |
| | | let end = data[1] == '0' ? 0 : new Date(data[1] + ' 23:59:59').getTime(); |