Browse Source

证件管理分页和字段隐藏

jbb 2 years ago
parent
commit
440c428a6a

+ 13 - 2
src/views/system/CertificateManagement.vue

@@ -79,7 +79,7 @@
         rowKey="id"
         :columns="columns"
         :dataSource="dataSource"
-        :pagination="ipagination"
+        :pagination="pagination"
         :loading="loading"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
@@ -186,7 +186,8 @@
         dataSource:[],
         selectedRowKeys:[],
         beDate:'',
-        enDate:''
+        enDate:'',
+        pagination:{  }
       }
     },
     computed: {
@@ -214,6 +215,11 @@
                     // console.log('>>>>', this.queryParam)
                     if (res.success) {
                        this.dataSource =res.result.records
+                       this.pagination = {
+                          total: res.result.total,
+                           current: res.result.current,
+                           pageSize: res.result.size
+                        }
                     }else{
                        this.$message.error(res.message);
                     }
@@ -268,6 +274,11 @@
          onEndDateChange(value){
            this.queryParam.endDate =moment(value).format('YYYY-MM-DD');
          },
+         // 分页变化时触发
+         handleTableChange(pagination, filters, sorter) {
+           this.queryParam.pageNo = pagination.current
+             this.getData()
+          },
          
        close(){
           this.getData()

+ 5 - 3
src/views/system/modules/AddCertificateManagement.vue

@@ -60,14 +60,14 @@
                 <a-input placeholder="请输入" v-model="formState.noticeMonth"/>
                </a-form-model-item>
             </a-col>
-             <a-col :md="8" :sm="8">
+             <!-- <a-col :md="8" :sm="8">
               <a-form-model-item label="是否邮件通知" prop="isMessage">
                  <a-select v-model="formState.isMessage">
                     <a-select-option value="1">是</a-select-option>
                     <a-select-option value="0">否</a-select-option>
                  </a-select>
                </a-form-model-item>
-            </a-col>
+            </a-col> -->
           </a-row>
           <a-row :gutter="24">
              <a-col :md="24" :sm="8">
@@ -122,7 +122,8 @@ export default {
             defult:'add',
             formState:{
               endDate:'',
-              beginDate:''
+              beginDate:'',
+              isMessage:'1'
             },
             fileList:[],
             confirmLoading: false,
@@ -177,6 +178,7 @@ export default {
     handleSubmit(){
        this.$refs.form.validate(valid => {
          if(valid){
+          // this.formState.isMessage = '是'
           var newobj = this.formState
           newobj.beginDate = moment(this.formState.beginDate).format('YYYY-MM-DD');
           newobj.endDate = moment(this.formState.endDate).format('YYYY-MM-DD');