Administrator
2021-09-02 cac30d3d83513eae0fbab9de25ec60fcb8c98cee
正式,模拟考试申请修改,新增通过报名人数来报名
5 files modified
85 ■■■■ changed files
src/api/examapi/applyexam.js 3 ●●●● patch | view | raw | blame | history
src/api/trainingRegistration/trainingRegistration.js 3 ●●●● patch | view | raw | blame | history
src/views/applyexam/index.vue 29 ●●●●● patch | view | raw | blame | history
src/views/traincompany/index.vue 2 ●●● patch | view | raw | blame | history
src/views/trainingRegistration/index.vue 48 ●●●●● patch | view | raw | blame | history
src/api/examapi/applyexam.js
@@ -60,7 +60,7 @@
    })
}
export const addExam = (ids, examTime, startTime, endTime) => {
export const addExam = (ids, examTime, startTime, number, endTime) => {
    return request({
        url: '/api/apply/batchExam',
        method: 'post',
@@ -68,6 +68,7 @@
            ids,
            examTime,
            startTime,
            number,
            endTime
        }
    })
src/api/trainingRegistration/trainingRegistration.js
@@ -57,7 +57,7 @@
}
export const addExam = (ids, examTime, startTime, endTime) => {
export const addExam = (ids, examTime, startTime, number, endTime) => {
    return request({
        url: '/api/trainingRegistration/batchExam',
        method: 'post',
@@ -65,6 +65,7 @@
            ids,
            examTime,
            startTime,
            number,
            endTime
        }
    })
src/views/applyexam/index.vue
@@ -299,6 +299,31 @@
        dialogClickModal: false,
        column: [
          {
            label: "考试人数",
            prop: "number",
            type: 'number',
            span: 6,
            precision:0,
            step:50,
            mock:{
              type:'number',
              max:1000,
              min:0,
              precision:0
            },
            rules: [
              {
                required: true,
                message: "请输入考试人数",
                trigger: "blur",
              },
            ],
            minRows: 0,
            maxRows: 1000,
            value:50,
            row:true,
          },
          {
            label: "考试时间",
            prop: "startTime",
            type: "datetime",
@@ -334,7 +359,7 @@
        delBtn: false,
        editBtn: false,
        addBtn: false,
        selection: true,
        selection: false,
        menu: true,
        // 导出按钮
        // excelBtn: true,
@@ -872,7 +897,7 @@
      // var endTime = row.examTime[1];
      // var examTime = JSON.stringify(row.examTime);
      // console.log(this.ids,111);
      addExam(this.ids, null, startTime, null).then(
      addExam(this.ids, null, startTime,row.number, null).then(
        () => {
          this.questionBankOnLoad(this.questionBankPage);
          this.$message({
src/views/traincompany/index.vue
@@ -271,7 +271,7 @@
  },
  created() {
      this.optionTrainApply.column[1].dicUrl =
        "/api/blade-user/security-apply-tree?deptId=" +
        "/api/blade-user/security-apply-tree?examType=2&deptId=" +
        this.userInfo.dept_id;
  },
  methods: {
src/views/trainingRegistration/index.vue
@@ -145,27 +145,36 @@
        index: true,
        stripe: true,
        viewBtn: true,
        selection: true,
        selection: false,
        excelBtn: false,
        menuWidth: 380,
        dialogClickModal: false,
        column: [
          // {
          //   label: "考试人数",
          //   prop: "number",
          //   type: 'number',
          //   span: 6,
          //   precision:2,
          //   mock:{
          //     type:'number',
          //     max:500,
          //     min:50,
          //     precision:50
          //   },
          //   minRows: 0,
          //   maxRows: 3,
          //   row:true,
          // },
          {
            label: "考试人数",
            prop: "number",
            type: 'number',
            span: 6,
            precision:0,
            step:50,
            mock:{
              type:'number',
              max:1000,
              min:0,
              precision:0
            },
            rules: [
              {
                required: true,
                message: "请输入考试人数",
                trigger: "blur",
              },
            ],
            minRows: 0,
            maxRows: 1000,
            value:50,
            row:true,
          },
          {
            label: "考试时间",
            prop: "startTime",
@@ -239,7 +248,7 @@
        labelWidth: "120",
        menuWidth: 200,
        align: "center",
        selection: true,
        selection: false,
        column: column,
        delBtn: false,
        editBtn: false,
@@ -436,6 +445,7 @@
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      params['cancel'] = 111;
      this.loading = true;
      getdata(
        page.currentPage,
@@ -478,7 +488,7 @@
      // var endTime = row.examTime[1];
      // var examTime = JSON.stringify(row.examTime);
      // console.log(this.ids,111);
      addExam(this.ids, null, startTime, null).then(
      addExam(this.ids, null, startTime,row.number, null).then(
        () => {
          this.onLoad(this.page);
          this.$message({