فهرست منبع

首页查询分页

all 5 سال پیش
والد
کامیت
5e0a9badd7

+ 2 - 3
frontend_web/src/views/demo/page1/components/courseInfoDialog.vue

@@ -122,8 +122,6 @@ export default {
     }
   },
   created () {
-    this.getData()
-
   },
   methods: {
     dialogOpen () {
@@ -132,7 +130,8 @@ export default {
       this.getData()
     },
     dialogClose () {
-      this.information = {}
+      this.activities = []
+      console.log('---222----')
       // this.$refs.informationForm.resetFields()
       // this.$emit('handleClose')
       this.dialogVisible = false

+ 4 - 9
frontend_web/src/views/demo/page1/components/dutyInfoDialog.vue

@@ -109,7 +109,7 @@ export default {
     }
   },
   created () {
-    this.getData()
+    // this.getData()
 
   },
   methods: {
@@ -170,14 +170,11 @@ export default {
       return label
     },
     dialogOpen () {
-      this.information = {}
       // this.$refs.informationForm.resetFields()
       this.getData()
     },
     dialogClose () {
-      this.information = {}
-      // this.$refs.informationForm.resetFields()
-      // this.$emit('handleClose')
+      this.activities = []
       this.dialogVisible = false
     },
     // 分页-改变分页大小
@@ -188,16 +185,14 @@ export default {
     },
     getData () {
       let _this = this
-      _this.activities = []
       _this.getLocal()
       _this.getDutyTime()
       _this.getPeople()
       DutyApi.getDetailByDutyId({
         DutyId: _this.dutydetail.Id
       }).then(res => {
-        if (res.length > 0) {
-          _this.activities = res
-        }
+        console.log('----res--duty-', res)
+        _this.activities = res
       })
     }
 

BIN
frontend_web/src/views/demo/page1/image/background.png


+ 33 - 49
frontend_web/src/views/demo/page1/index.vue

@@ -75,32 +75,32 @@
                    :inline="true"
                    class="sbutton_padding"
                    style="margin-top: 7px;text-align:right;">
-            <el-form-item label="学">
-              <el-select v-model="search.terms"
+            <el-form-item label="学">
+              <el-select v-model="searchcourse.Year"
                          style="width: 140px;">
-                <el-option v-for="item in term"
-                           :key="item.ItemName"
-                           :label="item.ItemName"
-                           :value="item.ItemValue">
+                <el-option v-for="item in years"
+                           :key="item.value"
+                           :label="item.label"
+                           :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="班级"
                           class="sbutton_margin">
               <el-select ref="reftube"
-                         v-model="search.class"
+                         v-model="searchcourse.ClassId"
                          placeholder="请选择年级学年"
                          style="width:100%">
-                <el-option v-for="item in activitiesclass"
-                           :key="item.value"
-                           :label="item.label"
-                           :value="item.value">
+                <el-option v-for="item in classList"
+                           :key="item.Id"
+                           :label="item.Name"
+                           :value="parseInt(item.Id)">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-button size="mini"
                        type="primary"
-                       @click="initDatas()"
+                       @click="initDatasCourse()"
                        style="margin-left:10px"
                        @command="searchCommand"
                        class="sbutton_margin">查 询</el-button>
@@ -136,11 +136,6 @@
                            align="center"
                            min-width="160px"
                            show-overflow-tooltip></el-table-column>
-          <!--      <el-table-column prop="CourseWeek"-->
-          <!--                       label="教学周"-->
-          <!--                       align="center"-->
-          <!--                       min-width="160px"-->
-          <!--                       show-overflow-tooltip></el-table-column>-->
           <el-table-column prop="ClassId"
                            label="班级"
                            align="center"
@@ -208,9 +203,8 @@
             </el-form-item>
             <el-button size="mini"
                        type="primary"
-                       @click="initDatas()"
+                       @click="initDatasCourse()"
                        style="margin-left:10px"
-                       @command="searchCommand"
                        class="sbutton_margin">查 询</el-button>
             <el-button size="mini"
                        type="primary"
@@ -324,16 +318,6 @@ export default {
         }
       },
       term: [],
-      // searchcourse: {
-      //   title: '',
-      //   status: 1,
-      //   content: '',
-      //   page: {
-      //     total: 0,
-      //     current: 1,
-      //     size: 5
-      //   }
-      // },
       searchduty: {
         Term: '',
         Year: '',
@@ -346,6 +330,7 @@ export default {
       searchcourse: {
         Term: '',
         Year: '',
+        ClassId: '',
         page: {
           total: 0,
           current: 1,
@@ -377,7 +362,7 @@ export default {
     this.initDatasCourse()
     this.initSelectYear()
     this.initDatas_duty()
-    this.initDatas_class()
+    // this.initDatas_class()
     this.getTerm()
     this.getClassList()
   },
@@ -414,18 +399,18 @@ export default {
         })
     },
     // class
-    initDatas_class () {
-      let params = {
-        _currentPage: this.currpage,
-        _size: this.size
-      }
-      ClassApi.getAllClass(params)
-        .then(res => {
-          for (let i = 0; i < res.records.length; i++) {
-            this.activitiesclass.push({ value: (res.records[i].Id), label: (res.records[i].Year + '_' + res.records[i].Name) })
-          }
-        })
-    },
+    // initDatas_class () {
+    //   let params = {
+    //     _currentPage: this.currpage,
+    //     _size: this.size
+    //   }
+    //   ClassApi.getAllClass(params)
+    //     .then(res => {
+    //       for (let i = 0; i < res.records.length; i++) {
+    //         this.activitiesclass.push({ value: (res.records[i].Id), label: (res.records[i].Year + '_' + res.records[i].Name) })
+    //       }
+    //     })
+    // },
     // 发布状态
     getStatus () {
       let _this = this
@@ -484,6 +469,8 @@ export default {
         })
     },
     initSelectYear (year) {
+      var myDate = new Date()
+      var year = myDate.getFullYear() + 1 // 获取下年
       for (let i = 0; i < 5; i++) {
         this.years.push({ value: (year - i), label: (year - i) + '年' })
       }
@@ -502,7 +489,6 @@ export default {
       // }
       DutyApi.getPageList(this.searchduty)
         .then(res => {
-          console.log('----res----', res)
           _this.activitiesduty = res.records
           // _this.search.page.total = res.total
         })
@@ -586,14 +572,12 @@ export default {
       this.searchcourse.page.current = val
       this.initDatasCourse()
     },
-    searchCommand (command) {
-      if (command === 'search') {
-        this.dialogvisible = true
-      } else if (command === 'clear') {
-        this.clearSearch()
-      }
+    searchCommand () {
+      // this.initDatasCourse()
     },
     clearSearch () {
+      this.searchcourse.Year = ''
+      this.searchcourse.ClassId = ''
       // this.initDatasCourse()
     }