20230104
This commit is contained in:
parent
a9fd6f0f6d
commit
de50ca3d66
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"remainingRequest":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\视频边缘1215\\TransFlow\\src\\views\\index.vue","dependencies":[{"path":"D:\\视频边缘1215\\TransFlow\\src\\views\\index.vue","mtime":1672741609576},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1671074740928},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js","mtime":1671074747916}],"contextDependencies":[],"result":["import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=a83bd3b0&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=a83bd3b0&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a83bd3b0\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"D:\\\\视频边缘1215\\\\TransFlow\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('a83bd3b0')) {\n api.createRecord('a83bd3b0', component.options)\n } else {\n api.reload('a83bd3b0', component.options)\n }\n module.hot.accept(\"./index.vue?vue&type=template&id=a83bd3b0&scoped=true&\", function () {\n api.rerender('a83bd3b0', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/views/index.vue\"\nexport default component.exports"]}
|
{"remainingRequest":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\视频边缘1215\\TransFlow\\src\\views\\index.vue","dependencies":[{"path":"D:\\视频边缘1215\\TransFlow\\src\\views\\index.vue","mtime":1672799272806},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1671074740928},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js","mtime":1671074747916}],"contextDependencies":[],"result":["import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=a83bd3b0&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=a83bd3b0&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a83bd3b0\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"D:\\\\视频边缘1215\\\\TransFlow\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('a83bd3b0')) {\n api.createRecord('a83bd3b0', component.options)\n } else {\n api.reload('a83bd3b0', component.options)\n }\n module.hot.accept(\"./index.vue?vue&type=template&id=a83bd3b0&scoped=true&\", function () {\n api.rerender('a83bd3b0', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/views/index.vue\"\nexport default component.exports"]}
|
|
@ -1 +1 @@
|
||||||
{"remainingRequest":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\视频边缘1215\\TransFlow\\src\\views\\bounced\\analysisConfiguration.vue","dependencies":[{"path":"D:\\视频边缘1215\\TransFlow\\src\\views\\bounced\\analysisConfiguration.vue","mtime":1672741926736},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1671074740928},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js","mtime":1671074747916}],"contextDependencies":[],"result":["import { render, staticRenderFns } from \"./analysisConfiguration.vue?vue&type=template&id=fd3d0d46&scoped=true&\"\nimport script from \"./analysisConfiguration.vue?vue&type=script&lang=js&\"\nexport * from \"./analysisConfiguration.vue?vue&type=script&lang=js&\"\nimport style0 from \"./analysisConfiguration.vue?vue&type=style&index=0&id=fd3d0d46&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"fd3d0d46\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"D:\\\\视频边缘1215\\\\TransFlow\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('fd3d0d46')) {\n api.createRecord('fd3d0d46', component.options)\n } else {\n api.reload('fd3d0d46', component.options)\n }\n module.hot.accept(\"./analysisConfiguration.vue?vue&type=template&id=fd3d0d46&scoped=true&\", function () {\n api.rerender('fd3d0d46', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/views/bounced/analysisConfiguration.vue\"\nexport default component.exports"]}
|
{"remainingRequest":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\视频边缘1215\\TransFlow\\src\\views\\bounced\\analysisConfiguration.vue","dependencies":[{"path":"D:\\视频边缘1215\\TransFlow\\src\\views\\bounced\\analysisConfiguration.vue","mtime":1672809677780},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1671074740928},{"path":"D:\\视频边缘1215\\TransFlow\\node_modules\\vue-loader\\lib\\index.js","mtime":1671074747916}],"contextDependencies":[],"result":["import { render, staticRenderFns } from \"./analysisConfiguration.vue?vue&type=template&id=fd3d0d46&scoped=true&\"\nimport script from \"./analysisConfiguration.vue?vue&type=script&lang=js&\"\nexport * from \"./analysisConfiguration.vue?vue&type=script&lang=js&\"\nimport style0 from \"./analysisConfiguration.vue?vue&type=style&index=0&id=fd3d0d46&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"fd3d0d46\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"D:\\\\视频边缘1215\\\\TransFlow\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('fd3d0d46')) {\n api.createRecord('fd3d0d46', component.options)\n } else {\n api.reload('fd3d0d46', component.options)\n }\n module.hot.accept(\"./analysisConfiguration.vue?vue&type=template&id=fd3d0d46&scoped=true&\", function () {\n api.rerender('fd3d0d46', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/views/bounced/analysisConfiguration.vue\"\nexport default component.exports"]}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -118,37 +118,19 @@
|
||||||
};
|
};
|
||||||
//获取图像
|
//获取图像
|
||||||
function getDestination(string){
|
function getDestination(string){
|
||||||
// console.log("string",string)
|
|
||||||
// debugger
|
|
||||||
if(unity!=null){
|
if(unity!=null){
|
||||||
unity.SendMessage('AAA', 'SendImage', string);
|
unity.SendMessage('AAA', 'SendImage', string);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//获取数据
|
//获取数据
|
||||||
function getData(string){
|
function getData(string){
|
||||||
// console.log("string",string)
|
|
||||||
// debugger
|
|
||||||
if(unity!=null){
|
if(unity!=null){
|
||||||
unity.SendMessage('AAA', 'SendStream', string);
|
unity.SendMessage('AAA', 'SendStream', string);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// if(message.destinationName=='img0')
|
//获取图形数据
|
||||||
// {
|
function getfigureData(string){
|
||||||
// if(aaaaa!=null)
|
console.log("图形数据",string)
|
||||||
// {
|
|
||||||
// aaaaa.SendMessage('AAA', 'SendImage', message.payloadString);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if(message.destinationName=='stream0')
|
|
||||||
// {
|
|
||||||
// //原始数据
|
|
||||||
// if(aaaaa!=null)
|
|
||||||
// {
|
|
||||||
// aaaaa.SendMessage('AAA', 'SendStream', message.payloadString);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
|
||||||
|
|
|
@ -34,5 +34,6 @@ export const getDeleteShipjk = (params) => {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
//视频分析预览
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="width:100%;height:300px" >
|
<div style="width:100%;height:300px" >
|
||||||
<iframe id="mapModule" src="./VideoWeb/index.html" frameborder="0" style="width: 100%; height:100%;" ></iframe>
|
<iframe id="mapModuleTop" @load="load" src="./VideoWeb/index.html" frameborder="0" style="width: 100%; height:100%;" ></iframe>
|
||||||
<!-- <iframe src="./VideoWeb/index.html" style="height: 100%; width: 100%;border: none"
|
<!-- <iframe src="./VideoWeb/index.html" style="height: 100%; width: 100%;border: none"
|
||||||
ref="iframe"></iframe> -->
|
ref="iframe"></iframe> -->
|
||||||
</div>
|
</div>
|
||||||
|
@ -478,9 +478,40 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
// this.getDataByMqtt()
|
// this.getDataByMqtt()
|
||||||
// this.testMqtt()
|
// this.testMqtt()
|
||||||
|
// var iframe = document.getElementById("mapModule");
|
||||||
|
// iframe.onload = function () {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.testMqtt()
|
||||||
|
// }, 5000);
|
||||||
|
// };
|
||||||
|
// iframe.onload = () => {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.load()
|
||||||
|
// }, 5000);// 这样每次都会触发
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
load(){
|
||||||
|
console.log("1111")
|
||||||
|
var iframe = document.getElementById("mapModuleTop");
|
||||||
|
console.log("iframe",iframe)
|
||||||
|
// if (iframe.attachEvent) {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.testMqtt()
|
||||||
|
// }, 5000);
|
||||||
|
// }else{
|
||||||
|
// console.log("3333")
|
||||||
|
// }
|
||||||
|
iframe.onload = () => {
|
||||||
|
// setTimeout(() => {
|
||||||
|
this.testMqtt()
|
||||||
|
// }, 5000);
|
||||||
|
}
|
||||||
|
},
|
||||||
testMqtt() {
|
testMqtt() {
|
||||||
|
console.log("222")
|
||||||
this.getDataByMqtt()
|
this.getDataByMqtt()
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -330,7 +330,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 测试:mqtt测试
|
// 测试:mqtt测试
|
||||||
testMqtt() {
|
testMqtt() {
|
||||||
// this.getDataByMqtt()
|
this.getDataByMqtt()
|
||||||
// 小车订阅
|
// 小车订阅
|
||||||
// for (let key in this.carId) {
|
// for (let key in this.carId) {
|
||||||
// this.getDataByMqtt(
|
// this.getDataByMqtt(
|
||||||
|
@ -437,6 +437,9 @@ export default {
|
||||||
// console.log("[MQTT-TEST] 已连接的客户端ID: ", connect);
|
// console.log("[MQTT-TEST] 已连接的客户端ID: ", connect);
|
||||||
// 订阅
|
// 订阅
|
||||||
this.mqttClient.subscribe('img0', { qos: 0 });
|
this.mqttClient.subscribe('img0', { qos: 0 });
|
||||||
|
// this.client.connect('aaa', '111')
|
||||||
|
this.mqttClient.publish('aaa', '111');
|
||||||
|
// this.mqttClient.subscribe('msg_stream', { msg_flag: 0 });
|
||||||
this.mqttClient.subscribe('img1', { qos: 0 });
|
this.mqttClient.subscribe('img1', { qos: 0 });
|
||||||
this.mqttClient.subscribe('img2', { qos: 0 });
|
this.mqttClient.subscribe('img2', { qos: 0 });
|
||||||
this.mqttClient.subscribe('img3', { qos: 0 });
|
this.mqttClient.subscribe('img3', { qos: 0 });
|
||||||
|
@ -450,34 +453,10 @@ export default {
|
||||||
this.mqttClient.subscribe('stream5', { qos: 0 });
|
this.mqttClient.subscribe('stream5', { qos: 0 });
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 接收回调
|
// 接收回调
|
||||||
this.mqttClient.on("message", (topic, message, packet) => {
|
this.mqttClient.on("message", (topic, message, packet) => {
|
||||||
// debugger
|
|
||||||
// return
|
|
||||||
// console.log("[MQTT-TEST] 已连接的客户端ID: ", message);
|
|
||||||
|
|
||||||
// console.log(
|
|
||||||
// `[MQTT-TEST] 从主题 "${topic}" 收到的内容: ${message.toString()}`,
|
|
||||||
// new Date(),
|
|
||||||
// new Date().getMilliseconds()
|
|
||||||
// );
|
|
||||||
// 解析后端数据
|
|
||||||
// let dataReceived = JSON.parse(message.toString());
|
|
||||||
// console.log("[MQTT-TEST] 已连接的客户端ID: ",dataReceived);
|
|
||||||
// try{
|
|
||||||
// const utf8decoder = new TextDecoder()
|
|
||||||
// const u8arr = new Uint8Array(message)
|
|
||||||
// const temp = utf8decoder.decode(u8arr) // 将二进制数据转为字符串
|
|
||||||
// const msg = JSON.parse(temp) //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
|
||||||
// console.log("msg",msg) //msg为转换后的JSON数据
|
|
||||||
// this.imgUrl='data:image/png;base64,' + msg.pic;
|
|
||||||
// console.log("imageUrl",imageUrl)
|
|
||||||
// }catch{
|
|
||||||
// let imageType = 'arraybuffer';
|
|
||||||
// const blob = new Blob([message], { type: imageType })
|
|
||||||
// const imageUrl = (window.URL || window.webkitURL).createObjectURL(blob)
|
|
||||||
// console.log("imageUrl",imageUrl)
|
|
||||||
// }
|
|
||||||
if (topic.indexOf("img0") != -1) {
|
if (topic.indexOf("img0") != -1) {
|
||||||
try {
|
try {
|
||||||
const utf8decoder = new TextDecoder()
|
const utf8decoder = new TextDecoder()
|
||||||
|
@ -486,9 +465,9 @@ export default {
|
||||||
const msg = JSON.parse(temp) //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
const msg = JSON.parse(temp) //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
||||||
// debugger
|
// debugger
|
||||||
// console.log("msg", msg) //msg为转换后的JSON数据
|
// console.log("msg", msg) //msg为转换后的JSON数据
|
||||||
console.log("1111",document.getElementById("mapModule"))
|
// console.log("1111",document.getElementById("mapModule"))
|
||||||
document.getElementById("mapModule").contentWindow.getDestination(JSON.stringify(msg))
|
document.getElementById("mapModule").contentWindow.getDestination(JSON.stringify(msg))
|
||||||
this.imgUrl = 'data:image/png;base64,' + msg.pic;
|
// this.imgUrl = 'data:image/png;base64,' + msg.pic;
|
||||||
// console.log("imageUrl", imageUrl)
|
// console.log("imageUrl", imageUrl)
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -573,18 +552,10 @@ export default {
|
||||||
console.log("imageUrl", imageUrl)
|
console.log("imageUrl", imageUrl)
|
||||||
}
|
}
|
||||||
} else if (topic.indexOf("stream0") != -1) {
|
} else if (topic.indexOf("stream0") != -1) {
|
||||||
// console.log(
|
|
||||||
// `[MQTT-TEST] 从主题 "${topic}" 收到的内容: ${message.toString()}`,
|
|
||||||
// new Date(),
|
|
||||||
// new Date().getMilliseconds()
|
|
||||||
// );
|
|
||||||
const utf8decoder = new TextDecoder()
|
const utf8decoder = new TextDecoder()
|
||||||
const u8arr = new Uint8Array(message)
|
const u8arr = new Uint8Array(message)
|
||||||
const temp = utf8decoder.decode(u8arr) // 将二进制数据转为字符串
|
const temp = utf8decoder.decode(u8arr) // 将二进制数据转为字符串
|
||||||
const msg = JSON.parse(temp)
|
const msg = JSON.parse(temp)
|
||||||
// console.log("msg",msg)
|
|
||||||
// debugger
|
|
||||||
|
|
||||||
document.getElementById("mapModule").contentWindow.getData(JSON.stringify(msg))
|
document.getElementById("mapModule").contentWindow.getData(JSON.stringify(msg))
|
||||||
} else if (topic.indexOf("stream1") != -1) {
|
} else if (topic.indexOf("stream1") != -1) {
|
||||||
console.log(
|
console.log(
|
||||||
|
|
Loading…
Reference in New Issue