From ad676e57dc349a7eba62b23bace3eb55a1f8d142 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 12 Sep 2024 11:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E9=85=8D=E7=BD=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-screen/config/index.js | 2 +- sgzb-screen/src/api/dialog.js | 59 +++++++++++++++----------- sgzb-screen/src/api/screen.js | 74 +++++++++++++++++++++++---------- sgzb-screen/src/router/index.js | 33 +++++++-------- sgzb-ui/src/views/dashboard.vue | 58 ++++++++++++++------------ 5 files changed, 134 insertions(+), 92 deletions(-) diff --git a/sgzb-screen/config/index.js b/sgzb-screen/config/index.js index 0152b584..504ab0d3 100644 --- a/sgzb-screen/config/index.js +++ b/sgzb-screen/config/index.js @@ -35,7 +35,7 @@ var proxyUrl = (module.exports = { // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static01', - assetsPublicPath: '/', + assetsPublicPath: '/bigScrap/', productionSourceMap: false, devtool: '#source-map', productionGzip: false, diff --git a/sgzb-screen/src/api/dialog.js b/sgzb-screen/src/api/dialog.js index 0cc31b80..2621fea0 100644 --- a/sgzb-screen/src/api/dialog.js +++ b/sgzb-screen/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 = '/bigScrap/material/returnOfMaterialsInfo/getTypeList' +const URL_DETAILS = '/bigScrap/base/largeScreen/home/getMaterialReqData/details' +const URL_RETURN_DETAILS = + '/bigScrap/base/largeScreen/home/getMaterialReturnData/details' +const URL_UNIT_LIST = '/bigScrap/material/agreementInfo/getUnitList' +const URL_PROJECT_LIST = '/bigScrap/material/agreementInfo/getProjectList' +const URL_SCRAP_ANALYSIS = + '/bigScrap/base/largeScreen/home/getScrapAnalysisByMonth/details' +const URL_TOTAL_OWNERSHIP = + '/bigScrap/base/largeScreen/home/getTotalOwnership/details' +const URL_ACCEPTANCE_STORAGE = + '/bigScrap/base/largeScreen/home/getAcceptanceStorage/details' +const URL_PICKING_ANALYSIS = + '/bigScrap/base/largeScreen/home/getPickingAnalysisByMonth/details' +const URL_MATERIAL_RETURN_BY_MONTH = + '/bigScrap/base/largeScreen/home/getMaterialReturnByMonth/details' +const URL_MAINTENANCE_BY_CHART = + '/bigScrap/base/largeScreen/home/getMaintenanceByMonth/chart' +const URL_MAINTENANCE_BY_MONTH_DETAILS = + '/bigScrap/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/sgzb-screen/src/api/screen.js b/sgzb-screen/src/api/screen.js index 61b6df96..4f2de387 100644 --- a/sgzb-screen/src/api/screen.js +++ b/sgzb-screen/src/api/screen.js @@ -1,45 +1,75 @@ import { POST, GET } from './index' // 领料数据 -export const getMaterialReqDataApi = params => POST(`/screen/base/largeScreen/home/getMaterialReqData`,) +export const getMaterialReqDataApi = (params) => + POST(`/bigScrap/base/largeScreen/home/getMaterialReqData`) // 退料数据 -export const getMaterialReturnDataApi = params => POST(`/screen/base/largeScreen/home/getMaterialReturnData`) +export const getMaterialReturnDataApi = (params) => + POST(`/bigScrap/base/largeScreen/home/getMaterialReturnData`) //当月报废分析 -export const getScrapAnalysisByMonthApi = params => POST(`/screen/base/largeScreen/home/getScrapAnalysisByMonth?maType=${params.maType}`) +export const getScrapAnalysisByMonthApi = (params) => + POST( + `/bigScrap/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( + `/bigScrap/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( + `/bigScrap/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( + `/bigScrap/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( + `/bigScrap/base/largeScreen/home/getMaintenanceByMonth?maType=${params.maType}` + ) //设备分布图 -export const getEquipmentDisByMapApi = params => GET(`/screen/base/largeScreen/home/getEquipmentDisByMap`,) +export const getEquipmentDisByMapApi = (params) => + GET(`/bigScrap/base/largeScreen/home/getEquipmentDisByMap`) //获取工程的位置信息 -export const getProjectByMapApi = params => GET(`/screen/base/largeScreen/home/getEquipmentDis`, params) +export const getProjectByMapApi = (params) => + GET(`/bigScrap/base/largeScreen/home/getEquipmentDis`, params) //获取设备的位置信息 -export const getDeviceByMapApi = params => GET(`/screen/base/largeScreen/home/getIotMaCodeMachine`, params) +export const getDeviceByMapApi = (params) => + GET(`/bigScrap/base/largeScreen/home/getIotMaCodeMachine`, params) //施工机具/ -export const getTotalOwnershipApi = params => POST(`/screen/base/largeScreen/home/getTotalOwnership`,) +export const getTotalOwnershipApi = (params) => + POST(`/bigScrap/base/largeScreen/home/getTotalOwnership`) // 当月使用车辆 -export const getCarUseByMonthApi = params => POST(`/screen/base/largeScreen/home/getCarUseByMonth?maType=${params.maType}`,) +export const getCarUseByMonthApi = (params) => + POST( + `/bigScrap/base/largeScreen/home/getCarUseByMonth?maType=${params.maType}` + ) // 当月使用车辆 -export const getMaintenanceWarningApi = params => POST(`/screen/base/largeScreen/home/getMaintenanceWarning`,) +export const getMaintenanceWarningApi = (params) => + POST(`/bigScrap/base/largeScreen/home/getMaintenanceWarning`) //各公司机具保有量 -export const getTotalOwnershipByCompany = params => POST(`/screen/base/largeScreen/home/getTotalOwnershipByCompany`) - +export const getTotalOwnershipByCompany = (params) => + POST(`/bigScrap/base/largeScreen/home/getTotalOwnershipByCompany`) /** 获取机具设备的行程信息 */ -export const getIotDeviceTripApi = params => POST(`/screen/material/iotMachine/searchItinerary`, params) +export const getIotDeviceTripApi = (params) => + POST(`/bigScrap/material/iotMachine/searchItinerary`, params) /** 获取机具设备的停留点信息 */ -export const getIotDeviceParkDetailApi = params => POST(`/screen/material/iotMachine/reportParkDetailByTime`, params) +export const getIotDeviceParkDetailApi = (params) => + POST(`/bigScrap/material/iotMachine/reportParkDetailByTime`, params) /** 获取工程领料的记录 */ -export const getProjectOutApi = params => GET(`/screen/base/largeScreen/home/getLeaseRecordListByLotId`, params) +export const getProjectOutApi = (params) => + GET(`/bigScrap/base/largeScreen/home/getLeaseRecordListByLotId`, params) /** 获取工程退料的记录 */ -export const getProjectReturnApi = params => GET(`/screen/base/largeScreen/home/getBackRecordListByLotId`, params) +export const getProjectReturnApi = (params) => + GET(`/bigScrap/base/largeScreen/home/getBackRecordListByLotId`, params) /** 获取工程退料的记录 */ -export const getProjectDeviceNumApi = params => GET(`/screen/base/largeScreen/home/getUseNumByLotId`, params) +export const getProjectDeviceNumApi = (params) => + GET(`/bigScrap/base/largeScreen/home/getUseNumByLotId`, params) /** 获取单位数据 */ -export const getUnitListApi = params => POST(`/screen/system/select/getUnitCbx`, params) - +export const getUnitListApi = (params) => + POST(`/bigScrap/system/select/getUnitCbx`, params) diff --git a/sgzb-screen/src/router/index.js b/sgzb-screen/src/router/index.js index efe6cb05..1b1af48f 100644 --- a/sgzb-screen/src/router/index.js +++ b/sgzb-screen/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/new-login/index.vue'); +const Layout = () => import('@/views/layout') +const Home = () => import('@/views/Home/index') +const Login = () => import('@/views/new-login/index.vue') const routes = [ { path: '*', @@ -22,18 +22,18 @@ const routes = [ name: 'Login', meta: { title: '登录', - requireLoginAuth: true - } + requireLoginAuth: true, + }, }, { path: '/home-new', name: 'home-new', - component: () => import('@/views/newHome/index.vue') + component: () => import('@/views/newHome/index.vue'), }, { path: '/home-old', name: 'home-old', - component: () => import('@/views/oldHome/index.vue') + component: () => import('@/views/oldHome/index.vue'), }, // { @@ -83,22 +83,20 @@ const routes = [ const router = new Router({ mode: 'history', routes, + base: '/bigScrap', }) router.beforeEach(async (to, from, next) => { - - if (to.path === '/login/index') { - return next(); + if (to.path === '/bigScrap/login/index') { + return next() } - const token = localStorage.getItem('token'); + const token = localStorage.getItem('token') if (!token) { - next('/login/index'); // 跳转到登录页 + next('/bigScrap/login/index') // 跳转到登录页 } else { - next(); // 放行 + next() // 放行 } -}); - - +}) // if (to.matched.some(r => r.meta.requireLoginAuth)) { // next(); @@ -107,4 +105,3 @@ router.beforeEach(async (to, from, next) => { // } export default router - diff --git a/sgzb-ui/src/views/dashboard.vue b/sgzb-ui/src/views/dashboard.vue index f60c4a30..b8702da7 100644 --- a/sgzb-ui/src/views/dashboard.vue +++ b/sgzb-ui/src/views/dashboard.vue @@ -4,32 +4,36 @@