Selaa lähdekoodia

修改微信设置及两处查询优化

lrf 1 vuosi sitten
vanhempi
commit
b48f20f0a3

+ 4 - 2
src/plugins/setting.js

@@ -1,8 +1,10 @@
 import Vue from 'vue';
 Vue.config.weixin = {
   // baseUrl: process.env.BASE_URL + 'weixin',
-  baseUrl: process.env.NODE_ENV === 'development' ? 'http://free.liaoningdoupo.com' : 'http://jytz.jilinjobs.cn',
-  target: process.env.NODE_ENV === 'development' ? 'http://10.16.10.7:8001' : 'http://jytz.jilinjobs.cn/student',
+  // baseUrl: process.env.NODE_ENV === 'development' ? 'http://free.liaoningdoupo.com' : 'http://jytz.jilinjobs.cn',
+  // target: process.env.NODE_ENV === 'development' ? 'http://10.16.10.7:8001' : 'http://jytz.jilinjobs.cn/student',
+  baseUrl: 'http://jytz.jilinjobs.cn',
+  target: 'http://jytz.jilinjobs.cn/student',
 };
 
 Vue.config.stomp = {

+ 1 - 1
src/views/new-plan/deal-list.vue

@@ -113,7 +113,7 @@ export default {
     },
   },
   computed: {
-    ...mapState(['user']),
+    ...mapState(['user', 'defaultOption']),
     pageTitle() {
       return `${this.$route.meta.title}`;
     },

+ 13 - 4
src/views/new-plan/teacher-plan.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="index">
     <list-frame title="教师上报" @query="search" :total="total" :needFilter="false">
-      <el-row>
+      <el-row :gutter="20">
         <el-col :span="3">
           <el-select v-model="form.teacherid" placeholder="搜索教师" size="mini" clearable filterable>
             <el-option v-for="(i, index) in teacherList" :key="index" :label="i.name" :value="i._id"></el-option>
@@ -21,7 +21,7 @@
 import listFrame from '@frame/layout/admin/list-frame';
 import dataTable from '@frame/components/data-table';
 const _ = require('lodash');
-import { createNamespacedHelpers } from 'vuex';
+import { createNamespacedHelpers, mapState } from 'vuex';
 const { mapActions: teaplan } = createNamespacedHelpers('teaPlan');
 const { mapActions: teacher } = createNamespacedHelpers('teacher');
 const { mapActions: subject } = createNamespacedHelpers('subject');
@@ -57,14 +57,17 @@ export default {
     await this.getOtherList();
     this.search();
   },
-  computed: {},
+  computed: {
+    ...mapState(['defaultOption']),
+  },
   methods: {
     ...classtype({ getCt: 'query' }),
     ...teaplan({ apply: 'create', applyFetch: 'query', applyDelete: 'delete' }),
     ...subject({ getSubjectList: 'query' }),
     ...teacher({ getTeacher: 'query' }),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.applyFetch({ skip, limit, ...info, ...this.form });
+      const defaultCondition = { termid: _.get(this.defaultOption, 'termid') };
+      const res = await this.applyFetch({ skip, limit, ...info, ...this.form, ...defaultCondition });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);
@@ -108,6 +111,12 @@ export default {
       },
       deep: true,
     },
+    'defaultOption.termid': {
+      handler(val, oval) {
+        this.search();
+      },
+      deep: true,
+    },
   },
 };
 </script>