Commit df06bd8f authored by lei's avatar lei

fix:提升机图片替换,环境监测历史数据、实时数据

parent db002bc2
...@@ -14,6 +14,6 @@ VUE_APP_BASE_API = '/dev-api' ...@@ -14,6 +14,6 @@ VUE_APP_BASE_API = '/dev-api'
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 开发环境的后端接口地址 # 开发环境的后端接口地址
#VUE_APP_API_TARGET = http://192.168.2.16:9091 VUE_APP_API_TARGET = http://192.168.2.16:9091
VUE_APP_API_TARGET = http://192.168.2.13:9091 # VUE_APP_API_TARGET = http://192.168.2.13:9091
# VUE_APP_API_TARGET = http://localhost:8080 # VUE_APP_API_TARGET = http://localhost:8080
\ No newline at end of file
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询环境监测的实时数据列表 // 查询环境监测的实时数据列表
export function envMonitoringHis(query) { export function envMonitoringHis(query) {
return request({ return request({
url: '/business/real/list', url: '/business/history/list',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -17,3 +17,12 @@ export function updatePumpSwitch(data) { ...@@ -17,3 +17,12 @@ export function updatePumpSwitch(data) {
data: data, data: data,
}); });
} }
//获取提升机次数
export function getElevatorTimes(query) {
return request({
url: "/business/elevator/history/current",
method: "get",
params: query,
});
}
src/assets/images/screen/psxt/button2.png

1.99 KB | W: | H:

src/assets/images/screen/psxt/button2.png

779 Bytes | W: | H:

src/assets/images/screen/psxt/button2.png
src/assets/images/screen/psxt/button2.png
src/assets/images/screen/psxt/button2.png
src/assets/images/screen/psxt/button2.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -98,13 +98,10 @@ export default { ...@@ -98,13 +98,10 @@ export default {
this.viewer.cesiumWidget.creditContainer.style.display = "none"; this.viewer.cesiumWidget.creditContainer.style.display = "none";
// 加载3D Tileset // 加载3D Tileset
Cesium.Cesium3DTileset.fromUrl( Cesium.Cesium3DTileset.fromUrl("/terra_b3dms_yd/tileset.json", {
"http://192.168.2.188:80/terra_b3dms_yd/tileset.json", maximumScreenSpaceError: 1,
{ pickable: true,
maximumScreenSpaceError: 1, })
pickable: true,
}
)
.then((tileset) => { .then((tileset) => {
this.tileset = tileset; // 存储tileset供后续使用 this.tileset = tileset; // 存储tileset供后续使用
this.viewer.scene.primitives.add(tileset); this.viewer.scene.primitives.add(tileset);
......
...@@ -27,6 +27,15 @@ ...@@ -27,6 +27,15 @@
<div class="center"> <div class="center">
<div class="center-box"> <div class="center-box">
<div class="dianti-target" :style="targetStyle">{{ displayTrend }}</div> <div class="dianti-target" :style="targetStyle">{{ displayTrend }}</div>
<div class="dianti-number">
<p
v-for="(item, index) in elevatorTimes"
:key="'diantiNmuber' + index"
>
<span>{{ item.name }}</span
><span>{{ item.value }}</span>
</p>
</div>
<div class="dianti-peizhong" :style="counterweightStyle"></div> <div class="dianti-peizhong" :style="counterweightStyle"></div>
<div <div
class="dianti-box" class="dianti-box"
...@@ -95,7 +104,7 @@ ...@@ -95,7 +104,7 @@
<script> <script>
import CountTo from "vue-count-to"; import CountTo from "vue-count-to";
import { getElevatorData } from "@/api/tyler/jst"; import { getElevatorData, getElevatorTimes } from "@/api/tyler/jst";
// 修改位置配置常量(添加中间点容差) // 修改位置配置常量(添加中间点容差)
const POSITIONS = [ const POSITIONS = [
{ {
...@@ -179,6 +188,7 @@ export default { ...@@ -179,6 +188,7 @@ export default {
// 静态配置 // 静态配置
floors: ["一中", "二中", "三中", "四中", "五中"], floors: ["一中", "二中", "三中", "四中", "五中"],
tableHeaders: ["检查人", "检查点位", "是否正常", "日期"], tableHeaders: ["检查人", "检查点位", "是否正常", "日期"],
elevatorTimes: [],
}; };
}, },
computed: { computed: {
...@@ -319,6 +329,11 @@ export default { ...@@ -319,6 +329,11 @@ export default {
// 获取数据 // 获取数据
async getdata() { async getdata() {
let obj = {
Shift: "当班次数",
Today: "当日次数",
Month: "当月次数",
};
try { try {
const res = await getElevatorData(); const res = await getElevatorData();
if (res.code === 200) { if (res.code === 200) {
...@@ -326,6 +341,16 @@ export default { ...@@ -326,6 +341,16 @@ export default {
this.updateElevatorStatus(res.rows[0]); this.updateElevatorStatus(res.rows[0]);
this.moveElevator(); this.moveElevator();
} }
//获取提升机次数
const res2 = await getElevatorTimes();
if (res2.code === 200) {
this.elevatorTimes = res2.data.map((e) => {
return {
name: obj[e.name],
value: e.value,
};
});
}
} catch (error) { } catch (error) {
console.error("数据获取失败:", error); console.error("数据获取失败:", error);
} }
...@@ -628,6 +653,14 @@ export default { ...@@ -628,6 +653,14 @@ export default {
letter-spacing: 10px; letter-spacing: 10px;
position: absolute; position: absolute;
} }
.dianti-number {
position: absolute;
top: 600px;
left: 110px;
font-size: 24px;
color: #f0ff01;
line-height: 24px;
}
.dianti-peizhong { .dianti-peizhong {
width: 18px; width: 18px;
height: 90px; height: 90px;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="" prop="tpName"> <el-form-item label="" prop="tpName">
<el-input <el-input
v-model="queryParams.tpName" v-model="queryParams.tpName"
...@@ -10,7 +17,11 @@ ...@@ -10,7 +17,11 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="" prop="typeName"> <el-form-item label="" prop="typeName">
<el-select v-model="queryParams.typeName" placeholder="请选择监测项名称" clearable> <el-select
v-model="queryParams.typeName"
placeholder="请选择监测项名称"
clearable
>
<el-option <el-option
v-for="dict in typeName" v-for="dict in typeName"
:key="dict" :key="dict"
...@@ -20,15 +31,31 @@ ...@@ -20,15 +31,31 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="日期查询"> <el-form-item label="日期查询">
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="envMonitorHisData" > <el-table v-loading="loading" :data="envMonitorHisData">
<el-table-column label="测点名称" align="center" prop="tpName" /> <el-table-column label="测点名称" align="center" prop="tpName" />
<el-table-column label="测点编号" align="center" prop="tpNum" /> <el-table-column label="测点编号" align="center" prop="tpNum" />
<el-table-column label="测点类型" align="center" prop="typeName" /> <el-table-column label="测点类型" align="center" prop="typeName" />
...@@ -37,29 +64,26 @@ ...@@ -37,29 +64,26 @@
<el-table-column label="测量时间" align="center" prop="time" /> <el-table-column label="测量时间" align="center" prop="time" />
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status==1">正常</el-tag> <el-tag v-if="scope.row.status == 1">正常</el-tag>
<el-tag v-else type="warning">异常</el-tag> <el-tag v-else type="warning">异常</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
<script> <script>
import {get2502, envMonitoringHis} from "@/api/tyler/envMonitoringHis"; import { get2502, envMonitoringHis } from "@/api/tyler/envMonitoringHis";
import {typeNameList} from "@/api/tyler/common"; import { typeNameList } from "@/api/tyler/common";
export default { export default {
name: "2502", name: "2502",
data() { data() {
return { return {
...@@ -95,21 +119,23 @@ ...@@ -95,21 +119,23 @@
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: {} rules: {},
}; };
}, },
created() { created() {
typeNameList().then(res => { typeNameList().then((res) => {
// console.log(res,'res') // console.log(res,'res')
this.typeName = res.data this.typeName = res.data;
}) });
this.getList(); this.getList();
}, },
methods: { methods: {
/** 查询环境监测的实时数据列表 */ /** 查询环境监测的实时数据列表 */
getList() { getList() {
this.loading = true; this.loading = true;
envMonitoringHis(this.addDateRange(this.queryParams, this.dateRange)).then(response => { envMonitoringHis(
this.addDateRange(this.queryParams, this.dateRange)
).then((response) => {
this.envMonitorHisData = response.rows; this.envMonitorHisData = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
...@@ -128,7 +154,7 @@ ...@@ -128,7 +154,7 @@
value1: null, value1: null,
state: null, state: null,
exstate: null, exstate: null,
time: null time: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -145,9 +171,9 @@ ...@@ -145,9 +171,9 @@
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.tpNum) this.ids = selection.map((item) => item.tpNum);
this.single = selection.length!==1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
...@@ -158,8 +184,8 @@ ...@@ -158,8 +184,8 @@
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const tpNum = row.tpNum || this.ids const tpNum = row.tpNum || this.ids;
get2502(tpNum).then(response => { get2502(tpNum).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改环境监测的实时数据"; this.title = "修改环境监测的实时数据";
...@@ -167,16 +193,16 @@ ...@@ -167,16 +193,16 @@
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.tpNum != null) { if (this.form.tpNum != null) {
update2502(this.form).then(response => { update2502(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
add2502(this.form).then(response => { add2502(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
...@@ -188,19 +214,29 @@ ...@@ -188,19 +214,29 @@
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const tpNums = row.tpNum || this.ids; const tpNums = row.tpNum || this.ids;
this.$modal.confirm('是否确认删除环境监测的实时数据编号为"' + tpNums + '"的数据项?').then(function() { this.$modal
return del2502(tpNums); .confirm(
}).then(() => { '是否确认删除环境监测的实时数据编号为"' + tpNums + '"的数据项?'
this.getList(); )
this.$modal.msgSuccess("删除成功"); .then(function () {
}).catch(() => {}); return del2502(tpNums);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/2502/export', { this.download(
...this.queryParams "business/2502/export",
}, `2502_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`2502_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment