基坑管理

dev_xds
haha 2024-08-25 23:42:46 +08:00
parent ecf31c36e3
commit 7df6458d57
28 changed files with 2034 additions and 2120 deletions

View File

@ -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>

View File

@ -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) {

View File

@ -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);
}
}
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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() {

View File

@ -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() {

View File

@ -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.subDeptId && 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() {

View File

@ -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>

View File

@ -0,0 +1,125 @@
<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;
.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>

View File

@ -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() {

View File

@ -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;
}

View File

@ -138,6 +138,16 @@ public class PitmonitSouthsmosAlarm extends BaseEntity
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() {

View File

@ -86,6 +86,15 @@ public class PitmonitSouthsmosData extends BaseEntity
@Excel(name = "")
private Long isDel;
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;

View File

@ -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;
}

View File

@ -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() {

View File

@ -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;

View File

@ -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;
}

View File

@ -40,45 +40,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="PitmonitSouthsmosAlarmResult">
<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 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="PitmonitSouthsmosAlarmResult">
@ -205,7 +212,7 @@ 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>

View File

@ -29,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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">
@ -36,25 +38,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDevPitmonitSouthsmosDataList" parameterType="PitmonitSouthsmosData" resultMap="PitmonitSouthsmosDataResult">
<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 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) &gt;= date(#{createTime})</if>
<if test="updateTime!=null">and date(a.collectTime) &lt;= 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="PitmonitSouthsmosDataResult">

View File

@ -36,42 +36,61 @@ 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
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="PitmonitSouthsmosDeviceResult">
<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 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="PitmonitSouthsmosDeviceResult">
@ -189,7 +208,7 @@ 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>

View File

@ -20,6 +20,19 @@ 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">
@ -27,18 +40,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDevPitmonitSouthsmosElementList" parameterType="PitmonitSouthsmosElement" resultMap="PitmonitSouthsmosElementResult">
<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 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="PitmonitSouthsmosElementResult">

View File

@ -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="PitmonitSouthsmosSurveypointResult">
<resultMap type="PitmonitSouthsmosSurveypoint" id="PitmonitSouthsmosSurveypointResult">
<result property="id" column="id" />
<result property="cfgId" column="cfgId" />
<result property="spId" column="spId" />
@ -26,31 +26,41 @@ 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="PitmonitSouthsmosSurveypointResult">
<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 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="PitmonitSouthsmosSurveypointResult">

View File

@ -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="PitmonitSouthsmosThresholdResult">
<resultMap type="PitmonitSouthsmosThreshold" id="PitmonitSouthsmosThresholdResult">
<result property="id" column="id" />
<result property="cfgId" column="cfgId" />
<result property="srvId" column="srvId" />
@ -27,6 +27,11 @@ 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">
@ -34,25 +39,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDevPitmonitSouthsmosThresholdList" parameterType="DevPitmonitSouthsmosThreshold" resultMap="PitmonitSouthsmosThresholdResult">
<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 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="PitmonitSouthsmosThresholdResult">