dedsudiyu hai 4 días
pai
achega
d39815a564

+ 536 - 164
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/addPage.vue

@@ -33,21 +33,21 @@
                                  :value="item.id"/>
                     </el-select>
                   </el-form-item>
-                  <el-form-item label="安全分类" v-if="!placementTest" :prop="placementTest?'disciplineTypeId':''">
+                  <el-form-item label="安全分类" v-if="rangeStatus != 'CLASSIFIED'" :prop="rangeStatus == 'CLASSIFIED'?'disciplineTypeId':''">
                     <el-select :disabled="showType" v-model="newData.disciplineTypeId" placeholder="安全分类" style="width:200px;">
                       <el-option v-for="item in tableList" :key="item.id"
                                  :label="item.disciplineName"
                                  :value="item.id"/>
                     </el-select>
                   </el-form-item>
-                  <el-form-item label="安全分类" v-if="placementTest" :prop="placementTest?'disciplineTypeId':''">
+                  <el-form-item label="安全分类" v-if="rangeStatus == 'CLASSIFIED'" :prop="rangeStatus == 'CLASSIFIED'?'disciplineTypeId':''">
                     <el-select :disabled="showType" v-model="newData.disciplineTypeId" placeholder="安全分类" style="width:200px;">
                       <el-option v-for="item in tableList2" :key="item.id"
                                  :label="item.disciplineName"
                                  :value="item.id"/>
                     </el-select>
                   </el-form-item>
-                  <el-form-item label="风险等级" prop="riskLevelId" v-if="placementTest">
+                  <el-form-item label="风险等级" prop="riskLevelId" v-if="rangeStatus == 'CLASSIFIED'">
                     <el-select :disabled="showType" v-model="newData.riskLevelId" placeholder="请选择" style="width:200px;">
                       <el-option v-for="item in optionRiskLevel" :key="item.levelId" :label="item.titleName"
                                  :value="item.levelId"/>
@@ -81,32 +81,29 @@
                 <el-form-item label="是否共享">
                   <div class="switch-row">
                     <el-switch :disabled="showType" v-model="newData.shareStatus" :active-value="1" :inactive-value="0"
-                               active-color="#0183FB" inactive-color="#AAAAAA"
-                    />
+                               active-color="#0183FB" inactive-color="#AAAAAA"/>
                     <p class="tip-text" style="margin:2px 0 0 10px;">共享开启,全校所有学院单位都可见</p>
-
                   </div>
                 </el-form-item>
 
                 <el-form-item label="启用" prop="enableStatus">
-                  <el-switch :disabled="showType" v-model="newData.enableStatus" :active-value="1" :inactive-value="0"
-                             active-color="#0183FB" inactive-color="#AAAAAA"
-                  />
+                  <div class="switch-row">
+                    <el-switch :disabled="showType" v-model="newData.enableStatus" :active-value="1" :inactive-value="0"
+                               active-color="#0183FB" inactive-color="#AAAAAA"/>
+                    <p class="tip-text" style="margin:2px 0 0 10px;">考试发布/停用开关</p>
+                  </div>
                 </el-form-item>
-
-                <el-form-item label="考卷" prop="paperId">
-                  <div class="paper-select-row">
-                    <p class="checkButton-p" @click="openPaperDrawer" v-if="!showType">选择试卷</p>
-                    <div class="selected-tag" v-if="newData.paperName">
-                      <span>{{ newData.paperName }}</span>
-                      <!--<i class="el-icon-close" @click="newData.paperId = null; newData.paperName = ''"></i>-->
-                    </div>
+                <el-form-item label="自动创建执行" prop="enableStatus">
+                  <div class="switch-row">
+                    <el-switch :disabled="showType" v-model="newData.enableStatus" :active-value="1" :inactive-value="0"
+                               active-color="#0183FB" inactive-color="#AAAAAA"/>
+                    <p class="tip-text" style="margin:2px 0 0 10px;">开启后,每学年系统按考试周期自动创建执行该考试,无需重复创建</p>
                   </div>
                 </el-form-item>
               </div>
               <div class="section-divider"></div>
               <div class="section-block">
-                <div class="flex-row-box">
+                <div class="flex-row-box" style="margin-bottom:8px;">
                   <el-form-item label="考试时间" prop="examTimeRange">
                     <el-date-picker
                       :disabled="showType"
@@ -142,122 +139,330 @@
                     </div>
                   </el-form-item>
                 </div>
-
-                <el-form-item label="考试范围" prop="scopeType" v-if="!yzyhTest">
-                  <div class="scope-btn-group">
-                    <button
-                      v-for="item in scopeOptions"
-                      :key="item.value"
-                      class="scope-btn"
-                      v-show="!showType || newData.scopeType === item.value"
-                      :class="{ active: newData.scopeType === item.value }"
-                      @click.prevent="newData.scopeType = item.value"
-                    >
-                      <i v-if="newData.scopeType === item.value" class="el-icon-check"
-                         style="color:#0183fa;margin-right:4px;"
-                      ></i>
-                      {{ item.label }}
-                    </button>
-                    <p class="checkButton-p" @click="openExamScopeDrawer"
-                       v-if="(newData.scopeType == '2' || newData.scopeType == '3')&&!showType"
-                    >选择</p>
-                  </div>
-                  <!-- 考试范围表格(非全校时显示) -->
-                  <div v-if="newData.scopeType != '1'" class="scope-table-box">
-                    <div class="scope-table-header" v-if="newData.scopeType == '2'">已选取:{{ scopeList.length }}组</div>
-                    <div class="scope-table-header" v-if="newData.scopeType == '3'">已选取:{{ userList.length }}人</div>
-                    <el-table v-if="newData.scopeType == '2'" border class="table-box" :data="scopeList" size="small"
-                              style="width:100%;">
-                      <el-table-column label="学院" prop="deptName">
-                        <template slot-scope="scope">
-                          {{scope.row.deptName?scope.row.deptName:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="专业" prop="disciplineName" width="200">
-                        <template slot-scope="scope">
-                          {{scope.row.disciplineName?scope.row.disciplineName:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="角色" prop="roleName" width="180">
-                        <template slot-scope="scope">
-                          {{scope.row.roleName?scope.row.roleName:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="学年" prop="academicYear" width="180">
-                        <template slot-scope="scope">
-                          {{scope.row.academicYear?scope.row.academicYear:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="操作" width="140" align="center" v-if="!showType">
-                        <template slot-scope="{ $index }">
-                          <div class="table-button-box">
-                            <p class="table-button-null"></p>
-                            <p class="table-button-p"
-                               @click="scopeList.splice($index, 1)"
-                            >移除</p>
-                            <p class="table-button-null"></p>
-                          </div>
-                        </template>
-                      </el-table-column>
-                    </el-table>
-                    <el-table v-if="newData.scopeType == '3'" border class="table-box" :data="userList" size="small"
-                              style="width:100%;">
-                      <el-table-column label="姓名" prop="userName" width="200">
-                        <template slot-scope="scope">
-                          {{scope.row.userName?scope.row.userName:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="学工号" prop="account">
-                        <template slot-scope="scope">
-                          {{scope.row.account?scope.row.account:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="专业" prop="majorName" width="200">
-                        <template slot-scope="scope">
-                          {{scope.row.majorName?scope.row.majorName:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="学院" prop="deptName" width="180">
-                        <template slot-scope="scope">
-                          {{scope.row.deptName?scope.row.deptName:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="学年" prop="gradeNumber" width="180">
-                        <template slot-scope="scope">
-                          {{scope.row.academicYear?scope.row.academicYear:'-'}}
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="操作" width="140" align="center">
-                        <template slot-scope="{ $index }">
-                          <div class="table-button-box">
-                            <p class="table-button-null"></p>
-                            <p class="table-button-p" v-if="!showType"
-                               @click="userList.splice($index, 1)"
-                            >移除</p>
-                            <p class="table-button-null"></p>
-                          </div>
-                        </template>
-                      </el-table-column>
-                    </el-table>
-                  </div>
-                </el-form-item>
-                <el-form-item label="考试范围" prop="targetUserType" v-if="yzyhTest">
-                  <div class="scope-btn-group">
-                    <button
-                      v-for="item in scopeOptionsB"
-                      :key="item.value"
-                      class="scope-btn"
-                      v-show="!showType || newData.targetUserType === item.value"
-                      :class="{ active: newData.targetUserType === item.value }"
-                      @click.prevent="newData.targetUserType = item.value"
-                    >
-                      <i v-if="newData.targetUserType === item.value" class="el-icon-check"
-                         style="color:#0183fa;margin-right:4px;"
-                      ></i>
-                      {{ item.label }}
-                    </button>
-                  </div>
-                </el-form-item>
+                <div v-if="rangeStatus == ''">
+                  <el-form-item label="考试范围" prop="scopeType" v-if="rangeStatus != 'yzyh'">
+                    <div class="scope-btn-group">
+                      <button
+                        v-for="item in scopeOptions"
+                        :key="item.value"
+                        class="scope-btn"
+                        v-show="!showType || newData.scopeType === item.value"
+                        :class="{ active: newData.scopeType === item.value }"
+                        @click.prevent="newData.scopeType = item.value"
+                      >
+                        <i v-if="newData.scopeType === item.value" class="el-icon-check"
+                           style="color:#0183fa;margin-right:4px;"
+                        ></i>
+                        {{ item.label }}
+                      </button>
+                      <p class="checkButton-p" @click="openExamScopeDrawer"
+                         v-if="(newData.scopeType == '2' || newData.scopeType == '3')&&!showType"
+                      >选择</p>
+                    </div>
+                    <!-- 考试范围表格(非全校时显示) -->
+                    <div v-if="newData.scopeType != '1'" class="scope-table-box">
+                      <div class="scope-table-header" v-if="newData.scopeType == '2'">已选取:{{ scopeList.length }}组</div>
+                      <div class="scope-table-header" v-if="newData.scopeType == '3'">已选取:{{ userList.length }}人</div>
+                      <el-table v-if="newData.scopeType == '2'" border class="table-box" :data="scopeList" size="small"
+                                style="width:100%;">
+                        <el-table-column label="学院" prop="deptName">
+                          <template slot-scope="scope">
+                            {{scope.row.deptName?scope.row.deptName:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="专业" prop="disciplineName" width="200">
+                          <template slot-scope="scope">
+                            {{scope.row.disciplineName?scope.row.disciplineName:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="角色" prop="roleName" width="180">
+                          <template slot-scope="scope">
+                            {{scope.row.roleName?scope.row.roleName:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="学年" prop="academicYear" width="180">
+                          <template slot-scope="scope">
+                            {{scope.row.academicYear?scope.row.academicYear:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="140" align="center" v-if="!showType">
+                          <template slot-scope="{ $index }">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p"
+                                 @click="scopeList.splice($index, 1)"
+                              >移除</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                      <el-table v-if="newData.scopeType == '3'" border class="table-box" :data="userList" size="small"
+                                style="width:100%;">
+                        <el-table-column label="姓名" prop="userName" width="200">
+                          <template slot-scope="scope">
+                            {{scope.row.userName?scope.row.userName:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="学工号" prop="account">
+                          <template slot-scope="scope">
+                            {{scope.row.account?scope.row.account:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="专业" prop="majorName" width="200">
+                          <template slot-scope="scope">
+                            {{scope.row.majorName?scope.row.majorName:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="学院" prop="deptName" width="180">
+                          <template slot-scope="scope">
+                            {{scope.row.deptName?scope.row.deptName:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="学年" prop="gradeNumber" width="180">
+                          <template slot-scope="scope">
+                            {{scope.row.academicYear?scope.row.academicYear:'-'}}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="140" align="center">
+                          <template slot-scope="{ $index }">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p" v-if="!showType"
+                                 @click="userList.splice($index, 1)"
+                              >移除</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form-item>
+                  <el-form-item label="考试范围" prop="targetUserType" v-if="rangeStatus == 'yzyh'">
+                    <div class="scope-btn-group">
+                      <button
+                        v-for="item in scopeOptionsB"
+                        :key="item.value"
+                        class="scope-btn"
+                        v-show="!showType || newData.targetUserType === item.value"
+                        :class="{ active: newData.targetUserType === item.value }"
+                        @click.prevent="newData.targetUserType = item.value"
+                      >
+                        <i v-if="newData.targetUserType === item.value" class="el-icon-check"
+                           style="color:#0183fa;margin-right:4px;"
+                        ></i>
+                        {{ item.label }}
+                      </button>
+                    </div>
+                  </el-form-item>
+                </div>
+                <div>
+                  <el-form-item label="考试范围" prop="scopeType" v-if="rangeStatus != ''">
+                    <div class="scope-btn-group">
+                      <button
+                        class="scope-btn"
+                        v-show="!showType || newData.scopeType === 1"
+                        :class="{ active: newData.scopeType === 1 }">
+                        <i v-if="newData.scopeType === 1" class="el-icon-check"
+                           style="color:#0183fa;margin-right:4px;"></i>
+                        全校
+                      </button>
+                    </div>
+                  </el-form-item>
+                  <!--其他考试-选择考卷-->
+                  <el-form-item label="试卷配置" prop="paperId" v-if="rangeStatus == ''">
+                    <div class="paper-select-row">
+                      <p class="checkButton-p" @click="openPaperDrawer" v-if="!showType">选择试卷</p>
+                      <div class="selected-tag" v-if="newData.paperName">
+                        <span>{{ newData.paperName }}</span>
+                        <!--<i class="el-icon-close" @click="newData.paperId = null; newData.paperName = ''"></i>-->
+                      </div>
+                    </div>
+                  </el-form-item>
+                  <!--新生入学考试-选择考卷-->
+                  <el-form-item label="试卷配置" prop="paperId" v-if="rangeStatus == 'STUDENT'">
+                    <div class="paper-select-row">
+                      <el-select :disabled="showType" v-model="paperType" placeholder="选择试卷" style="width:200px;" v-if="rangeStatus=='STUDENT'">
+                        <el-option key="1" label="通用抽题组卷" value="1"/>
+                        <el-option key="2" label="多学院抽题组卷" value="2"/>
+                      </el-select>
+                      <p class="checkButton-p" @click="openPaperDrawer" v-if="!showType&&paperType==1">选择试卷</p>
+                      <p class="checkButton-p" @click="openPaperDeptDrawer" v-if="!showType&&paperType==2">抽题配置</p>
+                      <div class="selected-tag" v-if="newData.paperName&&paperType==1">
+                        <span>{{ newData.paperName }}</span>
+                        <!--<i class="el-icon-close" @click="newData.paperId = null; newData.paperName = ''"></i>-->
+                      </div>
+                    </div>
+                    <div class="paper-select-column" style="margin-top:20px;height:400px;">
+                      <el-table v-if="paperType==2" class="table-box"  border :data="paperDeptList">
+                        <el-table-column label="已选学院" prop="deptName" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <span :style="scope.row.paperName?'color:#0183fa;':'color:#999;'">{{ scope.row.paperName || '未选择' }}</span>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form-item>
+                  <!--分级分类考试-选择考卷-->
+                  <el-form-item label="试卷配置" v-if="rangeStatus == 'CLASSIFIED'">
+                    <div class="paper-select-column">
+                      <div class="CLASSIFIED-check-box">
+                        <p :class="checkPaperType == 1?'check-CLASSIFIED-p':''" @click="checkPaperType = 1">Ⅰ级(重大风险)</p>
+                        <p :class="checkPaperType == 2?'check-CLASSIFIED-p':''" @click="checkPaperType = 2">Ⅱ级(高风险)</p>
+                        <p :class="checkPaperType == 3?'check-CLASSIFIED-p':''" @click="checkPaperType = 3">Ⅲ级(中风险)</p>
+                        <p :class="checkPaperType == 4?'check-CLASSIFIED-p':''" @click="checkPaperType = 4">Ⅳ级(低风险)</p>
+                      </div>
+                      <el-table v-if="checkPaperType == 1" class="table-box"  border :data="paperListA1">
+                        <el-table-column label="安全分类" prop="name" width="200"  show-overflow-tooltip/>
+                        <el-table-column label="试卷" prop="paperName" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <span :style="scope.row.paperName?'color:#0183fa;':'color:#999;'">{{ scope.row.paperName || '未选择' }}</span>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p"
+                                 v-if="scope.$index != 0"
+                                 @click="paperTableButton(1,scope.$index)"
+                              >试卷同上</p>
+                              <p class="table-button-p"
+                                 @click="paperTableButton(2,scope.$index)"
+                              >选择试卷</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                      <el-table v-if="checkPaperType == 2" class="table-box"  border :data="paperListA2">
+                        <el-table-column label="安全分类" prop="name" width="200"  show-overflow-tooltip/>
+                        <el-table-column label="试卷" prop="paperName" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <span :style="scope.row.paperName?'color:#0183fa;':'color:#999;'">{{ scope.row.paperName || '未选择' }}</span>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p"
+                                 v-if="scope.$index != 0"
+                                 @click="paperTableButton(1,scope.$index)"
+                              >试卷同上</p>
+                              <p class="table-button-p"
+                                 @click="paperTableButton(2,scope.$index)"
+                              >选择试卷</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                      <el-table v-if="checkPaperType == 3" class="table-box"  border :data="paperListA3">
+                        <el-table-column label="安全分类" prop="name" width="200"  show-overflow-tooltip/>
+                        <el-table-column label="试卷" prop="paperName" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <span :style="scope.row.paperName?'color:#0183fa;':'color:#999;'">{{ scope.row.paperName || '未选择' }}</span>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p"
+                                 v-if="scope.$index != 0"
+                                 @click="paperTableButton(1,scope.$index)"
+                              >试卷同上</p>
+                              <p class="table-button-p"
+                                 @click="paperTableButton(2,scope.$index)"
+                              >选择试卷</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                      <el-table v-if="checkPaperType == 4" class="table-box"  border :data="paperListA4">
+                        <el-table-column label="安全分类" prop="name" width="200"  show-overflow-tooltip/>
+                        <el-table-column label="试卷" prop="paperName" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <span :style="scope.row.paperName?'color:#0183fa;':'color:#999;'">{{ scope.row.paperName || '未选择' }}</span>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p"
+                                 v-if="scope.$index != 0"
+                                 @click="paperTableButton(1,scope.$index)"
+                              >试卷同上</p>
+                              <p class="table-button-p"
+                                 @click="paperTableButton(2,scope.$index)"
+                              >选择试卷</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form-item>
+                  <!--应知应会-选择考卷-->
+                  <el-form-item label="试卷配置" v-if="rangeStatus == 'yzyh'">
+                    <div class="paper-select-column">
+                      <el-table class="table-box"  border :data="paperListB">
+                        <el-table-column label="安全分类" prop="name" width="200"  show-overflow-tooltip/>
+                        <el-table-column label="试卷" prop="paperName" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <span :style="scope.row.paperName?'color:#0183fa;':'color:#999;'">{{ scope.row.paperName || '未选择' }}</span>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p"
+                                 v-if="scope.$index != 0"
+                                 @click="paperTableButton(1,scope.$index)"
+                              >试卷同上</p>
+                              <p class="table-button-p"
+                                 @click="paperTableButton(2,scope.$index)"
+                              >选择试卷</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form-item>
+                  <!--负面清单-选择考卷-->
+                  <el-form-item label="试卷配置" v-if="rangeStatus == 'FUMIANQINGDAN'">
+                    <div class="paper-select-column">
+                      <el-table class="table-box"  border :data="paperListC">
+                        <el-table-column label="安全分类" prop="name" width="200"  show-overflow-tooltip/>
+                        <el-table-column label="试卷" prop="paperName" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <span :style="scope.row.paperName?'color:#0183fa;':'color:#999;'">{{ scope.row.paperName || '未选择' }}</span>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" width="240" show-overflow-tooltip>
+                          <template slot-scope="scope">
+                            <div class="table-button-box">
+                              <p class="table-button-null"></p>
+                              <p class="table-button-p"
+                                 v-if="scope.$index != 0"
+                                 @click="paperTableButton(1,scope.$index)"
+                              >试卷同上</p>
+                              <p class="table-button-p"
+                                 @click="paperTableButton(2,scope.$index)"
+                              >选择试卷</p>
+                              <p class="table-button-null"></p>
+                            </div>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form-item>
+                </div>
               </div>
             </div>
             <!-- ==================== 考前配置 ==================== -->
@@ -268,7 +473,7 @@
                     <el-switch :disabled="showType" v-model="newData.studyHoursRequirementEnabled" :active-value="1" :inactive-value="0"
                                active-color="#0183FB" inactive-color="#AAAAAA"
                     />
-                    <div class="number-stepper" v-if="(!yzyhTest&&!placementTest)&&newData.studyHoursRequirementEnabled == 1" style="margin-left:12px;height:40px;">
+                    <div class="number-stepper" v-if="(rangeStatus != 'yzyh'&&rangeStatus != 'CLASSIFIED')&&newData.studyHoursRequirementEnabled == 1" style="margin-left:12px;height:40px;">
                       <el-input-number
                         :disabled="showType"
                         class="form-input-number"
@@ -280,12 +485,12 @@
                       >
                       </el-input-number>
                     </div>
-                    <span v-if="(!yzyhTest&&!placementTest)&&newData.studyHoursRequirementEnabled == 1" class="unit-text" style="margin-top:2px;"
+                    <span v-if="(rangeStatus != 'yzyh'&&rangeStatus != 'CLASSIFIED')&&newData.studyHoursRequirementEnabled == 1" class="unit-text" style="margin-top:2px;"
                     >学时</span>
                     <span class="tip-text" style="margin-left:12px;">开启后,需完成相应学时才能参加考试</span>
                     <el-cascader
                       :disabled="showType"
-                      v-if="(!yzyhTest&&!placementTest)&&newData.studyHoursRequirementEnabled == 1"
+                      v-if="(rangeStatus != 'yzyh'&&rangeStatus != 'CLASSIFIED')&&newData.studyHoursRequirementEnabled == 1"
                       style="width: 600px;margin-left:20px;"
                       v-model="newData.knowledgePointIds"
                       :options="optionListC"
@@ -303,7 +508,7 @@
                     ></el-cascader>
                   </div>
                   <!--应知应会 学时要求-->
-                  <div class="yzyh-max-big-box" v-if="yzyhTest&&newData.studyHoursRequirementEnabled == 1">
+                  <div class="yzyh-max-big-box" v-if="rangeStatus == 'yzyh'&&newData.studyHoursRequirementEnabled == 1">
                     <div class="yzyh-title-box">
                       <p>用户类别</p>
                       <p>学时要求配置</p>
@@ -484,30 +689,33 @@
                     <!--<span class="tip-text" style="margin-left:12px;" v-else>开启后,每隔 N 分钟,提醒弹窗验证</span>-->
                   <!--</div>-->
                 <!--</el-form-item>-->
-
-                <el-form-item label="人脸识别校验">
+                <p style="margin-bottom:10px;">
+                  <span style="font-size:15px;margin-left:10px;">人脸识别校验</span>
+                  <span style="font-size:14px;color:#999;margin-left:20px;">(仅学习考试一体机)</span>
+                </p>
+                <el-form-item label="">
                   <div class="anti-cheat-group">
                     <div class="switch-row" style="margin-bottom:12px;">
                       <el-switch :disabled="showType" v-model="newData.preFaceVerifyEnabled" :active-value="1" :inactive-value="0"
                                  active-color="#0183FB" inactive-color="#AAAAAA"
                       />
-                      <span class="tip-text" style="margin-left:12px;">开启后,考试前需要进行人脸识别(仅学习考试一体机)</span>
+                      <span class="tip-text" style="margin-left:12px;">开启后,考试前需要进行人脸识别</span>
                     </div>
                     <div class="switch-row">
                       <el-switch :disabled="showType" v-model="newData.postFaceVerifyEnabled" :active-value="1" :inactive-value="0"
                                  active-color="#0183FB" inactive-color="#AAAAAA"
                       />
-                      <span class="tip-text" style="margin-left:12px;">开启后,考试后需要进行人脸识别(仅学习考试一体机)</span>
+                      <span class="tip-text" style="margin-left:12px;">开启后,考试后需要进行人脸识别</span>
                     </div>
                   </div>
                 </el-form-item>
 
-                <el-form-item label="摄像头抓拍">
+                <el-form-item label="">
                   <div class="switch-row">
                     <el-switch :disabled="showType" v-model="newData.cameraCaptureEnabled" :active-value="1" :inactive-value="0"
                                active-color="#0183FB" inactive-color="#AAAAAA"
                     />
-                    <span class="tip-text" style="margin-left:12px;">开启后,考试过程中摄像头随机抓拍(仅学习考试一体机)</span>
+                    <span class="tip-text" style="margin-left:12px;">开启后,考试过程中随机人脸识别</span>
                   </div>
                 </el-form-item>
               </div>
@@ -621,6 +829,8 @@
       <selectCertificate v-if="drawerType === 6&&drawer"></selectCertificate>
       <!--选择安全承诺书-->
       <safetyCommitmentLetter v-if="drawerType === 7&&drawer"></safetyCommitmentLetter>
+      <!--多学院抽题组卷-->
+      <selectPaperDept v-if="drawerType === 8&&drawer" :selectPaperDeptPropsData="selectPaperDeptPropsData"></selectPaperDept>
     </el-drawer>
   </div>
 </template>
@@ -634,6 +844,7 @@
   import selectScope from './selectScope.vue'
   import selectCertificate from './selectCertificate.vue'
   import safetyCommitmentLetter from './safetyCommitmentLetter.vue'
+  import selectPaperDept from './selectPaperDept.vue'
   import {
     examElExamAdd,examElExamEdit,examElExamDetail,examElKnowledgePointTreeList,examElDisciplineTypeList,
     examElExamTypeList, laboratoryLevelConfigGetLevelTitleList,examElConfigMasterInitMinHour
@@ -649,6 +860,7 @@
       selectScope,
       selectCertificate,
       safetyCommitmentLetter,
+      selectPaperDept,
     },
     props: {
       propsData: {}
@@ -672,15 +884,15 @@
       }
       const validateData1 = (rule, value, callback) => {
         if(this.newData.targetUserType==2){
-          if (this.newData.studyHoursRequirementEnabled == 1 && !this.yzyhTest && !this.placementTest && this.newData.studyHoursRequirement == 0) {
+          if (this.newData.studyHoursRequirementEnabled == 1 && this.rangeStatus != 'yzyh' && this.rangeStatus != 'CLASSIFIED' && this.newData.studyHoursRequirement == 0) {
             callback(new Error('学时要求不能为0'))
-          }else if (this.newData.studyHoursRequirementEnabled == 1 && this.yzyhTest && this.newData.mandatoryStudyHoursConfig.freshmanNoLabHours == 0) {
+          }else if (this.newData.studyHoursRequirementEnabled == 1 && this.rangeStatus == 'yzyh' && this.newData.mandatoryStudyHoursConfig.freshmanNoLabHours == 0) {
             callback(new Error('研究生-新生的学时要求不能为0'))
           } else {
             callback()
           }
         }else if(this.newData.targetUserType==1){
-          if (this.newData.studyHoursRequirementEnabled == 1 && this.yzyhTest && this.newData.mandatoryStudyHoursConfig.staffNewHours == 0) {
+          if (this.newData.studyHoursRequirementEnabled == 1 && this.rangeStatus == 'yzyh' && this.newData.mandatoryStudyHoursConfig.staffNewHours == 0) {
             callback(new Error('教职工-新入职的学时要求不能为0'))
           } else {
             callback()
@@ -777,10 +989,6 @@
         optionRiskLevel: [],
         scopeList: [],
         userList: [],
-        //是否是分级考试
-        placementTest: false,
-        //是否是应知应会考试
-        yzyhTest:false,
         //答卷次数限制
         answerUnlimited: false,
         //应知应会学时要求数据
@@ -790,6 +998,10 @@
           level3Hour:0,
           level4Hour:0,
         },
+        //考试范围显示状态 用于判断页面显示
+        rangeStatus:'',
+        //组卷类型
+        paperType:'',
         newData: {
           examTypeId: null,
           disciplineTypeId: null,
@@ -916,11 +1128,39 @@
             { validator: validateData9, trigger: 'blur' }
           ],
         },
+        //分级分类-试卷配置
+        checkPaperIndex:null,
+        checkPaperType:1,
+        //多学院试题配置
+        paperDeptList:[],
+        //试卷配置
+        paperListA1:[
+          { name:'化学类', paperName:'', paperId:'', }, { name:'生物类', paperName:'', paperId:'', },
+        ],
+        paperListA2:[
+          { name:'化学类', paperName:'', paperId:'', }, { name:'生物类', paperName:'', paperId:'', },
+        ],
+        paperListA3:[
+          { name:'化学类', paperName:'', paperId:'', }, { name:'生物类', paperName:'', paperId:'', },
+        ],
+        paperListA4:[
+          { name:'化学类', paperName:'', paperId:'', }, { name:'生物类', paperName:'', paperId:'', },
+        ],
+        //应知应会-试卷配置
+        paperListB:[
+          { name:'学生', paperName:'', paperId:'', }, { name:'教职工', paperName:'', paperId:'', },
+        ],
+        //负面清单-试卷配置
+        paperListC:[
+          { name:'化学类', paperName:'', paperId:'', }, { name:'生物类', paperName:'', paperId:'', },
+        ],
         //弹窗相关
         drawerTitle: '',
         drawerType: '',
         drawer: false,
         showType:false,
+        //多学院抽题组卷-组件传参
+        selectPaperDeptPropsData:null
       }
     },
     watch: {
@@ -1049,7 +1289,7 @@
         let obj = {
           examTypeId:this.newData.examTypeId,
           disciplineTypeId:this.newData.disciplineTypeId,
-          riskLevelId:this.placementTest?this.newData.riskLevelId:'',
+          riskLevelId:this.rangeStatus == 'CLASSIFIED'?this.newData.riskLevelId:'',
           examName:this.newData.examName,
           attemptLimit:this.answerUnlimited?0:this.newData.attemptLimit,
           shareStatus:this.newData.shareStatus,
@@ -1059,12 +1299,12 @@
           endTime:this.newData.examTimeRange[1].replace(" ", "T"),
           answerDuration:this.newData.answerDuration,
           scopeType:this.newData.scopeType,
-          targetUserType:this.yzyhTest?this.newData.targetUserType:'',
+          targetUserType:this.rangeStatus == 'yzyh'?this.newData.targetUserType:'',
           ruleScopeItems:this.newData.scopeType==2?this.scopeList:[],
           designatedCandidates:this.newData.scopeType==3?this.userList:[],
           studyHoursRequirementEnabled:this.newData.studyHoursRequirementEnabled,
-          studyHoursRequirement:this.newData.studyHoursRequirementEnabled == 1&&(!this.yzyhTest&&!this.placementTest)?this.newData.studyHoursRequirement:0,
-          mandatoryStudyHoursConfig:this.newData.studyHoursRequirementEnabled == 1&&this.yzyhTest?{
+          studyHoursRequirement:this.newData.studyHoursRequirementEnabled == 1&&(this.rangeStatus != 'yzyh'&&this.rangeStatus != 'CLASSIFIED')?this.newData.studyHoursRequirement:0,
+          mandatoryStudyHoursConfig:this.newData.studyHoursRequirementEnabled == 1&&this.rangeStatus == 'yzyh'?{
             freshmanNoLabHours:this.newData.targetUserType==2?this.newData.mandatoryStudyHoursConfig.freshmanNoLabHours:0,
             undergraduateHours:this.newData.targetUserType==2?this.newData.mandatoryStudyHoursConfig.undergraduateHours:0,
             staffNewHours:this.newData.targetUserType==1?this.newData.mandatoryStudyHoursConfig.staffNewHours:0,
@@ -1075,7 +1315,7 @@
             staffNewHours:0,
             staffNonNewHours:0,
           },
-          knowledgePointIds:this.newData.studyHoursRequirementEnabled == 1&&(!this.yzyhTest&&!this.placementTest)?this.newData.knowledgePointIds:[],
+          knowledgePointIds:this.newData.studyHoursRequirementEnabled == 1&&(this.rangeStatus != 'yzyh'&&!this.rangeStatus != 'CLASSIFIED')?this.newData.knowledgePointIds:[],
           preCourseEnabled:this.newData.preCourseEnabled,
           preCourseId:this.newData.preCourseEnabled == 1?this.newData.preCourseId:'',
           mockEnabled:this.newData.mockEnabled,
@@ -1160,12 +1400,25 @@
         this.$set(this, 'drawerType', 7)
         this.$set(this, 'drawer', true)
       },
+      openPaperDeptDrawer() {
+        // TODO: 打开选择多学院抽题组卷弹窗
+        this.$set(this, 'drawerTitle', '随机抽题组卷')
+        this.$set(this, 'selectPaperDeptPropsData', {
+          title:'新生入学考试'
+        })
+        this.$set(this, 'drawerType', 8)
+        this.$set(this, 'drawer', true)
+      },
       //弹窗关闭
       drawerOffButton(data) {
         if (this.drawerType == 1) {
           //选择试卷
-          this.$set(this.newData, 'paperId', data.id)
-          this.$set(this.newData, 'paperName', data.name)
+          if(this.rangeStatus == ''){
+            this.$set(this.newData, 'paperId', data.id)
+            this.$set(this.newData, 'paperName', data.name)
+          }else{
+            this.setPaperData(data);
+          }
         }else if(this.drawerType == 2){
           //选择课程
           this.$set(this.newData, 'preCourseId', data.id)
@@ -1224,8 +1477,8 @@
         let self = this
         for (let i = 0; i < self.optionExamType.length; i++) {
           if (self.optionExamType[i].id == self.newData.examTypeId) {
+            //分级分类
             if (self.optionExamType[i].examTypeCode == 'CLASSIFIED') {
-              self.$set(this, 'placementTest', true)
               let num = 0;
               for(let o=0;o<self.tableList2.length;o++){
                 if(self.newData.disciplineTypeId == self.tableList2[o].id){
@@ -1236,7 +1489,6 @@
                 self.$set(self.newData,'disciplineTypeId',null);
               }
             } else {
-              self.$set(this, 'placementTest', false)
               let num = 0;
               for(let o=0;o<self.tableList.length;o++){
                 if(self.newData.disciplineTypeId == self.tableList[o].id){
@@ -1247,14 +1499,33 @@
                 self.$set(self.newData,'disciplineTypeId',null);
               }
             }
+            //应知应会
             if (self.optionExamType[i].examTypeCode == 'yzyh') {
               self.$set(this.newData, 'scopeType', 1)
               if(!this.newData.targetUserType){
                 self.$set(this.newData, 'targetUserType', 2)
               }
-              self.$set(this, 'yzyhTest', true)
-            } else {
-              self.$set(this, 'yzyhTest', false)
+            }
+            //根据考试类型切换 范围显示 与指定考卷相关
+            if (self.optionExamType[i].examTypeCode == 'STUDENT') {
+              //新生入学考试
+              self.$set(self,'rangeStatus','STUDENT');
+              self.$set(self.newData,'scopeType',1);
+            }else if (self.optionExamType[i].examTypeCode == 'FUMIANQINGDAN') {
+              //负面清单考试
+              self.$set(self,'rangeStatus','FUMIANQINGDAN');
+              self.$set(self.newData,'scopeType',1);
+            }else if (self.optionExamType[i].examTypeCode == 'CLASSIFIED') {
+              //分级分类
+              self.$set(self,'rangeStatus','CLASSIFIED');
+              self.$set(self.newData,'scopeType',1);
+            }else if (self.optionExamType[i].examTypeCode == 'yzyh') {
+              //应知应会
+              self.$set(self,'rangeStatus','yzyh');
+              self.$set(self.newData,'scopeType',1);
+            }else{
+              //其他类型
+              self.$set(self,'rangeStatus','');
             }
           }
         }
@@ -1269,7 +1540,7 @@
           } else {
             let list = [];
             for(let i=0;i<response.data.length;i++){
-              if(response.data[i].examTypeCode != 'CLASSIFIED' && response.data[i].examTypeCode != 'yzyh' && response.data[i].examTypeCode != 'STUDENT'){
+              if(response.data[i].examTypeCode != 'CLASSIFIED' && response.data[i].examTypeCode != 'yzyh' && response.data[i].examTypeCode != 'STUDENT' && response.data[i].examTypeCode != 'FUMIANQINGDAN'){
                 list.push(response.data[i])
               }
             }
@@ -1306,6 +1577,87 @@
           this.$set(this, 'tableList2', list)
         })
       },
+      //选择试卷
+      paperTableButton(val,index){
+        if(val == 1){
+          //试卷同上
+          if(index != 0){
+            if(this.rangeStatus == 'CLASSIFIED'){
+              if(this.checkPaperType == 1){
+                if(this.paperListA1[index-1].paperId){
+                  this.$set(this.paperListA1[index],'paperName',this.paperListA1[index-1].paperName);
+                  this.$set(this.paperListA1[index],'paperId',this.paperListA1[index-1].paperId);
+                }else{
+                  this.msgError('上一个试卷未选择')
+                }
+              }else if(this.checkPaperType == 2){
+                if(this.paperListA2[index-1].paperId){
+                  this.$set(this.paperListA2[index],'paperName',this.paperListA2[index-1].paperName);
+                  this.$set(this.paperListA2[index],'paperId',this.paperListA2[index-1].paperId);
+                }else{
+                  this.msgError('上一个试卷未选择')
+                }
+              }else if(this.checkPaperType == 3){
+                if(this.paperListA3[index-1].paperId){
+                  this.$set(this.paperListA3[index],'paperName',this.paperListA3[index-1].paperName);
+                  this.$set(this.paperListA3[index],'paperId',this.paperListA3[index-1].paperId);
+                }else{
+                  this.msgError('上一个试卷未选择')
+                }
+              }else if(this.checkPaperType == 4){
+                if(this.paperListA4[index-1].paperId){
+                  this.$set(this.paperListA4[index],'paperName',this.paperListA4[index-1].paperName);
+                  this.$set(this.paperListA4[index],'paperId',this.paperListA4[index-1].paperId);
+                }else{
+                  this.msgError('上一个试卷未选择')
+                }
+              }
+            }else if(this.rangeStatus == 'yzyh'){
+              if(this.paperListB[index-1].paperId){
+                this.$set(this.paperListB[index],'paperName',this.paperListB[index-1].paperName);
+                this.$set(this.paperListB[index],'paperId',this.paperListB[index-1].paperId);
+              }else{
+                this.msgError('上一个试卷未选择')
+              }
+            }else if(this.rangeStatus == 'FUMIANQINGDAN'){
+              if(this.paperListC[index-1].paperId){
+                this.$set(this.paperListC[index],'paperName',this.paperListC[index-1].paperName);
+                this.$set(this.paperListC[index],'paperId',this.paperListC[index-1].paperId);
+              }else{
+                this.msgError('上一个试卷未选择')
+              }
+            }
+          }
+        }else if(val == 2){
+          //选择试卷
+          this.$set(this,'checkPaperIndex',index);
+          this.openPaperDrawer();
+        }
+      },
+      //试卷选择完毕写入非常规考试试卷数据
+      setPaperData(data){
+        if(this.rangeStatus == 'CLASSIFIED'){
+          if(this.checkPaperType == 1){
+            this.$set(this.paperListA1[this.checkPaperIndex],'paperName',data.name);
+            this.$set(this.paperListA1[this.checkPaperIndex],'paperId',data.id);
+          }else if(this.checkPaperType == 2){
+            this.$set(this.paperListA2[this.checkPaperIndex],'paperName',data.name);
+            this.$set(this.paperListA2[this.checkPaperIndex],'paperId',data.id);
+          }else if(this.checkPaperType == 3){
+            this.$set(this.paperListA3[this.checkPaperIndex],'paperName',data.name);
+            this.$set(this.paperListA3[this.checkPaperIndex],'paperId',data.id);
+          }else if(this.checkPaperType == 4){
+            this.$set(this.paperListA4[this.checkPaperIndex],'paperName',data.name);
+            this.$set(this.paperListA4[this.checkPaperIndex],'paperId',data.id);
+          }
+        }else if(this.rangeStatus == 'yzyh'){
+          this.$set(this.paperListB[this.checkPaperIndex],'paperName',data.name);
+          this.$set(this.paperListB[this.checkPaperIndex],'paperId',data.id);
+        }else if(this.rangeStatus == 'FUMIANQINGDAN'){
+          this.$set(this.paperListC[this.checkPaperIndex],'paperName',data.name);
+          this.$set(this.paperListC[this.checkPaperIndex],'paperId',data.id);
+        }
+      },
     }
   }
 </script>
@@ -1357,6 +1709,21 @@
       overflow-y: auto;
       padding: 24px 32px;
     }
+    .CLASSIFIED-check-box{
+      display: flex;
+      margin-bottom:20px;
+      p{
+        padding:0 30px;
+        text-align: center;
+        color:#333;
+        cursor: pointer;
+        background-color: #F5F5F5;
+      }
+      .check-CLASSIFIED-p{
+        background-color: #0183fa;
+        color:#fff;
+      }
+    }
 
     .section-block {
       padding-bottom: 8px;
@@ -1500,6 +1867,11 @@
       gap: 12px;
       flex-wrap: wrap;
     }
+    .paper-select-column {
+      width:900px;
+      display: flex;
+      flex-direction: column;
+    }
 
     .checkButton-p {
       background-color: #0183fa;

+ 335 - 0
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/selectPaperDept.vue

@@ -0,0 +1,335 @@
+<!--多学院抽题组卷-->
+<template>
+  <div class="selectPaperDept-page">
+    <div class="title-box">
+      <p>{{ selectPaperDeptPropsData.title }}</p>
+      <p>通用试卷抽题配置</p>
+    </div>
+
+    <div class="form-box">
+      <!-- 预留的表单区域,如考试时长、总分等配置 -->
+    </div>
+
+    <div class="table-max-box">
+      <!-- 表格区域 -->
+      <el-table
+        class="table-box"
+        :data="currentTableData"
+        border
+        table-layout="fixed"
+        v-loading="loading"
+        style="width: 100%"
+      >
+        <!-- 左侧固定列:学院 -->
+        <el-table-column prop="collegeName" label="考试范围" width="150" fixed="left" align="center">
+          <template slot-scope="{ row }">
+            <span>{{ row.collegeName }}</span>
+          </template>
+        </el-table-column>
+
+        <!-- 右侧动态列:知识点 -->
+        <el-table-column
+          v-for="kp in knowledgePoints"
+          :key="kp.id"
+          :label="kp.name"
+          width="180"
+          align="center"
+        >
+          <template slot-scope="{ row }">
+            <!-- 防御性渲染 -->
+            <div class="question-cell" v-if="row.kpData && row.kpData[kp.id]">
+              <!-- 单选 -->
+              <div class="q-item">
+                <input
+                  type="number"
+                  class="native-input"
+                  v-model.number="row.kpData[kp.id].single"
+                  min="0"
+                />
+                <span class="q-label">单选 666题</span>
+              </div>
+
+              <!-- 多选 -->
+              <div class="q-item">
+                <input
+                  type="number"
+                  class="native-input"
+                  v-model.number="row.kpData[kp.id].multiple"
+                  min="0"
+                />
+                <span class="q-label">多选 666题</span>
+              </div>
+
+              <!-- 判断 -->
+              <div class="q-item">
+                <input
+                  type="number"
+                  class="native-input"
+                  v-model.number="row.kpData[kp.id].judge"
+                  min="0"
+                />
+                <span class="q-label">判断 666题</span>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[5, 10, 20, 50]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
+
+    <p class="saveButton" @click="saveButton">保存</p>
+  </div>
+</template>
+
+<script>
+  import {
+    examElKnowledgePointTreeList, systemDeptCurrentDept
+  } from "@/api/safetyEducationExaminationNew/index";
+
+  export default {
+    name: 'selectPaperDept',
+    props: {
+      selectPaperDeptPropsData: {}
+    },
+    data() {
+      return {
+        form:{},
+        loading: false,
+
+        knowledgePoints: [], // 表头:动态知识点
+        allTableData: [],    // 全量数据(包含所有学院)
+
+        // 分页相关
+        currentPage: 1,
+        pageSize: 5,
+        total: 0
+      }
+    },
+    computed: {
+      // 核心:通过分页参数截取全量数据,避免一次性渲染过多 DOM 卡顿
+      currentTableData() {
+        const start = (this.currentPage - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        return this.allTableData.slice(start, end);
+      }
+    },
+    created() {
+      this.initAllData();
+    },
+    mounted() {
+
+    },
+    methods: {
+      // 初始化所有数据
+      initAllData() {
+        this.loading = true;
+
+        // 并发请求知识点和学院
+        const p1 = examElKnowledgePointTreeList({});
+        const p2 = systemDeptCurrentDept({});
+
+        Promise.all([p1, p2]).then(([res1, res2]) => {
+          // 1. 处理知识点(列)
+          const kpList = res1.data || [];
+          // ⚠️ 这里的 item.id / item.knowledgePointName 需根据你后端真实字段修改
+          this.knowledgePoints = kpList.map(item => ({
+            id: item.id || item.knowledgePointId,
+            name: item.knowledgePointName || item.name
+          }));
+
+          // 2. 处理学院(行)
+          const deptList = res2.data || [];
+          let rawRows = [];
+          if (deptList.length > 0 && deptList[0].child) {
+            // ⚠️ 这里的 dept.id / dept.name 需根据你后端真实字段修改
+            rawRows = deptList[0].child.map(dept => ({
+              collegeId: dept.id || dept.deptId,
+              collegeName: dept.name || dept.deptName,
+              kpData: {}
+            }));
+          }
+
+          // 3. 组装全量数据
+          this.buildAllTableData(rawRows);
+
+        }).catch(err => {
+          console.error('数据加载异常', err);
+          this.$message.error('数据加载异常');
+        }).finally(() => {
+          this.loading = false;
+        });
+      },
+
+      // 组装数据:把知识点全部映射进每个学院的对象里
+      buildAllTableData(rawRows) {
+        if (!this.knowledgePoints.length || !rawRows.length) return;
+
+        this.allTableData = rawRows.map(row => {
+          const kpData = {};
+          this.knowledgePoints.forEach(kp => {
+            kpData[kp.id] = {
+              single: null,
+              multiple: null,
+              judge: null
+            };
+          });
+          return { ...row, kpData };
+        });
+
+        // 初始化分页总数
+        this.total = this.allTableData.length;
+        this.currentPage = 1;
+      },
+
+      // 每页条数改变
+      handleSizeChange(val) {
+        this.pageSize = val;
+        this.currentPage = 1;
+      },
+
+      // 当前页改变
+      handleCurrentChange(val) {
+        this.currentPage = val;
+      },
+
+      // 保存按钮
+      saveButton(){
+        // ⚠️ 注意:提交给后端时,要使用全量数据 this.allTableData,而不是当前页的 this.currentTableData
+        console.log('准备提交的数据:', this.allTableData);
+
+        // 如果后端需要特定的数组格式,可以在这里做一次扁平化转换
+        /*
+        const submitData = this.allTableData.map(row => {
+          const list = [];
+          for(let kpId in row.kpData) {
+            list.push({
+              knowledgePointId: kpId,
+              singleCount: row.kpData[kpId].single || 0,
+              multipleCount: row.kpData[kpId].multiple || 0,
+              judgeCount: row.kpData[kpId].judge || 0
+            });
+          }
+          return { deptId: row.collegeId, configList: list };
+        });
+        console.log('转换后提交格式:', submitData);
+        */
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .selectPaperDept-page{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+
+    .title-box {
+      margin-bottom: 20px;
+      p:first-child {
+        font-size: 18px;
+        font-weight: bold;
+        color: #303133;
+        margin-bottom: 5px;
+      }
+      p:last-child {
+        font-size: 14px;
+        color: #909399;
+      }
+    }
+
+    .form-box {
+      margin-bottom: 20px;
+    }
+
+    .table-max-box {
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      ::v-deep .el-table .cell {
+        height: auto !important;
+      }
+      /* 表格内部单元格的排版 */
+      .question-cell {
+        display: flex;
+        flex-direction: column;
+        gap: 8px;
+        padding: 5px 0;
+      }
+
+      .q-item {
+        display: flex;
+        align-items: center;
+        justify-content: flex-start;
+      }
+
+      /* 原生输入框样式,高度还原图里的效果 */
+      .native-input {
+        width: 60px;
+        height: 28px;
+        margin-right: 10px;
+        border: 1px solid #dcdfe6;
+        border-radius: 4px;
+        text-align: center;
+        outline: none;
+        color: #409EFF;
+        font-weight: bold;
+        font-size: 14px;
+        transition: border-color .2s;
+
+        &:focus {
+          border-color: #409EFF;
+        }
+
+        /* 隐藏数字输入框的上下箭头 */
+        &::-webkit-outer-spin-button,
+        &::-webkit-inner-spin-button {
+          -webkit-appearance: none;
+          margin: 0;
+        }
+        &[type=number] {
+          -moz-appearance: textfield;
+        }
+      }
+
+      .q-label {
+        font-size: 13px;
+        color: #606266;
+        white-space: nowrap;
+      }
+
+      /* 分页容器 */
+      .pagination-container {
+        margin-top: 20px;
+        text-align: right;
+      }
+    }
+
+    /* 保存按钮 */
+    .saveButton {
+      display: inline-block;
+      margin-top: 20px;
+      padding: 10px 24px;
+      background-color: #409EFF;
+      color: #fff;
+      border-radius: 4px;
+      cursor: pointer;
+      font-size: 14px;
+
+      &:hover {
+        background-color: #66b1ff;
+      }
+    }
+  }
+</style>

+ 97 - 44
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/studentsTakingMakeUpExams.vue

@@ -4,14 +4,15 @@
     <div class="page-container-top-max-big-box">
       <p class="top-1-p">补考安排</p>
       <p class="top-2-p" @click="backPage()">返回</p>
-      <p class="top-4-p" @click="submitButton()" v-if="makeupStarted == 0">保存</p>
+      <p class="top-4-p" @click="submitButton()" v-if="!makeupStarted">保存</p>
     </div>
     <div class="content-box">
-      <div class="max-add-form-box" v-if="makeupStarted == 0">
+      <div class="max-add-form-box">
         <el-form class="add-form-box" :model="newData" ref="form" label-width="140px" :rules="rules">
           <div class="form-flex-box">
             <el-form-item label="复用原试卷" prop="reuseOriginalPaper">
               <el-switch
+                :disabled="makeupStarted"
                 :active-value="1"
                 :inactive-value="0"
                 v-model="newData.reuseOriginalPaper"
@@ -20,8 +21,9 @@
               >
               </el-switch>
             </el-form-item>
-            <p class="checkButton-p" v-if="newData.reuseOriginalPaper == 0" style="margin-left:20px;" @click="openPaperDrawer">选择试卷</p>
-            <div class="selected-tag" v-if="newData.paperName && newData.reuseOriginalPaper == 0">
+            <p class="checkButton-p" v-if="newData.reuseOriginalPaper == 0 && !makeupStarted" style="margin-left:20px;" @click="openPaperDrawer">选择试卷</p>
+            <p class="checkButton-p" v-if="newData.reuseOriginalPaper == 1 || makeupStarted" style="margin-left:20px;">查看试卷</p>
+            <div class="selected-tag" v-if="newData.paperName && newData.reuseOriginalPaper == 0 && !makeupStarted">
               <span>{{ newData.paperName }}</span>
               <i class="el-icon-close" @click="newData.paperId = null; newData.paperName = ''"></i>
             </div>
@@ -29,6 +31,7 @@
           <div class="form-flex-box">
             <el-form-item label="补考时间" prop="examTimeRange">
               <el-date-picker
+                :disabled="makeupStarted"
                 popper-class="examinationArrange-addPage-date-picker"
                 v-model="newData.examTimeRange"
                 type="datetimerange"
@@ -42,8 +45,9 @@
             </el-form-item>
           </div>
           <div class="form-flex-box">
-            <el-form-item label="可补考次数" prop="attemptLimit">
+            <el-form-item label="可考次数" prop="attemptLimit">
               <el-input-number
+                :disabled="makeupStarted"
                 class="form-input-number"
                 style="width:200px"
                 :min="1"
@@ -53,28 +57,32 @@
               >
               </el-input-number>
             </el-form-item>
-            <el-form-item label="考试时长" prop="answerDuration">
-              <div class="stepper-row">
-                <div class="number-stepper">
-                  <div class="number-stepper">
-                    <el-input-number
-                      class="form-input-number"
-                      style="width:160px"
-                      :min="0"
-                      :max="9999"
-                      :step="1" :precision="0" step-strictly
-                      v-model="newData.answerDuration"
-                    >
-                    </el-input-number>
-                  </div>
-                </div>
-                <span class="unit-text">分钟</span>
-                <span class="tip-text" style="margin-left:12px;">限制答卷最大时长</span>
-              </div>
-            </el-form-item>
+            <!--<el-form-item label="考试时长" prop="answerDuration">-->
+              <!--<div class="stepper-row">-->
+                <!--<div class="number-stepper">-->
+                  <!--<div class="number-stepper">-->
+                    <!--<el-input-number-->
+                      <!--class="form-input-number"-->
+                      <!--style="width:160px"-->
+                      <!--:min="0"-->
+                      <!--:max="9999"-->
+                      <!--:step="1" :precision="0" step-strictly-->
+                      <!--v-model="newData.answerDuration"-->
+                    <!--&gt;-->
+                    <!--</el-input-number>-->
+                  <!--</div>-->
+                <!--</div>-->
+                <!--<span class="unit-text">分钟</span>-->
+                <!--<span class="tip-text" style="margin-left:12px;">限制答卷最大时长</span>-->
+              <!--</div>-->
+            <!--</el-form-item>-->
           </div>
         </el-form>
       </div>
+      <div class="center-text-box">
+        <p>补考人员列表</p>
+        <p v-if="!makeupStarted">系统已自动拉去考试未通过和缺考人员,可额外添加任意人员参与补考。</p>
+      </div>
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
@@ -105,16 +113,16 @@
               placeholder="学院单位"
             ></el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="disciplineId">
-            <el-select v-model="queryParams.disciplineId" placeholder="专业" style="width: 140px">
-              <el-option
-                v-for="dict in optionListC"
-                :key="dict.id"
-                :label="dict.disciplineName"
-                :value="dict.id"
-              />
-            </el-select>
-          </el-form-item>
+          <!--<el-form-item label="" prop="disciplineId">-->
+            <!--<el-select v-model="queryParams.disciplineId" placeholder="专业" style="width: 140px">-->
+              <!--<el-option-->
+                <!--v-for="dict in optionListC"-->
+                <!--:key="dict.id"-->
+                <!--:label="dict.disciplineName"-->
+                <!--:value="dict.id"-->
+              <!--/>-->
+            <!--</el-select>-->
+          <!--</el-form-item>-->
           <el-form-item label="" prop="account">
             <el-input
               maxLength="30"
@@ -125,24 +133,40 @@
           </el-form-item>
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <p class="page-add-common-style-button" style="float: right;" @click="exportButton()">导出</p>
+          <!--<p class="page-add-common-style-button" style="float: right;" @click="exportButton()">导出</p>-->
+          <p class="page-save-common-style-button" style="float: right;width:140px;" @click="openUserDrawer">新增补考人员</p>
         </el-form>
       </div>
       <div class="page-content-box">
         <el-table class="table-box"  border :data="dataList">
           <el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
           <el-table-column label="学工号" prop="account" width="140" show-overflow-tooltip/>
-          <el-table-column label="专业" prop="disciplineName" width="120" show-overflow-tooltip/>
-          <el-table-column label="学年" prop="academicYear" width="100" show-overflow-tooltip/>
+          <!--<el-table-column label="专业" prop="disciplineName" width="120" show-overflow-tooltip/>-->
+          <!--<el-table-column label="学年" prop="academicYear" width="100" show-overflow-tooltip/>-->
           <el-table-column label="学院单位" prop="deptName" width="200" show-overflow-tooltip/>
-          <el-table-column label="交卷时间" prop="submitTime" width="140" show-overflow-tooltip>
+          <el-table-column label="考试时间" prop="submitTime" width="140" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.submitTime,'{y}-{m}-{d} {h}:{i}:{s}') }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="用时" prop="durationText" width="100" show-overflow-tooltip/>
-          <el-table-column label="成绩" prop="score" width="100" show-overflow-tooltip/>
-          <el-table-column label="结果" prop="passStatus" width="100" show-overflow-tooltip>
+          <!--<el-table-column label="用时" prop="durationText" width="100" show-overflow-tooltip/>-->
+          <el-table-column label="考试成绩" prop="score" width="100" show-overflow-tooltip/>
+          <el-table-column label="考试结果" prop="passStatus" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span v-if="scope.row.resultStatus == 4" class="colorA">缺勤</span>
+              <span v-if="scope.row.resultStatus == 3" class="colorB">未通过</span>
+              <span v-if="scope.row.resultStatus == 1">考试中</span>
+              <span v-if="scope.row.resultStatus == 2" class="colorC">通过</span>
+              <span v-if="scope.row.resultStatus == 0">未开始</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="补考时间" prop="demo" width="140" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.submitTime,'{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="补考成绩" prop="demo" width="100" show-overflow-tooltip/>
+          <el-table-column label="补考结果" prop="demo" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               <span v-if="scope.row.resultStatus == 4" class="colorA">缺勤</span>
               <span v-if="scope.row.resultStatus == 3" class="colorB">未通过</span>
@@ -156,6 +180,8 @@
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
+                >重置可考次数</p>
+                <p class="table-button-p"
                    @click="lockExam(scope.row)"
                 >查看答卷</p>
                 <p class="table-button-null"></p>
@@ -184,6 +210,7 @@
       <!--选择试卷/选择试题-->
       <selectTestPaper v-if="drawerType === 1&&drawer"></selectTestPaper>
       <examDetails v-if="drawerType === 2&&drawer" :examDetailsPropsData="examDetailsPropsData"></examDetails>
+      <studentsUserList  v-if="drawerType === 3&&drawer"></studentsUserList>
     </el-drawer>
   </div>
 </template>
@@ -191,6 +218,7 @@
 <script>
   import examDetails from '@/views/safetyEducationExaminationNew/components/examDetails.vue'
   import selectTestPaper from './selectTestPaper.vue'
+  import studentsUserList from './studentsUserList.vue'
   import {
     systemUserGetAcademicYear,examElExamMakeupResults,
     examElExamMakeupAdd,examElExamMakeupCandidates,
@@ -202,7 +230,8 @@
     name: 'addPage',
     components: {
       selectTestPaper,
-      examDetails
+      examDetails,
+      studentsUserList,
     },
     props: {
       propsData: {}
@@ -281,7 +310,7 @@
     },
     mounted() {
       this.$set(this,'makeupStarted',this.propsData.makeupStarted);
-      if(this.propsData.makeupExamId&&this.propsData.makeupStarted==0){
+      if(this.propsData.makeupExamId&&!this.propsData.makeupStarted){
         this.examElExamDetail();
       }
       this.$set(this.newData,'parentExamId',this.propsData.id);
@@ -319,7 +348,7 @@
         }).catch(() => {})
       },
       //弹窗返回
-      drawerReturnButton(){
+      drawerOffButton(data){
         //选择试卷
         this.$set(this.newData, 'paperId', data.id)
         this.$set(this.newData, 'paperName', data.name)
@@ -331,6 +360,17 @@
         this.$set(this, 'drawerType', 1)
         this.$set(this, 'drawer', true)
       },
+      openUserDrawer() {
+        // TODO: 打开选择试卷弹窗
+        this.$set(this, 'drawerTitle', '新增补考人员')
+        this.$set(this, 'drawerType', 3)
+        this.$set(this, 'drawer', true)
+        this.getList();
+      },
+      //弹窗返回
+      drawerUserOffButton(data){
+        this.$refs.drawer.closeDrawer();
+      },
       // 返回按钮
       backPage() {
         this.$parent.tableButton(6)
@@ -544,6 +584,19 @@
           }
         }
       }
+      .center-text-box{
+        padding:20px 20px 0;
+        p:nth-child(1){
+          line-height:20px;
+          font-size:16px;
+        }
+        p:nth-child(2){
+          margin-top:10px;
+          line-height:20px;
+          font-size:14px;
+          color:#666;
+        }
+      }
     }
   }
 </style>

+ 242 - 0
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/studentsUserList.vue

@@ -0,0 +1,242 @@
+<!-- 选择用户 -->
+<template>
+  <div class="page-container studentsUserList-addPage">
+    <div class="page-form-title-box">
+      <el-form :model="queryParams" class="form-box" ref="queryForm"
+               :inline="true" style="width:100%;">
+        <el-form-item label="" prop="gradeNumbers">
+          <el-select v-model="queryParams.gradeNumbers" collapse-tags multiple placeholder="学年" style="width: 220px">
+            <el-option
+              v-for="dict in optionListD"
+              :key="dict.gradeNumber"
+              :label="dict.gradeNumber"
+              :value="dict.gradeNumber"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="deptIds">
+          <el-cascader
+            collapse-tags
+            style="width: 220px"
+            v-model="queryParams.deptIds"
+            :options="optionListB"
+            :props="{
+                    multiple:true,
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+            :show-all-levels="false"
+            filterable
+            placeholder="学院单位"
+          ></el-cascader>
+        </el-form-item>
+        <el-form-item label="" prop="userTypeIds">
+          <el-select v-model="queryParams.userTypeIds" collapse-tags multiple placeholder="用户类别" style="width: 220px">
+            <el-option
+              v-for="dict in optionListC"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="majorId">
+          <el-select v-model="queryParams.majorId" collapse-tags multiple placeholder="专业" style="width: 220px">
+            <el-option
+              v-for="dict in optionListE"
+              :key="dict.id"
+              :label="dict.disciplineName"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="searchValue">
+          <el-input
+            maxLength="30"
+            v-model="queryParams.searchValue"
+            placeholder="姓名/学工号"
+            style="width: 220px"
+          />
+        </el-form-item>
+        <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+        <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+        <p class="page-submit-common-style-button"
+           style="float: right;"
+           @click="checkButton()"
+        >确定</p>
+      </el-form>
+    </div>
+    <div class="page-content-box">
+      <el-table class="table-box" border :data="dataList"
+                ref="multipleTable" :row-key="getRowKey" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
+        <el-table-column label="姓名" prop="userName"  show-overflow-tooltip/>
+        <el-table-column label="学工号" prop="account" show-overflow-tooltip/>
+        <el-table-column label="用户类别" prop="userTypeName" show-overflow-tooltip/>
+        <el-table-column label="专业" prop="majorName" show-overflow-tooltip/>
+        <el-table-column label="学年" prop="gradeNumber" show-overflow-tooltip/>
+        <el-table-column label="学院单位" prop="deptName" show-overflow-tooltip/>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+                  v-show="total>0"
+                  :total="total"
+                  :page.sync="queryParams.page"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    systemUserGetCategories,systemUserGetAcademicYear,
+    systemUserGetUserDataByParam,examElDisciplineTypeList,systemDeptCurrentDept,
+  } from "@/api/safetyEducationExaminationNew/index";
+  export default {
+    name: 'addPage',
+    props: {
+      propsData: {}
+    },
+    data() {
+      return {
+        //下拉列表数据
+        optionListA:[],
+        optionListB:[],
+        optionListC:[],
+        optionListD:[],
+        optionListE:[],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          gradeNumbers:[],
+          deptIds :[],
+          userTypeIds :[],
+          majorId :[],
+          searchValue :'',
+        },
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //存储所有被勾选的数据
+        multipleSelection: [],
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      this.getList();
+      this.systemUserGetAcademicYear();
+      this.systemUserGetCategories();
+      this.examElDisciplineTypeList();
+      this.systemDeptCurrentDept();
+    },
+    methods: {
+      // 提交按钮
+      checkButton() {
+        let self = this;
+        if(!this.multipleSelection[0]){
+          this.msgError('请勾选用户')
+          return
+        }
+        let list = [];
+        for(let i=0;i<self.multipleSelection.length;i++){
+          list.push({
+            userId:self.multipleSelection[i].userId,
+            userName:self.multipleSelection[i].userName,
+            deptId:self.multipleSelection[i].deptId,
+            deptName:self.multipleSelection[i].deptName,
+            account:self.multipleSelection[i].account,
+            disciplineId:self.multipleSelection[i].majorId,
+            disciplineName:self.multipleSelection[i].majorName,
+            academicYear:self.multipleSelection[i].gradeNumber,
+          })
+        }
+        this.$confirm('是否确认添加?', "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+        }).then(() => {
+          this.$parent.$parent.drawerUserOffButton();
+          // this.$parent.$parent.drawerOffButton(JSON.parse(JSON.stringify(list)))
+        }).catch(() => {});
+      },
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          gradeNumbers:[],
+          deptIds :[],
+          userTypeIds :[],
+          majorId :[],
+          searchValue :'',
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        systemUserGetUserDataByParam(obj).then(response => {
+
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //学年下拉列表
+      systemUserGetAcademicYear(){
+        systemUserGetAcademicYear({}).then(response => {
+          this.$set(this,'optionListD',response.data);
+        });
+      },
+      //用户类别下拉列表
+      systemUserGetCategories(){
+        systemUserGetCategories({}).then(response => {
+          this.$set(this,'optionListC',response.data);
+        });
+      },
+      //查询全部专业类别
+      examElDisciplineTypeList(){
+        examElDisciplineTypeList({}).then(response => {
+          this.$set(this,'optionListE',response.data);
+        });
+      },
+      //学院列表
+      systemDeptCurrentDept(){
+        systemDeptCurrentDept({}).then(response => {
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListB',list);
+        });
+      },
+      getRowKey(row) {
+        return row.userId;
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .studentsUserList-addPage {
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+  }
+</style>

+ 38 - 22
src/views/safetyEducationExaminationNew/examManagement/examinationResult/index.vue

@@ -73,17 +73,19 @@
       <div class="page-content-box">
         <el-table class="table-box"  border :data="dataList">
           <el-table-column label="考试名称" prop="examName"  show-overflow-tooltip/>
-          <el-table-column label="考试类型" prop="examTypeName" width="200" show-overflow-tooltip/>
+          <el-table-column label="考试类型" prop="examTypeName" width="140" show-overflow-tooltip/>
           <el-table-column label="考试时间" prop="startTime" width="290" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.startTime,"{y}-{m}-{d} {h}:{i}") }} 至 {{ parseTime(scope.row.endTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="参加人数" prop="participantCount" width="140" show-overflow-tooltip/>
-          <el-table-column label="合格人数" prop="passedCount" width="140" show-overflow-tooltip/>
-          <el-table-column label="缺考人数" prop="absentCount" width="140" show-overflow-tooltip/>
-          <el-table-column label="补考人数" prop="makeupCount" width="140" show-overflow-tooltip/>
-          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+          <el-table-column label="应考人数" prop="demo" width="100" show-overflow-tooltip/>
+          <el-table-column label="实考人数" prop="participantCount" width="100" show-overflow-tooltip/>
+          <el-table-column label="通过人数" prop="passedCount" width="100" show-overflow-tooltip/>
+          <el-table-column label="未通过人数" prop="demo" width="100" show-overflow-tooltip/>
+          <el-table-column label="未考人数" prop="demo" width="100" show-overflow-tooltip/>
+          <el-table-column label="通过率" prop="demo" width="100" show-overflow-tooltip/>
+          <el-table-column label="操作" width="140" show-overflow-tooltip v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
@@ -91,10 +93,10 @@
                    v-hasPermiRouter="['exam:elExamResult:scorePage']"
                    @click="tableButton(1,scope.row)"
                 >查看成绩</p>
-                <p class="table-button-p"
-                   v-hasPermiRouter="['exam:elExamResult:rewardPage']"
-                   @click="tableButton(2,scope.row)"
-                >学习情况</p>
+                <!--<p class="table-button-p"-->
+                   <!--v-hasPermiRouter="['exam:elExamResult:rewardPage']"-->
+                   <!--@click="tableButton(2,scope.row)"-->
+                <!--&gt;学习情况</p>-->
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -117,8 +119,9 @@
       ref="drawer"
       :visible.sync="drawer"
       direction="rtl">
-      <viewGrades v-if="drawerType==1&&drawer" :drawerPropsData="drawerPropsData"></viewGrades>
-      <academicPerformance v-if="drawerType==2&&drawer" :drawerPropsData="drawerPropsData"></academicPerformance>
+      <!--<viewGrades v-if="drawerType==1&&drawer" :drawerPropsData="drawerPropsData"></viewGrades>-->
+      <!--<academicPerformance v-if="drawerType==2&&drawer" :drawerPropsData="drawerPropsData"></academicPerformance>-->
+      <userListPage :drawerPropsData="drawerPropsData" v-if="drawerType == 1"></userListPage>
     </el-drawer>
   </div>
 </template>
@@ -131,6 +134,7 @@
   //import { getInfo } from "@/api/basicsModules/index";
   import viewGrades from "./viewGrades.vue";
   import academicPerformance from "./academicPerformance.vue";
+  import userListPage from "./userListPage.vue";
   import {
     systemUserGetAcademicYear,
     examElExamResultPage,examElExamTypeList,systemDeptCurrentDept,
@@ -140,6 +144,7 @@
     components: {
       viewGrades,
       academicPerformance,
+      userListPage,
     },
     data () {
       return {
@@ -278,20 +283,31 @@
         let self = this;
         if(type == 1){
           // TODO: 查看成绩
-          this.$set(this, 'drawerTitle', '查看成绩-'+row.examName)
+          // this.$set(this, 'drawerTitle', '查看成绩-'+row.examName)
+          // this.$set(this, 'drawerType', 1)
+          // this.$set(this, 'drawer', true)
+          // let obj = row
+          // obj.deptId = this.checkDeptId;
+          // this.$set(this, 'drawerPropsData', obj)
+          this.$set(this, 'drawerTitle', row.examName)
+          let obj = {
+            adminType:this.adminType,
+            examTypeCode:row.examTypeCode,
+            // valueYear:this.queryParams.academicYear,
+            // personType:3,
+            // deptId:this.adminType == 1?this.queryParams.deptId:localStorage.getItem('deptId'),
+          }
+          this.$set(this, 'drawerPropsData', obj)
           this.$set(this, 'drawerType', 1)
           this.$set(this, 'drawer', true)
-          let obj = row
-          obj.deptId = this.checkDeptId;
-          this.$set(this, 'drawerPropsData', obj)
         }else if(type == 2){
           // TODO: 学习情况
-          this.$set(this, 'drawerTitle', '学习情况-'+row.examName)
-          this.$set(this, 'drawerType', 2)
-          this.$set(this, 'drawer', true)
-          let obj = row
-          obj.deptId = this.checkDeptId;
-          this.$set(this, 'drawerPropsData', obj)
+          // this.$set(this, 'drawerTitle', '学习情况-'+row.examName)
+          // this.$set(this, 'drawerType', 2)
+          // this.$set(this, 'drawer', true)
+          // let obj = row
+          // obj.deptId = this.checkDeptId;
+          // this.$set(this, 'drawerPropsData', obj)
         }
       },
       //学年下拉列表

+ 488 - 0
src/views/safetyEducationExaminationNew/examManagement/examinationResult/userListPage.vue

@@ -0,0 +1,488 @@
+<!-- 分级考试人员明细 -->
+<template>
+  <div class="page-container dataReportUserListPage-addPage">
+    <div class="page-form-title-box">
+      <el-form :model="queryParams" class="form-box" ref="queryForm"
+               :inline="true" style="width:100%;">
+        <el-form-item label="" prop="academicYear">
+          <el-select v-model="queryParams.academicYear" style="width:150px">
+            <el-option
+              v-for="dict in optionList"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="category">
+          <div class="table-top-button-box">
+            <div>
+              <p @click="queryParams.category = 'EXAMED'" :class="queryParams.category == 'EXAMED'?'check-table-button':''">已考人员</p>
+              <p @click="queryParams.category = 'NOT_EXAMED'" :class="queryParams.category == 'NOT_EXAMED'?'check-table-button':''">未考人员</p>
+            </div>
+          </div>
+        </el-form-item>
+        <el-form-item label="" prop="personType">
+          <div class="table-top-button-box-1">
+            <div>
+              <p @click="queryParams.personType = ''" :class="queryParams.personType == ''?'check-table-button':''">全部</p>
+              <p @click="queryParams.personType = 3" :class="queryParams.personType == 3?'check-table-button':''">本科</p>
+              <p @click="queryParams.personType = 2" :class="queryParams.personType == 2?'check-table-button':''">硕士研究生</p>
+              <p @click="queryParams.personType = 4" :class="queryParams.personType == 4?'check-table-button':''">博士研究生</p>
+              <p @click="queryParams.personType = 1" :class="queryParams.personType == 1?'check-table-button':''">教职工</p>
+            </div>
+          </div>
+        </el-form-item>
+        <el-form-item label="" prop="deptId">
+          <el-select v-if="adminType == 1"
+                     filterable
+                     v-model="queryParams.deptId"
+                     placeholder="学院"
+                     style="width: 140px">
+            <el-option
+              v-for="dict in optionListA"
+              :key="dict.deptId"
+              :label="dict.deptName"
+              :value="dict.deptId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="levelIdClassifyTypeId" v-if="examTypeCode == 'CLASSIFIED'">
+          <el-cascader
+            v-model="queryParams.levelIdClassifyTypeId"
+            placeholder="分级分类"
+            :options="optionListC"
+            :props="{ checkStrictly: true,expandTrigger: 'hover' }"
+            style="width: 140px"
+          ></el-cascader>
+        </el-form-item>
+        <el-form-item label="" prop="examResult" v-if="examTypeCode == 'CLASSIFIED'">
+          <el-select
+            v-model="queryParams.examResult"
+            placeholder="违规类型"
+            style="width: 120px">
+            <el-option key="1" label="负面清单" value="1"/>
+            <el-option key="0" label="黑名单" value="0"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="examResult">
+          <el-select
+            v-model="queryParams.examResult"
+            placeholder="考试结果"
+            style="width: 120px">
+            <el-option key="1" label="已通过" value="1"/>
+            <el-option key="0" label="未通过" value="0"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="makeupResult">
+          <el-select
+            v-model="queryParams.makeupResult"
+            placeholder="补考结果"
+            style="width: 120px">
+            <el-option key="1" label="已通过" value="1"/>
+            <el-option key="0" label="未通过" value="0"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="account">
+          <el-input
+            maxLength="30"
+            v-model="queryParams.account"
+            placeholder="搜索姓名/学工号"
+            style="width: 140px"
+          />
+        </el-form-item>
+        <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+        <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+        <el-form-item>
+          <export-component :exportConfig="exportConfig" style="margin-left:10px;"></export-component>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="page-content-box">
+      <el-table class="table-box"  border :data="dataList"
+                @selection-change="handleSelectionChange" :row-key="getRowKeys">
+        <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
+        <el-table-column label="姓名" prop="userName"  show-overflow-tooltip/>
+        <el-table-column label="学工号" prop="account" width="140" show-overflow-tooltip/>
+        <el-table-column label="学院" prop="deptName" width="240" show-overflow-tooltip/>
+        <!--<el-table-column label="用户类别" prop="deptName" width="160" show-overflow-tooltip/>-->
+        <el-table-column label="考试类型" prop="examTypeName" width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span v-if="scope.row.examTypeCode=='CLASSIFIED'">{{scope.row.levelName}}-{{scope.row.classifyTypeName}}</span>
+            <span v-else>{{scope.row.examTypeName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="学习情况" prop="learningStatus" width="160" show-overflow-tooltip/>
+        <el-table-column label="考试成绩" prop="examScore" width="160" show-overflow-tooltip>
+          <template slot-scope="scope">{{scope.row.examScore?scope.row.examScore:'-'}}</template>
+        </el-table-column>
+        <el-table-column label="考试结果" prop="examResult" width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span :class="scope.row.examResult == 0 ?'':(scope.row.examResult == 1 ?'colorA':(scope.row.examResult == 2 ?'colorB':''))">
+              {{scope.row.examResult == 0 ?'-':(scope.row.examResult == 1 ?'通过':(scope.row.examResult == 2 ?'未通过':''))}}
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="补考成绩" prop="makeupScore" width="160" show-overflow-tooltip>
+          <template slot-scope="scope">{{scope.row.makeupScore?scope.row.makeupScore:'-'}}</template>
+        </el-table-column>
+        <el-table-column label="补考结果" prop="makeupResult" width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span :class="scope.row.makeupResult == 0 ?'':(scope.row.makeupResult == 1 ?'colorA':(scope.row.makeupResult == 2 ?'colorB':''))">
+              {{scope.row.makeupResult == 0 ?'-':(scope.row.makeupResult == 1 ?'通过':(scope.row.makeupResult == 2 ?'未通过':''))}}
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="安全承诺书" prop="demo" width="140" show-overflow-tooltip/>
+        <el-table-column label="操作" width="140" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p"
+                 @click="lockExam(scope.row)"
+              >查看答卷</p>
+              <p class="table-button-null"></p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+                  v-show="total>0"
+                  :total="total"
+                  :page.sync="queryParams.page"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="getList"
+      />
+    </div>
+    <el-drawer
+      size="100%"
+      custom-class="viewGrades-addPage-drawer"
+      :append-to-body="true"
+      :title="drawerTitle"
+      ref="drawer"
+      :visible.sync="drawer"
+      direction="rtl">
+      <examDetails v-if="drawer" :examDetailsPropsData="examDetailsPropsData"></examDetails>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+  import {
+    laboratoryClassTypeGetList,laboratoryLevelConfigGetLevelTitleList,
+  } from "@/api/commonality/permission";
+  import {
+    examElExamTypeList,systemDeptCurrentDept,examElStatisticsGetAcademicYear,examElStatisticsExamGroupedChartDetail,
+  } from "@/api/safetyEducationExaminationNew/index";
+  import exportComponent from "@/views/safetyEducationExaminationNew/dataStatistics/components/exportComponent/exportComponent.vue";
+  import examDetails from '@/views/safetyEducationExaminationNew/components/examDetails.vue'
+  export default {
+    name: 'addPage',
+    components: {
+      exportComponent,
+      examDetails,
+    },
+    props: {
+      drawerPropsData: {}
+    },
+    data() {
+      return {
+        exportConfig:{
+          api:'/exam/elStatistics/exam/grouped/chart-detail-export',
+          userIds:'',
+          fileName:'数据报表-人员明细',
+          customKey:null,
+          customValue:null,
+          allData:{},
+          screenData:{},
+          type:1,
+        },
+        adminType:0,
+        optionList:[],
+        optionListA:[],
+        optionListB:[],
+        optionListC:[],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          academicYear:'',
+          category:'EXAMED',
+          personType:'',
+          deptId:'',
+          levelIdClassifyTypeId:[],
+          account:'',
+          examResult:'',
+          makeupResult:'',
+        },
+        examTypeCode:'',
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //弹窗相关
+        drawerTitle: '',
+        drawerType: '',
+        drawer: false,
+        examDetailsPropsData:{},
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      this.initialize()
+    },
+    methods: {
+      // 初始化
+      initialize() {
+        this.$set(this,'adminType',this.drawerPropsData.adminType);
+        this.$set(this,'examTypeCode',this.drawerPropsData.examTypeCode);
+        // this.$set(this.queryParams,'academicYear',this.drawerPropsData.valueYear);
+        // this.$set(this.queryParams,'personType',this.drawerPropsData.personType);
+        // this.$set(this.queryParams,'deptId',this.drawerPropsData.deptId);
+        this.examElExamTypeList();
+        this.systemDeptCurrentDept();
+        this.laboratoryLevelConfigGetLevelTitleList();
+        this.examElStatisticsGetAcademicYear();
+        this.getList();
+      },
+      //查看答卷
+      lockExam(row){
+        this.$set(this, 'drawerTitle', '试卷详情')
+        this.$set(this, 'drawerType', 2)
+        this.$set(this, 'drawer', true)
+        let obj = {
+          attemptId:row.attemptId,
+          showType:true,
+        }
+        this.$set(this,'examDetailsPropsData',obj);//attemptId
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.$set(this.exportConfig,'userIds',selection.map(item => item.userId));
+      },
+      getRowKeys(row) {
+        return row.userId
+      },
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          // academicYear:this.drawerPropsData.valueYear,
+          category:'EXAMED',
+          // personType:this.drawerPropsData.personType,
+          // deptId:this.drawerPropsData.deptId,
+          levelIdClassifyTypeId:[],
+          account:'',
+          examResult:'',
+          makeupResult:'',
+        });
+        this.getList();
+      },
+      getList(){
+        let obj = {
+          page:this.queryParams.page,
+          pageSize:this.queryParams.pageSize,
+          academicYear:this.queryParams.academicYear,
+          category:this.queryParams.category,
+          personType:this.queryParams.personType,
+          account:this.queryParams.account,
+          examResult:this.queryParams.examResult,
+          makeupResult:this.queryParams.makeupResult,
+        }
+        if(this.queryParams.levelIdClassifyTypeId[0]){
+          obj.levelId = this.queryParams.levelIdClassifyTypeId[0];
+        }
+        if(this.queryParams.levelIdClassifyTypeId[1]){
+          obj.classifyTypeId = this.queryParams.levelIdClassifyTypeId[1];
+        }
+        if(this.adminType == 1){
+          obj.deptId = this.queryParams.deptId;
+        }else{
+          obj.deptId = localStorage.getItem('deptId');
+        }
+        this.setExportConfig();
+        examElStatisticsExamGroupedChartDetail(obj).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        })
+      },
+      setExportConfig(){
+        //全部条件
+        this.exportConfig.allData = {
+          academicYear:this.queryParams.academicYear,
+          deptId:this.adminType == 1?this.queryParams.deptId:localStorage.getItem('deptId'),
+        };
+        //筛选条件
+        this.exportConfig.screenData = {
+          academicYear:this.queryParams.academicYear,
+          category:this.queryParams.category,
+          personType:this.queryParams.personType,
+          account:this.queryParams.account,
+          examResult:this.queryParams.examResult,
+          makeupResult:this.queryParams.makeupResult,
+        };
+        if(this.queryParams.levelIdClassifyTypeId[0]){
+          this.exportConfig.screenData.levelId = this.queryParams.levelIdClassifyTypeId[0];
+        }
+        if(this.queryParams.levelIdClassifyTypeId[1]){
+          this.exportConfig.screenData.classifyTypeId = this.queryParams.levelIdClassifyTypeId[1];
+        }
+        if(this.adminType == 1){
+          this.exportConfig.screenData.deptId = this.queryParams.deptId;
+        }else{
+          this.exportConfig.screenData.deptId = localStorage.getItem('deptId');
+        }
+      },
+      //查询全部考试类型
+      examElExamTypeList(){
+        examElExamTypeList({}).then(response => {
+          let list = [];
+          for(let i=0;i<response.data.length;i++){
+            if(response.data[i].examTypeCode == 'CLASSIFIED' || response.data[i].examTypeCode == 'yzyh' || response.data[i].examTypeCode == 'STUDENT'){
+              list.push(response.data[i]);
+            }
+          }
+          this.$set(this,'optionListB',list);
+        });
+      },
+      //学院列表
+      systemDeptCurrentDept(){
+        systemDeptCurrentDept({}).then(response => {
+          const list = response.data || [];
+          this.formatTreeData(list);
+          if(list[0]){
+            this.$set(this,'optionListA',list[0].child);
+            this.optionListA.unshift({ deptName:'全部学院', deptId:'' })
+          }else{
+            this.$set(this,'optionListA',[]);
+          }
+        });
+      },
+      //学院列表
+      laboratoryLevelConfigGetLevelTitleList(){
+        laboratoryLevelConfigGetLevelTitleList({}).then(responseA => {
+          laboratoryClassTypeGetList({}).then(responseB => {
+            let list = []
+            for(let i=0;i<responseA.data.length;i++){
+              let obj = {
+                value:responseA.data[i].levelId,
+                label:responseA.data[i].titleName,
+                children:[],
+              }
+              for(let o=0;o<responseB.data.length;o++){
+                obj.children.push({
+                  value:responseB.data[o].typeId,
+                  label:responseB.data[o].typeName,
+                })
+              }
+              list.push(obj)
+            }
+            this.$set(this,'optionListC',list);
+          });
+        });
+      },
+      //学年列表
+      examElStatisticsGetAcademicYear(){
+        examElStatisticsGetAcademicYear({}).then(response => {
+          this.$set(this,'optionList',response.data);
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .dataReportUserListPage-addPage {
+    height:100%;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    .page-form-title-box {
+      /* 分组筛选按钮 */
+      .table-top-button-box {
+        display: inline-block;
+        vertical-align: top;
+        div {
+          display: flex;
+          p {
+            border: 1px solid #DCDFE6;
+            width: 80px;
+            text-align: center;
+            height: 40px;
+            line-height: 40px;
+            cursor: pointer;
+            font-size: 14px;
+            &:nth-child(1) { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
+            &:nth-child(2) { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
+          }
+          .check-table-button{
+            border: 1px solid #0183fa!important;
+            background-color: #0183fa!important;;
+            color:#fff!important;;
+          }
+        }
+      }
+      .table-top-button-box-1 {
+        display: inline-block;
+        vertical-align: top;
+        div {
+          display: flex;
+          p {
+            border: 1px solid #DCDFE6;
+            padding:0 20px;
+            /*width: 80px;*/
+            text-align: center;
+            height: 40px;
+            line-height: 40px;
+            cursor: pointer;
+            font-size: 14px;
+            &:nth-child(1) { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
+            &:nth-child(2) { border-left: none; border-right: none; }
+            &:nth-child(3) { border-right: none; }
+            &:nth-child(4) { border-right: none; }
+            &:nth-child(5) { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
+          }
+          .check-table-button{
+            border: 1px solid #0183fa!important;
+            background-color: #0183fa!important;;
+            color:#fff!important;;
+          }
+        }
+      }
+    }
+    .page-content-box{
+      .colorA{
+        display: inline-block;
+        text-align: center;
+        width:60px;
+        border-radius:4px;
+        color:#28a47c;
+        background-color:#e9f8f1;
+      }
+      .colorB{
+        display: inline-block;
+        text-align: center;
+        width:60px;
+        border-radius:4px;
+        color:#df555f;
+        background-color:#fff0f1;
+      }
+      .colorC{
+        display: inline-block;
+        text-align: center;
+        width:60px;
+        border-radius:4px;
+        color:#999;
+        background-color:#dedede;
+      }
+    }
+  }
+</style>