diff --git a/src/assets/i18n/langs/en/electricBox/deviceManage.js b/src/assets/i18n/langs/en/electricBox/deviceManage.js index 52a88651..3735835e 100644 --- a/src/assets/i18n/langs/en/electricBox/deviceManage.js +++ b/src/assets/i18n/langs/en/electricBox/deviceManage.js @@ -22,7 +22,7 @@ export default { edit: '编辑电箱设备', add: '新增电箱设备', }, - rules: {devName: '请输入设备名称'}, + rules: {devName: '请输入设备名称',devSn: "请输入设备编号(MN码)"}, isClosedArr: ['在线', '离线'], voltageA: 'A相相电压阈值', voltageB: 'B相相电压阈值', diff --git a/src/views/equipmentCenter/rainfallManage/devList.vue b/src/views/equipmentCenter/rainfallManage/devList.vue index 01f8f05d..f45bac16 100644 --- a/src/views/equipmentCenter/rainfallManage/devList.vue +++ b/src/views/equipmentCenter/rainfallManage/devList.vue @@ -1,65 +1,111 @@ + - - -
- - - - - - - - - - - - - - - - - - + - - - - - - - - -
-
- + + + + + + + + + + + - diff --git a/src/views/projectFront/rainfallMonitor/alarmWarning.vue b/src/views/projectFront/rainfallMonitor/alarmWarning.vue index 12b7930e..8db86199 100644 --- a/src/views/projectFront/rainfallMonitor/alarmWarning.vue +++ b/src/views/projectFront/rainfallMonitor/alarmWarning.vue @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/src/views/projectFront/rainfallMonitor/relaTimeData.vue b/src/views/projectFront/rainfallMonitor/relaTimeData.vue index 50b0f12b..2d49a0dd 100644 --- a/src/views/projectFront/rainfallMonitor/relaTimeData.vue +++ b/src/views/projectFront/rainfallMonitor/relaTimeData.vue @@ -4,7 +4,7 @@
- {{ $t('message.projectInfo.devName') + ':' }} + {{ $t("message.projectInfo.devName") + ":" }}
--> - - - {{ $t('message.projectInfo.query') }} - - - - {{ $t('message.projectInfo.fresh') }} - + {{ + $t("message.alarmWarning.query") + }} + {{ + $t("message.alarmWarning.refresh") + }}
- - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + rainDevList({ projectSn: this.$store.state.projectSn }).then((result) => { if (result.success) { this.devList = result.result; if (result.result.length > 0) { - this.devSn = result.result[0].devSn + this.devSn = result.result[0].devSn; } - console.log('get设备列表', this.devList); + console.log("get设备列表", this.devList); } - }) + }); }, // 获取当前时间 返回YYYY-MM-DD HH:mm:ss selectNowDate() { @@ -213,17 +215,17 @@ export default { month = date.getMonth() + 1, day = date.getDate(), hours = date.getHours(), //获取当前小时数(0-23) - minutes = date.getMinutes(),//获取当前分钟数(0-59) - seconds = date.getSeconds() + minutes = date.getMinutes(), //获取当前分钟数(0-59) + seconds = date.getSeconds(); month >= 1 && month <= 9 ? (month = "0" + month) : ""; day >= 0 && day <= 9 ? (day = "0" + day) : ""; hours >= 0 && hours <= 9 ? (hours = "0" + hours) : ""; minutes >= 0 && minutes <= 9 ? (minutes = "0" + minutes) : ""; seconds >= 0 && seconds <= 9 ? (seconds = "0" + seconds) : ""; // var timer = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes+ ':' + seconds; - var timer = year + '-' + month + '-' + day - this.valueTime = [timer, timer] - console.log(timer) + var timer = year + "-" + month + "-" + day; + this.valueTime = [timer, timer]; + console.log(timer); // return timer; }, selectDustNoisePageList() { @@ -232,56 +234,64 @@ export default { projectSn: this.$store.state.projectSn, pageNo: this.pageNo, pageSize: this.pageSize, - startTime: this.valueTime ? this.valueTime[0] : '', - endTime: this.valueTime ? this.valueTime[1] : '' - } - rainRecordPageApi(data).then(res => { - console.log(res) + startTime: this.valueTime ? this.valueTime[0] : "", + endTime: this.valueTime ? this.valueTime[1] : "", + }; + rainRecordPageApi(data).then((res) => { + console.log(res); if (res.success) { - this.tableData = res.result.records - this.total = res.result.total + this.tableData = res.result.records; + this.total = res.result.total; } - }) + }); }, //刷新 refresh() { - this.pageNo = 1 - this.pageSize = 10 - this.valueTime = [] - this.selectNowDate() - this.selectDustNoisePageList() + this.pageNo = 1; + this.pageSize = 10; + this.valueTime = []; + this.selectNowDate(); + this.selectDustNoisePageList(); }, quertData() { - this.pageNo = 1 - this.pageSize = 10 - console.log(this.devSn) - this.selectDustNoisePageList() + this.pageNo = 1; + this.pageSize = 10; + console.log(this.devSn); + this.selectDustNoisePageList(); }, handleSizeChange(value) { this.pageSize = value; - this.selectDustNoisePageList() + this.selectDustNoisePageList(); }, handleCurrentChange(value) { this.pageNo = value; - this.selectDustNoisePageList() + this.selectDustNoisePageList(); }, exportExcel() { if (this.valueTime) { window.location.href = this.$http.defaults.baseURL + - "xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn + - "&devSn=" + this.devSn + "&startTime=" + this.transformTimestamp2(this.valueTime[0]) + "&endTime=" + this.transformTimestamp2(this.valueTime[1]); + "xmgl/download/exporExcelTowerAlarm?projectSn=" + + this.projectSn + + "&devSn=" + + this.devSn + + "&startTime=" + + this.transformTimestamp2(this.valueTime[0]) + + "&endTime=" + + this.transformTimestamp2(this.valueTime[1]); } else { window.location.href = this.$http.defaults.baseURL + - "xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn + - "&devSn=" + this.devSn; + "xmgl/download/exporExcelTowerAlarm?projectSn=" + + this.projectSn + + "&devSn=" + + this.devSn; } - } - } -} + }, + }, +};