flx:新增雨量监测模块 设备中后台
This commit is contained in:
parent
bd093bbdff
commit
03f8de0bbc
@ -6,70 +6,93 @@ const routes = [{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
// component: () => import('../views/home/login.vue')
|
||||
component: () => import('../views/home/login_v1.vue')
|
||||
component: () =>
|
||||
import ('../views/home/login_v1.vue')
|
||||
},
|
||||
{
|
||||
path: '/sign',
|
||||
name: 'sign',
|
||||
component: () => import('../views/home/sign.vue')
|
||||
component: () =>
|
||||
import ('../views/home/sign.vue')
|
||||
},
|
||||
{
|
||||
path: '/map_app',
|
||||
name: 'map_app',
|
||||
component: () => import('../components/map_app.vue')
|
||||
component: () =>
|
||||
import ('../components/map_app.vue')
|
||||
},
|
||||
{
|
||||
path: '/equipmentCenter/',
|
||||
name: 'page',
|
||||
component: () => import('@/components/layout.vue'),
|
||||
component: () =>
|
||||
import ('@/components/layout.vue'),
|
||||
children: [{
|
||||
path: 'videoAlarmList',
|
||||
name: 'videoAlarmList',
|
||||
component: () => import('../views/equipmentCenter/videoManage/cameraList.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/videoManage/cameraList.vue'),
|
||||
}, {
|
||||
path: 'cameraList',
|
||||
name: '视频监控_摄像机列表',
|
||||
component: () => import('../views/equipmentCenter/videoManage/videoConfig.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/videoManage/videoConfig.vue'),
|
||||
}, {
|
||||
path: 'laborDevManage',
|
||||
name: '劳务管理_设备管理',
|
||||
component: () => import('../views/equipmentCenter/laborManage/devConfig.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/laborManage/devConfig.vue'),
|
||||
}, {
|
||||
path: 'accessGroup',
|
||||
name: '劳务管理_门禁分组',
|
||||
component: () => import('../views/equipmentCenter/laborManage/accessGroup.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/laborManage/accessGroup.vue'),
|
||||
}, {
|
||||
path: 'markingRoomDevManage',
|
||||
name: '标养室_设备管理',
|
||||
component: () => import('../views/equipmentCenter/markingRoom/devConfig.vue'),
|
||||
}, {
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/markingRoom/devConfig.vue'),
|
||||
},
|
||||
{
|
||||
path: 'rainfallManage',
|
||||
name: '绿色施工_雨量设备管理',
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/rainfallManage/devList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'envirDevManage',
|
||||
name: '绿色施工_扬尘设备管理',
|
||||
component: () => import('../views/equipmentCenter/environmentManage/devList.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/environmentManage/devList.vue'),
|
||||
}, {
|
||||
path: 'sprayDevManage',
|
||||
name: '绿色施工_雾炮喷淋设备管理',
|
||||
component: () => import('../views/equipmentCenter/environmentManage/sprayDevManage.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/environmentManage/sprayDevManage.vue'),
|
||||
}, {
|
||||
path: 'sprayDevManageRT',
|
||||
name: '绿色施工_喷淋设备管理',
|
||||
component: () => import('../views/equipmentCenter/environmentManage/sprayDevManageRT.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/environmentManage/sprayDevManageRT.vue'),
|
||||
}, {
|
||||
path: 'electricDevManage',
|
||||
name: '电箱管理_设备管理',
|
||||
component: () => import('../views/equipmentCenter/electricBox/deviceManage'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/electricBox/deviceManage'),
|
||||
}, {
|
||||
path: 'carCameraDev',
|
||||
name: '车辆管理_车辆相机管理',
|
||||
component: () => import('../views/equipmentCenter/carManage/carCameraDev'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/carManage/carCameraDev'),
|
||||
}, {
|
||||
path: 'carGateDev',
|
||||
name: '车辆管理_车辆闸门管理',
|
||||
component: () => import('../views/equipmentCenter/carManage/carGateDev'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/carManage/carGateDev'),
|
||||
}, {
|
||||
path: 'carWashDevManage',
|
||||
name: '车辆冲洗_设备管理',
|
||||
component: () => import('../views/projectFront/carManage/carWashDevManage.vue'),
|
||||
component: () =>
|
||||
import ('../views/projectFront/carManage/carWashDevManage.vue'),
|
||||
},
|
||||
{
|
||||
path: 'towerCraneList', //塔吊管理 基本信息
|
||||
@ -111,32 +134,38 @@ const routes = [{
|
||||
}, {
|
||||
path: 'aiAnalysisDevManage',
|
||||
name: 'AI预警中心_设备管理',
|
||||
component: () => import('@/views/projectFront/aiAnalysis/devManage.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectFront/aiAnalysis/devManage.vue')
|
||||
},
|
||||
{
|
||||
path: 'gantryCraneDevManage',
|
||||
name: '龙门吊_设备管理',
|
||||
component: () => import('@/views/projectLevel/gantryCrane/gantryCraneInfo.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/gantryCrane/gantryCraneInfo.vue')
|
||||
},
|
||||
{
|
||||
path: 'photovoltaic',
|
||||
name: '光伏发电_实时数据_设备管理',
|
||||
component: () => import('@/views/projectLevel/photovoltaic/photovoltaic.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/photovoltaic/photovoltaic.vue')
|
||||
},
|
||||
{
|
||||
path: 'photovoltaicEquipment',
|
||||
name: '光伏发电_光伏设备_设备管理',
|
||||
component: () => import('@/views/projectLevel/photovoltaic/photovoltaicEquipment.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/photovoltaic/photovoltaicEquipment.vue')
|
||||
},
|
||||
{
|
||||
path: 'bicarbonEquipment',
|
||||
name: '双碳设备_加油记录_设备管理',
|
||||
component: () => import('@/views/projectLevel/bicarbonEquipment/bicarbonEquipment.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/bicarbonEquipment/bicarbonEquipment.vue')
|
||||
},
|
||||
{
|
||||
path: 'bicarbonEquipmentManage',
|
||||
name: '双碳设备_设备管理',
|
||||
component: () => import('@/views/projectLevel/bicarbonEquipment/bicarbonEquipmentManage.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/bicarbonEquipment/bicarbonEquipmentManage.vue')
|
||||
},
|
||||
{
|
||||
path: 'edgequtManagement',
|
||||
@ -166,7 +195,8 @@ const routes = [{
|
||||
{
|
||||
path: '/equipmentCenterIndx',
|
||||
name: 'equipmentCenterIndx',
|
||||
component: () => import('@/views/equipmentCenter/equipmentCenterIndex.vue'),
|
||||
component: () =>
|
||||
import ('@/views/equipmentCenter/equipmentCenterIndex.vue'),
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
17
src/assets/js/api/rainfallManage.js
Normal file
17
src/assets/js/api/rainfallManage.js
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* api接口统一管理
|
||||
*/
|
||||
import { post, get } from '../http'
|
||||
//绿色施工
|
||||
export const rainDevAdd = data => post('xmgl/rainDev/add', data); //添加雨量设备信息
|
||||
export const rainDevEdit = data => post('xmgl/rainDev/edit', data); //编辑雨量设备信息
|
||||
export const rainDevDelete = data => post('xmgl/rainDev/delete', data); //删除雨量设备信息
|
||||
export const rainDevList = data => get('xmgl/rainDev/list', data); //列表查询雨量设备信息
|
||||
|
||||
export const getLaborManagementInfoList = data => post('xmgl/systemUser/getProjectChilderSystemUserList', data); //查询劳务和管理人员列表
|
||||
|
||||
// 分页列表查询环境实时数据
|
||||
export const rainRecordPageApi = data => get('xmgl/rainRecord/page', data);
|
||||
|
||||
//报警预警
|
||||
export const rainAlarmList = data => get('xmgl/rainAlarm/page', data); //分页列表查询绿色设备报警预警数据信息
|
||||
@ -172,8 +172,8 @@ if (process.env.NODE_ENV == "development") {
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234/' //郭圣雄远程
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
@ -188,6 +188,8 @@ if (process.env.NODE_ENV == "development") {
|
||||
// axios.defaults.baseURL = 'http://42.180.188.17:11211/' //鞍钢测试地址
|
||||
// axios.defaults.baseURL = 'http://8.136.222.164:8808/' //中科安信正式地址
|
||||
// axios.defaults.baseURL = 'http://1.13.185.209:9820/' //中科佳成正式地址
|
||||
// axios.defaults.baseURL = 'http://192.168.100.4:9809/' //南京汇创正式地址
|
||||
|
||||
} else if (process.env.NODE_ENV == "debug") {
|
||||
axios.defaults.baseURL = "https://www.ceshi.com";
|
||||
} else if (process.env.NODE_ENV == "production") {
|
||||
|
||||
@ -6,70 +6,93 @@ const routes = [{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
// component: () => import('../views/home/login.vue')
|
||||
component: () => import('../views/home/login_v1.vue')
|
||||
component: () =>
|
||||
import ('../views/home/login_v1.vue')
|
||||
},
|
||||
{
|
||||
path: '/sign',
|
||||
name: 'sign',
|
||||
component: () => import('../views/home/sign.vue')
|
||||
component: () =>
|
||||
import ('../views/home/sign.vue')
|
||||
},
|
||||
{
|
||||
path: '/map_app',
|
||||
name: 'map_app',
|
||||
component: () => import('../components/map_app.vue')
|
||||
component: () =>
|
||||
import ('../components/map_app.vue')
|
||||
},
|
||||
{
|
||||
path: '/equipmentCenter/',
|
||||
name: 'page',
|
||||
component: () => import('@/components/layout.vue'),
|
||||
component: () =>
|
||||
import ('@/components/layout.vue'),
|
||||
children: [{
|
||||
path: 'videoAlarmList',
|
||||
name: 'videoAlarmList',
|
||||
component: () => import('../views/equipmentCenter/videoManage/cameraList.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/videoManage/cameraList.vue'),
|
||||
}, {
|
||||
path: 'cameraList',
|
||||
name: '视频监控_摄像机列表',
|
||||
component: () => import('../views/equipmentCenter/videoManage/videoConfig.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/videoManage/videoConfig.vue'),
|
||||
}, {
|
||||
path: 'laborDevManage',
|
||||
name: '劳务管理_设备管理',
|
||||
component: () => import('../views/equipmentCenter/laborManage/devConfig.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/laborManage/devConfig.vue'),
|
||||
}, {
|
||||
path: 'accessGroup',
|
||||
name: '劳务管理_门禁分组',
|
||||
component: () => import('../views/equipmentCenter/laborManage/accessGroup.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/laborManage/accessGroup.vue'),
|
||||
}, {
|
||||
path: 'markingRoomDevManage',
|
||||
name: '标养室_设备管理',
|
||||
component: () => import('../views/equipmentCenter/markingRoom/devConfig.vue'),
|
||||
}, {
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/markingRoom/devConfig.vue'),
|
||||
},
|
||||
{
|
||||
path: 'rainfallManage',
|
||||
name: '绿色施工_雨量设备管理',
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/rainfallManage/devList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'envirDevManage',
|
||||
name: '绿色施工_扬尘设备管理',
|
||||
component: () => import('../views/equipmentCenter/environmentManage/devList.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/environmentManage/devList.vue'),
|
||||
}, {
|
||||
path: 'sprayDevManage',
|
||||
name: '绿色施工_雾炮喷淋设备管理',
|
||||
component: () => import('../views/equipmentCenter/environmentManage/sprayDevManage.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/environmentManage/sprayDevManage.vue'),
|
||||
}, {
|
||||
path: 'sprayDevManageRT',
|
||||
name: '绿色施工_雾炮喷淋设备管理',
|
||||
component: () => import('../views/equipmentCenter/environmentManage/sprayDevManageRT.vue'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/environmentManage/sprayDevManageRT.vue'),
|
||||
}, {
|
||||
path: 'electricDevManage',
|
||||
name: '电箱管理_设备管理',
|
||||
component: () => import('../views/equipmentCenter/electricBox/deviceManage'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/electricBox/deviceManage'),
|
||||
}, {
|
||||
path: 'carCameraDev',
|
||||
name: '车辆管理_车辆相机管理',
|
||||
component: () => import('../views/equipmentCenter/carManage/carCameraDev'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/carManage/carCameraDev'),
|
||||
}, {
|
||||
path: 'carGateDev',
|
||||
name: '车辆管理_车辆闸门管理',
|
||||
component: () => import('../views/equipmentCenter/carManage/carGateDev'),
|
||||
component: () =>
|
||||
import ('../views/equipmentCenter/carManage/carGateDev'),
|
||||
}, {
|
||||
path: 'carWashDevManage',
|
||||
name: '车辆冲洗_设备管理',
|
||||
component: () => import('../views/projectFront/carManage/carWashDevManage.vue'),
|
||||
component: () =>
|
||||
import ('../views/projectFront/carManage/carWashDevManage.vue'),
|
||||
},
|
||||
{
|
||||
path: 'towerCraneList', //塔吊管理 基本信息
|
||||
@ -111,32 +134,38 @@ const routes = [{
|
||||
}, {
|
||||
path: 'aiAnalysisDevManage',
|
||||
name: 'AI预警中心_设备管理',
|
||||
component: () => import('@/views/projectFront/aiAnalysis/devManage.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectFront/aiAnalysis/devManage.vue')
|
||||
},
|
||||
{
|
||||
path: 'gantryCraneDevManage',
|
||||
name: '龙门吊_设备管理',
|
||||
component: () => import('@/views/projectLevel/gantryCrane/gantryCraneInfo.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/gantryCrane/gantryCraneInfo.vue')
|
||||
},
|
||||
{
|
||||
path: 'photovoltaic',
|
||||
name: '光伏发电_实时数据_设备管理',
|
||||
component: () => import('@/views/projectLevel/photovoltaic/photovoltaic.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/photovoltaic/photovoltaic.vue')
|
||||
},
|
||||
{
|
||||
path: 'photovoltaicEquipment',
|
||||
name: '光伏发电_光伏设备_设备管理',
|
||||
component: () => import('@/views/projectLevel/photovoltaic/photovoltaicEquipment.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/photovoltaic/photovoltaicEquipment.vue')
|
||||
},
|
||||
{
|
||||
path: 'bicarbonEquipment',
|
||||
name: '双碳设备_加油记录_设备管理',
|
||||
component: () => import('@/views/projectLevel/bicarbonEquipment/bicarbonEquipment.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/bicarbonEquipment/bicarbonEquipment.vue')
|
||||
},
|
||||
{
|
||||
path: 'bicarbonEquipmentManage',
|
||||
name: '双碳设备_设备管理',
|
||||
component: () => import('@/views/projectLevel/bicarbonEquipment/bicarbonEquipmentManage.vue')
|
||||
component: () =>
|
||||
import ('@/views/projectLevel/bicarbonEquipment/bicarbonEquipmentManage.vue')
|
||||
},
|
||||
{
|
||||
path: 'edgequtManagement',
|
||||
@ -167,7 +196,8 @@ const routes = [{
|
||||
{
|
||||
path: '/equipmentCenterIndx',
|
||||
name: 'equipmentCenterIndx',
|
||||
component: () => import('@/views/equipmentCenter/equipmentCenterIndex.vue'),
|
||||
component: () =>
|
||||
import ('@/views/equipmentCenter/equipmentCenterIndex.vue'),
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
@ -258,10 +258,8 @@ const routes2 = [{
|
||||
name: "page",
|
||||
component: () =>
|
||||
isDockingToWoer ?
|
||||
import ("@/components/layout_zhongjian.vue") :
|
||||
enabledProjectV2 == 1 ?
|
||||
import ("@/views/projectLevel/common/page.vue") :
|
||||
import ("@/components/layout.vue"),
|
||||
import ("@/components/layout_zhongjian.vue") : enabledProjectV2 == 1 ?
|
||||
import ("@/views/projectLevel/common/page.vue") : import ("@/components/layout.vue"),
|
||||
meta: {
|
||||
keepAlive: true,
|
||||
},
|
||||
@ -2534,6 +2532,18 @@ const routes2 = [{
|
||||
"@/views/projectFront/qualitySafeReport/engineeringManagement.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/project/rainfallMonitor/reportForm",
|
||||
name: "雨量监测-数据台账",
|
||||
component: () =>
|
||||
import ("@/views/projectFront/rainfallMonitor/reportForm.vue"),
|
||||
},
|
||||
{
|
||||
path: "/project/rainfallMonitor/alarmWarning",
|
||||
name: "绿色施工_报警预警1",
|
||||
component: () =>
|
||||
import ("@/views/projectFront/rainfallMonitor/alarmWarning.vue"),
|
||||
},
|
||||
{
|
||||
path: "/project/environmentalMonitor/reportForm",
|
||||
name: "环境监测-数据台账",
|
||||
|
||||
@ -46,6 +46,8 @@ export default new Vuex.Store({
|
||||
|
||||
state: {
|
||||
PAGESIZRS: [10, 20, 30, 50],
|
||||
// UPLOADURL: 'http://192.168.100.4:9809/upload/image/', // 南京汇创
|
||||
// FILEURL: 'http://192.168.100.4:9809/image/', //南京汇创
|
||||
// UPLOADURL:' http://101.43.164.214:11111/upload/image/',// 百色
|
||||
// FILEURL:' http://101.43.164.214:11111/image/',// 百色
|
||||
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',
|
||||
|
||||
@ -166,6 +166,22 @@ export default {
|
||||
path: "/equipmentCenter/sprayDevManageRT",
|
||||
},
|
||||
],
|
||||
},{
|
||||
moduleName: this.$t('message.middleGround.moduleName7'), // 绿色施工
|
||||
subhead: this.$t('message.middleGround.subhead7'), // 扬尘设备新增、编辑、删除
|
||||
operation: true,
|
||||
id: 4,
|
||||
openedUrl: require("../../assets/images/menu/lssg_active.png"),
|
||||
shutUrl: require("../../assets/images/menu/lssg.png"),
|
||||
children: [
|
||||
{
|
||||
menuName: this.$t('message.middleGround.moduleName8'), // 扬尘设备管理
|
||||
subhead: this.$t('message.middleGround.subhead2'), // 人员管理
|
||||
operation: true,
|
||||
id: 21,
|
||||
path: "/equipmentCenter/rainfallManage",
|
||||
},
|
||||
],
|
||||
},{
|
||||
moduleName: this.$t('message.middleGround.moduleName10'), // 电箱管理
|
||||
subhead: this.$t('message.middleGround.subhead10'), // 电箱设备新增、编辑、删除
|
||||
|
||||
341
src/views/equipmentCenter/rainfallManage/devList.vue
Normal file
341
src/views/equipmentCenter/rainfallManage/devList.vue
Normal file
@ -0,0 +1,341 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-button type="warning" size="medium" plain @click="refresh">{{$t('message.alarmValueSet.refresh')}}</el-button>
|
||||
<el-button type="primary" size="medium" @click="add">{{$t('message.alarmValueSet.add')}}</el-button>
|
||||
<!-- <span class="downloadBtn primaryText" @click="downloadFn">
|
||||
{{$t('message.alarmValueSet.protocolDownload')}}
|
||||
</span> -->
|
||||
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<el-table class="tables" :data="List">
|
||||
<el-table-column width="200" prop="devName" align="center"
|
||||
:label="$t('message.alarmValueSet.deviceName')"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column prop="devSn" :label="$t('message.alarmValueSet.deviceId')"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="isClosed" :label="$t('message.alarmValueSet.isClosed')"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{scope.row.devOnline==1?'在线':'离线'}}</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="address" width="100" :label="$t('message.alarmValueSet.address')"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="realTime" width="200"
|
||||
:label="$t('message.alarmValueSet.createTime')"
|
||||
align="center"></el-table-column> -->
|
||||
<el-table-column
|
||||
:label="$t('message.alarmValueSet.operation')" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<!--<div @click="yu(scope.row)" class="operationText"><img src="@/assets/images/yu.png" alt="">{{$t('message.alarmValueSet.yjz')}}
|
||||
</div>
|
||||
<div @click="bao(scope.row)" class="operationText"><img src="@/assets/images/bao.png" alt="">{{$t('message.alarmValueSet.bjz')}}
|
||||
</div>-->
|
||||
<div @click="edit(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px"/>
|
||||
<span>{{$t('message.alarmValueSet.edit')}}</span>
|
||||
</div>
|
||||
<div @click="deleteDev(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px"/>
|
||||
<span>{{$t('message.alarmValueSet.delete')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-dialog @close="close"
|
||||
:modal-append-to-body="false"
|
||||
:title="$t('message.alarmValueSet.Popup_title')[Popup.type]"
|
||||
:visible.sync="Popup.show"
|
||||
width="667px">
|
||||
<div class="dialog_content">
|
||||
<el-form v-show="Popup.type === 'add'||Popup.type === 'edit'" size="medium"
|
||||
ref="addEditForm" :model="addEditForm" :rules="addEditRules"
|
||||
label-width="120px" class="dialogFormBox">
|
||||
<el-form-item :label="$t('message.alarmValueSet.dialog_edit.deviceId')+'(MN'+$t('message.alarmValueSet.code')+')'" prop="devSn">
|
||||
<el-input v-model="addEditForm.devSn" :disabled="Popup.type === 'edit'"
|
||||
:placeholder="$t('message.alarmValueSet.placeholder')"></el-input>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="接收时间" prop="realTime">
|
||||
<el-date-picker
|
||||
v-model="addEditForm.realTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd hh:mm:ss"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item :label="$t('message.alarmValueSet.dialog_edit.isEnable')" prop="isEnable">
|
||||
<el-radio-group v-model="addEditForm.isEnable">
|
||||
<el-radio :label="0">{{$t('message.alarmValueSet.dialog_edit.isEnableArr')[0]}}</el-radio>
|
||||
<el-radio :label="1">{{$t('message.alarmValueSet.dialog_edit.isEnableArr')[1]}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('message.alarmValueSet.dialog_edit.name')" prop="devName">
|
||||
<el-input v-model="addEditForm.devName"
|
||||
:placeholder="$t('message.alarmValueSet.placeholder')"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('message.alarmValueSet.dialog_edit.address')">
|
||||
<el-input v-model="addEditForm.address"
|
||||
:placeholder="$t('message.alarmValueSet.placeholder')"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('message.alarmValueSet.dialog_edit.lng')">
|
||||
<el-input v-model="addEditForm.lng"
|
||||
:placeholder="$t('message.alarmValueSet.placeholder')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('message.alarmValueSet.dialog_edit.lat')">
|
||||
<el-input v-model="addEditForm.lat"
|
||||
:placeholder="$t('message.alarmValueSet.placeholder')"></el-input>
|
||||
</el-form-item>
|
||||
<!-- 报警推送人-->
|
||||
<!-- <el-form-item :label="$t('message.alarmValueSet.dialog_edit.camera')" >
|
||||
<el-select
|
||||
v-model="addEditForm.videoList"
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 100%"
|
||||
:placeholder="$t('message.alarmValueSet.placeholder_select')"
|
||||
>
|
||||
<el-option v-for='item in videoList'
|
||||
:key="item.itemId"
|
||||
:label="item.videoName"
|
||||
:value="item.itemId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('message.alarmValueSet.dialog_edit.pusher')">
|
||||
<el-select v-model="addEditForm.alarmPushWorkerId" multiple
|
||||
filterable
|
||||
:placeholder="$t('message.alarmValueSet.placeholder_select')">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.workerId"
|
||||
:label="item.workerName"
|
||||
:value="item.workerId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="Popup.show = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{$t('message.alarmValueSet.cancel')}}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click="submit"
|
||||
size="medium"
|
||||
>{{$t('message.alarmValueSet.save')}}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
rainDevAdd,
|
||||
rainDevEdit,
|
||||
rainDevDelete,
|
||||
rainDevList, getLaborManagementInfoList
|
||||
} from '../../../assets/js/api/rainfallManage'
|
||||
import {
|
||||
getVideoItemListApi,
|
||||
} from "@/assets/js/api/lifter";
|
||||
export default {
|
||||
mounted() {
|
||||
this.getList();
|
||||
this.getLaborManagementList();
|
||||
this.getVideoItemList();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
props: {
|
||||
multiple: true
|
||||
},
|
||||
addEditRules: {
|
||||
devName: [
|
||||
{required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: "blur"},
|
||||
{required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: "change"}
|
||||
]
|
||||
},
|
||||
options: [
|
||||
/*{realName: "曾祥万", value: 1},
|
||||
{realName: "李先生", value: 2},*/
|
||||
],
|
||||
addEditForm: {
|
||||
isEnable: 0
|
||||
},
|
||||
List: [
|
||||
/*{
|
||||
devSn: "124578",
|
||||
devName: "扬尘监测1",
|
||||
isClosed: 2,
|
||||
address: "22",
|
||||
createTime: "2019-05-05 16:55:46",
|
||||
}*/
|
||||
],
|
||||
Popup: {
|
||||
type: 'add',
|
||||
show: false
|
||||
},
|
||||
videoList:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadFn(){
|
||||
// 环境对接协议
|
||||
window.open('/doc/'+this.$t('message.alarmValueSet.envDockingProtocol')+'.zip')
|
||||
},
|
||||
handle(type, show) {//打开弹窗前的统一处理
|
||||
this.Popup = {
|
||||
type: type,
|
||||
show: show
|
||||
}
|
||||
},
|
||||
Change() {
|
||||
},
|
||||
add() {
|
||||
this.handle('add', true);
|
||||
},
|
||||
//获取摄像机列表
|
||||
getVideoItemList() {
|
||||
let data = {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
};
|
||||
console.log(data)
|
||||
getVideoItemListApi(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
console.log(res)
|
||||
this.videoList = res.result.list;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
edit(obj) {
|
||||
console.log('编辑', obj);
|
||||
this.addEditForm = JSON.parse(JSON.stringify(obj));
|
||||
console.log(this.addEditForm)
|
||||
// let videoArr = []
|
||||
// this.addEditForm.videoList && this.addEditForm.videoList.forEach(x=>{
|
||||
// videoArr.push(x.videoItemId)
|
||||
// })
|
||||
// this.addEditForm.videoList = videoArr
|
||||
if (typeof obj.alarmPushWorkerId === 'string'&& obj.alarmPushWorkerId != '') {
|
||||
this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId.split(',')
|
||||
}
|
||||
this.handle('edit', true);
|
||||
},
|
||||
deleteDev(obj) {
|
||||
console.log('删除', obj);
|
||||
this.$confirm(this.$t('message.personnelPosition.beaconManage.table.confirmText') + "【" + obj.devName + "】?", this.$t('message.personnelPosition.beaconManage.table.Tips'), {
|
||||
confirmButtonText: this.$t('message.personnelPosition.confirmButtonText'),
|
||||
cancelButtonText: this.$t('message.personnelPosition.cancelButtonText'),
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
rainDevDelete({id: obj.id}).then(result => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
this.$refs.addEditForm.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(this.addEditForm)
|
||||
let params = JSON.parse(JSON.stringify(this.addEditForm));
|
||||
console.log(params)
|
||||
if(this.addEditForm.alarmPushWorkerId&&this.addEditForm.alarmPushWorkerId.length>0){
|
||||
params.alarmPushWorkerId = this.addEditForm.alarmPushWorkerId.join(',');
|
||||
}else{
|
||||
params.alarmPushWorkerId = ''
|
||||
}
|
||||
// let videoArr = []
|
||||
// for (let i = 0; i < params.videoList.length; i++) {
|
||||
// let obj = { videoItemId: params.videoList[i] };
|
||||
// videoArr.push(obj);
|
||||
// }
|
||||
// params.videoList = videoArr
|
||||
params.projectSn = this.$store.state.projectSn;
|
||||
if (this.Popup.type === 'add') {
|
||||
rainDevAdd(params).then(result => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
} else if (this.Popup.type === 'edit') {
|
||||
console.log('编辑信息', this.addEditForm)
|
||||
rainDevEdit(params).then(result => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
}
|
||||
this.Popup.show = false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
refresh() {
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
rainDevList({projectSn: this.$store.state.projectSn}).then(result => {
|
||||
if (result.success) {
|
||||
this.List = result.result;
|
||||
console.log('列表', result);
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.addEditForm = {
|
||||
isEnable: 0
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addEditForm.clearValidate();
|
||||
})
|
||||
},
|
||||
getLaborManagementList() {
|
||||
getLaborManagementInfoList({projectSn: this.$store.state.projectSn, workerName: ''}).then(result => {
|
||||
if (result.success) {
|
||||
console.log('施工人员', result);
|
||||
this.options = result.result;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.tableBtns {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.yj-dialogFormBox {
|
||||
width: 462px;
|
||||
}
|
||||
.searchBox{
|
||||
position: relative;
|
||||
}
|
||||
.downloadBtn{
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 30px;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
183
src/views/projectFront/rainfallMonitor/alarmWarning.vue
Normal file
183
src/views/projectFront/rainfallMonitor/alarmWarning.vue
Normal file
@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="searchBox whiteBlock">
|
||||
<!-- <el-select v-model="queryInfo.alarmTypeId" size="medium"
|
||||
:placeholder="$t('message.alarmWarning.alarmTypeId')">
|
||||
<el-option
|
||||
v-for="item in alarmTypeIdArr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
<!-- <el-select v-model="queryInfo.type" size="medium"
|
||||
:placeholder="$t('message.alarmWarning.alarmTypeId')">
|
||||
<el-option
|
||||
v-for="(item,index) in $t('message.alarmWarning.typeArr')"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
<el-select v-model="queryInfo.deviceId" size="medium"
|
||||
:placeholder="$t('message.alarmWarning.deviceId')">
|
||||
<el-option
|
||||
v-for="item in deviceIdArr"
|
||||
:key="item.id"
|
||||
:label="item.devName"
|
||||
:value="item.devSn">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="time" size="medium"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
:start-placeholder="$t('message.alarmWarning.startTime')"
|
||||
:end-placeholder="$t('message.alarmWarning.endTime')">
|
||||
</el-date-picker>
|
||||
<el-button type="primary" plain size="medium" @click="query">{{$t('message.alarmWarning.query')}}</el-button>
|
||||
<el-button type="warning" plain size="medium" @click="refresh">{{$t('message.alarmWarning.refresh')}}</el-button>
|
||||
<!-- <el-button type="primary" size="medium">{{$t('message.alarmWarning.dc')}}</el-button> -->
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<el-table class="tables" :data="List">
|
||||
<el-table-column prop="type" :label="$t('message.alarmWarning.typeLabel')" align="center" width="100">
|
||||
<template slot-scope="scope">{{$t('message.alarmWarning.typeArr')[scope.row.type]}}</template>
|
||||
</el-table-column>
|
||||
<!-- 报警名称 -->
|
||||
<el-table-column prop="alarmTypeName" :label="$t('message.projectInfo.alarmName')"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column width="200" prop="deviceName" align="center"
|
||||
:label="$t('message.alarmWarning.deviceName')"
|
||||
></el-table-column>
|
||||
<el-table-column prop="avgData" :label="$t('message.alarmWarning.avgData')"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="alarmValue" :label="$t('message.alarmWarning.alarmValue')"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="tempAlarmTime" :label="$t('message.alarmWarning.alarmTime')" align="center">
|
||||
<!-- <template slot-scope="scope">{{new Date(scope.row.alarmTime).toLocaleDateString().replace(/\//g,
|
||||
'-')}}
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column prop="exceedVal" :label="$t('message.alarmWarning.exceed')"
|
||||
align="center"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagerBox"
|
||||
@size-change="SizeChange"
|
||||
@current-change="CurrentChange"
|
||||
:current-page="pagInfo.pageNo"
|
||||
:page-sizes="$store.state.PAGESIZRS"
|
||||
:page-size="pagInfo.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="Number(pagInfo.total)"
|
||||
background
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
rainDevList,
|
||||
rainAlarmList,
|
||||
} from '../../../assets/js/api/rainfallManage'
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.selectNowDate()
|
||||
this.getList();
|
||||
this.getDevice();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
time: [],
|
||||
alarmTypeIdArr: [{
|
||||
value: 0,
|
||||
label: '报警'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '预警'
|
||||
},],
|
||||
deviceIdArr: [],
|
||||
queryInfo: {},
|
||||
pagInfo: {
|
||||
pageNo: 1,//页数
|
||||
pageSize: 10,//条数
|
||||
total: 0,//总条数
|
||||
},
|
||||
List: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取当前时间 返回YYYY-MM-DD HH:mm:ss
|
||||
selectNowDate(){
|
||||
var date = new Date(),
|
||||
year = date.getFullYear(),
|
||||
month = date.getMonth() + 1,
|
||||
day = date.getDate(),
|
||||
hours = date.getHours(), //获取当前小时数(0-23)
|
||||
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.time = [timer,timer]
|
||||
console.log(timer)
|
||||
// return timer;
|
||||
},
|
||||
refresh() {
|
||||
this.queryInfo = {};
|
||||
this.time = [];
|
||||
this.pagInfo.pageNo = 1;//页数
|
||||
this.pagInfo.pageSize = 10;//条数
|
||||
this.selectNowDate()
|
||||
this.getList();
|
||||
},
|
||||
query() {
|
||||
this.getList();
|
||||
this.queryInfo.startTime = this.time[0];
|
||||
this.queryInfo.endTime = this.time[1];
|
||||
this.pagInfo.pageNo = 1;
|
||||
console.log('query', this.queryInfo);
|
||||
},
|
||||
getDevice() {
|
||||
rainDevList({projectSn: this.$store.state.projectSn}).then(result => {
|
||||
if (result.success) {
|
||||
this.deviceIdArr = result.result;
|
||||
console.log('get设备列表', this.deviceIdArr);
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
let timeObj={
|
||||
startTime: this.time?this.time[0]:'',
|
||||
endTime: this.time?this.time[1]:''
|
||||
}
|
||||
rainAlarmList(Object.assign(this.queryInfo, this.pagInfo, {projectSn: this.$store.state.projectSn},timeObj)).then(result => {
|
||||
if (result.success) {
|
||||
this.List = result.result.records;
|
||||
this.pagInfo.total = result.result.total;
|
||||
console.log('列表', result);
|
||||
}
|
||||
})
|
||||
},
|
||||
SizeChange(val) {
|
||||
this.pagInfo.pageSize = val;
|
||||
this.getList();
|
||||
},
|
||||
CurrentChange(val) {
|
||||
this.pagInfo.pageNo = val;
|
||||
this.getList();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.searchBox > div {
|
||||
margin-right: 15px;
|
||||
}
|
||||
</style>
|
||||
321
src/views/projectFront/rainfallMonitor/relaTimeData.vue
Normal file
321
src/views/projectFront/rainfallMonitor/relaTimeData.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<div class="search-box">
|
||||
<div class="search-item">
|
||||
<span>
|
||||
<!-- 设备名称: -->
|
||||
{{ $t('message.projectInfo.devName') + ':' }}
|
||||
</span>
|
||||
<!-- 请选择 -->
|
||||
<el-select
|
||||
style="margin-right: 20px"
|
||||
v-model="devSn"
|
||||
size="medium"
|
||||
:placeholder="$t('message.projectInfo.pleaseChoose')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in devList"
|
||||
:key="item.id"
|
||||
:label="item.devName"
|
||||
:value="item.devSn"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- 开始日期 -->
|
||||
<el-date-picker
|
||||
class="serarch_picker"
|
||||
size="medium"
|
||||
v-model="valueTime"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
:start-placeholder="$t('message.projectInfo.start')"
|
||||
:end-placeholder="$t('message.projectInfo.end')"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<!-- <div class="search-item">
|
||||
<el-date-picker
|
||||
size="medium"
|
||||
v-model="timeList"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div> -->
|
||||
<el-button size="medium" @click="quertData">
|
||||
<!-- 查询 -->
|
||||
{{ $t('message.projectInfo.query') }}
|
||||
</el-button>
|
||||
<el-button size="medium" @click="refresh">
|
||||
<!-- 刷新 -->
|
||||
{{ $t('message.projectInfo.fresh') }}
|
||||
</el-button>
|
||||
<!-- <el-button size="medium" @click="exportExcel">导出</el-button> -->
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
class="tables"
|
||||
height="320"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
:label="$t('message.projectInfo.devName')"
|
||||
prop="devName"
|
||||
align="center"
|
||||
width="150"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column
|
||||
label="设备id"
|
||||
prop="deviceId"
|
||||
>
|
||||
|
||||
</el-table-column> -->
|
||||
<!-- crc校验值 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('累计雨量mm')"
|
||||
prop="accumulatedRainfall"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('当前雨量(今日雨量)mm')"
|
||||
prop="currentRainfall"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('日雨量(昨日雨量)mm')"
|
||||
prop="dailyRainfall"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('瞬时雨量mm')"
|
||||
prop="instantaneousRainfall"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- 湿度 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('空气湿度%')"
|
||||
prop="airHumidity"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- 噪音 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('空气温度℃')"
|
||||
prop="airTemperature"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- 板载湿度 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('大气压Kpa')"
|
||||
prop="atmosphericPressure"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- 板载温度 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('风向')"
|
||||
prop="windDirection"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('风力/级')"
|
||||
prop="windForce"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('风速m/s')"
|
||||
prop="windSpeed"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- 上传时间 -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
:label="$t('message.projectInfo.uploadDate')"
|
||||
width="200"
|
||||
prop="updateDate"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagerBox"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="pageNo"
|
||||
:page-sizes="$store.state.PAGESIZRS"
|
||||
:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="Number(total)"
|
||||
background
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment";
|
||||
import {
|
||||
rainRecordPageApi,
|
||||
rainDevList
|
||||
} from '../../../assets/js/api/rainfallManage'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
devSn: "",
|
||||
projectSn: "",
|
||||
devList: [],
|
||||
tableData: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
timeList: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
valueTime: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.projectSn = this.$store.state.projectSn;
|
||||
this.startTime = this.endTime = moment(new Date()).format('YYYY-MM-DD')
|
||||
console.log(this.startTime, this.endTime)
|
||||
this.getDevice()
|
||||
this.selectNowDate()
|
||||
this.selectDustNoisePageList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getDevice() {
|
||||
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
|
||||
}
|
||||
console.log('get设备列表', this.devList);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取当前时间 返回YYYY-MM-DD HH:mm:ss
|
||||
selectNowDate() {
|
||||
var date = new Date(),
|
||||
year = date.getFullYear(),
|
||||
month = date.getMonth() + 1,
|
||||
day = date.getDate(),
|
||||
hours = date.getHours(), //获取当前小时数(0-23)
|
||||
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)
|
||||
// return timer;
|
||||
},
|
||||
selectDustNoisePageList() {
|
||||
let data = {
|
||||
deviceId: this.devSn,
|
||||
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)
|
||||
if (res.success) {
|
||||
this.tableData = res.result.records
|
||||
this.total = res.result.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//刷新
|
||||
refresh() {
|
||||
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()
|
||||
},
|
||||
|
||||
handleSizeChange(value) {
|
||||
this.pageSize = value;
|
||||
this.selectDustNoisePageList()
|
||||
},
|
||||
handleCurrentChange(value) {
|
||||
this.pageNo = value;
|
||||
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]);
|
||||
} else {
|
||||
window.location.href =
|
||||
this.$http.defaults.baseURL +
|
||||
"xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn +
|
||||
"&devSn=" + this.devSn;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
.search-box {
|
||||
background: #fff;
|
||||
padding: 25px;
|
||||
margin-bottom: 14px;
|
||||
.search-item {
|
||||
display: inline-block;
|
||||
margin-right: 26px;
|
||||
}
|
||||
}
|
||||
.table-box {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
/deep/.el-table {
|
||||
td {
|
||||
// vertical-align: top;
|
||||
}
|
||||
.cell {
|
||||
padding-left: 30px;
|
||||
}
|
||||
}
|
||||
.f-2 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.table-item {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
90
src/views/projectFront/rainfallMonitor/reportForm.vue
Normal file
90
src/views/projectFront/rainfallMonitor/reportForm.vue
Normal file
@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<div class="reportForm">
|
||||
<div class="left">
|
||||
<div class="menu-list">
|
||||
<div class="menu-item" :class="{'active-menu': activeNav == 1}" @click="checkNav(1)">
|
||||
<!-- 实时数据 -->
|
||||
{{$t('message.projectInfo.realTimeData')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<component :is="componentName"></component>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import liveDataTable from './relaTimeData.vue'
|
||||
export default {
|
||||
name: "reportForm",
|
||||
data(){
|
||||
return {
|
||||
activeNav: 1,
|
||||
componentName: "liveDataTable"
|
||||
}
|
||||
},
|
||||
components:{
|
||||
liveDataTable//实时数据
|
||||
},
|
||||
methods:{
|
||||
checkNav(val){
|
||||
this.activeNav = val
|
||||
if(val == 1){
|
||||
this.componentName = liveDataTable
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.reportForm{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.left{
|
||||
float: left;
|
||||
width: 188px;
|
||||
margin-right: 0;
|
||||
padding-top: 28px;
|
||||
box-sizing: border-box;
|
||||
height: 100%;background: #fff;
|
||||
.menu-list{
|
||||
.menu-item{
|
||||
color: #7C829E;
|
||||
padding-left: 28px;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
box-sizing: border-box;
|
||||
line-height: 30px;
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
.menu-item:hover{
|
||||
background: rgba(78, 124, 255, 0.1);
|
||||
color: #4E7CFF;
|
||||
}
|
||||
.active-menu{
|
||||
background: rgba(78, 124, 255, 0.25) !important;
|
||||
color: #4E7CFF;
|
||||
}
|
||||
.active-menu::before{
|
||||
content: "";
|
||||
width: 3px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #4E7CFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right{
|
||||
float: right;
|
||||
width: calc(100% - 208px);
|
||||
height: 100%;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user