大屏case案例增加

This commit is contained in:
markilue 2022-12-07 12:00:13 +08:00
parent 3f9a8642e8
commit 2d33b78f2c
120 changed files with 129336 additions and 0 deletions

View File

@ -0,0 +1,12 @@
{
"presets": [["es2015", { "modules": false }]],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}

View File

@ -0,0 +1,4 @@
NODE_ENV = development
VUE_APP_URL_ENV = development
VUE_APP_CONFIG=dev
VUE_APP_outputDir = development

View File

@ -0,0 +1,5 @@
NODE_ENV = production
VUE_APP_URL_ENV = production
VUE_APP_CONFIG=pro
VUE_APP_outputDir = dist-production

View File

@ -0,0 +1,4 @@
NODE_ENV = production
VUE_APP_URL_ENV = yh
VUE_APP_CONFIG=yh
VUE_APP_outputDir = dist-yh

View File

@ -0,0 +1,24 @@
.DS_Store
node_modules
/dist
/dist-*
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 daidai
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,238 @@
## 项目描述
根据奔跑吧面条的**[vue-big-screen](https://gitee.com/MTrun/big-screen-vue-datav)**开源框架基础上进行修改。
- 项目需要全屏展示(按 F11
- 项目部分区域使用了全局注册方式,增加了打包体积,在实际运用中请使用 **按需引入**
- 项目环境Vue-cli、DataV、Echarts、Webpack、Npm、Nodeaxios,mock。
- 请拉取 master 分支的代码,其余分支是开发分支。
- 在项目public目录下存放地图数据合集根据地市编存放。
友情链接:
1. [Vue 官方文档](https://gitee.com/link?target=https%3A%2F%2Fcn.vuejs.org%2Fv2%2Fguide%2Finstance.html)
2. [DataV 官方文档](https://gitee.com/link?target=http%3A%2F%2Fdatav.jiaminghi.com%2Fguide%2F)
3. [echarts 实例](https://gitee.com/link?target=https%3A%2F%2Fecharts.apache.org%2Fexamples%2Fzh%2Findex.html)[echarts API 文档](https://gitee.com/link?target=https%3A%2F%2Fecharts.apache.org%2Fzh%2Fapi.html%23echarts)
4. [mock.js官网](http://mockjs.com/examples.html)
5. [axios官网](https://axios-http.com/)
**项目展示**
![项目展示](https://img-blog.csdnimg.cn/f0b09cd868ae462d80807270b49210bb.png)
### 项目预览地址
[https://www.daidaibg.com/bigscreen](https://www.daidaibg.com/bigscreen)
### 项目仓库地址
**github地址**
[https://github.com/daidaibg/IofTV-Screen](https://github.com/daidaibg/IofTV-Screen)
**Gitee地址**
[https://gitee.com/daidaibg/IofTV-Screen](https://gitee.com/daidaibg/IofTV-Screen)
### vue3+vite版本地址
**github地址**
[https://github.com/daidaibg/IofTV-Screen-Vue3](https://github.com/daidaibg/IofTV-Screen-Vue3)
**Gitee地址**
[https://gitee.com/daidaibg/IofTV-Screen-Vue3](https://gitee.com/daidaibg/IofTV-Screen-Vue3)
### 1.1.0版本开始采用自适应组件方式不再使用mixin方式。
### 滚动设置,自适应设置
项目中可以进行滚动配置,内容是否滚动
点击右上角设置按钮
![设置](https://img-blog.csdnimg.cn/436e28d054bd475d9edfd41471f88441.png)
可以进行以下配置,可以自行代码中进行修改或增加配置
![在这里插入图片描述](https://img-blog.csdnimg.cn/564c304c4b2249b1a525558eeb986497.png)
## 2、主要文件介绍
| 文件 | 作用/功能 |
| ----------------- | ------------------------------------------------------------ |
| main.js | 主目录文件,引入 Echart/DataV 等文件 |
| utils | 工具函数与 mixins 函数等 |
| views/ home.vue | 项目主结构 |
| views/其余文件 | 界面各个区域组件(按照位置来命名) |
| assets | 静态资源目录,放置 logo 与背景图片 |
| assets / css/ | 通用 CSS 文件,全局项目快捷样式调节 |
| components/echart | 所有 echart 图表(按照位置来命名) |
| common/... | 全局封装的 ECharts 和 flexible 插件代码(适配屏幕尺寸,可定制化修改) |
| api/api.js | 接口封装文件 |
| mock | 模拟数据接口地址 |
###
## 使用介绍
### 安装
```npm
npm install
```
### 启动
```npm
npm start
```
[接下来跟面条的差不多还是看面条的文档吧](https://gitee.com/MTrun/big-screen-vue-datav/tree/master#%E4%B8%89%E4%BD%BF%E7%94%A8%E4%BB%8B%E7%BB%8D)
https://gitee.com/MTrun/big-screen-vue-datav/tree/master#%E4%B8%89%E4%BD%BF%E7%94%A8%E4%BB%8B%E7%BB%8D
### 取消mock模拟数据
```javascript
// src\main.js文件
把下面这句话注释掉就可以了。
require('./mock/mock')//是否使用mock
```
## 自适应缩放组件
### 注意
采用Scale方式会自动给组件父元素添加overflow:hidden
### 使用
```vue
<template>
<scale-screen width="1920" height="1080">
<div>
<v-chart>....</v-chart>
<v-chart>....</v-chart>
<v-chart>....</v-chart>
<v-chart>....</v-chart>
<v-chart>....</v-chart>
</div>
</scale-screen>
</template>
<script>
import ScaleScreen from 'scale-screen'
export default {
name:'Demo',
components:{
VScaleScreen
}
}
</script>
```
### API
| 属性 | 说明 | 类型 | 默认值 |
| ------------ | ------------------------------------------------------------ | -------------------------------- | ------ |
| selfAdaption | 是否进行自适应 | Boolean | true |
| width | 大屏宽度 | `Number` or `String` | 1920 |
| height | 大屏高度 | `Number` or `String` | 1080 |
| autoScale | 自适应配置配置为boolean类型时为启动或者关闭自适应配置为对象时若x为truex轴产生边距y为true时y轴产生边距启用fullScreen时此配置失效 | Boolean or {x:boolean,y:boolean} | true |
| delay | 窗口变化防抖延迟时间 | Number | 500 |
| fullScreen | 全屏自适应启用此配置项时会存在拉伸效果同时autoScale失效非必要情况下不建议开启 | Boolean | false |
| boxStyle | 修改容器样式如居中展示时侧边背景色符合Vue双向绑定style标准格式 | Object | null |
| wrapperStyle | 修改自适应区域样式符合Vue双向绑定style标准格式 | Object | null |
## 公用组件
封装了除面条外个别用到的组件
### 5.1 message消息提示
因为刚开始没想着用第三方提示库,自己简单封装了一个。
组件内部目前只有warning类型如果需要其他类型自己组件内添加。
因在main.js注册全局可以直接使用不需要引入
```js
this.$Message({
text: res.msg,
type: 'warning'
})
//也可以这样
this.$Message.warning(res.msg)
```
| 参数 | 描述 | 默认值 | 类型 | 可选值 |
| :--: | :------: | :-----: | :----: | :-----: |
| text | 提示文字 | - | string | - |
| type | 弹窗类型 | warning | string | warning |
### 5.2 外边框
因为我的项目外边框几乎一样还有title,所以封装了此组件。
根据自己需求更改更换外边框src\components\item-wrap\item-wrap.vue下更换。
```vue
<ItemWrap
title="我是title"
>
<div>我是谁?</div>
</ItemWrap>
```
| 参数 | 描述 | 默认值 | 类型 | 可选值 |
| :---: | :--: | :----: | :----: | :----: |
| title | 标头 | - | string | - |
## 中间地图
### 南海显隐控制
根据需求来,**修改此值请刷新页面**
```indexs/center-map.vue``` 文件中```isSouthChinaSea```变量 默认不显示南海(false),为```true```的时候显示南海
```
isSouthChinaSea:false,//默认不显示南海改为true可显示南海
```
## 全局参数
### filter
监测数据项统一过滤,保留两位小数。
```vue
{{10.23123|montionFilter }}
```
## 大屏交流反馈(面条的群)
### 大屏QQ群
QQ群号713105837
### 大屏二维码
QQ群二维码
![输入图片说明](https://gitee.com/MTrun/big-screen-vue-datav/raw/master/public/image.png)

View File

@ -0,0 +1,13 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
// 使@vscode
"@/*": ["src/*"]
},
// prettier
"experimentalDecorators": true,
},
// IDE
"exclude": ["node_modules", "dist", "build"]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
{
"name": "web",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --mode dev",
"start": "vue-cli-service serve --mode dev ",
"build": "vue-cli-service build --mode production",
"report": "vue-cli-service build --report",
"build:yh": "vue-cli-service build --mode yh"
},
"dependencies": {
"@jiaminghi/data-view": "^2.10.0",
"async-validator": "^4.2.5",
"axios": "^0.24.0",
"dayjs": "^1.11.6",
"echarts": "^5.4.0",
"ejs": "^3.1.8",
"element-ui": "^2.15.10",
"follow-redirects": "^1.15.2",
"glob-parent": "^6.0.2",
"node-forge": "^1.3.1",
"sass": "^1.55.0",
"uglify-js": "^3.17.4",
"vue": "^2.7.13",
"vue-easytable": "^2.21.5",
"vue-router": "^3.6.5",
"vue-seamless-scroll": "^1.1.23",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-router": "^4.5.19",
"@vue/cli-plugin-vuex": "^4.5.19",
"@vue/cli-service": "^4.5.19",
"babel-plugin-component": "^1.1.1",
"mockjs": "^1.1.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.7.13"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="">
<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">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link href="./style.css" rel="stylesheet">
<title>
大屏
</title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app">
<div class="container_nomount">
<div class="loading">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<h2>Loading...</h2>
</div>
</div>
<!-- built files will be auto injected -->
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"adcode":710000,"name":"台湾省","center":[121.509062,25.044332],"centroid":[120.971485,23.749452],"childrenNum":0,"level":"province","acroutes":[100000],"parent":{"adcode":100000}},"geometry":{"type":"MultiPolygon","coordinates":[[[[120.443558,22.441245],[120.517584,22.408536],[120.569903,22.361728],[120.640505,22.241347],[120.659209,22.15432],[120.662001,22.066983],[120.651464,22.033165],[120.667691,21.983168],[120.70157,21.927065],[120.743246,21.915569],[120.78155,21.923957],[120.85468,21.883333],[120.87291,21.897387],[120.866482,21.98436],[120.907315,22.033208],[120.904154,22.119757],[120.914955,22.302718],[120.981658,22.528305],[121.015009,22.584168],[121.033292,22.650725],[121.078498,22.669656],[121.170544,22.723133],[121.210481,22.770665],[121.237931,22.836327],[121.324708,22.945666],[121.354687,23.01006],[121.370388,23.084347],[121.409535,23.102669],[121.430294,23.137196],[121.415015,23.195973],[121.440358,23.272096],[121.479558,23.3223],[121.497788,23.419789],[121.521497,23.483198],[121.523078,23.538708],[121.587778,23.76102],[121.621604,23.92075],[121.659381,24.006893],[121.639992,24.064276],[121.643838,24.097713],[121.678085,24.133906],[121.689044,24.174401],[121.809172,24.339055],[121.826717,24.423579],[121.867498,24.478978],[121.885464,24.529677],[121.892524,24.617912],[121.862598,24.671515],[121.837993,24.76015],[121.845053,24.836269],[121.932883,24.938645],[122.012178,25.001469],[121.980776,25.03079],[121.947425,25.031955],[121.917077,25.137908],[121.842155,25.135332],[121.782407,25.160425],[121.750531,25.160716],[121.707327,25.191493],[121.700319,25.226913],[121.655324,25.241859],[121.623026,25.294694],[121.584986,25.308926],[121.535038,25.307515],[121.444415,25.270624],[121.413487,25.238912],[121.371864,25.159885],[121.319281,25.140691],[121.209322,25.127104],[121.133135,25.078728],[121.102102,25.075153],[121.024704,25.040479],[121.009688,24.993649],[120.960899,24.940227],[120.908475,24.852012],[120.892299,24.767526],[120.823753,24.688321],[120.762371,24.658335],[120.688661,24.600678],[120.64277,24.490172],[120.589187,24.432354],[120.546299,24.370413],[120.521009,24.312038],[120.470534,24.24259],[120.451461,24.182691],[120.392029,24.11824],[120.316158,23.984881],[120.278276,23.927798],[120.245768,23.840553],[120.175377,23.807385],[120.102773,23.700981],[120.094817,23.587466],[120.121741,23.504664],[120.107831,23.341264],[120.081434,23.29191],[120.018947,23.073115],[120.029537,23.048623],[120.131382,23.002118],[120.149138,22.896715],[120.200403,22.721101],[120.274272,22.560181],[120.297191,22.531315],[120.443558,22.441245]]],[[[124.542984,25.903911],[124.586346,25.913777],[124.572805,25.93974],[124.541825,25.931031],[124.542984,25.903911]]],[[[123.445286,25.725966],[123.472104,25.713024],[123.508933,25.723237],[123.514834,25.751226],[123.483063,25.768587],[123.444496,25.746514],[123.445286,25.725966]]],[[[119.64597,23.55091],[119.701081,23.550657],[119.678057,23.600041],[119.610089,23.603953],[119.594388,23.577245],[119.566306,23.584732],[119.562565,23.530377],[119.573788,23.505885],[119.609141,23.503864],[119.64597,23.55091]]],[[[123.667207,25.914066],[123.707092,25.916873],[123.678008,25.938667],[123.667207,25.914066]]],[[[119.506031,23.625567],[119.505241,23.575814],[119.472416,23.557136],[119.523207,23.563699],[119.525578,23.624895],[119.506031,23.625567]]],[[[119.49739,23.386683],[119.495125,23.350156],[119.516885,23.349903],[119.49739,23.386683]]],[[[119.557454,23.666474],[119.604083,23.616989],[119.615516,23.660925],[119.586485,23.675974],[119.557454,23.666474]]],[[[121.46823,22.676644],[121.476502,22.64166],[121.513541,22.631833],[121.5147,22.67639],[121.46823,22.676644]]],[[[121.510538,22.087185],[121.507693,22.048523],[121.534089,22.022146],[121.594522,21.995382],[121.604586,22.022699],[121.575028,22.037122],[121.575607,22.084421],[121.510538,22.087185]]],[[[122.097533,25.500168],[122.093581,25.47183],[122.124825,25.475932],[122.097533,25.500168]]],[[[119.421467,23.216684],[119.421309,23.18935],[119.453396,23.217697],[119.421467,23.216684]]],[[[120.355042,22.327259],[120.395454,22.342287],[120.383072,22.355573],[120.355042,22.327259]]]]}}]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,63 @@
.container_nomount{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
box-sizing: border-box;
position: fixed;
width: 100%;
height: 100%;
overflow: hidden;
font-family: 'Poppins', sans-serif;
}
.container_nomount h2{
margin-top: 20px;
font-size: 1.5em;
margin-block-start: 0.83em;
margin-block-end: 0.83em;
margin-inline-start: 0px;
margin-inline-end: 0px;
font-weight: bold;
}
.container_nomount .loading{
width: 80px;
height: 40px;
margin: 0 auto;
margin-top: -40px;
}
.container_nomount .loading span{
display: inline-block;
width: 8px;
height: 100%;
border-radius: 4px;
background: #1890ff;
animation: load 1s ease infinite;
}
@keyframes load{
0%,100%{
height: 40px;
background: #ff3378;
}
50%{
height: 70px;
margin: -15px 0;
background: #1890ff;
}
}
.container_nomount .loading span:nth-child(2){
animation-delay:0.2s;
}
.container_nomount .loading span:nth-child(3){
animation-delay:0.4s;
}
.container_nomount .loading span:nth-child(4){
animation-delay:0.6s;
}
.container_nomount .loading span:nth-child(5){
animation-delay:0.8s;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -0,0 +1,21 @@
<!--
* @Author: daidai
* @Date: 2022-01-12 14:06:47
* @LastEditors: daidai
* @LastEditTime: 2022-03-01 17:55:49
* @FilePath: \web-pc\src\pages\big-screen\App.vue
-->
<template>
<div id="app">
<router-view/>
</div>
</template>
<style lang="scss" scoped>
#app {
width: 100vw;
height: 100vh;
background-color: #03050C;
// overflow: hidden;
}
</style>

View File

@ -0,0 +1,169 @@
/*
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-28 10:25:38
*/
import axios from 'axios';
import UtilVar from "@/config/UtilVar";
import UtilVar1 from "@/config/UtilVar";
import router from '@/router'
let baseUrl = UtilVar1.baseUrl
const CancelToken = axios.CancelToken;
export { baseUrl };
// axios.defaults.withCredentials = true;
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
// 在发送请求之前做些什么 传token
// let token = localStorage.getItem("token");
config.headers.common['Content-Type'] = "application/json;charset=utf-8";
// config.headers.common['token'] = token; //Authorization
return config;
}, function (error) {
// 对请求错误做些什么
console.log(error)
return Promise.reject(error);
});
/**
* @响应拦截
*/
axios.interceptors.response.use(response => {
if (response.status !== 200) {
return Promise.reject(response)
}
/**
* @code 登录过期 token验证失败 根据后端调
*/
if (response.data.code == UtilVar.code) {
// router.push("/login")
}
return response.data
}, error => {
// console.log('axiosError',error);
let err = {
success: false,
msg: "未知异常,请联系管理员!"
}
return Promise.reject(err)
})
let configs_ENC = {
headers: { 'enc': UtilVar.ENC }
}
//处理是否加密数据
let isEncryptionParam = (params) => {
return params
}
export const GET = async (url, params) => {
try {
params = isEncryptionParam(params)
const data = await axios.get(`${baseUrl}${url}`, {
params: params,
headers: configs_ENC.headers
}, configs_ENC);
return data;
} catch (error) {
return error;
}
}
//没有基地址 访问根目录下文件
export const GETNOBASE = async (url, params) => {
try {
const data = await axios.get(url, {
params: params,
});
return data;
} catch (error) {
return error;
}
}
export const POST = async (url, params) => {
try {
params = isEncryptionParam(params)
const data = await axios.post(`${baseUrl}${url}`, params);
return data;
} catch (error) {
return error;
}
}
export const PUT = async (url, params) => {
try {
params = isEncryptionParam(params)
const data = await axios.put(`${baseUrl}${url}`, params, configs_ENC);
return data;
} catch (error) {
return error;
}
}
export const DELETE = async (url, params) => {
// console.log(params)
try {
params = isEncryptionParam(params)
const data = await axios.delete(`${baseUrl}${url}`, { data: params, headers: configs_ENC.headers }, configs_ENC);
return data;
} catch (error) {
return error;
}
}
/**
* @文件类型提交方法
*/
let configs = {
headers: { 'Content-Type': 'multipart/form-data' },
}
export const FILESubmit = async (url, params, config) => {
try {
const data = await axios.post(`${baseUrl}${url}`, params, {
...configs,
cancelToken: new CancelToken(function executor(c) {
config.setCancel && config.setCancel(c)
}),
onUploadProgress: (e) => {
if (e.total > 0) {
e.percent = e.loaded / e.total * 100;
}
// console.log(config)
config.onProgress && config.onProgress(e)
},
});
return data;
} catch (err) {
return err;
}
}
/**
* 下载文档流
* @param {config.responseType} 下载文件流根据后端 配置 arraybuffer || blod
*/
export const FILE = async (config = {}, body, params) => {
try {
const data = await axios({
method: config.method || 'get',
url: `${baseUrl}${config.url}`,
data: body,
params: params,
responseType: config.responseType || 'blob',
onDownloadProgress: (e) => {
// console.log(e,e.currentTarget)
// if (e.currentTarget.response.size > 0) {
// e.percent = e.loaded / e.currentTarget.response.size * 100;
// }
// event.srcElement.getResponseHeader('content-length')
config.onProgress && config.onProgress(e)
},
});
return data;
} catch (err) {
return err;
}
}

View File

@ -0,0 +1,29 @@
import * as API from "../api";
export const paramType ={
'dataset':"/unit/data/select", //数据不分页查询
'big2':"/bigscreen/countDeviceNum", //设备总览
'big3':"/bigscreen/sbtx", //设备提醒
'big4':"/bigscreen/alarmNum", //报警次数
'big5':'/bigscreen/ssyj',//实时预警
'big6':'/bigscreen/installationPlan',// 安装计划
'big7':'/bigscreen/ranking',// 报警排名
'big8':'/bigscreen/centermap',// //中间地图
}
export default {
//查询数据
addService(key,param) {
return API.POST(paramType[key], param)
}
}

View File

@ -0,0 +1,46 @@
/*
* @Author: daidai
* @Date: 2021-12-09 10:47:56
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-27 16:32:31
* @FilePath: \web-pc\src\api\index.js
*/
import { currentList,
currentPage,
currentSave,
currentUpdate,
currentDelete,
currentSelect,
currentSelectList,
currentPOST,
currentGET,
currentApi
} from './modules'
import {
GETNOBASE,
GET
} from './api'
export {
GETNOBASE,
GET
}
export {
currentApi,
currentList,
currentPage,
currentSave,
currentUpdate,
currentDelete,
currentSelect,
currentSelectList,
currentPOST,
currentGET
}

View File

@ -0,0 +1,97 @@
/*
* @Author: daidai
* @Date: 2021-12-23 11:18:37
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-28 15:10:45
* @FilePath: \web-pc\src\api\modules\index.js
*/
import * as API from "../api";
export const paramType ={
'big1':"/bigscreen/countUserNum", //用户总览
'big2':"/bigscreen/countDeviceNum", //设备总览
'big3':"/bigscreen/sbtx", //设备提醒
'big4':"/bigscreen/alarmNum", //报警次数
'big5':'/bigscreen/ssyj',//实时预警
'big6':'/bigscreen/installationPlan',// 安装计划
'big7':'/bigscreen/ranking',// 报警排名
'big8':'/bigscreen/centermap',// //中间地图
}
/****************** 通用增删改查 ********************* */
/**
* 通用列表
* @param {*} param
*/
export const currentList = (key,param)=> {
return API.GET(paramType[key]+"/list", param)
}
export const currentPage = (key,param)=> {
return API.GET(paramType[key]+"/page", param)
}
/**
* 查询可选择的列表
* @param {*} param
*/
export const currentSelectList= (key,param)=> {
return API.GET(paramType[key]+"/selectList", param)
}
/**
* 通用新增
* @param {*} param
*/
export const currentSave= (key,param)=> {
return API.POST(paramType[key]+"/save", param)
}
/**
* 通用修改
* @param {*} param
*/
export const currentUpdate= (key,param) => {
return API.POST(paramType[key]+"/update", param)
}
/**
* 通用删除
* @param {*} param
*/
export const currentDelete= (key,param) => {
return API.POST(paramType[key]+"/delete", param)
}
/**
* 通用获取所有不分页
* @param {*} param
*/
export const currentSelect= (key,param)=> {
return API.GET(paramType[key]+"/select", param)
}
/**
* 通用GET
* @param {*} param
*/
export const currentGET= (key,param)=> {
return API.GET(paramType[key], param)
}
/**
* 通用POST
* @param {*} param
*/
export const currentPOST= (key,param)=> {
return API.POST(paramType[key], param)
}
// 通用接口集合
export const currentApi={
currentList,
currentPage,
currentSave,
currentUpdate,
currentDelete,
currentSelect,
currentSelectList,
currentPOST,
currentGET
}

View File

@ -0,0 +1,361 @@
@import "./modules/reset.scss";
@import "./modules/variables.scss";
@import './theme/index.css';
@import '../iconfont//iconfont.css';
[class*=" blq-icon-"],
[class^=blq-icon-] {
font-family: iconfont !important;
speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: middle;
display: inline-block;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale
}
*,
:after,
:before {
box-sizing: content-box;
}
.clearfix {
&::after {
content: "";
display: table;
height: 0;
line-height: 0;
visibility: hidden;
clear: both;
}
}
.contents {
width: 100%;
display: flex;
min-height: calc(100% - 60px);
justify-content: space-between;
}
.beautify-scroll-def {
overflow-y: auto;
&::-webkit-scrollbar-thumb {
//滚动条的设置
background-color: rgba(14, 59, 150, 0);
background-clip: padding-box;
border-radius: 4px;
}
&:hover {
&::-webkit-scrollbar-thumb {
//滚动条的设置
background-color: rgba(14, 59, 150, 0.5);
background-clip: padding-box;
border-radius: 4px;
}
}
&::-webkit-scrollbar-track-piece {
//滚动条凹槽的颜色还可以设置边框属性
background-color: transparent;
}
&::-webkit-scrollbar {
//滚动条的宽度
width: 8px;
height: 8px;
}
&::-webkit-scrollbar-thumb:hover {
background-color: rgba(14, 59, 150, .8);
}
}
.orderNum {
// min-width: 22px;
// height: 22px;
// background: #00b8ff;
// border-radius: 50%;
// text-align: center;
// line-height: 22px;
// font-size: 13px;
// font-weight: 900;
// color: #0f2854;
color: #00b8ff;
}
.yh-big-input {
width: 253px;
height: 14px;
background: transparent;
border: 1px solid rgba(255, 255, 255, .53);
border-radius: 4px;
color: #fff;
padding: 6px 10px;
font-size: 14px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
&:focus {
outline: none;
border-color: #31abe3;
}
}
.yh-big-el-input {
width: 253px;
font-size: 14px;
.el-input__inner {
padding: 6px 10px;
border: 1px solid rgba(255, 255, 255, .53);
background-color: transparent;
font-size: 14px;
line-height: 1;
color: #fff;
&:hover{
border-color: rgba(255, 255, 255, .8);
}
&:focus {
outline: none;
border-color: #31abe3;
}
}
}
.yh-big-button {
width: 53px;
height: 26px;
background: #00b1d6;
border-radius: 4px;
// border-color: #00b1d6;
border-width: 1px;
border: none;
cursor: pointer;
color: #fff;
font-size: 15px;
&:hover,
&:focus {
// border-color: #0597b4;
background: #0597b4;
}
}
//浮动
.float-r {
float: right;
}
//浮动
.float-l {
float: left;
}
// 字体加粗
.fw-b {
font-weight: bold;
}
//文章一行显示多余省略号显示
.title-item {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
//表格样式重置
.ve-table {
$border-color: #525371;
// $border-color: rgba(255, 255, 255, .43);
box-sizing: border-box;
.ve-table-container {
&::-webkit-scrollbar-track-piece {
//滚动条凹槽的颜色还可以设置边框属性
background-color: transparent;
}
&::-webkit-scrollbar {
//滚动条的宽度
width: 8px;
height: 8px;
}
&::-webkit-scrollbar-thumb {
//滚动条的设置
background-color: rgba(14, 59, 150, 0.5);
background-clip: padding-box;
border-radius: 4px;
}
&::-webkit-scrollbar-thumb:hover {
background-color: rgba(14, 59, 150, .8);
}
.ve-table-content {
&::after {
content: "";
position: absolute;
top: 0;
right: 0px;
width: 1px;
height: 100%;
background-color: $border-color;
z-index: 20;
}
}
}
&.ve-table-border-around {
border-color: $border-color;
}
.ve-table-container table.ve-table-content thead.ve-table-header tr.ve-table-header-tr {
height: 34px;
box-sizing: border-box;
th.ve-table-header-th {
background: #04004E;
color: #FFF;
border-color: $border-color;
box-sizing: border-box;
line-height: 1;
}
}
.ve-table-container table.ve-table-content tbody.ve-table-body {
tr.ve-table-body-tr td.ve-table-body-td,
tr.ve-table-expand-tr td.ve-table-body-td,
tr.ve-table-body-tr td.ve-table-expand-td,
tr.ve-table-expand-tr td.ve-table-expand-td {
background: transparent;
color: #FFF;
border-color: $border-color;
box-sizing: border-box;
}
tr.ve-table-body-tr,
tr.ve-table-expand-tr {
height: 34px;
box-sizing: border-box;
}
&.ve-table-row-hover tr.ve-table-body-tr:hover td {
background-color: rgba(0, 0, 0, .22);
box-sizing: border-box;
}
}
.ve-table-container .ve-table-border-x th,
.ve-table-container .ve-table-border-x td {
border-color: $border-color;
box-sizing: border-box;
}
}
//颜色
@each $colorkey,
$color in $colors {
.text-#{$colorkey} {
color: $color;
}
.bg-#{$colorkey} {
background-color: $color;
}
}
//对齐
@each $var in (left, center, right) {
.text-#{$var} {
text-align: $var !important;
}
}
//flex
@each $key,
$value in $flex-jc {
.jc-#{$key} {
justify-content: $value;
}
}
@each $key,
$value in $flex-ai {
.ai-#{$key} {
align-items: $value;
}
}
//字体
@each $fontkey,
$fontvalue in $font-sizes {
.fs-#{$fontkey} {
font-size: $fontvalue * $base-font-size;
}
}
//.mt-1 => margin top
//spacing
@each $typekey,
$type in $spacing-types {
//.m-1
@each $sizekey,
$size in $spacing-sizes {
.#{$typekey}-#{$sizekey} {
#{$type}: $size * $spacing-base-size;
}
}
//.mx-1
@each $sizekey,
$size in $spacing-sizes {
.#{$typekey}x-#{$sizekey} {
#{$type}-left: $size * $spacing-base-size;
#{$type}-right: $size * $spacing-base-size;
}
.#{$typekey}y-#{$sizekey} {
#{$type}-top: $size * $spacing-base-size;
#{$type}-bottom: $size * $spacing-base-size;
}
}
//.mt-1
@each $directionkey,
$direction in $spacing-directions {
@each $sizekey,
$size in $spacing-sizes {
.#{$typekey}#{$directionkey}-#{$sizekey} {
#{$type}-#{$direction}: $size * $spacing-base-size;
}
}
}
.#{$typekey} {
#{$type}: 0;
}
}

View File

@ -0,0 +1,200 @@
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video,
input {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: normal;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* custom */
a {
color: #7e8c8d;
-webkit-backface-visibility: hidden;
text-decoration: none;
}
li {
list-style: none;
}
body {
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.olControlScaleLineBottom {
display: none;
}
.olControlScaleLineTop {
color: #000 !important;
border-bottom: solid 3px #000 !important;
border-left: solid 2px #000 !important;
border-right: solid 2px #000 !important;
background-color: rgba(255, 255, 255, .4);
font-size: 10px;
text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}
.olControlScaleLine {
z-index: 900 !important;
}
/*清除浮动*/
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-block;}
/* 点击搜索框获取焦点 placeholder消失-开始 */
/* WebKit browsers */
// input:focus::-webkit-input-placeholder {
// color: transparent;
// }
// /* Mozilla Firefox 4 to 18 */
// input:focus:-moz-placeholder {
// color: transparent;
// }
// /* Mozilla Firefox 19+ */
// input:focus::-moz-placeholder {
// color: transparent;
// }
// /* Internet Explorer 10+ */
// input:focus:-ms-input-placeholder {
// color: transparent;
// }
/* 点击搜索框获取焦点 placeholder消失-结束 */

View File

@ -0,0 +1,98 @@
// 颜色
$colors: (
"primary": #1A5CD7,
"info-1": #4394e4,
"info": #4b67af,
"white": #ffffff,
"light": #f9f9f9,
"grey-1": #999999,
"grey": #666666,
"dark-1": #5f5f5f,
"dark": #222222,
"black-1": #171823,
"black": #000000,
"icon": #5cd9e8
);
// 字体大小
$base-font-size: 0.2rem;
$font-sizes: (
xxs: 0.1,
//8px
xs: 0.125,
//10px
sm: 0.2875,
//12px
md: 0.1625,
//13px
lg: 0.175,
//14px
xl: 0.2,
//16px
xxl: 0.225,
//18px
xxxl: 0.25 //20px,,,,
);
// 宽高
.w-100 {
width: 100%;
}
.h-100 {
height: 100%;
}
//flex
.flex {
display: flex;
}
.flex-column {
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-nowrap {
flex-wrap: nowrap;
}
$flex-jc: (
start: flex-start,
end: flex-end,
center: center,
between: space-between,
around: space-around,
evenly: space-evenly,
);
$flex-ai: (
start: flex-start,
end: flex-end,
center: center,
stretch: stretch,
);
.flex-1 {
flex: 1;
}
//.mt-1 => margin top
//spacing
$spacing-types: (
m: margin,
p: padding,
);
$spacing-directions: (
t: top,
r: right,
b: bottom,
l: left,
);
$spacing-base-size: 0.5rem;
$spacing-sizes: (
0: 0,
1: 0.5,
2: 1,
3: 1.5,
4: 2,
5: 2.5,
);

View File

@ -0,0 +1,156 @@
.flex {
display: flex;
}
.flex-direction {
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.align-start {
align-items: flex-start;
}
.align-end {
align-items: flex-end;
}
.align-center {
align-items: center;
}
.align-stretch {
align-items: stretch;
}
.self-start {
align-self: flex-start;
}
.self-center {
align-self: flex-center;
}
.self-end {
align-self: flex-end;
}
.self-stretch {
align-self: stretch;
}
.align-stretch {
align-items: stretch;
}
.justify-start {
justify-content: flex-start;
}
.justify-end {
justify-content: flex-end;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.justify-around {
justify-content: space-around;
}
@for $i from 0 through 12 {
.rdx-flex-#{$i} {
flex: $i;
}
}
@for $i from 9 to 50 {
.rdx-font-#{$i} {
font-size: $i + px;
}
}
@for $i from 2 to 50 {
.rdx-radius-#{$i} {
border-radius: $i + px;
}
}
@for $i from 10 to 50 {
.rdx-line-height-#{$i} {
line-height: $i + px;
}
}
// 定义内外边距历遍1-80
@for $i from 0 through 80 {
// 只要双数和能被5除尽的数
@if $i % 2 == 0 or $i % 5 == 0 {
// 得出u-margin-30或者u-m-30
.rdx-m-#{$i} {
margin: $i + px !important;
}
// 得出u-padding-30或者u-p-30
.rdx-p-#{$i} {
padding: $i + px !important;
}
@each $short, $long in l left, t top, r right, b bottom {
// 缩写版结果如 u-m-l-30
// 定义外边距
.rdx-m-#{$short}-#{$i} {
margin-#{$long}: $i + px !important;
}
// 定义内边距
.rdx-p-#{$short}-#{$i} {
padding-#{$long}: $i + px !important;
}
//自定义左右内边距
.rdx-p-lr-#{$i} {
padding-left:$i + px !important;
padding-right:$i + px !important;
}
//自定义上下内边距
.rdx-p-tb-#{$i} {
padding-top:$i + px !important;
padding-bottom:$i + px !important;
}
}
}
}
i{font-style: normal;}
.position-re{position: relative;}
.position-ab{position: absolute; z-index: 9;}
.position-fixed{position: fixed; background: rgba(92, 116, 143, 0.45); width: 100%; height: 100%; left: 0px; top: 0px; z-index: 10;}
.round{border-radius: 50%;}
.font-strong{font-weight: bold;}
.color-del{color:$del-color}
.color-primary{color: $primary-color;}
.color-remark{color: #666666;}
.color-9{color: #999999;}
.color-green{color: #38a800;}
.bg-white{background-color: white;}
.line-bottom{border-bottom: 1px solid #eeeeee;}
.button-pointer{cursor: pointer;}
.box-shadow-item{box-shadow: 0px 0px 4px 0px rgba(45, 45, 46, 0.1);}
.search-form .search-form-item label {text-align: right; padding-right: 6px;}
.break-all{
word-break: break-all;
}
.blocks{
width: 100%;
height: 100%;
}
.cursor-pointer{
cursor: pointer;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,50 @@
// 颜色
$primary-color: #1890ff;
$primary-color-hl: rgb(41, 52, 67);
$default-color: #006569;
$link: #1890ff;
$active-color: rgb(0, 101, 105);
$del-color: #ff1839;
$content-background: #f3f5fa;
$table-header-background: #d8eaff;
$primary-color-rgba: rgba($color: $primary-color,
$alpha: 0.1,
);
//表格上面button按钮颜色
$table-header-button: #18d1ff;
// 阴影
$primary-shadow: 0 2px 4px rgba(0, 0, 0, 0.12),
0 0 6px rgba(0, 0, 0, 0.04);
$primary-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
$baidu-shadow: 1px 2px 1px rgba(0, 0, 0, 0.15);
$gaode-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2),
0 2px 6px 0 rgba(0, 0, 0, 0.19);
// box-shadow: 0 2px 6px 0 rgb(114 124 245 / 50%);
$primary-border: $primary-color solid 1px;
$tool-top: 20px;
//header 的高度
$index-height: 60px;
$index-content-height: calc(100% - 60px);
$index-tags-height: 36px;
// 宽度侧边栏
$aside-width: 200px;
$content-padding: 16px;
$default-zindex: 99;
/*文本格式化,超出范围,显示省略号*/
@mixin text-overflow($num: 1) {
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: $num;
-webkit-box-orient: vertical;
}

View File

@ -0,0 +1,18 @@
/* @font-face {
font-family: 'webfont';
font-display: swap;
src: url('//at.alicdn.com/t/webfont_c14qx7m7htb.eot');
src:
url('//at.alicdn.com/t/webfont_c14qx7m7htb.woff2') format('woff2'),
url('//at.alicdn.com/t/webfont_c14qx7m7htb.woff') format('woff'),
}
.number-font{
font-family:"webfont" !important;
font-size:16px;font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
} */

View File

@ -0,0 +1,23 @@
@font-face {
font-family: "iconfont"; /* Project id 2995337 */
src: url('iconfont.woff2?t=1638871675242') format('woff2'),
url('iconfont.woff?t=1638871675242') format('woff'),
url('iconfont.ttf?t=1638871675242') format('truetype');
}
/* .iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} */
.blq-icon-shezhi01:before {
content: "\e610";
}
.blq-icon-shezhi02:before {
content: "\e611";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,70 @@
<!--
* @Author: daidai
* @Date: 2022-02-28 16:29:08
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-09-27 15:05:45
* @FilePath: \web-pc\src\pages\big-screen\components\echart\index.vue
-->
<template>
<div :id="id" :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'echart',
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '100%'
},
options: {
type: Object,
default: ()=>({})
}
},
data () {
return {
chart: null
}
},
watch: {
options: {
handler (options) {
// trueechart
this.chart.setOption(options, true)
},
deep: true
}
},
mounted () {
this.initChart();
},
beforeDestroy () {
this.chart.dispose()
this.chart = null
},
methods: {
initChart () {
// echart
this.chart = echarts.init(this.$el)
this.chart.setOption(this.options, true)
}
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,97 @@
<!--
* @Author: daidai
* @Date: 2022-03-01 09:16:22
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-09-29 15:12:34
* @FilePath: \web-pc\src\pages\big-screen\components\item-wrap\item-wrap.vue
-->
<template>
<dv-border-box-13 class="lr_titles">
<div class="item_title" v-if="title !== ''">
<div class="zuo"></div>
<span class="title-inner"> &nbsp;&nbsp;{{ title }}&nbsp;&nbsp; </span>
<div class="you"></div>
</div>
<div
:class="title !== '' ? 'item_title_content' : 'item_title_content_def'"
>
<slot></slot>
</div>
</dv-border-box-13>
</template>
<script>
export default {
data() {
return {};
},
props: {
title: {
type: String,
default: () => "",
},
},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang='scss' scoped>
$item-title-height: 38px;
$item_title_content-height: calc(100% - 38px);
.lr_titles {
box-sizing: border-box;
:deep(.border-box-content) {
box-sizing: border-box;
padding: 6px 16px 0px;
}
.item_title {
height: $item-title-height;
line-height: $item-title-height;
width: 100%;
color: #31abe3;
text-align: center;
// background: linear-gradient(to right, transparent, #0f0756, transparent);
position: relative;
display: flex;
align-items: center;
justify-content: center;
.zuo,
.you {
width: 58px;
height: 14px;
background-image: url("../../assets/img/titles/zuo.png");
}
.you {
transform: rotate(180deg);
}
.title-inner {
font-weight: 900;
letter-spacing: 2px;
background: linear-gradient(
92deg,
#0072ff 0%,
#00eaff 48.8525390625%,
#01aaff 100%
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.item_title_content {
height: $item_title_content-height;
}
.item_title_content_def {
width: 100%;
height: 100%;
}
}
</style>

View File

@ -0,0 +1,43 @@
<template>
<div class='kong'>
<slot></slot>
</div>
</template>
<script>
export default {
components: {},
data() {
return {
};
},
props:{
data:{
type:Array,
default:()=>[]
}
},
computed: {},
methods: {
init(){
},
},
created() {
},
mounted() {
},
beforeDestroy() {
},
}
</script>
<style lang='scss' scoped>
.kong{
width: 100%;
height: 100%;
}
</style>

View File

@ -0,0 +1,49 @@
/*
* @Author: daidai
* @Date: 2022-02-16 17:08:26
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-25 10:12:36
* @FilePath: \yhht-ui\yhht-ui\packagesEle\getXY\src\main.js
*/
import Vue from 'vue';
import Main from './message.vue';
import {isObject,isVNode} from '@/lib/types'
let Message = Vue.extend(Main);
let instance;
var message = function (options) {
if (Vue.prototype.$isServer) return;
if(!instance){
instance = new Message({
data: {
...options
},
});
instance.$mount();
}
instance.destroy=()=>{
document.body.removeChild(instance.$el);
instance&&instance.$destroy()
instance=null
return null
}
instance.init(options)
document.body.appendChild(instance.$el);
return instance;
};
['success', 'warning', 'info', 'error'].forEach(type => {
message[type] = (options) => {
if (isObject(options) && !isVNode(options)) {
return message({
...options,
type
});
}
return message({
type,
text: options
});
};
});
export default message;

View File

@ -0,0 +1,74 @@
<!--
* @Author: daidai
* @Date: 2022-03-02 17:07:40
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-26 11:41:27
* @FilePath: \web-pc\src\pages\big-screen\components\message\message.vue
-->
<template>
<div class="messages" v-if="visible">
<svg fill="none" viewBox="0 0 16 16" width="1em" height="1em" class="message-icon">
<path fill="currentColor" d="M15 8A7 7 0 101 8a7 7 0 0014 0zM8.5 4v5.5h-1V4h1zm-1.1 7h1.2v1.2H7.4V11z"
fill-opacity="0.9" v-if="'warning'==type"></path>
</svg>
{{ text }}
</div>
</template>
<script>
export default {
data() {
return {
visible: false,
text: "",
type:'warning'
};
},
props: {},
created() { },
mounted() { },
methods: {
init(param) {
clearTimeout(this.timer);
this.visible = true;
this.text = param.text || "";
this.type = param.type || "success";
this.timer = setTimeout(() => {
this.visible = false;
clearTimeout(this.timer);
}, 2000);
},
},
};
</script>
<style lang='scss' scoped>
.messages {
position: fixed;
min-width: 200px;
top: 160px;
left: 50%;
transform: translate(-50%, 0);
border: solid 1px #4b4b4b;
// box-shadow: 0 16px 24px rgba(0, 0, 0, 0.14), 0 6px 30px rgba(0, 0, 0, 12%),
// 0 8px 10px rgba(0, 0, 0, 20%), inset 0 0.5px 0 #5e5e5e,
// inset 0.5px 0 0 #5e5e5e, inset 0 -0.5px 0 #5e5e5e, inset -0.5px 0 0 #5e5e5e;
width: fit-content;
border-radius: 6px;
display: flex;
align-items: center;
z-index: 999;
color: rgba(255, 255, 255, 0.9);
background-color: #242424;
line-height: 22px;
font-size: 14px;
padding: 13px 16px;
.message-icon {
color: #cf6e2d;
font-size: 20px;
margin-right: 8px;
fill: currentColor;
}
}
</style>

View File

@ -0,0 +1,64 @@
<template>
<div class='reacquire flex justify-center blocks cursor-pointer' :style="{ lineHeight: lineHeight }"
@click="getData">
<span>
重新获取
</span>
</div>
</template>
<script>
export default {
components: {},
props: {
lineHeight: {
type: String,
default: '200px'
}
},
data() {
return {
};
},
computed: {},
methods: {
init() {
},
getData(e){
this.$emit("onclick",e)
}
},
created() {
},
mounted() {
},
beforeDestroy() {
},
}
</script>
<style lang='scss' scoped>
.reacquire {
user-select:none;
color: rgb(168, 168, 168);
span:hover{
color:$primary-color ;
text-decoration: underline;
}
}
.blocks {
width: 100%;
height: 100%;
}
.cursor-pointer {
cursor: pointer;
}
</style>

View File

@ -0,0 +1,253 @@
<!--
* @Author: wei
* @description: 大屏自适应容器组件
* @LastEditTime: 2022-09-09 16:42:40
-->
<template>
<!-- <section class="screen-box" :style="boxStyle"> -->
<div class="screen-wrapper" ref="screenWrapper" :style="wrapperStyle">
<slot></slot>
</div>
<!-- </section> -->
</template>
<script>
/**
* 防抖函数
* @param {T} fn
* @param {number} delay
* @return
*/
function debounce(fn, delay) {
let timer = null;
return function (...args) {
timer = setTimeout(
() => {
typeof fn === "function" && fn.apply(null, args);
clearTimeout(timer);
},
delay > 0 ? delay : 100
);
};
}
export default {
name: "VScaleScreen",
props: {
width: {
type: [String, Number],
default: 1920,
},
height: {
type: [String, Number],
default: 1080,
},
fullScreen: {
type: Boolean,
default: false,
},
autoScale: {
type: [Object, Boolean],
default: true,
},
selfAdaption: {
type: Boolean,
default: true,
},
delay: {
type: Number,
default: 500,
},
boxStyle: {
type: Object,
default: () => ({}),
},
wrapperStyle: {
type: Object,
default: () => ({}),
},
},
data() {
return {
currentWidth: 0,
currentHeight: 0,
originalWidth: 0,
originalHeight: 0,
onResize: null,
observer: null,
};
},
watch: {
selfAdaption(val) {
if (val) {
this.resize();
this.addListener();
} else {
this.clearListener();
this.clearStyle();
}
},
},
computed: {
screenWrapper() {
return this.$refs["screenWrapper"];
},
},
methods: {
initSize() {
return new Promise((resolve, reject) => {
// console.log("");
// overflow:hidden
this.screenWrapper.parentNode.style.overflow = "hidden";
this.screenWrapper.parentNode.scrollLeft = 0;
this.screenWrapper.parentNode.scrollTop = 0;
this.$nextTick(() => {
// region
if (this.width && this.height) {
this.currentWidth = this.width;
this.currentHeight = this.height;
} else {
this.currentWidth = this.screenWrapper.clientWidth;
this.currentHeight = this.screenWrapper.clientHeight;
}
// endregion
// region
if (!this.originalHeight || !this.originalWidth) {
this.originalWidth = window.screen.width;
this.originalHeight = window.screen.height;
}
// endregion
resolve();
});
});
},
updateSize() {
if (this.currentWidth && this.currentHeight) {
this.screenWrapper.style.width = `${this.currentWidth}px`;
this.screenWrapper.style.height = `${this.currentHeight}px`;
} else {
this.screenWrapper.style.width = `${this.originalWidth}px`;
this.screenWrapper.style.height = `${this.originalHeight}px`;
}
},
handleAutoScale(scale) {
if (!this.autoScale) return;
const screenWrapper = this.screenWrapper;
const domWidth = screenWrapper.clientWidth;
const domHeight = screenWrapper.clientHeight;
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
screenWrapper.style.transform = `scale(${scale},${scale}) `;
let mx = Math.max((currentWidth - domWidth * scale) / 2, 0);
let my = Math.max((currentHeight - domHeight * scale) / 2, 0);
if (typeof this.autoScale === "object") {
// @ts-ignore
!this.autoScale.x && (mx = 0);
// @ts-ignore
!this.autoScale.y && (my = 0);
}
// console.log({
// mx,
// my,
// currentWidth,
// currentHeight,
// domWidth,
// domHeight,
// scale,
// });
this.screenWrapper.style.margin = `${my}px ${mx}px`;
},
updateScale() {
const screenWrapper = this.screenWrapper;
//
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
// onResize
const realWidth = this.currentWidth || this.originalWidth;
const realHeight = this.currentHeight || this.originalHeight;
//
const widthScale = currentWidth / realWidth;
const heightScale = currentHeight / realHeight;
// console.log({currentWidth, currentHeight,realWidth,realHeight});
//
if (this.fullScreen) {
screenWrapper.style.transform = `scale(${widthScale},${heightScale})`;
return false;
}
//
const scale = Math.min(widthScale, heightScale);
this.handleAutoScale(scale);
},
initMutationObserver() {
const screenWrapper = this.screenWrapper;
const observer = (this.observer = new MutationObserver(() => {
this.onResize();
}));
observer.observe(screenWrapper, {
attributes: true,
attributeFilter: ["style"],
attributeOldValue: true,
});
},
clearListener() {
window.removeEventListener("resize", this.onResize);
},
addListener() {
window.addEventListener("resize", this.onResize);
},
clearStyle() {
// console.log("");
const screenWrapper = this.screenWrapper;
screenWrapper.parentNode.style.overflow = "auto";
screenWrapper.style = "";
},
async resize() {
if (!this.selfAdaption) {
return;
}
await this.initSize();
this.updateSize();
this.updateScale();
},
},
mounted() {
this.onResize = debounce(() => {
this.resize();
}, this.delay);
this.$nextTick(() => {
if (this.selfAdaption) {
this.resize();
this.addListener();
}
});
},
beforeDestroy() {
this.clearListener();
// this.observer.disconnect()
},
};
//
</script>
<style scoped>
.screen-box {
overflow: hidden;
background-size: 100% 100%;
background: #000;
width: 100vw;
height: 100vh;
}
.screen-wrapper {
transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 500ms;
position: relative;
overflow: hidden;
z-index: 100;
transform-origin: left top;
}
</style>

View File

@ -0,0 +1,33 @@
/*
* @Author: daidai
* @Date: 2021-12-06 10:58:24
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-27 16:54:32
* @FilePath: \web-pc\src\config\UtilVar.js
*/
var UtilVar = {
ENC: false, //返回结果是否加密
baseUrl: `http://locolhost:8888`,
code: 401,
}
var UtilVar1 = {
baseUrl: `http://202.202.3.68:52310/gateway/api/v2/thing-data/namespaces/cqu-edu/projects/wind-turbine-gearboxes-phm/things/train_FD001/dataSets`,
// baseUrl: `http://localhost:8002`
}
const runtimeType = {
production: () => {
},
yh:()=>{
},
//开发环境
development: () => {
},
}
runtimeType[process.env.VUE_APP_URL_ENV]()
export default UtilVar1

View File

@ -0,0 +1,11 @@
/*
* @Author: daidai
* @Date: 2022-01-11 15:27:31
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-21 14:32:03
* @FilePath: \web-pc\src\directives\filters.js
*/
export function montionFilter (val) {
// console.log(val);
return val ? Number(val).toFixed(2) : '--'
}

View File

@ -0,0 +1,432 @@
/*
* @Author: daidai
* @Date: 2021-12-06 15:53:24
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-22 09:31:24
* @FilePath: \web-pc\src\lib\currency.js
*/
import router from '@/router'
import { isString, isHtmlElement } from './types'
import UtilVar from "@/config/UtilVar";
export const returnWeek = () => {
var week = new Date().getDay();
switch (week) {
case 1:
return '周一'
case 2:
return '周二'
case 3:
return '周三'
case 4:
return '周四'
case 5:
return '周五'
case 6:
return '周六'
case 0:
return '周日'
}
}
/**
* 获取uuid
*/
export function getUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
return (c === 'x' ? (Math.random() * 16 | 0) : ('r&0x3' | '0x8')).toString(16)
})
}
/**
* 是否有权限
* @param {*} key
*/
export function isAuth(key) {
// console.log("key",key,sessionStorage.getItem('permissions'))
// if(process.env.VUE_APP_CONFIG=="dev"){
// return true
// }
return JSON.parse(sessionStorage.getItem('permissions') || '[]').indexOf(key) !== -1 || false
}
export const rowClassName = ({ row, rowIndex }) => {
if (rowIndex % 2 == 0) {
return 'lightColour';
} else {
return 'DarkColor';
}
}
export const getToken = () => {
return localStorage.getItem("token");
}
//跳转当前页面并传参
export const currentQuery = (param) => {
let newParam = { ...param }
for (let i in newParam) {
if (newParam[i] === "") {
delete newParam[i]
}
}
// console.log(newParam)
router.push({
path: router.currentRoute.path,
query: newParam
})
}
/**
* 树形数据转换
* @param {*} data
* @param {*} id
* @param {*} pid
* @param {*} order
*/
export function treeDataTranslate(data, id, pid, order) {
// console.log(Array.isArray(data))
if (data == null || !Array.isArray(data)) {
return [];
}
if (order) {
data.sort(function (a, b) {
return a[order] - b[order];
})
}
// console.log(data)
var res = []
var temp = {}
for (var i = 0; i < data.length; i++) {
temp[data[i][id]] = data[i]
}
for (var k = 0; k < data.length; k++) {
if (temp[data[k][pid]] && data[k][id] !== data[k][pid]) {
if (!temp[data[k][pid]]['subs']) {
temp[data[k][pid]]['subs'] = []
}
if (!temp[data[k][pid]]['_level']) {
temp[data[k][pid]]['_level'] = 1
}
data[k]['_level'] = temp[data[k][pid]]._level + 1
temp[data[k][pid]]['subs'].push(data[k])
} else {
res.push(data[k])
}
}
// console.log(outurls)
// console.log(res)
return res
}
//带了一个 margin-left
export const dragss = (e, marginleft) => {
let odiv = e.currentTarget.parentElement;
let disX = e.clientX - odiv.offsetLeft;
let disY = e.clientY - odiv.offsetTop;
document.onmousemove = (e) => {
odiv.style.left = e.clientX - disX + marginleft + 'px';
odiv.style.top = e.clientY - disY + 'px';
return false;
};
document.onmouseup = (e) => {
document.onmousemove = null;
document.onmouseup = null;
};
return false;
}
//转base64
export const turnStr = (data) => {
return window.btoa(window.encodeURI(JSON.stringify(data)));
}
// 验证只能输入数字和小数小数且只能输入2位第一位不能输入小数点
// .replace(/[^\d.]/g, '')
// .replace(/\.{2,}/g, '.')
// .replace('.', '$#$')
// .replace(/\./g, '')
// .replace('$#$', '.')
// .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
// .replace(/^\./g, '')
/**
* 清除登录信息
*/
export function clearLoginInfo() {
router.options.isAddDynamicMenuRoutes = false;
localStorage.removeItem('token')
sessionStorage.removeItem("menuList")
sessionStorage.removeItem("permissions")
}
//对象拼成路径传参
export const convertObj = (data) => {
var _result = [];
for (var key in data) {
var value = data[key];
if (value.constructor == Array) {
value.forEach(function (_value) {
_result.push(key + "=" + _value);
});
} else {
_result.push(key + '=' + value);
}
}
return _result.join('&');
}
//判断浏览器
function getExplorer() {
var explorer = window.navigator.userAgent;
if (explorer.indexOf('MSIE') >= 0) {
return 'ie'; // ie
} else if (explorer.indexOf('Firefox') >= 0) {
return 'Firefox'; // firefox
} else if (explorer.indexOf('Chrome') >= 0) {
return 'Chrome'; // Chrome
} else if (explorer.indexOf('Opera') >= 0) {
return 'Opera'; // Opera
} else if (explorer.indexOf('Safari') >= 0) {
return 'Safari'; // Safari
} else if (!!explorer.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
return 'IOS';
} else if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
return 'Android';
} else {
return explorer
}
};
//导出文档流
export const exportFile = (data, name) => {
return new Promise((resolve, reject) => {
let types = getExplorer()
if (types == 'IOS') {
resolve({
success: false,
msg: "请使用设备自带浏览器导出!"
})
return
}
if (data.type && data.type.indexOf('application/vnd.ms-excel') >= 0) {
// console.log(data)
try {
let blob = new Blob([data], {
type:data.type|| 'application/vnd.ms-excel;charset=UTF-8'
})
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(blob, name);
} else {
const link = document.createElement('a')
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
if (types == 'Safari') {
link.download = `${name || "未命名"}`;
} else {
link.download = `${name || "未命名"}.xlsx`;
}
// Safari thinks _blank anchor are pop ups. We only want to set _blank
// target if the browser does not support the HTML5 download attribute.
// This allows you to download files in desktop safari if pop up blocking
// is enabled.
if (typeof link.download === 'unde fined') {
tempLink.setAttribute('target', '_blank');
}
document.body.appendChild(link)
link.click()
// Fixes "webkit blob resource error 1"
let timer = setTimeout(function () {
document.body.removeChild(link)
window.URL.revokeObjectURL(link.href);
clearTimeout(timer)
}, 200)
}
resolve({
success: true,
msg: "导出成功"
})
} catch (error) {
resolve({
success: false,
msg: "未知异常,请联系管理员!"
})
}
} else {
// console.log(data)
readFile(data).then(res => {
resolve(res)
}).catch(err => {
resolve({
success: false,
msg: "未知异常,请联系管理员!"
})
})
}
})
}
//阅读 blod
export const readFile = (data) => {
return new Promise((resole, reject) => {
if (Object.prototype.toString.call(data)==='[object Blob]') {
let reader = new FileReader()
reader.readAsText(data, 'utf-8')
reader.onload = (e) => {
console.log('--导出--', JSON.parse(reader.result))
let result = JSON.parse(reader.result)
if (result.code == UtilVar.code) {
router.push("/login")
}
resole(result)
}
} else {
resole(data)
}
// reader.readAsText(data)
})
}
//element 时间选择
export const shortcuts = [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 89);
picker.$emit('pick', [start, end]);
}
}]
export const pickerOptions = {
shortcuts: shortcuts
}
/**
* 清除相同
* @param {*} origin
* @param {*} target
*/
export const ArrayCleanRepeat = (origin, target) => {
if (target) origin = origin.concat(target);
const result = []
const tagObj = {}
for (const i of origin) {
if (!tagObj[i]) {
result.push(i)
tagObj[i] = 1
}
}
return result
}
/**
* @description:
* @param {file:Object} 文件
* @return {*}
*/
export const beforeUpoads = (file) => {
// console.log(file)
var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
if (
testmsg != 'png' &&
testmsg != 'jpg' &&
testmsg != 'jpeg' &&
testmsg != 'webp'
) {
// testmsg != 'gif' &&
return {
success: false,
msg: "上传图片格式不正确!"
}
}
const if10M = file.size / 1024 / 1024 < 20
if (!if10M) {
return {
success: false,
msg: "上传图片大小不能超过20M!"
}
}
// console.log("上传前",file, this.filelist)
return {
success: true
}
}
//复制文字
export const copy = (value) => {
let transfer = document.createElement('input')
document.body.appendChild(transfer)
transfer.value = value // 这里表示想要复制的内容
transfer.focus()
transfer.select()
if (document.execCommand('copy')) {
document.execCommand('copy')
}
transfer.blur()
document.body.removeChild(transfer)
//选中文字
// let range = document.createRange()
// let referenceNode = this.$refs.xy
// range.selectNodeContents(referenceNode)
// var selection = window.getSelection()
// selection.removeAllRanges()
// selection.addRange(range)
}
// 取出两个数组的不同元素
export const getArrDifference = (arr1, arr2) => {
return arr1.concat(arr2).filter(function (v, i, arr) {
return arr.indexOf(v) === arr.lastIndexOf(v);
});
}
/**
* 表格最大高度
* @param {ElementDom} dom
* @param {Boolean} isPaging 是否拥有分页 false 没有 || true 默认有
* @returns
*/
export const tableHeight = (dom,isPaging=true) => {
//定位父级到文档高度
if (isString(dom)) {
dom = document.querySelector(dom)
// if (dom) {
// return window.innerHeight - top
// }
}
if (isHtmlElement(dom)) {
var parent = dom.offsetParent;
var top = dom.offsetTop
if(isPaging){
top= top+ 63 + 4
}else{
top= top+ 16
}
while (parent != null) {
top += parent.offsetTop;
parent = parent.offsetParent;
};
return window.innerHeight - top
}
return null
}
//

View File

@ -0,0 +1,93 @@
/*
* @Author: daidai
* @Date: 2021-12-16 14:40:18
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-19 14:44:14
* @FilePath: \web-pc\src\lib\dd-moment.js
*/
const DDmoment = function (date) {
let time;
if (!date) {
time = new Date()
}else if(date){
time=new Date(date);
}
return {
time,
format,
subtract,
getTime,
}
}
/**
* @content 前多少天
* @param days || years || months || weeks
* @returns
*/
function subtract(num, type) {
let time = this.time
time.setTime(time.getTime()-getNeedTime(num, type))
time=new Date(time)
return {
time,
format,
getTime
}
}
/**
* @param Yy年 || M || Dd || Hh || m || Ss
* @returns
*/
function format(fmt) {
let date = this.time
let ret;
const opt = {
"Y+": date.getFullYear().toString(), // 年
"y+": date.getFullYear().toString(), // 年
"M+": (date.getMonth() + 1).toString(), // 月
"d+": date.getDate().toString(), // 日
"D+": date.getDate().toString(), // 日
"h+": date.getHours().toString(), // 时
"H+": date.getHours().toString(), // 时
"m+": date.getMinutes().toString(), // 分
"S+": date.getSeconds().toString(), // 秒
"s+": date.getSeconds().toString() // 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for (let k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
};
};
return fmt;
}
//时间戳转时间
function getTime() {
return new Date(this.time)
}
//获取需要的时间
function getNeedTime(num, type) {
let time=0
switch (type) {
case "days":
time= 3600 * 1000 * 24 * num;
break;
case "years":
time=3600 * 1000 * 24 *365 *num;
break;
case "months":
time = 3600 * 1000 * 24 *30* num;
break;
case "weeks":
time= 3600 * 1000 * 24 *7* num;
break;
default:
break;
}
return time;
}
export default DDmoment

View File

@ -0,0 +1,9 @@
import DDmoment from "./dd-moment"
import { colors,colors2 } from "./modules/echarts-options"
import { shortcuts } from "./currency";
export {DDmoment,colors,colors2}
export {
shortcuts
}

View File

@ -0,0 +1,46 @@
/*
* @Author: daidai
* @Date: 2021-12-14 09:15:11
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-25 10:11:04
* @FilePath: \web-pc\src\lib\types.js
*/
export function hasOwn(obj, key) {
return hasOwnProperty.call(obj, key);
};
export function isVNode(node) {
return node !== null && typeof node === 'object' && hasOwn(node, 'componentOptions');
};
// 是否字符串
export function isString2(str) {
return (typeof str == 'string') && str.constructor == String;
}
export function isString(obj) {
return Object.prototype.toString.call(obj) === '[object String]';
}
export function isObject(obj) {
return Object.prototype.toString.call(obj) === '[object Object]';
}
export function isNumber(obj) {
return Object.prototype.toString.call(obj) === '[object Number]';
}
// 是否完整的
export function isDef(val) {
return val !== undefined && val !== null;
}
//
export function isKorean(text) {
const reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
return reg.test(text);
}
export function isHtmlElement(node) {
return node && node.nodeType === Node.ELEMENT_NODE;
}
export const isUndefined = (val) => {
return val === void 0;
};

View File

@ -0,0 +1,51 @@
/*
* @Author: daidai
* @Date: 2022-01-12 14:05:56
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-09-27 14:55:57
* @FilePath: \web-pc\src\pages\big-screen\main.js
*/
import Vue from "vue";
import App from "./App.vue";
import router from './router'
import store from './store'
import {loading,borderBox13,digitalFlop,capsuleChart,borderBox8} from '@jiaminghi/data-view'
import { Radio,Button,RadioGroup } from 'element-ui'
import Echart from './components/echart/index.vue'
import ItemWrap from './components/item-wrap/item-wrap.vue'
import Message from './components/message/message.vue'
import Reacquire from './components/reacquire/reacquire.vue'
import Messages from './components/message/message'
import "vue-easytable/libs/theme-default/index.css";
import '@/assets/css/public.scss'
import "@/assets/css/index.scss"
import * as filters from '@/directives/filters'
require('./mock/mock')//是否使用mock
Vue.config.productionTip = false;
// 自定义组件
Vue.component("Echart",Echart)
Vue.component("ItemWrap",ItemWrap)
Vue.component("Message",Message)
Vue.component("Reacquire",Reacquire)
Vue.prototype.$Message = Messages
// element组件
Vue.use(Radio);
Vue.use(Button);
Vue.use(RadioGroup)
// datav组件
Vue.use(loading)
Vue.use(borderBox13)
Vue.use(borderBox8)
Vue.use(digitalFlop)
Vue.use(capsuleChart)
// 全局数据过滤器
Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");

View File

@ -0,0 +1,233 @@
import Mock from 'mockjs'
//延时200-600毫秒请求到数据
Mock.setup({
timeout: '200-600'
})
const Random = Mock.Random;
// 用户总览
function countUserNum() {
const a = Mock.mock({
success: true,
data: {
offlineNum:'@integer(1, 100)',
lockNum: '@integer(1, 10)',
totalNum:218
}
})
a.data.onlineNum=a.data.totalNum-a.data.offlineNum-a.data.lockNum
return a
}
// 接口第一个参数url第二个参数请求类型第三个参数响应回调
Mock.mock(new RegExp('countUserNum'), 'get', countUserNum)
// /设备总览
function countDeviceNum() {
const a = Mock.mock({
success: true,
data: {
alarmNum: '@integer(100, 1000)',
offlineNum: '@integer(0, 50)',
totalNum:698
}
})
a.data.onlineNum=a.data.totalNum-a.data.offlineNum
return a
}
Mock.mock(new RegExp('countDeviceNum'), 'get', countDeviceNum)
// /设备总览
function sbtx() {
const a = Mock.mock({
success: true,
data: {
"list|20": [
{
provinceName: "@province()",
cityName: '@city()',
countyName: "@county()",
createTime: "@datetime('yyyy-MM-dd HH:mm:ss')",
deviceId: "6c512d754bbcd6d7cd86abce0e0cac58",
"gatewayno|+1": 10000,
"onlineState|1": [0, 1],
}
]
}
})
return a
}
Mock.mock(new RegExp('sbtx'), 'get', sbtx)
//中间地图
function centermap(options) {
let params = parameteUrl(options.url)
if (params.regionCode && params.regionCode != 'china') {
const a = Mock.mock({
success: true,
data: {
"dataList|30": [
{
name: "@city()",
value: '@integer(1, 1000)'
}
],
regionCode: params.regionCode,//-代表中国
}
})
return a
} else {
const a = Mock.mock({
success: true,
data: {
"dataList|8": [
{
name: "@province()",
value: '@integer(1, 1000)'
}
],
regionCode: 'china',
}
})
return a
}
}
Mock.mock(new RegExp('centermap'), 'get', centermap)
// 报警次数
function alarmNum() {
const a = Mock.mock({
success: true,
data: {
dateList:['2021-11', '2021-12', '2022-01', '2022-02', '2022-03',"2022-04"],
"numList|6":[
'@integer(0, 1000)'
],
"numList2|6":[
'@integer(0, 1000)'
]
}
})
return a
}
Mock.mock(new RegExp('alarmNum'), 'get', alarmNum)
// 实时预警
function ssyj() {
const a = Mock.mock({
success: true,
data: {
"list|40":[{
alertdetail: "@csentence(5,10)",
"alertname|1": ["水浸告警","各种报警"],
alertvalue: "@float(60, 200)",
createtime: "2022-04-19 08:38:33",
deviceid: null,
"gatewayno|+1": 10000,
phase: "A1",
sbInfo: "@csentence(10,18)",
"terminalno|+1": 100,
provinceName: "@province()",
cityName: '@city()',
countyName: "@county()",
}],
}
})
return a
}
Mock.mock(new RegExp('ssyj'), 'get', ssyj)
//安装计划
function installationPlan() {
let num= RandomNumBoth(26,32);
const a = Mock.mock({
["category|"+num]:["@city()"],
["barData|"+num]:["@integer(10, 100)"],
})
let lineData=[],rateData=[];
for (let index = 0; index < num; index++) {
let lineNum = Mock.mock('@integer(0, 100)')+a.barData[index]
lineData.push(lineNum)
let rate = a.barData[index] / lineNum;
rateData.push((rate*100).toFixed(0))
}
a.lineData=lineData
a.rateData=rateData
return {
success: true,
data:a
}
}
Mock.mock(new RegExp('installationPlan'), 'get', installationPlan)
//报警排名
function ranking() {
//多生成几个避免重复 重复会报错
let num =Mock.mock({"list|48":[{ value:"@integer(50,1000)",name:"@city()"}]}).list
// console.log(num);
let newNum =[],numObj={}
num.map(item=>{
if(!numObj[item.name] && newNum.length<8){
numObj[item.name] =true
newNum.push(item)
}
})
let arr = newNum.sort((a,b)=>{
return b.value-a.value
})
let a ={
success:true,
data:arr
}
return a
}
Mock.mock(new RegExp('ranking'), 'get', ranking)
/**
* @description: min r max 随机数
* @param {*} Min
* @param {*} Max
* @return {*}
*/
function RandomNumBoth(Min,Max){
var Range = Max - Min;
var Rand = Math.random();
var num = Min + Math.round(Rand * Range); //四舍五入
return num;
}
/**
* @description: 获取路径参数
* @param {*} url
* @return {*}
*/
function parameteUrl(url) {
var json = {}
if (/\?/.test(url)) {
var urlString = url.substring(url.indexOf("?") + 1);
var urlArray = urlString.split("&");
for (var i = 0; i < urlArray.length; i++) {
var urlItem = urlArray[i];
var item = urlItem.split("=");
console.log(item);
json[item[0]] = item[1];
}
return json;
}
return {};
}

View File

@ -0,0 +1,37 @@
/*
* @Author: daidai
* @Date: 2022-01-12 14:22:29
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-28 14:53:02
* @FilePath: \web-pc\src\pages\big-screen\router\index.js
*/
import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
{
path: '/',
redirect: '/index',
},
{
path: '/home',
name: 'home',
component: () => import(/* webpackChunkName: "LSD.bighome" */ '../views/home.vue'),
children:[
{
path: '/index',
name: 'index',
component: () => import(/* webpackChunkName: "LSD.bighome" */ '../views/indexs/index.vue'),
}
]
},
];
const router = new VueRouter({
mode: "hash",
// base: process.env.BASE_URL,
routes
});
export default router;

Some files were not shown because too many files have changed in this diff Show More