diff --git a/templates/front-project/src/api/api.js b/templates/front-project/src/api/api.js index 11a914af142049aa7e65af55690ca46a407bd1c4..afc6ef60366a9f8b352129d87f4481951c53d6c4 100644 --- a/templates/front-project/src/api/api.js +++ b/templates/front-project/src/api/api.js @@ -210,4 +210,18 @@ export function error_list(type, paramsOrData) { commonConfig.data = paramsOrData; } return service(commonConfig); +} + +//错误数据管理 +export function machine_list(type, paramsOrData) { + const commonConfig = { + method: type, + url: '/machine_list/', + }; + if (type === 'get') { + commonConfig.params = paramsOrData; + } else { + commonConfig.data = paramsOrData; + } + return service(commonConfig); } \ No newline at end of file diff --git a/templates/front-project/src/components/kytuningLogin.vue b/templates/front-project/src/components/kytuningLogin.vue index 7e5daddc9e292daeba7509ec1f9ac805f561f8e2..2769aa1714f625a55b35049ea6ccb491f42958f3 100644 --- a/templates/front-project/src/components/kytuningLogin.vue +++ b/templates/front-project/src/components/kytuningLogin.vue @@ -60,7 +60,7 @@ export default { setToken('username', res.data.username) setToken('token', 'Bearer ' + res.data.token) this.$message({message: '登录成功', type: 'success'}) - this.$router.push('/test/list') + this.$router.push('/tempData') } }).catch(error => { // 捕获错误 diff --git a/templates/front-project/src/router/index.js b/templates/front-project/src/router/index.js index 9cbdd15da0e438629c3cb459136d571bfe0bef7d..fe7c37b45d461bc75e2c7914d9579bbf06318670 100644 --- a/templates/front-project/src/router/index.js +++ b/templates/front-project/src/router/index.js @@ -16,10 +16,17 @@ const routes = [ component: () => import('@/components/kytuningLogin'), }, { - path: '/test1', + path: '/machine/list', name: '设备管理', iconClass: 'fa fa-users', component: () => import('@/components/KytuningHome'), + children: [ + { + name: '设备中心', + path: '/machine/list', + component: () => import('@/views/machineViews/MachineList'), + children: [] + },] }, { path: '/test/list', @@ -38,11 +45,11 @@ const routes = [ component: () => import('@/views/testViews/DoTest'), // props:true // 如果props设置为true,$route.params将被设置为组件属性记对象 }, - { - path: '/test/do_test_yaml', - name: '发起测试-yaml', - component: () => import('@/views/testViews/DoTest-yaml'), - }, + // { + // path: '/test/do_test_yaml', + // name: '发起测试-yaml', + // component: () => import('@/views/testViews/DoTest-yaml'), + // }, { path: '/test/config', name: '配置管理', diff --git a/templates/front-project/src/views/machineViews/MachineList.vue b/templates/front-project/src/views/machineViews/MachineList.vue new file mode 100644 index 0000000000000000000000000000000000000000..158571ca0cba6d92b9ec99df032c8dff896b3137 --- /dev/null +++ b/templates/front-project/src/views/machineViews/MachineList.vue @@ -0,0 +1,209 @@ + + + + + + + + +