浏览代码

Merge branch 'newtang' of http://120.79.166.78:19005/zhongzheng-edu/saas_entrepot_admin into newtang

Tang 2 年之前
父节点
当前提交
fc0e1ffa58
共有 2 个文件被更改,包括 639 次插入0 次删除
  1. 8 0
      src/newApi/applicationData.js
  2. 631 0
      src/views/education/examManagement/sevenExamData/index.vue

+ 8 - 0
src/newApi/applicationData.js

@@ -56,6 +56,14 @@ export default {
             params: data
         })
     },
+    //查询七大员报考数据列表
+    inquiresystemsevensublist(data) {
+        return request({
+            url: '/system/subscribe/sub/list',
+            method: 'get',
+            params: data
+        })
+    },
     //查询用户下商品的考试次数,前培次数列表
     inquiresystemsubscribelistUserExam(data) {
         return request({

+ 631 - 0
src/views/education/examManagement/sevenExamData/index.vue

@@ -0,0 +1,631 @@
+<template>
+  <div id="sevenExamData">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+    >
+      <template slot="month">
+        <el-select
+          size="small"
+          v-model="month"
+          placeholder="月份"
+          @change="getCanActiveApplyMonth"
+        >
+          <el-option
+            v-for="item in monthList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+        <el-select
+          style="margin-left: 10px"
+          size="small"
+          v-model="day"
+          v-if="month"
+          placeholder="日期"
+          @change="getCanActiveApply"
+        >
+          <el-option
+            v-for="item in dayList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+
+        <el-select
+          style="margin-left: 10px"
+          v-if="month || day"
+          size="small"
+          v-model="monthApplyIndex"
+          placeholder="考试场次"
+        >
+          <el-option
+            v-for="(item, index) in monthApplyList"
+            :key="index"
+            :label="item.examSession"
+            :value="index"
+          >
+          </el-option>
+        </el-select>
+      </template>
+    </search-box-new>
+    <table-list
+      rowKey="subscribeId"
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+      ref="tableList"
+    >
+      <template slot="name" slot-scope="props">
+        <div>
+          姓名:{{props.scope.row["userName"]}}
+        </div>
+        <div>
+          手机:{{props.scope.row["userPhone"]}}
+        </div>
+        <div>
+          身份证:{{props.scope.row["userCard"]}}
+        </div>
+      </template>
+      <template slot="applyResult" slot-scope="props">
+        <div>
+          考试时间:{{$methodsTools.onlyForma(props.scope.row["applyTime"],false)}}({{props.scope.row["applyStartTime"]}}-{{props.scope.row["applyEndTime"]}})
+        </div>
+        <div>
+          考试地点:{{props.scope.row["applyAddress"]}}
+        </div>
+        <div>
+          备注:自带文具、身份证
+        </div>
+      </template>
+      <template slot="receipt" slot-scope="props">
+        <div>
+          出考情况:{{props.scope.row["examStatus"] == 1 ? "出席":""}}
+        </div>
+        <div>
+          分数登记:{{props.scope.row["performance"]}}
+        </div>
+        <div>
+          证书编号:{{props.scope.row["certificateCode"]}}
+        </div>
+        <div>
+          发证时间:{{$methodsTools.onlyForma(props.scope.row["certificateStartTime"],false)}}
+        </div>
+        <div>
+          到期时间:{{$methodsTools.onlyForma(props.scope.row["certificateEndTime"],false)}}
+        </div>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    
+  </div>
+</template>
+
+<script>
+import * as baseUrls from "@/utils/request.js";
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "SevenExamData",
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      month: "",
+      monthList: [
+        { label: "一月", value: "01" },
+        { label: "二月", value: "02" },
+        { label: "三月", value: "03" },
+        { label: "四月", value: "04" },
+        { label: "五月", value: "05" },
+        { label: "六月", value: "06" },
+        { label: "七月", value: "07" },
+        { label: "八月", value: "08" },
+        { label: "九月", value: "09" },
+        { label: "十月", value: "10" },
+        { label: "十一月", value: "11" },
+        { label: "十二月", value: "12" },
+      ],
+      day: "",
+      dayList: [],
+      monthApplyIndex: "",
+      monthApplyList: [],
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        border: true,
+        title: "计划",
+        index: 0,
+        ch: "条",
+        num: false,
+        tableHide: true,
+        choice: true,
+        changeWidth: "240px",
+        openCheckMore: true,
+        addHide: true,
+        custom: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "subscribeStatus",
+          placeholder: "预约状态",
+          scope: "select",
+          options: [
+            { label: "正常", value: 1 },
+            { label: "取消", value: 2 },
+            { label: "已过期", value: 3 },
+          ],
+        },
+        {
+          prop: "applyStatus",
+          placeholder: "考试状态",
+          scope: "select",
+          options: [
+            { label: "待考试", value: 1 },
+            { label: "通过", value: 2 },
+            { label: "未通过", value: 3 },
+          ],
+        },
+        {
+          prop: "newApply",
+          placeholder: "是否新考",
+          scope: "select",
+          options: [
+            { label: "是", value: 1 },
+            { label: "否", value: 2 },
+          ],
+        },
+        {
+          prop: "keyWord",
+          placeholder: "姓名 身份证",
+        },
+        {
+          prop: "applyTime",
+          placeholder: "选择考试月份",
+          scope: "slot",
+          slotName: "month",
+        },
+      ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+         {
+          label: "姓名",
+          hidden: true,
+          slotName: "name",
+          scope: "slot",
+          dontCenter:'left'
+        },
+        {
+          label: "课程",
+          prop: "goodsName",
+          hidden: true,
+        },
+        {
+          label: "岗位",
+          prop: "majorName",
+          hidden: true,
+        },
+        {
+          label: "公司名",
+          prop: "companyName",
+          hidden: true,
+        },
+        {
+          label: "所属机构",
+          prop: "tenantName",
+          hidden: true,
+        },
+        {
+          label: "创建时间",
+          prop: "createTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "预约状态",
+          prop: "subscribeStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "正常",
+              value: 1,
+            },
+            {
+              label: "取消",
+              value: 2,
+            },
+            {
+              label: "已过期",
+              value: 3,
+            },
+          ],
+        },
+        {
+          label: "预约结果",
+          hidden: true,
+          slotName: "applyResult",
+          scope: "slot",
+          dontCenter:'left'
+        },
+        {
+          label: "是否开通题库",
+          prop: "questionStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "是",
+              value: 1,
+            },
+            {
+              label: "否",
+              value: 2,
+            },
+          ],
+        },
+        {
+          label: "是否新考",
+          prop: "newApply",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "是",
+              value: 1,
+            },
+            {
+              label: "否",
+              value: 2,
+            },
+          ],
+        },
+        {
+          label: "剩余考试次数",
+          prop: "applyNum",
+          hidden: true,
+        },
+        {
+          label: "考试状态",
+          prop: "applyStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "待考试",
+              value: 1,
+            },
+            {
+              label: "通过",
+              value: 2,
+            },
+            {
+              label: "未通过",
+              value: 3,
+            },
+          ],
+        },
+        {
+          label: "考试回执",
+          hidden: true,
+          slotName: "receipt",
+          scope: "slot",
+          dontCenter:'left'
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    this.search();
+    this.getQP();
+  },
+  activated() {
+    this.search();
+    this.getQP();
+  },
+  methods: {
+    /**
+     * 默认选择考前培训-施工七大员
+     */
+    moRenBus() {
+      return new Promise((resolve, reject) => {
+        this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
+          for (let i = 0; i < res.rows.length; i++) {
+            if (res.rows[i].educationName === "考前培训") {
+              this.$set(this.formData, "educationTypeId", res.rows[i].id);
+              this.$refs.searchBox.changeEducationType(res.rows[i].id, true);
+              this.$api
+                .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
+                .then((result) => {
+                  for (let j = 0; j < result.rows.length; j++) {
+                    if (
+                      result.rows[j].projectName === "施工现场专业人员" &&
+                      result.rows[j].businessName === "七大员"
+                    ) {
+                      this.$set(this.formData, "businessId", result.rows[j].id);
+                      this.$refs.searchBox.changeBusinessLevel(
+                        result.rows[j].id
+                      );
+                      resolve();
+                      break;
+                    }
+                  }
+                });
+              break;
+            }
+          }
+        });
+      });
+    },
+    getMonthDays(target) {
+      let date = new Date(target + "-01"); // 移动端使用格式要转成: "2018/10/01"
+      date.setMonth(date.getMonth() + 1); // 先设置为下个月
+      date.setDate(0); // 再置0,变成当前月最后一天
+      return date.getDate(); // 当前月最后一天即当前月拥有的天数
+    },
+    getCanActiveApplyMonth() {
+      this.day = "";
+      var year = new Date().getFullYear();
+      var num = this.getMonthDays(year + "-" + this.month);
+      var list = [];
+      for (let i = 0; i < num; i++) {
+        list.push({
+          label: i + 1 + "号",
+          value: i < 10 ? "0" + (i + 1) : i + 1,
+        });
+      }
+      this.dayList = list || [];
+      var a = year + this.month + this.day;
+      this.getSearchApply(a);
+    },
+    getCanActiveApply() {
+      var year = new Date().getFullYear();
+      var a = year + "" + this.month + "" + this.day;
+      this.getSearchApply(a);
+    },
+    getSearchApply(i) {
+      this.monthApplyIndex = "";
+      this.$api
+        .obtainsystemsubscribesessiondata(i)
+        .then((res) => {
+          this.monthApplyList = res.data;
+        })
+        .catch(() => {
+          this.monthApplyList = [];
+        });
+    },
+    getQP() {
+      this.$api.inquiresystembefore({ status: 1 }).then((res) => {
+        this.optionsList = res.rows;
+      });
+    },
+    search() {
+      this.loading = true;
+      var data = JSON.parse(JSON.stringify(this.formData));
+      if (this.month) {
+        var year = new Date().getFullYear();
+        var a = year + "" + this.month;
+        if (this.day) {
+          a = year + "" + this.month + "" + this.day;
+        }
+        data.ApplyDateTime = a;
+      }
+      if (this.monthApplyIndex) {
+        data.applySiteExamTime =
+          this.monthApplyList[this.monthApplyIndex].examTime;
+        data.applySiteStartTime =
+          this.monthApplyList[this.monthApplyIndex].examStartTime;
+        data.applySiteEndTime =
+          this.monthApplyList[this.monthApplyIndex].examEndTime;
+      }
+      this.$api
+        .inquiresystemsevensublist(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.formData= {
+        pageSize: 10,
+        pageNum: 1,
+      }
+      this.month = "";
+      this.day = "";
+      this.search();
+    },
+    addClick(v, int) {
+      // int = 2详情 3学员管理
+      if (v === undefined) {
+        // 添加班级
+        this.$router.push({
+          path: "addClass",
+        });
+      } else {
+        if (int === 2) {
+          //班级详情
+          this.$router.push({
+            path: "manageClass",
+            query: {
+              id: v.gradeId,
+            },
+          });
+        }
+        if (int === 3) {
+          // 学员管理
+          this.$router.push({
+            path: "studentMenu",
+            query: {
+              id: v.gradeId,
+              goodsId: v.goodsList[0].goodsId,
+            },
+          });
+        }
+      }
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.aListBottom {
+  margin-left: 20px;
+  padding: 0px 6px;
+  border: 1px solid #999;
+  border-radius: 4px;
+  height: 30px;
+  line-height: 30px;
+  display: inline-block;
+}
+.liBVS {
+  margin-right: 20px;
+  margin-bottom: 12px;
+  padding: 0px 6px;
+  border: 1px solid #999;
+  border-radius: 4px;
+  height: 30px;
+  line-height: 30px;
+  display: inline-block;
+  float: left;
+}
+.clsw {
+  margin-left: 4px;
+  cursor: pointer;
+  color: #f56c6c;
+}
+.swq {
+  text-align: center;
+  border-bottom: 1px solid #eee;
+}
+.dowmStys {
+  color: blue;
+  cursor: pointer;
+}
+</style>