|
@@ -75,7 +75,6 @@
|
|
|
:gatestate1="frontGateStatus"
|
|
|
:gatestate2="midGateStatus"
|
|
|
:gatestate3="rearGateStatus"
|
|
|
- :cameralist="cameralist"
|
|
|
:height="height"
|
|
|
:doorcount="ndoorcount"
|
|
|
>
|
|
@@ -114,20 +113,7 @@
|
|
|
:nowfengji="qidongfengji"
|
|
|
></fanmainAnimate>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="flcard"
|
|
|
- v-if="this.TabCur == 'window' && this.nwindownum == 1"
|
|
|
- >
|
|
|
- <windowAnimate
|
|
|
- :windowAngle="windowAngle"
|
|
|
- :height="height"
|
|
|
- :windowcount="nwindownum"
|
|
|
- ></windowAnimate>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="flcard"
|
|
|
- v-if="this.TabCur == 'window' && this.nwindownum == 2"
|
|
|
- >
|
|
|
+ <div class="flcard" style="" v-if="this.TabCur == 'window'">
|
|
|
<windowAnimate
|
|
|
:windowAngle="windowAngle"
|
|
|
:windowAngle1="windowAngle1"
|
|
@@ -135,6 +121,21 @@
|
|
|
:windowcount="nwindownum"
|
|
|
></windowAnimate>
|
|
|
</div>
|
|
|
+ <div v-if="this.cameraList.length > 0">
|
|
|
+ <div class="flcard" v-for="(item, index) in cameraList" :key="index">
|
|
|
+ <video
|
|
|
+ style="margin-left: 20px"
|
|
|
+ id="myVideo"
|
|
|
+ controls
|
|
|
+ show-loading
|
|
|
+ autoplay
|
|
|
+ class="r-video"
|
|
|
+ :vslide-gesture="true"
|
|
|
+ :vslide-gesture-in-fullscreen="true"
|
|
|
+ :src="item.addr"
|
|
|
+ ></video>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="flcard">
|
|
|
<div
|
|
|
class="flex-container"
|
|
@@ -671,7 +672,8 @@ export default {
|
|
|
fan1State: "",
|
|
|
fan2State: "",
|
|
|
deviceid: "", //ID
|
|
|
- cameralist: [], //摄像数据
|
|
|
+ cameras: [], //摄像头数据
|
|
|
+ cameraList: [], //摄像数据
|
|
|
showColum: {},
|
|
|
deviceShowList: [],
|
|
|
};
|
|
@@ -693,7 +695,6 @@ export default {
|
|
|
created() {
|
|
|
this.getShowColum();
|
|
|
this.getDeviceInfo(this.itemId);
|
|
|
- this.getVideoUrlById(this.itemId);
|
|
|
},
|
|
|
mounted() {
|
|
|
this.startTimer();
|
|
@@ -789,6 +790,9 @@ export default {
|
|
|
var result = response.data.result.msgTxt[0].datalist[0];
|
|
|
let newData = { ...result, ...result.readData };
|
|
|
this.tableData = newData;
|
|
|
+ this.cameras = result.cameras;
|
|
|
+ this.getVideoUrlById(this.cameras);
|
|
|
+
|
|
|
if (this.tableData["frontGateClose"] == "1") {
|
|
|
this.tableData.frontGateOpen = "关闭";
|
|
|
} else if (this.tableData["frontGateClose"] == "0") {
|
|
@@ -845,16 +849,39 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//获取监控URL 通过ID获取
|
|
|
- getVideoUrlById(ID) {
|
|
|
- let IDString = String(ID); // 将 ID 转换为字符串
|
|
|
+ getVideoUrlById(data) {
|
|
|
+ this.cameraList = []; // 清空摄像头列表
|
|
|
+ data.forEach((item) => {
|
|
|
+ const isHttp =
|
|
|
+ item.addr?.startsWith("http://") || item.addr?.startsWith("https://");
|
|
|
+ if (isHttp) {
|
|
|
+ this.cameraList.push(item);
|
|
|
+ } else {
|
|
|
+ this.getVideoUrlByCode(item.addr);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getVideoUrlByCode(ID) {
|
|
|
new Promise((resolve, reject) => {
|
|
|
api
|
|
|
- .getCameraById({ deviceid: IDString })
|
|
|
+ .getCameraByCode({ cameraCode: ID, videoType: "" })
|
|
|
.then((response) => {
|
|
|
if (response.data.code == 200) {
|
|
|
- if (response.data.result.records.length > 0) {
|
|
|
- this.cameralist = response.data.result.records[0];
|
|
|
- }
|
|
|
+ const addr = response.data.result.url;
|
|
|
+ this.cameraList.push({
|
|
|
+ addr: addr,
|
|
|
+ cameraCode: ID,
|
|
|
+ });
|
|
|
+ uni.showModal({
|
|
|
+ title: "数据提示",
|
|
|
+ content: this.cameraList.addr
|
|
|
+ ? `共${
|
|
|
+ this.cameraList.cameraCode
|
|
|
+ }条数据:\n${this.cameraList.join("\n\n")}`
|
|
|
+ : "无数据",
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: "知道了",
|
|
|
+ });
|
|
|
} else {
|
|
|
resolve(response);
|
|
|
}
|