pc-master #259

Merged
xiaomeng merged 4 commits from pc-master into portal 2025-07-02 06:25:51 +00:00
10 changed files with 290 additions and 57 deletions

View File

@ -31,6 +31,31 @@
/*滚动条边角*/ /*滚动条边角*/
} }
.amap-marker .p_title {
height: 44px;
background: rgba(1, 12, 28, 0.7);
border-radius: 22px;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 8px;
white-space: nowrap;
}
.amap-marker .p_title > img {
width: 30px;
height: 30px;
margin-right: 5px;
}
.amap-marker .p_title > span {
font-size: 18px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: #ffffff;
flex: 1;
}
.tips-model { .tips-model {
padding: 10px; padding: 10px;
color: #fff; color: #fff;
@ -2311,11 +2336,19 @@ textarea {
position: relative; position: relative;
} }
.realTime .page-content .realTime-bottom .left-view > div.center {
justify-content: center;
}
.realTime .page-content .realTime-bottom .left-view > div .video-js { .realTime .page-content .realTime-bottom .left-view > div .video-js {
width: calc(100% - 400px); width: calc(100% - 400px);
height: 100%; height: 100%;
} }
.realTime .page-content .realTime-bottom .left-view > div .video-js.w-100 {
width: 100%;
}
.realTime .page-content .realTime-bottom .left-view > div #video-js { .realTime .page-content .realTime-bottom .left-view > div #video-js {
position: absolute; position: absolute;
left: 0; left: 0;

View File

@ -33,6 +33,34 @@
} }
} }
.amap-marker{
.p_title {
// width:50px;
height: 44px;
background: rgba(1, 12, 28, 0.7);
border-radius:22px;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 8px;
// overflow: hidden;
white-space: nowrap;
>img {
width: 30px;
height: 30px;
margin-right: 5px;
}
>span {
font-size: 18px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: #ffffff;
flex: 1;
}
}
}
.tips-model { .tips-model {
padding: 10px; padding: 10px;
@ -2444,10 +2472,15 @@ textarea {
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
&.center{
justify-content: center;
}
.video-js { .video-js {
width: calc(100% - 400px); width: calc(100% - 400px);
height: 100%; height: 100%;
&.w-100{
width: 100%;
}
} }
#video-js { #video-js {

View File

@ -31,7 +31,8 @@ module.exports = {
roleRequired: "Role is required", roleRequired: "Role is required",
deviceRequired: "Please add at least one device", deviceRequired: "Please add at least one device",
passwordMismatch: "Passwords do not match", passwordMismatch: "Passwords do not match",
sortRequired: "Sort code is required" sortRequired: "Sort code is required",
fileName:'The file name cannot be empty',
}, },
placeholder: { placeholder: {
@ -54,7 +55,8 @@ module.exports = {
newPassword: "Enter new password", newPassword: "Enter new password",
confirmPassword: "Confirm password", confirmPassword: "Confirm password",
sortOrder: "Enter sort order", sortOrder: "Enter sort order",
role: "Select role" role: "Select role",
fileName:'Please enter the download file name.'
}, },
text: { text: {
sortOrder: "Sort Order", sortOrder: "Sort Order",

View File

@ -43,7 +43,8 @@ module.exports = {
oldPassword: "请输入原密码", oldPassword: "请输入原密码",
newPassword: "请输入新密码", newPassword: "请输入新密码",
confirmPassword: "请输入确认密码", confirmPassword: "请输入确认密码",
role: "请选择角色" role: "请选择角色",
fileName:'请输入下载文件名称'
}, },
// 各个消息提示 // 各个消息提示
@ -62,7 +63,8 @@ module.exports = {
roleRequired: "角色还未选择", roleRequired: "角色还未选择",
deviceRequired: "请添加一个设备", deviceRequired: "请添加一个设备",
passwordMismatch: "两次密码不一致", passwordMismatch: "两次密码不一致",
sortRequired: "排序还未填写" sortRequired: "排序还未填写",
fileName:'文件名称不能为空',
}, },
text: { text: {
sortOrder: "排序", sortOrder: "排序",

View File

@ -10,7 +10,7 @@
</div> </div>
<div class="flex-view"> <div class="flex-view">
<div class="manage-input w-180"> <div class="manage-input w-180">
<span class="input-title">{{$t('deviceManage.username')}}</span> <span class="input-title">{{$t('deviceManage.search.username')}}</span>
<input <input
class="search-input" class="search-input"
type="text" type="text"
@ -19,7 +19,7 @@
/> />
</div> </div>
<div class="manage-input w-180"> <div class="manage-input w-180">
<span class="input-title">{{$t('deviceManage.deviceCode')}}</span> <span class="input-title">{{$t('deviceManage.search.deviceCode')}}</span>
<input <input
class="search-input" class="search-input"
type="text" type="text"
@ -194,6 +194,14 @@
:placeholder="$t('placeholder.cameraChannelPlaceholder')" :placeholder="$t('placeholder.cameraChannelPlaceholder')"
/> />
</div> </div>
<div class="manage-input">
<div class="input-title">摄像头右侧控制面板(1为显示)</div>
<input
type="number"
v-model="nowData1.cameraName"
placeholder="1为显示其他不显示"
/>
</div>
<div class="manage-text"> <div class="manage-text">
{{$t('deviceManagement.dialogs.noteText')}} {{$t('deviceManagement.dialogs.noteText')}}
@ -229,9 +237,11 @@ export default {
addModel1: false, addModel1: false,
nowData1: { nowData1: {
deviceState: 0, deviceState: 0,
cameraName:1,
}, },
deviceType: "", deviceType: "",
}; };
}, },
computed:{ computed:{
@ -282,6 +292,7 @@ export default {
this.nowData1.deviceTypeName = e this.nowData1.deviceTypeName = e
this.deviceType = e; this.deviceType = e;
}, },
openRoleModel(deviceId) { openRoleModel(deviceId) {
this.loading = this.$loading({ this.loading = this.$loading({
lock: true, lock: true,
@ -308,7 +319,7 @@ export default {
openAddModel1() { openAddModel1() {
this.nowData1 = { this.nowData1 = {
deviceState: 0, deviceState: 0,
cameraName:1,
}; };
this.deviceType='' this.deviceType=''
this.addModel1 = true; this.addModel1 = true;
@ -326,6 +337,7 @@ export default {
this.$message.error(this.$t('message.deviceNameRequired')); this.$message.error(this.$t('message.deviceNameRequired'));
return; return;
} }
var data = { var data = {
...this.nowData1, ...this.nowData1,
stationName: this.nowData1.deviceTypeName, stationName: this.nowData1.deviceTypeName,

View File

@ -28,8 +28,8 @@
<div class="btn blue" @click="search"> <div class="btn blue" @click="search">
{{ $t('imageGallery.query') }} {{ $t('imageGallery.query') }}
</div> </div>
<div class="btn blue" @click="download"> <div class="btn blue" @click="downloadFile(0)">
{{ $t('imageGallery.downloadImages') }} {{ $t('imageGallery.download') }}
</div> </div>
<div class="btn blue" @click="openModel"> <div class="btn blue" @click="openModel">
{{ $t('imageGallery.dataStatistics') }} {{ $t('imageGallery.dataStatistics') }}
@ -82,7 +82,7 @@
<div class="btn blue" @click="search1"> <div class="btn blue" @click="search1">
{{ $t('imageGallery.query') }} {{ $t('imageGallery.query') }}
</div> </div>
<div class="btn blue" @click="download1"> <div class="btn blue" @click="downloadFile(1)">
{{ $t('imageGallery.download') }} {{ $t('imageGallery.download') }}
</div> </div>
</div> </div>
@ -105,6 +105,23 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="" class="vrcode-model confirm-psw" top="30vh" :close-on-click-modal="false" :append-to-body="true" :visible.sync="warnModel"
width="700px">
<div class="vrcode-model-title vrcode-model-title-282">{{ $t('placeholder.fileName') }}</div>
<div class="warning-model" style="padding: 0 30px;">
<div class="flex-view border-none">
<div class="input-main">
<div>{{ $t('placeholder.fileName') }}</div>
<input type="text" v-model="fileName">
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="modelClose">{{$t('index.cancel1')}}</el-button>
<el-button type="success" @click="modelConfirm">{{$t('index.confirm1')}}</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -131,6 +148,10 @@ export default {
pageSize1: 10, pageSize1: 10,
tableList1: [], tableList1: [],
total1: 0, total1: 0,
warnModel:false,//
downType:0,
fileName:'',
} }
}, },
watch: { watch: {
@ -216,13 +237,36 @@ export default {
this.getData() this.getData()
}, 0); }, 0);
}, },
modelClose(){
this.downType=0
this.warnModel=false
},
modelConfirm(){
if(this.downType==0){
this.download()
}else{
this.download1()
}
},
downloadFile(type){
var store = this.$store.state
var index = store.equipmentIndex;
this.downType=type
this.fileName=store.equipmentList[index - 1].deviceTypeName
this.warnModel=true
},
download1() { download1() {
if(!this.fileName){
this.$message.warning( this.$t('message.fileName'));
return
}
this.loading = this.$loading({ this.loading = this.$loading({
lock: true, lock: true,
text: this.$t('message.loading'), text: this.$t('message.loading'),
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}); });
var store = this.$store.state var store = this.$store.state
var index = store.equipmentIndex; var index = store.equipmentIndex;
var data = { var data = {
@ -234,6 +278,7 @@ export default {
isEquipment: store.equipmentList[index - 1].deviceName == 30 ? 1 : 0 isEquipment: store.equipmentList[index - 1].deviceName == 30 ? 1 : 0
} }
this.api.selFsAvgdatadownload(data).then(res => { this.api.selFsAvgdatadownload(data).then(res => {
this.warnModel=false
// blob // blob
this.loading.close() this.loading.close()
const blob = new Blob([res.data], { type: 'text/csv' }); const blob = new Blob([res.data], { type: 'text/csv' });
@ -244,7 +289,7 @@ export default {
link.href = url; link.href = url;
// //
link.setAttribute('download', 'filename.csv'); link.setAttribute('download', `${this.fileName}.csv`);
// //
document.body.appendChild(link); document.body.appendChild(link);
@ -256,12 +301,17 @@ export default {
}) })
}, },
download() { download() {
if(!this.fileName){
this.$message.warning( this.$t('message.fileName'));
return
}
this.loading = this.$loading({ this.loading = this.$loading({
lock: true, lock: true,
text: this.$t('message.loading'), text: this.$t('message.loading'),
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}); });
var store = this.$store.state var store = this.$store.state
var index = store.equipmentIndex; var index = store.equipmentIndex;
var data = { var data = {
@ -273,6 +323,7 @@ export default {
isEquipment: store.equipmentList[index - 1].deviceName == 30 ? 1 : 0 isEquipment: store.equipmentList[index - 1].deviceName == 30 ? 1 : 0
} }
this.api.loadHistorydata(data).then(res => { this.api.loadHistorydata(data).then(res => {
this.warnModel=false
// blob // blob
this.loading.close() this.loading.close()
const blob = new Blob([res.data], { type: 'text/csv' }); const blob = new Blob([res.data], { type: 'text/csv' });
@ -283,7 +334,7 @@ export default {
link.href = url; link.href = url;
// //
link.setAttribute('download', 'filename.csv'); link.setAttribute('download', `${this.fileName}.csv`);
// //
document.body.appendChild(link); document.body.appendChild(link);

View File

@ -1378,6 +1378,7 @@ mapInit(){
// //
const iconUrl = require("@/assets/img/axis1.png"); const iconUrl = require("@/assets/img/axis1.png");
const iconUrl1 = require("@/assets/img/wenshi.png");
const icon = new AMap.Icon({ const icon = new AMap.Icon({
image: iconUrl, image: iconUrl,
size: new AMap.Size(70, 86), // size: new AMap.Size(70, 86), //
@ -1385,17 +1386,49 @@ size: new AMap.Size(70, 86), // 原始大小,如果不是原始大小,可以
}); });
this.dataList.forEach((el,index)=>{ this.dataList.forEach((el,index)=>{
if(el.xaxis&&el.yaxis){ if(el.xaxis&&el.yaxis){
// const marker = new AMap.Marker({
// position:new AMap.LngLat(el.xaxis,el.yaxis),
// icon: icon,
// title: "",
// offset: new AMap.Pixel(-17.5, -40), // icon [center bottom]
// });
// marker.on("click", function (e) {
// that.$router.push({ path: "/largeScreen1" });
// });
// const text = new AMap.Text({
// text: el.greenhouseName, //
// anchor: 'bottom', // bottom
// offset: new AMap.Pixel(-17.5,-70), //
// style: {
// 'font-size': '14px',
// 'background-color': '#fff',
// 'padding': '4px 8px',
// 'border-radius': '4px',
// // 'border': '1px solid #ddd',
// },
// position:new AMap.LngLat(el.xaxis,el.yaxis),
// });
// text.on("click", function (e) {
// that.$router.push({ path: "/largeScreen1" });
// });
var content=` <div class="p_title">
<img src="${iconUrl1}" alt="" />
<span>${el.greenhouseName}</span>
</div>`
const marker = new AMap.Marker({ const marker = new AMap.Marker({
position:new AMap.LngLat(el.xaxis,el.yaxis), position: new AMap.LngLat(el.xaxis,el.yaxis), //
icon: icon, content: content, // HTML
title: "上海前卫柑桔有限公司", offset: new AMap.Pixel(-30,-22), // 使 div
offset: new AMap.Pixel(-17.5, -40), // icon [center bottom]
}); });
marker.on("click", function (e) { marker.on("click", function (e) {
that.$router.push({ path: "/largeScreen1" }); that.$router.push({ path: "/largeScreen1" });
}); });
map.add(marker); map.add(marker);
// map.add(text);
} }
}) })
@ -2500,9 +2533,9 @@ window.open("http://localhost:8080/");
padding-bottom: 0.1rem; padding-bottom: 0.1rem;
>img { >img {
width: 0.62rem; width: 0.68rem;
height: 0.68rem; height: 0.68rem;
margin: 0 0.16rem 0 0.13rem; margin: 0 0.1rem 0 0.13rem;
} }
.item_child { .item_child {

View File

@ -12,12 +12,16 @@
</div> </div>
<largeNav :active="1"></largeNav> <largeNav :active="1"></largeNav>
<div class="content scroll"> <div class="content scroll">
<div <div
class="video monitor" class="video monitor"
v-for="(item, index) in videoList" v-for="(item, index) in videoList"
:key="index" :key="index"
:id="'monitor' + index" :id="'monitor' + index"
> >
<div class="header">
{{item.name}}
</div>
<div <div
ref="videoPlayer" ref="videoPlayer"
class="video-js" class="video-js"
@ -65,20 +69,22 @@ export default {
this.getTime(); this.getTime();
this.typeList = this.$store.state.typeList; this.typeList = this.$store.state.typeList;
this.list1 = [ this.list1 = [
{ cameraid: "FT5712546", channelid: 1, player: null }, { cameraid: "FT5712546", channelid: 1, name:'二期 3#温室西面内部', player: null },
{ cameraid: "FT5712546", channelid: 2, player: null }, { cameraid: "FT5712546", channelid: 2, name:'二期 1#温室东面内部', player: null },
{ cameraid: "FT5712546", channelid: 3, player: null }, { cameraid: "FT5712546", channelid: 3, name:'二期 2#温室东面内部', player: null },
{ cameraid: "FT5712546", channelid: 4, player: null }, { cameraid: "FT5712546", channelid: 4, name:'二期 5#温室东面内部', player: null },
{ cameraid: "FT5712546", channelid: 5, player: null }, { cameraid: "FT5712546", channelid: 5, name:'二期 2#温室西面内部', player: null },
{ cameraid: "FT5712546", channelid: 6, player: null }, { cameraid: "FT5712546", channelid: 6, name:'二期 1#温室球机', player: null },
{ cameraid: "FT5712546", channelid: 7, player: null }, { cameraid: "FT5712546", channelid: 7, name:'二期 3#温室东面南侧内部', player: null },
{ cameraid: "FT5712546", channelid: 8, player: null }, { cameraid: "FT5712546", channelid: 8, name:'二期 1#温室西面内部', player: null },
{ cameraid: "FT5712546", channelid: 9, player: null }, { cameraid: "FT5712546", channelid: 9, name:'二期 4#温室东面内部', player: null },
{ cameraid: "FT5712546", channelid: 10, player: null }, { cameraid: "FT5712546", channelid: 10,name:'二期 5#温室西面内部', player: null },
{ cameraid: "FT5712546", channelid: 11, player: null }, { cameraid: "FT5712546", channelid: 11,name:'二期 4#温室球机', player: null },
{ cameraid: "FT5712546", channelid: 12, player: null }, { cameraid: "FT5712546", channelid: 12,name:'二期 5#温室球机', player: null },
{ cameraid: "FT5712546", channelid: 13, player: null }, { cameraid: "FT5712546", channelid: 13,name:'二期 3#温室东面北侧内部', player: null },
{ cameraid: "FT5712546", channelid: 14, player: null }, { cameraid: "FT5712546", channelid: 14,name:'二期 2#温室球机', player: null },
{ cameraid: "FT5712546", channelid: 15,name:'二期 4#温室西面内部', player: null },
{ cameraid: "FT5712546", channelid: 16,name:'二期 3#温室球机', player: null },
]; ];
this.list2 = [ this.list2 = [
@ -202,6 +208,16 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss">
.about .header-controls{
// .theme-icon-item{
// display: none!important;
// }
display: none!important;
//
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.about { .about {
width: 100%; width: 100%;
@ -313,6 +329,15 @@ export default {
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
grid-row-gap: 0.2rem; // grid-row-gap: 0.2rem; //
grid-column-gap: 0.2rem; // grid-column-gap: 0.2rem; //
.header{
height: 32px;
width: 100%;
background: #000;
padding-left: 1%;
color: #fff;
display: flex;
align-items: center;
}
.video { .video {
height: calc((100vh - 3.3rem) / 3); height: calc((100vh - 3.3rem) / 3);
.video-js { .video-js {

View File

@ -784,6 +784,7 @@ mapInit(){
// //
const iconUrl = require("@/assets/img/axis1.png"); const iconUrl = require("@/assets/img/axis1.png");
const iconUrl1 = require("@/assets/img/wenshi.png");
const icon = new AMap.Icon({ const icon = new AMap.Icon({
image: iconUrl, image: iconUrl,
size: new AMap.Size(70, 86), // size: new AMap.Size(70, 86), //
@ -792,17 +793,31 @@ size: new AMap.Size(70, 86), // 原始大小,如果不是原始大小,可以
this.dataList.forEach((el,index)=>{ this.dataList.forEach((el,index)=>{
if(el.xaxis&&el.yaxis){ if(el.xaxis&&el.yaxis){
var marker = new AMap.Marker({ // var marker = new AMap.Marker({
position:new AMap.LngLat(el.xaxis,el.yaxis), // position:new AMap.LngLat(el.xaxis,el.yaxis),
icon: icon, // icon: icon,
title: "上海前卫柑桔有限公司", // title: "",
offset: new AMap.Pixel(-17.5, -40), // icon [center bottom] // offset: new AMap.Pixel(-17.5, -40), // icon [center bottom]
// });
// marker.on("click", function (e) {
// that.$router.push({ path: "/largeScreen1" });
// });
var content=` <div class="p_title">
<img src="${iconUrl1}" alt="" />
<span>${el.greenhouseName}</span>
</div>`
const marker = new AMap.Marker({
position: new AMap.LngLat(el.xaxis,el.yaxis), //
content: content, // HTML
offset: new AMap.Pixel(-30,-22), // 使 div
}); });
marker.on("click", function (e) { marker.on("click", function (e) {
that.$router.push({ path: "/largeScreen1" }); that.$router.push({ path: "/largeScreen1" });
}); });
map.add(marker); map.add(marker);
map.add(marker);
} }
@ -1303,9 +1318,9 @@ size: new AMap.Size(70, 86), // 原始大小,如果不是原始大小,可以
padding-bottom: 0.1rem; padding-bottom: 0.1rem;
>img { >img {
width: 0.62rem; width: 0.68rem;
height: 0.68rem; height: 0.68rem;
margin: 0 0.16rem 0 0.13rem; margin: 0 0.1rem 0 0.13rem;
} }
.item_child { .item_child {

View File

@ -5,16 +5,17 @@
<img src="../../assets/image/real-time.png" alt="" /> <img src="../../assets/image/real-time.png" alt="" />
{{ deviceTypeName }}{{ $t('videoMonitoring.title') }}<span class="outline" v-if="deviceState == 0">({{ $t('realTime.deviceOffline') }})</span> {{ deviceTypeName }}{{ $t('videoMonitoring.title') }}<span class="outline" v-if="deviceState == 0">({{ $t('realTime.deviceOffline') }})</span>
</div> </div>
<div class="flex-list realTime-bottom videoMonitoring-monitor"> <div class="flex-list realTime-bottom videoMonitoring-monitor" :class="limitUserId==13?'noHeader':''">
<div class="left-view" v-if="deviceName != 30"> <div class="left-view" v-if="deviceName != 30">
<div ref="monitor" class="monitor" id="monitor"> <div ref="monitor" class="monitor" :class="cameraName==1?'':'center'" id="monitor">
<!-- <video ref="videoPlayer" class="video-js" id="video-js"></video> --> <!-- <video ref="videoPlayer" class="video-js" id="video-js"></video> -->
<img v-if="imgUrl" class="video-js" :src="imgUrl" alt=""> <img v-if="imgUrl" class="video-js" :src="imgUrl" alt="">
<div v-if="!imgUrl" ref="videoPlayer" class="video-js"> <div v-if="!imgUrl" ref="videoPlayer" class="video-js">
<div id="video-js"></div> <div id="video-js"></div>
</div> </div>
<div class="video-control"> <div class="video-control" v-if="cameraName==1">
<div class="video-btn-big"> <div class="video-btn-big">
<div class="top" @mousedown="downStart(0)"> <div class="top" @mousedown="downStart(0)">
<div class="arrow"></div> <div class="arrow"></div>
@ -88,6 +89,9 @@ export default {
imgUrl: '', imgUrl: '',
url: '', url: '',
nowNum: -1, nowNum: -1,
limitUserId:1,
cameraName:1,
} }
}, },
watch: { watch: {
@ -98,6 +102,7 @@ export default {
this.deviceTypeName = store.equipmentList[this.indexs - 1].deviceTypeName this.deviceTypeName = store.equipmentList[this.indexs - 1].deviceTypeName
this.deviceName = store.equipmentList[this.indexs - 1].deviceName this.deviceName = store.equipmentList[this.indexs - 1].deviceName
this.deviceState = store.equipmentList[this.indexs - 1].deviceState this.deviceState = store.equipmentList[this.indexs - 1].deviceState
this.cameraName=store.equipmentList[this.indexs - 1].cameraName
clearInterval(this.statusInterval) && this.statusInterval clearInterval(this.statusInterval) && this.statusInterval
this.imgUrl='' this.imgUrl=''
setTimeout(() => { setTimeout(() => {
@ -120,6 +125,7 @@ export default {
this.deviceName = store.equipmentList[this.indexs - 1].deviceName this.deviceName = store.equipmentList[this.indexs - 1].deviceName
this.deviceState = store.equipmentList[this.indexs - 1].deviceState this.deviceState = store.equipmentList[this.indexs - 1].deviceState
this.imgUrl='' this.imgUrl=''
this.cameraName=store.equipmentList[this.indexs - 1].cameraName
clearInterval(this.statusInterval) && this.statusInterval clearInterval(this.statusInterval) && this.statusInterval
setTimeout(() => { setTimeout(() => {
@ -152,6 +158,7 @@ export default {
this.deviceTypeName = store.equipmentList[this.indexs - 1].deviceTypeName this.deviceTypeName = store.equipmentList[this.indexs - 1].deviceTypeName
this.deviceName = store.equipmentList[this.indexs - 1].deviceName this.deviceName = store.equipmentList[this.indexs - 1].deviceName
this.deviceState = store.equipmentList[this.indexs - 1].deviceState this.deviceState = store.equipmentList[this.indexs - 1].deviceState
this.cameraName=store.equipmentList[this.indexs - 1].cameraName
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
@ -219,7 +226,7 @@ export default {
createVideoNew(accessToken) { createVideoNew(accessToken) {
// divWdivH 使div // divWdivH 使div
let divW = this.$refs.videoPlayer.clientWidth let divW = this.$refs.videoPlayer.clientWidth
let divH = this.$refs.videoPlayer.clientHeight let divH = this.$refs.videoPlayer.clientHeight+(this.limitUserId==13?48:0)
this.player = new EZUIKit.EZUIKitPlayer({ this.player = new EZUIKit.EZUIKitPlayer({
id: 'video-js', // ID id: 'video-js', // ID
accessToken: accessToken, accessToken: accessToken,
@ -250,17 +257,37 @@ export default {
this.api.getGethls(data2).then(res => { this.api.getGethls(data2).then(res => {
// console.log(res.data, 11); // console.log(res.data, 11);
if (res.data.code == 200) { if (res.data.code == 200) {
let userInfo = JSON.parse(localStorage.getItem("userInfo"));
this.api.user_getjurisdiction(userInfo.userid).then((res1) => {
if (res1.data.code == 200) {
this.limitUserId = (res1.data.data.filter(el => el.id == 2 || el.id == 1 || el.id == 5 || el.id == 7 || el.id == 8 || el.id == 9 || el.id == 10 || el.id == 11|| el.id == 12|| el.id == 13))[0].id;
this.url = res.data.data.ezopen this.url = res.data.data.ezopen
this.accesstoken = res.data.data.accesstoken this.accesstoken = res.data.data.accesstoken
this.createVideoNew(res.data.data.accesstoken) this.createVideoNew(res.data.data.accesstoken)
}
});
} else { } else {
this.imgUrl = nowDevice.hls this.imgUrl = nowDevice.hls
} }
}) })
} }
}, },
}, },
} }
</script> </script>
<style lang="scss"></style> <style lang="scss">
.videoMonitoring{
.noHeader .header-controls{
// .theme-icon-item{
// display: none!important;
// }
display: none!important;
//
}
}
</style>