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

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);
};
export const getSelectLifterBySnApi = (params: {}) => {
return http.post(BASEURL + `xmgl/lifter/selectLifterBySn`, params);
};
// 右中下数据
export const getNewestLifterApi = (params: {}) => {

View File

@ -30,6 +30,9 @@ export const getRelatedInfoApi = (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: {}) => {

View File

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

View File

@ -12,12 +12,19 @@
</template>
<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 { GlobalStore } from "@/stores";
import { getLifterQueryByIdApi } from "@/api/modules/elevator";
import { getUseProjectVideoConfigApi } from "@/api/modules/tower";
import mitts from "@/utils/bus"; //
const props = defineProps({
videoObj: {
type: Object
}
});
let shipinList = ref([] as any);
const store = GlobalStore();
const playWndBox = ref(null);
@ -36,10 +43,16 @@ let cameraIndexCode = ref<Array<string>>([]);
// layout: "1x1" //16
// });
let objData = ref({
appkey: "24017757", //appkey
ip: "182.101.141.23", //ip
secret: "VJz0FbzmE6drPQ7egsBi", //secret
port: 18443,
// appkey: "24017757", //appkey
// ip: "182.101.141.23", //ip
// secret: "VJz0FbzmE6drPQ7egsBi", //secret
// port: 18443,
// playMode: 0, // 0 1
// layout: "1x1" //16
appkey: "25323788",
ip: "222.80.185.228",
secret: "JCBkUhwcXnaGJoTc1ikn",
port: 1443,
playMode: 0, // 0 1
layout: "1x1" //16
});
@ -70,6 +83,17 @@ const gerEletorUserVideo = async () => {
await getTowerDetail();
};
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 => {
eletorSelectId.value = e;
gerEletorUserVideo();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
<script setup lang="ts">
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 { GlobalStore } from "@/stores";
import { getQueryByIdApi, getUseProjectVideoConfigApi } from "@/api/modules/tower";
@ -24,6 +24,12 @@ import mitts from "@/utils/bus"; //兄弟组件传值
let videoType = ref("") as any;
let ysyParams = ref({} as any);
const props = defineProps({
videoObj: {
type: Object
}
});
let shipinList = ref([] as any);
const store = GlobalStore();
const playWndBox = ref(null);
@ -43,10 +49,16 @@ let cameraIndexCode = ref<Array<string>>([]);
// });
let objData = ref({
appkey: "24017757", //appkey
ip: "182.101.141.23", //ip
secret: "VJz0FbzmE6drPQ7egsBi", //secret
port: 18443,
// appkey: "24017757", //appkey
// ip: "182.101.141.23", //ip
// secret: "VJz0FbzmE6drPQ7egsBi", //secret
// port: 18443,
// playMode: 0, // 0 1
// layout: "1x1" //16
appkey: "25323788",
ip: "222.80.185.228",
secret: "JCBkUhwcXnaGJoTc1ikn",
port: 1443,
playMode: 0, // 0 1
layout: "1x1" //16
});
@ -90,6 +102,17 @@ let detailId = ref("1680765579331624962" as any);
// let serialNumberValue = ref("" as any);
let showYsy = ref(false) as any;
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(() => {
// gerUserVideo();
// }, 2000);

View File

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