龚焕茏
2024-07-24 2d1f7bd9e68a2ee60bbd1adcc9cd43c94db08c0d
src/views/exam/personalRandomTemplate/list.vue
@@ -8,12 +8,13 @@
      <el-cascader
        clearable
        v-model="queryParam.deptId"
        collapse-tags
        :options="depts"
        :props="{ emitPath: false, value: 'id', label: 'name',  checkStrictly: true, multiple: true }"
        ></el-cascader>
    </el-form-item>
     <el-form-item label="课目:" >
       <el-select v-model="queryParam.subjectId"  clearable multiple>
       <el-select v-model="queryParam.subjectId"  clearable multiple collapse-tags>
         <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
       </el-select>
     </el-form-item>
@@ -25,19 +26,18 @@
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        value-format="yyyy-MM-dd"
        :picker-options="pickerOptions">
      </el-date-picker>
    </el-form-item>
     <el-form-item>
       <el-button type="primary" @click="submitForm">查询</el-button>
       <!-- <router-link :to="{path:'/exam/personalSimulation/edit'}" class="link-left">
         <el-button type="primary">添加</el-button>
       </router-link> -->
       <el-button type="primary" @click="submitForm" size="small" style="margin-right: 5px">查询</el-button>
       <router-link :to="{path:'/exam/personalRandomTemplate/edit'}">
         <el-button type="success" size="small" style="margin-bottom: 5px">添加</el-button>
       </router-link>
     </el-form-item>
   </el-form>
    <router-link :to="{path:'/exam/personalRandomTemplate/edit'}">
      <el-button type="primary" size="small" style="margin-bottom: 5px">添加</el-button>
    </router-link>
    <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
      <el-table-column prop="subjectNames" label="课目" />
      <el-table-column prop="name" label="名称"  />
@@ -62,7 +62,7 @@
      <el-form :model="form" ref="form">
        <el-form-item label="考生:" prop="menuIds" required>
          <!-- <el-cascader v-model="form.menuIds" :options="options" :props="{ multiple: true }" clearable collapse-tags></el-cascader> -->
          <el-select v-model="form.menuIds" multiple clearable placeholder="请选择" collapse-tags @change="changeSelect">
          <el-select v-model="form.menuIds" multiple clearable placeholder="请选择" collapse-tags filterable @change="changeSelect">
            <div class="checkboxWrapper">
              <el-checkbox v-model="checked" @change.native="checkChange">
                全选
@@ -159,10 +159,11 @@
    }
  },
  created () {
    this.initSubject()
    this.search()
    this.queryParam.subjectId = null
    this.subjectFilter = this.subjects
    examPaperApi.selflist().then(res => {
      this.subjectFilter = res.response;
    });
    departmentApi.getDeptAdmins().then(res => {
      this.depts = res.response;
    })
@@ -207,7 +208,7 @@
        if (valid) {
          let op = [];
          for(var ele of this.form.menuIds){
            op.push(ele[1])
            op.push(ele)
          };
          this.form.menuIds = JSON.stringify(this.form.menuIds);
          this.form.userIds = op;
@@ -280,6 +281,7 @@
    search () {
      this.listLoading = true
      this.queryParam.status = 0
      if (this.queryParam.period) this.queryParam.period[1] += ' 23:59:59'
      examPaperApi.pageselfList(this.queryParam).then(data => {
        const re = data.response
        this.tableData = re.list
@@ -324,4 +326,4 @@
  padding: 8px 20px;
  border-bottom: 1px solid #ccc;
}
</style>
</style>