优化系统_3_21

This commit is contained in:
lixiaobang 2025-03-21 17:43:32 +08:00
parent 586cc28421
commit c9f52a5315
25 changed files with 39334 additions and 21133 deletions

43495
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,63 +1,64 @@
{
"name": "big-screen-vue-datav",
"version": "1.5.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@jiaminghi/data-view": "^2.7.3",
"@types/echarts": "^4.4.3",
"axios": "^1.3.4",
"core-js": "^3.6.4",
"echarts": "^5.6.0",
"echarts-gl": "^1.1.0",
"element-ui": "^2.15.13",
"qrcode": "^1.5.4",
"video.js": "^8.0.4",
"vue": "^2.6.11",
"vue-awesome": "^4.0.2",
"vue-count-to": "^1.0.13",
"vue-router": "^3.1.5",
"vue-video-player": "^4.0.6",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.2.0",
"@vue/cli-plugin-eslint": "^4.2.0",
"@vue/cli-service": "^4.2.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.1.2",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"generator-star-spacing": "off",
"no-tabs": "off",
"no-unused-vars": "off",
"no-console": "off",
"no-irregular-whitespace": "off",
"no-debugger": "off"
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
"name": "big-screen-vue-datav",
"version": "1.5.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@jiaminghi/data-view": "^2.7.3",
"@types/echarts": "^4.4.3",
"axios": "^1.3.4",
"core-js": "^3.6.4",
"echarts": "^5.6.0",
"echarts-gl": "^1.1.0",
"element-ui": "^2.15.13",
"mqtt": "^4.3.7",
"qrcode": "^1.5.4",
"video.js": "^8.0.4",
"vue": "^2.6.11",
"vue-awesome": "^4.0.2",
"vue-count-to": "^1.0.13",
"vue-router": "^3.1.5",
"vue-video-player": "^4.0.6",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.2.0",
"@vue/cli-plugin-eslint": "^4.2.0",
"@vue/cli-service": "^4.2.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.1.2",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"generator-star-spacing": "off",
"no-tabs": "off",
"no-unused-vars": "off",
"no-console": "off",
"no-irregular-whitespace": "off",
"no-debugger": "off"
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

4
public/config.js Normal file
View File

@ -0,0 +1,4 @@
window.g = {
MQTT_IP: '172.16.1.146:1884',
H5_IP:'http://172.16.1.177:8081'
}

View File

@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta charset="utf-8" name="transparent" content= "true">
<meta http-equiv="X-UA-Compatible" content="IE=edge" name="transparent" content= "true">
<meta name="viewport" content="width=device-width,initial-scale=1.0" name="transparent" content= "true">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
@ -11,6 +11,7 @@
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<script type="text/javascript" src="./config.js"></script>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>

View File

@ -16,12 +16,12 @@ export default {
</script>
<style lang="scss" scoped>
@import url(./assets/iconfont/iconfont.css);
@import url('./assets/iconfont/iconfont.css');
#app {
width: 100vw;
height: 100vh;
background-color: #010721;
// background-color: #010721;
overflow: hidden;
}
</style>

BIN
src/assets/2wm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
src/assets/bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

12
src/assets/font.css Normal file
View File

@ -0,0 +1,12 @@
@font-face {
font-family: "庞门正道";
src: url('./font/庞门正道.ttf');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "PingFang SC";
src: url('./font/PingFang Medium_1.ttf');
font-weight: normal;
font-style: normal;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
src/assets/leftBg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
src/assets/rightBg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -20,7 +20,7 @@
// }
.host-body {
padding: 0 50px 30px 48px;
padding: 0 0 30px 0;
.dv-dec-10,
.dv-dec-10-s {

View File

@ -17,7 +17,7 @@ html {
body {
font-family: PingFang SC, PingFang SC-Bold;
line-height: 1.2em;
background-color: #f1f1f1;
background-color: transparent !important;
margin: 0;
padding: 0;
}

BIN
src/assets/swjcBg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -7,7 +7,7 @@
<script>
import echarts from 'echarts'
import 'echarts-gl';
// import 'echarts-gl';
export default {
name: "cityGreenLand",
components: {},

View File

@ -15,6 +15,8 @@ import 'vue-awesome/icons/chart-area.js';
import 'vue-awesome/icons/chart-pie.js';
import 'vue-awesome/icons/chart-line.js';
import 'vue-awesome/icons/align-left.js';
import mqttConfig from '@/utils/mqttConfig';
import "./assets/font.css"
Vue.prototype.http = http
//引入echart
@ -40,6 +42,58 @@ Vue.component('icon', Icon);
Vue.use(ElementUI);
Vue.use(dataV);
//MQTT订阅
var currentTopics = null;
var client = null;
var callback = null;
let mqtt = new mqttConfig(currentTopics);
window.PubScribe = function (topic, _callback,) {
callback = _callback;
if (currentTopics != null) {
//取消currentTopics主题订阅
if (client != null) {
client.unsubscribe(currentTopics);
currentTopics = null;
}
}
if (client == null) {
client = mqtt.createConnect(() => {
client.subscribe(topic, {
qos: 0
}, (err) => {
if (!err) {
console.log("订阅成功0", topic);
}
});
client.on("message", (topic, message) => {
//数据分类
try {
callback(topic, message);
} catch (error) {
}
});
});
} else {
if (topic != null) {
console.log("topic", topic)
currentTopics = topic;
client.subscribe(currentTopics, {
qos: 0
}, (err) => {
if (!err) {
console.log("订阅成功1");
} else {
console.log('消息订阅失败!')
}
});
}
}
}
new Vue({
router,
store,

50
src/utils/mqttConfig.js Normal file
View File

@ -0,0 +1,50 @@
import mqtt from "mqtt";
class mqttHandle {
constructor() {
this.connect = {
// host: vm.mqttHost,
// port: vm.mqttPort,
endpoint: "/mqtt",
clean: true, // 保留会话
cleanSession: true,
connectTimeout: 8000, // 超时时间
reconnectPeriod: 8000, // 重连时间间隔
host: '172.16.1.253',
port: '1884',//现场
// 认证信息
clientId: Number(new Date()).toString(),
username: 'dev',
password: '!11@22#33',
}
this.mqttClient = null;
}
/**
* 创建链接
* @returns client
*/
createConnect(onConnected) {
//配置链接
const { host, port, endpoint, ...options } = this.connect;
// const connectUrl = 'ws://' + this.connect.host + ':' + this.connect.port + '/mqtt';
const connectUrl = 'ws://' + window.g.MQTT_IP + '/mqtt';
console.log(connectUrl, 'connectUrl');
if (this.mqttClient == undefined) {
this.mqttClient = mqtt.connect(connectUrl, options);
this.mqttClient.on("connect", () => {
console.log("Connection succeeded!");
onConnected();
});
this.mqttClient.on('reconnect', (error) => {
console.log('正在重连')
})
this.mqttClient.on("error", (error) => {
console.log("Connection failed");
});
}
return this.mqttClient;
}
}
export default mqttHandle;

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
<script>
import echarts from "echarts";
import "echarts-gl";
// import "echarts-gl";
import wz from "../../../assets/source/wz.json";
// import jn from "../../../assets/source/jn.json";

View File

@ -8,7 +8,7 @@
<script>
import echarts from "echarts";
import "echarts-gl";
// import "echarts-gl";
import wz from "../../../assets/source/wz.json";
// import jn from "../../../assets/source/jn.json";

View File

@ -5,10 +5,19 @@
<div class="left-wrapper d-flex flex-column">
<div class="use-rank-wrapper d-flex flex-column">
<div class="use-rank-content">
<contentTop :type="2" title="各县区使用频率排行" :topOptionsProps="useRankSelectProps" />
<contentTop
:type="2"
title="各县区使用频率排行"
:topOptionsProps="useRankSelectProps"
/>
</div>
<div class="use-rank-list-content">
<rank-list viewType="opther" :listHeight="465" :tableTitle="userRankTableTitleList" :list="userRankList" />
<rank-list
viewType="opther"
:listHeight="465"
:tableTitle="userRankTableTitleList"
:list="userRankList"
/>
</div>
</div>
<div class="use-status-wrapper d-flex flex-column">
@ -32,11 +41,21 @@
<div class="data-distribute d-flex h-100 w-100">
<div class="distribute-left-content w-100">
<div class="distribute-img"></div>
<div class="distribute-process-item line-0 distribute-center-text">25.4%</div>
<div class="distribute-process-item line-1 distribute-center-text">25.4%</div>
<div class="distribute-process-item line-2 distribute-center-text">25.4%</div>
<div class="distribute-process-item line-3 distribute-center-text">25.4%</div>
<div class="distribute-process-item line-4 distribute-center-text">25.4%</div>
<div class="distribute-process-item line-0 distribute-center-text">
25.4%
</div>
<div class="distribute-process-item line-1 distribute-center-text">
25.4%
</div>
<div class="distribute-process-item line-2 distribute-center-text">
25.4%
</div>
<div class="distribute-process-item line-3 distribute-center-text">
25.4%
</div>
<div class="distribute-process-item line-4 distribute-center-text">
25.4%
</div>
</div>
<div class="distribute-right-content d-flex flex-column">
<div class="distribute-data-item line-0">25-40 12,123</div>
@ -56,15 +75,23 @@
<p class="sport-title-con">
<span class="sport-title">运动码总人次</span>
</p>
<light-plate :lightNum="[9,6,3,7,8,9,0,6]" />
<light-plate :lightNum="[9, 6, 3, 7, 8, 9, 0, 6]" />
</div>
<div class="sport-bg"></div>
<div class="one-use-rank-wrapper">
<div class="one-use-rank-top-con">
<contentTop title="运动码个人使用情况排行" :topRadioProps="oneUseRadioProps" :topOptionsProps="oneUseRankSelectProps" />
<contentTop
title="运动码个人使用情况排行"
:topRadioProps="oneUseRadioProps"
:topOptionsProps="oneUseRankSelectProps"
/>
</div>
<div class="one-use-rank-con">
<rank-list :listHeight="340" :tableTitle="oneUseTableTitle" :list="oneUseList" />
<rank-list
:listHeight="340"
:tableTitle="oneUseTableTitle"
:list="oneUseList"
/>
</div>
</div>
</div>
@ -73,18 +100,35 @@
<div class="right-wrapper d-flex flex-column">
<div class="city-rank-wrapper d-flex flex-column">
<div class="city-rank-content">
<contentTop :type="2" title="市级协会使用频率排行" :topOptionsProps="cityRankSelectProps" />
<contentTop
:type="2"
title="市级协会使用频率排行"
:topOptionsProps="cityRankSelectProps"
/>
</div>
<div class="city-rank-list-content">
<Sliders height="360px" :isHasRight="true" :options="cityRankOptions" :rightTextWidth="55" />
<Sliders
height="360px"
:isHasRight="true"
:options="cityRankOptions"
:rightTextWidth="55"
/>
</div>
</div>
<div class="area-use-rank-wrapper d-flex flex-column">
<div class="area-use-rank-top-con">
<contentTop :type="2" title="各区县协会使用频率排行" :topOptionsProps="areaUseRankSelectProps" />
<contentTop
:type="2"
title="各区县协会使用频率排行"
:topOptionsProps="areaUseRankSelectProps"
/>
</div>
<div class="area-use-rank-con">
<rank-list :listHeight="480" :tableTitle="areaTableTitleList" :list="areaList" />
<rank-list
:listHeight="480"
:tableTitle="areaTableTitleList"
:list="areaList"
/>
</div>
</div>
</div>
@ -93,13 +137,13 @@
</template>
<script>
import contentTop from '@/components/contentTop';
import rankList from '@/components/rankList';
import Sliders from '@/components/Sliders';
import lightPlate from '@/components/lightPlate';
// import contentTop from '@/components/contentTop';
import rankList from "@/components/rankList";
import Sliders from "@/components/Sliders";
import lightPlate from "@/components/lightPlate";
export default {
name: 'sportCode',
name: "sportCode",
components: { contentTop, rankList, Sliders, lightPlate },
data() {
return {
@ -107,140 +151,128 @@ export default {
useRankSelectProps: {
selects: [
{
name: 'useRank1',
options: [
{ value: 1, label: '红榜' }
]
name: "useRank1",
options: [{ value: 1, label: "红榜" }],
},
{
name: 'useRank2',
options: [
{ value: 1, label: '区' }
]
}
]
name: "useRank2",
options: [{ value: 1, label: "区" }],
},
],
},
userRankTableTitleList: [
{ title: '排名', width: '80' },
{ title: '名称', val: 'first', width: '160' },
{ title: '使用频率', val: 'second', width: '160' }
{ title: "排名", width: "80" },
{ title: "名称", val: "first", width: "160" },
{ title: "使用频率", val: "second", width: "160" },
],
userRankList: [
{ first: '瓯海区', second: '90%' },
{ first: '龙湾区', second: '90%' },
{ first: '鹿城区', second: '90%' },
{ first: '永嘉县', second: '90%' },
{ first: '乐清市', second: '90%' },
{ first: '瑞安市', second: '90%' },
{ first: '文成县', second: '90%' },
{ first: '平阳县', second: '90%' },
{ first: '龙港市', second: '90%' },
{ first: '洞头区', second: '90%' }
{ first: "瓯海区", second: "90%" },
{ first: "龙湾区", second: "90%" },
{ first: "鹿城区", second: "90%" },
{ first: "永嘉县", second: "90%" },
{ first: "乐清市", second: "90%" },
{ first: "瑞安市", second: "90%" },
{ first: "文成县", second: "90%" },
{ first: "平阳县", second: "90%" },
{ first: "龙港市", second: "90%" },
{ first: "洞头区", second: "90%" },
],
// 使
oneUseRadioProps: {
name: 'onuseradio',
name: "onuseradio",
width: 100,
options: [
{ value: 1, label: '周' },
{ value: 2, label: '月' },
{ value: 3, label: '年' },
]
{ value: 1, label: "周" },
{ value: 2, label: "月" },
{ value: 3, label: "年" },
],
},
oneUseRankSelectProps: {
selects: [
{
name: 'oneuse1',
options: [
{ value: 1, label: '红榜' }
]
}
]
name: "oneuse1",
options: [{ value: 1, label: "红榜" }],
},
],
},
oneUseTableTitle: [
{ title: '排名', width: '80' },
{ title: '用户姓名', val:'first', width: '180' },
{ title: '使用时间(h)', val:'second', width: '180' },
{ title: '使用频率', val:'third', width: '180' }
{ title: "排名", width: "80" },
{ title: "用户姓名", val: "first", width: "180" },
{ title: "使用时间(h)", val: "second", width: "180" },
{ title: "使用频率", val: "third", width: "180" },
],
oneUseList: [
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' },
{ first: '顾阳', second: '30', third: '92%' }
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
{ first: "顾阳", second: "30", third: "92%" },
],
// 使
cityRankSelectProps: {
selects: [
{
name: 'cityRank1',
options: [
{ value: 1, label: '红榜' }
]
}
]
name: "cityRank1",
options: [{ value: 1, label: "红榜" }],
},
],
},
cityRankOptions: [
{ value: 100, label: '鹿城区', rightText: 12000 },
{ value: 90, label: '瓯海区', rightText: 9876 },
{ value: 80, label: '龙海区', rightText: 8734 },
{ value: 70, label: '洞头区', rightText: 6789 },
{ value: 60, label: '永嘉县', rightText: 6000 },
{ value: 50, label: '乐清市', rightText: 6000 },
{ value: 40, label: '文成县', rightText: 6000 },
{ value: 30, label: '文成县', rightText: 6000 },
{ value: 30, label: '文成县', rightText: 6000 },
{ value: 30, label: '文成县', rightText: 6000 },
{ value: 100, label: "鹿城区", rightText: 12000 },
{ value: 90, label: "瓯海区", rightText: 9876 },
{ value: 80, label: "龙海区", rightText: 8734 },
{ value: 70, label: "洞头区", rightText: 6789 },
{ value: 60, label: "永嘉县", rightText: 6000 },
{ value: 50, label: "乐清市", rightText: 6000 },
{ value: 40, label: "文成县", rightText: 6000 },
{ value: 30, label: "文成县", rightText: 6000 },
{ value: 30, label: "文成县", rightText: 6000 },
{ value: 30, label: "文成县", rightText: 6000 },
],
// 使
areaUseRankSelectProps: {
selects: [
{
name: 'areause1',
options: [
{ value: 1, label: '红榜' }
]
{
name: "areause1",
options: [{ value: 1, label: "红榜" }],
},
{
name: 'areause2',
options: [
{ value: 1, label: '区' }
]
}
]
name: "areause2",
options: [{ value: 1, label: "区" }],
},
],
},
areaTableTitleList: [
{ title: '排名', width: '80' },
{ title: '名称', val:'first', width: '180' },
{ title: '使用频率', val:'second', width: '180' }
{ title: "排名", width: "80" },
{ title: "名称", val: "first", width: "180" },
{ title: "使用频率", val: "second", width: "180" },
],
areaList: [
{ first: '瓯海区', second: '90%' },
{ first: '龙湾区', second: '90%' },
{ first: '鹿城区', second: '90%' },
{ first: '永嘉县', second: '90%' },
{ first: '乐清市', second: '90%' },
{ first: '瑞安市', second: '90%' },
{ first: '文成县', second: '90%' },
{ first: '平阳县', second: '90%' },
{ first: '龙港市', second: '90%' },
{ first: '洞头区', second: '90%' }
]
}
}
}
{ first: "瓯海区", second: "90%" },
{ first: "龙湾区", second: "90%" },
{ first: "鹿城区", second: "90%" },
{ first: "永嘉县", second: "90%" },
{ first: "乐清市", second: "90%" },
{ first: "瑞安市", second: "90%" },
{ first: "文成县", second: "90%" },
{ first: "平阳县", second: "90%" },
{ first: "龙港市", second: "90%" },
{ first: "洞头区", second: "90%" },
],
};
},
};
</script>
<style lang="scss" scoped>
@import '../../assets/scss/sportCode.scss';
</style>
@import "../../assets/scss/sportCode.scss";
</style>

13918
yarn.lock

File diff suppressed because it is too large Load Diff