Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
commit
217f4870f7
|
@ -2,6 +2,7 @@ package com.ruoyi.quartz.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.ruoyi.quartz.domain.DevPitmonitSouthsmosData;
|
||||
import com.ruoyi.quartz.domain.DevPitmonitSouthsmosElement;
|
||||
import com.ruoyi.quartz.domain.SurProjectPitMonitCfg;
|
||||
|
||||
/**
|
||||
|
@ -60,5 +61,5 @@ public interface IDevPitmonitSouthsmosDataService
|
|||
*/
|
||||
public int deleteDevPitmonitSouthsmosDataById(Long id);
|
||||
|
||||
public void addList(List<DevPitmonitSouthsmosData> dataList, SurProjectPitMonitCfg cfg);
|
||||
public void addList(List<DevPitmonitSouthsmosData> dataList, SurProjectPitMonitCfg cfg, DevPitmonitSouthsmosElement el);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.quartz.domain.DevPitmonitSouthsmosElement;
|
||||
import com.ruoyi.quartz.domain.SurProjectPitMonitCfg;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -111,9 +112,10 @@ public class DevPitmonitSouthsmosDataServiceImpl implements IDevPitmonitSouthsmo
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addList(List<DevPitmonitSouthsmosData> dataList, SurProjectPitMonitCfg cfg) {
|
||||
public void addList(List<DevPitmonitSouthsmosData> dataList, SurProjectPitMonitCfg cfg, DevPitmonitSouthsmosElement el) {
|
||||
dataList.forEach(it->{
|
||||
it.setCfgId(cfg.getId());
|
||||
it.setDataType(el.getNameEn());
|
||||
DevPitmonitSouthsmosData old=selectDevPitmonitSouthsmosDataByDataId(it.getDataId());
|
||||
if(old==null){
|
||||
insertDevPitmonitSouthsmosData(it);
|
||||
|
|
|
@ -40,7 +40,7 @@ public class DevPitmonitSouthsmosDevSpServiceImpl implements IDevPitmonitSouthsm
|
|||
DevPitmonitSouthsmosDevSp where=new DevPitmonitSouthsmosDevSp();
|
||||
where.setSpId(spId);
|
||||
where.setDevId(devId);
|
||||
List<DevPitmonitSouthsmosDevSp> list=new ArrayList<>();
|
||||
List<DevPitmonitSouthsmosDevSp> list=selectDevPitmonitSouthsmosDevSpList(where);
|
||||
return list.size()>0?list.get(0):null;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,10 @@ public class DevPitmonitSouthsmosDeviceServiceImpl implements IDevPitmonitSouths
|
|||
public void addList(List<DevPitmonitSouthsmosDevice> items, SurProjectPitMonitCfg cfg) {
|
||||
items.forEach(it->{
|
||||
it.setCfgId(cfg.getId());
|
||||
insertDevPitmonitSouthsmosDevice(it);
|
||||
DevPitmonitSouthsmosDevice old= selectDevPitmonitSouthsmosDeviceByDevId(it.getDevId());
|
||||
if(old==null) {
|
||||
insertDevPitmonitSouthsmosDevice(it);
|
||||
}
|
||||
it.getSpDevices().forEach(item->{
|
||||
item.setCfgId(cfg.getId());
|
||||
devSpService.addDevPitmonitSouthsmosDevSp(item);
|
||||
|
|
|
@ -122,7 +122,7 @@ public class PitmonitSouthsmosTask {
|
|||
List<DevPitmonitSouthsmosElement> elList=elementService.selectDevPitmonitSouthsmosElementList(elWhere);
|
||||
elList.forEach(el->{
|
||||
List<DevPitmonitSouthsmosData> dataList=getElementData(orgId,""+el.getSrvId(),el.getNameEn(),token,date,1);
|
||||
dataService.addList(dataList,cfg);
|
||||
dataService.addList(dataList,cfg,el);
|
||||
});
|
||||
//8.获取报警信息
|
||||
List<DevPitmonitSouthsmosAlarm> alarmList=getAlarm(orgId,token,date);
|
||||
|
@ -168,9 +168,9 @@ public class PitmonitSouthsmosTask {
|
|||
//List<DevPitmonitSouthsmosSurveypoint> spList=getSurveyPoint(token,orgId);
|
||||
//System.out.println(spList);
|
||||
//6.获取测点数据
|
||||
//List<DevPitmonitSouthsmosData> dataList=getElementData(orgId,"22","horizontal",token,DateUtil.parse("2024-01-01"),1);
|
||||
//System.out.println(dataList);
|
||||
//System.out.println(dataList.size());
|
||||
List<DevPitmonitSouthsmosData> dataList=getElementData(orgId,"22","horizontal",token,DateUtil.parse("2024-01-01"),1);
|
||||
System.out.println(dataList);
|
||||
System.out.println(dataList.size());
|
||||
//7.获取报警阈值
|
||||
//List<DevPitmonitSouthsmosThreshold> thList=getThreshold("53245",token);
|
||||
//System.out.println(thList);
|
||||
|
@ -178,8 +178,8 @@ public class PitmonitSouthsmosTask {
|
|||
//List<DevPitmonitSouthsmosAlarm> alarmList=getAlarm(orgId,token,DateUtil.parse("2024-01-01"));
|
||||
//System.out.println(alarmList);
|
||||
//9.获取设备
|
||||
List<DevPitmonitSouthsmosDevice> devList=getDevices(token,orgId);
|
||||
System.out.println(devList);
|
||||
//List<DevPitmonitSouthsmosDevice> devList=getDevices(token,orgId);
|
||||
//System.out.println(devList);
|
||||
}
|
||||
|
||||
private static List<DevPitmonitSouthsmosDevice> getDevices(String token,String orgId){
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目基坑监测配置
|
||||
列表
|
||||
// 查询项目基坑监测配置列表
|
||||
export function listPitConfig(query) {
|
||||
return request({
|
||||
url: '/device/pitConfig/list',
|
||||
|
@ -10,8 +9,7 @@ export function listPitConfig(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询项目基坑监测配置
|
||||
详细
|
||||
// 查询项目基坑监测配置详细
|
||||
export function getPitConfig(id) {
|
||||
return request({
|
||||
url: '/device/pitConfig/' + id,
|
||||
|
@ -47,3 +45,14 @@ export function delPitConfig(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function findByProjIdDeptId(prjId,deptId){
|
||||
|
||||
let where={
|
||||
projectId:prjId,
|
||||
subDeptId:deptId
|
||||
}
|
||||
return listPitConfig(where);
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
<template>
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
require('echarts/theme/macarons')
|
||||
|
||||
export default {
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
opt:{
|
||||
type:Object,
|
||||
default:()=>{}
|
||||
},
|
||||
chgOpt:{
|
||||
type:Function,
|
||||
default:null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(()=>{
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
if(this.chgOpt){
|
||||
this.chart.setOption(this.chgOpt(this.opt||{}))
|
||||
}else{
|
||||
this.chart.setOption(this.opt||{})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -5,7 +5,7 @@ import dialogDragWidth from './dialog/dragWidth'
|
|||
import dialogDragHeight from './dialog/dragHeight'
|
||||
import clipboard from './module/clipboard'
|
||||
import ResizeDomDirective from './resize'
|
||||
|
||||
import Move from './move'
|
||||
const install = function(Vue) {
|
||||
Vue.directive('hasRole', hasRole)
|
||||
Vue.directive('hasPermi', hasPermi)
|
||||
|
@ -13,7 +13,8 @@ const install = function(Vue) {
|
|||
Vue.directive('dialogDrag', dialogDrag)
|
||||
Vue.directive('dialogDragWidth', dialogDragWidth)
|
||||
Vue.directive('dialogDragHeight', dialogDragHeight)
|
||||
Vue.directive('resize', ResizeDomDirective)
|
||||
Vue.directive('resize', ResizeDomDirective)
|
||||
Vue.directive('move', Move)
|
||||
}
|
||||
|
||||
if (window.Vue) {
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
export default{
|
||||
bind(el, binding, vnode) {
|
||||
let dragging = false;
|
||||
let startX, startY, deltaX, deltaY, transform;
|
||||
|
||||
el.style.position = 'absolute';
|
||||
el.style.cursor = 'pointer';
|
||||
|
||||
el.addEventListener('mousedown', function(e) {
|
||||
dragging = true;
|
||||
startX = e.clientX - parseInt(el.style.left);
|
||||
startY = e.clientY - parseInt(el.style.top);
|
||||
document.addEventListener('mousemove', mouseMoveHandler);
|
||||
document.addEventListener('mouseup', mouseUpHandler);
|
||||
});
|
||||
|
||||
function mouseMoveHandler(e) {
|
||||
if (dragging) {
|
||||
deltaX = e.clientX - startX;
|
||||
deltaY = e.clientY - startY;
|
||||
el.style.left = deltaX + 'px';
|
||||
el.style.top = deltaY + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
function mouseUpHandler() {
|
||||
dragging = false;
|
||||
document.removeEventListener('mousemove', mouseMoveHandler);
|
||||
document.removeEventListener('mouseup', mouseUpHandler);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,7 +59,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序号" align="center" prop="ord" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:magDetail:edit']">修改</el-button>
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
<template>
|
||||
<el-dialog title="报警详情" custom-class="alarm-detail-dlg" :visible.sync="open" width="960px" append-to-body
|
||||
:close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-row class="row-header">
|
||||
<el-col>
|
||||
<span class="sp-label">工程:</span>
|
||||
<span class="sp-data">{{ row.structureName }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="row-header">
|
||||
<el-col :span="8">
|
||||
<span class="sp-label">监测项:</span>
|
||||
<span class="sp-data">{{ row.meName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="sp-label">报警项:</span>
|
||||
<span class="sp-data">{{ row.variety }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="sp-label">报警阈值:</span>
|
||||
<span class="sp-data">{{ row.threshold }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="datas" border stripe height="50vh">
|
||||
<el-table-column label="测点" align="center" prop="spName" />
|
||||
<el-table-column label="X方向位移(mm)" align="center" prop="displace">
|
||||
<template slot-scope="scope">{{scope.row.displace.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="X方向累计变化量(mm)" align="center" prop="totalize" >
|
||||
<template slot-scope="scope">{{scope.row.totalize.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="X方向单次变化量(mm)" align="center" prop="variation" >
|
||||
<template slot-scope="scope">{{scope.row.variation.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="X方向变化速率(mm/d)" align="center" prop="changeRate" >
|
||||
<template slot-scope="scope">{{scope.row.changeRate.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向位移(mm)" align="center" prop="displace2" >
|
||||
<template slot-scope="scope">{{scope.row.displace2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向累计变化量(mm)" align="center" prop="totalize2" >
|
||||
<template slot-scope="scope">{{scope.row.totalize2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向单次变化量(mm)" align="center" prop="variation2" >
|
||||
<template slot-scope="scope">{{scope.row.variation2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向变化速率(mm/d)" align="center" prop="changeRate2">
|
||||
<template slot-scope="scope">{{scope.row.changeRate2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采集时间" align="center" prop="collectTime" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="pageNum"
|
||||
:limit.sync="pageSize"
|
||||
@pagination="loadData" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitData} from "@/api/device/pitData";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading:false,
|
||||
open: false,
|
||||
row: {},
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total:0,
|
||||
datas:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showDialog(row) {
|
||||
this.pageNum=1;
|
||||
this.row = row;
|
||||
this.open = true;
|
||||
this.loadData();
|
||||
},
|
||||
loadData(){
|
||||
let postData={
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize,
|
||||
spId:this.row.spId,
|
||||
createTime:this.row.gmtCreate,
|
||||
updateTime:this.row.gmtModified
|
||||
};
|
||||
this.loading=true;
|
||||
listPitData(postData).then(d => {
|
||||
this.loading=false;
|
||||
this.total=d.total||0;
|
||||
this.datas=d.rows||[];
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.alarm-detail-dlg {
|
||||
.row-header {
|
||||
line-height: 30px;
|
||||
|
||||
.sp-label {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sp-data {
|
||||
margin-left: 4px;
|
||||
columns: #888;
|
||||
}
|
||||
}
|
||||
.el-table__header{
|
||||
th{
|
||||
background: #ccccccba;
|
||||
}
|
||||
}
|
||||
.el-table__body-wrapper{
|
||||
max-height: 50vh !important;
|
||||
height: unset !important;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
|
@ -1,468 +1,108 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="app-container pit-alarm-index">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input
|
||||
v-model="queryParams.cfgId"
|
||||
placeholder="请输入配置ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" clearable @change="doQuerySub">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端ID" prop="srvId">
|
||||
<el-input
|
||||
v-model="queryParams.srvId"
|
||||
placeholder="请输入服务端ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" filterable placeholder="请选择总包单位" clearable>
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="该条报警信息的一个描述" prop="alarmInfo">
|
||||
<el-input
|
||||
v-model="queryParams.alarmInfo"
|
||||
placeholder="请输入该条报警信息的一个描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="告警状态" prop="status">
|
||||
<el-radio-group v-model="queryParams.status" @change="getList">
|
||||
<el-radio label="false">未处理</el-radio>
|
||||
<el-radio label="true">已处理</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="产生报警的来源,格式:点名-监测分项名" prop="alarmSource">
|
||||
<el-input
|
||||
v-model="queryParams.alarmSource"
|
||||
placeholder="请输入产生报警的来源,格式:点名-监测分项名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="次产生报警的时间" prop="gmtAlarm">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.gmtAlarm"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择次产生报警的时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警时间,如果数据回落至正常范围或被处理,则报警结束" prop="gmtAlarmOver">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.gmtAlarmOver"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择报警时间,如果数据回落至正常范围或被处理,则报警结束">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始后第一次产生报警的时间" prop="gmtAlarmStart">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.gmtAlarmStart"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始后第一次产生报警的时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据库记录创建时间" prop="gmtCreate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.gmtCreate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择数据库记录创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警更新时间,该报警每产生一次都会更新该时间" prop="gmtModified">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.gmtModified"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择报警更新时间,该报警每产生一次都会更新该时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警所处最高级别,1:超预警,2:超报警,3:超控制" prop="level">
|
||||
<el-input
|
||||
v-model="queryParams.level"
|
||||
placeholder="请输入报警所处最高级别,1:超预警,2:超报警,3:超控制"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项id" prop="meId">
|
||||
<el-input
|
||||
v-model="queryParams.meId"
|
||||
placeholder="请输入监测项id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项名称" prop="meName">
|
||||
<el-input
|
||||
v-model="queryParams.meName"
|
||||
placeholder="请输入监测项名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测分项id" prop="monitorItemId">
|
||||
<el-input
|
||||
v-model="queryParams.monitorItemId"
|
||||
placeholder="请输入监测分项id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警产生次数,如果报警来源一样,类型一样,则认为是同一条报警,多次产生也只会累加次数" prop="numbers">
|
||||
<el-input
|
||||
v-model="queryParams.numbers"
|
||||
placeholder="请输入报警产生次数,如果报警来源一样,类型一样,则认为是同一条报警,多次产生也只会累加次数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警处理结果" prop="result">
|
||||
<el-input
|
||||
v-model="queryParams.result"
|
||||
placeholder="请输入报警处理结果"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理图片地址" prop="resultUrl">
|
||||
<el-input
|
||||
v-model="queryParams.resultUrl"
|
||||
placeholder="请输入处理图片地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警测点id" prop="spId">
|
||||
<el-input
|
||||
v-model="queryParams.spId"
|
||||
placeholder="请输入报警测点id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警测点名" prop="spName">
|
||||
<el-input
|
||||
v-model="queryParams.spName"
|
||||
placeholder="请输入报警测点名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理人" prop="staff">
|
||||
<el-input
|
||||
v-model="queryParams.staff"
|
||||
placeholder="请输入处理人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理电话" prop="staffPhone">
|
||||
<el-input
|
||||
v-model="queryParams.staffPhone"
|
||||
placeholder="请输入处理电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警工程id" prop="structureId">
|
||||
<el-input
|
||||
v-model="queryParams.structureId"
|
||||
placeholder="请输入报警工程id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警工程名" prop="structureName">
|
||||
<el-input
|
||||
v-model="queryParams.structureName"
|
||||
placeholder="请输入报警工程名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="该警最高级别设置的阈值" prop="threshold">
|
||||
<el-input
|
||||
v-model="queryParams.threshold"
|
||||
placeholder="请输入该警最高级别设置的阈值"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="判断的标准:测量值、单次变化量、累计变化量、变化速率" prop="variety">
|
||||
<el-input
|
||||
v-model="queryParams.variety"
|
||||
placeholder="请输入判断的标准:测量值、单次变化量、累计变化量、变化速率"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="请输入状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="告警原因" prop="type">
|
||||
<el-select v-model="queryParams.type" filterable placeholder="请选择总包单位" clearable>
|
||||
<el-option v-for="(item, index) in '数据异常,DTU异常,传感器异常,网关异常,节点异常'.split(',')" :key="index" :label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row :gutter="10" class="mb8" v-if="1==2">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['device:pitAlarm:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['device:pitAlarm:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['device:pitAlarm:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitAlarm:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['device:pitAlarm:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitAlarm:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['device:pitAlarm:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['device:pitAlarm:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitAlarmList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="${comment}" align="center" prop="id" />
|
||||
<el-table-column label="配置ID" align="center" prop="cfgId" />
|
||||
<el-table-column label="服务端ID" align="center" prop="srvId" />
|
||||
<el-table-column label="该条报警信息的一个描述" align="center" prop="alarmInfo" />
|
||||
<el-table-column label="产生报警的来源,格式:点名-监测分项名" align="center" prop="alarmSource" />
|
||||
<el-table-column label="次产生报警的时间" align="center" prop="gmtAlarm" width="180">
|
||||
<el-table v-loading="loading" :data="pitAlarmList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="编号" align="center" prop="id" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="180" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="180" />
|
||||
<el-table-column label="告警源" align="center" prop="alarmSource" width="180" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.gmtAlarm, '{y}-{m}-{d}') }}</span>
|
||||
{{ scope.row.alarmSource}}-{{ scope.row.variety}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警时间,如果数据回落至正常范围或被处理,则报警结束" align="center" prop="gmtAlarmOver" width="180">
|
||||
<el-table-column label="等级" align="center" prop="level" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.gmtAlarmOver, '{y}-{m}-{d}') }}</span>
|
||||
<span class="sp-data" :class="'sp-level-'+scope.row.level">{{ getLevel(scope.row.level)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始后第一次产生报警的时间" align="center" prop="gmtAlarmStart" width="180">
|
||||
<el-table-column label="告警信息" align="center" prop="alarmInfo" width="180"/>
|
||||
<el-table-column label="产生次数" align="center" prop="numbers" width="80"/>
|
||||
<el-table-column label="产生时间" align="center" prop="gmtCreate" width="150"/>
|
||||
<el-table-column label="更新时间" align="center" prop="gmtModified" width="150"/>
|
||||
<el-table-column label="处理人" align="center" prop="staff" width="100" v-if="queryParams.status=='true'"/>
|
||||
<el-table-column label="处理人电话" align="center" prop="staffPhone" width="180" v-if="queryParams.status=='true'"/>
|
||||
<el-table-column label="处理人结果" align="center" prop="result" width="180" v-if="queryParams.status=='true'"/>
|
||||
<el-table-column label="处理图片" align="center" prop="result" width="180" v-if="queryParams.status=='true'">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.gmtAlarmStart, '{y}-{m}-{d}') }}</span>
|
||||
<span style="color:#ccc" v-if="!scope.row.resultUrl">暂无</span>
|
||||
<el-image :src="scope.row.resultUrl" v-else
|
||||
:preview-src-list="[scope.row.resultUrl]"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数据库记录创建时间" align="center" prop="gmtCreate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警更新时间,该报警每产生一次都会更新该时间" align="center" prop="gmtModified" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.gmtModified, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警所处最高级别,1:超预警,2:超报警,3:超控制" align="center" prop="level" />
|
||||
<el-table-column label="监测项id" align="center" prop="meId" />
|
||||
<el-table-column label="监测项名称" align="center" prop="meName" />
|
||||
<el-table-column label="监测分项id" align="center" prop="monitorItemId" />
|
||||
<el-table-column label="报警产生次数,如果报警来源一样,类型一样,则认为是同一条报警,多次产生也只会累加次数" align="center" prop="numbers" />
|
||||
<el-table-column label="报警处理结果" align="center" prop="result" />
|
||||
<el-table-column label="处理图片地址" align="center" prop="resultUrl" />
|
||||
<el-table-column label="报警测点id" align="center" prop="spId" />
|
||||
<el-table-column label="报警测点名" align="center" prop="spName" />
|
||||
<el-table-column label="处理人" align="center" prop="staff" />
|
||||
<el-table-column label="处理电话" align="center" prop="staffPhone" />
|
||||
<el-table-column label="报警状态:实时、历史,处理过的报警信息将变为历史,不再返回" align="center" prop="status" />
|
||||
<el-table-column label="报警工程id" align="center" prop="structureId" />
|
||||
<el-table-column label="报警工程名" align="center" prop="structureName" />
|
||||
<el-table-column label="该警最高级别设置的阈值" align="center" prop="threshold" />
|
||||
<el-table-column label="类型:数据异常、设备异常,数据报警都是数据异常" align="center" prop="type" />
|
||||
<el-table-column label="判断的标准:测量值、单次变化量、累计变化量、变化速率" align="center" prop="variety" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitAlarm:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitAlarm:remove']"
|
||||
>删除</el-button>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" v-if="queryParams.status=='false'" icon="el-icon-tickets" @click="showDetail(scope.row)">详情</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitAlarm:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改报警信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端ID" prop="srvId">
|
||||
<el-input v-model="form.srvId" placeholder="请输入服务端ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="该条报警信息的一个描述" prop="alarmInfo">
|
||||
<el-input v-model="form.alarmInfo" placeholder="请输入该条报警信息的一个描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产生报警的来源,格式:点名-监测分项名" prop="alarmSource">
|
||||
<el-input v-model="form.alarmSource" placeholder="请输入产生报警的来源,格式:点名-监测分项名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="次产生报警的时间" prop="gmtAlarm">
|
||||
<el-date-picker clearable
|
||||
v-model="form.gmtAlarm"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择次产生报警的时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警时间,如果数据回落至正常范围或被处理,则报警结束" prop="gmtAlarmOver">
|
||||
<el-date-picker clearable
|
||||
v-model="form.gmtAlarmOver"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择报警时间,如果数据回落至正常范围或被处理,则报警结束">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始后第一次产生报警的时间" prop="gmtAlarmStart">
|
||||
<el-date-picker clearable
|
||||
v-model="form.gmtAlarmStart"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始后第一次产生报警的时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据库记录创建时间" prop="gmtCreate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.gmtCreate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择数据库记录创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警更新时间,该报警每产生一次都会更新该时间" prop="gmtModified">
|
||||
<el-date-picker clearable
|
||||
v-model="form.gmtModified"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择报警更新时间,该报警每产生一次都会更新该时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警所处最高级别,1:超预警,2:超报警,3:超控制" prop="level">
|
||||
<el-input v-model="form.level" placeholder="请输入报警所处最高级别,1:超预警,2:超报警,3:超控制" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项id" prop="meId">
|
||||
<el-input v-model="form.meId" placeholder="请输入监测项id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项名称" prop="meName">
|
||||
<el-input v-model="form.meName" placeholder="请输入监测项名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测分项id" prop="monitorItemId">
|
||||
<el-input v-model="form.monitorItemId" placeholder="请输入监测分项id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警产生次数,如果报警来源一样,类型一样,则认为是同一条报警,多次产生也只会累加次数" prop="numbers">
|
||||
<el-input v-model="form.numbers" placeholder="请输入报警产生次数,如果报警来源一样,类型一样,则认为是同一条报警,多次产生也只会累加次数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警处理结果" prop="result">
|
||||
<el-input v-model="form.result" placeholder="请输入报警处理结果" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处理图片地址" prop="resultUrl">
|
||||
<el-input v-model="form.resultUrl" placeholder="请输入处理图片地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警测点id" prop="spId">
|
||||
<el-input v-model="form.spId" placeholder="请输入报警测点id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警测点名" prop="spName">
|
||||
<el-input v-model="form.spName" placeholder="请输入报警测点名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处理人" prop="staff">
|
||||
<el-input v-model="form.staff" placeholder="请输入处理人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处理电话" prop="staffPhone">
|
||||
<el-input v-model="form.staffPhone" placeholder="请输入处理电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警工程id" prop="structureId">
|
||||
<el-input v-model="form.structureId" placeholder="请输入报警工程id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警工程名" prop="structureName">
|
||||
<el-input v-model="form.structureName" placeholder="请输入报警工程名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="该警最高级别设置的阈值" prop="threshold">
|
||||
<el-input v-model="form.threshold" placeholder="请输入该警最高级别设置的阈值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="判断的标准:测量值、单次变化量、累计变化量、变化速率" prop="variety">
|
||||
<el-input v-model="form.variety" placeholder="请输入判断的标准:测量值、单次变化量、累计变化量、变化速率" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<alarmDetailDlg ref="detailDlg"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitAlarm, getPitAlarm, delPitAlarm, addPitAlarm, updatePitAlarm } from "@/api/device/pitAlarm";
|
||||
|
||||
import alarmDetailDlg from './alarmDetailDlg.vue'
|
||||
export default {
|
||||
components:{
|
||||
alarmDetailDlg
|
||||
},
|
||||
name: "PitAlarm",
|
||||
data() {
|
||||
return {
|
||||
|
@ -488,46 +128,67 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
srvId: null,
|
||||
alarmInfo: null,
|
||||
alarmSource: null,
|
||||
gmtAlarm: null,
|
||||
gmtAlarmOver: null,
|
||||
gmtAlarmStart: null,
|
||||
gmtCreate: null,
|
||||
gmtModified: null,
|
||||
level: null,
|
||||
meId: null,
|
||||
meName: null,
|
||||
monitorItemId: null,
|
||||
numbers: null,
|
||||
result: null,
|
||||
resultUrl: null,
|
||||
spId: null,
|
||||
spName: null,
|
||||
staff: null,
|
||||
staffPhone: null,
|
||||
status: null,
|
||||
structureId: null,
|
||||
structureName: null,
|
||||
threshold: null,
|
||||
type: null,
|
||||
variety: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
status: 'false',
|
||||
type: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
showDetail(row){
|
||||
this.$refs.detailDlg.showDialog(row);
|
||||
},
|
||||
doQuerySub() {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
init() {
|
||||
if (this.projectOptions && this.projectOptions.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询报警信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -537,6 +198,9 @@ export default {
|
|||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getLevel(lvl){
|
||||
return ["正常","超预警值","超报警值","超控制值"][lvl];
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
@ -595,7 +259,7 @@ export default {
|
|||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
@ -637,12 +301,12 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除报警信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除报警信息编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitAlarm(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
@ -653,3 +317,22 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.pit-alarm-index{
|
||||
.sp-data{
|
||||
&.sp-level-0{
|
||||
color: #FFEBEE;
|
||||
}
|
||||
&.sp-level-1{
|
||||
color: #EF9A9A;
|
||||
}
|
||||
&.sp-level-2{
|
||||
color: #EF5350;
|
||||
}
|
||||
&.sp-level-3{
|
||||
color: #D32F2F;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -1,25 +1,18 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="app-container prj-pit-config">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入项目ID" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" clearable
|
||||
@change="doQuerySub('query')">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="总包单位ID" prop="subDeptId">
|
||||
<el-input v-model="queryParams.subDeptId" placeholder="请输入总包单位ID" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商编号参考字典pitmonit_vendors" prop="vendorCode">
|
||||
<el-input v-model="queryParams.vendorCode" placeholder="请输入厂商编号参考字典pitmonit_vendors" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="1-启用,0-停用" prop="enabled">
|
||||
<el-input v-model="queryParams.enabled" placeholder="请输入1-启用,0-停用" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="queryParams.state" placeholder="请输入状态" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="queryParams.isDel" placeholder="请输入${comment}" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" filterable placeholder="请选择总包单位" clearable>
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
@ -40,7 +33,7 @@
|
|||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitConfig:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-col :span="1.5" v-if="1 == 2">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['device:pitConfig:export']">导出</el-button>
|
||||
</el-col>
|
||||
|
@ -49,15 +42,16 @@
|
|||
|
||||
<el-table v-loading="loading" :data="pitConfigList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="${comment}" align="center" prop="id" />
|
||||
<el-table-column label="项目ID" align="center" prop="projectId" />
|
||||
<el-table-column label="总包单位ID" align="center" prop="subDeptId" />
|
||||
<el-table-column label="厂商编号参考字典pitmonit_vendors" align="center" prop="vendorCode" />
|
||||
<el-table-column label="厂商参数" align="center" prop="vendorParamter" />
|
||||
<el-table-column label="1-启用,0-停用" align="center" prop="enabled" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" />
|
||||
<el-table-column label="对接厂商" align="center" prop="vendorCode" />
|
||||
<el-table-column label="是否启用" align="center" prop="enabled">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" v-if="scope.row.enabled == 1">启用</el-button>
|
||||
<el-button type="text" disabled v-if="scope.row.enabled == 0">停用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
|
@ -73,46 +67,54 @@
|
|||
|
||||
<!-- 添加或修改项目基坑监测配置
|
||||
对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目ID" />
|
||||
<el-drawer v-if="open" :visible.sync="open" direction="rtl" size="60%" :title="title">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" style="padding:0px 20px">
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="form.projectId" filterable placeholder="请选择项目" style="width:300px;" clearable
|
||||
@change="doQuerySub('dlg')">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="总包单位ID" prop="subDeptId">
|
||||
<el-input v-model="form.subDeptId" placeholder="请输入总包单位ID" />
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="form.subDeptId" filterable placeholder="请选择总包单位" style="width:300px;" clearable
|
||||
@change="doQueryCfg">
|
||||
<el-option v-for="(item, index) in dlgDepts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商编号参考字典pitmonit_vendors" prop="vendorCode">
|
||||
<el-input v-model="form.vendorCode" placeholder="请输入厂商编号参考字典pitmonit_vendors" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商参数" prop="vendorParamter">
|
||||
<el-input v-model="form.vendorParamter" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="1-启用,0-停用" prop="enabled">
|
||||
<el-input v-model="form.enabled" placeholder="请输入1-启用,0-停用" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
|
||||
<el-tabs type="card" v-model="form.vendorCode">
|
||||
<el-tab-pane :label="it.label" :name="it.value" v-for="(it, idx) in dict.type.pitmonit_vendors" :key="idx">
|
||||
<el-form-item label="工程编号" prop="orgId">
|
||||
<el-input v-model="form.orgId"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名" prop="identifier">
|
||||
<el-input v-model="form.identifier" auto-complete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="credential">
|
||||
<el-input v-model="form.credential"></el-input>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-form-item label="是否启用" prop="enabled">
|
||||
<el-switch v-model="form.enabled" active-color="#13ce66" inactive-color="#ccc">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitConfig, getPitConfig, delPitConfig, addPitConfig, updatePitConfig } from "@/api/device/pitConfig";
|
||||
import { listPitConfig, getPitConfig, delPitConfig, addPitConfig, updatePitConfig, findByProjIdDeptId } from "@/api/device/pitConfig";
|
||||
|
||||
export default {
|
||||
name: "PitConfig",
|
||||
dicts: ['pitmonit_vendors'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -146,16 +148,97 @@ export default {
|
|||
isDel: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
projectId:null,
|
||||
subDeptId:null,
|
||||
orgId:'',
|
||||
identifier:'',
|
||||
credential:'',
|
||||
enabled:true
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
projectId: [{ required: true, message: "请输入工程编号", trigger: "blur" }],
|
||||
subDeptId: [{ required: true, message: "请输入工程编号", trigger: "blur" }],
|
||||
orgId: [{ required: true, message: "请输入工程编号", trigger: "blur" }],
|
||||
identifier: [{ required: true, message: "请输入用户名", trigger: "blur" }],
|
||||
credential: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
||||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
dlgDepts: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
doQueryCfg() {
|
||||
if (this.form.projectId && this.form.subDeptId) {
|
||||
findByProjIdDeptId(this.form.projectId, this.form.subDeptId).then(d => {
|
||||
let row = d.rows && d.rows.length > 0 ? d.rows[0] : null;
|
||||
if (row) {
|
||||
this.handleUpdate(row, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
doQuerySub(type, cb) {
|
||||
let prjId = type == "query" ? this.queryParams.projectId : this.form.projectId;
|
||||
if (!prjId) {
|
||||
if (type == "query") {
|
||||
this.depts = [];
|
||||
this.queryParams.subDeptId = ""
|
||||
} else {
|
||||
this.dlgDepts = [];
|
||||
this.form.subDeptId = ""
|
||||
}
|
||||
if (cb) cb();
|
||||
return;
|
||||
}
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
if (type == 'query') {
|
||||
this.depts = tmps;
|
||||
this.queryParams.subDeptId = tmps.length == 1 ? tmps[0].deptId : '';
|
||||
} else {
|
||||
this.dlgDepts = tmps;
|
||||
this.form.subDeptId = tmps.length == 1 ? tmps[0].deptId : '';
|
||||
this.doQueryCfg();
|
||||
}
|
||||
if (cb) cb();
|
||||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[prjId] = objs;
|
||||
let tmps = objs;
|
||||
if (type == 'query') {
|
||||
this.depts = tmps;
|
||||
this.queryParams.subDeptId = tmps.length == 1 ? tmps[0].deptId : '';
|
||||
} else {
|
||||
this.dlgDepts = tmps;
|
||||
this.form.subDeptId = tmps.length == 1 ? tmps[0].deptId : '';
|
||||
this.doQueryCfg();
|
||||
}
|
||||
if (cb) cb();
|
||||
});
|
||||
},
|
||||
init() {
|
||||
if (this.projectOptions && this.projectOptions.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询项目基坑监测配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -178,7 +261,10 @@ export default {
|
|||
subDeptId: null,
|
||||
vendorCode: null,
|
||||
vendorParamter: null,
|
||||
enabled: null,
|
||||
orgId:'',
|
||||
identifier:'',
|
||||
credential:'',
|
||||
enabled: true,
|
||||
state: null,
|
||||
remark: null,
|
||||
isDel: null,
|
||||
|
@ -210,30 +296,55 @@ export default {
|
|||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加项目基坑监测配置";
|
||||
this.form.vendorCode = this.dict.type.pitmonit_vendors[0].value;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
handleUpdate(row, fromAdd) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPitConfig(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目基坑监测配置";
|
||||
});
|
||||
this.form = {...row,orgId:'',
|
||||
identifier:'',
|
||||
credential:'',};
|
||||
let oldDeptId = this.form.subDeptId;
|
||||
if (!fromAdd) {
|
||||
this.doQuerySub("dlg", () => {
|
||||
this.form.subDeptId = oldDeptId;
|
||||
});
|
||||
}
|
||||
let param = this.$tryToJson(this.form.vendorParamter, {});
|
||||
this.form.orgId = param.orgId || "";
|
||||
this.form.identifier = param.identifier || "";
|
||||
this.form.credential = param.credential || "";
|
||||
this.form.enabled=row.enabled==1;
|
||||
this.open = true;
|
||||
this.title = "修改项目基坑监测配置";
|
||||
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
let param = {
|
||||
orgId: this.form.orgId,
|
||||
identifier: this.form.identifier,
|
||||
credential: this.form.credential
|
||||
};
|
||||
var postData = {
|
||||
projectId: this.form.projectId,
|
||||
subDeptId: this.form.subDeptId,
|
||||
vendorCode: this.form.vendorCode,
|
||||
enabled: this.form.enabled ? 1 : 0,
|
||||
vendorParamter: JSON.stringify(param)
|
||||
};
|
||||
if (this.form.id != null) {
|
||||
updatePitConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
postData.id = this.form.id;
|
||||
updatePitConfig(postData).then(response => {
|
||||
this.$modal.msgSuccess("修改配置成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPitConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
addPitConfig(postData).then(response => {
|
||||
this.$modal.msgSuccess("新增配置成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
@ -244,19 +355,34 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目基坑监测配置编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除项目基坑监测配置编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitConfig(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('device/pitConfig/export', {
|
||||
...this.queryParams
|
||||
}, `pitConfig_${new Date().getTime()}.xlsx`)
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('device/pitConfig/export', {
|
||||
...this.queryParams
|
||||
}, `pitConfig_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.prj-pit-config {
|
||||
.el-drawer {
|
||||
.el-drawer__body {
|
||||
position: relative;
|
||||
|
||||
.dialog-footer {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,462 +1,36 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input
|
||||
v-model="queryParams.cfgId"
|
||||
placeholder="请输入配置ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端dataId" prop="dataId">
|
||||
<el-input
|
||||
v-model="queryParams.dataId"
|
||||
placeholder="请输入服务端dataId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测点Id" prop="spId">
|
||||
<el-input
|
||||
v-model="queryParams.spId"
|
||||
placeholder="请输入测点Id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测点名" prop="spName">
|
||||
<el-input
|
||||
v-model="queryParams.spName"
|
||||
placeholder="请输入测点名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收集时间" prop="collectTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.collectTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择收集时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="变化速率(X)" prop="changeRate">
|
||||
<el-input
|
||||
v-model="queryParams.changeRate"
|
||||
placeholder="请输入变化速率(X)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变化速率(Y)" prop="changeRate2">
|
||||
<el-input
|
||||
v-model="queryParams.changeRate2"
|
||||
placeholder="请输入变化速率(Y)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="displace">
|
||||
<el-input
|
||||
v-model="queryParams.displace"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="displace2">
|
||||
<el-input
|
||||
v-model="queryParams.displace2"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="累计变化量,单位为m(X)" prop="totalize">
|
||||
<el-input
|
||||
v-model="queryParams.totalize"
|
||||
placeholder="请输入累计变化量,单位为m(X)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="累计变化量,单位为m(Y)" prop="totalize2">
|
||||
<el-input
|
||||
v-model="queryParams.totalize2"
|
||||
placeholder="请输入累计变化量,单位为m(Y)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单次变化量,单位为m(X)" prop="variation">
|
||||
<el-input
|
||||
v-model="queryParams.variation"
|
||||
placeholder="请输入单次变化量,单位为m(X)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单次变化量,单位为m(Y)" prop="variation2">
|
||||
<el-input
|
||||
v-model="queryParams.variation2"
|
||||
placeholder="请输入单次变化量,单位为m(Y)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="请输入状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['device:pitData:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['device:pitData:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['device:pitData:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['device:pitData:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitDataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="" align="center" prop="id" />
|
||||
<el-table-column label="配置ID" align="center" prop="cfgId" />
|
||||
<el-table-column label="数据类型:horizontal-水平位移(x,y),presureWallsideSoil-围护墙侧向土压力,waterLevel-地下水位" align="center" prop="dataType" />
|
||||
<el-table-column label="服务端dataId" align="center" prop="dataId" />
|
||||
<el-table-column label="测点Id" align="center" prop="spId" />
|
||||
<el-table-column label="测点名" align="center" prop="spName" />
|
||||
<el-table-column label="收集时间" align="center" prop="collectTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.collectTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变化速率(X)" align="center" prop="changeRate" />
|
||||
<el-table-column label="变化速率(Y)" align="center" prop="changeRate2" />
|
||||
<el-table-column label="" align="center" prop="displace" />
|
||||
<el-table-column label="" align="center" prop="displace2" />
|
||||
<el-table-column label="累计变化量,单位为m(X)" align="center" prop="totalize" />
|
||||
<el-table-column label="累计变化量,单位为m(Y)" align="center" prop="totalize2" />
|
||||
<el-table-column label="单次变化量,单位为m(X)" align="center" prop="variation" />
|
||||
<el-table-column label="单次变化量,单位为m(Y)" align="center" prop="variation2" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitData:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitData:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改测点数据对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端dataId" prop="dataId">
|
||||
<el-input v-model="form.dataId" placeholder="请输入服务端dataId" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测点Id" prop="spId">
|
||||
<el-input v-model="form.spId" placeholder="请输入测点Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测点名" prop="spName">
|
||||
<el-input v-model="form.spName" placeholder="请输入测点名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收集时间" prop="collectTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.collectTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择收集时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="变化速率(X)" prop="changeRate">
|
||||
<el-input v-model="form.changeRate" placeholder="请输入变化速率(X)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="变化速率(Y)" prop="changeRate2">
|
||||
<el-input v-model="form.changeRate2" placeholder="请输入变化速率(Y)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="displace">
|
||||
<el-input v-model="form.displace" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="displace2">
|
||||
<el-input v-model="form.displace2" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="累计变化量,单位为m(X)" prop="totalize">
|
||||
<el-input v-model="form.totalize" placeholder="请输入累计变化量,单位为m(X)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="累计变化量,单位为m(Y)" prop="totalize2">
|
||||
<el-input v-model="form.totalize2" placeholder="请输入累计变化量,单位为m(Y)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单次变化量,单位为m(X)" prop="variation">
|
||||
<el-input v-model="form.variation" placeholder="请输入单次变化量,单位为m(X)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单次变化量,单位为m(Y)" prop="variation2">
|
||||
<el-input v-model="form.variation2" placeholder="请输入单次变化量,单位为m(Y)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="app-container pit-data-index">
|
||||
<el-tabs v-model="activeName" >
|
||||
<!--
|
||||
<el-tab-pane label="数据概况" name="index"></el-tab-pane>-->
|
||||
<el-tab-pane label="测点数据" name="spData"></el-tab-pane>
|
||||
<!--
|
||||
<el-tab-pane label="监测项数据" name="monitData"></el-tab-pane>
|
||||
-->
|
||||
<surveyPointData v-if="activeName=='spData'"/>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitData, getPitData, delPitData, addPitData, updatePitData } from "@/api/device/pitData";
|
||||
|
||||
import surveyPointData from './surveyPointData.vue'
|
||||
export default {
|
||||
name: "PitData",
|
||||
name: 'RuoyiUiIndex',
|
||||
components:{
|
||||
surveyPointData
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 测点数据表格数据
|
||||
pitDataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
dataType: null,
|
||||
dataId: null,
|
||||
spId: null,
|
||||
spName: null,
|
||||
collectTime: null,
|
||||
changeRate: null,
|
||||
changeRate2: null,
|
||||
displace: null,
|
||||
displace2: null,
|
||||
totalize: null,
|
||||
totalize2: null,
|
||||
variation: null,
|
||||
variation2: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
activeName:"spData"
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 查询测点数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPitData(this.queryParams).then(response => {
|
||||
this.pitDataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
cfgId: null,
|
||||
dataType: null,
|
||||
dataId: null,
|
||||
spId: null,
|
||||
spName: null,
|
||||
collectTime: null,
|
||||
changeRate: null,
|
||||
changeRate2: null,
|
||||
displace: null,
|
||||
displace2: null,
|
||||
totalize: null,
|
||||
totalize2: null,
|
||||
variation: null,
|
||||
variation2: null,
|
||||
state: null,
|
||||
remark: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加测点数据";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPitData(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改测点数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePitData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPitData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除测点数据编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delPitData(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('device/pitData/export', {
|
||||
...this.queryParams
|
||||
}, `pitData_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
|
@ -0,0 +1,554 @@
|
|||
<template>
|
||||
<div class="app-container survey-point-data-index">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" clearable @change="doQuerySub">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" filterable placeholder="请选择总包单位" clearable @change="doQueryPitEL">
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="监测项" prop="meId">
|
||||
<el-select v-model="queryParams.meId" filterable placeholder="请选择监测项" clearable @change="doQueryPitSps">
|
||||
<el-option v-for="(item, index) in pitEls" :key="index" :label="item.name" :value="item.srvId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="测点" prop="spId">
|
||||
<el-select v-model="queryParams.spId" filterable placeholder="请选择监测项" clearable>
|
||||
<el-option v-for="(item, index) in pitSps" :key="index" :label="item.name" :value="item.spId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="查询日期" prop="spId">
|
||||
<el-date-picker v-model="queryParams.selDate" type="daterange" align="right" unlink-panels range-separator="至"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8" v-if="1 == 2">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['device:pitData:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitData:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitData:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['device:pitData:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitDataList" height="50vh" class="dt-main">
|
||||
<el-table-column label="测点" align="center" prop="spName" />
|
||||
<template v-if="queryParams.meId == 22">
|
||||
<el-table-column label="X方向位移(mm)" align="center" prop="displace">
|
||||
<template slot-scope="scope">{{ scope.row.displace.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="X方向累计变化量(mm)" align="center" prop="totalize">
|
||||
<template slot-scope="scope">{{ scope.row.totalize.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="X方向单次变化量(mm)" align="center" prop="variation">
|
||||
<template slot-scope="scope">{{ scope.row.variation.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="X方向变化速率(mm/d)" align="center" prop="changeRate">
|
||||
<template slot-scope="scope">{{ scope.row.changeRate.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向位移(mm)" align="center" prop="displace2">
|
||||
<template slot-scope="scope">{{ scope.row.displace2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向累计变化量(mm)" align="center" prop="totalize2">
|
||||
<template slot-scope="scope">{{ scope.row.totalize2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向单次变化量(mm)" align="center" prop="variation2">
|
||||
<template slot-scope="scope">{{ scope.row.variation2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Y方向变化速率(mm/d)" align="center" prop="changeRate2">
|
||||
<template slot-scope="scope">{{ scope.row.changeRate2.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-if="queryParams.meId == 14">
|
||||
<el-table-column label="压力(MPa)" align="center" prop="displace">
|
||||
<template slot-scope="scope">{{ scope.row.displace.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="累计变化量(MPa)" align="center" prop="totalize">
|
||||
<template slot-scope="scope">{{ scope.row.totalize.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单次变化量(MPa)" align="center" prop="variation">
|
||||
<template slot-scope="scope">{{ scope.row.variation.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变化速率(MPa/d)" align="center" prop="changeRate">
|
||||
<template slot-scope="scope">{{ scope.row.changeRate.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-if="queryParams.meId == 3">
|
||||
<el-table-column label="水位(m)" align="center" prop="displace">
|
||||
<template slot-scope="scope">{{ scope.row.displace.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="累计变化量(mm)" align="center" prop="totalize">
|
||||
<template slot-scope="scope">{{ scope.row.totalize.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单次变化量(mm)" align="center" prop="variation">
|
||||
<template slot-scope="scope">{{ scope.row.variation.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变化速率(mm/d)" align="center" prop="changeRate">
|
||||
<template slot-scope="scope">{{ scope.row.changeRate.toFixed(3) }}</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="采集时间" align="center" prop="collectTime" />
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<div v-if="chartData && queryParams.meId==22" class="div-chart">
|
||||
<el-radio-group v-model="selChart1" class="chart1-group" @change="showChartData(1)">
|
||||
<el-radio :label="0" border>X方向位移(mm)</el-radio>
|
||||
<el-radio :label="1" border>X方向累计变化量(mm)</el-radio>
|
||||
<el-radio :label="2" border>X方向单次变化量(mm)</el-radio>
|
||||
<el-radio :label="3" border>X方向变化速率(mm/d)</el-radio>
|
||||
</el-radio-group>
|
||||
<Chart ref="chart1" :chgOpt="opt=>changeOpt(opt,1)" :key="'c1-'+spId"/>
|
||||
|
||||
<el-radio-group v-model="selChart2" class="chart2-group" @change="showChartData(2)">
|
||||
<el-radio :label="0" border>Y方向位移(mm)</el-radio>
|
||||
<el-radio :label="1" border>Y方向累计变化量(mm)</el-radio>
|
||||
<el-radio :label="2" border>Y方向单次变化量(mm)</el-radio>
|
||||
<el-radio :label="3" border>Y方向变化速率(mm/d)</el-radio>
|
||||
</el-radio-group>
|
||||
<Chart ref="chart2" :chgOpt="opt=>changeOpt(opt,2)" :key="'c2-'+spId"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitData, getPitData, delPitData, addPitData, updatePitData } from "@/api/device/pitData";
|
||||
import { listPitElement } from '@/api/device/pitElement'
|
||||
import { listPitSurveyPoint } from '@/api/device/pitSurveyPoint'
|
||||
import Chart from '@/components/Chart'
|
||||
export default {
|
||||
name: "PitData",
|
||||
components:{
|
||||
Chart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 测点数据表格数据
|
||||
pitDataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
meId: null,
|
||||
spId: null,
|
||||
selDate: []
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
pitEls: [],//监测项
|
||||
pitSps: [],//测点
|
||||
chartData:null,
|
||||
selChart1:0,
|
||||
selChart2:0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//let dt1 = this.$dt((+new Date()) - 30 * 24 * 3600 * 1000);
|
||||
//let dt2 = this.$dt(new Date());
|
||||
//this.queryParams.selDate = [dt1, dt2];
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
computed:{
|
||||
spId(){
|
||||
return this.queryParams.spId;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
spId(n,o){
|
||||
if(n!=o){
|
||||
if(n){
|
||||
let postData = {
|
||||
spId: this.queryParams.spId,
|
||||
pageNum:this.queryParams.pageNum,
|
||||
pageSize:5000
|
||||
};
|
||||
listPitData(postData).then(d=>{
|
||||
let tmps=d.rows||[];
|
||||
this.chartData=tmps.length>0?tmps:null;
|
||||
this.selChart1=0;
|
||||
this.selChart2=0;
|
||||
this.showChartData(1);
|
||||
this.showChartData(2);
|
||||
});
|
||||
}else{
|
||||
this.chartData=null;
|
||||
}
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let prjId = this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length >= 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
this.pitEls=[];
|
||||
this.pitSps=[];
|
||||
this.queryParams.meId="";
|
||||
this.queryParams.spId="";
|
||||
}
|
||||
this.doQueryPitEL();
|
||||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length >= 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.doQueryPitEL();
|
||||
});
|
||||
},
|
||||
doQueryPitEL() {
|
||||
if (!this.queryParams.subDeptId) {
|
||||
this.pitEls = [];
|
||||
this.queryParams.meId = "";
|
||||
this.pitSps=[];
|
||||
this.queryParams.spId="";
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
listPitElement({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
projectId: this.queryParams.projectId,
|
||||
subDeptId: this.queryParams.subDeptId
|
||||
}).then(d => {
|
||||
this.pitEls = d.rows || [];
|
||||
if (this.pitEls.length > 0) {
|
||||
this.queryParams.meId = this.pitEls[0].srvId;
|
||||
} else {
|
||||
this.queryParams.meId = "";
|
||||
}
|
||||
this.doQueryPitSps();
|
||||
});
|
||||
},
|
||||
doQueryPitSps() {
|
||||
if (!this.queryParams.meId) {
|
||||
this.pitSps = [];
|
||||
this.queryParams.spId = "";
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
listPitSurveyPoint({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
meId: this.queryParams.meId
|
||||
}).then(d => {
|
||||
this.pitSps = d.rows || [];
|
||||
if (this.pitSps.length > 0) {
|
||||
this.queryParams.spId = this.pitSps[0].spId;
|
||||
} else {
|
||||
this.queryParams.spId = "";
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
changeOpt(opt,type){
|
||||
opt = {
|
||||
tooltip: {
|
||||
trigger: "axis"
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: !0x0
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
'saveAsImage': {}
|
||||
}
|
||||
},
|
||||
dataZoom:[{
|
||||
type:'slider',
|
||||
show:true
|
||||
},{
|
||||
type:"inside"
|
||||
}],
|
||||
xAxis:{
|
||||
type:"time"
|
||||
},
|
||||
yAxis:{
|
||||
|
||||
},
|
||||
series:[{
|
||||
data:this.chartData.map(it=>{
|
||||
let tmps=[];
|
||||
tmps.push(it.collectTime);
|
||||
let data=0;
|
||||
if(type==1){
|
||||
data=(it["displace,totalize,variation,changeRate".split(",")[this.selChart1]]||0).toFixed(3)
|
||||
}else{
|
||||
data=(it["displace2,totalize2,variation2,changeRate2".split(",")[this.selChart2]]||0).toFixed(3)
|
||||
}
|
||||
tmps.push(data);
|
||||
return tmps;
|
||||
}),
|
||||
sampling:'max',
|
||||
showSymbol:false,
|
||||
type:'line'
|
||||
}]
|
||||
}
|
||||
return opt;
|
||||
},
|
||||
showChartData(type){
|
||||
if(type==1){
|
||||
if(this.$refs.chart1){
|
||||
this.$refs.chart1.initChart();
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
this.showChartData(1);
|
||||
},400);
|
||||
}
|
||||
}
|
||||
if(type==2){
|
||||
if(this.$refs.chart2){
|
||||
this.$refs.chart2.initChart();
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
this.showChartData(2);
|
||||
},400);
|
||||
}
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.projectOptions && this.projectOptions.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询测点数据列表 */
|
||||
getList() {
|
||||
if (!this.queryParams.spId) {
|
||||
this.pitDataList = [];
|
||||
this.total = 0;
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
let postData = {
|
||||
spId: this.queryParams.spId,
|
||||
pageNum:this.queryParams.pageNum,
|
||||
pageSize:this.queryParams.pageSize
|
||||
};
|
||||
let selDate = this.queryParams.selDate;
|
||||
if (selDate && selDate.length > 0) {
|
||||
postData.createTime = this.$dt(selDate[0]).format("YYYY-MM-DD HH:mm:ss");
|
||||
if (selDate.length > 1) {
|
||||
postData.updateTime = this.$dt(selDate[1]).format("YYYY-MM-DD HH:mm:ss");
|
||||
}
|
||||
}
|
||||
listPitData(postData).then(response => {
|
||||
this.pitDataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
cfgId: null,
|
||||
dataType: null,
|
||||
dataId: null,
|
||||
spId: null,
|
||||
spName: null,
|
||||
collectTime: null,
|
||||
changeRate: null,
|
||||
changeRate2: null,
|
||||
displace: null,
|
||||
displace2: null,
|
||||
totalize: null,
|
||||
totalize2: null,
|
||||
variation: null,
|
||||
variation2: null,
|
||||
state: null,
|
||||
remark: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加测点数据";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPitData(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改测点数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePitData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPitData(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除测点数据编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitData(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('device/pitData/export', {
|
||||
...this.queryParams
|
||||
}, `pitData_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.survey-point-data-index {
|
||||
|
||||
.el-table {
|
||||
max-height: 50vh;
|
||||
height: unset !important;
|
||||
|
||||
.el-table__body-wrapper {
|
||||
height: auto !important;
|
||||
max-height: 40vh !important;
|
||||
}
|
||||
}
|
||||
.pagination-container{
|
||||
height: 50px !important;
|
||||
}
|
||||
.div-chart{
|
||||
padding-top:10px;
|
||||
.chart1-group{
|
||||
.el-radio{
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
.chart1-group{
|
||||
margin-top:10px;
|
||||
.el-radio{
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,92 @@
|
|||
<template>
|
||||
<el-dialog title="设备详情" custom-class="device-detail-dlg" top="30vh !important " :visible.sync="open" width="960px" append-to-body
|
||||
:close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<div class="nav-header">
|
||||
<span class="nav-text">基本信息</span>
|
||||
<span class="nav-line"></span>
|
||||
</div>
|
||||
<el-row class="row-header">
|
||||
<el-col :span="8">
|
||||
<span class="sp-label">设备名称:</span>
|
||||
<span class="sp-data">{{ row.name }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="sp-label">设备编号:</span>
|
||||
<span class="sp-data">{{ row.devCode }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="sp-label">设备型号:</span>
|
||||
<span class="sp-data">{{ row.devTypeName }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="nav-header">
|
||||
<span class="nav-text">关联测点</span>
|
||||
<span class="nav-line"></span>
|
||||
</div>
|
||||
<el-table :data="row.surveypoints" border stripe >
|
||||
<el-table-column label="监测项名称" align="center" prop="meName" />
|
||||
<el-table-column label="测点组名称" align="center" prop="groupName" />
|
||||
<el-table-column label="测点名称" align="center" prop="name" />
|
||||
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
open:false,
|
||||
row:{}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
showDialog(row){
|
||||
this.row=row;
|
||||
this.open=true;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.device-detail-dlg{
|
||||
.el-dialog__body{
|
||||
padding:10px 20px;
|
||||
}
|
||||
.row-header {
|
||||
line-height: 30px;
|
||||
|
||||
.sp-label {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sp-data {
|
||||
margin-left: 4px;
|
||||
columns: #888;
|
||||
}
|
||||
}
|
||||
.nav-header{
|
||||
position: relative;
|
||||
line-height: 60px;
|
||||
.nav-text{
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #444;
|
||||
background: #ffff;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: inline-block;
|
||||
padding-right: 8px;
|
||||
}
|
||||
.nav-line{
|
||||
|
||||
display: block;
|
||||
position: absolute;
|
||||
border-bottom: solid 1px #cccccc54;
|
||||
width: 100%;
|
||||
top: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,366 +1,91 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input
|
||||
v-model="queryParams.cfgId"
|
||||
placeholder="请输入配置ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" clearable @change="doQuerySub">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="devId">
|
||||
<el-input
|
||||
v-model="queryParams.devId"
|
||||
placeholder="请输入设备ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="certUrl">
|
||||
<el-input
|
||||
v-model="queryParams.certUrl"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="checkDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.checkDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择">
|
||||
</el-date-picker>
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" filterable placeholder="请选择总包单位" clearable>
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备名称" prop="devCode">
|
||||
<el-input
|
||||
v-model="queryParams.devCode"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.name" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="devTypeName">
|
||||
<el-input
|
||||
v-model="queryParams.devTypeName"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
||||
<el-form-item label="设备编号" prop="cfgId">
|
||||
<el-input v-model="queryParams.devCode" placeholder="请输入设备编号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="key">
|
||||
<el-input
|
||||
v-model="queryParams.key"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="manufacturer">
|
||||
<el-input
|
||||
v-model="queryParams.manufacturer"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="orgId">
|
||||
<el-input
|
||||
v-model="queryParams.orgId"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="parent">
|
||||
<el-input
|
||||
v-model="queryParams.parent"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="parentIds">
|
||||
<el-input
|
||||
v-model="queryParams.parentIds"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="position">
|
||||
<el-input
|
||||
v-model="queryParams.position"
|
||||
placeholder="请输入位置"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程ID" prop="structureId">
|
||||
<el-input
|
||||
v-model="queryParams.structureId"
|
||||
placeholder="请输入工程ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="structureName">
|
||||
<el-input
|
||||
v-model="queryParams.structureName"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="typeCategory">
|
||||
<el-input
|
||||
v-model="queryParams.typeCategory"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="verifyDate">
|
||||
<el-input
|
||||
v-model="queryParams.verifyDate"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
||||
<el-form-item label="设备型号" prop="cfgId">
|
||||
<el-input v-model="queryParams.devTypeName" placeholder="请输入设备型号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row :gutter="10" class="mb8" v-if="1==2">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['device:pitDevice:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['device:pitDevice:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['device:pitDevice:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitDevice:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['device:pitDevice:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitDevice:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['device:pitDevice:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['device:pitDevice:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitDeviceList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="" align="center" prop="id" />
|
||||
<el-table-column label="配置ID" align="center" prop="cfgId" />
|
||||
<el-table-column label="设备ID" align="center" prop="devId" />
|
||||
<el-table-column label="" align="center" prop="autoType" />
|
||||
<el-table-column label="" align="center" prop="certUrl" />
|
||||
<el-table-column label="" align="center" prop="checkDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" align="center" prop="devCode" />
|
||||
<el-table-column label="" align="center" prop="devShadow" />
|
||||
<el-table-column label="" align="center" prop="devType" />
|
||||
<el-table-column label="" align="center" prop="devTypeName" />
|
||||
<el-table-column label="" align="center" prop="key" />
|
||||
<el-table-column label="" align="center" prop="manufacturer" />
|
||||
<el-table-column label="编号" align="center" prop="id" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="180" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="180" />
|
||||
<el-table-column label="设备名称" align="center" prop="name" />
|
||||
<el-table-column label="" align="center" prop="orgId" />
|
||||
<el-table-column label="" align="center" prop="parent" />
|
||||
<el-table-column label="" align="center" prop="parentIds" />
|
||||
<el-table-column label="" align="center" prop="productType" />
|
||||
<el-table-column label="位置" align="center" prop="position" />
|
||||
<el-table-column label="" align="center" prop="status" />
|
||||
<el-table-column label="工程ID" align="center" prop="structureId" />
|
||||
<el-table-column label="" align="center" prop="structureName" />
|
||||
<el-table-column label="" align="center" prop="typeCategory" />
|
||||
<el-table-column label="" align="center" prop="typeName" />
|
||||
<el-table-column label="" align="center" prop="verifyDate" />
|
||||
<el-table-column label="" align="center" prop="state" />
|
||||
<el-table-column label="" align="center" prop="remark" />
|
||||
<el-table-column label="" align="center" prop="isDel" />
|
||||
<el-table-column label="设备编号" align="center" prop="devCode" />
|
||||
<el-table-column label="设备类型" align="center" prop="devTypeName" />
|
||||
<el-table-column label="关联测点数目" align="center" prop="ptCount" />
|
||||
<el-table-column label="当前电量" align="center" prop="batDl" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitDevice:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitDevice:remove']"
|
||||
>删除</el-button>
|
||||
<el-button size="mini" type="text" v-if="1==2" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitDevice:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-tickets" @click="handleDetail(scope.row)">详情</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitDevice:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="devId">
|
||||
<el-input v-model="form.devId" placeholder="请输入设备ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="certUrl">
|
||||
<el-input v-model="form.certUrl" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="checkDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.checkDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="devCode">
|
||||
<el-input v-model="form.devCode" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="devShadow">
|
||||
<el-input v-model="form.devShadow" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="devTypeName">
|
||||
<el-input v-model="form.devTypeName" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="key">
|
||||
<el-input v-model="form.key" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="manufacturer">
|
||||
<el-input v-model="form.manufacturer" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="orgId">
|
||||
<el-input v-model="form.orgId" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="parent">
|
||||
<el-input v-model="form.parent" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="parentIds">
|
||||
<el-input v-model="form.parentIds" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="position">
|
||||
<el-input v-model="form.position" placeholder="请输入位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工程ID" prop="structureId">
|
||||
<el-input v-model="form.structureId" placeholder="请输入工程ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="structureName">
|
||||
<el-input v-model="form.structureName" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="typeCategory">
|
||||
<el-input v-model="form.typeCategory" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="typeName">
|
||||
<el-input v-model="form.typeName" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="verifyDate">
|
||||
<el-input v-model="form.verifyDate" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<deviceDetailDlg ref="detailDlg"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitDevice, getPitDevice, delPitDevice, addPitDevice, updatePitDevice } from "@/api/device/pitDevice";
|
||||
|
||||
import deviceDetailDlg from './deviceDetailDlg.vue'
|
||||
export default {
|
||||
components:{
|
||||
deviceDetailDlg
|
||||
},
|
||||
name: "PitDevice",
|
||||
data() {
|
||||
return {
|
||||
|
@ -386,48 +111,76 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
devId: null,
|
||||
autoType: null,
|
||||
certUrl: null,
|
||||
checkDate: null,
|
||||
devCode: null,
|
||||
devShadow: null,
|
||||
devType: null,
|
||||
devTypeName: null,
|
||||
key: null,
|
||||
manufacturer: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
name: null,
|
||||
orgId: null,
|
||||
parent: null,
|
||||
parentIds: null,
|
||||
productType: null,
|
||||
position: null,
|
||||
status: null,
|
||||
structureId: null,
|
||||
structureName: null,
|
||||
typeCategory: null,
|
||||
typeName: null,
|
||||
verifyDate: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
devCode: null,
|
||||
devTypeName: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
init() {
|
||||
if (this.projectOptions && this.projectOptions.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询设备管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPitDevice(this.queryParams).then(response => {
|
||||
this.pitDeviceList = response.rows;
|
||||
this.pitDeviceList = (response.rows||[]).map(it=>{
|
||||
it.ptCount=it.surveypoints?it.surveypoints.length:0;
|
||||
let obj=this.$tryToJson(it.devShadow,{});
|
||||
let batDl=obj.state?.reported?.BAT_DL||'';
|
||||
it.batDl=batDl?batDl+"%":"-";
|
||||
return it;
|
||||
});
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
@ -487,7 +240,7 @@ export default {
|
|||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
@ -526,15 +279,18 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
handleDetail(row){
|
||||
this.$refs.detailDlg.showDialog(row);
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除设备管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除设备管理编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitDevice(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
|
|
@ -1,61 +1,17 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input
|
||||
v-model="queryParams.cfgId"
|
||||
placeholder="请输入配置ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" clearable @change="doQuerySub">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端ID" prop="srvId">
|
||||
<el-input
|
||||
v-model="queryParams.srvId"
|
||||
placeholder="请输入服务端ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端参数maxSp" prop="maxSp">
|
||||
<el-input
|
||||
v-model="queryParams.maxSp"
|
||||
placeholder="请输入服务端参数maxSp"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端参数name" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入服务端参数name"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端参数nameEn" prop="nameEn">
|
||||
<el-input
|
||||
v-model="queryParams.nameEn"
|
||||
placeholder="请输入服务端参数nameEn"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="请输入状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" filterable placeholder="请选择总包单位" clearable>
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
@ -63,126 +19,48 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row :gutter="10" class="mb8" v-if="1==2">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['device:pitElement:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['device:pitElement:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['device:pitElement:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitElement:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['device:pitElement:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitElement:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['device:pitElement:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['device:pitElement:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitElementList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="${comment}" align="center" prop="id" />
|
||||
<el-table-column label="配置ID" align="center" prop="cfgId" />
|
||||
<el-table-column label="服务端ID" align="center" prop="srvId" />
|
||||
<el-table-column label="服务端参数maxSp" align="center" prop="maxSp" />
|
||||
<el-table-column label="服务端参数monitorStatus" align="center" prop="monitorStatus" />
|
||||
<el-table-column label="服务端参数name" align="center" prop="name" />
|
||||
<el-table-column label="服务端参数nameEn" align="center" prop="nameEn" />
|
||||
<el-table-column label="服务端参数type" align="center" prop="type" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitElement:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitElement:remove']"
|
||||
>删除</el-button>
|
||||
<el-table v-loading="loading" :data="pitElementList" stripe>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-table :data="props.row.children" border stripe>
|
||||
<el-table-column label="子项名称" align="center" prop="name" />
|
||||
<el-table-column label="子项步长" align="center" prop="step" />
|
||||
<el-table-column label="子项单位" align="center" prop="unit" />
|
||||
<el-table-column label="子项值范围" align="center" prop="valueRange" />
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="编号" align="center" prop="srvId" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="250" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="250" />
|
||||
<el-table-column label="监测项名称" align="center" prop="name" />
|
||||
<el-table-column label="监测项名称(EN)" align="center" prop="nameEn" />
|
||||
<el-table-column label="类型" align="center" prop="type" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改监测项管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端ID" prop="srvId">
|
||||
<el-input v-model="form.srvId" placeholder="请输入服务端ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端参数maxSp" prop="maxSp">
|
||||
<el-input v-model="form.maxSp" placeholder="请输入服务端参数maxSp" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端参数name" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入服务端参数name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端参数nameEn" prop="nameEn">
|
||||
<el-input v-model="form.nameEn" placeholder="请输入服务端参数nameEn" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -215,27 +93,62 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
srvId: null,
|
||||
maxSp: null,
|
||||
monitorStatus: null,
|
||||
name: null,
|
||||
nameEn: null,
|
||||
type: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
init() {
|
||||
if (this.projectOptions && this.projectOptions.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询监测项管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -284,7 +197,7 @@ export default {
|
|||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
@ -326,12 +239,12 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除监测项管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除监测项管理编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitElement(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
|
|
@ -1,297 +1,86 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input
|
||||
v-model="queryParams.cfgId"
|
||||
placeholder="请输入配置ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" clearable @change="doQuerySub">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测点ID" prop="spId">
|
||||
<el-input
|
||||
v-model="queryParams.spId"
|
||||
placeholder="请输入测点ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属监测点组ID" prop="groupId">
|
||||
<el-input
|
||||
v-model="queryParams.groupId"
|
||||
placeholder="请输入所属监测点组ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属监测点组名称" prop="groupName">
|
||||
<el-input
|
||||
v-model="queryParams.groupName"
|
||||
placeholder="请输入所属监测点组名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项Id" prop="meId">
|
||||
<el-input
|
||||
v-model="queryParams.meId"
|
||||
placeholder="请输入监测项Id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" filterable placeholder="请选择总包单位" clearable >
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="监测项名称" prop="meName">
|
||||
<el-input
|
||||
v-model="queryParams.meName"
|
||||
placeholder="请输入监测项名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项英文标识名" prop="meNameEn">
|
||||
<el-input
|
||||
v-model="queryParams.meNameEn"
|
||||
placeholder="请输入监测项英文标识名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="改时间" prop="modifyDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.modifyDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择改时间">
|
||||
</el-date-picker>
|
||||
<el-input v-model="queryParams.meName" placeholder="请输入监测项名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="测点名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入测点名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="position">
|
||||
<el-input
|
||||
v-model="queryParams.position"
|
||||
placeholder="请输入位置"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源形式0:人工上传;1:设备" prop="dataSource">
|
||||
<el-input
|
||||
v-model="queryParams.dataSource"
|
||||
placeholder="请输入数据来源形式0:人工上传;1:设备"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.createDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="请输入状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.name" placeholder="请输入测点名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row :gutter="10" class="mb8" >
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['device:pitSurveyPoint:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" v-if="hasPosition" plain icon="el-icon-location-outline" size="mini" @click="handlePosition">标注</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8" v-if="1==2">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['device:pitSurveyPoint:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['device:pitSurveyPoint:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitSurveyPoint:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['device:pitSurveyPoint:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitSurveyPoint:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['device:pitSurveyPoint:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['device:pitSurveyPoint:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitSurveyPointList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="" align="center" prop="id" />
|
||||
<el-table-column label="配置ID" align="center" prop="cfgId" />
|
||||
<el-table-column label="测点ID" align="center" prop="spId" />
|
||||
<el-table-column label="所属监测点组ID" align="center" prop="groupId" />
|
||||
<el-table-column label="编号" align="center" prop="spId" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="180" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="180" />
|
||||
<el-table-column label="所属监测点组名称" align="center" prop="groupName" />
|
||||
<el-table-column label="监测项Id" align="center" prop="meId" />
|
||||
<el-table-column label="监测项名称" align="center" prop="meName" />
|
||||
<el-table-column label="监测项英文标识名" align="center" prop="meNameEn" />
|
||||
<el-table-column label="改时间" align="center" prop="modifyDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.modifyDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="测点名称" align="center" prop="name" />
|
||||
<el-table-column label="位置" align="center" prop="position" />
|
||||
<el-table-column label="数据来源形式0:人工上传;1:设备" align="center" prop="dataSource" />
|
||||
<el-table-column label="创建时间" align="center" prop="createDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="服务器status" align="center" prop="status" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitSurveyPoint:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitSurveyPoint:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="监测项英文标识名" align="center" prop="meNameEn" />
|
||||
<el-table-column label="测点名称" align="center" prop="name" />
|
||||
<el-table-column label="数据来源形式" align="center" prop="dataSource" >
|
||||
<template slot-scope="scope">{{ ["人工上传","设备"][scope.row.dataSource] }}</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改测点管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测点ID" prop="spId">
|
||||
<el-input v-model="form.spId" placeholder="请输入测点ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属监测点组ID" prop="groupId">
|
||||
<el-input v-model="form.groupId" placeholder="请输入所属监测点组ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属监测点组名称" prop="groupName">
|
||||
<el-input v-model="form.groupName" placeholder="请输入所属监测点组名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项Id" prop="meId">
|
||||
<el-input v-model="form.meId" placeholder="请输入监测项Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项名称" prop="meName">
|
||||
<el-input v-model="form.meName" placeholder="请输入监测项名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项英文标识名" prop="meNameEn">
|
||||
<el-input v-model="form.meNameEn" placeholder="请输入监测项英文标识名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="改时间" prop="modifyDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.modifyDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择改时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="测点名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入测点名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="位置" prop="position">
|
||||
<el-input v-model="form.position" placeholder="请输入位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源形式0:人工上传;1:设备" prop="dataSource">
|
||||
<el-input v-model="form.dataSource" placeholder="请输入数据来源形式0:人工上传;1:设备" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.createDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<surveyPointPositionDrawer ref="ptDrawer" @success="handleQuery"></surveyPointPositionDrawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitSurveyPoint, getPitSurveyPoint, delPitSurveyPoint, addPitSurveyPoint, updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
|
||||
|
||||
import surveyPointPositionDrawer from './surveyPointPositionDrawer.vue'
|
||||
export default {
|
||||
name: "PitSurveyPoint",
|
||||
components:{
|
||||
surveyPointPositionDrawer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -316,33 +105,72 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
spId: null,
|
||||
groupId: null,
|
||||
groupName: null,
|
||||
meId: null,
|
||||
meName: null,
|
||||
meNameEn: null,
|
||||
modifyDate: null,
|
||||
name: null,
|
||||
position: null,
|
||||
dataSource: null,
|
||||
createDate: null,
|
||||
status: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
projectId:null,
|
||||
subDeptId:null,
|
||||
meName:'',
|
||||
name:'',
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
computed:{
|
||||
hasPosition(){
|
||||
return this.queryParams.projectId && this.pitSurveyPointList.length>0;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlePosition(){
|
||||
this.$refs.ptDrawer.show(this.pitSurveyPointList,this.queryParams);
|
||||
},
|
||||
doQuerySub() {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
init() {
|
||||
if (this.projectOptions && this.projectOptions.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询测点管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -397,7 +225,7 @@ export default {
|
|||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
@ -439,12 +267,12 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除测点管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除测点管理编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitSurveyPoint(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<div class="pit-image-drawer" v-if="isOpen" style="padding:0px 10px">
|
||||
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="50%"
|
||||
style="padding-left: 20px" title="项目基坑图片管理">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="基坑图片" prop="imageUrls">
|
||||
<image-upload v-model="form.imageUrls" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
updateSurProject
|
||||
} from "@/api/project/surProject";
|
||||
export default {
|
||||
name: 'RuoyiUiPitImageDrawer',
|
||||
|
||||
data() {
|
||||
return {
|
||||
isOpen:false,
|
||||
prj:null,
|
||||
form:{
|
||||
imageUrls:[]
|
||||
},
|
||||
rules: {
|
||||
imageUrls: [{ required: true, message: "请上传验收图片", trigger: "blur" }],
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
submitForm(){
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
let postData={
|
||||
id:this.prj.id,
|
||||
prjPlanUrl:this.form.imageUrls
|
||||
};
|
||||
updateSurProject(postData).then(d=>{
|
||||
if(d.code==200){
|
||||
this.prj.prjPlanUrl=this.form.imageUrls;
|
||||
this.$modal.msgSuccess("修改成功!");
|
||||
}else{
|
||||
this.$modal.msgError("修改失败!");
|
||||
}
|
||||
this.isOpen=false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel(){
|
||||
this.isOpen=false;
|
||||
},
|
||||
show(prj) {
|
||||
this.prj = prj;
|
||||
if(prj.prjPlanUrl){
|
||||
this.form.imageUrls=prj.prjPlanUrl;
|
||||
}
|
||||
this.isOpen = true;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.pit-image-drawer{
|
||||
.el-drawer__body{
|
||||
padding:0px 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,128 @@
|
|||
<template>
|
||||
<div class="survey-point-position-drawer" v-if="isOpen" style="padding:0px 10px">
|
||||
<el-drawer v-if="isOpen" :visible.sync="isOpen" direction="rtl" size="960px"
|
||||
style="padding-left: 20px" title="项目基坑标注">
|
||||
<div style="width:940px;height:560px;" class="main-div" :style="'background-image:url('+imgUrl+')'">
|
||||
<span v-for="(it,idx) in pts" :key="idx" class="pt-item"
|
||||
v-move
|
||||
:style="'top:'+it.y+'px;left:'+it.x+'px;'">
|
||||
<i class="el-icon-location-outline pt-icon" ></i>
|
||||
<span class="pt-name">{{ it.name }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getSurProject} from "@/api/project/surProject";
|
||||
import {updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
name: 'RuoyiUiPitImageDrawer',
|
||||
data() {
|
||||
return {
|
||||
isOpen:false,
|
||||
pts:null,
|
||||
query:null,
|
||||
imgUrl:'',
|
||||
dragging:false,
|
||||
dragItem:null,
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
submitForm(){
|
||||
let pts=this.$el.querySelectorAll(".pt-item");
|
||||
let ajaxs=[];
|
||||
for(let i=0;i<pts.length;i++){
|
||||
let pt=pts[i];
|
||||
let top=pt.style.top.replace("px","");
|
||||
let left=pt.style.left.replace("px","");
|
||||
let obj={
|
||||
x:left,y:top
|
||||
}
|
||||
this.pts[i].position=JSON.stringify(obj);
|
||||
ajaxs.push(updatePitSurveyPoint({id:this.pts[i].id,position:this.pts[i].position}))
|
||||
}
|
||||
if(ajaxs.length>0){
|
||||
axios.all(ajaxs).then(res=>{
|
||||
if(res[0].code==200){
|
||||
this.$modal.msgSuccess("修改成功!");
|
||||
this.$emit("success")
|
||||
}else{
|
||||
this.$modal.msgError("修改失败!");
|
||||
}
|
||||
this.isOpen=false;
|
||||
});
|
||||
}else{
|
||||
this.isOpen=false;
|
||||
}
|
||||
},
|
||||
cancel(){
|
||||
this.isOpen=false;
|
||||
},
|
||||
show(pts,query) {
|
||||
this.pts = (pts||[]).map(it=>{
|
||||
let pt=this.$tryToJson(it.position,{x:0,y:0});
|
||||
it.x=pt.x||0;
|
||||
it.y=pt.y||0;
|
||||
return it;
|
||||
});
|
||||
this.query=query;
|
||||
this.isOpen = true;
|
||||
this.loadPitImage();
|
||||
},
|
||||
loadPitImage(){
|
||||
getSurProject(this.query.projectId).then(d=>{
|
||||
let url=d.data?.prjPlanUrl||"";
|
||||
if(!url){
|
||||
this.$modal.msgError("请配置项目的基坑图片[项目管理->更多操作->基坑图片管理]")
|
||||
}else{
|
||||
this.imgUrl=process.env.VUE_APP_BASE_API+url;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.survey-point-position-drawer{
|
||||
.el-drawer__body{
|
||||
padding:0px 10px;
|
||||
.main-div{
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
.pt-item{
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
.pt-icon{
|
||||
color:#2962FF;
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
text-shadow: 1px 1px 0px #F3E5F5;
|
||||
}
|
||||
.pt-name{
|
||||
display: block;
|
||||
color: #2962FF;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
text-shadow: 1px 1px 0px #F3E5F5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,125 +1,17 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input
|
||||
v-model="queryParams.cfgId"
|
||||
placeholder="请输入配置ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select v-model="queryParams.projectId" filterable placeholder="请选择项目" clearable @change="doQuerySub">
|
||||
<el-option v-for="(item, index) in projectOptions" :key="index" :label="item.projectName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端ID" prop="srvId">
|
||||
<el-input
|
||||
v-model="queryParams.srvId"
|
||||
placeholder="请输入服务端ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警信息" prop="alarmInfo">
|
||||
<el-input
|
||||
v-model="queryParams.alarmInfo"
|
||||
placeholder="请输入报警信息"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警名称" prop="alarmName">
|
||||
<el-input
|
||||
v-model="queryParams.alarmName"
|
||||
placeholder="请输入报警名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间段起始点" prop="intervalA">
|
||||
<el-input
|
||||
v-model="queryParams.intervalA"
|
||||
placeholder="请输入时间段起始点"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间段终止点" prop="intervalB">
|
||||
<el-input
|
||||
v-model="queryParams.intervalB"
|
||||
placeholder="请输入时间段终止点"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值等级0:正常 1:超预警2:超报警3:超控制" prop="level">
|
||||
<el-input
|
||||
v-model="queryParams.level"
|
||||
placeholder="请输入报警值等级0:正常 1:超预警2:超报警3:超控制"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项ID" prop="monitorElementId">
|
||||
<el-input
|
||||
v-model="queryParams.monitorElementId"
|
||||
placeholder="请输入监测项ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测分项Id" prop="monitorItemId">
|
||||
<el-input
|
||||
v-model="queryParams.monitorItemId"
|
||||
placeholder="请输入监测分项Id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测分项名称" prop="monitorItemName">
|
||||
<el-input
|
||||
v-model="queryParams.monitorItemName"
|
||||
placeholder="请输入监测分项名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值组Id" prop="tgId">
|
||||
<el-input
|
||||
v-model="queryParams.tgId"
|
||||
placeholder="请输入报警值组Id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值" prop="threshold">
|
||||
<el-input
|
||||
v-model="queryParams.threshold"
|
||||
placeholder="请输入报警值"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
v-model="queryParams.unit"
|
||||
placeholder="请输入单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="请输入状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="总包单位" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" filterable placeholder="请选择总包单位" clearable>
|
||||
<el-option v-for="(item, index) in depts" :key="index" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
@ -127,157 +19,46 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row :gutter="10" class="mb8" v-if="1==2">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['device:pitThreshold:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['device:pitThreshold:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['device:pitThreshold:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitThreshold:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['device:pitThreshold:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitThreshold:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['device:pitThreshold:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['device:pitThreshold:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitThresholdList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="" align="center" prop="id" />
|
||||
<el-table-column label="配置ID" align="center" prop="cfgId" />
|
||||
<el-table-column label="服务端ID" align="center" prop="srvId" />
|
||||
<el-table-column label="报警信息" align="center" prop="alarmInfo" />
|
||||
<el-table-column label="报警名称" align="center" prop="alarmName" />
|
||||
<el-table-column label="时间段起始点" align="center" prop="intervalA" />
|
||||
<el-table-column label="时间段终止点" align="center" prop="intervalB" />
|
||||
<el-table-column label="报警值等级0:正常 1:超预警2:超报警3:超控制" align="center" prop="level" />
|
||||
<el-table-column label="监测项ID" align="center" prop="monitorElementId" />
|
||||
<el-table-column label="监测分项Id" align="center" prop="monitorItemId" />
|
||||
<el-table-column label="监测分项名称" align="center" prop="monitorItemName" />
|
||||
<el-table-column label="报警值组Id" align="center" prop="tgId" />
|
||||
<el-table-column label="报警值" align="center" prop="threshold" />
|
||||
<el-table-column label="编号" align="center" prop="id" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="180" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="180" />
|
||||
<el-table-column label="监测项" align="center" prop="elName" />
|
||||
<el-table-column label="监测分项" align="center" prop="monitorItemName" />
|
||||
<el-table-column label="类型" align="center" prop="type" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="状态" align="center" prop="state" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitThreshold:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitThreshold:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
<el-table-column label="报警值等级" align="center" prop="level">
|
||||
<template slot-scope="scope">{{ ["正常","超预警值","超报警值","超控制值"][scope.row.level] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警值配置" align="center" prop="threshold" />
|
||||
<el-table-column label="每天时间范围" align="center" prop="intervalA" >
|
||||
<template slot-scope="scope">{{scope.row.intervalA}}时 ~ {{ scope.row.intervalB }}时</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警提示信息" align="center" prop="alarmInfo" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改报警阈值对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置ID" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="服务端ID" prop="srvId">
|
||||
<el-input v-model="form.srvId" placeholder="请输入服务端ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警信息" prop="alarmInfo">
|
||||
<el-input v-model="form.alarmInfo" placeholder="请输入报警信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警名称" prop="alarmName">
|
||||
<el-input v-model="form.alarmName" placeholder="请输入报警名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时间段起始点" prop="intervalA">
|
||||
<el-input v-model="form.intervalA" placeholder="请输入时间段起始点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时间段终止点" prop="intervalB">
|
||||
<el-input v-model="form.intervalB" placeholder="请输入时间段终止点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值等级0:正常 1:超预警2:超报警3:超控制" prop="level">
|
||||
<el-input v-model="form.level" placeholder="请输入报警值等级0:正常 1:超预警2:超报警3:超控制" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测项ID" prop="monitorElementId">
|
||||
<el-input v-model="form.monitorElementId" placeholder="请输入监测项ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测分项Id" prop="monitorItemId">
|
||||
<el-input v-model="form.monitorItemId" placeholder="请输入监测分项Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测分项名称" prop="monitorItemName">
|
||||
<el-input v-model="form.monitorItemName" placeholder="请输入监测分项名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值组Id" prop="tgId">
|
||||
<el-input v-model="form.tgId" placeholder="请输入报警值组Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值" prop="threshold">
|
||||
<el-input v-model="form.threshold" placeholder="请输入报警值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -310,34 +91,62 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
srvId: null,
|
||||
alarmInfo: null,
|
||||
alarmName: null,
|
||||
intervalA: null,
|
||||
intervalB: null,
|
||||
level: null,
|
||||
monitorElementId: null,
|
||||
monitorItemId: null,
|
||||
monitorItemName: null,
|
||||
tgId: null,
|
||||
threshold: null,
|
||||
type: null,
|
||||
unit: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
} else {
|
||||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
init() {
|
||||
if (this.projectOptions && this.projectOptions.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询报警阈值列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -393,7 +202,7 @@ export default {
|
|||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
@ -435,12 +244,12 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除报警阈值编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除报警阈值编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitThreshold(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
|
|
@ -133,8 +133,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
|
@ -144,14 +145,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
|
|
|
@ -501,8 +501,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
|
@ -512,14 +513,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
|
|
|
@ -370,8 +370,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
|
@ -381,14 +382,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
|
|
|
@ -420,8 +420,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
|
@ -431,14 +432,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
|
|
|
@ -356,8 +356,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
|
@ -367,14 +368,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
|
|
|
@ -389,8 +389,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
|
@ -400,14 +401,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
|
|
|
@ -183,8 +183,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.subDeptId = tmps[0].deptId;
|
||||
|
@ -194,14 +195,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.subDeptId = objs[0].deptId;
|
||||
|
|
|
@ -205,6 +205,8 @@
|
|||
v-hasPermi="['project:costOutput:edit']">项目成本产值管理</el-dropdown-item>
|
||||
<el-dropdown-item command="handleStandard" icon="el-icon-s-grid"
|
||||
v-hasPermi="['project:projectStandard:list']">标准化管理</el-dropdown-item>
|
||||
<el-dropdown-item command="handlePitImage" icon="el-icon-picture-outline"
|
||||
v-hasPermi="['project:projectStandard:list']">基坑图片管理</el-dropdown-item>
|
||||
<el-dropdown-item command="handleDelete" icon="el-icon-delete"
|
||||
v-hasPermi="['project:surProject:remove']">删除项目</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
@ -395,6 +397,7 @@
|
|||
<prjPhotographyDrawer ref="prjPhotographyDrawer"></prjPhotographyDrawer>
|
||||
<projectDesignDrawer ref="designDrawer"></projectDesignDrawer>
|
||||
<CommitteeDrawer ref="committeeDrawer"></CommitteeDrawer>
|
||||
<pitImageDrawer ref="pigImgDrawer"></pitImageDrawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -431,6 +434,7 @@ import prjPhotographyDrawer from '@/views/video/prjphotography/prjPhotographyDra
|
|||
import projectDesignDrawer from '@/views/project/projectDesign/projectDesignDrawer.vue';
|
||||
import CommitteeDrawer from '@/views/project/projectCommittee/projectCommitteeDrawer.vue'
|
||||
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
||||
import pitImageDrawer from '@/views/device/pitSurveyPoint/pitImageDrawer.vue'
|
||||
|
||||
export default {
|
||||
name: "SurProject",
|
||||
|
@ -456,7 +460,8 @@ export default {
|
|||
aiBoxVideoConfigDrawer,
|
||||
prjPhotographyDrawer,
|
||||
projectDesignDrawer,
|
||||
CommitteeDrawer
|
||||
CommitteeDrawer,
|
||||
pitImageDrawer
|
||||
},
|
||||
dicts: [
|
||||
"sur_project_xmjd",
|
||||
|
@ -724,6 +729,9 @@ export default {
|
|||
case "handleCommittee":
|
||||
this.$refs.committeeDrawer.show(row);
|
||||
break;
|
||||
case "handlePitImage":
|
||||
this.$refs.pigImgDrawer.show(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -249,8 +249,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
|
@ -260,14 +261,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
|
|
|
@ -297,8 +297,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.deptId = tmps[0].deptId;
|
||||
|
@ -308,14 +309,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.deptId = objs[0].deptId;
|
||||
|
|
|
@ -290,9 +290,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
this.depts = tmps;
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.trainDeptIds = tmps[0].deptId;
|
||||
} else {
|
||||
|
@ -301,14 +301,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.trainDeptIds = objs[0].deptId;
|
||||
|
|
|
@ -287,8 +287,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
doQuerySub() {
|
||||
let tmps = this.prjDept2 && this.prjDept2[this.queryParams.projectId] ? this.prjDept2[this.queryParams.projectId] || [] : [];
|
||||
if (tmps.length > 0) {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
if (tmps.length > 0 || !prjId) {
|
||||
this.depts = tmps;
|
||||
if (tmps.length == 1) {
|
||||
this.queryParams.trainDeptIds = tmps[0].deptId;
|
||||
|
@ -298,14 +299,14 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$api.publics.queryUnitList({
|
||||
projectId: this.queryParams.projectId,
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).then((d) => {
|
||||
let objs = d.rows || [];
|
||||
if (!this.prjDept2) {
|
||||
this.prjDept2 = {};
|
||||
}
|
||||
this.prjDept2[this.queryParams.projectId] = objs;
|
||||
this.prjDept2[prjId] = objs;
|
||||
this.depts = objs;
|
||||
if (objs.length == 1) {
|
||||
this.queryParams.trainDeptIds = objs[0].deptId;
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.yanzhu.jh.device.domain.PitmonitSouthsmosAlarm;
|
||||
import com.yanzhu.jh.device.domain.PitmonitSouthsmosData;
|
||||
import com.yanzhu.jh.device.service.*;
|
||||
import com.yanzhu.jh.project.domain.SurProjectAttendanceData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
/***
|
||||
* 基坑监测
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bgscreen/pitmonit")
|
||||
public class PitMonitController {
|
||||
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosDataService dataService;
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosAlarmService alarmService;
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosDeviceService deviceService;
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosDevSpService devSpService;
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosElementItemService elementItemService;
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosElementService elementService;
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosSurveypointService surveypointService;
|
||||
@Autowired
|
||||
private IPitmonitSouthsmosThresholdService thresholdService;
|
||||
@Autowired
|
||||
private IProjectPitMonitCfgService cfgService;
|
||||
|
||||
@GetMapping("/totalCount")
|
||||
public AjaxResult totalCount(Long prjId) {
|
||||
int dataCount=dataService.getCountByPrjId(prjId);
|
||||
int devCount=deviceService.getCountByPrjId(prjId);
|
||||
Map<String,Integer> map=new HashMap<>();
|
||||
map.put("data",dataCount);
|
||||
map.put("dev",devCount);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
@GetMapping("/alarm")
|
||||
public AjaxResult alarmList(Long prjId){
|
||||
String status="false";
|
||||
List<PitmonitSouthsmosAlarm> list=alarmService.queryByState(prjId,status);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 获取项目中测点最后一条数据
|
||||
*/
|
||||
@GetMapping("/getLastDataForElement")
|
||||
public AjaxResult getLastDataForElement(Long prjId){
|
||||
List<PitmonitSouthsmosData> list=dataService.getLastDataForElement(prjId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 按收集日期和数据类型查询数据
|
||||
*/
|
||||
@PostMapping("/selectByDate")
|
||||
public AjaxResult selectByDate(@RequestBody PitmonitSouthsmosData where){
|
||||
List<PitmonitSouthsmosData> list=dataService.selectByDate(where);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据监控天数
|
||||
*/
|
||||
@GetMapping("/monitDays")
|
||||
public AjaxResult monitDays(Long prjId){
|
||||
Long days=dataService.monitDays(prjId);
|
||||
return AjaxResult.success(days);
|
||||
}
|
||||
}
|
|
@ -5,13 +5,7 @@ import java.util.List;
|
|||
import com.ruoyi.common.enums.BusinessType;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
@ -81,7 +75,7 @@ public class ProjectPitMonitCfgController extends BaseController
|
|||
@PreAuthorize("@ss.hasPermi('device:pitConfig:add')")
|
||||
@Log(title = "项目基坑监测配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(ProjectPitMonitCfg surProjectPitMonitCfg)
|
||||
public AjaxResult add(@RequestBody ProjectPitMonitCfg surProjectPitMonitCfg)
|
||||
{
|
||||
return toAjax(surProjectPitMonitCfgService.insertSurProjectPitMonitCfg(surProjectPitMonitCfg));
|
||||
}
|
||||
|
@ -93,7 +87,7 @@ public class ProjectPitMonitCfgController extends BaseController
|
|||
@PreAuthorize("@ss.hasPermi('device:pitConfig:edit')")
|
||||
@Log(title = "项目基坑监测配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(ProjectPitMonitCfg surProjectPitMonitCfg)
|
||||
public AjaxResult edit(@RequestBody ProjectPitMonitCfg surProjectPitMonitCfg)
|
||||
{
|
||||
return toAjax(surProjectPitMonitCfgService.updateSurProjectPitMonitCfg(surProjectPitMonitCfg));
|
||||
}
|
||||
|
|
|
@ -41,22 +41,22 @@ public class PitmonitSouthsmosAlarm extends BaseEntity
|
|||
private Date gmtAlarm;
|
||||
|
||||
/** 报警时间,如果数据回落至正常范围或被处理,则报警结束 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报警时间,如果数据回落至正常范围或被处理,则报警结束", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date gmtAlarmOver;
|
||||
|
||||
/** 开始后第一次产生报警的时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开始后第一次产生报警的时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date gmtAlarmStart;
|
||||
|
||||
/** 数据库记录创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "数据库记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date gmtCreate;
|
||||
|
||||
/** 报警更新时间,该报警每产生一次都会更新该时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报警更新时间,该报警每产生一次都会更新该时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date gmtModified;
|
||||
|
||||
|
@ -136,6 +136,46 @@ public class PitmonitSouthsmosAlarm extends BaseEntity
|
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isDel;
|
||||
|
||||
|
||||
private Long projectId;
|
||||
private Long subDeptId;
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
|
||||
private String prjName;
|
||||
private String deptName;
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getPrjName() {
|
||||
return prjName;
|
||||
}
|
||||
|
||||
public void setPrjName(String prjName) {
|
||||
this.prjName = prjName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
|
@ -42,7 +42,7 @@ public class PitmonitSouthsmosData extends BaseEntity
|
|||
private String spName;
|
||||
|
||||
/** 收集时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "收集时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date collectTime;
|
||||
|
||||
|
@ -86,7 +86,44 @@ public class PitmonitSouthsmosData extends BaseEntity
|
|||
@Excel(name = "")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
private Long subDeptId;
|
||||
private Long projectId;
|
||||
private String prjName;
|
||||
private String deptName;
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getPrjName() {
|
||||
return prjName;
|
||||
}
|
||||
|
||||
public void setPrjName(String prjName) {
|
||||
this.prjName = prjName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.jh.device.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
@ -121,7 +123,54 @@ public class PitmonitSouthsmosDevice extends BaseEntity
|
|||
@Excel(name = "")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
private Long subDeptId;
|
||||
private Long projectId;
|
||||
private String prjName;
|
||||
private String deptName;
|
||||
|
||||
private List<PitmonitSouthsmosSurveypoint> surveypoints;
|
||||
|
||||
public List<PitmonitSouthsmosSurveypoint> getSurveypoints() {
|
||||
return surveypoints;
|
||||
}
|
||||
|
||||
public void setSurveypoints(List<PitmonitSouthsmosSurveypoint> surveypoints) {
|
||||
this.surveypoints = surveypoints;
|
||||
}
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getPrjName() {
|
||||
return prjName;
|
||||
}
|
||||
|
||||
public void setPrjName(String prjName) {
|
||||
this.prjName = prjName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 监测项管理对象 dev_pitmonit_southsmos_element
|
||||
*
|
||||
|
@ -144,6 +146,52 @@ public class PitmonitSouthsmosElement extends BaseEntity
|
|||
{
|
||||
return isDel;
|
||||
}
|
||||
private Long subDeptId;
|
||||
private Long projectId;
|
||||
private String prjName;
|
||||
private String deptName;
|
||||
|
||||
private List<PitmonitSouthsmosElementItem> children;
|
||||
|
||||
public List<PitmonitSouthsmosElementItem> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<PitmonitSouthsmosElementItem> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getPrjName() {
|
||||
return prjName;
|
||||
}
|
||||
|
||||
public void setPrjName(String prjName) {
|
||||
this.prjName = prjName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -81,7 +81,43 @@ public class PitmonitSouthsmosSurveypoint extends BaseEntity
|
|||
/** */
|
||||
@Excel(name = "")
|
||||
private Long isDel;
|
||||
private Long subDeptId;
|
||||
private Long projectId;
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getPrjName() {
|
||||
return prjName;
|
||||
}
|
||||
|
||||
public void setPrjName(String prjName) {
|
||||
this.prjName = prjName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
private String prjName;
|
||||
private String deptName;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
|
@ -82,7 +82,53 @@ public class PitmonitSouthsmosThreshold extends BaseEntity
|
|||
@Excel(name = "")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
private Long subDeptId;
|
||||
private Long projectId;
|
||||
private String prjName;
|
||||
private String deptName;
|
||||
private String elName;
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getPrjName() {
|
||||
return prjName;
|
||||
}
|
||||
|
||||
public void setPrjName(String prjName) {
|
||||
this.prjName = prjName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getElName() {
|
||||
return elName;
|
||||
}
|
||||
|
||||
public void setElName(String elName) {
|
||||
this.elName = elName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,25 @@ public class ProjectPitMonitCfg extends BaseEntity
|
|||
@Excel(name = "1-启用,0-停用")
|
||||
private Long enabled;
|
||||
|
||||
private String projectName;
|
||||
private String deptName;
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long state;
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface PitmonitSouthsmosAlarmMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDevPitmonitSouthsmosAlarmByIds(Long[] ids);
|
||||
|
||||
public List<PitmonitSouthsmosAlarm> queryByState(PitmonitSouthsmosAlarm where);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.yanzhu.jh.device.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.device.domain.PitmonitSouthsmosData;
|
||||
|
||||
|
@ -58,4 +59,21 @@ public interface PitmonitSouthsmosDataMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDevPitmonitSouthsmosDataByIds(Long[] ids);
|
||||
|
||||
public int getCountByPrjId(Long prjId);
|
||||
|
||||
/**
|
||||
* 获取项目中测点最后一条数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<PitmonitSouthsmosData> getLastDataForElement(Long id);
|
||||
/**
|
||||
* 按收集日期和数据类型查询数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<PitmonitSouthsmosData> selectByDate(PitmonitSouthsmosData where);
|
||||
|
||||
public Date monitDays(Long id);
|
||||
}
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface PitmonitSouthsmosDeviceMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDevPitmonitSouthsmosDeviceByIds(Long[] ids);
|
||||
|
||||
public int getCountByPrjId(Long id);
|
||||
}
|
||||
|
|
|
@ -58,4 +58,12 @@ public interface IPitmonitSouthsmosAlarmService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDevPitmonitSouthsmosAlarmById(Long id);
|
||||
|
||||
/**
|
||||
* 按项目和状态来查询
|
||||
* @param prjId
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
public List<PitmonitSouthsmosAlarm> queryByState(Long prjId, String status);
|
||||
}
|
||||
|
|
|
@ -58,4 +58,24 @@ public interface IPitmonitSouthsmosDataService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDevPitmonitSouthsmosDataById(Long id);
|
||||
|
||||
public int getCountByPrjId(Long prjId);
|
||||
|
||||
/**
|
||||
* 获取项目中测点最后一条数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<PitmonitSouthsmosData> getLastDataForElement(Long id);
|
||||
|
||||
/**
|
||||
* 按收集日期和数据类型查询数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<PitmonitSouthsmosData> selectByDate(PitmonitSouthsmosData where);
|
||||
/**
|
||||
* 数据监控天数
|
||||
*/
|
||||
public Long monitDays(Long prjId);
|
||||
}
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface IPitmonitSouthsmosDeviceService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDevPitmonitSouthsmosDeviceById(Long id);
|
||||
|
||||
public int getCountByPrjId(Long prjId);
|
||||
}
|
||||
|
|
|
@ -95,4 +95,12 @@ public class PitmonitSouthsmosAlarmServiceImpl implements IPitmonitSouthsmosAlar
|
|||
{
|
||||
return pitmonitSouthsmosAlarmMapper.deleteDevPitmonitSouthsmosAlarmById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PitmonitSouthsmosAlarm> queryByState(Long prjId, String status) {
|
||||
PitmonitSouthsmosAlarm where=new PitmonitSouthsmosAlarm();
|
||||
where.setProjectId(prjId);
|
||||
where.setStatus(status);
|
||||
return pitmonitSouthsmosAlarmMapper.queryByState(where);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package com.yanzhu.jh.device.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -95,4 +99,34 @@ public class PitmonitSouthsmosDataServiceImpl implements IPitmonitSouthsmosDataS
|
|||
{
|
||||
return pitmonitSouthsmosDataMapper.deleteDevPitmonitSouthsmosDataById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCountByPrjId(Long prjId) {
|
||||
return pitmonitSouthsmosDataMapper.getCountByPrjId(prjId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目中测点最后一条数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PitmonitSouthsmosData> getLastDataForElement(Long id) {
|
||||
return pitmonitSouthsmosDataMapper.getLastDataForElement(id);
|
||||
}
|
||||
/**
|
||||
* 按收集日期和数据类型查询数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PitmonitSouthsmosData> selectByDate(PitmonitSouthsmosData where) {
|
||||
return pitmonitSouthsmosDataMapper.selectByDate(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long monitDays(Long id) {
|
||||
Date dt= pitmonitSouthsmosDataMapper.monitDays(id);
|
||||
return dt==null?0: DateUtil.between(new Date(),dt, DateUnit.DAY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,4 +95,9 @@ public class PitmonitSouthsmosDeviceServiceImpl implements IPitmonitSouthsmosDev
|
|||
{
|
||||
return pitmonitSouthsmosDeviceMapper.deleteDevPitmonitSouthsmosDeviceById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCountByPrjId(Long prjId) {
|
||||
return pitmonitSouthsmosDeviceMapper.getCountByPrjId(prjId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,6 +177,31 @@ public class SurProject extends BaseEntity
|
|||
@Excel(name = "项目区域名称")
|
||||
private String projectRegionalName;
|
||||
|
||||
/**
|
||||
* 基坑平面图
|
||||
*/
|
||||
private String prjPlanUrl;
|
||||
/**
|
||||
* 效果图
|
||||
*/
|
||||
private String prjRenderingUrl;
|
||||
|
||||
public String getPrjPlanUrl() {
|
||||
return prjPlanUrl;
|
||||
}
|
||||
|
||||
public void setPrjPlanUrl(String prjPlanUrl) {
|
||||
this.prjPlanUrl = prjPlanUrl;
|
||||
}
|
||||
|
||||
public String getPrjRenderingUrl() {
|
||||
return prjRenderingUrl;
|
||||
}
|
||||
|
||||
public void setPrjRenderingUrl(String prjRenderingUrl) {
|
||||
this.prjRenderingUrl = prjRenderingUrl;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosAlarmMapper">
|
||||
|
||||
<resultMap type="DevPitmonitSouthsmosAlarm" id="DevPitmonitSouthsmosAlarmResult">
|
||||
<resultMap type="PitmonitSouthsmosAlarm" id="PitmonitSouthsmosAlarmResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="srvId" column="srvId" />
|
||||
|
@ -39,47 +39,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deptName" column="deptName"/>
|
||||
<result property="prjName" column="prjName"/>
|
||||
<result property="projectId" column="projectId"/>
|
||||
<result property="subDeptId" column=""/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevPitmonitSouthsmosAlarmVo">
|
||||
select id, cfgId, srvId, alarmInfo, alarmSource, gmtAlarm, gmtAlarmOver, gmtAlarmStart, gmtCreate, gmtModified, level, meId, meName, monitorItemId, numbers, result, resultUrl, spId, spName, staff, staffPhone, status, structureId, structureName, threshold, type, variety, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_alarm
|
||||
select id, cfgId, srvId, alarmInfo, alarmSource, gmtAlarm, gmtAlarmOver, gmtAlarmStart, gmtCreate, gmtModified, level, meId, meName, monitorItemId, numbers, result, resultUrl, spId, spName, staff, staffPhone, status, structureId, structureName, threshold, type, variety, state, remark, is_del, create_by, create_time, update_by, update_time
|
||||
from dev_pitmonit_southsmos_alarm
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosAlarmList" parameterType="PitmonitSouthsmosAlarm" resultMap="DevPitmonitSouthsmosAlarmResult">
|
||||
<include refid="selectDevPitmonitSouthsmosAlarmVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
<if test="srvId != null "> and srvId = #{srvId}</if>
|
||||
<if test="alarmInfo != null and alarmInfo != ''"> and alarmInfo = #{alarmInfo}</if>
|
||||
<if test="alarmSource != null and alarmSource != ''"> and alarmSource = #{alarmSource}</if>
|
||||
<if test="gmtAlarm != null "> and gmtAlarm = #{gmtAlarm}</if>
|
||||
<if test="gmtAlarmOver != null "> and gmtAlarmOver = #{gmtAlarmOver}</if>
|
||||
<if test="gmtAlarmStart != null "> and gmtAlarmStart = #{gmtAlarmStart}</if>
|
||||
<if test="gmtCreate != null "> and gmtCreate = #{gmtCreate}</if>
|
||||
<if test="gmtModified != null "> and gmtModified = #{gmtModified}</if>
|
||||
<if test="level != null "> and level = #{level}</if>
|
||||
<if test="meId != null "> and meId = #{meId}</if>
|
||||
<if test="meName != null and meName != ''"> and meName like concat('%', #{meName}, '%')</if>
|
||||
<if test="monitorItemId != null "> and monitorItemId = #{monitorItemId}</if>
|
||||
<if test="numbers != null "> and numbers = #{numbers}</if>
|
||||
<if test="result != null and result != ''"> and result = #{result}</if>
|
||||
<if test="resultUrl != null and resultUrl != ''"> and resultUrl = #{resultUrl}</if>
|
||||
<if test="spId != null "> and spId = #{spId}</if>
|
||||
<if test="spName != null and spName != ''"> and spName like concat('%', #{spName}, '%')</if>
|
||||
<if test="staff != null and staff != ''"> and staff = #{staff}</if>
|
||||
<if test="staffPhone != null and staffPhone != ''"> and staffPhone = #{staffPhone}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="structureId != null "> and structureId = #{structureId}</if>
|
||||
<if test="structureName != null and structureName != ''"> and structureName like concat('%', #{structureName}, '%')</if>
|
||||
<if test="threshold != null and threshold != ''"> and threshold = #{threshold}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="variety != null and variety != ''"> and variety = #{variety}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
<select id="selectDevPitmonitSouthsmosAlarmList" parameterType="PitmonitSouthsmosAlarm" resultMap="PitmonitSouthsmosAlarmResult">
|
||||
SELECT a.*,c.unitName AS deptName,b.project_id as projectId,p.projectName prjName,c.unitName as deptName,b.sub_dept_id subDeptId
|
||||
FROM dev_pitmonit_southsmos_alarm a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project p on b.project_id =p.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
WHERE a.is_del = 0
|
||||
<if test="cfgId != null "> and a.cfgId = #{cfgId}</if>
|
||||
<if test="srvId != null "> and a.srvId = #{srvId}</if>
|
||||
<if test="alarmInfo != null and alarmInfo != ''"> and a.alarmInfo = #{alarmInfo}</if>
|
||||
<if test="alarmSource != null and alarmSource != ''"> and a.alarmSource = #{alarmSource}</if>
|
||||
<if test="gmtAlarm != null "> and a.gmtAlarm = #{gmtAlarm}</if>
|
||||
<if test="gmtAlarmOver != null "> and a.gmtAlarmOver = #{gmtAlarmOver}</if>
|
||||
<if test="gmtAlarmStart != null "> and a.gmtAlarmStart = #{gmtAlarmStart}</if>
|
||||
<if test="gmtCreate != null "> and a.gmtCreate = #{gmtCreate}</if>
|
||||
<if test="gmtModified != null "> and a.gmtModified = #{gmtModified}</if>
|
||||
<if test="level != null "> and a.level = #{level}</if>
|
||||
<if test="meId != null "> and a.meId = #{meId}</if>
|
||||
<if test="meName != null and meName != ''"> and a.meName like concat('%', #{meName}, '%')</if>
|
||||
<if test="monitorItemId != null "> and a.monitorItemId = #{monitorItemId}</if>
|
||||
<if test="numbers != null "> and a.numbers = #{numbers}</if>
|
||||
<if test="result != null and result != ''"> and a.result = #{result}</if>
|
||||
<if test="resultUrl != null and resultUrl != ''"> and a.resultUrl = #{resultUrl}</if>
|
||||
<if test="spId != null "> and a.spId = #{spId}</if>
|
||||
<if test="spName != null and spName != ''"> and a.spName like concat('%', #{spName}, '%')</if>
|
||||
<if test="staff != null and staff != ''"> and a.staff = #{staff}</if>
|
||||
<if test="staffPhone != null and staffPhone != ''"> and a.staffPhone = #{staffPhone}</if>
|
||||
<if test="status != null and status != ''"> and a.status = #{status}</if>
|
||||
<if test="structureId != null "> and a.structureId = #{structureId}</if>
|
||||
<if test="structureName != null and structureName != ''"> and a.structureName like concat('%', #{structureName}, '%')</if>
|
||||
<if test="threshold != null and threshold != ''"> and a.threshold = #{threshold}</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="variety != null and variety != ''"> and a.variety = #{variety}</if>
|
||||
<if test="state != null "> and a.state = #{state}</if>
|
||||
<if test="projectId != null and projectId>0 "> and b.project_id= #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId>0 "> and b.sub_dept_id= #{subDeptId}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosAlarmById" parameterType="Long" resultMap="DevPitmonitSouthsmosAlarmResult">
|
||||
<select id="selectDevPitmonitSouthsmosAlarmById" parameterType="Long" resultMap="PitmonitSouthsmosAlarmResult">
|
||||
<include refid="selectDevPitmonitSouthsmosAlarmVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
@ -203,9 +212,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteDevPitmonitSouthsmosAlarmByIds" parameterType="String">
|
||||
delete from dev_pitmonit_southsmos_alarm where id in
|
||||
update dev_pitmonit_southsmos_alarm set is_del=1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="queryByState" parameterType="PitmonitSouthsmosAlarm" resultMap="PitmonitSouthsmosAlarmResult">
|
||||
SELECT a.*,c.unitName AS deptName,b.project_id as projectId
|
||||
FROM dev_pitmonit_southsmos_alarm a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
WHERE
|
||||
a.is_del = 0
|
||||
<if test="status != null and status != ''"> and a.status = #{status}</if>
|
||||
<if test="projectId != null and projectId >0"> and b.project_id = #{projectId}</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosDataMapper">
|
||||
|
||||
<resultMap type="DevPitmonitSouthsmosData" id="DevPitmonitSouthsmosDataResult">
|
||||
<resultMap type="PitmonitSouthsmosData" id="PitmonitSouthsmosDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="dataType" column="dataType" />
|
||||
|
@ -27,35 +27,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deptName" column="deptName"/>
|
||||
<result property="projectId" column="projectId"/>
|
||||
<result property="subDeptId" column="subDeptId"/>
|
||||
<result property="prjName" column="prjName"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevPitmonitSouthsmosDataVo">
|
||||
select id, cfgId, dataType, dataId, spId, spName, collectTime, changeRate, changeRate2, displace, displace2, totalize, totalize2, variation, variation2, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_data
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosDataList" parameterType="PitmonitSouthsmosData" resultMap="DevPitmonitSouthsmosDataResult">
|
||||
<include refid="selectDevPitmonitSouthsmosDataVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
<if test="dataType != null and dataType != ''"> and dataType = #{dataType}</if>
|
||||
<if test="dataId != null "> and dataId = #{dataId}</if>
|
||||
<if test="spId != null "> and spId = #{spId}</if>
|
||||
<if test="spName != null and spName != ''"> and spName like concat('%', #{spName}, '%')</if>
|
||||
<if test="collectTime != null "> and collectTime = #{collectTime}</if>
|
||||
<if test="changeRate != null "> and changeRate = #{changeRate}</if>
|
||||
<if test="changeRate2 != null "> and changeRate2 = #{changeRate2}</if>
|
||||
<if test="displace != null "> and displace = #{displace}</if>
|
||||
<if test="displace2 != null "> and displace2 = #{displace2}</if>
|
||||
<if test="totalize != null "> and totalize = #{totalize}</if>
|
||||
<if test="totalize2 != null "> and totalize2 = #{totalize2}</if>
|
||||
<if test="variation != null "> and variation = #{variation}</if>
|
||||
<if test="variation2 != null "> and variation2 = #{variation2}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
<select id="selectDevPitmonitSouthsmosDataList" parameterType="PitmonitSouthsmosData" resultMap="PitmonitSouthsmosDataResult">
|
||||
SELECT a.*,c.unitName AS deptName,b.project_id AS projectId,p.projectName prjName,c.unitName AS deptName,b.sub_dept_id subDeptId
|
||||
FROM dev_pitmonit_southsmos_data a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project p ON b.project_id =p.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
WHERE a.is_del = 0
|
||||
<if test="cfgId != null "> and a.cfgId = #{cfgId}</if>
|
||||
<if test="dataType != null and dataType != ''"> and a.dataType = #{dataType}</if>
|
||||
<if test="dataId != null "> and a.dataId = #{dataId}</if>
|
||||
<if test="spId != null "> and a.spId = #{spId}</if>
|
||||
<if test="spName != null and spName != ''"> and a.spName like concat('%', #{spName}, '%')</if>
|
||||
<if test="collectTime != null "> and a.collectTime = #{collectTime}</if>
|
||||
<if test="changeRate != null "> and a.changeRate = #{changeRate}</if>
|
||||
<if test="changeRate2 != null "> and a.changeRate2 = #{changeRate2}</if>
|
||||
<if test="displace != null "> and a.displace = #{displace}</if>
|
||||
<if test="displace2 != null "> and a.displace2 = #{displace2}</if>
|
||||
<if test="totalize != null "> and a.totalize = #{totalize}</if>
|
||||
<if test="totalize2 != null "> and a.totalize2 = #{totalize2}</if>
|
||||
<if test="variation != null "> and a.variation = #{variation}</if>
|
||||
<if test="variation2 != null "> and a.variation2 = #{variation2}</if>
|
||||
<if test="state != null "> and a.state = #{state}</if>
|
||||
<if test="createTime!=null">and date(a.collectTime) >= date(#{createTime})</if>
|
||||
<if test="updateTime!=null">and date(a.collectTime) <= date(#{updateTime})</if>
|
||||
<if test="projectId != null and projectId>0 "> and b.project_id= #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId>0 "> and b.sub_dept_id= #{subDeptId}</if>
|
||||
order by a.collectTime desc
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosDataById" parameterType="Long" resultMap="DevPitmonitSouthsmosDataResult">
|
||||
<select id="selectDevPitmonitSouthsmosDataById" parameterType="Long" resultMap="PitmonitSouthsmosDataResult">
|
||||
<include refid="selectDevPitmonitSouthsmosDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
@ -148,4 +159,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getCountByPrjId" resultType="Integer" parameterType="Long">
|
||||
SELECT COUNT(1)
|
||||
FROM dev_pitmonit_southsmos_data d
|
||||
JOIN sur_project_pit_monit_cfg s ON d.cfgid = s.id
|
||||
WHERE s.project_id = #{prjId}
|
||||
AND d.is_del = 0
|
||||
</select>
|
||||
|
||||
<select id="getLastDataForElement" parameterType="Long" resultMap="PitmonitSouthsmosDataResult">
|
||||
WITH LatestData AS (
|
||||
SELECT a.spid, MAX(a.id) AS max_id
|
||||
FROM dev_pitmonit_southsmos_data a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
WHERE b.project_id = #{id}
|
||||
AND a.is_del = 0
|
||||
GROUP BY a.spid
|
||||
),
|
||||
FilteredData AS (
|
||||
SELECT a.*, c.unitName AS deptName, b.project_id AS projectId
|
||||
FROM dev_pitmonit_southsmos_data a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
JOIN LatestData ld ON a.id = ld.max_id
|
||||
WHERE b.project_id = #{id}
|
||||
AND a.is_del = 0
|
||||
),
|
||||
SurveyPoints AS (
|
||||
SELECT a.cfgid, a.spId, a.NAME, a.meNameEn,c.unitName AS deptName,c.projectId,a.position as remark
|
||||
FROM dev_pitmonit_southsmos_surveypoint a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id=c.unitId AND b.project_id=c.projectId
|
||||
WHERE b.project_id = #{id}
|
||||
)
|
||||
SELECT sp.cfgid, sp.spId, sp.NAME AS spName, sp.meNameEn AS datatype,
|
||||
fd.id, fd.dataid, fd.collecttime, fd.changeRate, fd.changeRate2,
|
||||
fd.displace, fd.displace2, fd.totalize, fd.totalize2, fd.variation,
|
||||
fd.variation2, fd.state, sp.remark, fd.is_del, fd.create_by,
|
||||
fd.create_time, fd.update_by, fd.update_time, sp.deptName, sp.projectId
|
||||
FROM SurveyPoints sp
|
||||
LEFT JOIN FilteredData fd ON sp.spId = fd.spid;
|
||||
</select>
|
||||
|
||||
<select id="selectByDate" parameterType="PitmonitSouthsmosData" resultMap="PitmonitSouthsmosDataResult">
|
||||
select
|
||||
a.id, a.cfgId, a.dataType, a.dataId, a.spId, a.spName, a.collectTime, a.changeRate, a.changeRate2, a.displace, a.displace2, a.totalize,
|
||||
a.totalize2, a.variation, a.variation2, a.state, a.remark, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time
|
||||
from dev_pitmonit_southsmos_data a
|
||||
JOIN sur_project_pit_monit_cfg b on a.cfgId=b.id
|
||||
WHERE b.project_id = #{projectId}
|
||||
AND a.is_del = 0
|
||||
<if test="dataType != null and dataType != ''"> and a.dataType = #{dataType}</if>
|
||||
<if test="createTime != null">and a.collectTime >= #{createTime}</if>
|
||||
<if test="updateTime != null">and a.collectTime <= #{updateTime}</if>
|
||||
order by a.collectTime desc
|
||||
</select>
|
||||
|
||||
<select id="monitDays" parameterType="Long" resultType="Date">
|
||||
select min(collectTime) collectTime
|
||||
from dev_pitmonit_southsmos_data a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId=b.id
|
||||
WHERE b.project_id= #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosDevSpMapper">
|
||||
|
||||
<resultMap type="PitmonitSouthsmosDevSp" id="DevPitmonitSouthsmosDevSpResult">
|
||||
<resultMap type="PitmonitSouthsmosDevSp" id="PitmonitSouthsmosDevSpResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="devId" column="devId" />
|
||||
|
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select id, cfgId, devId, spId, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_dev_sp
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosDevSpList" parameterType="PitmonitSouthsmosDevSp" resultMap="DevPitmonitSouthsmosDevSpResult">
|
||||
<select id="selectDevPitmonitSouthsmosDevSpList" parameterType="PitmonitSouthsmosDevSp" resultMap="PitmonitSouthsmosDevSpResult">
|
||||
<include refid="selectDevPitmonitSouthsmosDevSpVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
|
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosDevSpById" parameterType="Long" resultMap="DevPitmonitSouthsmosDevSpResult">
|
||||
<select id="selectDevPitmonitSouthsmosDevSpById" parameterType="Long" resultMap="PitmonitSouthsmosDevSpResult">
|
||||
<include refid="selectDevPitmonitSouthsmosDevSpVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosDeviceMapper">
|
||||
|
||||
<resultMap type="DevPitmonitSouthsmosDevice" id="DevPitmonitSouthsmosDeviceResult">
|
||||
<resultMap type="PitmonitSouthsmosDevice" id="PitmonitSouthsmosDeviceResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="devId" column="devId" />
|
||||
|
@ -36,44 +36,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deptName" column="deptName"/>
|
||||
<result property="projectId" column="projectId"/>
|
||||
<result property="subDeptId" column="subDeptId"/>
|
||||
<result property="prjName" column="prjName"/>
|
||||
<collection property="surveypoints" ofType="pitmonitSouthsmosSurveypoint">
|
||||
<id property="spId" column="spId"></id>
|
||||
<result property="meName" column="meName"></result>
|
||||
<result property="meNameEn" column="meNameEn"></result>
|
||||
<result property="name" column="spName"></result>
|
||||
<result property="position" column="spPosition"></result>
|
||||
<result property="groupName" column="groupName"></result>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevPitmonitSouthsmosDeviceVo">
|
||||
select id, cfgId, devId, autoType, certUrl, checkDate, devCode, devShadow, devType, devTypeName, key, manufacturer, name, orgId, parent, parentIds, productType, position, status, structureId, structureName, typeCategory, typeName, verifyDate, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_device
|
||||
select id, cfgId, devId, autoType, certUrl, checkDate, devCode, devShadow, devType, devTypeName, `key`, manufacturer, name, orgId, parent, parentIds, productType, position, status, structureId, structureName, typeCategory, typeName, verifyDate, state, remark, is_del, create_by, create_time, update_by, update_time
|
||||
from dev_pitmonit_southsmos_device
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosDeviceList" parameterType="DevPitmonitSouthsmosDevice" resultMap="DevPitmonitSouthsmosDeviceResult">
|
||||
<include refid="selectDevPitmonitSouthsmosDeviceVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
<if test="devId != null "> and devId = #{devId}</if>
|
||||
<if test="autoType != null and autoType != ''"> and autoType = #{autoType}</if>
|
||||
<if test="certUrl != null and certUrl != ''"> and certUrl = #{certUrl}</if>
|
||||
<if test="checkDate != null "> and checkDate = #{checkDate}</if>
|
||||
<if test="devCode != null and devCode != ''"> and devCode = #{devCode}</if>
|
||||
<if test="devShadow != null and devShadow != ''"> and devShadow = #{devShadow}</if>
|
||||
<if test="devType != null and devType != ''"> and devType = #{devType}</if>
|
||||
<if test="devTypeName != null and devTypeName != ''"> and devTypeName like concat('%', #{devTypeName}, '%')</if>
|
||||
<if test="key != null and key != ''"> and key = #{key}</if>
|
||||
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="orgId != null "> and orgId = #{orgId}</if>
|
||||
<if test="parent != null and parent != ''"> and parent = #{parent}</if>
|
||||
<if test="parentIds != null and parentIds != ''"> and parentIds = #{parentIds}</if>
|
||||
<if test="productType != null and productType != ''"> and productType = #{productType}</if>
|
||||
<if test="position != null and position != ''"> and position = #{position}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="structureId != null "> and structureId = #{structureId}</if>
|
||||
<if test="structureName != null and structureName != ''"> and structureName like concat('%', #{structureName}, '%')</if>
|
||||
<if test="typeCategory != null and typeCategory != ''"> and typeCategory = #{typeCategory}</if>
|
||||
<if test="typeName != null and typeName != ''"> and typeName like concat('%', #{typeName}, '%')</if>
|
||||
<if test="verifyDate != null and verifyDate != ''"> and verifyDate = #{verifyDate}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
<select id="selectDevPitmonitSouthsmosDeviceList" parameterType="DevPitmonitSouthsmosDevice" resultMap="PitmonitSouthsmosDeviceResult">
|
||||
SELECT a.*,c.unitName AS deptName,b.project_id AS projectId,p.projectName prjName,c.unitName AS deptName,b.sub_dept_id subDeptId,
|
||||
sp.meName,sp.meNameEn,sp.name spName,sp.position spPosition,sp.groupName
|
||||
FROM dev_pitmonit_southsmos_device a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project p ON b.project_id =p.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
left join dev_pitmonit_southsmos_dev_sp ds on a.devId=ds.devId
|
||||
left Join dev_pitmonit_southsmos_surveypoint sp on ds.spId=sp.spId
|
||||
WHERE a.is_del = 0
|
||||
<if test="cfgId != null "> and a.cfgId = #{cfgId}</if>
|
||||
<if test="devId != null "> and a.devId = #{devId}</if>
|
||||
<if test="autoType != null and autoType != ''"> and a.autoType = #{autoType}</if>
|
||||
<if test="certUrl != null and certUrl != ''"> and a.certUrl = #{certUrl}</if>
|
||||
<if test="checkDate != null "> and a.checkDate = #{checkDate}</if>
|
||||
<if test="devCode != null and devCode != ''"> and a.devCode = #{devCode}</if>
|
||||
<if test="devShadow != null and devShadow != ''"> and a.devShadow = #{devShadow}</if>
|
||||
<if test="devType != null and devType != ''"> and a.devType = #{devType}</if>
|
||||
<if test="devTypeName != null and devTypeName != ''"> and a.devTypeName like concat('%', #{devTypeName}, '%')</if>
|
||||
<if test="key != null and key != ''"> and `a.key` = #{key}</if>
|
||||
<if test="manufacturer != null and manufacturer != ''"> and a.manufacturer = #{manufacturer}</if>
|
||||
<if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
|
||||
<if test="orgId != null "> and a.orgId = #{orgId}</if>
|
||||
<if test="parent != null and parent != ''"> and a.parent = #{parent}</if>
|
||||
<if test="parentIds != null and parentIds != ''"> and a.parentIds = #{parentIds}</if>
|
||||
<if test="productType != null and productType != ''"> and a.productType = #{productType}</if>
|
||||
<if test="position != null and position != ''"> and a.position = #{position}</if>
|
||||
<if test="status != null and status != ''"> and a.status = #{status}</if>
|
||||
<if test="structureId != null "> and a.structureId = #{structureId}</if>
|
||||
<if test="structureName != null and structureName != ''"> and a.structureName like concat('%', #{structureName}, '%')</if>
|
||||
<if test="typeCategory != null and typeCategory != ''"> and a.typeCategory = #{typeCategory}</if>
|
||||
<if test="typeName != null and typeName != ''"> and a.typeName like concat('%', #{typeName}, '%')</if>
|
||||
<if test="verifyDate != null and verifyDate != ''"> and a.verifyDate = #{verifyDate}</if>
|
||||
<if test="state != null "> and a.state = #{state}</if>
|
||||
<if test="projectId != null and projectId>0 "> and b.project_id= #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId>0 "> and b.sub_dept_id= #{subDeptId}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosDeviceById" parameterType="Long" resultMap="DevPitmonitSouthsmosDeviceResult">
|
||||
<select id="selectDevPitmonitSouthsmosDeviceById" parameterType="Long" resultMap="PitmonitSouthsmosDeviceResult">
|
||||
<include refid="selectDevPitmonitSouthsmosDeviceVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
@ -90,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="devShadow != null">devShadow,</if>
|
||||
<if test="devType != null">devType,</if>
|
||||
<if test="devTypeName != null">devTypeName,</if>
|
||||
<if test="key != null">key,</if>
|
||||
<if test="key != null">`key`,</if>
|
||||
<if test="manufacturer != null">manufacturer,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="orgId != null">orgId,</if>
|
||||
|
@ -158,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="devShadow != null">devShadow = #{devShadow},</if>
|
||||
<if test="devType != null">devType = #{devType},</if>
|
||||
<if test="devTypeName != null">devTypeName = #{devTypeName},</if>
|
||||
<if test="key != null">key = #{key},</if>
|
||||
<if test="key != null">`key` = #{key},</if>
|
||||
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="orgId != null">orgId = #{orgId},</if>
|
||||
|
@ -188,9 +208,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteDevPitmonitSouthsmosDeviceByIds" parameterType="String">
|
||||
delete from dev_pitmonit_southsmos_device where id in
|
||||
update dev_pitmonit_southsmos_device set is_del=1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getCountByPrjId" resultType="Integer" parameterType="Long">
|
||||
SELECT COUNT(1)
|
||||
FROM dev_pitmonit_southsmos_device d
|
||||
JOIN sur_project_pit_monit_cfg s ON d.cfgid = s.id
|
||||
WHERE s.project_id = #{id}
|
||||
AND d.is_del = 0
|
||||
</select>
|
||||
</mapper>
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosElementItemMapper">
|
||||
|
||||
<resultMap type="PitmonitSouthsmosElementItem" id="DevPitmonitSouthsmosElementItemResult">
|
||||
<resultMap type="PitmonitSouthsmosElementItem" id="PitmonitSouthsmosElementItemResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="srvId" column="srvId" />
|
||||
|
@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select id, cfgId, srvId, monitorElementId, name, step, unit, valueRange, gmtCreate, gmtModified, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_element_item
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosElementItemList" parameterType="DevPitmonitSouthsmosElementItem" resultMap="DevPitmonitSouthsmosElementItemResult">
|
||||
<select id="selectDevPitmonitSouthsmosElementItemList" parameterType="DevPitmonitSouthsmosElementItem" resultMap="PitmonitSouthsmosElementItemResult">
|
||||
<include refid="selectDevPitmonitSouthsmosElementItemVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
|
@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosElementItemById" parameterType="Long" resultMap="DevPitmonitSouthsmosElementItemResult">
|
||||
<select id="selectDevPitmonitSouthsmosElementItemById" parameterType="Long" resultMap="PitmonitSouthsmosElementItemResult">
|
||||
<include refid="selectDevPitmonitSouthsmosElementItemVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosElementMapper">
|
||||
|
||||
<resultMap type="PitmonitSouthsmosElement" id="DevPitmonitSouthsmosElementResult">
|
||||
<resultMap type="PitmonitSouthsmosElement" id="PitmonitSouthsmosElementResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="srvId" column="srvId" />
|
||||
|
@ -20,28 +20,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deptName" column="deptName"/>
|
||||
<result property="projectId" column="projectId"/>
|
||||
<result property="subDeptId" column="subDeptId"/>
|
||||
<result property="prjName" column="prjName"/>
|
||||
<collection property="children" ofType="pitmonitSouthsmosElementItem">
|
||||
<id property="id" column="itemId"/>
|
||||
<result column="itemName" property="name"/>
|
||||
<result column="itemStep" property="step"/>
|
||||
<result column="itemUnit" property="unit"/>
|
||||
<result column="itemValueRange" property="valueRange"/>
|
||||
<result column="itemGmtCreate" property="gmtCreate"/>
|
||||
<result column="itemGmtModified" property="gmtModified"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevPitmonitSouthsmosElementVo">
|
||||
select id, cfgId, srvId, maxSp, monitorStatus, name, nameEn, type, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_element
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosElementList" parameterType="PitmonitSouthsmosElement" resultMap="DevPitmonitSouthsmosElementResult">
|
||||
<include refid="selectDevPitmonitSouthsmosElementVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
<if test="srvId != null "> and srvId = #{srvId}</if>
|
||||
<if test="maxSp != null and maxSp != ''"> and maxSp = #{maxSp}</if>
|
||||
<if test="monitorStatus != null and monitorStatus != ''"> and monitorStatus = #{monitorStatus}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="nameEn != null and nameEn != ''"> and nameEn = #{nameEn}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
<select id="selectDevPitmonitSouthsmosElementList" parameterType="PitmonitSouthsmosElement" resultMap="PitmonitSouthsmosElementResult">
|
||||
SELECT a.*,c.unitName AS deptName,b.project_id AS projectId,p.projectName prjName,c.unitName AS deptName,b.sub_dept_id subDeptId,
|
||||
it.id itemId,it.name itemName,it.step itemStep,it.unit itemUnit,it.valueRange itemValueRange,it.gmtCreate itemGmtCreate,it.gmtModified itemGmtModified
|
||||
FROM dev_pitmonit_southsmos_element a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project p ON b.project_id =p.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
JOIN dev_pitmonit_southsmos_element_item it ON a.srvId=monitorElementId AND it.is_del=0
|
||||
WHERE a.is_del = 0
|
||||
<if test="cfgId != null "> and a.cfgId = #{cfgId}</if>
|
||||
<if test="srvId != null "> and a.srvId = #{srvId}</if>
|
||||
<if test="maxSp != null and maxSp != ''"> and a.maxSp = #{maxSp}</if>
|
||||
<if test="monitorStatus != null and monitorStatus != ''"> and a.monitorStatus = #{monitorStatus}</if>
|
||||
<if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
|
||||
<if test="nameEn != null and nameEn != ''"> and a.nameEn = #{nameEn}</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="state != null "> and a.state = #{state}</if>
|
||||
<if test="projectId != null and projectId>0 "> and b.project_id= #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId>0 "> and b.sub_dept_id= #{subDeptId}</if>
|
||||
order by srvId desc
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosElementById" parameterType="Long" resultMap="DevPitmonitSouthsmosElementResult">
|
||||
<select id="selectDevPitmonitSouthsmosElementById" parameterType="Long" resultMap="PitmonitSouthsmosElementResult">
|
||||
<include refid="selectDevPitmonitSouthsmosElementVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosSurveypointMapper">
|
||||
|
||||
<resultMap type="DevPitmonitSouthsmosSurveypoint" id="DevPitmonitSouthsmosSurveypointResult">
|
||||
<resultMap type="PitmonitSouthsmosSurveypoint" id="PitmonitSouthsmosSurveypointResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="spId" column="spId" />
|
||||
|
@ -26,34 +26,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deptName" column="deptName"/>
|
||||
<result property="projectId" column="projectId"/>
|
||||
<result property="subDeptId" column="subDeptId"/>
|
||||
<result property="prjName" column="prjName"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevPitmonitSouthsmosSurveypointVo">
|
||||
select id, cfgId, spId, groupId, groupName, meId, meName, meNameEn, modifyDate, name, position, dataSource, createDate, status, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_surveypoint
|
||||
select id, cfgId, spId, groupId, groupName, meId, meName, meNameEn, modifyDate, name, position, dataSource, createDate, status,
|
||||
state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_surveypoint
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosSurveypointList" parameterType="PitmonitSouthsmosSurveypoint" resultMap="DevPitmonitSouthsmosSurveypointResult">
|
||||
<include refid="selectDevPitmonitSouthsmosSurveypointVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
<if test="spId != null "> and spId = #{spId}</if>
|
||||
<if test="groupId != null "> and groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="meId != null "> and meId = #{meId}</if>
|
||||
<if test="meName != null and meName != ''"> and meName like concat('%', #{meName}, '%')</if>
|
||||
<if test="meNameEn != null and meNameEn != ''"> and meNameEn = #{meNameEn}</if>
|
||||
<if test="modifyDate != null "> and modifyDate = #{modifyDate}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="position != null and position != ''"> and position = #{position}</if>
|
||||
<if test="dataSource != null "> and dataSource = #{dataSource}</if>
|
||||
<if test="createDate != null "> and createDate = #{createDate}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
<select id="selectDevPitmonitSouthsmosSurveypointList" parameterType="PitmonitSouthsmosSurveypoint" resultMap="PitmonitSouthsmosSurveypointResult">
|
||||
SELECT a.*,c.unitName AS deptName,b.project_id AS projectId,p.projectName prjName,c.unitName AS deptName,b.sub_dept_id subDeptId
|
||||
FROM dev_pitmonit_southsmos_surveypoint a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project p ON b.project_id =p.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
WHERE a.is_del = 0
|
||||
<if test="cfgId != null "> and a.cfgId = #{cfgId}</if>
|
||||
<if test="spId != null "> and a.spId = #{spId}</if>
|
||||
<if test="groupId != null "> and a.groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and a.groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="meId != null "> and a.meId = #{meId}</if>
|
||||
<if test="meName != null and meName != ''"> and a.meName like concat('%', #{meName}, '%')</if>
|
||||
<if test="meNameEn != null and meNameEn != ''"> and a.meNameEn = #{meNameEn}</if>
|
||||
<if test="modifyDate != null "> and a.modifyDate = #{modifyDate}</if>
|
||||
<if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
|
||||
<if test="position != null and position != ''"> and a.position = #{position}</if>
|
||||
<if test="dataSource != null "> and a.dataSource = #{dataSource}</if>
|
||||
<if test="createDate != null "> and a.createDate = #{createDate}</if>
|
||||
<if test="status != null and status != ''"> and a.status = #{status}</if>
|
||||
<if test="state != null "> and a.state = #{state}</if>
|
||||
<if test="projectId != null and projectId>0 "> and b.project_id= #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId>0 "> and b.sub_dept_id= #{subDeptId}</if>
|
||||
order by spId
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosSurveypointById" parameterType="Long" resultMap="DevPitmonitSouthsmosSurveypointResult">
|
||||
<select id="selectDevPitmonitSouthsmosSurveypointById" parameterType="Long" resultMap="PitmonitSouthsmosSurveypointResult">
|
||||
<include refid="selectDevPitmonitSouthsmosSurveypointVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.PitmonitSouthsmosThresholdMapper">
|
||||
|
||||
<resultMap type="DevPitmonitSouthsmosThreshold" id="DevPitmonitSouthsmosThresholdResult">
|
||||
<resultMap type="PitmonitSouthsmosThreshold" id="PitmonitSouthsmosThresholdResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfgId" />
|
||||
<result property="srvId" column="srvId" />
|
||||
|
@ -27,35 +27,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deptName" column="deptName"/>
|
||||
<result property="projectId" column="projectId"/>
|
||||
<result property="subDeptId" column="subDeptId"/>
|
||||
<result property="prjName" column="prjName"/>
|
||||
<result property="elName" column="elName"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevPitmonitSouthsmosThresholdVo">
|
||||
select id, cfgId, srvId, alarmInfo, alarmName, intervalA, intervalB, level, monitorElementId, monitorItemId, monitorItemName, tgId, threshold, type, unit, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_threshold
|
||||
</sql>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosThresholdList" parameterType="DevPitmonitSouthsmosThreshold" resultMap="DevPitmonitSouthsmosThresholdResult">
|
||||
<include refid="selectDevPitmonitSouthsmosThresholdVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
||||
<if test="srvId != null "> and srvId = #{srvId}</if>
|
||||
<if test="alarmInfo != null and alarmInfo != ''"> and alarmInfo = #{alarmInfo}</if>
|
||||
<if test="alarmName != null and alarmName != ''"> and alarmName like concat('%', #{alarmName}, '%')</if>
|
||||
<if test="intervalA != null "> and intervalA = #{intervalA}</if>
|
||||
<if test="intervalB != null "> and intervalB = #{intervalB}</if>
|
||||
<if test="level != null "> and level = #{level}</if>
|
||||
<if test="monitorElementId != null "> and monitorElementId = #{monitorElementId}</if>
|
||||
<if test="monitorItemId != null "> and monitorItemId = #{monitorItemId}</if>
|
||||
<if test="monitorItemName != null and monitorItemName != ''"> and monitorItemName like concat('%', #{monitorItemName}, '%')</if>
|
||||
<if test="tgId != null "> and tgId = #{tgId}</if>
|
||||
<if test="threshold != null and threshold != ''"> and threshold = #{threshold}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
<select id="selectDevPitmonitSouthsmosThresholdList" parameterType="DevPitmonitSouthsmosThreshold" resultMap="PitmonitSouthsmosThresholdResult">
|
||||
SELECT a.*,e.name AS elName,c.unitName AS deptName,b.project_id AS projectId,p.projectName prjName,c.unitName AS deptName,b.sub_dept_id subDeptId
|
||||
FROM dev_pitmonit_southsmos_threshold a
|
||||
JOIN sur_project_pit_monit_cfg b ON a.cfgId = b.id
|
||||
JOIN sur_project p ON b.project_id =p.id
|
||||
JOIN sur_project_unit_info c ON b.sub_dept_id = c.unitId AND b.project_id = c.projectId
|
||||
JOIN dev_pitmonit_southsmos_element e ON e.srvId=a.monitorElementId
|
||||
WHERE a.is_del=0
|
||||
<if test="cfgId != null "> and a.cfgId = #{cfgId}</if>
|
||||
<if test="srvId != null "> and a.srvId = #{srvId}</if>
|
||||
<if test="alarmInfo != null and alarmInfo != ''"> and a.alarmInfo = #{alarmInfo}</if>
|
||||
<if test="alarmName != null and alarmName != ''"> and a.alarmName like concat('%', #{alarmName}, '%')</if>
|
||||
<if test="intervalA != null "> and a.intervalA = #{intervalA}</if>
|
||||
<if test="intervalB != null "> and a.intervalB = #{intervalB}</if>
|
||||
<if test="level != null "> and a.level = #{level}</if>
|
||||
<if test="monitorElementId != null "> and a.monitorElementId = #{monitorElementId}</if>
|
||||
<if test="monitorItemId != null "> and a.monitorItemId = #{monitorItemId}</if>
|
||||
<if test="monitorItemName != null and monitorItemName != ''"> and a.monitorItemName like concat('%', #{monitorItemName}, '%')</if>
|
||||
<if test="tgId != null "> and a.tgId = #{tgId}</if>
|
||||
<if test="threshold != null and threshold != ''"> and a.threshold = #{threshold}</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="unit != null and unit != ''"> and a.unit = #{unit}</if>
|
||||
<if test="state != null "> and a.state = #{state}</if>
|
||||
<if test="projectId != null and projectId>0 "> and b.project_id= #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId>0 "> and b.sub_dept_id= #{subDeptId}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectDevPitmonitSouthsmosThresholdById" parameterType="Long" resultMap="DevPitmonitSouthsmosThresholdResult">
|
||||
<select id="selectDevPitmonitSouthsmosThresholdById" parameterType="Long" resultMap="PitmonitSouthsmosThresholdResult">
|
||||
<include refid="selectDevPitmonitSouthsmosThresholdVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.jh.device.mapper.ProjectPitMonitCfgMapper">
|
||||
|
||||
<resultMap type="ProjectPitMonitCfg" id="SurProjectPitMonitCfgResult">
|
||||
<resultMap type="ProjectPitMonitCfg" id="ProjectPitMonitCfgResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="subDeptId" column="sub_dept_id" />
|
||||
|
@ -18,13 +18,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="projectName" column="projectName"/>
|
||||
<result property="deptName" column="deptName"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectPitMonitCfgVo">
|
||||
select id, project_id, sub_dept_id, vendor_code, vendor_paramter, enabled, state, remark, is_del, create_by, create_time, update_by, update_time from sur_project_pit_monit_cfg
|
||||
|
||||
select id, project_id, sub_dept_id, vendor_code, vendor_paramter, enabled, state, remark, is_del, create_by, create_time, update_by, update_time,projectName,deptName
|
||||
from (
|
||||
|
||||
select a.*,p.projectName,b.unitName as deptName
|
||||
from sur_project_pit_monit_cfg a
|
||||
JOIN sur_project p on a.project_id =p.id
|
||||
join sur_project_unit_info b on a.sub_dept_id=b.unitId and a.project_id=b.projectId ) sur_project_pit_monit_cfg
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectPitMonitCfgList" parameterType="SurProjectPitMonitCfg" resultMap="SurProjectPitMonitCfgResult">
|
||||
<select id="selectSurProjectPitMonitCfgList" parameterType="SurProjectPitMonitCfg" resultMap="ProjectPitMonitCfgResult">
|
||||
<include refid="selectSurProjectPitMonitCfgVo"/>
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
|
@ -37,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectPitMonitCfgById" parameterType="Long" resultMap="SurProjectPitMonitCfgResult">
|
||||
<select id="selectSurProjectPitMonitCfgById" parameterType="Long" resultMap="ProjectPitMonitCfgResult">
|
||||
<include refid="selectSurProjectPitMonitCfgVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
|
|
@ -51,15 +51,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="projectSort" column="projectSort" />
|
||||
<result property="progressVisible" column="progressVisible" />
|
||||
<result property="projectRegionalName" column="projectRegionalName" />
|
||||
<result property="prjPlanUrl" column="prjPlanUrl"/>
|
||||
<result property="prjRenderingUrl" column="prjRenderingUrl"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectVo">
|
||||
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name from sur_project sp
|
||||
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel,
|
||||
sp.projectRegional, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude,
|
||||
sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime,
|
||||
sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize,
|
||||
sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by,
|
||||
sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name,
|
||||
sp.prjPlanUrl,sp.prjRenderingUrl
|
||||
from sur_project sp
|
||||
left join sys_dept d on d.dept_id = sp.deptId
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectList" parameterType="SurProject" resultMap="SurProjectResult">
|
||||
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, a.areaName as projectRegionalName, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time, sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name
|
||||
select sp.id, sp.deptId, sp.projectName, sp.projectCode, sp.paretProjectName, sp.paretProjectCode, sp.simpleName, sp.projectType, sp.projiectLevel, sp.projectRegional, a.areaName as projectRegionalName, sp.projectAddress, sp.projectNature, sp.licenceNumber, sp.projectApproval, sp.projectPerson, sp.projectPhone, sp.longitude, sp.latitude, sp.projectTimeLimit, sp.totalInvestment, sp.floorArea, sp.totalOutputValue, sp.plannedCompletionTime, sp.scheduledStartTime, sp.actualOperatingTime, sp.actualCompletionTime, sp.contractAmount, sp.paidAmount, sp.onAccountAmount, sp.projectSchedule, sp.projectSummarize, sp.isDel, sp.projectStatus, sp.servicePersonnel, sp.supervisorPersonnel, sp.generalContractor, sp.create_by, sp.create_time,
|
||||
sp.update_by, sp.update_time, sp.remark, sp.weightType, sp.projectSort, sp.progressVisible, d.dept_name,sp.prjPlanUrl,sp.prjRenderingUrl
|
||||
from sur_project sp
|
||||
left join sys_dept d on d.dept_id = sp.deptId
|
||||
left join china_area a on sp.projectRegional = a.id
|
||||
|
@ -183,6 +193,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="weightType != null">weightType,</if>
|
||||
<if test="projectSort != null">projectSort,</if>
|
||||
<if test="progressVisible != null">progressVisible,</if>
|
||||
<if test="prjPlanUrl != null">prjPlanUrl,</if>
|
||||
<if test="prjRenderingUrl != null">prjRenderingUrl,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
|
@ -229,6 +241,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="weightType != null">#{weightType},</if>
|
||||
<if test="projectSort != null">#{projectSort},</if>
|
||||
<if test="progressVisible != null">#{progressVisible},</if>
|
||||
<if test="prjPlanUrl != null">#{prjPlanUrl},</if>
|
||||
<if test="prjRenderingUrl != null">#{prjRenderingUrl},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -278,6 +292,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="weightType != null">weightType = #{weightType},</if>
|
||||
<if test="projectSort != null">projectSort = #{projectSort},</if>
|
||||
<if test="progressVisible != null">progressVisible = #{progressVisible},</if>
|
||||
<if test="prjPlanUrl != null">prjPlanUrl = #{prjPlanUrl},</if>
|
||||
<if test="prjRenderingUrl != null">prjRenderingUrl = #{prjRenderingUrl},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
Loading…
Reference in New Issue