shuishen
2021-08-14 f1ba84aea2a62bd2c4b6fd650535da0f657dc2c3
src/views/qualificationExamination/signQualificationExamination.vue
@@ -31,14 +31,11 @@
</template>
<script>
// import {
//   getList,
//   getListJSON,
// } from "@/api/qualificationExamination/signQualificationExamination";
import {
  getList,
  getListJSON,
} from "@/api/qualificationExamination/signQualificationExamination";
import { mapGetters } from "vuex";
// import { datasing } from "@api/qualificationExamination/datasignQualificationExamination";
import { datasing } from "./datasignQualificationExamination";
// import { getList } from "@/api/qualificationExamination/qualificationExamination";
export default {
  data() {
@@ -74,41 +71,7 @@
          {
            label: "保安姓名",
            prop: "name",
            // labelWidth: 120,
            // searchLabelWidth: 120,
            // searchSpan: 5,
            // dicUrl:
            //   "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
            // props: {
            //   label: "title",
            //   value: "id",
            // },
            // search: true,
            // overHidden: true,
            // type: "select",
            // rules: [
            //   {
            //     required: true,
            //     message: "请输入保安公司",
            //     trigger: "blur",
            //   },
            // ],
          },
          //   {
          //     label: "试卷名称",
          //     prop: "examName",
          //     // type: "select",
          //     // labelWidth: 120,
          //     // // display: false,
          //     // dicData: dic,
          //     // // props: {
          //     // //   label: "label",
          //     // //   value: "value",
          //     // // },
          //     // searchSpan: 5,
          //     // search: true,
          //     // width: 120,
          //   },
          {
            label: "保安公司",
            prop: "deptName",
@@ -119,50 +82,14 @@
            // labelWidth: 120,
            // width: 200,
          },
          {
            label: "准考证号",
            prop: "userId",
            overHidden: true,
            // // display: false,
            // width: 200,
            // labelWidth: 120,
            // overHidden: true,
          },
          //   {
          //     label: "试卷分数",
          //     prop: "paperScore",
          //     // type: "date",
          //     // format: "yyyy-MM-dd",
          //     // valueFormat: "yyyy-MM-dd",
          //     // mock: {
          //     //   type: "datetime",
          //     //   labelWidth: 120,
          //     //   format: "yyyy-MM-dd",
          //     // },
          //     // // search: true,
          //     // searchSpan: 4,
          //     // // display: false,
          //     // width: 180,
          //   },
          // {
          //   label: "准考证号",
          //   prop: "userId",
          //   overHidden: true,
          // },
          {
            label: "报名时间",
            prop: "examTime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            mock: {
              type: "datetime",
              labelWidth: 120,
              format: "yyyy-MM-dd",
            },
            // search: true,
            searchSpan: 4,
            // display: false,
            width: 180,
          },
          {
            label: "考试时间",
            prop: "applyTime",
            type: "date",
            format: "yyyy-MM-dd",
@@ -174,15 +101,31 @@
            },
            // search: true,
            searchSpan: 4,
            // display: false,
            // display: false,·
            width: 180,
          },
          {
            label: "证件类型",
            prop: "certificatetype",
            // labelWidth: 120,
            // display: false,
          },
          // {
          //   label: "考试时间",
          //   prop: "applyTime",
          //   type: "date",
          //   format: "yyyy-MM-dd",
          //   valueFormat: "yyyy-MM-dd",
          //   mock: {
          //     type: "datetime",
          //     labelWidth: 120,
          //     format: "yyyy-MM-dd",
          //   },
          //   // search: true,
          //   searchSpan: 4,
          //   // display: false,
          //   width: 180,
          // },
          // {
          //   label: "证件类型",
          //   prop: "certificatetype",
          //   // labelWidth: 120,
          //   // display: false,
          // },
          //   {
          //     label: "保安员证",
          //     prop: "certificate",
@@ -190,13 +133,29 @@
          //     // display: false,
          //   },
          {
            label: "审查结果",
            prop: "results",
            label: "审查状态",
            prop: "examinationType",
            // // display: false,
            // width: 200,
            // labelWidth: 120,
            // overHidden: true,
          },
          {
            label: "审查明细",
            prop: "examinationMx",
            // // display: false,
            // width: 200,
            // labelWidth: 120,
            // overHidden: true,
          },
          // {
          //   label: "审查结果",
          //   prop: "results",
          //   // // display: false,
          //   // width: 200,
          //   // labelWidth: 120,
          //   // overHidden: true,
          // },
        ],
        // group: [
        //   {
@@ -340,56 +299,68 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    // onLoad(page, params = {}) {
    //   this.loading = false;
    //   this.loading = true;
    //   getList(
    //     page.currentPage,
    //     page.pageSize,
    //     Object.assign(params, this.query)
    //   ).then((res) => {
    //     const data = res.data.data;
    //     this.page.total = data.total;
    //     this.data = data.records;
    //     this.loading = false;
    //     // this.selectionClear();
    //   });
    // },
    onLoad(page, params = {}) {
      // this.loading = false;
      this.loading = true;
      //   getListJSON().then((res) => {
      //   axios
      //     .get(
      //       "../../api/qualificationExamination/signQualificationExamination.json"
      //     )
      //     .then((res) => {
      // page.currentPage,
      // page.pageSize,
      // Object.assign(params, this.query)
      if (datasing) {
        var res = datasing;
        console.log(res, "signQualificationExamination");
        const data = res.data;
        // this.page.total = data.total;
        // this.data = data.records;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        var d = data.records;
        for (var k in d) {
          //   d[k].examination_mx = "正常";
          //   d[k].examination_type = "正常";
          //   d[k]["carid"] = "370111198807051124";
          //   d[k]["reviewTime"] = "2021-02-21";
          d[k]["results"] = "通过";
          d[k]["certificate"] = "拥有";
          d[k]["certificatetype"] = "保安员证";
          //   d[k]["onjob"] = "是";
          if (d[k].examinationType == 1) {
            d[k].examinationType = "正常";
          } else if (d[k].examinationType == 2) {
            d[k].examinationType = "异常";
          }
        }
        this.data = d;
        this.data = data.records;
        this.loading = false;
      }
      // this.selectionClear();
      // });
        // this.selectionClear();
      });
    },
    // onLoad(page, params = {}) {
    // this.loading = false;
    // this.loading = true;
    // getList().then(res=>{
    //   this.loading = false;
    // })
    // getListJSON().then((res) => {
    // getListJSON().then((res) => {
    //   axios
    //     .get(
    //       "../../api/qualificationExamination/signQualificationExamination.json"
    //     )
    //     .then((res) => {
    // page.currentPage,
    // page.pageSize,
    // Object.assign(params, this.query)
    // if (datasing) {
    //   var res = datasing;
    //   console.log(res, "signQualificationExamination");
    //   const data = res.data;
    //   // this.page.total = data.total;
    //   // this.data = data.records;
    //   var d = data.records;
    //   for (var k in d) {
    //     //   d[k].examination_mx = "正常";
    //     //   d[k].examination_type = "正常";
    //     //   d[k]["carid"] = "370111198807051124";
    //     //   d[k]["reviewTime"] = "2021-02-21";
    //     d[k]["results"] = "通过";
    //     d[k]["certificate"] = "拥有";
    //     d[k]["certificatetype"] = "保安员证";
    //     //   d[k]["onjob"] = "是";
    //   }
    //   this.data = d;
    //   this.loading = false;
    // }
    // this.selectionClear();
    // });
    // },
    // 行单击
    handleRowClick(row) {