Merge remote-tracking branch 'origin/dev-nx' into dev-nx

This commit is contained in:
liang.chao 2024-09-13 14:30:13 +08:00
commit 1d35c72d4b
14 changed files with 226 additions and 179 deletions

View File

@ -13,7 +13,7 @@ var testUrl = '10.40.92.8:8080'
// var testUrl = ''
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
// API_ROOT: '/screen'
API_ROOT: '"/screen"',
//API调用地址
// API_ROOT: '"http://' + testUrl + '"',
// BASE_URL: '/cockpit-screen/'

View File

@ -2,46 +2,44 @@
const path = require('path')
var proxyUrl =
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
devtool: 'cheap-module-eval-source-map',
cacheBusting: true,
cssSourceMap: true,
proxyTable: {
'/screen': {
// target: 'http://112.29.103.165:21626',//重庆
// target: 'http://192.168.0.14:21624',//测试
// target: 'http://112.29.103.165:21624/', //宁夏
target: 'http://192.168.2.152:28080',
changeOrigin: true,
// secure: true, //如果是https接口需要配置这个参数
pathRewrite: {
'^/screen': '/'
}
var proxyUrl = (module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
devtool: 'cheap-module-eval-source-map',
cacheBusting: true,
cssSourceMap: true,
proxyTable: {
'/screen': {
// target: 'http://112.29.103.165:21626',//重庆
// target: 'http://192.168.0.14:21624',//测试
// target: 'http://112.29.103.165:21624/', //宁夏
target: 'http://192.168.2.136:28080',
changeOrigin: true,
// secure: true, //如果是https接口需要配置这个参数
pathRewrite: {
'^/screen': '/',
},
}
},
},
build: {
index: path.resolve(__dirname, '../dist/index01.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static01',
assetsPublicPath: '/',
productionSourceMap: false,
devtool: '#source-map',
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
bundleAnalyzerReport: process.env.npm_config_report
}
}
},
build: {
index: path.resolve(__dirname, '../dist/index01.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static01',
assetsPublicPath: '/bigScrap/',
productionSourceMap: false,
devtool: '#source-map',
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
bundleAnalyzerReport: process.env.npm_config_report,
},
})

View File

@ -4,6 +4,7 @@ var testUrl = '112.29.103.165:21624/'
// var testUrl = '192.168.0.166:8080'
module.exports = {
NODE_ENV: '"production"',
API_ROOT: '"/screen"',
//post用当前域名
// API_ROOT: '"http://' + testUrl + '/iot"'
// API_ROOT: '/',

View File

@ -2,49 +2,60 @@ 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_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_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'
// 设备类型
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)
export const getMaintenanceByMonthDetails = (data) =>
POST(URL_MAINTENANCE_BY_MONTH_DETAILS, data)

View File

@ -1,29 +1,32 @@
/**
* axios全局配置
*/
import axios from 'axios';
import axios from 'axios'
axios.defaults.timeout = 30000
// 默认配置
axios.defaults.baseURL = '';
axios.defaults.baseURL = ''
console.log(process.env.NODE_ENV, '当前环境变量-----')
console.log(process.env.API_ROOT, '当前环境代理')
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 +37,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)
}

View File

@ -1,45 +1,73 @@
import { POST, GET } from './index'
// 领料数据
export const getMaterialReqDataApi = params => POST(`/screen/base/largeScreen/home/getMaterialReqData`,)
export const getMaterialReqDataApi = (params) =>
POST(`/screen/base/largeScreen/home/getMaterialReqData`)
// 退料数据
export const getMaterialReturnDataApi = params => POST(`/screen/base/largeScreen/home/getMaterialReturnData`)
export const getMaterialReturnDataApi = (params) =>
POST(`/screen/base/largeScreen/home/getMaterialReturnData`)
//当月报废分析
export const getScrapAnalysisByMonthApi = params => POST(`/screen/base/largeScreen/home/getScrapAnalysisByMonth?maType=${params.maType}`)
export const getScrapAnalysisByMonthApi = (params) =>
POST(
`/screen/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(
`/screen/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(
`/screen/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(
`/screen/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(
`/screen/base/largeScreen/home/getMaintenanceByMonth?maType=${params.maType}`
)
//设备分布图
export const getEquipmentDisByMapApi = params => GET(`/screen/base/largeScreen/home/getEquipmentDisByMap`,)
export const getEquipmentDisByMapApi = (params) =>
GET(`/screen/base/largeScreen/home/getEquipmentDisByMap`)
//获取工程的位置信息
export const getProjectByMapApi = params => GET(`/screen/base/largeScreen/home/getEquipmentDis`, params)
export const getProjectByMapApi = (params) =>
GET(`/screen/base/largeScreen/home/getEquipmentDis`, params)
//获取设备的位置信息
export const getDeviceByMapApi = params => GET(`/screen/base/largeScreen/home/getIotMaCodeMachine`, params)
export const getDeviceByMapApi = (params) =>
GET(`/screen/base/largeScreen/home/getIotMaCodeMachine`, params)
//施工机具/
export const getTotalOwnershipApi = params => POST(`/screen/base/largeScreen/home/getTotalOwnership`,)
export const getTotalOwnershipApi = (params) =>
POST(`/screen/base/largeScreen/home/getTotalOwnership`)
// 当月使用车辆
export const getCarUseByMonthApi = params => POST(`/screen/base/largeScreen/home/getCarUseByMonth?maType=${params.maType}`,)
export const getCarUseByMonthApi = (params) =>
POST(`/screen/base/largeScreen/home/getCarUseByMonth?maType=${params.maType}`)
// 当月使用车辆
export const getMaintenanceWarningApi = params => POST(`/screen/base/largeScreen/home/getMaintenanceWarning`,)
export const getMaintenanceWarningApi = (params) =>
POST(`/screen/base/largeScreen/home/getMaintenanceWarning`)
//各公司机具保有量
export const getTotalOwnershipByCompany = params => POST(`/screen/base/largeScreen/home/getTotalOwnershipByCompany`)
export const getTotalOwnershipByCompany = (params) =>
POST(`/screen/base/largeScreen/home/getTotalOwnershipByCompany`)
/** 获取机具设备的行程信息 */
export const getIotDeviceTripApi = params => POST(`/screen/material/iotMachine/searchItinerary`, params)
export const getIotDeviceTripApi = (params) =>
POST(`/screen/material/iotMachine/searchItinerary`, params)
/** 获取机具设备的停留点信息 */
export const getIotDeviceParkDetailApi = params => POST(`/screen/material/iotMachine/reportParkDetailByTime`, params)
export const getIotDeviceParkDetailApi = (params) =>
POST(`/screen/material/iotMachine/reportParkDetailByTime`, params)
/** 获取工程领料的记录 */
export const getProjectOutApi = params => GET(`/screen/base/largeScreen/home/getLeaseRecordListByLotId`, params)
export const getProjectOutApi = (params) =>
GET(`/screen/base/largeScreen/home/getLeaseRecordListByLotId`, params)
/** 获取工程退料的记录 */
export const getProjectReturnApi = params => GET(`/screen/base/largeScreen/home/getBackRecordListByLotId`, params)
export const getProjectReturnApi = (params) =>
GET(`/screen/base/largeScreen/home/getBackRecordListByLotId`, params)
/** 获取工程退料的记录 */
export const getProjectDeviceNumApi = params => GET(`/screen/base/largeScreen/home/getUseNumByLotId`, params)
export const getProjectDeviceNumApi = (params) =>
GET(`/screen/base/largeScreen/home/getUseNumByLotId`, params)
/** 获取单位数据 */
export const getUnitListApi = params => POST(`/screen/system/select/getUnitCbx`, params)
export const getUnitListApi = (params) =>
POST(`/screen/system/select/getUnitCbx`, params)

View File

@ -196,6 +196,7 @@ export default {
show: true,
color: '#c1c1c1',
fontSize: 14,
margin: 20,
formatter: function (value) {
return value
},

View File

@ -200,8 +200,9 @@ export default {
//
axisLabel: {
show: true,
color: '#c1c1c1',
color: '#fff',
fontSize: 14,
margin: 25,
formatter: function (value) {
return value
},

View File

@ -71,14 +71,14 @@ export default {
},
mounted() {
console.log(this.$refs['box1'].scrollHeight) // 110
// this.$refs['box1'].style.height = 'auto'
// this.$refs['box1'].style.height = window.getComputedStyle(
// this.$refs['box1']
// ).height
// this.getTotalOwnershipApiPage()
// setInterval(() => {
// this.getTotalOwnershipApiPage()
// }, 60 * 1000)
this.$refs['box1'].style.height = 'auto'
this.$refs['box1'].style.height = window.getComputedStyle(
this.$refs['box1']
).height
this.getTotalOwnershipApiPage()
setInterval(() => {
this.getTotalOwnershipApiPage()
}, 60 * 1000)
},
methods: {
getTotalOwnershipApiPage() {

View File

@ -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

View File

@ -436,9 +436,9 @@ export default {
color: #d5d6da !important;
}
/deep/ .el-table__empty-block {
background-color: transparent !important;
background-color: #335684 !important;
.el-table__empty-text {
color: #d5d6da !important;
color: #fff !important;
}
}
/deep/ .el-pagination__total {

View File

@ -359,7 +359,7 @@ export default {
rgba(11, 20, 71, 1) 0%,
rgba(11, 20, 71, 0.9) 32%,
rgba(11, 20, 70, 0.5) 70%,
rgba(11, 20, 71, 0.1) 100%
rgba(11, 20, 71, 0.3) 100%
);
}

View File

@ -185,10 +185,10 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位类型"
align="center"
prop="typeId"
:show-overflow-tooltip="true"
label="单位类型"
align="center"
prop="typeId"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料工程"
@ -225,7 +225,6 @@
align="center"
prop="createTimes"
:show-overflow-tooltip="true"
sortable
/>
<el-table-column
label="任务状态"
@ -650,15 +649,15 @@ export default {
const res = await getLeaseManageListAll(params)
this.loading = false
console.log('getList ============', res, '列表查询')
res.data.rows.forEach(item => {
switch (item.typeId) {
case '0':
item.typeId = '内部单位';
break;
case '1':
item.typeId = '外部单位';
break;
}
res.data.rows.forEach((item) => {
switch (item.typeId) {
case '0':
item.typeId = '内部单位'
break
case '1':
item.typeId = '外部单位'
break
}
})
this.leaseAuditList = res.data.rows
// this.leaseAuditList.forEach((item,index)=>{

View File

@ -4,32 +4,34 @@
</template>
<script>
export default {
data() {
return {
// url: '/new-page' //
jumpUrl: '',
}
export default {
data() {
return {
// url: '/new-page' //
jumpUrl: '',
}
},
created() {
const origin = window.location.origin
this.jumpUrl = origin
// const origin = window.location.origin
// if (origin == 'http://112.29.103.165:21624') {
// this.jumpUrl = origin
// } else {
// this.jumpUrl = 'http://192.168.0.14:21624'
// }
this.openNewWindow()
this.$tab.closePage().then(() => {})
},
methods: {
openNewWindow() {
window.open(
`${
this.jumpUrl
}/bigScrap/index01.html?token=${localStorage.getItem('token')}`,
'_blank',
)
},
created() {
const origin = window.location.origin
if (origin == 'http://112.29.103.165:21624') {
this.jumpUrl = origin
} else {
this.jumpUrl = 'http://192.168.0.14:21624'
}
this.openNewWindow()
this.$tab.closePage().then(() => {})
},
methods: {
openNewWindow() {
window.open(
`${this.jumpUrl}/index01.html?token=${localStorage.getItem(
'token',
)}`,
'_blank',
)
},
},
}
},
}
</script>