Prechádzať zdrojové kódy

教师申请授课-选择授课科目-追加班级类型

lrf402788946 4 rokov pred
rodič
commit
63d67cd6f2
2 zmenil súbory, kde vykonal 16 pridanie a 20 odobranie
  1. 8 2
      src/views/plan/index.vue
  2. 8 18
      vue.config.js

+ 8 - 2
src/views/plan/index.vue

@@ -6,7 +6,7 @@
           <el-row>
             <el-col :span="3">
               <el-select v-model="form.subject" placeholder="请选择您想申请授课的科目" size="mini" clearable>
-                <el-option v-for="(i, index) in subjectList" :key="index" :label="i.name" :value="i._id"></el-option>
+                <el-option v-for="(i, index) in subjectList" :key="index" :label="`${i.name}`" :value="i._id"></el-option>
               </el-select>
             </el-col>
             <el-col :span="5">
@@ -112,8 +112,8 @@ export default {
     };
   },
   async created() {
-    this.getSubject();
     this.getCTList();
+    this.getSubject();
     await this.getTeacherInfo();
     this.search();
   },
@@ -204,6 +204,12 @@ export default {
     },
     async getSubject() {
       const res = await this.getSubjectList();
+      let data = res.data;
+      data = data.map(i => {
+        const r = this.classTypeList.find(f => f.code === i.type);
+        if (r) i.name = `${i.name}(${r.name})`;
+        return i;
+      });
       if (res.errcode == '0') this.$set(this, `subjectList`, res.data);
     },
     getTeaSubject() {

+ 8 - 18
vue.config.js

@@ -24,18 +24,23 @@ module.exports = {
     port: '8003',
     //api地址前缀
     proxy: {
+      '/api/auth': {
+        target: 'http://jytz.jilinjobs.cn', ///api/train http://free.liaoningdoupo.com http://jytz.jilinjobs.cn
+        changeOrigin: true,
+        ws: true,
+      },
       '/api': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://jytz.jilinjobs.cn',
         changeOrigin: true,
         ws: true,
       },
       '/files': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://jytz.jilinjobs.cn',
         changeOrigin: true,
         ws: true,
       },
       '/ws': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://jytz.jilinjobs.cn',
         ws: true,
       },
       '/weixin': {
@@ -43,21 +48,6 @@ module.exports = {
         changeOrigin: true,
         ws: true,
       },
-      '/admin/center': {
-        target: 'http://localhost:8001',
-      },
-      '/admin/director': {
-        target: 'http://localhost:8002',
-      },
-      '/admin/teacher': {
-        target: 'http://localhost:8003',
-      },
-      '/admin/student': {
-        target: 'http://localhost:8004',
-      },
-      '/admin/school': {
-        target: 'http://localhost:8005',
-      },
     },
   },
 };