This commit is contained in:
caoqianming 2022-10-27 14:09:01 +08:00
commit 97f58d2ee4
6 changed files with 11380 additions and 39 deletions

View File

@ -7,8 +7,13 @@ VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
# 接口地址
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
#VUE_APP_WS_API = 'ws://localhost:8000'
<<<<<<< HEAD
#VUE_APP_API_BASEURL = http://222.222.144.147:6013/api
VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
=======
VUE_APP_API_BASEURL = http://222.222.144.147:6013/api
#VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
>>>>>>> 4322fb11086b4b90803c346a57bc2007dd984e5b
#VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
#VUE_APP_BASEURL = http://127.0.0.1:8000

View File

@ -76,7 +76,7 @@ const routes = [
"path": "/ecm",
"meta": {
"title": "事件",
"icon": "el-icon-alarm-clock",
"icon": "el-icon-camera-filled",
"type": "menu",
"perms": ["ecm"]
},
@ -150,7 +150,7 @@ const routes = [
"name": "opm",
"path": "/opm",
"meta": {
"title": "作业",
"title": "风控",
"icon": "el-icon-list",
"type": "menu",
"perms": ["opm"]
@ -711,7 +711,7 @@ const routes = [
"path": "/ops",
"meta": {
"title": "运维",
"icon": "el-icon-wallet-filled",
"icon": "el-icon-briefcase",
"type": "menu",
"perms": ["ops"]
},

11301
src/utils/flv.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,10 @@
<template>
<div style="height: 100%;width: 100%;">
<video id="videoElement" muted="muted" style="object-fit:fill"></video>
<div class="video-container">
<video name="videoElement" class="centeredVideo" controls autoplay>
Your browser is too old which doesn't support HTML5 video.
</video>
</div>
</div>
</template>
<script>
@ -13,6 +17,7 @@ export default {
},
data() {
return {
Player: null,
flvPlayer: null,
params: {
json: {
@ -29,7 +34,8 @@ export default {
created() {
const scriptInfo = document.createElement("script");
scriptInfo.setAttribute("data-callType", "callScript");
scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
// scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
scriptInfo.src = "../../utils/flv.js";
document.head.appendChild(scriptInfo);
},
mounted() {
@ -37,32 +43,63 @@ export default {
that.params.json.data.channelId = that.channelCode;
that.$API.am.video.item.req(that.params).then((res) => {
that.url = res.url;
let URLS = res.url.replace('192.168.10.253',sysConfig.VUE_APP_VIDEOHOST);
debugger;
console.log(URLS);
if (flvjs.isSupported()) {
debugger;
console.log(sysConfig.VUE_APP_VIDEOHOST);
debugger;
let videoElement = document.getElementById("videoElement");
let URLS = res.url.replace('192.168.10.253',sysConfig.VUE_APP_VIDEOHOST);
debugger;
console.log(URLS)
that.flvPlayer = flvjs.createPlayer({
type: "flv",
url: URLS,
});
that.flvPlayer.attachMediaElement(videoElement);
that.flvPlayer.load();
that.flvPlayer.play();
var mediaDataSource = {
type: 'flv',
hasAudio:false,
hasVideo:true,
isLive:false,
withCredentials:false,
url:URLS
};
that.flv_load(mediaDataSource);
}
});
},
methods:{
flv_load(mediaDataSource) {
debugger;
let that = this;
var element = document.getElementsByName('videoElement')[0];
if (that.player != null) {
that.player.unload();
that.player.detachMediaElement();
that.player.destroy();
that.player = null;
}
that.player = flvjs.createPlayer(mediaDataSource, {
enableWorker: false,
lazyLoadMaxDuration: 3 * 60,
seekType: 'range',
});
that.player.attachMediaElement(element);
that.player.load();
},
flv_start() {
that.player.play();
},
flv_pause() {
that.player.pause();
}
},
beforeUnmount(){
let that = this;
that.flvPlayer.pause();
that.flvPlayer.unload();
that.flvPlayer.detachMediaElement();
that.flvPlayer.destroy();
that.flvPlayer = null;
that.player.pause();
that.player.unload();
that.player.detachMediaElement();
that.player.destroy();
that.player = null;
},
};
</script>
<style>
.centeredVideo{
width: 100%;
height: 60vh;
}
</style>

View File

@ -70,7 +70,7 @@
type="index"
width="50"
></el-table-column> -->
<el-table-column label="许可证" prop="opls" width="160">
<el-table-column label="许可证" prop="opls" width="200" :show-overflow-tooltip="true" fixed="left">
<template #default="scope">
<el-tag
v-for="item in scope.row.cates_"
@ -84,26 +84,27 @@
label="作业简介"
prop="name"
width="200"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="作业状态" prop="state">
<template #default="scope">{{
stateoptions[scope.row.state]
}}</template>
</el-table-column>
<el-table-column label="生产状态" prop="state_work"></el-table-column>
<el-table-column label="作业区域"
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
<el-table-column label="作业区域" width="100"
><template #default="scope">
{{ scope.row.area_.name }}
</template>
</el-table-column>
<el-table-column label="预计开始" prop="start_time"></el-table-column>
<el-table-column label="预计结束" prop="end_time"></el-table-column>
<el-table-column label="属地部门" prop="dept_ter"
<el-table-column label="预计开始" prop="start_time" width="150"></el-table-column>
<el-table-column label="预计结束" prop="end_time" width="150"></el-table-column>
<el-table-column label="属地部门" prop="dept_ter" width="100"
><template #default="scope">
{{ scope.row.dept_ter_.name }}
</template></el-table-column
>
<el-table-column label="业务部门" prop="dept_bus"
<el-table-column label="业务部门" prop="dept_bus" width="100"
><template #default="scope">
{{ scope.row.dept_bus_.name }}
</template></el-table-column
@ -113,8 +114,7 @@
{{ scope.row.create_by_.name }}
</template></el-table-column
>
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180">
<el-table-column label="操作" fixed="right" align="left" width="180">
<template #default="scope">
<el-button
link

View File

@ -60,7 +60,7 @@
</template>
</el-table-column>
<el-table-column label="预计开始" prop="start_time" width="150"></el-table-column>
<el-table-column label="作业部门" prop="dept_do"><template #default="scope">
<el-table-column label="作业部门" prop="dept_do" width="150" :show-overflow-tooltip="true"><template #default="scope">
{{ scope.row.dept_do_.name }}
</template></el-table-column>
<el-table-column label="作业负责人" prop="charger"><template #default="scope">
@ -70,15 +70,13 @@
{{ scope.row.monitor_.name }}
</template></el-table-column>
<el-table-column label="操作" fixed="right" width="80">
<el-table-column label="操作" fixed="right" width="100">
<template #default="scope">
<el-button-group>
<el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
<el-button link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
</el-button>
<el-button v-if="operationObj.state === 10" text type="warning" size="small" v-auth="'opl.update'"
<el-button v-if="operationObj.state === 10" link type="warning" size="small" v-auth="'opl.update'"
@click="table_edit(scope.row, scope.$index)">编辑
</el-button>
</el-button-group>
</template>
</el-table-column>
</scTable>