|
@@ -6,31 +6,31 @@
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
<!-- <title>{{$t('board.wdkl')}}</title> -->
|
|
|
+
|
|
|
<link rel="stylesheet" href="./css/index.css">
|
|
|
<link rel="stylesheet" href="./fonts/icomoon.css">
|
|
|
<!-- elementui -->
|
|
|
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
|
+ <link rel="stylesheet" href="./css/element-ui.css">
|
|
|
<!-- <link rel="stylesheet" href="./css/flipclock.css"> -->
|
|
|
+ <script src="./js/scoket.js"></script>
|
|
|
+ <script src="./js/api.js"></script>
|
|
|
<!-- // 引入 Vue.js -->
|
|
|
<script src="./js/vue.js"></script>
|
|
|
- <script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
|
+ <script src="./js/element-ui.js"></script>
|
|
|
<!-- 先加载 ECharts -->
|
|
|
<script src="./js/echarts.min.js"></script>
|
|
|
<!-- 再加载百度地图 API 和 ECharts 的百度地图扩展 -->
|
|
|
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=4lgYDZ9MWQMbTvjX5R5M5pZG"></script>
|
|
|
- <script type="text/javascript"
|
|
|
- src="https://api.map.baidu.com/library/MarkerClusterer/1.2/src/MarkerClusterer_min.js"></script>
|
|
|
- <script type="text/javascript"
|
|
|
- src="https://api.map.baidu.com/library/TextIconOverlay/1.2/src/TextIconOverlay_min.js"></script>
|
|
|
+ <script type="text/javascript" src="./js/MarkerClusterer_min.js"></script>
|
|
|
+ <script type="text/javascript" src="./js/TextIconOverlay_min.js"></script>
|
|
|
|
|
|
- <script type="text/javascript"
|
|
|
- src="https://fastly.jsdelivr.net/npm/echarts@5.3.3/dist/extension/bmap.min.js"></script>
|
|
|
+ <script type="text/javascript" src="./js/bmap.min.js"></script>
|
|
|
|
|
|
- <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
|
|
+ <script src="./js/axios.min.js"></script>
|
|
|
<!-- 自定义 JS -->
|
|
|
<script src="./js/mapStyleJson.js"></script>
|
|
|
<!-- i18 -->
|
|
|
- <script src="https://cdn.jsdelivr.net/npm/vue-i18n@8.28.2/dist/vue-i18n.min.js"></script>
|
|
|
+ <script src="./js/vue-i18n.min.js"></script>
|
|
|
<script src="./js/i18n.js"></script>
|
|
|
|
|
|
</head>
|
|
@@ -49,7 +49,7 @@
|
|
|
<el-button type="primary" size="mini" style="background-color: rgba(255, 255, 255, 0.05);font-size: 10px;padding: 3px 8px; height: 22px;
|
|
|
color: rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.15);">
|
|
|
{{ getLanguageName }}
|
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="zh">中文</el-dropdown-item>
|
|
@@ -261,7 +261,7 @@
|
|
|
</body>
|
|
|
<script>
|
|
|
// 配置 axios 全局默认值
|
|
|
- axios.defaults.baseURL = 'http://192.168.1.199:8006/'; // 设置默认的请求地址
|
|
|
+ axios.defaults.baseURL = window.api.base; // 设置默认的请求地址
|
|
|
// http://192.168.1.199:7000
|
|
|
axios.defaults.timeout = 5000; // 设置请求超时时间
|
|
|
// axios.defaults.headers.common['Content-Type'] = 'application/json';
|
|
@@ -294,7 +294,7 @@
|
|
|
|
|
|
mapHeight: 0,//地图高度
|
|
|
|
|
|
- host_port: "192.168.1.199:8006/",
|
|
|
+ host_port: window.api.base.replace('http://', ''),
|
|
|
// host_port: "119.23.151.229:8006/",
|
|
|
allCount: 0,
|
|
|
quarterlyAddition: 0,
|
|
@@ -389,9 +389,9 @@
|
|
|
// 初始化监控面板
|
|
|
this.initMonitor();
|
|
|
this.renderMapData();
|
|
|
-
|
|
|
+
|
|
|
if (this.partId) {
|
|
|
-
|
|
|
+
|
|
|
// 连接webSocket
|
|
|
this.initWebSocket();
|
|
|
// 打开定时器
|
|
@@ -401,8 +401,6 @@
|
|
|
image.style.display = "none";
|
|
|
})
|
|
|
}
|
|
|
- // 获取看板用户信息
|
|
|
- // this.getUserInfo();
|
|
|
const debouncedResize = this.debounce(this.handleResize, 300);
|
|
|
window.addEventListener('resize', debouncedResize);
|
|
|
this.handleResize();
|
|
@@ -443,7 +441,7 @@
|
|
|
this.$i18n.locale = lang;
|
|
|
// 可以存储到 localStorage 以保持语言选择
|
|
|
localStorage.setItem('language', lang);
|
|
|
- if (!this.title || this.title === this.$t('wdklScreen.wdkl')) {
|
|
|
+ if (!this.partId || this.title === this.$t('wdklScreen.wdkl')) {
|
|
|
this.title = this.$t('wdklScreen.wdkl');
|
|
|
}
|
|
|
this.getDeviceTypeList()
|
|
@@ -452,7 +450,7 @@
|
|
|
this.$t('wdklScreen.month'),
|
|
|
this.$t('wdklScreen.year')
|
|
|
];
|
|
|
- this.getDeviceTypeList();
|
|
|
+ // this.getDeviceTypeList();
|
|
|
// this.getUserInfo();
|
|
|
this.getSOSInfo();
|
|
|
this.getLogInfo();
|
|
@@ -677,7 +675,7 @@
|
|
|
const partId = this.getQuery('partId');
|
|
|
this.$http.get("bulletinBoard/user_info/" + partId).then(response => {
|
|
|
const data = response.data;
|
|
|
-
|
|
|
+
|
|
|
this.title = data.partInfo.shop_name;
|
|
|
this.allCount = data.userCount.all_count;
|
|
|
this.quarterlyAddition = data.userCount.quarterly_count;
|
|
@@ -686,8 +684,13 @@
|
|
|
this.womanCount = data.userCount.woman_count || 0;
|
|
|
|
|
|
// 地图人员分布
|
|
|
+
|
|
|
+ // console.log('获取看板用户信息@@@@@', data.memberList[0]);
|
|
|
+ if (!data.memberList.length || !data.memberList[0].lng_lat ) {
|
|
|
+ console.log('memberList或经纬度 为空');
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.mapOption = this.initMap();
|
|
|
- console.log('获取看板用户信息@@@@@', data.memberList);
|
|
|
if (data.memberList.length > 0) {
|
|
|
const mapData = data.memberList.map(item => ({
|
|
|
name: item.nickname,
|
|
@@ -707,7 +710,7 @@
|
|
|
pieOption.series[0].data = data.pieData;
|
|
|
// console.log('饼图数据', pieOption.series[0].data);
|
|
|
this.myPieEchart.setOption(pieOption);
|
|
|
-
|
|
|
+
|
|
|
}).catch(error => {
|
|
|
console.error('获取用户信息失败', error);
|
|
|
});
|
|
@@ -765,7 +768,7 @@
|
|
|
var time = Math.round(new Date()) + "" + Math.round(Math.random() * 100);
|
|
|
console.log(time, this.partId)
|
|
|
// var s = "ws://127.0.0.1:8006/bulletinBoard/" + time + "/" + partId;
|
|
|
- var s = "ws://" + this.host_port + "bulletinBoard/" + time + "/" + this.partId;
|
|
|
+ var s = "ws://" + this.host_port + "/" + "bulletinBoard/" + time + "/" + this.partId;
|
|
|
console.log(s)
|
|
|
var ws = new WebSocket(s);
|
|
|
ws.onopen = function (evt) {
|
|
@@ -1056,7 +1059,7 @@
|
|
|
},
|
|
|
axisLabel: {
|
|
|
color: '#4c9bfd',
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
axisLine: {
|
|
|
show: false
|
|
@@ -1210,7 +1213,7 @@
|
|
|
}
|
|
|
lineOption.legend.data = key[2].map(item => this.deviceTypeGetter(Number(item)));
|
|
|
lineOption.xAxis.data = key[1]
|
|
|
-
|
|
|
+
|
|
|
|
|
|
this.myLineEchart.setOption(lineOption);
|
|
|
},
|