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 \ 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 \ No newline at end of file
...@@ -22,11 +22,11 @@ export const home = { ...@@ -22,11 +22,11 @@ export const home = {
icon: 'desktop', icon: 'desktop',
meta: { meta: {
auth: true, auth: true,
title: '首页', title: '系统监控',
id: '101', id: '101',
pid: '0' pid: '0'
}, },
component: _import('system/index') component: _import('systemMonitor')
} }
/** /**
...@@ -86,7 +86,78 @@ export const resources = { ...@@ -86,7 +86,78 @@ export const resources = {
pid: '102' pid: '102'
}, },
component: _import('demo/page3') 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 @@ ...@@ -110,7 +110,7 @@
</template> </template>
<script> <script>
import { request, sysMonitorMethods } from '@api/request' import { getListApi, reportApi } from '@api/systemMonitor'
import notice from '@/common/notice' import notice from '@/common/notice'
export default { export default {
name: 'systemMonitor', name: 'systemMonitor',
...@@ -253,8 +253,7 @@ export default { ...@@ -253,8 +253,7 @@ export default {
}, },
getList () { getList () {
const params = this.getParams() const params = this.getParams()
params.method = sysMonitorMethods.Search getListApi(params).then(res => {
request(params).then(res => {
this.tableData = res this.tableData = res
this.tableLoading = false this.tableLoading = false
}).catch(err => { }).catch(err => {
...@@ -264,11 +263,10 @@ export default { ...@@ -264,11 +263,10 @@ export default {
}, },
getPie (systemTypeId = 1) { getPie (systemTypeId = 1) {
const params = { const params = {
method: sysMonitorMethods.Report,
systemTypeId: systemTypeId systemTypeId: systemTypeId
} }
// console.log(params) // console.log(params)
request(params).then(res => { reportApi(params).then(res => {
this.drawPie(res) this.drawPie(res)
}).catch(err => { }).catch(err => {
notice.errorTips(err) notice.errorTips(err)
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<script> <script>
import EditDialog from './editDialog' import EditDialog from './editDialog'
import { request, trafficManageMethods } from '@api/request' import { getListApi, addApi, editApi, removeApi } from '@api/trafficManagement'
import notice from '@/common/notice' import notice from '@/common/notice'
export default { export default {
name: 'trafficManagement', name: 'trafficManagement',
...@@ -175,8 +175,8 @@ export default { ...@@ -175,8 +175,8 @@ export default {
}, },
getList () { getList () {
const params = this.getParams() const params = this.getParams()
params.method = trafficManageMethods.Search // params.method = trafficManageMethods.Search
request(params).then(res => { getListApi(params).then(res => {
this.tableData = res this.tableData = res
this.tableLoading = false this.tableLoading = false
}).catch(err => { }).catch(err => {
...@@ -186,8 +186,7 @@ export default { ...@@ -186,8 +186,7 @@ export default {
}, },
addTraffic(value) { addTraffic(value) {
const params = value const params = value
params.method = trafficManageMethods.Add addApi(params).then(res => {
request(params).then(res => {
this.handleEditClose() this.handleEditClose()
notice.okTips() notice.okTips()
this.loadingGetList() this.loadingGetList()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!