| 
					
				 | 
			
			
				@@ -29,7 +29,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <!-- 表格 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <CommonTable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       name="教师列表" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :min-height="554" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -41,6 +41,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       @current-change="changePage($event, queryOrgTeacherUserList)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       @size-change="changePageSize($event, queryOrgTeacherUserList)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <template #button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-button type="primary" class="table-button" @click="visible = true">批量注册</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table :data="list"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-table-column prop="user_name" label="用户名" width="180" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-table-column prop="user_real_name" label="姓名" width="180" /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -96,6 +100,19 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </CommonTable> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <BatchRegistration :visible.sync="visible" type="teacher" @batchRegister="batchRegister" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <ExecutiveReport 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :visible.sync="visible_executive" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :success-count="successCount" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :error-count="errorCount" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :execute-report-file-url="executeReportFileUrl" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :is-interrupt="isInterrupt" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div v-show="loading" class="loading"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-progress type="circle" :percentage="percentage" :width="200" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -109,12 +126,16 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { ref } from 'vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { pageQueryOrgTeacherUserList } from '@/api/list'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { auditOrgTeacherUser, getPopedomList_OrgTeacherUse, setPopedom_OrgTeacherUser } from '@/api/teacher'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { StartBatchRegisterTeacher, GetBatchRegisterTaskProgress } from '@/api/user'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { useList } from '@/utils/list'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { Message } from 'element-ui'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import DateSearch from '@/components/common/DateSearch.vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import CommonTable from '@/components/common/CommonTable.vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import BatchRegistration from '../../components/common/BatchRegistration.vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import ExecutiveReport from '../../components/common/ExecutiveReport.vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 审核状态列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const auditedList = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     value: '', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -192,6 +213,75 @@ function setPopedom(user_org_id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     Message.success('设置教师权限成功'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 批量导入 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let visible = ref(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let visible_executive = ref(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let loading = ref(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let percentage = ref(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let timer = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let successCount = ref(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let errorCount = ref(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let executeReportFileUrl = ref(''); // 报告文件URL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let isInterrupt = ref(false); // 任务是否中断 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function getBatchRegisterProgress(batch_register_task_id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  GetBatchRegisterTaskProgress({ batch_register_task_id }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .then( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        is_exist_task, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        is_finish, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        is_interrupt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        progress_percent, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        success_count, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        error_count, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        execute_report_file_url 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        successCount.value = parseInt(success_count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        errorCount.value = parseInt(error_count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        executeReportFileUrl.value = execute_report_file_url; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (is_exist_task === 'false') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          loading.value = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          Message.warning('不存在这个批量注册任务'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return clearTimeout(timer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (is_interrupt === 'true') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          isInterrupt.value = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          loading.value = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          visible_executive.value = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        percentage.value = parseInt(progress_percent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (is_finish === 'true') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          loading.value = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          clearTimeout(timer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          visible_executive.value = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .then(is_continue => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!is_continue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return queryOrgTeacherUserList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      timer = setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        getBatchRegisterProgress(batch_register_task_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .catch(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      timer = setTimeout(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        getBatchRegisterProgress(batch_register_task_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function batchRegister(file_id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  visible.value = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  StartBatchRegisterTeacher({ file_id }).then(({ batch_register_teacher_task_id }) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    loading.value = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getBatchRegisterProgress(batch_register_teacher_task_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <style lang="scss" scoped> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -221,6 +311,11 @@ function setPopedom(user_org_id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .table-button { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    background-color: #0085ff; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    border-color: #0085ff; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   .el-table { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .el-link { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       padding: 2px 8px; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -232,6 +327,23 @@ function setPopedom(user_org_id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .loading { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    position: fixed; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    top: 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    left: 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    z-index: 3; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    width: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    height: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    background-color: #fff; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    opacity: 0.8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .el-progress { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      position: absolute; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      top: calc(50% - 100px); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      left: calc(50% - 100px); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 权限管理 
			 |