塔吊、起重机 视频配置通过接口获取;质量安全添加已撤销状态

This commit is contained in:
jiayu 2024-11-09 15:40:15 +08:00
parent 19d5f29f64
commit 4d31f8b5b0
11 changed files with 141 additions and 51 deletions

View File

@ -25,7 +25,9 @@ export const getAlarmTypeApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/lifterAlarm/queryAlarmsDistinguishedNumberByAlarmType`, params); return http.post(BASEURL + `/xmgl/lifterAlarm/queryAlarmsDistinguishedNumberByAlarmType`, params);
}; };
export const getSelectLifterBySnApi = (params: {}) => {
return http.post(BASEURL + `xmgl/lifter/selectLifterBySn`, params);
};
// 右中下数据 // 右中下数据
export const getNewestLifterApi = (params: {}) => { export const getNewestLifterApi = (params: {}) => {

View File

@ -30,6 +30,9 @@ export const getRelatedInfoApi = (params: {}) => {
return http.get(BASEURL + `/xmgl/tower/getRelatedInfo`, params); return http.get(BASEURL + `/xmgl/tower/getRelatedInfo`, params);
}; };
export const getSelectTowerBySnApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/tower/selectTowerBySn`, params);
};
// 右下-实时数据 // 右下-实时数据
export const getNewestDataApi = (params: {}) => { export const getNewestDataApi = (params: {}) => {

View File

@ -12,7 +12,7 @@
<iframe <iframe
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
id="iframeDom" id="iframeDom"
src="https://zm.zhgdyun.com:6080/#/login?projectId=2" src="http://121.37.106.37:9812/#/login?projectId=2"
allowfullscreen allowfullscreen
frameborder="0" frameborder="0"
></iframe> ></iframe>

View File

@ -12,12 +12,19 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Ref } from "vue"; import { ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Ref, defineProps } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import { getLifterQueryByIdApi } from "@/api/modules/elevator"; import { getLifterQueryByIdApi } from "@/api/modules/elevator";
import { getUseProjectVideoConfigApi } from "@/api/modules/tower"; import { getUseProjectVideoConfigApi } from "@/api/modules/tower";
import mitts from "@/utils/bus"; // import mitts from "@/utils/bus"; //
const props = defineProps({
videoObj: {
type: Object
}
});
let shipinList = ref([] as any); let shipinList = ref([] as any);
const store = GlobalStore(); const store = GlobalStore();
const playWndBox = ref(null); const playWndBox = ref(null);
@ -36,10 +43,16 @@ let cameraIndexCode = ref<Array<string>>([]);
// layout: "1x1" //16 // layout: "1x1" //16
// }); // });
let objData = ref({ let objData = ref({
appkey: "24017757", //appkey // appkey: "24017757", //appkey
ip: "182.101.141.23", //ip // ip: "182.101.141.23", //ip
secret: "VJz0FbzmE6drPQ7egsBi", //secret // secret: "VJz0FbzmE6drPQ7egsBi", //secret
port: 18443, // port: 18443,
// playMode: 0, // 0 1
// layout: "1x1" //16
appkey: "25323788",
ip: "222.80.185.228",
secret: "JCBkUhwcXnaGJoTc1ikn",
port: 1443,
playMode: 0, // 0 1 playMode: 0, // 0 1
layout: "1x1" //16 layout: "1x1" //16
}); });
@ -70,6 +83,17 @@ const gerEletorUserVideo = async () => {
await getTowerDetail(); await getTowerDetail();
}; };
onMounted(async () => { onMounted(async () => {
const obj = props.videoObj || null;
if (obj) {
objData.value = {
appkey: obj.appId,
ip: obj.account,
secret: obj.appSecret,
port: Number(obj.password),
playMode: 0, // 0 1
layout: "1x1" //16
};
}
mitts.on("elevaTorSelectId", e => { mitts.on("elevaTorSelectId", e => {
eletorSelectId.value = e; eletorSelectId.value = e;
gerEletorUserVideo(); gerEletorUserVideo();

View File

@ -169,7 +169,7 @@ onMounted(() => {
background-size: 100% 100%; background-size: 100% 100%;
color: #fff; color: #fff;
font-size: calc(100vw * 12 / 1920); font-size: calc(100vw * 12 / 1920);
position: relative;
.menStyle { .menStyle {
margin-top: 3%; margin-top: 3%;
margin-left: 6%; margin-left: 6%;
@ -195,11 +195,13 @@ onMounted(() => {
} }
.num { .num {
position: absolute; position: absolute;
left: 11%; // left: 11%;
right: 4%;
} }
.numMax { .numMax {
position: absolute; position: absolute;
left: 24%; // left: 24%;
right: 4%;
} }
.num1 { .num1 {
font-size: calc(100vw * 26 / 1920); font-size: calc(100vw * 26 / 1920);

View File

@ -40,7 +40,7 @@
</div> </div>
<div class="rightVideo"> <div class="rightVideo">
<div class="video"> <div class="video">
<Monitor></Monitor> <Monitor :videoObj="videoObj"></Monitor>
</div> </div>
<div class="devInfo"> <div class="devInfo">
<div class="leftInfo"> <div class="leftInfo">
@ -56,8 +56,8 @@
</div> </div>
<div class="rightInfo"> <div class="rightInfo">
<div class="titleStatus"> <div class="titleStatus">
<span style="color:#fff;cursor: pointer" v-if="isShow==false" @click="infoBtn">司机信息</span> <span style="color: #fff; cursor: pointer" v-if="isShow == false" @click="infoBtn">司机信息</span>
<span style="color:#ccc;cursor: pointer" v-else @click="infoBtn">司机信息</span> <span style="color: #ccc; cursor: pointer" v-else @click="infoBtn">司机信息</span>
<span <span
><img style="margin-left: 4%; width: 6%" src="@/assets/images/towerCraneMonitoring/setUp.png" alt="" /> ><img style="margin-left: 4%; width: 6%" src="@/assets/images/towerCraneMonitoring/setUp.png" alt="" />
</span> </span>
@ -201,10 +201,11 @@ import {
getLifterListApi, getLifterListApi,
getNewestLifterApi, getNewestLifterApi,
getQueryTodayOperatingApi, getQueryTodayOperatingApi,
getSelectLifterBySnApi,
getRelatedInfoApi, getRelatedInfoApi,
getLifterQueryByIdApi getLifterQueryByIdApi
} from "@/api/modules/elevator"; } from "@/api/modules/elevator";
import { ref, reactive, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
const store = GlobalStore(); const store = GlobalStore();
const lifeValue = ref("" as any); const lifeValue = ref("" as any);
@ -212,16 +213,18 @@ const noiseList = ref([] as any);
let lifterDevSn = ref("" as any); let lifterDevSn = ref("" as any);
let isShowTime = ref(true); // let isShowTime = ref(true); //
let isShow = ref(false); // let isShow = ref(false); //
const videoObj = ref(null as any);
// //
const infoBtn=()=>{ const infoBtn = () => {
isShowTime.value=true isShowTime.value = true;
isShow.value=false isShow.value = false;
} };
// //
const deviceInf = () => { const deviceInf = () => {
isShow.value=true isShow.value = true;
isShowTime.value=false isShowTime.value = false;
}; };
// //
function checkItem(val: any) { function checkItem(val: any) {
@ -242,14 +245,14 @@ function checkItem(val: any) {
const towerDetail = ref({} as any); const towerDetail = ref({} as any);
const getTowerData = async (data: any) => { const getTowerData = async (data: any) => {
console.log("接收设备信息desn", data); console.log("接收设备信息desn", data);
if (!data) return;
const res = await getLifterQueryByIdApi({ const res = await getLifterQueryByIdApi({
id: data id: data
}); });
if (res.result) { if (res.result) {
towerDetail.value = res.result; towerDetail.value = res.result;
console.log("获取设备信息数据res.result", towerDetail.vaule); console.log("获取设备信息数据res.result", towerDetail.value);
console.log("获取设备信息取值", towerDetail.valuedevName); console.log("获取设备信息取值", towerDetail.value);
} }
}; };
// //
@ -259,13 +262,14 @@ const getLifterList = async () => {
}); });
if (res.result) { if (res.result) {
noiseList.value = res.result; noiseList.value = res.result;
lifeValue.value = res.result[0].id; lifeValue.value = res.result[0]?.id;
lifterDevSn.value = res.result[0].devSn; lifterDevSn.value = res.result[0]?.devSn;
} }
await getLifterPageData();
await getLifterData(); await getLifterData();
await getSelectTower(); await getSelectTower();
await getDriverInfoList(lifterDevSn.value); await getDriverInfoList(lifterDevSn.value);
getTowerData(lifeValue.value); getTowerData(lifeValue.value);
}; };
// //
@ -280,6 +284,19 @@ const getLifterData = async () => {
console.log("获取升降机实时数据", elevatorList.value); console.log("获取升降机实时数据", elevatorList.value);
}; };
//
const getLifterPageData = () => {
let data = {
devSn: lifterDevSn.value
};
if (!lifterDevSn.value) return;
getSelectLifterBySnApi(data).then(res => {
if (res.result) {
videoObj.value = res.result?.videoList[0] || null;
}
});
};
// //
let lifeList = ref({} as any); let lifeList = ref({} as any);
const getSelectTower = async () => { const getSelectTower = async () => {
@ -297,7 +314,7 @@ const getSelectTower = async () => {
let driverInfo = ref([] as any); let driverInfo = ref([] as any);
const getDriverInfoList = async (val: any) => { const getDriverInfoList = async (val: any) => {
console.log("司机信息接收的devSn", val); console.log("司机信息接收的devSn", val);
if (!val) return;
const res = await getRelatedInfoApi({ const res = await getRelatedInfoApi({
devSn: val devSn: val
}); });

View File

@ -50,7 +50,8 @@ let rectification = ref([
{ id: 2, name: "待整改", color: "#698ed2" }, { id: 2, name: "待整改", color: "#698ed2" },
{ id: 3, name: "待复查", color: "#EEA959" }, { id: 3, name: "待复查", color: "#EEA959" },
{ id: 4, name: "待核验", color: "#a1accb" }, { id: 4, name: "待核验", color: "#a1accb" },
{ id: 5, name: "合格", color: "#82FBEA" } { id: 5, name: "合格", color: "#82FBEA" },
{ id: 6, name: "已撤销", color: "#a1accb" }
]); ]);
let list = ref([]); let list = ref([]);

View File

@ -50,7 +50,8 @@ let rectification = ref([
{ id: 2, name: "待整改", color: "#698ed2" }, { id: 2, name: "待整改", color: "#698ed2" },
{ id: 3, name: "待复查", color: "#EEA959" }, { id: 3, name: "待复查", color: "#EEA959" },
{ id: 4, name: "合格", color: "#82FBEA" }, { id: 4, name: "合格", color: "#82FBEA" },
{ id: 5, name: "不合格", color: "#a1accb" } { id: 5, name: "不合格", color: "#a1accb" },
{ id: 6, name: "已撤销", color: "#a1accb" }
]); ]);
let list = ref(["", "", "", "", "", "", "", "", "", ""]); let list = ref(["", "", "", "", "", "", "", "", "", ""]);

View File

@ -50,7 +50,8 @@ let rectification = ref([
{ id: 2, name: "待整改", color: "#698ed2" }, { id: 2, name: "待整改", color: "#698ed2" },
{ id: 3, name: "待复查", color: "#EEA959" }, { id: 3, name: "待复查", color: "#EEA959" },
{ id: 4, name: "待核验", color: "#a1accb" }, { id: 4, name: "待核验", color: "#a1accb" },
{ id: 5, name: "合格", color: "#82FBEA" } { id: 5, name: "合格", color: "#82FBEA" },
{ id: 6, name: "已撤销", color: "#a1accb" }
]); ]);
let list = ref([]); let list = ref([]);

View File

@ -16,7 +16,7 @@
<script setup lang="ts"> <script setup lang="ts">
import ysyPlayAndPlayback from "@/components/ysyPlayAndPlayback.vue"; import ysyPlayAndPlayback from "@/components/ysyPlayAndPlayback.vue";
import { ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Ref } from "vue"; import { ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Ref, defineProps } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import { getQueryByIdApi, getUseProjectVideoConfigApi } from "@/api/modules/tower"; import { getQueryByIdApi, getUseProjectVideoConfigApi } from "@/api/modules/tower";
@ -24,6 +24,12 @@ import mitts from "@/utils/bus"; //兄弟组件传值
let videoType = ref("") as any; let videoType = ref("") as any;
let ysyParams = ref({} as any); let ysyParams = ref({} as any);
const props = defineProps({
videoObj: {
type: Object
}
});
let shipinList = ref([] as any); let shipinList = ref([] as any);
const store = GlobalStore(); const store = GlobalStore();
const playWndBox = ref(null); const playWndBox = ref(null);
@ -43,10 +49,16 @@ let cameraIndexCode = ref<Array<string>>([]);
// }); // });
let objData = ref({ let objData = ref({
appkey: "24017757", //appkey // appkey: "24017757", //appkey
ip: "182.101.141.23", //ip // ip: "182.101.141.23", //ip
secret: "VJz0FbzmE6drPQ7egsBi", //secret // secret: "VJz0FbzmE6drPQ7egsBi", //secret
port: 18443, // port: 18443,
// playMode: 0, // 0 1
// layout: "1x1" //16
appkey: "25323788",
ip: "222.80.185.228",
secret: "JCBkUhwcXnaGJoTc1ikn",
port: 1443,
playMode: 0, // 0 1 playMode: 0, // 0 1
layout: "1x1" //16 layout: "1x1" //16
}); });
@ -90,6 +102,17 @@ let detailId = ref("1680765579331624962" as any);
// let serialNumberValue = ref("" as any); // let serialNumberValue = ref("" as any);
let showYsy = ref(false) as any; let showYsy = ref(false) as any;
onMounted(async () => { onMounted(async () => {
const obj = props.videoObj || null;
if (obj) {
objData.value = {
appkey: obj.appId,
ip: obj.account,
secret: obj.appSecret,
port: Number(obj.password),
playMode: 0, // 0 1
layout: "1x1" //16
};
}
// setTimeout(() => { // setTimeout(() => {
// gerUserVideo(); // gerUserVideo();
// }, 2000); // }, 2000);

View File

@ -80,7 +80,7 @@
</div> </div>
<div class="rightVideo"> <div class="rightVideo">
<div class="video"> <div class="video">
<Monitor></Monitor> <Monitor :videoObj="videoObj"></Monitor>
</div> </div>
<div class="devInfo"> <div class="devInfo">
<div class="leftInfo"> <div class="leftInfo">
@ -249,6 +249,7 @@ import {
getTowerNumAndAlarmApi, getTowerNumAndAlarmApi,
getNewestTowerApi, getNewestTowerApi,
getTowerCurrentCountApi, getTowerCurrentCountApi,
getSelectTowerBySnApi,
getRelatedInfoApi, getRelatedInfoApi,
getNewestDataApi getNewestDataApi
} from "@/api/modules/tower"; } from "@/api/modules/tower";
@ -260,6 +261,8 @@ let noiseList = ref([]);
let isShowTime = ref(true); // let isShowTime = ref(true); //
let isShow = ref(false); // let isShow = ref(false); //
const videoObj = ref(null as any);
// //
const infoBtn = () => { const infoBtn = () => {
isShowTime.value = true; isShowTime.value = true;
@ -353,6 +356,7 @@ const getTowerNumAndAlarmList = async () => {
console.log("塔吊option", noiseList.value); console.log("塔吊option", noiseList.value);
mitts.emit("selectId", towerValue.value); mitts.emit("selectId", towerValue.value);
await getTowerPageData();
await getTowerData(); await getTowerData();
await getSelectTower(); await getSelectTower();
await getDriverInfoList(); await getDriverInfoList();
@ -362,6 +366,18 @@ const getTowerNumAndAlarmList = async () => {
} }
}; };
//
const getTowerPageData = () => {
let data = {
devSn: towerDevSn.value
};
getSelectTowerBySnApi(data).then(res => {
if (res.result) {
videoObj.value = res.result?.videoList[0] || null;
}
});
};
// //
let towerList = ref([] as any); let towerList = ref([] as any);
const getSelectTower = async () => { const getSelectTower = async () => {
@ -387,21 +403,21 @@ const getDriverInfoList = async () => {
}); });
if (res.result) { if (res.result) {
console.log("获取司机信息", res.result); console.log("获取司机信息", res.result);
if(res.result.devWorker.workerList[0]){ if (res.result.devWorker.workerList[0]) {
driverInfo.value = res.result.devWorker.workerList[0]; driverInfo.value = res.result.devWorker.workerList[0];
}else{ } else {
driverInfo.value = { driverInfo.value = {
addTime: '', addTime: "",
age: '', age: "",
continuousWorkingTime: '', continuousWorkingTime: "",
continuousWorkingTimeName: '', continuousWorkingTimeName: "",
idCard: '', idCard: "",
imageUrl: '', imageUrl: "",
phoneNumber: '', phoneNumber: "",
sex: '', sex: "",
specialCertificateNumber: '', specialCertificateNumber: "",
workerName: '', workerName: ""
} };
} }
} }
}; };
@ -429,7 +445,7 @@ function driverDetail() {
onMounted(async () => { onMounted(async () => {
await getTowerNumAndAlarmList(); await getTowerNumAndAlarmList();
}); });
//
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
mitts.off("serialNumberId"); mitts.off("serialNumberId");
}); });