Commit c862ab59 authored by xinzhedeai's avatar xinzhedeai

内页菜单公共处理

parent b70f0529
...@@ -66,17 +66,13 @@ ...@@ -66,17 +66,13 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li @click="changeMenu('video')" :class="{active: bigScreenDetailMenu==='video'}">视频监控</li> <li v-for="(item, index) in menuObj.emergency.menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li @click="changeMenu('shape')" :class="{active: bigScreenDetailMenu==='shape'}">变形监测</li> {{item.name}}
<li @click="changeMenu('temprate')" :class="{active: bigScreenDetailMenu==='temprate'}">温度监测
</li>
<li @click="changeMenu('wind')" :class="{active: bigScreenDetailMenu==='wind'}">风速监测</li>
<li @click="changeMenu('water')" :class="{active: bigScreenDetailMenu==='water'}">降水监测</li>
<li @click="changeMenu('people')" :class="{active: bigScreenDetailMenu==='people'}">人员定位
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<!-- 视频监控列表 --> <!-- 视频监控列表 -->
...@@ -142,7 +138,7 @@ ...@@ -142,7 +138,7 @@
<script src="../js/js.cookie.js"></script> <script src="../js/js.cookie.js"></script>
<!-- 详情内页公用js --> <!-- 详情内页公用js -->
<!-- <script src="./static/js/public-detail.js"></script> --> <script src="./static/js/public-detail.js"></script>
<script> <script>
let jessibucaPlayer = {}; let jessibucaPlayer = {};
//const host = location.protocol + '//' + window.location.host; //const host = location.protocol + '//' + window.location.host;
...@@ -182,7 +178,7 @@ ...@@ -182,7 +178,7 @@
const host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013'; const host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013';
const selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host; const selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.38:8057' : location.protocol + '//' + window.location.host;
// 请求 token 用 // 请求 token 用
...@@ -191,24 +187,14 @@ ...@@ -191,24 +187,14 @@
var map; // 地图 var map; // 地图
new Vue({ new Vue({
el: '#app', el: '#app',
mixins: [gemhoUtil.detailPageMixin],
data() { data() {
return { return {
// 公共信息
selectedMine: {},
// 菜单折叠显隐 // 菜单折叠显隐
showMenu4bianpo: true, showMenu4bianpo: true,
sensorLIst: [], sensorLIst: [],
currentSensorId: '', currentSensorId: '',
showMenu4weikuangku: true,
showMenu4chenjiang: true,
showMenu4diya: true,
// 菜单折叠显隐 - 结束
createTime: ['2024-01-01', '2024-09-30'],
bigScreenDetailMenu: '',
selectedMine: {},
isReady: false, // 页面是否准备好 请求完接口变为true
// 表格数据 // 表格数据
tableList: [] tableList: []
...@@ -283,16 +269,6 @@ ...@@ -283,16 +269,6 @@
console.log('sdfsdf', res) console.log('sdfsdf', res)
}); });
},
menuChange(type) {
['showMenu4bianpo', 'showMenu4weikuangku', 'showMenu4chenjiang', 'showMenu4diya'].forEach((item) => {
if (item === type) {
this[type] = !this[type]
} else {
this[item] = false
}
})
}, },
getChartsData() { getChartsData() {
const yAxisOption = { const yAxisOption = {
...@@ -397,25 +373,6 @@ ...@@ -397,25 +373,6 @@
loading && loading.close(); loading && loading.close();
this.isReady = true this.isReady = true
}, },
changeMenu(menuName) {
localStorage.setItem('bigScreenDetailMenu', menuName)
this.bigScreenDetailMenu = menuName
},
getAccessToken(appKey, appSecret) {
var dataJson = 'appKey=' + appKey + '&appSecret=' + appSecret;
return request.post("/ys7com", dataJson).then(res => {
var data = res.data || {};
if (data['code'] == '200') {
return data['data']['accessToken']
} else {
return null
}
}).catch(err => {
console.log(err);
return err
})
},
}, },
}) })
</script> </script>
......
This diff is collapsed.
...@@ -49,22 +49,11 @@ ...@@ -49,22 +49,11 @@
<div class="f20 color-theme ml10">返回</div> <div class="f20 color-theme ml10">返回</div>
</div> </div>
<div class="fixed flex-text maxIndex pointer" style="right: 30px;top: 45px;" @click="gotoManagement()">
<img style="width: 24px;height: 24px;" src="../static/backstage.png" alt="">
<div class="f20 color-theme ml10">后台管理</div>
</div>
<div class="flex-text ml10 mr10 mt15"> <div class="flex-text ml10 mr10 mt15">
<div style="width: 490px;height: calc(100vh - 110px);"> <div style="width: 490px;height: calc(100vh - 110px);">
<!-- 通知公告 --> <!-- 通知公告 -->
<div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));"> <div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));">
<!-- <div class="h50 flex-text pointer"
style="background: linear-gradient(to bottom, rgba(171,238,255,0), rgba(171,238,255,.2));border-bottom: 1px solid rgba(171,238,255,.5);">
<div class="flex-1" v-if="isReady">
<van-notice-bar background="none" left-icon="volume-o" color="#ffffff" :speed="80"
:text="notice.title" @click="noticeMask = true" />
</div>
</div> -->
<div class="mineInfo"> <div class="mineInfo">
<p>矿山名称: {{selectedMine.name}}</p> <p>矿山名称: {{selectedMine.name}}</p>
<p>矿山地址:{{selectedMine.address}}</p> <p>矿山地址:{{selectedMine.address}}</p>
...@@ -73,13 +62,8 @@ ...@@ -73,13 +62,8 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li @click="changeMenu('video')" :class="{active: bigScreenDetailMenu==='video'}">视频监控</li> <li v-for="(item, index) in menuObj.emergency.menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li @click="changeMenu('shape')" :class="{active: bigScreenDetailMenu==='shape'}">变形监测</li> {{item.name}}
<li @click="changeMenu('temprate')" :class="{active: bigScreenDetailMenu==='temprate'}">温度监测
</li>
<li @click="changeMenu('wind')" :class="{active: bigScreenDetailMenu==='wind'}">风速监测</li>
<li @click="changeMenu('water')" :class="{active: bigScreenDetailMenu==='water'}">降水监测</li>
<li @click="changeMenu('people')" :class="{active: bigScreenDetailMenu==='people'}">人员定位
</li> </li>
</ul> </ul>
</div> </div>
...@@ -193,7 +177,7 @@ ...@@ -193,7 +177,7 @@
<script src="../js/js.cookie.js"></script> <script src="../js/js.cookie.js"></script>
<!-- 详情内页公用js --> <!-- 详情内页公用js -->
<!-- <script src="./static/js/public-detail.js"></script> --> <script src="./static/js/public-detail.js"></script>
<script> <script>
let jessibucaPlayer = {}; let jessibucaPlayer = {};
//const host = location.protocol + '//' + window.location.host; //const host = location.protocol + '//' + window.location.host;
...@@ -242,11 +226,9 @@ ...@@ -242,11 +226,9 @@
var map; // 地图 var map; // 地图
new Vue({ new Vue({
el: '#app', el: '#app',
mixins: [gemhoUtil.detailPageMixin],
data() { data() {
return { return {
// 公共信息
selectedMine: {},
// 菜单折叠显隐 // 菜单折叠显隐
showMenu4bianpo: true, showMenu4bianpo: true,
sensorLIst: [], sensorLIst: [],
...@@ -255,10 +237,6 @@ ...@@ -255,10 +237,6 @@
showMenu4chenjiang: true, showMenu4chenjiang: true,
showMenu4diya: true, showMenu4diya: true,
// 菜单折叠显隐 - 结束 // 菜单折叠显隐 - 结束
createTime: ['2024-01-01', '2024-09-30'],
bigScreenDetailMenu: '',
selectedMine: {},
isReady: false, // 页面是否准备好 请求完接口变为true
// 表格数据 // 表格数据
tableList: [] tableList: []
...@@ -266,13 +244,6 @@ ...@@ -266,13 +244,6 @@
} }
}, },
mounted() { mounted() {
for (var i = 0; i < 10; i++) {
this.tableList.push({
videoName: 'sdfksdfxxxxx',
warnTypeName: '扣税的交流方',
warnDatetime: 'ksdlfsdf'
})
}
if (!token) { if (!token) {
window.open(host + '/#/login', '_self') window.open(host + '/#/login', '_self')
return return
...@@ -465,25 +436,6 @@ ...@@ -465,25 +436,6 @@
loading && loading.close(); loading && loading.close();
this.isReady = true this.isReady = true
}, },
changeMenu(menuName) {
localStorage.setItem('bigScreenDetailMenu', menuName)
this.bigScreenDetailMenu = menuName
},
getAccessToken(appKey, appSecret) {
var dataJson = 'appKey=' + appKey + '&appSecret=' + appSecret;
return request.post("/ys7com", dataJson).then(res => {
var data = res.data || {};
if (data['code'] == '200') {
return data['data']['accessToken']
} else {
return null
}
}).catch(err => {
console.log(err);
return err
})
},
}, },
}) })
</script> </script>
......
let jessibucaPlayer = {}; // let jessibucaPlayer = {};
//const host = location.protocol + '//' + window.location.host; // //const host = location.protocol + '//' + window.location.host;
window.detail_token = Cookies.get('ELADMIN-TOEKN'); // window.detail_token = Cookies.get('ELADMIN-TOEKN');
console.log('axios',axios) // console.log('axios',axios)
window.detail_axios = axios.create({ // window.detail_axios = axios.create({
headers: { 'Authorization': window.detail_token } // headers: { 'Authorization': window.detail_token }
}); // });
window.detail_axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; // window.detail_axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
console.log('window.detail_axios',window.detail_axios)
window.detail_axios.interceptors.response.use(
response => {
return response
}, error => {
console.error(error)
let code = 0
try {
code = error.response.data.status
} catch (e) {
if (error.toString().indexOf('Error: timeout') !== -1) {
console.error('当前网络不佳')
return
}
}
if (!code) {
console.error('当前网络不佳')
return
}
if (code === 401) {
alert('登录信息失效,请重新登录')
window.open(host + '/#/login', '_self')
return
}
if (code === 400 && message === '不允许访问') {
alert('您没有权限使用此功能,请联系管理员开通')
return
}
}
);
const host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013'; // console.log('window.detail_axios',window.detail_axios)
// window.detail_axios.interceptors.response.use(
// response => {
// return response
// }, error => {
// console.error(error)
// let code = 0
// try {
// code = error.response.data.status
// } catch (e) {
// if (error.toString().indexOf('Error: timeout') !== -1) {
// console.error('当前网络不佳')
// return
// }
// }
// if (!code) {
// console.error('当前网络不佳')
// return
// }
// if (code === 401) {
// alert('登录信息失效,请重新登录')
// window.open(host + '/#/login', '_self')
// return
// }
// if (code === 400 && message === '不允许访问') {
// alert('您没有权限使用此功能,请联系管理员开通')
// return
// }
// }
// );
const selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host; // const host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013';
// const selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.226:8057' : location.protocol + '//' + window.location.host;
if (!window.detail_token) {
window.open(host + '/#/login', '_self')
return
}
// if (this.selectedMine.mineType != 2) { // if (!window.detail_token) {
// alert('您当前选择的不是露天矿山,请先选择露天矿山,再查看此大屏') // window.open(host + '/#/login', '_self')
// window.history.go(-1)
// return // return
// } // }
\ No newline at end of file
// // if (this.selectedMine.mineType != 2) {
// // alert('您当前选择的不是露天矿山,请先选择露天矿山,再查看此大屏')
// // window.history.go(-1)
// // return
// // }
var gemhoUtil = {
goToPage: function(url){
window.open(url)
},
detailPageMixin: {
data: function() {
return {
// 公共信息
selectedMine: {},
menuObj: menuObj,
bigScreenDetailMenu: '',
createTime: ['2024-01-01', '2024-09-30'],
isReady: false, // 页面是否准备好 请求完接口变为true
};
},
methods: {
changeMenu(item) {
localStorage.setItem('bigScreenDetailMenu', item.name)
this.bigScreenDetailMenu = item.name
// 跳转页面
window.open(item.url)
},
}
}
}
var menuObj = {
emergency: {
menuList: [{
name: '视频监控',
url: '/datav/detail/video-monitor.html'
},{
name: '变形监控',
url: '/datav/detail/shape-monitor.html'
},{
name: '温度监控',
url: '/datav/detail/temperature-monitor.html'
},{
name: '湿度监控',
url: '/datav/detail/humidity-monitor.html'
},{
name: '风速监控',
url: '/datav/detail/wind-monitor.html'
},{
name: '降水监控',
url: '/datav/detail/water-monitor.html'
},{
name: '人员定位',
url: '/datav/detail/people-monitor.html',
subMenu: [{
name: '人员数据统计',
url: '/datav/detail/people-monitor.html'
},{
name: '人员定位图',
url: '/datav/detail/people-monitor.html'
}]
}],
},
natural: {
menuList: [{
name: '视频监控',
url: '/datav/detail/video-monitor.html'
},{
name: '矿山全景',
url: '/datav/detail/shape-monitor.html'
},{
name: '资源储备',
url: '/datav/detail/temperature-monitor.html'
},{
name: '水检测',
url: '/datav/detail/humidity-monitor.html'
},{
name: '土监测',
url: '/datav/detail/wind-monitor.html'
},{
name: '地质环境',
url: '/datav/detail/water-monitor.html'
},{
name: '绿色矿山',
url: '/datav/detail/shape-monitor.html',
},{
name: '开发利用',
url: '/datav/detail/shape-monitor.html',
},{
name: '变形监测',
url: '/datav/detail/shape-monitor.html',
}],
},
water: {
menuList: [{
name: '视频监控',
url: '/datav/detail/video-monitor.html'
},{
name: '水土流失',
url: '/datav/detail/shape-monitor.html'
},{
name: '降水监测',
url: '/datav/detail/water-monitor.html'
},{
name: '温度监测',
url: '/datav/detail/humidity-monitor.html'
},{
name: '湿度监控',
url: '/datav/detail/wind-monitor.html'
},{
name: '风速监测',
url: '/datav/detail/water-monitor.html'
}],
},
shengtai: {
menuList: [{
name: '视频监控',
url: '/datav/detail/video-monitor.html'
},{
name: '水土流失',
url: '/datav/detail/shape-monitor.html'
},{
name: '土壤监测',
url: '/datav/detail/water-monitor.html'
},{
name: '噪声监测',
url: '/datav/detail/humidity-monitor.html'
},{
name: '大气监测',
url: '/datav/detail/wind-monitor.html'
},{
name: '烟道监测',
url: '/datav/detail/water-monitor.html'
}],
},
}
...@@ -49,11 +49,6 @@ ...@@ -49,11 +49,6 @@
<div class="f20 color-theme ml10">返回</div> <div class="f20 color-theme ml10">返回</div>
</div> </div>
<div class="fixed flex-text maxIndex pointer" style="right: 30px;top: 45px;" @click="gotoManagement()">
<img style="width: 24px;height: 24px;" src="../static/backstage.png" alt="">
<div class="f20 color-theme ml10">后台管理</div>
</div>
<div class="flex-text ml10 mr10 mt15"> <div class="flex-text ml10 mr10 mt15">
<div style="width: 490px;height: calc(100vh - 110px);"> <div style="width: 490px;height: calc(100vh - 110px);">
<div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));"> <div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));">
...@@ -66,13 +61,8 @@ ...@@ -66,13 +61,8 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li @click="changeMenu('video')" :class="{active: bigScreenDetailMenu==='video'}">视频监控</li> <li v-for="(item, index) in menuObj.emergency.menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li @click="changeMenu('shape')" :class="{active: bigScreenDetailMenu==='shape'}">变形监测</li> {{item.name}}
<li @click="changeMenu('temprate')" :class="{active: bigScreenDetailMenu==='temprate'}">温度监测
</li>
<li @click="changeMenu('wind')" :class="{active: bigScreenDetailMenu==='wind'}">风速监测</li>
<li @click="changeMenu('water')" :class="{active: bigScreenDetailMenu==='water'}">降水监测</li>
<li @click="changeMenu('people')" :class="{active: bigScreenDetailMenu==='people'}">人员定位
</li> </li>
</ul> </ul>
</div> </div>
...@@ -142,7 +132,7 @@ ...@@ -142,7 +132,7 @@
<script src="../js/js.cookie.js"></script> <script src="../js/js.cookie.js"></script>
<!-- 详情内页公用js --> <!-- 详情内页公用js -->
<!-- <script src="./static/js/public-detail.js"></script> --> <script src="./static/js/public-detail.js"></script>
<script> <script>
let jessibucaPlayer = {}; let jessibucaPlayer = {};
//const host = location.protocol + '//' + window.location.host; //const host = location.protocol + '//' + window.location.host;
...@@ -191,27 +181,15 @@ ...@@ -191,27 +181,15 @@
var map; // 地图 var map; // 地图
new Vue({ new Vue({
el: '#app', el: '#app',
mixins: [gemhoUtil.detailPageMixin],
data() { data() {
return { return {
// 公共信息
selectedMine: {},
// 菜单折叠显隐 // 菜单折叠显隐
showMenu4bianpo: true, showMenu4bianpo: true,
sensorLIst: [], sensorLIst: [],
currentSensorId: '', currentSensorId: '',
showMenu4weikuangku: true,
showMenu4chenjiang: true,
showMenu4diya: true,
// 菜单折叠显隐 - 结束
createTime: ['2024-01-01', '2024-09-30'],
bigScreenDetailMenu: '',
selectedMine: {},
isReady: false, // 页面是否准备好 请求完接口变为true
// 表格数据 // 表格数据
tableList: [] tableList: []
} }
}, },
mounted() { mounted() {
...@@ -283,16 +261,6 @@ ...@@ -283,16 +261,6 @@
console.log('sdfsdf', res) console.log('sdfsdf', res)
}); });
},
menuChange(type) {
['showMenu4bianpo', 'showMenu4weikuangku', 'showMenu4chenjiang', 'showMenu4diya'].forEach((item) => {
if (item === type) {
this[type] = !this[type]
} else {
this[item] = false
}
})
}, },
getChartsData() { getChartsData() {
const yAxisOption = { const yAxisOption = {
...@@ -397,25 +365,6 @@ ...@@ -397,25 +365,6 @@
loading && loading.close(); loading && loading.close();
this.isReady = true this.isReady = true
}, },
changeMenu(menuName) {
localStorage.setItem('bigScreenDetailMenu', menuName)
this.bigScreenDetailMenu = menuName
},
getAccessToken(appKey, appSecret) {
var dataJson = 'appKey=' + appKey + '&appSecret=' + appSecret;
return request.post("/ys7com", dataJson).then(res => {
var data = res.data || {};
if (data['code'] == '200') {
return data['data']['accessToken']
} else {
return null
}
}).catch(err => {
console.log(err);
return err
})
},
}, },
}) })
</script> </script>
......
This diff is collapsed.
...@@ -59,13 +59,8 @@ ...@@ -59,13 +59,8 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li @click="changeMenu('video')" :class="{active: bigScreenDetailMenu==='video'}">视频监控</li> <li v-for="(item, index) in menuObj.emergency.menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li @click="changeMenu('shape')" :class="{active: bigScreenDetailMenu==='shape'}">变形监测</li> {{item.name}}
<li @click="changeMenu('temprate')" :class="{active: bigScreenDetailMenu==='temprate'}">温度监测
</li>
<li @click="changeMenu('wind')" :class="{active: bigScreenDetailMenu==='wind'}">风速监测</li>
<li @click="changeMenu('water')" :class="{active: bigScreenDetailMenu==='water'}">降水监测</li>
<li @click="changeMenu('people')" :class="{active: bigScreenDetailMenu==='people'}">人员定位
</li> </li>
</ul> </ul>
</div> </div>
...@@ -149,6 +144,8 @@ ...@@ -149,6 +144,8 @@
<script src="../js/axios.min.js"></script> <script src="../js/axios.min.js"></script>
<!-- cookie --> <!-- cookie -->
<script src="../js/js.cookie.js"></script> <script src="../js/js.cookie.js"></script>
<!-- 详情内页公用js -->
<script src="./static/js/public-detail.js"></script>
<script> <script>
let jessibucaPlayer = {}; let jessibucaPlayer = {};
...@@ -199,24 +196,14 @@ ...@@ -199,24 +196,14 @@
var map; // 地图 var map; // 地图
new Vue({ new Vue({
el: '#app', el: '#app',
mixins: [gemhoUtil.detailPageMixin],
data() { data() {
return { return {
// 公共信息
selectedMine: {},
// 菜单折叠显隐 // 菜单折叠显隐
showMenu4bianpo: true, showMenu4bianpo: true,
sensorLIst: [], sensorLIst: [],
currentSensorId: '', currentSensorId: '',
showMenu4weikuangku: true,
showMenu4chenjiang: true,
showMenu4diya: true,
// 菜单折叠显隐 - 结束
createTime: ['2024-01-01', '2024-09-30'],
bigScreenDetailMenu: '',
selectedMine: {},
isReady: false, // 页面是否准备好 请求完接口变为true
// 表格数据 // 表格数据
tableList: [] tableList: []
} }
...@@ -437,21 +424,6 @@ ...@@ -437,21 +424,6 @@
loading && loading.close(); loading && loading.close();
this.isReady = true this.isReady = true
}, },
changeMenu(menuName) {
localStorage.setItem('bigScreenDetailMenu', menuName)
this.bigScreenDetailMenu = menuName
},
menuChange(type) {
['showMenu4bianpo', 'showMenu4weikuangku', 'showMenu4chenjiang', 'showMenu4diya'].forEach((item) => {
if (item === type) {
this[type] = !this[type]
} else {
this[item] = false
}
})
},
async getData(e) { async getData(e) {
var loading var loading
if (!e) { if (!e) {
...@@ -568,11 +540,7 @@ ...@@ -568,11 +540,7 @@
this.isReady = true this.isReady = true
}, 800); }, 800);
} }
}, },
}) })
</script> </script>
......
...@@ -49,11 +49,6 @@ ...@@ -49,11 +49,6 @@
<div class="f20 color-theme ml10">返回</div> <div class="f20 color-theme ml10">返回</div>
</div> </div>
<div class="fixed flex-text maxIndex pointer" style="right: 30px;top: 45px;" @click="gotoManagement()">
<img style="width: 24px;height: 24px;" src="../static/backstage.png" alt="">
<div class="f20 color-theme ml10">后台管理</div>
</div>
<div class="flex-text ml10 mr10 mt15"> <div class="flex-text ml10 mr10 mt15">
<div style="width: 490px;height: calc(100vh - 110px);"> <div style="width: 490px;height: calc(100vh - 110px);">
<div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));"> <div style="background: linear-gradient(to bottom, rgba(13,27,48,.7), rgba(13,27,48,0));">
...@@ -66,13 +61,8 @@ ...@@ -66,13 +61,8 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li @click="changeMenu('video')" :class="{active: bigScreenDetailMenu==='video'}">视频监控</li> <li v-for="(item, index) in menuObj.emergency.menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li @click="changeMenu('shape')" :class="{active: bigScreenDetailMenu==='shape'}">变形监测</li> {{item.name}}
<li @click="changeMenu('temprate')" :class="{active: bigScreenDetailMenu==='temprate'}">温度监测
</li>
<li @click="changeMenu('wind')" :class="{active: bigScreenDetailMenu==='wind'}">风速监测</li>
<li @click="changeMenu('water')" :class="{active: bigScreenDetailMenu==='water'}">降水监测</li>
<li @click="changeMenu('people')" :class="{active: bigScreenDetailMenu==='people'}">人员定位
</li> </li>
</ul> </ul>
</div> </div>
...@@ -142,7 +132,7 @@ ...@@ -142,7 +132,7 @@
<script src="../js/js.cookie.js"></script> <script src="../js/js.cookie.js"></script>
<!-- 详情内页公用js --> <!-- 详情内页公用js -->
<!-- <script src="./static/js/public-detail.js"></script> --> <script src="./static/js/public-detail.js"></script>
<script> <script>
let jessibucaPlayer = {}; let jessibucaPlayer = {};
//const host = location.protocol + '//' + window.location.host; //const host = location.protocol + '//' + window.location.host;
...@@ -191,23 +181,13 @@ ...@@ -191,23 +181,13 @@
var map; // 地图 var map; // 地图
new Vue({ new Vue({
el: '#app', el: '#app',
mixins: [gemhoUtil.detailPageMixin],
data() { data() {
return { return {
// 公共信息
selectedMine: {},
// 菜单折叠显隐 // 菜单折叠显隐
showMenu4bianpo: true, showMenu4bianpo: true,
sensorLIst: [], sensorLIst: [],
currentSensorId: '', currentSensorId: '',
showMenu4weikuangku: true,
showMenu4chenjiang: true,
showMenu4diya: true,
// 菜单折叠显隐 - 结束
createTime: ['2024-01-01', '2024-09-30'],
bigScreenDetailMenu: '',
selectedMine: {},
isReady: false, // 页面是否准备好 请求完接口变为true
// 表格数据 // 表格数据
tableList: [] tableList: []
...@@ -241,6 +221,8 @@ ...@@ -241,6 +221,8 @@
}); });
this.getTableList(); this.getTableList();
console.log('menuList', menuList)
// this.getChartsData(); // this.getChartsData();
}, },
...@@ -283,16 +265,6 @@ ...@@ -283,16 +265,6 @@
console.log('sdfsdf', res) console.log('sdfsdf', res)
}); });
},
menuChange(type) {
['showMenu4bianpo', 'showMenu4weikuangku', 'showMenu4chenjiang', 'showMenu4diya'].forEach((item) => {
if (item === type) {
this[type] = !this[type]
} else {
this[item] = false
}
})
}, },
getChartsData() { getChartsData() {
const yAxisOption = { const yAxisOption = {
...@@ -397,25 +369,6 @@ ...@@ -397,25 +369,6 @@
loading && loading.close(); loading && loading.close();
this.isReady = true this.isReady = true
}, },
changeMenu(menuName) {
localStorage.setItem('bigScreenDetailMenu', menuName)
this.bigScreenDetailMenu = menuName
},
getAccessToken(appKey, appSecret) {
var dataJson = 'appKey=' + appKey + '&appSecret=' + appSecret;
return request.post("/ys7com", dataJson).then(res => {
var data = res.data || {};
if (data['code'] == '200') {
return data['data']['accessToken']
} else {
return null
}
}).catch(err => {
console.log(err);
return err
})
},
}, },
}) })
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment