Merge remote-tracking branch 'origin/dev-nx' into dev-nx
This commit is contained in:
commit
1d35c72d4b
|
|
@ -13,7 +13,7 @@ var testUrl = '10.40.92.8:8080'
|
||||||
// var testUrl = ''
|
// var testUrl = ''
|
||||||
module.exports = merge(prodEnv, {
|
module.exports = merge(prodEnv, {
|
||||||
NODE_ENV: '"development"',
|
NODE_ENV: '"development"',
|
||||||
// API_ROOT: '/screen'
|
API_ROOT: '"/screen"',
|
||||||
//API调用地址
|
//API调用地址
|
||||||
// API_ROOT: '"http://' + testUrl + '"',
|
// API_ROOT: '"http://' + testUrl + '"',
|
||||||
// BASE_URL: '/cockpit-screen/'
|
// BASE_URL: '/cockpit-screen/'
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
var proxyUrl =
|
var proxyUrl = (module.exports = {
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
dev: {
|
dev: {
|
||||||
// Paths
|
// Paths
|
||||||
assetsSubDirectory: 'static',
|
assetsSubDirectory: 'static',
|
||||||
|
|
@ -23,25 +21,25 @@ var proxyUrl =
|
||||||
// target: 'http://112.29.103.165:21626',//重庆
|
// target: 'http://112.29.103.165:21626',//重庆
|
||||||
// target: 'http://192.168.0.14:21624',//测试
|
// target: 'http://192.168.0.14:21624',//测试
|
||||||
// target: 'http://112.29.103.165:21624/', //宁夏
|
// target: 'http://112.29.103.165:21624/', //宁夏
|
||||||
target: 'http://192.168.2.152:28080',
|
target: 'http://192.168.2.136:28080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
// secure: true, //如果是https接口,需要配置这个参数
|
// secure: true, //如果是https接口,需要配置这个参数
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/screen': '/'
|
'^/screen': '/',
|
||||||
}
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
index: path.resolve(__dirname, '../dist/index01.html'),
|
index: path.resolve(__dirname, '../dist/index01.html'),
|
||||||
// Paths
|
// Paths
|
||||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||||
assetsSubDirectory: 'static01',
|
assetsSubDirectory: 'static01',
|
||||||
assetsPublicPath: '/',
|
assetsPublicPath: '/bigScrap/',
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
devtool: '#source-map',
|
devtool: '#source-map',
|
||||||
productionGzip: false,
|
productionGzip: false,
|
||||||
productionGzipExtensions: ['js', 'css'],
|
productionGzipExtensions: ['js', 'css'],
|
||||||
bundleAnalyzerReport: process.env.npm_config_report
|
bundleAnalyzerReport: process.env.npm_config_report,
|
||||||
}
|
},
|
||||||
}
|
})
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ var testUrl = '112.29.103.165:21624/'
|
||||||
// var testUrl = '192.168.0.166:8080'
|
// var testUrl = '192.168.0.166:8080'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: '"production"',
|
NODE_ENV: '"production"',
|
||||||
|
API_ROOT: '"/screen"',
|
||||||
//post用当前域名
|
//post用当前域名
|
||||||
// API_ROOT: '"http://' + testUrl + '/iot"'
|
// API_ROOT: '"http://' + testUrl + '/iot"'
|
||||||
// API_ROOT: '/',
|
// API_ROOT: '/',
|
||||||
|
|
|
||||||
|
|
@ -2,49 +2,60 @@ import { POST, GET } from './index.js'
|
||||||
|
|
||||||
const URL_TYPE_LIST = '/screen/material/returnOfMaterialsInfo/getTypeList'
|
const URL_TYPE_LIST = '/screen/material/returnOfMaterialsInfo/getTypeList'
|
||||||
const URL_DETAILS = '/screen/base/largeScreen/home/getMaterialReqData/details'
|
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_UNIT_LIST = '/screen/material/agreementInfo/getUnitList'
|
||||||
const URL_PROJECT_LIST = '/screen/material/agreementInfo/getProjectList'
|
const URL_PROJECT_LIST = '/screen/material/agreementInfo/getProjectList'
|
||||||
const URL_SCRAP_ANALYSIS = '/screen/base/largeScreen/home/getScrapAnalysisByMonth/details'
|
const URL_SCRAP_ANALYSIS =
|
||||||
const URL_TOTAL_OWNERSHIP = '/screen/base/largeScreen/home/getTotalOwnership/details'
|
'/screen/base/largeScreen/home/getScrapAnalysisByMonth/details'
|
||||||
const URL_ACCEPTANCE_STORAGE = '/screen/base/largeScreen/home/getAcceptanceStorage/details'
|
const URL_TOTAL_OWNERSHIP =
|
||||||
const URL_PICKING_ANALYSIS = '/screen/base/largeScreen/home/getPickingAnalysisByMonth/details'
|
'/screen/base/largeScreen/home/getTotalOwnership/details'
|
||||||
const URL_MATERIAL_RETURN_BY_MONTH = '/screen/base/largeScreen/home/getMaterialReturnByMonth/details'
|
const URL_ACCEPTANCE_STORAGE =
|
||||||
const URL_MAINTENANCE_BY_CHART = '/screen/base/largeScreen/home/getMaintenanceByMonth/chart'
|
'/screen/base/largeScreen/home/getAcceptanceStorage/details'
|
||||||
const URL_MAINTENANCE_BY_MONTH_DETAILS = '/screen/base/largeScreen/home/getMaintenanceByMonth/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
|
// 维修分析-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)
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,32 @@
|
||||||
/**
|
/**
|
||||||
* axios全局配置
|
* axios全局配置
|
||||||
*/
|
*/
|
||||||
import axios from 'axios';
|
import axios from 'axios'
|
||||||
axios.defaults.timeout = 30000
|
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(
|
axios.interceptors.request.use(
|
||||||
config => {
|
(config) => {
|
||||||
let token = localStorage.getItem('token')
|
let token = localStorage.getItem('token')
|
||||||
if (token) {
|
if (token) {
|
||||||
config.headers.accessToken = `${token}`;
|
config.headers.accessToken = `${token}`
|
||||||
config.headers.Authorization = `${token}`;
|
config.headers.Authorization = `${token}`
|
||||||
}
|
}
|
||||||
return config;
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
(error) => {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
// 添加一个请求拦截器
|
// 添加一个请求拦截器
|
||||||
axios.interceptors.response.use(
|
axios.interceptors.response.use(
|
||||||
response => {
|
(response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
if (response.data.code === 401) {
|
if (response.data.code === 401) {
|
||||||
} else if (response.data.code === 200) {
|
} else if (response.data.code === 200) {
|
||||||
|
|
@ -34,30 +37,36 @@ axios.interceptors.response.use(
|
||||||
} else {
|
} else {
|
||||||
return Promise.reject(response.data)
|
return Promise.reject(response.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error => {
|
(error) => {
|
||||||
if (error.code === 'ECONNABORTED' && error.message.indexOf('timeout') !== -1)
|
if (
|
||||||
|
error.code === 'ECONNABORTED' &&
|
||||||
|
error.message.indexOf('timeout') !== -1
|
||||||
|
)
|
||||||
console.log('请求超时!')
|
console.log('请求超时!')
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
// 通用POST方法
|
// 通用POST方法
|
||||||
export const POST = (url, params) => {
|
export const POST = (url, params) => {
|
||||||
return axios.post(`${url}`, params).then(response => response);
|
return axios.post(`${url}`, params).then((response) => response)
|
||||||
};
|
}
|
||||||
|
|
||||||
// 通用POST_JSON方法
|
// 通用POST_JSON方法
|
||||||
export const POST_JSON = (url, json, params) => {
|
export const POST_JSON = (url, json, params) => {
|
||||||
return axios.post(`${url}`, json, {
|
return axios
|
||||||
params: params
|
.post(`${url}`, json, {
|
||||||
}).then(response => response);
|
params: params,
|
||||||
};
|
})
|
||||||
|
.then((response) => response)
|
||||||
|
}
|
||||||
|
|
||||||
// 通用GET方法
|
// 通用GET方法
|
||||||
export const GET = (url, params) => {
|
export const GET = (url, params) => {
|
||||||
return axios.get(`${url}`, {
|
return axios
|
||||||
params: params
|
.get(`${url}`, {
|
||||||
}).then(response => response);
|
params: params,
|
||||||
};
|
})
|
||||||
|
.then((response) => response)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,73 @@
|
||||||
import { POST, GET } from './index'
|
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)
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,7 @@ export default {
|
||||||
show: true,
|
show: true,
|
||||||
color: '#c1c1c1',
|
color: '#c1c1c1',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
margin: 20,
|
||||||
formatter: function (value) {
|
formatter: function (value) {
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -200,8 +200,9 @@ export default {
|
||||||
//坐标值标注
|
//坐标值标注
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
color: '#c1c1c1',
|
color: '#fff',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
margin: 25,
|
||||||
formatter: function (value) {
|
formatter: function (value) {
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -71,14 +71,14 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.$refs['box1'].scrollHeight) // 110
|
console.log(this.$refs['box1'].scrollHeight) // 110
|
||||||
// this.$refs['box1'].style.height = 'auto'
|
this.$refs['box1'].style.height = 'auto'
|
||||||
// this.$refs['box1'].style.height = window.getComputedStyle(
|
this.$refs['box1'].style.height = window.getComputedStyle(
|
||||||
// this.$refs['box1']
|
this.$refs['box1']
|
||||||
// ).height
|
).height
|
||||||
// this.getTotalOwnershipApiPage()
|
this.getTotalOwnershipApiPage()
|
||||||
// setInterval(() => {
|
setInterval(() => {
|
||||||
// this.getTotalOwnershipApiPage()
|
this.getTotalOwnershipApiPage()
|
||||||
// }, 60 * 1000)
|
}, 60 * 1000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTotalOwnershipApiPage() {
|
getTotalOwnershipApiPage() {
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ Vue.use(Router)
|
||||||
|
|
||||||
const originalPush = Router.prototype.push
|
const originalPush = Router.prototype.push
|
||||||
Router.prototype.push = function push(location) {
|
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 Layout = () => import('@/views/layout')
|
||||||
const Home = () => import('@/views/Home/index');
|
const Home = () => import('@/views/Home/index')
|
||||||
const Login = () => import('@/views/new-login/index.vue');
|
const Login = () => import('@/views/new-login/index.vue')
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '*',
|
path: '*',
|
||||||
|
|
@ -22,18 +22,18 @@ const routes = [
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
meta: {
|
meta: {
|
||||||
title: '登录',
|
title: '登录',
|
||||||
requireLoginAuth: true
|
requireLoginAuth: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/home-new',
|
path: '/home-new',
|
||||||
name: 'home-new',
|
name: 'home-new',
|
||||||
component: () => import('@/views/newHome/index.vue')
|
component: () => import('@/views/newHome/index.vue'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/home-old',
|
path: '/home-old',
|
||||||
name: '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({
|
const router = new Router({
|
||||||
mode: 'history',
|
mode: 'history',
|
||||||
routes,
|
routes,
|
||||||
|
base: '/bigScrap',
|
||||||
})
|
})
|
||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
|
if (to.path === '/bigScrap/login/index') {
|
||||||
if (to.path === '/login/index') {
|
return next()
|
||||||
return next();
|
|
||||||
}
|
}
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token')
|
||||||
if (!token) {
|
if (!token) {
|
||||||
next('/login/index'); // 跳转到登录页
|
next('/bigScrap/login/index') // 跳转到登录页
|
||||||
} else {
|
} else {
|
||||||
next(); // 放行
|
next() // 放行
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (to.matched.some(r => r.meta.requireLoginAuth)) {
|
// if (to.matched.some(r => r.meta.requireLoginAuth)) {
|
||||||
// next();
|
// next();
|
||||||
|
|
@ -107,4 +105,3 @@ router.beforeEach(async (to, from, next) => {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -436,9 +436,9 @@ export default {
|
||||||
color: #d5d6da !important;
|
color: #d5d6da !important;
|
||||||
}
|
}
|
||||||
/deep/ .el-table__empty-block {
|
/deep/ .el-table__empty-block {
|
||||||
background-color: transparent !important;
|
background-color: #335684 !important;
|
||||||
.el-table__empty-text {
|
.el-table__empty-text {
|
||||||
color: #d5d6da !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/ .el-pagination__total {
|
/deep/ .el-pagination__total {
|
||||||
|
|
|
||||||
|
|
@ -359,7 +359,7 @@ export default {
|
||||||
rgba(11, 20, 71, 1) 0%,
|
rgba(11, 20, 71, 1) 0%,
|
||||||
rgba(11, 20, 71, 0.9) 32%,
|
rgba(11, 20, 71, 0.9) 32%,
|
||||||
rgba(11, 20, 70, 0.5) 70%,
|
rgba(11, 20, 70, 0.5) 70%,
|
||||||
rgba(11, 20, 71, 0.1) 100%
|
rgba(11, 20, 71, 0.3) 100%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,6 @@
|
||||||
align="center"
|
align="center"
|
||||||
prop="createTimes"
|
prop="createTimes"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
sortable
|
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="任务状态"
|
label="任务状态"
|
||||||
|
|
@ -650,14 +649,14 @@ export default {
|
||||||
const res = await getLeaseManageListAll(params)
|
const res = await getLeaseManageListAll(params)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log('getList ============', res, '列表查询')
|
console.log('getList ============', res, '列表查询')
|
||||||
res.data.rows.forEach(item => {
|
res.data.rows.forEach((item) => {
|
||||||
switch (item.typeId) {
|
switch (item.typeId) {
|
||||||
case '0':
|
case '0':
|
||||||
item.typeId = '内部单位';
|
item.typeId = '内部单位'
|
||||||
break;
|
break
|
||||||
case '1':
|
case '1':
|
||||||
item.typeId = '外部单位';
|
item.typeId = '外部单位'
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.leaseAuditList = res.data.rows
|
this.leaseAuditList = res.data.rows
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// url: '/new-page' // 目标页面的路径
|
// url: '/new-page' // 目标页面的路径
|
||||||
|
|
@ -13,23 +13,25 @@
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const origin = window.location.origin
|
const origin = window.location.origin
|
||||||
if (origin == 'http://112.29.103.165:21624') {
|
|
||||||
this.jumpUrl = origin
|
this.jumpUrl = origin
|
||||||
} else {
|
// const origin = window.location.origin
|
||||||
this.jumpUrl = 'http://192.168.0.14:21624'
|
// if (origin == 'http://112.29.103.165:21624') {
|
||||||
}
|
// this.jumpUrl = origin
|
||||||
|
// } else {
|
||||||
|
// this.jumpUrl = 'http://192.168.0.14:21624'
|
||||||
|
// }
|
||||||
this.openNewWindow()
|
this.openNewWindow()
|
||||||
this.$tab.closePage().then(() => {})
|
this.$tab.closePage().then(() => {})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openNewWindow() {
|
openNewWindow() {
|
||||||
window.open(
|
window.open(
|
||||||
`${this.jumpUrl}/index01.html?token=${localStorage.getItem(
|
`${
|
||||||
'token',
|
this.jumpUrl
|
||||||
)}`,
|
}/bigScrap/index01.html?token=${localStorage.getItem('token')}`,
|
||||||
'_blank',
|
'_blank',
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue