fix: 编写PC项目、政务端起重机监管静态+对接。
This commit is contained in:
parent
72363dbefe
commit
495ba3d681
@ -615,3 +615,31 @@ export const towerCraneAlarmPage = (params: any) => {
|
||||
export const towerCraneDataPage = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/towerCraneCurrentData/page`, params);
|
||||
};
|
||||
|
||||
// 升降机监管
|
||||
// 设备管理列表
|
||||
export const lifterEquipAll = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/lifter/list`, params);
|
||||
};
|
||||
// 获取运行数据
|
||||
export const lifterOperationData = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/lifterCurrentData/getOperation`, params);
|
||||
};
|
||||
// 分页列表查询实时数据项目信息
|
||||
export const getLifterRealTimePojectPage = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/lifter/projectPage`, params);
|
||||
};
|
||||
// 分页列表查询实时数据工程信息
|
||||
export const getLifterRealTimeEngineeringPage = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/lifter/engineeringPage`, params);
|
||||
};
|
||||
|
||||
// 报警数据分页列表
|
||||
export const lifterAlarmPage = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/lifterAlarm/page`, params);
|
||||
};
|
||||
|
||||
// 实时数据分页列表
|
||||
export const lifterDataPage = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/lifterCurrentData/page`, params);
|
||||
};
|
||||
|
||||
@ -259,6 +259,7 @@
|
||||
font-family: "Source Han Sans CN-Regular", "Source Han Sans CN";
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
white-space: nowrap;
|
||||
}
|
||||
> span:nth-child(1) {
|
||||
display: inline-block;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<span>安装日期: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span>
|
||||
<span>终端编号: {{ equipInfo.devNumber ? equipInfo.devNumber : "" }}</span>
|
||||
<span>更新时间: {{ equipInfo.realTime ? equipInfo.realTime : "" }}</span>
|
||||
<span>安装时间: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span>
|
||||
<!-- <span>安装时间: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="monitor-aspect">
|
||||
@ -192,9 +192,9 @@ const aspectList = ref([
|
||||
{
|
||||
name: "载重",
|
||||
value: 10,
|
||||
unit: "T",
|
||||
unit: "kg",
|
||||
img: new URL("@/assets/images/onlineSupervision/载重.png", import.meta.url).href,
|
||||
prop: "maxLoad"
|
||||
prop: "loading"
|
||||
},
|
||||
{
|
||||
name: "人数",
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
.leftMenu_item {
|
||||
margin-top: 20px;
|
||||
.middleSize {
|
||||
font-size: 12px;
|
||||
}
|
||||
@ -125,7 +126,11 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> span {
|
||||
width: 260px;
|
||||
margin-bottom: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; //单行
|
||||
}
|
||||
}
|
||||
.common-info {
|
||||
@ -315,6 +320,7 @@
|
||||
font-family: "Source Han Sans CN-Regular", "Source Han Sans CN";
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
white-space: nowrap;
|
||||
}
|
||||
> span:nth-child(1) {
|
||||
display: inline-block;
|
||||
|
||||
@ -22,13 +22,11 @@
|
||||
</div>
|
||||
<div>
|
||||
<img src="@/assets/images/AIwaring/报警.png" alt="" />
|
||||
<span class="middleSize"
|
||||
>今日报警次数:{{ data.aiAlarmStat === null ? 0 : parse(data.aiAlarmStat)?.todayAlarm }}</span
|
||||
>
|
||||
<span class="middleSize">今日报警次数:{{ data.alarmNum ? data.alarmNum : 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom_item flx-justify-between" style="margin-top: 6px">
|
||||
<!-- <div class="bottom_item flx-justify-between" style="margin-top: 6px">
|
||||
<div>
|
||||
<span class="bottomSize"
|
||||
>今日待整改问题:{{ data.aiAlarmStat === null ? 0 : parse(data.aiAlarmStat)?.questionNum }}</span
|
||||
@ -39,7 +37,7 @@
|
||||
>今日已整改问题:{{ data.aiAlarmStat === null ? 0 : parse(data.aiAlarmStat)?.solveQuestionNum }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
</LeftMenu>
|
||||
@ -55,19 +53,20 @@
|
||||
<div class="monitor-tool">
|
||||
<img src="@/assets/images/onlineSupervision/liftImg.jpg" alt="" />
|
||||
<div class="common-info">
|
||||
<span>额定载重: {{ equipInfo.posteriorArmLength ? equipInfo.posteriorArmLength : 0 }}kg</span>
|
||||
<span>额定人数: {{ equipInfo.forearmLength ? equipInfo.forearmLength : 0 }}人</span>
|
||||
<span>最大倾斜角度: {{ equipInfo.towerHeight ? equipInfo.towerHeight : 0 }}°</span>
|
||||
<span>最大高度: {{ equipInfo.towerHeight ? equipInfo.towerHeight : 0 }}m</span>
|
||||
<span>风级: {{ equipInfo.towerHeight ? equipInfo.towerHeight : 0 }}级风</span>
|
||||
<span>额定上行速度: {{ equipInfo.towerHeight ? equipInfo.towerHeight : 0 }}m</span>
|
||||
<span>额定下行速度: {{ equipInfo.towerHeight ? equipInfo.towerHeight : 0 }}m</span>
|
||||
<span>最大载重: {{ equipInfo.maxLoad ? equipInfo.maxLoad : 0 }}kg</span>
|
||||
<span>额定人数: {{ equipInfo.ratedPeopleNum ? equipInfo.ratedPeopleNum : 0 }}人</span>
|
||||
<span>当前楼层数: {{ equipInfo.floorNum ? equipInfo.floorNum : 0 }}</span>
|
||||
<span>最大高度: {{ equipInfo.heightRatio ? equipInfo.heightRatio : 0 }}m</span>
|
||||
<span>高度百分比: {{ equipInfo.maxHeight ? equipInfo.maxHeight : 0 }}%</span>
|
||||
<!-- <span>额定上行速度: {{ equipInfo.maxHeight ? equipInfo.maxHeight : 0 }}m</span>
|
||||
<span>额定下行速度: {{ equipInfo.maxHeight ? equipInfo.maxHeight : 0 }}m</span> -->
|
||||
</div>
|
||||
<div class="other-info">
|
||||
<span>备案编号: TD2374693</span>
|
||||
<span>安装日期: 2022-12-01</span>
|
||||
<span>终端编号: TD2374693</span>
|
||||
<span>更新时间: 2023-05-23</span>
|
||||
<span>备案编号: {{ equipInfo.filingNumber ? equipInfo.filingNumber : "" }}</span>
|
||||
<span>安装日期: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span>
|
||||
<span>终端编号: {{ equipInfo.devNumber ? equipInfo.devNumber : "" }}</span>
|
||||
<span>更新时间: {{ equipInfo.realTime ? equipInfo.realTime : "" }}</span>
|
||||
<!-- <span>安装时间: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="monitor-aspect">
|
||||
@ -111,7 +110,7 @@
|
||||
:tabs="['历史报警', '历史监测信息']"
|
||||
:pageable="pages"
|
||||
class="LeftMenu"
|
||||
@change-page="onCurChange"
|
||||
@change-page="onActiveCurChange"
|
||||
>
|
||||
<template #default>
|
||||
<div class="search-wrapper">
|
||||
@ -152,12 +151,12 @@
|
||||
<div>{{ item.devName }}</div>
|
||||
<div class="info-list-item-aspect">
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>角度</span>
|
||||
<span>{{ item.angle ? item.angle : 0 }}°</span>
|
||||
<span>制动距离</span>
|
||||
<span>{{ item.brakingDistance ? item.brakingDistance : 0 }}m</span>
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>倾角</span>
|
||||
<span>{{ item.obliquity ? item.obliquity : 0 }}°</span>
|
||||
<span>倾斜角</span>
|
||||
<span>{{ item.biasAngle ? item.biasAngle : 0 }}°</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-list-item-aspect">
|
||||
@ -167,7 +166,7 @@
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>倾角X</span>
|
||||
<span>{{ item.obliquityX ? item.obliquityX : 0 }}°</span>
|
||||
<span>{{ item.dipAngleX ? item.dipAngleX : 0 }}°</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-list-item-aspect">
|
||||
@ -177,17 +176,17 @@
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>倾角Y</span>
|
||||
<span>{{ item.obliquityY ? item.obliquityY : 0 }}°</span>
|
||||
<span>{{ item.dipAngleY ? item.dipAngleY : 0 }}°</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-list-item-aspect">
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>载重</span>
|
||||
<span>{{ item.loading ? item.loading : 0 }}kg</span>
|
||||
<span>准载</span>
|
||||
<span>{{ item.maxLoad ? item.maxLoad : 0 }}kg</span>
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>幅度</span>
|
||||
<span>{{ item.ranger ? item.ranger : 0 }}m</span>
|
||||
<span>运行速度</span>
|
||||
<span>{{ item.speed ? item.speed : 0 }}m</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>监测时间: {{ item.createTime ? item.createTime : "" }}</div>
|
||||
@ -208,13 +207,14 @@ import LeftMenuPlus from "@/components/LeftMenuPlus/LeftMenu.vue";
|
||||
import layoutTop from "@/components/layoutTop/index.vue";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import {
|
||||
getRealTimepPojectPage,
|
||||
getRealTimeEngineeringPage,
|
||||
towerCraneAlarmPage,
|
||||
towerCraneDataPage,
|
||||
towerCraneEquipAll,
|
||||
operationData
|
||||
getLifterRealTimePojectPage,
|
||||
getLifterRealTimeEngineeringPage,
|
||||
lifterAlarmPage,
|
||||
lifterDataPage,
|
||||
lifterEquipAll,
|
||||
lifterOperationData
|
||||
} from "@/api/modules/goverment";
|
||||
const equipActive = ref(0);
|
||||
const monitorList = ref([]);
|
||||
const alarmList = ref([]);
|
||||
const equipList = ref([]);
|
||||
@ -239,19 +239,40 @@ const pages = ref({
|
||||
total: 0
|
||||
});
|
||||
const aspectList = ref([
|
||||
{
|
||||
name: "力矩",
|
||||
value: 10,
|
||||
unit: "N·M",
|
||||
img: new URL("@/assets/images/onlineSupervision/力矩.png", import.meta.url).href,
|
||||
prop: "torque"
|
||||
},
|
||||
{
|
||||
name: "载重",
|
||||
value: 10,
|
||||
unit: "T",
|
||||
unit: "kg",
|
||||
img: new URL("@/assets/images/onlineSupervision/载重.png", import.meta.url).href,
|
||||
prop: "loading"
|
||||
prop: "maxLoad"
|
||||
},
|
||||
{
|
||||
name: "人数",
|
||||
value: 10,
|
||||
unit: "人",
|
||||
img: new URL("@/assets/images/onlineSupervision/力矩.png", import.meta.url).href,
|
||||
prop: "peopleNumber"
|
||||
},
|
||||
{
|
||||
name: "倾角X",
|
||||
value: 10,
|
||||
unit: "°",
|
||||
img: new URL("@/assets/images/onlineSupervision/塔身倾角.png", import.meta.url).href,
|
||||
prop: "dipAngleX"
|
||||
},
|
||||
{
|
||||
name: "倾角Y",
|
||||
value: 10,
|
||||
unit: "°",
|
||||
img: new URL("@/assets/images/onlineSupervision/塔身倾角.png", import.meta.url).href,
|
||||
prop: "dipAngleX"
|
||||
},
|
||||
{
|
||||
name: "高度",
|
||||
value: 10,
|
||||
unit: "m",
|
||||
img: new URL("@/assets/images/onlineSupervision/高度.png", import.meta.url).href,
|
||||
prop: "maxHeight"
|
||||
},
|
||||
{
|
||||
name: "风速",
|
||||
@ -261,32 +282,11 @@ const aspectList = ref([
|
||||
prop: "windSpeed"
|
||||
},
|
||||
{
|
||||
name: "高度",
|
||||
name: "运行速度",
|
||||
value: 10,
|
||||
unit: "m",
|
||||
img: new URL("@/assets/images/onlineSupervision/高度.png", import.meta.url).href,
|
||||
prop: "height"
|
||||
},
|
||||
{
|
||||
name: "回转角度",
|
||||
value: 10,
|
||||
unit: "°",
|
||||
img: new URL("@/assets/images/onlineSupervision/回转角度.png", import.meta.url).href,
|
||||
prop: "angle"
|
||||
},
|
||||
{
|
||||
name: "塔身倾角",
|
||||
value: 10,
|
||||
unit: "°",
|
||||
img: new URL("@/assets/images/onlineSupervision/塔身倾角.png", import.meta.url).href,
|
||||
prop: "obliquity"
|
||||
},
|
||||
{
|
||||
name: "幅度",
|
||||
value: 10,
|
||||
unit: "m",
|
||||
img: new URL("@/assets/images/onlineSupervision/幅度.png", import.meta.url).href,
|
||||
prop: "ranger"
|
||||
unit: "m/s",
|
||||
img: new URL("@/assets/images/onlineSupervision/风速.png", import.meta.url).href,
|
||||
prop: "speed"
|
||||
}
|
||||
]);
|
||||
const searchSn = ref("");
|
||||
@ -296,17 +296,17 @@ const proTable = ref();
|
||||
// 报警项目转换
|
||||
const alarmTransform = (obj: any) => {
|
||||
let str = "";
|
||||
if (obj["environmentAlarm"] == 1) str += "环境防碰撞报警,";
|
||||
if (obj["forceAlarm"] == 1) str += "力矩报警,";
|
||||
if (obj["heightLowerAlarm"] == 1) str += "高度下限位报警,";
|
||||
if (obj["heightUpperAlarm"] == 1) str += "高度上限位报警,";
|
||||
if (obj["maxRangeAlarm"] == 1) str += "幅度外限位报警,";
|
||||
if (obj["minRangeAlarm"] == 1) str += "幅度内限位报警,";
|
||||
if (obj["multiAntiCollisionAlarm"] == 1) str += "多机防撞报警,";
|
||||
if (obj["negAngleAlarm"] == 1) str += "逆时针回转限位报警,";
|
||||
if (obj["obliquityAlarm"] == 1) str += "倾角报警,";
|
||||
if (obj["posAngleAlarm"] == 1) str += "顺时针回转限位报警,";
|
||||
if (obj["standardHighAlarm"] == 1) str += "塔机间竖向高度报警,";
|
||||
if (obj["fallAlarm"] == 1) str += "防坠机报警,";
|
||||
if (obj["heightAlarm"] == 1) str += "高度报警,";
|
||||
if (obj["motor1Alarm"] == 1) str += "1号电机报警,";
|
||||
if (obj["motor2Alarm"] == 1) str += "2号电机报警,";
|
||||
if (obj["motor3Alarm"] == 1) str += "3号电机报警,";
|
||||
if (obj["obliquityXAlarm"] == 1) str += "倾角X报警,";
|
||||
if (obj["obliquityYAlarm"] == 1) str += "倾角Y报警,";
|
||||
if (obj["peopleCntAlarm"] == 1) str += "人数报警,";
|
||||
if (obj["speedAlarm"] == 1) str += "速度报警,";
|
||||
if (obj["topAlarm"] == 1) str += "防冲顶报警,";
|
||||
if (obj["weightAlarm"] == 1) str += "载重报警,";
|
||||
if (obj["windSpeedAlarm"] == 1) str += "风速报警";
|
||||
return str;
|
||||
};
|
||||
@ -318,8 +318,8 @@ const getEquipList = async () => {
|
||||
} else {
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
}
|
||||
const res = await towerCraneEquipAll(requestData);
|
||||
console.log(res);
|
||||
const res = await lifterEquipAll(requestData);
|
||||
console.log(res, "设备列表");
|
||||
if (res && res.result && res.result.length > 0) {
|
||||
equipList.value = res.result;
|
||||
getEquipInfo(res.result[0]);
|
||||
@ -330,10 +330,11 @@ const getEquipList = async () => {
|
||||
};
|
||||
// 获取设备信息
|
||||
const getEquipInfo = async (obj: any) => {
|
||||
equipActive.value = equipList.value.findIndex(item => item.id == obj.id);
|
||||
let requestData = {
|
||||
id: obj.id
|
||||
};
|
||||
const res = await operationData(requestData);
|
||||
const res = await lifterOperationData(requestData);
|
||||
console.log(res);
|
||||
if (res && res.result) {
|
||||
equipInfo.value = { ...obj, ...res.result };
|
||||
@ -356,7 +357,7 @@ const getMonitorList = async () => {
|
||||
requestData.createTime_begin = searchForm.value.timeRange[0];
|
||||
requestData.createTime_end = searchForm.value.timeRange[1];
|
||||
}
|
||||
const res = await towerCraneDataPage(requestData);
|
||||
const res = await lifterDataPage(requestData);
|
||||
console.log(res);
|
||||
if (res && res.result && res.result.records.length > 0) {
|
||||
monitorList.value = res.result.records;
|
||||
@ -381,7 +382,7 @@ const getAlarmList = async () => {
|
||||
requestData.createTime_begin = searchForm.value.timeRange[0];
|
||||
requestData.createTime_end = searchForm.value.timeRange[1];
|
||||
}
|
||||
const res = await towerCraneAlarmPage(requestData);
|
||||
const res = await lifterAlarmPage(requestData);
|
||||
console.log(res);
|
||||
if (res && res.result && res.result.records.length > 0) {
|
||||
alarmList.value = res.result.records;
|
||||
@ -397,7 +398,7 @@ function parse(val) {
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: any) => {
|
||||
console.log(params);
|
||||
active.value === 0 ? (searchSn.value = params.projectSn) : (searchSn.value = params.engineeringSn);
|
||||
alarmActive.value === 0 ? (searchSn.value = params.projectSn) : (searchSn.value = params.engineeringSn);
|
||||
getEquipList();
|
||||
if (active.value === 0) {
|
||||
getAlarmList();
|
||||
@ -408,7 +409,7 @@ const onSearch = async (params: any) => {
|
||||
// leftMenu页面的搜索按钮
|
||||
const onSearchInput = async (params: string) => {
|
||||
leftMenuSearchForm.value.name = params;
|
||||
if (active.value === 0) {
|
||||
if (alarmActive.value === 0) {
|
||||
getProPage();
|
||||
} else {
|
||||
getEngPage();
|
||||
@ -416,13 +417,22 @@ const onSearchInput = async (params: string) => {
|
||||
};
|
||||
// leftMenu页面的分页
|
||||
const onCurChange = async (params: number) => {
|
||||
alarmPages.value.pageSize = params;
|
||||
if (active.value === 0) {
|
||||
alarmPages.value.pageNo = params;
|
||||
if (alarmActive.value === 0) {
|
||||
getProPage();
|
||||
} else {
|
||||
getEngPage();
|
||||
}
|
||||
};
|
||||
// 右侧报警数据分页
|
||||
const onActiveCurChange = async (params: number) => {
|
||||
pages.value.pageNo = params;
|
||||
if (active.value === 0) {
|
||||
getAlarmList();
|
||||
} else {
|
||||
getMonitorList();
|
||||
}
|
||||
};
|
||||
// 右侧报警数据搜索
|
||||
const search = () => {
|
||||
console.log(666);
|
||||
@ -439,7 +449,7 @@ const getProPage = async () => {
|
||||
...pages.value,
|
||||
projectName: leftMenuSearchForm.value.name
|
||||
};
|
||||
const { result } = await getRealTimepPojectPage(requestData);
|
||||
const { result } = await getLifterRealTimePojectPage(requestData);
|
||||
records.value = result.records;
|
||||
pages.value.total = Number(result.total);
|
||||
};
|
||||
@ -449,9 +459,9 @@ const getEngPage = async () => {
|
||||
...pages.value,
|
||||
engineeringName: leftMenuSearchForm.value.name
|
||||
};
|
||||
const { result } = await getRealTimeEngineeringPage(requestData);
|
||||
const { result } = await getLifterRealTimeEngineeringPage(requestData);
|
||||
records.value = result.records;
|
||||
pages.value.total = +result.total;
|
||||
pages.value.total = Number(result.total);
|
||||
};
|
||||
watch(
|
||||
() => active.value,
|
||||
|
||||
@ -33,8 +33,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.tabs-option {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +171,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<footer class="footer flx-center" v-if="title != '查看设备'">
|
||||
<el-button class="cancelButtonStyle" @click="newUnitDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm(formData)">保存</el-button>
|
||||
@ -179,9 +178,11 @@
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 侧边栏选择 -->
|
||||
<engineeringEngDrawer v-model="engVisable" ref="engDrawer" :engList="engList">
|
||||
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
||||
<template #default="{ data }">
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{ data.engineeringName }}</span>
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{
|
||||
activeValue == "eng" ? data.engineeringName : data.projectName
|
||||
}}</span>
|
||||
</template>
|
||||
</engineeringEngDrawer>
|
||||
<allEngineering @click="engVisable = true" />
|
||||
@ -190,7 +191,7 @@
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, reactive, nextTick, onMounted } from "vue";
|
||||
import { ElMessage, FormInstance } from "element-plus";
|
||||
import { ElMessage, ElMessageBox, ElTree, FormInstance } from "element-plus";
|
||||
import type { UploadProps } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
@ -200,9 +201,7 @@ import { jxj_User } from "@/api/types";
|
||||
import { getRelevanceList } from "@/api/modules/common";
|
||||
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
||||
import allEngineering from "@/components/allEngineering/index.vue";
|
||||
// import { towerCraneEquipAdd, towerCraneEquipEdit, towerCraneEquipDel, towerCraneEquipPage } from "@/api/modules/enterpriseApi";
|
||||
import { lifterEquipAdd, lifterEquipEdit, lifterEquipDel, lifterEquipPage } from "@/api/modules/project";
|
||||
|
||||
import { lifterEquipAdd, lifterEquipEdit, lifterEquipDel, lifterEquipPage, getEngineeringName } from "@/api/modules/project";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
const baseUrl = import.meta.env.VITE_API_URL;
|
||||
@ -219,6 +218,7 @@ const stateList = ref([
|
||||
{ label: "设备拆除", value: 5 },
|
||||
{ label: "设备退场", value: 6 }
|
||||
]);
|
||||
const activeValue = ref("eng");
|
||||
const engList = ref([]);
|
||||
const engVisable = ref(false);
|
||||
const searchSn = ref("");
|
||||
@ -253,26 +253,6 @@ const formData = ref({
|
||||
useRegistrationTime: "",
|
||||
verifyCode: ""
|
||||
});
|
||||
|
||||
const emptyFormData = ref({
|
||||
id: "",
|
||||
devName: "",
|
||||
devNumber: "",
|
||||
elevatorType: "",
|
||||
installTime: "",
|
||||
installImage: "",
|
||||
registrationCertificate: "",
|
||||
model: "",
|
||||
gearModule: "",
|
||||
maxHeight: "",
|
||||
maxLoad: "",
|
||||
ratedPeopleNum: "",
|
||||
filingNumber: "",
|
||||
totalFloor: "",
|
||||
useRegistrationNumber: "",
|
||||
useRegistrationTime: "",
|
||||
verifyCode: ""
|
||||
});
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref();
|
||||
|
||||
@ -429,7 +409,7 @@ const rules = ref({
|
||||
}
|
||||
],
|
||||
|
||||
verifyCode: [
|
||||
manufacturer: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
@ -532,21 +512,12 @@ const rules = ref({
|
||||
});
|
||||
|
||||
// 图片上传成功后的钩子
|
||||
// 上传安装图片
|
||||
const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile) => {
|
||||
// console.log(response.result.url);
|
||||
console.log(response.result.url);
|
||||
console.log(response, uploadFile);
|
||||
formData.value.installImage = response.result.url;
|
||||
formRef.value?.validateField("image");
|
||||
};
|
||||
// 上传登记证书
|
||||
const handleRegistSuccess: UploadProps["onSuccess"] = (response, uploadFile) => {
|
||||
// console.log(response.result.url);
|
||||
console.log(response, uploadFile);
|
||||
formData.value.registrationCertificate = response.result.url;
|
||||
formRef.value?.validateField("image");
|
||||
};
|
||||
|
||||
// 删除设备
|
||||
const handleDeleteItem = async (params: jxj_User.ResUserList) => {
|
||||
await useHandleData(lifterEquipDel, { id: params.id }, `删除【${params.devName}】`);
|
||||
@ -591,7 +562,11 @@ const getTableList = (params: any) => {
|
||||
delete newParams.installTime;
|
||||
}
|
||||
if (searchSn.value) {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
newParams.projectSn = searchSn.value;
|
||||
}
|
||||
} else {
|
||||
return { result: { current: "1", pages: "1", records: [], size: "10", total: "0" } };
|
||||
}
|
||||
@ -599,11 +574,9 @@ const getTableList = (params: any) => {
|
||||
};
|
||||
// 新增
|
||||
const handleAddItem = () => {
|
||||
formData.value = emptyFormData.value;
|
||||
formRef.value?.resetFields();
|
||||
title.value = "新增设备";
|
||||
newUnitDialog.value = true;
|
||||
console.log("打开新增", formData.value);
|
||||
};
|
||||
// 查看
|
||||
const handleLookItem = (row: any) => {
|
||||
@ -632,7 +605,11 @@ const submitForm = async (data: any) => {
|
||||
if (changeType.value == 2) {
|
||||
delete data.businessLicenseLifespan;
|
||||
}
|
||||
data.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
data.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
data.projectSn = searchSn.value;
|
||||
}
|
||||
saveItem(data);
|
||||
} else {
|
||||
console.log("error submit!", fields);
|
||||
@ -653,6 +630,26 @@ const saveItem = async (form: any) => {
|
||||
newUnitDialog.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 抽屉tab选择时
|
||||
const tabsSelect = val => {
|
||||
activeValue.value = val;
|
||||
if (val == "eng") {
|
||||
getengineering();
|
||||
} else if (val == "project") {
|
||||
getProject();
|
||||
}
|
||||
};
|
||||
// 获取项目信息
|
||||
const getProject = async () => {
|
||||
const res = await getEngineeringName();
|
||||
engList.value = [res.result];
|
||||
if (res.result) {
|
||||
searchSn.value = res.result.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
};
|
||||
const getengineering = async () => {
|
||||
// let newParams = JSON.parse(JSON.stringify(params));
|
||||
const res = await getRelevanceList();
|
||||
@ -665,7 +662,11 @@ const getengineering = async () => {
|
||||
};
|
||||
// 点击抽屉的工程名称更新页面
|
||||
const onUpdate = async row => {
|
||||
searchSn.value = row.engineeringSn;
|
||||
if (activeValue.value == "eng") {
|
||||
searchSn.value = row.engineeringSn;
|
||||
} else if (activeValue.value == "project") {
|
||||
searchSn.value = row.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("页面已更新");
|
||||
};
|
||||
|
||||
@ -9,8 +9,3 @@
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.tabs-option {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,9 +121,11 @@
|
||||
</template>
|
||||
</ProTable>
|
||||
<!-- 侧边栏选择 -->
|
||||
<engineeringEngDrawer v-model="engVisable" ref="engDrawer" :engList="engList">
|
||||
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
||||
<template #default="{ data }">
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{ data.engineeringName }}</span>
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{
|
||||
activeValue == "eng" ? data.engineeringName : data.projectName
|
||||
}}</span>
|
||||
</template>
|
||||
</engineeringEngDrawer>
|
||||
<allEngineering @click="engVisable = true" />
|
||||
@ -138,8 +140,9 @@ import ProTable from "@/components/ProTable/index.vue";
|
||||
import { getRelevanceList } from "@/api/modules/common";
|
||||
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
||||
import allEngineering from "@/components/allEngineering/index.vue";
|
||||
import { lifterAlarmPage } from "@/api/modules/project";
|
||||
import { addBuildUnit, getBuildUnitList, getEngineeringName, lifterAlarmPage } from "@/api/modules/project";
|
||||
|
||||
const activeValue = ref("eng");
|
||||
const engList = ref([]);
|
||||
const engVisable = ref(false);
|
||||
const searchSn = ref("");
|
||||
@ -217,12 +220,36 @@ const getTableList = (params: any) => {
|
||||
delete newParams.createTime;
|
||||
}
|
||||
if (searchSn.value) {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
newParams.projectSn = searchSn.value;
|
||||
}
|
||||
} else {
|
||||
return { result: { current: "1", pages: "1", records: [], size: "10", total: "0" } };
|
||||
}
|
||||
return lifterAlarmPage(newParams);
|
||||
};
|
||||
|
||||
// 抽屉tab选择时
|
||||
const tabsSelect = val => {
|
||||
activeValue.value = val;
|
||||
if (val == "eng") {
|
||||
getengineering();
|
||||
} else if (val == "project") {
|
||||
getProject();
|
||||
}
|
||||
};
|
||||
// 获取项目信息
|
||||
const getProject = async () => {
|
||||
const res = await getEngineeringName();
|
||||
engList.value = [res.result];
|
||||
if (res.result) {
|
||||
searchSn.value = res.result.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
};
|
||||
const getengineering = async () => {
|
||||
// let newParams = JSON.parse(JSON.stringify(params));
|
||||
const res = await getRelevanceList();
|
||||
@ -235,7 +262,11 @@ const getengineering = async () => {
|
||||
};
|
||||
// 点击抽屉的工程名称更新页面
|
||||
const onUpdate = async row => {
|
||||
searchSn.value = row.engineeringSn;
|
||||
if (activeValue.value == "eng") {
|
||||
searchSn.value = row.engineeringSn;
|
||||
} else if (activeValue.value == "project") {
|
||||
searchSn.value = row.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("页面已更新");
|
||||
};
|
||||
|
||||
@ -9,8 +9,3 @@
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.tabs-option {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,9 +322,11 @@
|
||||
</template>
|
||||
</ProTable>
|
||||
<!-- 侧边栏选择 -->
|
||||
<engineeringEngDrawer v-model="engVisable" ref="engDrawer" :engList="engList">
|
||||
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
||||
<template #default="{ data }">
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{ data.engineeringName }}</span>
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{
|
||||
activeValue == "eng" ? data.engineeringName : data.projectName
|
||||
}}</span>
|
||||
</template>
|
||||
</engineeringEngDrawer>
|
||||
<allEngineering @click="engVisable = true" />
|
||||
@ -339,8 +341,9 @@ import ProTable from "@/components/ProTable/index.vue";
|
||||
import { getRelevanceList } from "@/api/modules/common";
|
||||
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
||||
import allEngineering from "@/components/allEngineering/index.vue";
|
||||
import { lifterDataPage } from "@/api/modules/project";
|
||||
import { getEngineeringName, lifterDataPage } from "@/api/modules/project";
|
||||
|
||||
const activeValue = ref("eng");
|
||||
const engList = ref([]);
|
||||
const engVisable = ref(false);
|
||||
const searchSn = ref("");
|
||||
@ -417,12 +420,36 @@ const getTableList = (params: any) => {
|
||||
delete newParams.createTime;
|
||||
}
|
||||
if (searchSn.value) {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
newParams.projectSn = searchSn.value;
|
||||
}
|
||||
} else {
|
||||
return { result: { current: "1", pages: "1", records: [], size: "10", total: "0" } };
|
||||
}
|
||||
return lifterDataPage(newParams);
|
||||
};
|
||||
|
||||
// 抽屉tab选择时
|
||||
const tabsSelect = val => {
|
||||
activeValue.value = val;
|
||||
if (val == "eng") {
|
||||
getengineering();
|
||||
} else if (val == "project") {
|
||||
getProject();
|
||||
}
|
||||
};
|
||||
// 获取项目信息
|
||||
const getProject = async () => {
|
||||
const res = await getEngineeringName();
|
||||
engList.value = [res.result];
|
||||
if (res.result) {
|
||||
searchSn.value = res.result.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
};
|
||||
const getengineering = async () => {
|
||||
// let newParams = JSON.parse(JSON.stringify(params));
|
||||
const res = await getRelevanceList();
|
||||
@ -435,7 +462,11 @@ const getengineering = async () => {
|
||||
};
|
||||
// 点击抽屉的工程名称更新页面
|
||||
const onUpdate = async row => {
|
||||
searchSn.value = row.engineeringSn;
|
||||
if (activeValue.value == "eng") {
|
||||
searchSn.value = row.engineeringSn;
|
||||
} else if (activeValue.value == "project") {
|
||||
searchSn.value = row.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("页面已更新");
|
||||
};
|
||||
|
||||
@ -9,8 +9,3 @@
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.tabs-option {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,9 +189,11 @@
|
||||
</template>
|
||||
</ProTable>
|
||||
<!-- 侧边栏选择 -->
|
||||
<engineeringEngDrawer v-model="engVisable" ref="engDrawer" :engList="engList">
|
||||
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
||||
<template #default="{ data }">
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{ data.engineeringName }}</span>
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{
|
||||
activeValue == "eng" ? data.engineeringName : data.projectName
|
||||
}}</span>
|
||||
</template>
|
||||
</engineeringEngDrawer>
|
||||
<allEngineering @click="engVisable = true" />
|
||||
@ -206,8 +208,9 @@ import ProTable from "@/components/ProTable/index.vue";
|
||||
import { getRelevanceList } from "@/api/modules/common";
|
||||
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
||||
import allEngineering from "@/components/allEngineering/index.vue";
|
||||
import { lifterWorkCyclePage } from "@/api/modules/project";
|
||||
import { getEngineeringName, lifterWorkCyclePage } from "@/api/modules/project";
|
||||
|
||||
const activeValue = ref("eng");
|
||||
const engList = ref([]);
|
||||
const engVisable = ref(false);
|
||||
const searchSn = ref("");
|
||||
@ -274,12 +277,36 @@ const getTableList = (params: any) => {
|
||||
delete newParams.createTime;
|
||||
}
|
||||
if (searchSn.value) {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
newParams.projectSn = searchSn.value;
|
||||
}
|
||||
} else {
|
||||
return { result: { current: "1", pages: "1", records: [], size: "10", total: "0" } };
|
||||
}
|
||||
return lifterWorkCyclePage(newParams);
|
||||
};
|
||||
|
||||
// 抽屉tab选择时
|
||||
const tabsSelect = val => {
|
||||
activeValue.value = val;
|
||||
if (val == "eng") {
|
||||
getengineering();
|
||||
} else if (val == "project") {
|
||||
getProject();
|
||||
}
|
||||
};
|
||||
// 获取项目信息
|
||||
const getProject = async () => {
|
||||
const res = await getEngineeringName();
|
||||
engList.value = [res.result];
|
||||
if (res.result) {
|
||||
searchSn.value = res.result.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
};
|
||||
const getengineering = async () => {
|
||||
// let newParams = JSON.parse(JSON.stringify(params));
|
||||
const res = await getRelevanceList();
|
||||
@ -292,7 +319,11 @@ const getengineering = async () => {
|
||||
};
|
||||
// 点击抽屉的工程名称更新页面
|
||||
const onUpdate = async row => {
|
||||
searchSn.value = row.engineeringSn;
|
||||
if (activeValue.value == "eng") {
|
||||
searchSn.value = row.engineeringSn;
|
||||
} else if (activeValue.value == "project") {
|
||||
searchSn.value = row.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("页面已更新");
|
||||
};
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
min-height: 600px;
|
||||
overflow-y: scroll;
|
||||
.monitor-title {
|
||||
margin-top: 15px;
|
||||
margin-left: 36px;
|
||||
@ -144,7 +145,6 @@
|
||||
@include flex;
|
||||
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
> div {
|
||||
position: relative;
|
||||
@ -287,8 +287,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.tabs-option {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<span>安装日期: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span>
|
||||
<span>终端编号: {{ equipInfo.devNumber ? equipInfo.devNumber : "" }}</span>
|
||||
<span>更新时间: {{ equipInfo.realTime ? equipInfo.realTime : "" }}</span>
|
||||
<span>安装时间: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span>
|
||||
<!-- <span>安装时间: {{ equipInfo.installTime ? equipInfo.installTime : "" }}</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="monitor-aspect">
|
||||
@ -112,12 +112,12 @@
|
||||
<div>{{ item.devName }}</div>
|
||||
<div class="info-list-item-aspect">
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>制动距离</span>
|
||||
<span>{{ item.brakingDistance ? item.brakingDistance : 0 }}°</span>
|
||||
<span>角度</span>
|
||||
<span>{{ item.angle ? item.angle : 0 }}°</span>
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>倾斜角</span>
|
||||
<span>{{ item.biasAngle ? item.biasAngle : 0 }}°</span>
|
||||
<span>倾角</span>
|
||||
<span>{{ item.obliquity ? item.obliquity : 0 }}°</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-list-item-aspect">
|
||||
@ -127,7 +127,7 @@
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>倾角X</span>
|
||||
<span>{{ item.dipAngleX ? item.dipAngleX : 0 }}°</span>
|
||||
<span>{{ item.obliquityX ? item.obliquityX : 0 }}°</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-list-item-aspect">
|
||||
@ -137,17 +137,17 @@
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>倾角Y</span>
|
||||
<span>{{ item.dipAngleY ? item.dipAngleY : 0 }}°</span>
|
||||
<span>{{ item.obliquityY ? item.obliquityY : 0 }}°</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-list-item-aspect">
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>准载</span>
|
||||
<span>{{ item.maxLoad ? item.maxLoad : 0 }}kg</span>
|
||||
<span>载重</span>
|
||||
<span>{{ item.loading ? item.loading : 0 }}kg</span>
|
||||
</div>
|
||||
<div class="info-list-item-aspect-item">
|
||||
<span>运行速度</span>
|
||||
<span>{{ item.speed ? item.speed : 0 }}m</span>
|
||||
<span>幅度</span>
|
||||
<span>{{ item.ranger ? item.ranger : 0 }}m</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>监测时间: {{ item.createTime ? item.createTime : "" }}</div>
|
||||
@ -157,9 +157,11 @@
|
||||
</LeftMenuPlus>
|
||||
</div>
|
||||
<!-- 侧边栏选择 -->
|
||||
<engineeringEngDrawer v-model="engVisable" ref="engDrawer" :engList="engList">
|
||||
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
||||
<template #default="{ data }">
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{ data.engineeringName }}</span>
|
||||
<span style="margin-left: 10px" @click="onUpdate(data)">{{
|
||||
activeValue == "eng" ? data.engineeringName : data.projectName
|
||||
}}</span>
|
||||
</template>
|
||||
</engineeringEngDrawer>
|
||||
<allEngineering @click="engVisable = true" />
|
||||
@ -172,7 +174,7 @@ import { ElMessage } from "element-plus";
|
||||
import { getRelevanceList } from "@/api/modules/common";
|
||||
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
||||
import allEngineering from "@/components/allEngineering/index.vue";
|
||||
import { lifterEquipAll, lifterOperationData, lifterAlarmPage, lifterDataPage } from "@/api/modules/project";
|
||||
import { getEngineeringName, lifterEquipAll, lifterOperationData, lifterAlarmPage, lifterDataPage } from "@/api/modules/project";
|
||||
import LeftMenuPlus from "@/components/LeftMenuPlus/LeftMenu.vue";
|
||||
const equipActive = ref(0);
|
||||
const monitorList = ref([]);
|
||||
@ -192,9 +194,9 @@ const aspectList = ref([
|
||||
{
|
||||
name: "载重",
|
||||
value: 10,
|
||||
unit: "T",
|
||||
unit: "kg",
|
||||
img: new URL("@/assets/images/onlineSupervision/载重.png", import.meta.url).href,
|
||||
prop: "maxLoad"
|
||||
prop: "loading"
|
||||
},
|
||||
{
|
||||
name: "人数",
|
||||
@ -238,22 +240,8 @@ const aspectList = ref([
|
||||
img: new URL("@/assets/images/onlineSupervision/风速.png", import.meta.url).href,
|
||||
prop: "speed"
|
||||
}
|
||||
// {
|
||||
// name: "运行速度",
|
||||
// value: 10,
|
||||
// unit: "m/s",
|
||||
// img: new URL("@/assets/images/onlineSupervision/回转角度.png", import.meta.url).href,
|
||||
// prop: "speed"
|
||||
// }
|
||||
|
||||
// {
|
||||
// name: "下行速度",
|
||||
// value: 10,
|
||||
// unit: "m",
|
||||
// img: new URL("@/assets/images/onlineSupervision/幅度.png", import.meta.url).href,
|
||||
// prop: "ranger"
|
||||
// }
|
||||
]);
|
||||
const activeValue = ref("eng");
|
||||
const engList = ref([]);
|
||||
const engVisable = ref(false);
|
||||
const searchSn = ref("");
|
||||
@ -282,7 +270,11 @@ const getMonitorList = async () => {
|
||||
pageNo: pages.value.pageNo,
|
||||
pageSize: pages.value.pageSize
|
||||
} as any;
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
requestData.projectSn = searchSn.value;
|
||||
}
|
||||
if (searchForm.value.timeRange && searchForm.value.timeRange.length > 0) {
|
||||
requestData.createTime_begin = searchForm.value.timeRange[0];
|
||||
requestData.createTime_end = searchForm.value.timeRange[1];
|
||||
@ -303,7 +295,11 @@ const getAlarmList = async () => {
|
||||
pageNo: pages.value.pageNo,
|
||||
pageSize: pages.value.pageSize
|
||||
} as any;
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
requestData.projectSn = searchSn.value;
|
||||
}
|
||||
if (searchForm.value.timeRange && searchForm.value.timeRange.length > 0) {
|
||||
requestData.createTime_begin = searchForm.value.timeRange[0];
|
||||
requestData.createTime_end = searchForm.value.timeRange[1];
|
||||
@ -321,7 +317,11 @@ const getAlarmList = async () => {
|
||||
// 获取设备列表
|
||||
const getEquipList = async () => {
|
||||
let requestData = {} as any;
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
if (activeValue.value == "eng") {
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
requestData.projectSn = searchSn.value;
|
||||
}
|
||||
const res = await lifterEquipAll(requestData);
|
||||
console.log(res);
|
||||
if (res && res.result && res.result.length > 0) {
|
||||
@ -333,6 +333,7 @@ const getEquipList = async () => {
|
||||
};
|
||||
// 获取设备信息
|
||||
const getEquipInfo = async (obj: any) => {
|
||||
equipActive.value = equipList.value.findIndex(item => item.id == obj.id);
|
||||
let requestData = {
|
||||
id: obj.id
|
||||
};
|
||||
@ -363,6 +364,30 @@ const onCurChange = async (params: number) => {
|
||||
getMonitorList();
|
||||
}
|
||||
};
|
||||
// 抽屉tab选择时
|
||||
const tabsSelect = val => {
|
||||
activeValue.value = val;
|
||||
if (val == "eng") {
|
||||
getengineering();
|
||||
} else if (val == "project") {
|
||||
getProject();
|
||||
}
|
||||
if (active.value === 0) {
|
||||
getAlarmList();
|
||||
} else {
|
||||
getMonitorList();
|
||||
}
|
||||
};
|
||||
// 获取项目信息
|
||||
const getProject = async () => {
|
||||
const res = await getEngineeringName();
|
||||
engList.value = [res.result];
|
||||
if (res.result) {
|
||||
searchSn.value = res.result.projectSn;
|
||||
}
|
||||
getEquipList();
|
||||
console.log(res);
|
||||
};
|
||||
const getengineering = async () => {
|
||||
// let newParams = JSON.parse(JSON.stringify(params));
|
||||
const res = await getRelevanceList();
|
||||
@ -375,7 +400,11 @@ const getengineering = async () => {
|
||||
};
|
||||
// 点击抽屉的工程名称更新页面
|
||||
const onUpdate = async row => {
|
||||
searchSn.value = row.engineeringSn;
|
||||
if (activeValue.value == "eng") {
|
||||
searchSn.value = row.engineeringSn;
|
||||
} else if (activeValue.value == "project") {
|
||||
searchSn.value = row.projectSn;
|
||||
}
|
||||
getEquipList();
|
||||
if (active.value === 0) {
|
||||
getAlarmList();
|
||||
@ -393,6 +422,7 @@ watch(
|
||||
} else {
|
||||
getMonitorList();
|
||||
}
|
||||
searchForm.value.timeRange = [];
|
||||
}
|
||||
);
|
||||
onMounted(async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user