From 54a165e4ce688d4bbde3b35df926e792ae9769e1 Mon Sep 17 00:00:00 2001 From: CherrysChang <1935003650@qq.com> Date: Fri, 17 Apr 2020 17:53:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=A1=88=E4=BE=8B=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E5=90=8E=E5=8F=B0=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/app.js | 1 + src/api/server.js | 38 ++++++++++++++++++++++++++ src/views/TrainHome.vue | 3 --- src/views/train/case-list.vue | 50 +---------------------------------- 4 files changed, 40 insertions(+), 52 deletions(-) diff --git a/src/api/app.js b/src/api/app.js index 5074830..1c06524 100644 --- a/src/api/app.js +++ b/src/api/app.js @@ -1,5 +1,6 @@ //开发环境 export const app = { + trainUrl: "http://127.0.0.1:9141", sysconfUrl: "http://127.0.0.1:9131", loginUrl: "http://127.0.0.1:9121", userUrl: "http://127.0.0.1:9101", diff --git a/src/api/server.js b/src/api/server.js index 01b6bf1..974e9b6 100644 --- a/src/api/server.js +++ b/src/api/server.js @@ -13,6 +13,7 @@ import {app} from "./app"; // const sysconfApi = "http://127.0.0.1:9131"; // const loginApi = "http://127.0.0.1:9121"; // const userApi = "http://127.0.0.1:9101"; +const trainApi = app.trainUrl; const sysconfApi = app.sysconfUrl; const loginApi = app.loginUrl; const userApi = app.userUrl; @@ -28,6 +29,43 @@ const botApi = app.botUrl; export const FILE_URL = app.FILE_URL_APP; // export const FILE_URL = "http://127.0.0.1:8088/"; +/** + * 实训管理模块 Train + */ +export const Train = new (class { + constructor() { + this.getTrainListApi = trainApi + "/trainManage/list"; //实训管理列表 + this.insertTrainApi = trainApi + "/trainManage/add";//添加 + this.updTrainApi = trainApi + "/trainManage/edit";//修改 + this.delTrainApi = trainApi + "/trainManage/remove";//删除 + } + + //实训管理列表 + getTrainList(params) { + return axios + .post(this.getTrainListApi, qs.stringify(params)) + .then(res => res.data); + } + //添加 + insertTrain(params) { + return axios + .post(this.insertTrainApi, qs.stringify(params)) + .then(res => res.data); + } + //修改 + updTrain(params) { + return axios + .post(this.updTrainApi, qs.stringify(params)) + .then(res => res.data); + } + //删除 + delTrain(params) { + return axios + .post(this.delTrainApi, qs.stringify(params)) + .then(res => res.data); + } +})(); + /** * 用户管理api模块 */ diff --git a/src/views/TrainHome.vue b/src/views/TrainHome.vue index 07b5872..4dd1d0b 100644 --- a/src/views/TrainHome.vue +++ b/src/views/TrainHome.vue @@ -32,9 +32,6 @@ }, mounted() { this.$router.push({name: 'CaseList'}) - }, - methods: { - } } diff --git a/src/views/train/case-list.vue b/src/views/train/case-list.vue index f9d5fb7..9eb283e 100644 --- a/src/views/train/case-list.vue +++ b/src/views/train/case-list.vue @@ -81,6 +81,7 @@