diff --git a/config/index.js b/config/index.js
index 29b3c33..399631b 100644
--- a/config/index.js
+++ b/config/index.js
@@ -2,9 +2,7 @@
const path = require('path')
-var proxyUrl =
-
-module.exports = {
+var proxyUrl = (module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
@@ -19,28 +17,28 @@ module.exports = {
cacheBusting: true,
cssSourceMap: true,
proxyTable: {
- '/screen': {
- // target: 'http://112.29.103.165:21626',//重庆
- target: 'http://192.168.0.14:21624',//测试
- // target: 'http://10.40.92.74:8080',
- changeOrigin: true,
- // secure: true, //如果是https接口,需要配置这个参数
- pathRewrite: {
- '^/screen': '/'
- }
+ '/screen': {
+ // target: 'http://112.29.103.165:21626',//重庆
+ target: 'http://192.168.0.14:21624', //测试
+ // target: 'http://10.40.92.74:8080',
+ changeOrigin: true,
+ // secure: true, //如果是https接口,需要配置这个参数
+ pathRewrite: {
+ '^/screen': '/',
},
- }
+ },
+ },
},
build: {
index: path.resolve(__dirname, '../dist/index01.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static01',
- assetsPublicPath: '/',
+ assetsPublicPath: '/screen/',
productionSourceMap: false,
devtool: '#source-map',
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
- bundleAnalyzerReport: process.env.npm_config_report
- }
-}
+ bundleAnalyzerReport: process.env.npm_config_report,
+ },
+})
diff --git a/package-lock.json b/package-lock.json
index 7c69719..7928b6c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -119,6 +119,27 @@
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
"dev": true
},
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
"string-width": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz",
@@ -130,6 +151,40 @@
"strip-ansi": "^7.0.1"
}
},
+ "string-width-cjs": {
+ "version": "npm:string-width@4.2.3",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
+ },
"strip-ansi": {
"version": "7.1.0",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz",
@@ -139,6 +194,23 @@
"ansi-regex": "^6.0.1"
}
},
+ "strip-ansi-cjs": {
+ "version": "npm:strip-ansi@6.0.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ }
+ }
+ },
"wrap-ansi": {
"version": "8.1.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
@@ -149,6 +221,60 @@
"string-width": "^5.0.1",
"strip-ansi": "^7.0.1"
}
+ },
+ "wrap-ansi-cjs": {
+ "version": "npm:wrap-ansi@7.0.0",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
}
}
},
@@ -14791,46 +14917,6 @@
}
}
},
- "string-width-cjs": {
- "version": "npm:string-width@4.2.3",
- "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.1"
- }
- }
- }
- },
"string.prototype.trim": {
"version": "1.2.8",
"resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
@@ -14887,23 +14973,6 @@
"ansi-regex": "^2.0.0"
}
},
- "strip-ansi-cjs": {
- "version": "npm:strip-ansi@6.0.1",
- "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true
- }
- }
- },
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-2.0.0.tgz",
@@ -17312,81 +17381,6 @@
}
}
},
- "wrap-ansi-cjs": {
- "version": "npm:wrap-ansi@7.0.0",
- "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- }
- },
- "strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.1"
- }
- }
- }
- },
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
diff --git a/src/api/dialog.js b/src/api/dialog.js
index 0cc31b8..1271ff7 100644
--- a/src/api/dialog.js
+++ b/src/api/dialog.js
@@ -1,50 +1,61 @@
import { POST, GET } from './index.js'
-const URL_TYPE_LIST = '/screen/material/returnOfMaterialsInfo/getTypeList'
-const URL_DETAILS = '/screen/base/largeScreen/home/getMaterialReqData/details'
-const URL_RETURN_DETAILS = '/screen/base/largeScreen/home/getMaterialReturnData/details'
-const URL_UNIT_LIST = '/screen/material/agreementInfo/getUnitList'
-const URL_PROJECT_LIST = '/screen/material/agreementInfo/getProjectList'
-const URL_SCRAP_ANALYSIS = '/screen/base/largeScreen/home/getScrapAnalysisByMonth/details'
-const URL_TOTAL_OWNERSHIP = '/screen/base/largeScreen/home/getTotalOwnership/details'
-const URL_ACCEPTANCE_STORAGE = '/screen/base/largeScreen/home/getAcceptanceStorage/details'
-const URL_PICKING_ANALYSIS = '/screen/base/largeScreen/home/getPickingAnalysisByMonth/details'
-const URL_MATERIAL_RETURN_BY_MONTH = '/screen/base/largeScreen/home/getMaterialReturnByMonth/details'
-const URL_MAINTENANCE_BY_CHART = '/screen/base/largeScreen/home/getMaintenanceByMonth/chart'
-const URL_MAINTENANCE_BY_MONTH_DETAILS = '/screen/base/largeScreen/home/getMaintenanceByMonth/details'
+const URL_TYPE_LIST = '/material/returnOfMaterialsInfo/getTypeList'
+const URL_DETAILS = '/material/base/largeScreen/home/getMaterialReqData/details'
+const URL_RETURN_DETAILS =
+ '/material/base/largeScreen/home/getMaterialReturnData/details'
+const URL_UNIT_LIST = '/material/agreementInfo/getUnitList'
+const URL_PROJECT_LIST = '/material/agreementInfo/getProjectList'
+const URL_SCRAP_ANALYSIS =
+ '/material/base/largeScreen/home/getScrapAnalysisByMonth/details'
+const URL_TOTAL_OWNERSHIP =
+ '/material/base/largeScreen/home/getTotalOwnership/details'
+const URL_ACCEPTANCE_STORAGE =
+ '/material/base/largeScreen/home/getAcceptanceStorage/details'
+const URL_PICKING_ANALYSIS =
+ '/material/base/largeScreen/home/getPickingAnalysisByMonth/details'
+const URL_MATERIAL_RETURN_BY_MONTH =
+ '/material/base/largeScreen/home/getMaterialReturnByMonth/details'
+const URL_MAINTENANCE_BY_CHART =
+ '/material/base/largeScreen/home/getMaintenanceByMonth/chart'
+const URL_MAINTENANCE_BY_MONTH_DETAILS =
+ '/material/base/largeScreen/home/getMaintenanceByMonth/details'
// 设备类型
-export const getTypeList = params => GET(URL_TYPE_LIST, params)
+export const getTypeList = (params) => GET(URL_TYPE_LIST, params)
// 领料数据
-export const getDetails = data => POST(URL_DETAILS, data)
+export const getDetails = (data) => POST(URL_DETAILS, data)
// 退料数据
-export const getReturnDetails = data => POST(URL_RETURN_DETAILS, data)
+export const getReturnDetails = (data) => POST(URL_RETURN_DETAILS, data)
// 往来单位-下拉
-export const getUnitList = params => GET(URL_UNIT_LIST, params)
+export const getUnitList = (params) => GET(URL_UNIT_LIST, params)
// 工程名称-下拉
-export const getProjectList = params => GET(URL_PROJECT_LIST, params)
+export const getProjectList = (params) => GET(URL_PROJECT_LIST, params)
// 废料分析
-export const getScrapAnalysis = data => POST(URL_SCRAP_ANALYSIS, data)
+export const getScrapAnalysis = (data) => POST(URL_SCRAP_ANALYSIS, data)
// 总保有量
-export const getTotalOwnership = data => POST(URL_TOTAL_OWNERSHIP, data)
+export const getTotalOwnership = (data) => POST(URL_TOTAL_OWNERSHIP, data)
// 入库分析
-export const getAcceptanceStorage = data => POST(URL_ACCEPTANCE_STORAGE, data)
+export const getAcceptanceStorage = (data) => POST(URL_ACCEPTANCE_STORAGE, data)
// 领料分析
-export const getPickingAnalysis = data => POST(URL_PICKING_ANALYSIS, data)
+export const getPickingAnalysis = (data) => POST(URL_PICKING_ANALYSIS, data)
// 退料分析
-export const getMaterialReturnByMonth = data => POST(URL_MATERIAL_RETURN_BY_MONTH, data)
+export const getMaterialReturnByMonth = (data) =>
+ POST(URL_MATERIAL_RETURN_BY_MONTH, data)
// 维修分析-pie+bar
-export const getMaintenanceByMonthChart = data => POST(URL_MAINTENANCE_BY_CHART, data)
+export const getMaintenanceByMonthChart = (data) =>
+ POST(URL_MAINTENANCE_BY_CHART, data)
// 维修分析
-export const getMaintenanceByMonthDetails = data => POST(URL_MAINTENANCE_BY_MONTH_DETAILS, data)
\ No newline at end of file
+export const getMaintenanceByMonthDetails = (data) =>
+ POST(URL_MAINTENANCE_BY_MONTH_DETAILS, data)
diff --git a/src/api/index.js b/src/api/index.js
index f02e2bb..8f8b2ed 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -1,29 +1,30 @@
/**
* axios全局配置
*/
-import axios from 'axios';
+import axios from 'axios'
axios.defaults.timeout = 30000
// 默认配置
-axios.defaults.baseURL = process.env.API_ROOT;
+// axios.defaults.baseURL = process.env.API_ROOT;
+axios.defaults.baseURL = 'http://112.29.103.165:21626/bigScreen'
axios.interceptors.request.use(
- config => {
+ (config) => {
let token = localStorage.getItem('token')
if (token) {
- config.headers.accessToken = `${token}`;
- config.headers.Authorization = `${token}`;
+ config.headers.accessToken = `${token}`
+ config.headers.Authorization = `${token}`
}
- return config;
+ return config
},
- error => {
- return Promise.reject(error);
+ (error) => {
+ return Promise.reject(error)
}
-);
+)
// 添加一个请求拦截器
axios.interceptors.response.use(
- response => {
+ (response) => {
if (response.data) {
if (response.data.code === 401) {
} else if (response.data.code === 200) {
@@ -34,30 +35,36 @@ axios.interceptors.response.use(
} else {
return Promise.reject(response.data)
}
-
},
- error => {
- if (error.code === 'ECONNABORTED' && error.message.indexOf('timeout') !== -1)
+ (error) => {
+ if (
+ error.code === 'ECONNABORTED' &&
+ error.message.indexOf('timeout') !== -1
+ )
console.log('请求超时!')
return Promise.reject(error)
}
-);
+)
// 通用POST方法
export const POST = (url, params) => {
- return axios.post(`${url}`, params).then(response => response);
-};
+ return axios.post(`${url}`, params).then((response) => response)
+}
// 通用POST_JSON方法
export const POST_JSON = (url, json, params) => {
- return axios.post(`${url}`, json, {
- params: params
- }).then(response => response);
-};
+ return axios
+ .post(`${url}`, json, {
+ params: params,
+ })
+ .then((response) => response)
+}
// 通用GET方法
export const GET = (url, params) => {
- return axios.get(`${url}`, {
- params: params
- }).then(response => response);
-};
+ return axios
+ .get(`${url}`, {
+ params: params,
+ })
+ .then((response) => response)
+}
diff --git a/src/api/screen.js b/src/api/screen.js
index bc07f74..c722821 100644
--- a/src/api/screen.js
+++ b/src/api/screen.js
@@ -1,27 +1,50 @@
import { POST, GET } from './index'
// 领料数据
-export const getMaterialReqDataApi = params => POST(`/screen/base/largeScreen/home/getMaterialReqData`,)
+export const getMaterialReqDataApi = (params) =>
+ POST(`/material/base/largeScreen/home/getMaterialReqData`)
// 退料数据
-export const getMaterialReturnDataApi = params => POST(`/screen/base/largeScreen/home/getMaterialReturnData`)
+export const getMaterialReturnDataApi = (params) =>
+ POST(`/material/base/largeScreen/home/getMaterialReturnData`)
//当月报废分析
-export const getScrapAnalysisByMonthApi = params => POST(`/screen/base/largeScreen/home/getScrapAnalysisByMonth?maType=${params.maType}`)
+export const getScrapAnalysisByMonthApi = (params) =>
+ POST(
+ `/material/base/largeScreen/home/getScrapAnalysisByMonth?maType=${params.maType}`
+ )
//新购验收入库分析
-export const getAcceptanceStorageApi = params => POST(`/screen/base/largeScreen/home/getAcceptanceStorage?maType=${params.maType}`,)
+export const getAcceptanceStorageApi = (params) =>
+ POST(
+ `/material/base/largeScreen/home/getAcceptanceStorage?maType=${params.maType}`
+ )
//当月领料分析
-export const getPickingAnalysisByMonthApi = params => POST(`/screen/base/largeScreen/home/getPickingAnalysisByMonth?maType=${params.maType}`,)
+export const getPickingAnalysisByMonthApi = (params) =>
+ POST(
+ `/material/base/largeScreen/home/getPickingAnalysisByMonth?maType=${params.maType}`
+ )
//当月退料分析
-export const getMaterialReturnByMonthApi = params => POST(`/screen/base/largeScreen/home/getMaterialReturnByMonth?maType=${params.maType}`,)
+export const getMaterialReturnByMonthApi = (params) =>
+ POST(
+ `/material/base/largeScreen/home/getMaterialReturnByMonth?maType=${params.maType}`
+ )
//当月维修分析
-export const getMaintenanceByMonthApi = params => POST(`/screen/base/largeScreen/home/getMaintenanceByMonth?maType=${params.maType}`,)
+export const getMaintenanceByMonthApi = (params) =>
+ POST(
+ `/material/base/largeScreen/home/getMaintenanceByMonth?maType=${params.maType}`
+ )
//设备分布图
-export const getEquipmentDisByMapApi = params => POST(`/screen/base/largeScreen/home/getEquipmentDisByMap`,)
+export const getEquipmentDisByMapApi = (params) =>
+ POST(`/material/base/largeScreen/home/getEquipmentDisByMap`)
//施工机具/
-export const getTotalOwnershipApi = params => POST(`/screen/base/largeScreen/home/getTotalOwnership`,)
+export const getTotalOwnershipApi = (params) =>
+ POST(`/material/base/largeScreen/home/getTotalOwnership`)
// 当月使用车辆
-export const getCarUseByMonthApi = params => POST(`/screen/base/largeScreen/home/getCarUseByMonth?maType=${params.maType}`,)
+export const getCarUseByMonthApi = (params) =>
+ POST(
+ `/material/base/largeScreen/home/getCarUseByMonth?maType=${params.maType}`
+ )
// 当月使用车辆
-export const getMaintenanceWarningApi = params => POST(`/screen/base/largeScreen/home/getMaintenanceWarning`,)
+export const getMaintenanceWarningApi = (params) =>
+ POST(`/material/base/largeScreen/home/getMaintenanceWarning`)
//各公司机具保有量
-export const getTotalOwnershipByCompany = params => POST(`/screen/base/largeScreen/home/getTotalOwnershipByCompany`)
-
+export const getTotalOwnershipByCompany = (params) =>
+ POST(`/material/base/largeScreen/home/getTotalOwnershipByCompany`)
diff --git a/src/router/index.js b/src/router/index.js
index c798fca..70c9ff3 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -5,12 +5,12 @@ Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
- return originalPush.call(this, location).catch(err => err)
+ return originalPush.call(this, location).catch((err) => err)
}
-const Layout = () => import('@/views/layout');
-const Home = () => import('@/views/Home/index');
-const Login = () => import('@/views/Login/index');
+const Layout = () => import('@/views/layout')
+const Home = () => import('@/views/Home/index')
+const Login = () => import('@/views/Login/index')
const routes = [
{
path: '/',
@@ -49,10 +49,10 @@ const routes = [
name: 'Login',
meta: {
title: '登录',
- requireLoginAuth: true
- }
- }
- ]
+ requireLoginAuth: true,
+ },
+ },
+ ],
},
{
path: '*',
@@ -63,21 +63,20 @@ const routes = [
const router = new Router({
mode: 'history',
routes,
+ base: '/screen',
})
router.beforeEach(async (to, from, next) => {
if (to.path === '/login/index') {
- return next();
+ return next()
}
- const token = localStorage.getItem('token');
+ const token = localStorage.getItem('token')
if (!token) {
- next('/login/index'); // 跳转到登录页
+ next('/screen/login/index') // 跳转到登录页
} else {
- next(); // 放行
+ next() // 放行
}
-});
-
-
+})
// if (to.matched.some(r => r.meta.requireLoginAuth)) {
// next();
@@ -86,4 +85,3 @@ router.beforeEach(async (to, from, next) => {
// }
export default router
-
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 97cfef7..d8ec7e0 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -107,20 +107,25 @@