This commit is contained in:
ddmt 2024-10-12 09:08:56 +08:00
parent a5b6ea1206
commit 198886e27b
119 changed files with 16869 additions and 0 deletions

12
.babelrc Normal file
View File

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

6
.env.dev Normal file
View File

@ -0,0 +1,6 @@
NODE_ENV = development
VUE_APP_URL_ENV = development
VUE_APP_CONFIG=dev
VUE_APP_outputDir = development
VUE_APP_BASE_URL = 'http://localhost:9090'

6
.env.production Normal file
View File

@ -0,0 +1,6 @@
NODE_ENV = production
VUE_APP_URL_ENV = production
VUE_APP_CONFIG=pro
VUE_APP_outputDir = dist3
VUE_APP_BASE_URL = '/prod-api'

4
.env.yh Normal file
View File

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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

12
bin/build.bat Normal file
View File

@ -0,0 +1,12 @@
@echo off
echo.
echo [信息] 打包Web工程生成dist文件。
echo.
%~d0
cd %~dp0
cd ..
npm run build:prod
pause

12
bin/run-web.bat Normal file
View File

@ -0,0 +1,12 @@
@echo off
echo.
echo [信息] 使用 Vue 运行 Web 工程。
echo.
%~d0
cd %~dp0
cd ..
npm run dev
pause

12612
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

37
package.json Normal file
View File

@ -0,0 +1,37 @@
{
"name": "web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve --mode dev",
"start": "vue-cli-service serve --mode dev ",
"build:prod": "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",
"axios": "^0.21.0",
"element-ui": "^2.14.1",
"sass": "^3.32.0",
"vue": "^2.6.12",
"vue-easytable": "^2.14.0",
"vue-router": "^3.4.9",
"vue-seamless-scroll": "^1.1.23",
"vuex": "^3.6.0"
},
"devDependencies": {
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-plugin-component": "^1.1.1",
"mockjs": "^1.1.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

BIN
public/favicon-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

40
public/index.html Normal file
View File

@ -0,0 +1,40 @@
<!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-small.png">
<link href="./style.css" rel="stylesheet">
<script src="./js/echarts.min.js"></script>
<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>

45
public/js/echarts.min.js vendored Normal file

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

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 one or more lines are too long

63
public/style.css Normal file
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;
}

BIN
public/test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

21
src/App.vue Normal file
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>

0
src/api/api.js Normal file
View File

0
src/api/index.js Normal file
View File

0
src/api/modules/index.js Normal file
View File

361
src/assets/css/index.scss Normal file
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,
);

156
src/assets/css/public.scss Normal file
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;
}

Binary file not shown.

Binary file not shown.

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/assets/img/frame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/assets/img/guang.png Normal file

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

BIN
src/assets/img/page_bg.png Normal file

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

BIN
src/assets/img/top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
src/assets/img/xieyou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/img/xiezuo.png Normal file

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,40 @@
<!--
* @Author: daidai
* @Date: 2022-02-28 16:29:08
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-25 15:45:57
* @FilePath: \web-pc\src\pages\big-screen\components\echart\index.vue
-->
<template>
</template>
<script>
export default {
name: 'echart',
props: {
},
data () {
return {
}
},
watch: {
},
mounted () {
},
beforeDestroy () {
},
methods: {
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,490 @@
{
"color": [
"#2d8cf0",
"#19be6b",
"#ff9900",
"#E46CBB",
"#9A66E4",
"#ed3f14"
],
"backgroundColor": "rgba(0,0,0,0)",
"textStyle": {},
"title": {
"textStyle": {
"color": "#516b91"
},
"subtextStyle": {
"color": "#93b7e3"
}
},
"line": {
"itemStyle": {
"normal": {
"borderWidth": "2"
}
},
"lineStyle": {
"normal": {
"width": "2"
}
},
"symbolSize": "6",
"symbol": "emptyCircle",
"smooth": true
},
"radar": {
"itemStyle": {
"normal": {
"borderWidth": "2"
}
},
"lineStyle": {
"normal": {
"width": "2"
}
},
"symbolSize": "6",
"symbol": "emptyCircle",
"smooth": true
},
"bar": {
"itemStyle": {
"normal": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
},
"emphasis": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
}
}
},
"pie": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"scatter": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"boxplot": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"parallel": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"sankey": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"funnel": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"gauge": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"candlestick": {
"itemStyle": {
"normal": {
"color": "#edafda",
"color0": "transparent",
"borderColor": "#d680bc",
"borderColor0": "#8fd3e8",
"borderWidth": "2"
}
}
},
"graph": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"lineStyle": {
"normal": {
"width": 1,
"color": "#aaa"
}
},
"symbolSize": "6",
"symbol": "emptyCircle",
"smooth": true,
"color": [
"#2d8cf0",
"#19be6b",
"#f5ae4a",
"#9189d5",
"#56cae2",
"#cbb0e3"
],
"label": {
"normal": {
"textStyle": {
"color": "#eee"
}
}
}
},
"map": {
"itemStyle": {
"normal": {
"areaColor": "#f3f3f3",
"borderColor": "#516b91",
"borderWidth": 0.5
},
"emphasis": {
"areaColor": "rgba(165,231,240,1)",
"borderColor": "#516b91",
"borderWidth": 1
}
},
"label": {
"normal": {
"textStyle": {
"color": "#000"
}
},
"emphasis": {
"textStyle": {
"color": "rgb(81,107,145)"
}
}
}
},
"geo": {
"itemStyle": {
"normal": {
"areaColor": "#f3f3f3",
"borderColor": "#516b91",
"borderWidth": 0.5
},
"emphasis": {
"areaColor": "rgba(165,231,240,1)",
"borderColor": "#516b91",
"borderWidth": 1
}
},
"label": {
"normal": {
"textStyle": {
"color": "#000"
}
},
"emphasis": {
"textStyle": {
"color": "rgb(81,107,145)"
}
}
}
},
"categoryAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#fff"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"valueAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#fff"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"logAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#999999"
}
},
"splitLine": {
"show": true,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"timeAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#999999"
}
},
"splitLine": {
"show": true,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"toolbox": {
"iconStyle": {
"normal": {
"borderColor": "#999"
},
"emphasis": {
"borderColor": "#666"
}
}
},
"legend": {
"textStyle": {
"color": "#fff"
}
},
"tooltip": {
"axisPointer": {
"lineStyle": {
"color": "#ccc",
"width": 1
},
"crossStyle": {
"color": "#ccc",
"width": 1
}
}
},
"timeline": {
"lineStyle": {
"color": "#8fd3e8",
"width": 1
},
"itemStyle": {
"normal": {
"color": "#8fd3e8",
"borderWidth": 1
},
"emphasis": {
"color": "#8fd3e8"
}
},
"controlStyle": {
"normal": {
"color": "#8fd3e8",
"borderColor": "#8fd3e8",
"borderWidth": 0.5
},
"emphasis": {
"color": "#8fd3e8",
"borderColor": "#8fd3e8",
"borderWidth": 0.5
}
},
"checkpointStyle": {
"color": "#8fd3e8",
"borderColor": "rgba(138,124,168,0.37)"
},
"label": {
"normal": {
"textStyle": {
"color": "#8fd3e8"
}
},
"emphasis": {
"textStyle": {
"color": "#8fd3e8"
}
}
}
},
"visualMap": {
"color": [
"#516b91",
"#59c4e6",
"#a5e7f0"
]
},
"dataZoom": {
"backgroundColor": "rgba(0,0,0,0)",
"dataBackgroundColor": "rgba(255,255,255,0.3)",
"fillerColor": "rgba(167,183,204,0.4)",
"handleColor": "#a7b7cc",
"handleSize": "100%",
"textStyle": {
"color": "#333"
}
},
"markPoint": {
"label": {
"normal": {
"textStyle": {
"color": "#eee"
}
},
"emphasis": {
"textStyle": {
"color": "#eee"
}
}
}
}
}

View File

@ -0,0 +1,28 @@
<!--
* @Author: daidai
* @Date: 2022-03-01 09:16:22
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-05-07 11:06:23
* @FilePath: \web-pc\src\pages\big-screen\components\item-wrap\item-wrap.vue
-->
<template>
</template>
<script>
export default {
data() {
return {};
},
props: {
},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang='scss' scoped>
</style>

43
src/components/kong.vue Normal file
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,34 @@
<template>
</template>
<script>
export default {
components: {},
props: {
},
data() {
return {
};
},
computed: {},
methods: {
},
created() {
},
mounted() {
},
beforeDestroy() {
},
}
</script>
<style lang='scss' scoped>
</style>

22
src/config/UtilVar.js Normal file
View File

@ -0,0 +1,22 @@
var UtilVar = {
ENC: false, //返回结果是否加密
baseUrl: process.env.VUE_APP_BASE_URL,
code: 401,
}
const runtimeType = {
production: () => {
},
yh: () => {
},
//开发环境
development: () => {
},
}
runtimeType[process.env.VUE_APP_URL_ENV]()
export default UtilVar

11
src/directives/filters.js Normal file
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) : '--'
}

432
src/lib/currency.js Normal file
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
}
//

93
src/lib/dd-moment.js Normal file
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

9
src/lib/index.js Normal file
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
}

46
src/lib/types.js Normal file
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;
};

44
src/main.js Normal file
View File

@ -0,0 +1,44 @@
import Vue from "vue";
import App from "./App.vue";
import router from './router'
import store from './store'
import { loading, borderBox13, digitalFlop, capsuleChart, borderBox8, scrollBoard } 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)
Vue.use(scrollBoard)
// 全局数据过滤器
Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");

230
src/mock/mock.js Normal file
View File

@ -0,0 +1,230 @@
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",
materialName: '发动机@increment()',
warehouse: '成品库@increment()',
"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 != -1) {
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: -1,//-代表中国
}
})
return a
}
}
Mock.mock(new RegExp('centermap'), 'get', centermap)
// 报警次数
function alarmNum() {
const a = Mock.mock({
success: true,
data: {
dateList: ['2021-1', '2021-2', '2021-3', '2021-4', '2021-5', "2021-6"],
"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": [{
materialName: '产品@increment()',
materialModel: '型号@increment()',
materialSpecification: '规格@increment()',
materialUnit: '单位@increment()',
inventory: '@integer(60, 1000)',
finishQuantity: '@integer(60, 1000)',
requisitionQuantity: '@integer(60, 1000)',
productQuantity: '@integer(60, 1000)',
}],
}
})
return a
}
Mock.mock(new RegExp('ssyj'), 'get', ssyj)
//安装计划
function installationPlan() {
let num = 12;
const a = Mock.mock({
category: ["2022-1", "2022-2", "2022-3", "2022-4", "2022-5", "2022-6", "2022-7", "2022-8", "2022-9", "2022-10", "2022-11", "2022-12"],
barData: ["@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@integer(10, 100)", "@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: "客户@increment()" }] }).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 {};
}

36
src/router/index.js Normal file
View File

@ -0,0 +1,36 @@
/*
* @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;

37
src/store/index.js Normal file
View File

@ -0,0 +1,37 @@
/*
* @Author: your name
* @Date: 2021-07-26 09:32:49
* @LastEditTime: 2022-04-26 09:12:33
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \web-pc\src\pages\big-screen\store\index.js
*/
import Vuex from 'vuex';
import Vue from 'vue';
Vue.use(Vuex)
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName]=value.default
modules[moduleName].namespaced = true; //打开命名空间
return modules
}, {})
export default new Vuex.Store({
modules,
state: {
},
mutations: {
setCollapsed(state,value){
},
},
actions: {
getUserdata({commit}){
},
},
})

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