Commit 00438664 authored by 张牧越's avatar 张牧越

初始化提交

parents
NODE_ENV = "development"
Mock: true
VUE_APP_API_URL = "http://detectapi.cnjsjd.net"
VUE_APP_CIVIL_API_URL = ""
NODE_ENV = "production"
Mock: false
VUE_APP_API_URL = "http://detectapi.cnjsjd.net"
VUE_APP_CIVIL_API_URL = "http://dhjc.vnet1000.net"
\ No newline at end of file
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
parserOptions: {
parser: '@babel/eslint-parser'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
//在rules中添加自定义规则
//关闭组件命名规则
"vue/multi-word-component-names": "off",
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}
.DS_Store
node_modules
/dist
dist.zip
# 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?
# digital-construction
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}
This diff is collapsed.
{
"name": "digital-construction",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"autoprefixer": "^10.4.14",
"axios": "^1.3.4",
"core-js": "^3.8.3",
"echarts": "^5.4.2",
"element-ui": "^2.15.13",
"js-md5": "^0.8.3",
"lib-flexible": "^0.3.2",
"precss": "^4.0.0",
"video.js": "^8.0.4",
"videojs-contrib-hls": "^5.15.0",
"vue": "^2.6.14",
"vue-calendar-component": "^2.8.2",
"vue-router": "^3.5.2",
"vue-seamless-scroll": "^1.1.23",
"vue-video-player": "^5.0.1",
"vuex": "^3.6.2"
},
"postcss": {
"plugins": {
"autoprefixer": {},
"precss": {}
}
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"less": "^4.1.3",
"less-loader": "^11.1.0",
"postcss-plugin-px2rem": "^0.8.1",
"px2rem-loader": "^0.1.9",
"style-resources-loader": "^1.5.0",
"vue-cli-plugin-style-resources-loader": "^0.1.5",
"vue-template-compiler": "^2.6.14"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
<!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">
<title>
水利工程质量动态评估系统
</title>
<style>
.el-icon-loading {
font-size: 30px !important;
}
.el-loading-text {
font-size: 16px !important;
}
.amap-logo {
display: none !important;
}
.amap-copyright {
opacity: 0 !important;
}
.el-loading-mask {
z-index: 99999 !important;
}
</style>
</head>
<body style="height: 100vh;">
<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>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
const debounce = (fn, delay) => {
let timer = null;
return function () {
let context = this;
let args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {
fn.apply(context, args);
}, delay);
};
};
const _ResizeObserver = window.ResizeObserver;
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
constructor(callback) {
callback = debounce(callback, 16);
super(callback);
}
};
import { getUserInfo } from "@/api/index";
export default {
name: "App",
components: {},
data() {
return {
signIn: false,
};
},
methods: {
bodyScale() {
// var deviceHeight = window.innerHeight;
// var scale = deviceHeight / 1080;
// document.body.style.zoom = scale;
// document.body.style.height = (1 / scale) * 100 + "vh";
// document.styleSheets[document.styleSheets.length - 1].insertRule(
// "canvas:not(.amap-layer):not(.amap-labels) {zoom: " +
// Number(1 / scale).toFixed(2) +
// "!important}"
// );
// document.styleSheets[document.styleSheets.length - 1].insertRule(
// "canvas:not(.amap-layer):not(.amap-labels) {transform: scale(" +
// scale +
// ")!important}"
// );
// document.styleSheets[document.styleSheets.length - 1].insertRule(
// "canvas:not(.amap-layer):not(.amap-labels) {transform-origin: 0 0}"
// );
var designW = 1920;
var font_rate = 100;
document.getElementsByTagName("html")[0].style.fontSize =
(document.body.offsetWidth / designW) * font_rate + "px";
document.getElementsByTagName("body")[0].style.fontSize =
(document.body.offsetWidth / designW) * font_rate + "px";
// //监测窗口大小变化
window.addEventListener(
"onorientationchange" in window ? "orientationchange" : "resize",
function () {
document.getElementsByTagName("html")[0].style.fontSize =
(document.body.offsetWidth / designW) * font_rate + "px";
document.getElementsByTagName("body")[0].style.fontSize =
(document.body.offsetWidth / designW) * font_rate + "px";
},
false
);
},
getUserInfo() {
// var op_id = "B0877928-60DF-4CE8-A18C-41954D48B183 ";
if (this.getcookie("op_id")) {
getUserInfo(this.getcookie("op_id")).then((res) => {
if (res.status == 200) {
this.$store.commit("changeUserInfo", res.data[0]);
}
});
}
// getUserInfo(op_id).then((res) => {
// if (res.status == 200) {
// this.$store.commit("changeUserInfo", res.data[0]);
// }
// });
},
getcookie(sname) {
var acookie = document.cookie.split("; ");
for (var i = 0; i < acookie.length; i++) {
var arr = acookie[i].split("=");
if (sname == arr[0]) {
if (arr.length > 1) return unescape(arr[1]);
else return "";
}
}
return "";
},
},
mounted() {
var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1;
if (isChrome) {
}
this.bodyScale();
this.getUserInfo();
},
watch: {
$route(to, from) {
window.location.reload();
},
},
};
</script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
margin: 0px;
}
#app {
height: 100%;
}
/* 滚动条样式 */
*::-webkit-scrollbar {
width: 8px; /* 设置纵轴(y轴)轴滚动条 */
height: 4px; /* 设置横轴(x轴)轴滚动条 */
}
/* 滚动条滑块(里面小方块) */
*::-webkit-scrollbar-thumb {
border-radius: 10px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: rgba(255, 255, 255, 0.3);
}
/* 滚动条轨道 */
*::-webkit-scrollbar-track {
border-radius: 0;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: rgba(0, 0, 0, 0.5);
}
</style>
import request from "@/utils/request"
// 地图数据
export async function getMapData(params) {
return await request({
url: '/site/index/mapcount',
method: 'get',
params
})
}
// 本年问题分析
export async function getYearQuestion(params) {
return await request({
url: '/site/index/yearQuestion',
method: 'get',
params
})
}
// 本年问题等级分析
export async function getLevelQuestion(params) {
return await request({
url: '/site/index/levelQuestion',
method: 'get',
params
})
}
// 本年问题处理分析
export async function getStatusQuestion(params) {
return await request({
url: '/site/index/statusQuestion',
method: 'get',
params
})
}
// 工程问题情况
export async function getProjectQuestion(params) {
return await request({
url: '/site/index/projectQuestion',
method: 'get',
params
})
}
// 区域问题列表
export async function getAreaQuestionByAreaId(areaId) {
return await request({
url: `/site/index/type`,
method: 'get',
params: {
city_id: areaId
}
})
}
// 区域问题列表
export async function getScoreByCity(areaId) {
return await request({
url: `/site/index/type`,
method: 'get',
params: {
city_id: areaId
}
})
}
import request from "@/utils/request"
// import noLoadingrequest from "@/utils/noloadingRequest"
// const getLocationParams = (keyWords) => {
// // 提取路由值(字符串)
// let href = window.location.href;
// // 从占位符开始截取路由(不包括占位符)
// let query = href.substring(href.indexOf("?") + 1);
// // 根据 & 切割字符串
// let vars = query.split("&");
// for (let i = 0; i < vars.length; i++) {
// let pair = vars[i].split("=");
// // 根据指定的参数名去筛选参数值
// if (pair[0] == keyWords) {
// return pair[1];
// }
// }
// return "";
// };
export async function getAccess(data) {
return await request({
url: '/api/access',
method: 'post',
data
})
}
//获取登录信息
export async function getUserInfo(userId) {
return await request({
url: `/api/screen/logininfo/${userId}`,
method: 'get'
})
}
::v-deep .el-dialog__body {
padding: 15px !important;
height: 700px;
}
::v-deep .el-form {
margin-bottom: 10px;
background: #12407F;
padding: 5px 5px 0 5px;
}
::v-deep .el-form-item {
margin-bottom: 5px;
}
::v-deep .el-form-item__content {
line-height: 0;
}
::v-deep .el-form-item__label {
line-height: 30px;
height: 30px;
color: #60FFF6;
}
::v-deep .el-input .el-input__inner {
background: #072350 !important;
border: none !important;
height: 30px !important;
font-size: 14px;
color: rgba(255, 255, 255, 0.7);
}
.inputInfo {
width: 120px;
}
.selectInfo {
width: 150px;
}
::v-deep .el-range-editor.el-input__inner {
height: 30px !important;
background: #072350 !important;
border: none !important;
font-size: 14px;
color: rgba(255, 255, 255, 0.7);
}
::v-deep .el-range-editor .el-range-input {
font-size: 14px;
color: rgba(255, 255, 255, 0.7);
}
::v-deep .el-date-editor .el-range__icon {
line-height: 37px;
}
::v-deep .el-range-editor .el-range-separator {
line-height: 26px;
}
.searchButton {
height: 30px !important;
padding: 0 10px;
background: #37CCC4;
}
/* 表格头部样式 背景颜色 */
::v-deep .el-table th.el-table__cell {
background: #16488b;
color: #01fff5;
font-size: 14px;
}
/* 表格身体背景颜色 */
::v-deep .el-table__body-wrapper {
background-color: #0c3163;
}
::v-deep .el-table tr:nth-child(even) {
background: #0e356b;
}
::v-deep .el-table tr:nth-child(odd) {
background: #0c3163;
}
/* 表格列和行的间距 */
.el-table .el-table__cell {
padding: 7px 0;
}
/* 表格外部 top 和 left 线条 */
::v-deep .el-table--border,
::v-deep .el-table--group {
border-color: #1f4c89;
}
/* 表格外部 right 和 bottom 线条 */
::v-deep .el-table--border::after,
::v-deep .el-table--group::after,
::v-deep .el-table::before {
background-color: #1f4c89;
}
/* 表格头部内部线条 */
::v-deep .el-table th.el-table__cell.is-leaf {
border: 1px solid #1f4c89 !important;
padding: 8px 0;
text-align: center;
}
/* 表格内部样式 线条 */
::v-deep .el-table td.el-table__cell {
border-bottom: 1px solid #1f4c89;
border-right: 1px solid #1f4c89;
color: #ffffff;
font-size: 12px;
}
.pagination {
height: 40px;
background: #0c3163;
border: 1px solid #1f4c89;
display: flex;
align-items: center;
justify-content: end;
}
\ No newline at end of file
@font-face {
font-family: 'kufangti';
src: url('./kufangti.ttf');
}
.amap-info-content {
background: #0f2e68;
border: 1px solid #05B9FD;
padding: 0;
}
.amap-info-close {
color: #fff;
}
.amap-info-sharp {
border: none !important;
}
.amap-info-outer {
border-radius: 8px;
}
\ No newline at end of file
.el-date-editor {
vertical-align: top;
.el-input__inner {
background: #07196e !important;
border: 2px solid #0f57ba !important;
color: #fff !important;
}
.el-input__prefix {
color: #fff !important;
}
}
.el-input {
.el-input__inner {
background: #07196e !important;
border: 2px solid #0f57ba !important;
color: #fff !important;
}
}
.el-range-editor {
line-height: 32px;
&.el-input__inner {
background: #07196e !important;
border: 2px solid #0f57ba !important;
color: #fff !important;
}
.el-range-input {
background: transparent;
color: #fff;
}
.el-range-separator {
color: #fff;
}
.el-input__icon {
color: #fff;
}
}
.el-select {
.el-input__inner {
background: #07196e !important;
border: 2px solid #0f57ba !important;
color: #fff !important;
}
}
.el-dropdown-menu {
background: rgba(8, 34, 68, 0.9);
border: 1px solid #3CD4D4;
}
.el-popper[x-placement^=top] .popper__arrow::after {
border-top-color: rgba(8, 34, 68, 0.9);
}
.el-dropdown-menu {
.el-dropdown-menu__item {
padding: 0;
color: #3DC7C7;
border-bottom: 1px solid rgba(44, 158, 169, 1);
border-image: linear-gradient(90deg, rgba(44, 158, 169, 0) 0%, rgba(44, 158, 169, 1) 50%, rgba(44, 158, 169, 0) 100%) 1;
}
.el-dropdown-menu__item:focus,
.el-dropdown-menu__item:not(.is-disabled):hover {
color: #33ffff;
background: transparent;
}
.el-dropdown-menu__item:last-of-type {
border-bottom: none;
}
}
.el-textarea__inner {
background: #1E499B;
}
.el-dialog__body {
background: #063572;
}
.el-dialog__header {
text-align: center;
padding: 16px 0;
height: 30px;
background: #063B80;
position: relative;
.el-dialog__title {
color: #fff;
z-index: 999;
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%)translateY(-50%);
}
&::after {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 100%;
height: 100%;
// background: url('@/assets/images/dialog-title-bg.png') no-repeat;
background-size: 100% 100%;
transform: translateX(-50%);
z-index: 0;
}
.el-dialog__headerbtn {
z-index: 999
}
}
.el-dialog {
border: 1px solid #107DE5;
border-radius: 10px;
overflow: hidden;
}
.el-form-item__label {
color: #fff;
padding-bottom: 0 !important;
}
.el-dialog__body {
padding: 16px 40px;
}
.el-dialog__close {
font-size: 20px;
color: #fff !important;
}
.el-table {
background: #113883 !important;
thead {
tr,
th {
background: #1D489B !important;
color: #fff;
}
}
}
.el-table tr {
background: rgba(17, 56, 131, 0.5);
color: #fff;
}
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
background: #063572 !important;
}
.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
background: #063572 !important;
}
.el-table--border::after,
.el-table--group::after,
.el-table::before {
background-color: transparent !important;
}
.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border: none;
}
.el-pagination {
color: #fff;
text-align: right;
padding: 12px;
.el-pagination__total,
.el-pagination__jump {
color: #fff !important;
}
button {
background-color: transparent !important;
}
.el-pager li {
background-color: transparent !important;
}
.el-pager li.btn-quicknext,
.el-pager li.btn-quickprev {
color: #fff;
}
.btn-next,
.btn-prev {
color: #fff;
}
}
\ No newline at end of file
[
{
"name": "杭州市",
"value": [
120.155070,
30.274085
]
},
{
"name": "宁波市",
"value": [
121.549792,
29.868388
]
},
{
"name": "温州市",
"value": [
120.699366,
27.994267
]
},
{
"name": "嘉兴市",
"value": [
120.755486,
30.746129
]
},
{
"name": "湖州市",
"value": [
120.102398,
30.867198
]
},
{
"name": "绍兴市",
"value": [
120.582112,
29.997117
]
},
{
"name": "金华市",
"value": [
119.649506,
29.089524
]
},
{
"name": "衢州市",
"value": [
118.872630,
28.941708
]
},
{
"name": "舟山市",
"value": [
122.106863,
30.016028
]
},
{
"name": "台州市",
"value": [
121.428599,
28.661378
]
},
{
"name": "丽水市",
"value": [
119.921786,
28.451993
]
}
]
\ No newline at end of file
This diff is collapsed.
@font-face {
font-family: "iconfont"; /* Project id 4406516 */
src: url('iconfont.woff2?t=1706752068577') format('woff2'),
url('iconfont.woff?t=1706752068577') format('woff'),
url('iconfont.ttf?t=1706752068577') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-gangjin-01:before {
content: "\e62f";
}
.icon-DY-yewuchuli:before {
content: "\ea5a";
}
.icon-dingwei:before {
content: "\e602";
}
.icon-jiankong1:before {
content: "\e629";
}
.icon-rili:before {
content: "\e635";
}
.icon-sousuo:before {
content: "\e65a";
}
.icon-you-2-2:before {
content: "\ea37";
}
.icon-you-22:before {
content: "\ea38";
}
.icon-you-23:before {
content: "\ea39";
}
.icon-guanbi-17-2-2:before {
content: "\ea3a";
}
.icon-xia:before {
content: "\ea3b";
}
.icon-huifang:before {
content: "\e6ee";
}
.icon-bofang:before {
content: "\e610";
}
.icon-jiankong:before {
content: "\e6c4";
}
.icon-a-danjucaozuobaocuncaogao:before {
content: "\e613";
}
This diff is collapsed.
{
"id": "4406516",
"name": "大合可视化",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "34330311",
"name": "钢筋-01",
"font_class": "gangjin-01",
"unicode": "e62f",
"unicode_decimal": 58927
},
{
"icon_id": "39123779",
"name": "wenj",
"font_class": "DY-yewuchuli",
"unicode": "ea5a",
"unicode_decimal": 59994
},
{
"icon_id": "2075245",
"name": "定位",
"font_class": "dingwei",
"unicode": "e602",
"unicode_decimal": 58882
},
{
"icon_id": "15631425",
"name": "监控",
"font_class": "jiankong1",
"unicode": "e629",
"unicode_decimal": 58921
},
{
"icon_id": "1848839",
"name": "日历",
"font_class": "rili",
"unicode": "e635",
"unicode_decimal": 58933
},
{
"icon_id": "4320352",
"name": "搜索",
"font_class": "sousuo",
"unicode": "e65a",
"unicode_decimal": 58970
},
{
"icon_id": "38641193",
"name": "右",
"font_class": "you-2-2",
"unicode": "ea37",
"unicode_decimal": 59959
},
{
"icon_id": "38641195",
"name": "左",
"font_class": "you-22",
"unicode": "ea38",
"unicode_decimal": 59960
},
{
"icon_id": "38641198",
"name": "上",
"font_class": "you-23",
"unicode": "ea39",
"unicode_decimal": 59961
},
{
"icon_id": "38641248",
"name": "关闭",
"font_class": "guanbi-17-2-2",
"unicode": "ea3a",
"unicode_decimal": 59962
},
{
"icon_id": "38641282",
"name": "下",
"font_class": "xia",
"unicode": "ea3b",
"unicode_decimal": 59963
},
{
"icon_id": "6851967",
"name": "回放",
"font_class": "huifang",
"unicode": "e6ee",
"unicode_decimal": 59118
},
{
"icon_id": "9851587",
"name": "播放",
"font_class": "bofang",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "15686544",
"name": "监控",
"font_class": "jiankong",
"unicode": "e6c4",
"unicode_decimal": 59076
},
{
"icon_id": "37238421",
"name": "保存草稿",
"font_class": "a-danjucaozuobaocuncaogao",
"unicode": "e613",
"unicode_decimal": 58899
}
]
}
This diff is collapsed.
This diff is collapsed.
This image diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
<template>
<div class="nav-header">
<div class="nav-bg"></div>
<div class="left-nav">
<span>{{ date }} {{ weekDay }} {{ time }}</span>
</div>
<div class="mid-title">
<span>水利工程质量动态评估系统</span>
</div>
<div class="right-nav">
<!-- <img :src="userInfo.op_avatar" alt="" />
{{ userInfo.op_name }} -->
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
date: "",
weekDay: "",
time: "",
};
},
methods: {
getTime() {
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : "0" + month;
day = day < 10 ? "0" + day : day;
let today = year + "-" + month + "-" + day;
this.date = today;
let hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
let min =
date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
let sec =
date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
this.time = `${hour}:${min}:${sec}`;
let str = "星期";
let weekDay = new Date().getDay();
switch (weekDay) {
case 0:
str += "日";
break;
case 1:
str += "一";
break;
case 2:
str += "二";
break;
case 3:
str += "三";
break;
case 4:
str += "四";
break;
case 5:
str += "五";
break;
case 6:
str += "六";
break;
}
this.weekDay = str;
},
},
mounted() {
setInterval(() => {
this.getTime();
}, 1000);
},
computed: {
...mapState(["userInfo"]),
},
};
</script>
<style lang="less" scoped>
.nav-header {
display: flex;
align-content: center;
line-height: 80px;
padding: 0 30px;
height: 130px;
margin: 0px;
background: url("@/assets/images/index/img_bjh@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
.nav-bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 80px;
background: url("@/assets/images/index/img_dingbu@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.left-nav {
width: calc(100% / 3);
display: flex;
justify-content: flex-start;
span {
color: #fff;
font-size: 18px;
}
.weather-img {
vertical-align: top;
width: 30px;
height: 30px;
margin: 24px 0;
margin-right: 30px;
}
}
.mid-title {
width: calc(100% / 3);
font-size: 32px;
color: #fefeff;
text-align: center;
letter-spacing: 3px;
line-height: 60px;
position: relative;
span {
position: absolute;
left: 0;
width: 100%;
height: 100%;
font-weight: bold;
white-space: nowrap;
background-clip: text;
-webkit-text-fill-color: transparent;
background-image: linear-gradient(to bottom, #ffffff, #a4c7e8);
z-index: 999;
}
}
.right-nav {
width: calc(100% / 3);
text-align: right;
font-size: 16px;
color: #fff;
img {
width: 26px;
height: 26px;
vertical-align: top;
border-radius: 50%;
margin-right: 10px;
margin-top: 26px;
object-fit: cover;
}
}
}
</style>
\ No newline at end of file
<template>
<div id="index" style="height: 100%">
<Header></Header>
<div class="route-container">
<router-view></router-view>
</div>
</div>
</template>
<script>
import Header from "./Header";
export default {
name: "Index",
components: { Header },
data() {
return {
time: "",
weekDay: "",
date: "",
zoom: 1,
screenDetail: {},
leftNav: [],
rightNav: [],
childRouteName: "",
totalMenu: [],
};
},
methods: {},
computed: {
token() {
return localStorage.getItem("token");
},
},
mounted() {},
};
</script>
<style scoped lang="less">
#index {
background: url("@/assets/images/background.png") no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
}
.route-container {
position: fixed;
top: 80px;
left: 0;
width: 100%;
height: calc(100% - 80px);
}
.router-change {
position: fixed;
right: 40px;
bottom: 40px;
z-index: 1000;
img {
width: 70px;
height: 70px;
vertical-align: top;
cursor: pointer;
opacity: 0.6;
&:hover {
opacity: 1;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="s-table">
<div class="table-headers">
<div
v-for="(header, index) in headers"
:key="index"
:style="{
...header.headerStyle,
width: header.width ? header.width : '',
textAlign: header.align,
}"
>
{{ header.name }}
</div>
</div>
<div
class="table-data"
v-infinite-scroll="load"
:infinite-scroll-distance="1"
:infinite-scroll-delay="1000"
ref="tableData"
>
<div
class="table-data-columns"
v-for="(row, index) in tableData"
:key="index"
>
<div
v-for="(header, hIndex) in headers"
:key="hIndex"
:style="{
...header.style,
width: header.width ? header.width : '',
textAlign: header.align,
}"
class="table-data-column"
>
<template v-if="header.slot">
<slot :row="row" :header="header" />
</template>
<template v-else>
<el-tooltip
class="table-data-cell"
effect="dark"
:content="String(row[header.props])"
>
<div>
{{ row[header.props] }}
</div>
</el-tooltip>
</template>
</div>
</div>
<div v-if="tableData.length == 0" class="no-data">
<div class="inner">
<img src="@/assets/images/index/no-data.png" alt="" />
<div>暂无数据</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "STable",
props: {
headers: {
type: Array,
default: () => {
return [];
},
},
tableData: {
type: Array,
default: () => {
return [];
},
},
pagination: {
type: Boolean,
default: false,
},
},
methods: {
load() {
if (this.pagination) {
this.$emit("load");
}
},
},
data() {
return {};
},
mounted() {
this.$refs.tableData.onscroll = () => {
let list = document.getElementsByClassName("el-tooltip__popper");
if (list.length > 0) {
list[list.length - 1].style.display = "none";
}
};
},
};
</script>
<style lang="less" scoped>
.s-table {
height: 100%;
}
.table-headers {
line-height: 32px;
color: #b2bfcf;
font-size: 14px;
text-align: center;
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
div {
padding: 0 4px;
}
}
.table-data {
height: calc(100% - 34px);
overflow-y: auto;
.table-data-columns {
line-height: 34px;
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
text-align: center;
color: #fff;
font-size: 14px;
margin-bottom: 4px;
background: url("@/assets/images/index/icon_moren@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
&:hover {
background: url("@/assets/images/index/icon_xuanz@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.table-data-cell {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 4px;
}
}
}
.no-data {
text-align: center;
color: #fff;
height: 100%;
font-size: 20px;
position: relative;
img {
width: 100px;
vertical-align: top;
opacity: 0.7;
}
.inner {
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
}
}
</style>
\ No newline at end of file
<template>
<div class="s-table">
<div class="table-headers">
<div
v-for="(header, index) in headers"
:key="index"
:style="{
...header.headerStyle,
width: header.width ? header.width : '',
textAlign: header.align,
}"
>
{{ header.name }}
</div>
</div>
<div
class="table-data"
v-infinite-scroll="load"
:infinite-scroll-distance="1"
:infinite-scroll-delay="1000"
ref="tableData"
>
<div
class="table-data-columns"
v-for="(row, index) in tableData"
:key="index"
>
<div
v-for="(header, hIndex) in headers"
:key="hIndex"
:style="{
...header.style,
width: header.width ? header.width : '',
textAlign: header.align,
}"
class="table-data-column"
>
<template v-if="header.slot">
<slot :row="row" :header="header" />
</template>
<template v-else>
<el-tooltip
class="table-data-cell"
effect="dark"
:content="String(row[header.props])"
>
<div>
{{ row[header.props] }}
</div>
</el-tooltip>
</template>
</div>
</div>
<div v-if="tableData.length == 0" class="no-data">
<div class="inner">
<img src="@/assets/images/index/no-data.png" alt="" />
<div>暂无数据</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "STable",
props: {
headers: {
type: Array,
default: () => {
return [];
},
},
tableData: {
type: Array,
default: () => {
return [];
},
},
pagination: {
type: Boolean,
default: false,
},
},
methods: {
load() {
if (this.pagination) {
this.$emit("load");
}
},
},
data() {
return {};
},
mounted() {
this.$refs.tableData.onscroll = () => {
let list = document.getElementsByClassName("el-tooltip__popper");
if (list.length > 0) {
list[list.length - 1].style.display = "none";
}
};
},
};
</script>
<style lang="less" scoped>
.s-table {
height: 100%;
}
.table-headers {
line-height: 32px;
border: 1px solid #21436b;
background: #19314d;
color: #fff;
font-size: 14px;
text-align: center;
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
div {
padding: 0 4px;
}
}
.table-data {
height: calc(100% - 34px);
overflow-y: auto;
.table-data-columns {
line-height: 40px;
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
text-align: center;
color: #fff;
font-size: 14px;
padding: 0 1px;
.table-data-column {
}
.table-data-cell {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 4px;
}
&:nth-child(2n) {
background: rgba(4, 36, 66, 0.6);
}
&:hover {
background: #1c3f67;
border: 1px solid #6286ba;
}
}
}
.no-data {
text-align: center;
color: #fff;
background: rgba(4, 36, 66, 0.6);
height: 100%;
font-size: 20px;
position: relative;
img {
width: 100px;
vertical-align: top;
opacity: 0.7;
}
.inner {
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
}
}
</style>
\ No newline at end of file
<template>
<div class="section" :style="{ height: height }">
<Title :title="title"> </Title>
<div :class="[type == 'long' ? 'container2' : 'container']">
<slot />
</div>
</div>
</template>
<script>
export default {
name: "Section",
props: {
title: {
type: String,
default: "",
},
height: {
type: String,
default: "400px",
},
type: {
type: String,
},
},
};
</script>
<style lang="less" scoped>
.container {
height: calc(100% - 40px);
background: url("@/assets/images/index/img_iyi@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.container2 {
height: calc(100% - 40px);
background: url("@/assets/images/index/img_yiwu@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
</style>
\ No newline at end of file
<template>
<div class="section" :style="{ height: height }">
<Title2 :title="title"> </Title2>
<div class="container-short">
<slot />
</div>
</div>
</template>
<script>
export default {
name: "Section",
props: {
title: {
type: String,
default: "",
},
height: {
type: String,
default: "400px",
},
},
};
</script>
<style lang="less" scoped>
.container-short {
height: calc(100% - 50px);
background: url("@/assets/images/index/img_kirs@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
margin-top: 10px;
}
</style>
\ No newline at end of file
<template>
<div class="title">
{{ title }}
</div>
</template>
<script>
export default {
name: "Title",
props: {
title: {
type: String,
default: "",
},
},
};
</script>
<style lang="less" scoped>
.title {
font-size: 18px;
color: #fff;
line-height: 40px !important;
text-align: center;
background: url("@/assets/images/index/icon_toubg@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.right-slot {
float: right;
}
</style>
\ No newline at end of file
<template>
<div class="title">
{{ title }}
</div>
</template>
<script>
export default {
name: "Title",
props: {
title: {
type: String,
default: "",
},
},
};
</script>
<style lang="less" scoped>
.title {
font-size: 18px;
color: #fff;
line-height: 40px !important;
text-align: left;
padding-left: 20px;
background: url("@/assets/images/index/icon_snei@2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.right-slot {
float: right;
}
</style>
\ No newline at end of file
<template>
<div class="nav-header">
<div class="left-nav">
<span>{{ date }} {{ weekDay }} {{ time }}</span>
</div>
<div class="mid-title">
<span>{{ userInfo.customer_shortname }}检测数字化生产可视平台</span>
</div>
<div class="right-nav"></div>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
date: "",
weekDay: "",
time: "",
};
},
methods: {
getTime() {
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : "0" + month;
day = day < 10 ? "0" + day : day;
let today = year + "-" + month + "-" + day;
this.date = today;
let hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
let min =
date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
let sec =
date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
this.time = `${hour}:${min}:${sec}`;
let str = "星期";
let weekDay = new Date().getDay();
switch (weekDay) {
case 0:
str += "日";
break;
case 1:
str += "一";
break;
case 2:
str += "二";
break;
case 3:
str += "三";
break;
case 4:
str += "四";
break;
case 5:
str += "五";
break;
case 6:
str += "六";
break;
}
this.weekDay = str;
},
},
mounted() {
setInterval(() => {
this.getTime();
}, 1000);
},
computed: {
...mapState(["userInfo"]),
},
};
</script>
<style lang="less" scoped>
.nav-header {
width: calc(100% - 40px);
display: flex;
align-content: center;
padding: 0 20px;
height: 110px;
margin: 0px;
background: url("@/assets/images/User/header.png") no-repeat;
background-size: 100% 100%;
.left-nav {
width: calc(100% / 3);
display: flex;
justify-content: flex-start;
line-height: 50px;
span {
color: #fff;
font-size: 18px;
}
.weather-img {
vertical-align: top;
width: 30px;
height: 30px;
margin: 15px 0;
margin-right: 30px;
}
}
.mid-title {
width: calc(100% / 3);
font-size: 32px;
color: #fff;
text-align: center;
letter-spacing: 3px;
line-height: 65px;
span {
white-space: nowrap;
}
}
.right-nav {
width: calc(100% / 3);
text-align: right;
}
}
</style>
\ No newline at end of file
<template>
<div class="section" :style="{ height: height }">
<UTitle :title="title" :type="type">
<template slot="title-slot">
<slot name="title-slot"></slot>
</template>
</UTitle>
<div class="container">
<slot name="container-slot" />
</div>
</div>
</template>
<script>
import UTitle from "./Utitle";
export default {
name: "Section",
components: { UTitle },
props: {
title: {
type: String,
default: "",
},
height: {
type: String,
default: "400px",
},
type: {
type: String,
default: "short",
},
},
};
</script>
<style lang="less" scoped>
.container {
margin-top: 10px;
height: calc(100% - 64px);
}
</style>
\ No newline at end of file
<template>
<div class="s-table">
<div class="table-headers">
<div
v-for="(header, index) in headers"
:key="index"
:style="{
minWidth: header.width ? header.width : '',
...(header.style ? header.style : {}),
}"
>
{{ header.name }}
</div>
</div>
<div class="table-data" ref="table">
<div
class="table-data-columns"
v-for="(row, index) in tableData"
:key="index"
>
<div
v-for="(header, hIndex) in headers"
:key="hIndex"
:style="{
minWidth: header.width ? header.width : '',
...(header.style ? header.style : {}),
}"
class="table-data-column"
>
<template v-if="header.slot">
<slot :row="row" :header="header" />
</template>
<template v-else>
<el-tooltip
class="table-data-cell"
effect="dark"
:content="String(row[header.props])"
>
<div>
{{ row[header.props] }}
</div>
</el-tooltip>
</template>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "UTable",
props: {
headers: {
type: Array,
default: () => {
return [];
},
},
tableData: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {};
},
mounted() {
this.$refs.table.onscroll = () => {
let list = document.getElementsByClassName("el-tooltip__popper");
if (list.length > 0) {
list[list.length - 1].style.display = "none";
}
};
},
};
</script>
<style lang="less" scoped>
.s-table {
height: 100%;
}
.table-headers {
line-height: 32px;
border: 1px solid #107de5;
background: #0a3163;
color: #02fffc;
font-size: 14px;
text-align: center;
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
div {
flex: 1;
white-space: nowrap;
}
}
.table-data {
height: calc(100% - 34px);
overflow-y: auto;
.table-data-columns {
line-height: 40px;
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
text-align: center;
color: #fff;
font-size: 14px;
.table-data-column {
flex: 1;
}
.table-data-cell {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
&:nth-child(2n) {
background: rgba(4, 36, 66, 0.6);
}
&:hover {
background: rgba(19, 56, 132, 0.6);
}
}
}
</style>
\ No newline at end of file
<template>
<div :class="['title', type == 'long' ? 'long' : '']">
{{ title }}
<slot />
</div>
</template>
<script>
export default {
name: "Utitle",
props: {
title: {
type: String,
default: "",
},
type: {
type: String,
default: "short",
},
},
};
</script>
<style lang="less" scoped>
.title {
width: calc(100% - 24px);
font-size: 20px;
color: #fff;
line-height: 38px !important;
height: 38px;
padding-left: 24px;
background: url("@/assets/images/User/title-short.png") no-repeat;
background-size: 100% 100%;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
&.long {
background: url("@/assets/images/User/title-long.png") no-repeat;
background-size: 100% 100%;
}
}
</style>
\ No newline at end of file
import Vue from 'vue'
import App from './App.vue'
import router from '@/router/index'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'lib-flexible'
import store from "@/store/index"
import * as echarts from "echarts"
import scroll from 'vue-seamless-scroll'
import Title from "@/components/common/Title"
import Title2 from "@/components/common/Title2"
import Section from "@/components/common/Section"
import STable from "@/components/common/STable"
import "@/assets/iconfont/iconfont.css";
import "@/assets/common/common.less"
import "@/assets/common/element.less"
window._AMapSecurityConfig = {
securityJsCode: 'a5006042196de6dda20a434eb443bf45',
}
Vue.use(scroll)
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.component('Title', Title)
Vue.component('Title2', Title2)
Vue.component('Section', Section)
Vue.component('STable', STable)
new Vue({
render: h => h(App),
store,
router
}).$mount('#app')
import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from "@/components/Index"
import DataStatis from "@/views/DataStatis/Index"
Vue.use(VueRouter)
const router = new VueRouter({
routes: [
{
path: '/', component: Index, redirect: "/dataStatis",
children: [
{
path: '/dataStatis', component: DataStatis,
meta: {
title: '水利工程质量动态评估系统'
}
},
],
},
]
})
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title
}
next()
})
export default router
\ No newline at end of file
import Vue from 'vue'
import Vuex from "vuex"
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
userInfo: {}
},
getters: {
},
mutations: {
changeUserInfo(state, userInfo) {
state.userInfo = userInfo
}
},
actions: {
}
})
export default store
import axios from 'axios'
import { Message } from 'element-ui';
const civilRequest = axios.create({
withCredentials: false,
baseURL: process.env.VUE_APP_CIVIL_API_URL
})
civilRequest.interceptors.request.use(
config => {
const Authorization = localStorage.getItem('Authorization')
const PermitAuthorization = localStorage.getItem('PermitAuthorization')
if (Authorization) {
config.headers['Authorization'] = Authorization
}
config.headers['key'] = 100001
config.headers['secret'] = 'CTn5S6z5l9uKMXSw9buEqs1m0JmmViyz4GYD7RGJ'
if (PermitAuthorization) {
config.headers['Permit-Authorization'] = PermitAuthorization
}
return config
},
error => {
return Promise.reject(new Error(error).message)
}
)
civilRequest.interceptors.response.use(
response => {
if (response.data.status != 200) {
Message({
message: response.data.msg,
type: 'error'
})
}
return response.data
},
error => {
Message({
message: '服务器错误',
type: 'error'
})
console.log(error)
return Promise.reject(new Error(error).message)
}
)
export default civilRequest
import axios from 'axios'
import { Message } from 'element-ui';
const noLoadingrequest = axios.create({
withCredentials: false
})
noLoadingrequest.interceptors.request.use(
config => {
const Authorization = localStorage.getItem('Authorization')
const PermitAuthorization = localStorage.getItem('PermitAuthorization')
if (Authorization) {
config.headers['Authorization'] = Authorization
}
if (PermitAuthorization) {
config.headers['Permit-Authorization'] = PermitAuthorization
}
return config
},
error => {
return Promise.reject(new Error(error).message)
}
)
noLoadingrequest.interceptors.response.use(
response => {
if (response.data.status != 200) {
Message({
message: response.data.msg,
type: 'error'
})
}
return response.data
},
error => {
Message({
message: '服务器错误',
type: 'error'
})
console.log(error)
return Promise.reject(new Error(error).message)
}
)
export default noLoadingrequest
import axios from 'axios'
import Vue from 'vue'
import { Message, Loading } from 'element-ui';
import _ from 'lodash';
// loading框设置局部刷新,且所有请求完成后关闭loading框
let loadingInstance; //loading 实例
let needLoadingRequestCount = 0; //当前正在请求的数量
import { getAccess } from "@/api/index"
import md5 from "js-md5"
function showLoading() {
let main = document.querySelector('#app') //获取dom节点
if (main) {
if (needLoadingRequestCount === 0 && !loadingInstance) {
loadingInstance = Loading.service({
target: main, text: '正在加载...', background: 'rgba(0,0,0,0.6)', spinner: 'el-icon-loading'
});
}
needLoadingRequestCount++;
}
}
function closeLoading() {
Vue.nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
needLoadingRequestCount--;
needLoadingRequestCount = Math.max(needLoadingRequestCount, 0); // 保证大于等于0
if (needLoadingRequestCount === 0) {
if (loadingInstance) {
hideLoading()
}
}
});
}
//防抖
var hideLoading = _.debounce(() => {
loadingInstance.close();
loadingInstance = null;
}, 10);
const request = axios.create({
withCredentials: false,
// baseURL: process.env.VUE_APP_API_URL
})
request.interceptors.request.use(
config => {
console.log(config)
// const Authorization = localStorage.getItem('maToken')
// if (Authorization) {
// config.headers['Authorization'] = Authorization
// }
// config.headers['Authorization'] = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI1IiwianRpIjoiZjQ0MjM0NzJlMjI0NzE2NWRjOWI3YzhlMTU5OGM1NGIwYTIxM2UyMDFmNThjYjc0OWNhYjVhZWUzZDE2NzVjMGNhODlkODIzZWM3MDM1ZWMiLCJpYXQiOjE3MzE4OTE5OTQuNDU5OTY0LCJuYmYiOjE3MzE4OTE5OTQuNDU5OTcsImV4cCI6MTc2MzQyNzk5NC4zNTgyNjcsInN1YiI6IjEiLCJzY29wZXMiOlsiKiJdfQ.kHggVPwqqNdp1VBbrGiEEBJHjhN8VCeDbS22C-sIeOMFPbeo-KCxpKpISwbVGpgEuqB57tz_mCtpFUYxcQW9lHIiRkn9YV8looMjZqDnRhLk-lBsKper_9nqhh_dacVMlwyiZZuOo34H-C45IHeDbzxL2vpqYfM2DYPTBgJYw5rexM2jqyiCEQOzYmYEUCeuMvAcjXA7Y7wPVbW1b4JbI5lAnLHPtlB7n3QZ0krH4VfWNj2fKwYGeWEHEkGnnXDlBh7E1IDjbZ_n1RbpM_PBr-rmSCnK3rXOwneICW-yzIiv3oiLE5UMz04LwQZr5p_7zLJQaqkpSREWfUiKVoMdwvXtCjYomhrj4KqxUqkUJNicKDNorKNHbpg7j45b3OLJrp8_8RIL9bWAxykzkFsQCMyt7xHw8oT0ejUmGTLSSKYiAT2ZMV_S0_KWexDiDJvzC6flH0hOK7lPG7e7idjBxC1qD0phmIggn1hcmfnFJ6ZOV_XlS4VHfvTzqoLuQXaUffH_qqKLn9rvci4EedqYDOrlbh957HrrCbvnywYwahh_3R43CfhcmI494zxpdWhUKbhCqo1uNWvlR9MKL3WVP_lvswkd9JlzO17oN9oXqCpt8SPH41tVQ0BxuVUeYrMFmSmxCYuN5026VrFwYKXOF5lMsFdNBnqagIABa6gFyx8'
showLoading()
return config
},
error => {
closeLoading()
return Promise.reject(new Error(error).message)
}
)
request.interceptors.response.use(
response => {
closeLoading()
if (response.data.status != 200) {
Message({
message: response.data.msg,
type: 'error'
})
}
return response.data
},
async (error) => {
if (error.request.status == 401) {
closeLoading()
localStorage.setItem('Authorization', '')
Message({
message: '请先登录',
type: 'error'
})
window.location.href = window.location.origin
}
Message({
message: '服务器错误',
type: 'error'
})
return Promise.reject(new Error(error).message)
}
)
export default request
This diff is collapsed.
This diff is collapsed.
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
productionSourceMap: false,
css: {
loaderOptions: {
postcss: {
postcssOptions: {
plugins: [
require('postcss-plugin-px2rem')({
rootValue: 100,
mediaQuery: false, //(布尔值)允许在媒体查询中转换px。
minPixelValue: 0 //设置要替换的最小像素值(3px会被转rem)。 默认 0
}),
]
}
}
}
},
publicPath: process.env.NODE_ENV == 'production' ? './' : '/', // 二级根目录需要修改
devServer: {
port: 3000,
proxy: {
'/site': {
target: 'http://192.168.0.185/',
changeOrigin: true,
// pathRewrite: {
// '^/api': ''
// }
},
}
},
lintOnSave: true,
pluginOptions: {
"style-resources-loader": {
preProcessor: "less",
patterns: []
}
},
chainWebpack: (config) => {
config.module
.rule('css')
.test(/\.css$/)
.oneOf('vue')
.resourceQuery(/\?vue/)
.use('px2rem')
.loader('px2rem-loader')
.options({
remUnit: 100,
})
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment