From 3bf5081592d976eb648dd4dcdce2521c624b9af6 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 01 Mar 2022 09:26:14 +0800
Subject: [PATCH] 报名清册样式调整

---
 src/views/trainApply/index.vue |  339 +++++++++++++++++++++++++++-----------------------------
 1 files changed, 165 insertions(+), 174 deletions(-)

diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index b283ffb..ec87ff4 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -6,139 +6,128 @@
  * menu-name 报名考试
  */
 <template>
-  <el-row class="morpheus-box-apply-exam-1">
-    <el-col
-      :span="24"
-      :class="[
+  <!-- class="exam-card-body" -->
+  <basic-container
+    :class="[
       $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
-      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
+      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '',
     ]"
+  >
+    <avue-crud
+      v-model="obj"
+      class="company-box tablesss"
+      :option="questionBankOption"
+      :search.sync="questionBankSearch"
+      :table-loading="questionBankLoading"
+      :data="questionBankData"
+      ref="questionBankCrud"
+      :page.sync="questionBankPage"
+      @on-load="questionBankOnLoad"
+      @selection-change="questionBankSelectionChange"
+      @search-change="questionBankSearchChange"
+      @search-reset="questionBankSearchReset"
+      @current-change="questionBankCurrentChange"
+      @size-change="questionBankSizeChange"
+      @row-save="questionBankRowSave"
+      @row-del="questionBankRowDel"
+      :row-style="rowStyle"
     >
-      <el-card>
-        <div class="exam-card-body">
-          <avue-crud
-            v-model="obj"
-            class="company-box"
-            :option="questionBankOption"
-            :search.sync="questionBankSearch"
-            :table-loading="questionBankLoading"
-            :data="questionBankData"
-            ref="questionBankCrud"
-            :page.sync="questionBankPage"
-            @on-load="questionBankOnLoad"
-            @selection-change="questionBankSelectionChange"
-            @search-change="questionBankSearchChange"
-            @search-reset="questionBankSearchReset"
-            @current-change="questionBankCurrentChange"
-            @size-change="questionBankSizeChange"
-            @row-save="questionBankRowSave"
-            @row-del="questionBankRowDel"
-            :row-style="rowStyle"
-          >
-            <!-- 自定义按钮 -->
-            <template slot="menuLeft">
-              <el-button
-                style="display: none"
-                type="warning"
-                size="small"
-                plain
-                icon="el-icon-download"
-                @click="handleExport"
-                >导出
-              </el-button>
-              <el-button
-                type="warning"
-                size="small"
-                plain
-                icon="el-icon-receiving"
-                @click="handleExport"
-                >清册打印
-              </el-button>
-              <el-button
-                type="success"
-                size="small"
-                plain
-                v-if="false"
-                icon="el-icon-download"
-                @click="handleImport"
-                >清册导入
-              </el-button>
-              <el-button
-                type="warning"
-                size="small"
-                plain
-                icon="el-icon-download"
-                @click="handleApplyInfoExport"
-                >报名清册信息导出
-              </el-button>
-            </template>
+      <!-- 自定义按钮 -->
+      <template slot="menuLeft">
+        <el-button
+          style="display: none"
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+          >导出
+        </el-button>
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-receiving"
+          @click="handleExport"
+          >清册打印
+        </el-button>
+        <el-button
+          type="success"
+          size="small"
+          plain
+          v-if="false"
+          icon="el-icon-download"
+          @click="handleImport"
+          >清册导入
+        </el-button>
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleApplyInfoExport"
+          >报名清册信息导出
+        </el-button>
+      </template>
 
-            <template slot-scope="{ type, row }" slot="menu">
-              <el-button
-                :type="type"
-                size="small"
-                icon="el-icon-receiving"
-                :disabled="
-                  row.candidateNo == '' ||
-                  row.cancel == 2 ||
-                  row.auditStatus == 2
-                "
-                @click="handlePrint(row)"
-                >准考证打印
-              </el-button>
-              <el-button
-                :type="type"
-                size="small"
-                icon="el-icon-refresh-left"
-                :disabled="
-                  row.cancel == 2 || row.isExam == 2 || row.isExam == 3
-                "
-                @click="revoke(row)"
-                >取消报名
-              </el-button>
-              <el-button
-                style="display: none"
-                :type="type"
-                size="small"
-                icon="el-icon-circle-check"
-                :disabled="row.auditStatus == 1"
-                @click="auditSucess(row)"
-                >审核通过
-              </el-button>
-              <el-button
-                v-if="row.vipStatus!=1 && permission.exam_vip"
-                icon="el-icon-folder-checked"
-                @click="usesVipConfirm(row)"
-                :size="size"
-                :type="type"
-                >缴费确认</el-button
-              >
-              
-            </template>
-          </avue-crud>
+      <template slot-scope="{ type, row }" slot="menu">
+        <el-button
+          :type="type"
+          size="small"
+          icon="el-icon-receiving"
+          :disabled="
+            row.candidateNo == '' || row.cancel == 2 || row.auditStatus == 2
+          "
+          @click="handlePrint(row)"
+          >准考证打印
+        </el-button>
+        <el-button
+          :type="type"
+          size="small"
+          icon="el-icon-refresh-left"
+          :disabled="row.cancel == 2 || row.isExam == 2 || row.isExam == 3"
+          @click="revoke(row)"
+          >取消报名
+        </el-button>
+        <el-button
+          style="display: none"
+          :type="type"
+          size="small"
+          icon="el-icon-circle-check"
+          :disabled="row.auditStatus == 1"
+          @click="auditSucess(row)"
+          >审核通过
+        </el-button>
+        <el-button
+          v-if="row.vipStatus != 1 && permission.exam_vip"
+          icon="el-icon-folder-checked"
+          @click="usesVipConfirm(row)"
+          :size="size"
+          :type="type"
+          >缴费确认</el-button
+        >
+      </template>
+    </avue-crud>
 
-          <el-dialog
-            title="清册数据导入"
-            append-to-body
-            :visible.sync="excelBox"
-            width="555px"
-          >
-            <avue-form
-              :option="excelOption"
-              v-model="excelForm"
-              :upload-after="uploadAfter"
-            >
-              <template slot="excelTemplate">
-                <el-button type="primary" @click="handleTemplate">
-                  点击下载<i class="el-icon-download el-icon--right"></i>
-                </el-button>
-              </template>
-            </avue-form>
-          </el-dialog>
-        </div>
-      </el-card>
-    </el-col>
-  </el-row>
+    <el-dialog
+      title="清册数据导入"
+      append-to-body
+      :visible.sync="excelBox"
+      width="555px"
+    >
+      <avue-form
+        :option="excelOption"
+        v-model="excelForm"
+        :upload-after="uploadAfter"
+      >
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="handleTemplate">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+    </el-dialog>
+  </basic-container>
 </template>
 
 <script>
@@ -149,7 +138,7 @@
   cancelTrain,
   auditSucess,
   remove,
-  vipSign
+  vipSign,
 } from "@/api/trainingRegistration/trainingRegistration";
 import Qs from "qs";
 import { getToken } from "@/util/auth";
@@ -241,7 +230,7 @@
             // 表单新增时是否可见
             addDisplay: false,
             search: true,
-            searchSpan:3,
+            searchSpan: 3,
             // 表单新增时是否为查看模式
             addDetail: false,
             // 表单编辑时是否禁止
@@ -294,13 +283,13 @@
               },
             ],
             width: 180,
-            overHidden:true
+            overHidden: true,
           },
           {
             label: "所属企业",
             prop: "deptName",
             search: true,
-            searchSpan:5,
+            searchSpan: 5,
             slot: true,
             // 表单新增时是否禁止
             addDisabled: false,
@@ -322,7 +311,7 @@
               },
             ],
             width: 200,
-            overHidden:true
+            overHidden: true,
           },
           {
             label: "报名状态",
@@ -575,34 +564,34 @@
             addDisplay: false,
             width: 100,
           },
-        //   {
-        //     label: "缴费状态",
-        //     search: true,
-        //     type: "select",
-        //     searchSpan: 4,
-        //     prop: "vipStatus",
-        //     dicData: [
-        //         {
-        //             label: '全部',
-        //             value: 0,
-        //         },
-        //         {
-        //             label: '已缴费',
-        //             value: 1,
-        //         },
-        //         {
-        //             label: '未缴费',
-        //             value: 2,
-        //         }
-        //     ],
-        //     props: {
-        //         label: "label",
-        //         value: "value"
-        //     },
-        //     editDisplay: false,
-        //     addDisplay: false,
-        //     width: 100,
-        //   },
+          //   {
+          //     label: "缴费状态",
+          //     search: true,
+          //     type: "select",
+          //     searchSpan: 4,
+          //     prop: "vipStatus",
+          //     dicData: [
+          //         {
+          //             label: '全部',
+          //             value: 0,
+          //         },
+          //         {
+          //             label: '已缴费',
+          //             value: 1,
+          //         },
+          //         {
+          //             label: '未缴费',
+          //             value: 2,
+          //         }
+          //     ],
+          //     props: {
+          //         label: "label",
+          //         value: "value"
+          //     },
+          //     editDisplay: false,
+          //     addDisplay: false,
+          //     width: 100,
+          //   },
         ],
       },
       questionBankSearch: {},
@@ -702,6 +691,7 @@
     if (i > 1) {
       this.$store.state.tags.tagList.splice(ind, 1);
     }
+    this.$store.commit("setWindowSizeHeightAdd");
   },
   computed: {
     ...mapState({
@@ -720,9 +710,9 @@
         addBtn: this.vaildData(this.permission.notice_add, false),
         viewBtn: this.vaildData(this.permission.notice_view, false),
         delBtn: this.vaildData(this.permission.notice_delete, false),
-        editBtn: this.vaildData(this.permission.notice_edit, false)
+        editBtn: this.vaildData(this.permission.notice_edit, false),
       };
-    }
+    },
   },
   methods: {
     //报名信息导出
@@ -743,7 +733,7 @@
           auditStatus: this.questionBankSearch.auditStatus,
           deptName: this.questionBankSearch.deptName,
           isExam: this.questionBankSearch.isExam,
-          realName: this.questionBankSearch.realName
+          realName: this.questionBankSearch.realName,
         };
         data["examId"] = this.$route.query.id;
         //序列号url形式,用&拼接
@@ -788,6 +778,7 @@
         this.questionBankData = data.records;
         this.questionBankLoading = false;
         this.questionBankSelectionClear();
+        this.$store.commit("setWindowSizeHeightAdd");
       });
     },
     questionBankSelectionClear() {
@@ -861,25 +852,25 @@
         );
       });
     },
-    usesVipConfirm(row){
-        this.$confirm("确定将选择当前人员确认已缴费?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+    usesVipConfirm(row) {
+      this.$confirm("确定将选择当前人员确认已缴费?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
       })
         .then(() => {
           var data = {
-            id : row.id,
-            userId:row.userId,
-            vipStatus :1
-          }
+            id: row.id,
+            userId: row.userId,
+            vipStatus: 1,
+          };
           return vipSign(data);
         })
         .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!"
+            message: "操作成功!",
           });
         });
     },

--
Gitblit v1.9.3