Commit c232d0cb by cwq0219

路由修改

1 parent c41b8254
import request from './request'
const sysMonitorPath = 'fims.system.'
function getListApi (data) {
data.method = `${sysMonitorPath}list`
return request(data)
}
function reportApi (data) {
data.method = `${sysMonitorPath}report`
return request(data)
}
export {
getListApi,
reportApi
}
\ No newline at end of file
import request from './request'
const trafficManagePath = 'fims.traffic.'
function getListApi (data) {
data.method = `${trafficManagePath}list`
return request(data)
}
function addApi (data) {
data.method = `${trafficManagePath}add`
return request(data)
}
function editApi (data) {
data.method = `${trafficManagePath}edit`
return request(data)
}
function removeApi (data) {
data.method = `${trafficManagePath}remove`
return request(data)
}
export {
getListApi,
addApi,
editApi,
removeApi
}
\ No newline at end of file
......@@ -22,11 +22,11 @@ export const home = {
icon: 'desktop',
meta: {
auth: true,
title: '首页',
title: '系统监控',
id: '101',
pid: '0'
},
component: _import('system/index')
component: _import('systemMonitor')
}
/**
......@@ -86,7 +86,78 @@ export const resources = {
pid: '102'
},
component: _import('demo/page3')
}
},
// '103': {
// path: 'trafficManagement',
// icon: 'folder-o',
// name: '车辆管理',
// meta: {
// auth: true,
// title: '车辆管理',
// id: '103',
// pid: '0'
// },
// component: _import('trafficManagement')
// },
'103': {
path: 'subSysManagement',
icon: 'folder-o',
name: '子系统管理',
meta: {
auth: true,
title: '子系统管理',
id: '103',
pid: '0'
},
component: _import('subSysManagement')
},
'104': {
path: 'trafficManagement',
icon: 'folder-o',
name: '物料管理',
meta: {
auth: true,
title: '物料管理',
id: '104',
pid: '0'
},
component: _import('trafficManagement')
},
'105': {
path: 'bb',
icon: 'folder-o',
name: '单据管理',
meta: {
auth: true,
title: '单据管理',
id: '105',
pid: '0'
},
},
'10501': {
path: '/cc',
icon: 'folder-o',
name: '物料订单管理',
meta: {
auth: true,
title: '物料订单管理',
id: '10501',
pid: '105'
},
component: _import('trafficManagement')
},
'10502': {
path: '/dd',
icon: 'folder-o',
name: '作业单管理',
meta: {
auth: true,
title: '作业单管理',
id: '10502',
pid: '105'
},
component: _import('trafficManagement')
},
}
/**
......
......@@ -110,7 +110,7 @@
</template>
<script>
import { request, sysMonitorMethods } from '@api/request'
import { getListApi, reportApi } from '@api/systemMonitor'
import notice from '@/common/notice'
export default {
name: 'systemMonitor',
......@@ -253,8 +253,7 @@ export default {
},
getList () {
const params = this.getParams()
params.method = sysMonitorMethods.Search
request(params).then(res => {
getListApi(params).then(res => {
this.tableData = res
this.tableLoading = false
}).catch(err => {
......@@ -264,11 +263,10 @@ export default {
},
getPie (systemTypeId = 1) {
const params = {
method: sysMonitorMethods.Report,
systemTypeId: systemTypeId
}
// console.log(params)
request(params).then(res => {
reportApi(params).then(res => {
this.drawPie(res)
}).catch(err => {
notice.errorTips(err)
......
......@@ -101,7 +101,7 @@
<script>
import EditDialog from './editDialog'
import { request, trafficManageMethods } from '@api/request'
import { getListApi, addApi, editApi, removeApi } from '@api/trafficManagement'
import notice from '@/common/notice'
export default {
name: 'trafficManagement',
......@@ -175,8 +175,8 @@ export default {
},
getList () {
const params = this.getParams()
params.method = trafficManageMethods.Search
request(params).then(res => {
// params.method = trafficManageMethods.Search
getListApi(params).then(res => {
this.tableData = res
this.tableLoading = false
}).catch(err => {
......@@ -186,8 +186,7 @@ export default {
},
addTraffic(value) {
const params = value
params.method = trafficManageMethods.Add
request(params).then(res => {
addApi(params).then(res => {
this.handleEditClose()
notice.okTips()
this.loadingGetList()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!