فهرست منبع

batch control line - condition update

hare8999@163.com 1 سال پیش
والد
کامیت
525cda44b5

+ 1 - 0
src/components/MxCondition/condition-object/condition-exe-qType-chapter.js

@@ -6,6 +6,7 @@ export default {
   key: 'exeQTypeChapter',
   alias: 'qtpye', // NOTE: 就是用错别字,别改
   title: '题型',
+  neverCache: true,
   dependentKeys: ['exeGrade'],
   getList: async function(param, vm) {
     const query = {

+ 1 - 0
src/components/MxCondition/condition-object/condition-year-admission.js

@@ -5,6 +5,7 @@ export default {
   ...conditionObjectBase,
   dependentKeys: ['location'],
   key: 'yearAdmission',
+  alias: 'year',
   title: '学年',
   isDependencyReady(params) {
     return params.location

+ 10 - 15
src/views/career/zhiyuan/batch.vue

@@ -25,8 +25,8 @@
     </el-card>
     <el-card>
       <div>
-        <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
-                      @invalid="handleInvalidQuery"></mx-condition>
+        <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" :invisible-fields="invisibleFields"
+                      use-alias-mapping @query="handleQuery" />
       </div>
       <div class="content">
         <mx-table :rows="batchData" :propDefines="propDefines"> </mx-table>
@@ -53,7 +53,9 @@ export default {
         location: '',
         yearAdmission: '',
       },
-      requireFields:['location'],
+      firedParams: null,
+      requireFields:['location', 'yearAdmission'],
+      invisibleFields: ['location'],
       backimg:
         "url(" + require("@/assets/images/career/icon_colleges.png") + ")",
       batchData: [],
@@ -88,28 +90,21 @@ export default {
     this.queryParams.location = this.currentUser.provinceName
   },
   methods: {
-    handleQuery() {
+    handleQuery(model) {
+      this.firedParams = model
       this.pageForm.pageNum = 1;
       this.getBatchList()
     },
-    handleInvalidQuery() {
-      console.log('query出错')
-      this.round = {}
-    },
-    onChangePage(page){
-      this.pageForm.pageSize = page.limit;
-      this.pageForm.pageNum = page.page;
+    onChangePage(){
       this.getBatchList();
     },
     getBatchList() {
       pckzxList({
-        ...this.pageForm,
-        location: this.queryParams.location,
-        year: this.queryParams.yearAdmission,
+        ...this.firedParams,
+        ...this.pageForm
       }).then((res) => {
         this.batchData = res.rows;
         this.pageForm.total = res.total;
-        console.log(res);
       });
     },
   },