소스 검색

Merge branch 'beta' into HK

lsc 1 년 전
부모
커밋
e78552f54f
83개의 변경된 파일13134개의 추가작업 그리고 1312개의 파일을 삭제
  1. 4 0
      dist/index.html
  2. 0 0
      dist/static/css/app.e2da8f1b06ea3d8640484cbb3042ce07.css
  3. 0 0
      dist/static/css/app.e2da8f1b06ea3d8640484cbb3042ce07.css.map
  4. BIN
      dist/static/img/data_title2.9f3a612.png
  5. BIN
      dist/static/img/inviteLoginSZBG.d335a60.png
  6. BIN
      dist/static/img/inviteLoginSZImage.71812e5.png
  7. 1 0
      dist/static/js/app.02708450765739705ad4.js
  8. 1 0
      dist/static/js/app.02708450765739705ad4.js.map
  9. 1 0
      dist/static/js/app.f51c0a57f25365f22712.js
  10. 0 0
      dist/static/js/app.f51c0a57f25365f22712.js.map
  11. 0 0
      dist/static/js/manifest.6c4ea0d95d82bb3e7d94.js.map
  12. 24 1
      src/assets/css/button.css
  13. BIN
      src/assets/icon/sourceFile/icon_no_active.png
  14. BIN
      src/assets/icon/test/data_title2.png
  15. BIN
      src/assets/icon/test/icon_course.png
  16. BIN
      src/assets/icon/test/icon_course_check.png
  17. BIN
      src/assets/icon/test/test_setting_icon.png
  18. BIN
      src/assets/icon/test/test_table_arrow.png
  19. BIN
      src/assets/icon/test/type_course_icon.png
  20. BIN
      src/assets/icon/test/type_eva_icon.png
  21. BIN
      src/assets/inviteLoginSZBG.png
  22. BIN
      src/assets/inviteLoginSZImage.png
  23. 5 2
      src/components/pages/addCourse.vue
  24. 3 0
      src/components/pages/dataBoardTest/course/index.vue
  25. 3 0
      src/components/pages/easy/addCourse.vue
  26. 49 5
      src/components/pages/interVideo/index.vue
  27. 1 1
      src/components/pages/inviteLogin/inviteLogin.vue
  28. 460 0
      src/components/pages/inviteLoginSZ/inviteLogin.vue
  29. 4 5
      src/components/pages/kindStudentEva/test/component/popbox.vue
  30. 19 3
      src/components/pages/kindStudentEva/test/diary.vue
  31. 72 26
      src/components/pages/library.vue
  32. 23 4
      src/components/pages/library/fileBox.vue
  33. 14 2
      src/components/pages/student.vue
  34. 5 5
      src/components/pages/studentEva.vue
  35. 14 2
      src/components/pages/studentManage/student.vue
  36. 179 0
      src/components/pages/sz/dataBoardArea/dataCenter/chartList/courseNum/index.vue
  37. 126 0
      src/components/pages/sz/dataBoardArea/dataCenter/chartList/courseRank/index.vue
  38. 167 0
      src/components/pages/sz/dataBoardArea/dataCenter/chartList/loginTime/index.vue
  39. 112 0
      src/components/pages/sz/dataBoardArea/dataCenter/chartList/schoolRank/index.vue
  40. 140 0
      src/components/pages/sz/dataBoardArea/dataCenter/chartList/teaFre/index.vue
  41. 215 0
      src/components/pages/sz/dataBoardArea/dataCenter/chartList/toolUser/index.vue
  42. 1319 0
      src/components/pages/sz/dataBoardArea/dataCenter/index.vue
  43. 118 0
      src/components/pages/sz/dataBoardArea/index.vue
  44. 179 0
      src/components/pages/sz/dataBoardCity/dataCenter/chartList/courseNum/index.vue
  45. 126 0
      src/components/pages/sz/dataBoardCity/dataCenter/chartList/courseRank/index.vue
  46. 167 0
      src/components/pages/sz/dataBoardCity/dataCenter/chartList/loginTime/index.vue
  47. 112 0
      src/components/pages/sz/dataBoardCity/dataCenter/chartList/schoolRank/index.vue
  48. 140 0
      src/components/pages/sz/dataBoardCity/dataCenter/chartList/teaFre/index.vue
  49. 215 0
      src/components/pages/sz/dataBoardCity/dataCenter/chartList/toolUser/index.vue
  50. 1336 0
      src/components/pages/sz/dataBoardCity/dataCenter/index.vue
  51. 118 0
      src/components/pages/sz/dataBoardCity/index.vue
  52. 1166 0
      src/components/pages/sz/teacher.vue
  53. 3 0
      src/components/pages/task/addCourse.vue
  54. 2 2
      src/components/pages/teacherOffice/index.vue
  55. 45 2
      src/components/pages/test/add/components/checkOrder.vue
  56. 99 0
      src/components/pages/test/add/components/course/course.vue
  57. 112 0
      src/components/pages/test/add/components/course/courseDilog.vue
  58. 2009 0
      src/components/pages/test/add/components/course/courseIndex.vue
  59. 312 0
      src/components/pages/test/add/components/course/index.vue
  60. 98 0
      src/components/pages/test/add/components/evaBox/eva.vue
  61. 224 0
      src/components/pages/test/add/components/evaBox/index.vue
  62. 1 3
      src/components/pages/test/add/components/file/file.vue
  63. 1 1
      src/components/pages/test/add/components/file/index.vue
  64. 205 0
      src/components/pages/test/add/edit/check/course.vue
  65. 132 0
      src/components/pages/test/add/edit/check/eva.vue
  66. 115 18
      src/components/pages/test/add/edit/check/file.vue
  67. 42 14
      src/components/pages/test/add/edit/check/index.vue
  68. 72 0
      src/components/pages/test/add/edit/edit/index.vue
  69. 17 1
      src/components/pages/test/add/minxins/minxin.js
  70. 50 0
      src/components/pages/test/add/setInfo/manualCreated.vue
  71. 568 39
      src/components/pages/test/check/index.vue
  72. 18 679
      src/components/pages/test/file/checkfile.vue
  73. 765 0
      src/components/pages/test/file/checkfileJiu.vue
  74. 1 0
      src/components/pages/testPerson/index.vue
  75. 427 226
      src/components/pages/testPerson/test/test.vue
  76. 41 17
      src/components/pages/testStudent/view/component/choice.vue
  77. 287 0
      src/components/pages/testStudent/view/component/course.vue
  78. 141 0
      src/components/pages/testStudent/view/component/eva.vue
  79. 309 179
      src/components/pages/testStudent/view/component/file.vue
  80. 9 0
      src/components/pages/testStudent/view/component/gap.vue
  81. 96 28
      src/components/pages/testStudent/view/component/topic.vue
  82. 256 46
      src/components/pages/testStudent/view/preview.vue
  83. 39 1
      src/router/index.js

+ 4 - 0
dist/index.html

@@ -32,7 +32,11 @@
       width: 100%;
       background: #e6eaf0;
       font-family: 'Source Han Sans SC', sans-serif;
+<<<<<<< HEAD
     }</style><link href=./static/css/app.e74d69fe448f7c0eee874a03521b4514.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.6c4ea0d95d82bb3e7d94.js></script><script type=text/javascript src=./static/js/vendor.93ba4551d1edf2170f7e.js></script><script type=text/javascript src=./static/js/app.f51c0a57f25365f22712.js></script></body></html><script>function stopSafari() {
+=======
+    }</style><link href=./static/css/app.e2da8f1b06ea3d8640484cbb3042ce07.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.11d8a4dfbebdec332b5f.js></script><script type=text/javascript src=./static/js/app.02708450765739705ad4.js></script></body></html><script>function stopSafari() {
+>>>>>>> beta
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.e2da8f1b06ea3d8640484cbb3042ce07.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.e2da8f1b06ea3d8640484cbb3042ce07.css.map


BIN
dist/static/img/data_title2.9f3a612.png


BIN
dist/static/img/inviteLoginSZBG.d335a60.png


BIN
dist/static/img/inviteLoginSZImage.71812e5.png


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
dist/static/js/app.02708450765739705ad4.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
dist/static/js/app.02708450765739705ad4.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
dist/static/js/app.f51c0a57f25365f22712.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.f51c0a57f25365f22712.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/manifest.6c4ea0d95d82bb3e7d94.js.map


+ 24 - 1
src/assets/css/button.css

@@ -279,6 +279,8 @@
 .pub_test_btn_choose::before,
 .pub_test_btn_page::before,
 .pub_test_btn_group::before,
+.pub_test_btn_course::before,
+.pub_test_btn_eva::before,
 .pub_test_btn_file::before {
   content: "";
   width: 18px;
@@ -306,6 +308,12 @@
 .pub_test_btn_group::before {
   background-image: url(../icon/test/type_group_icon.png);
 }
+.pub_test_btn_course::before {
+  background-image: url(../icon/test/type_course_icon.png);
+}
+.pub_test_btn_eva::before {
+  background-image: url(../icon/test/type_eva_icon.png);
+}
 
 .test_icon{
   display: inline-block;
@@ -330,7 +338,12 @@
 .test_icon_file{
   background-image: url('../icon/test/type_file_icon.png');
 }
-
+.test_course_file{
+  background-image: url('../icon/test/type_course_icon.png');
+}
+.test_eva_file{
+  background-image: url('../icon/test/type_eva_icon.png');
+}
 
 
 .dataBoard_check_box {
@@ -445,4 +458,14 @@
 
 .dataBoard_check_box>.active.bz_icon::before {
   background-image: url('../icon/dataCheck/bz_icon_data_active.png');
+}
+
+.el-table__column-filter-trigger i{
+  background-image: url('../icon/test/test_table_arrow.png');
+  background-size: 100% 100%;
+  width: 15px;
+  height: 15px;
+}
+.el-table__column-filter-trigger i::before{
+  content: '';
 }

BIN
src/assets/icon/sourceFile/icon_no_active.png


BIN
src/assets/icon/test/data_title2.png


BIN
src/assets/icon/test/icon_course.png


BIN
src/assets/icon/test/icon_course_check.png


BIN
src/assets/icon/test/test_setting_icon.png


BIN
src/assets/icon/test/test_table_arrow.png


BIN
src/assets/icon/test/type_course_icon.png


BIN
src/assets/icon/test/type_eva_icon.png


BIN
src/assets/inviteLoginSZBG.png


BIN
src/assets/inviteLoginSZImage.png


+ 5 - 2
src/components/pages/addCourse.vue

@@ -5354,8 +5354,8 @@
               >
                 <span>{{ item.name ? item.name : "暂无姓名" }}</span>
               </el-tooltip>
-              <el-tooltip placement="top" :content="item.username">
-                <span>{{ item.username }}</span>
+              <el-tooltip placement="top" :content="item.username.split('@')[0]">
+                <span>{{ item.username.split('@')[0] }}</span>
               </el-tooltip>
               <el-tooltip placement="top" :content="item.school">
                 <span>{{ item.school }}</span>
@@ -12257,6 +12257,9 @@ export default {
     },
     selectCourseDetail() {
       if (this.cid == "" || this.cid == undefined) {
+        if(this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5'){
+          this.isTeacherSee = true;
+        }
         console.log("这是新增课程");
         this.selectAllType();
       } else {

+ 3 - 0
src/components/pages/dataBoardTest/course/index.vue

@@ -374,6 +374,9 @@ export default {
       }
       for (var i = 0; i < shejiArray.length; i++) {
         let shejiJson = JSON.parse(shejiArray[i].courseJson)
+        if(shejiJson[0] && shejiJson[0].array){
+          shejiJson = shejiJson[0].array
+        }
         let xuanTime = shejiJson[1].json.answer2
         let xuanXuan = shejiJson[2].json.answer2
         for (var j = 0; j < xuanTime.length; j++) {

+ 3 - 0
src/components/pages/easy/addCourse.vue

@@ -8706,6 +8706,9 @@ export default {
     },
     selectCourseDetail() {
       if (this.cid == "" || this.cid == undefined) {
+        if(this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5'){
+          this.isTeacherSee = true;
+        }
         console.log("这是新增课程");
         this.selectAllType();
       } else {

+ 49 - 5
src/components/pages/interVideo/index.vue

@@ -18,12 +18,19 @@
                     <div class="content" v-else>请上传视频</div>
                 </div>
                 <div class="settingBox" v-if="this.json.video">
+										<div class="settingName">
+											<span class="title">视频名称</span>
+											<el-input class="settingInput" v-model="json.name" @input="changeVideoName"></el-input>
+										</div>
                     <div class="settingBtn">
                         <span class="title">交互设置</span>
-                        <el-button type="primary" size="small" @click="addSetting">添加</el-button>
+                        <el-button type="primary" size="small" @click="addSetting">添加hiding</el-button>
                     </div>
                     <div class="settingContent">
-                        <div class="setting_b" v-for="(item, index) in json.setting" :key="index">
+                        <div class="setting_b" v-for="(item, index) in json.setting">
+														<!-- <div class="time_box">
+                                <span>序号:{{ index+1 }}</span>
+                            </div> -->
                             <div class="time_box">
                                 <span>触发时间:</span>
                                 <el-input-number v-model="item.time" :controls="false" :min="1" placeholder="视频第几秒"
@@ -31,8 +38,10 @@
                             </div>
                             <div class="setting_fool">
                                 <span>工具设置:</span>
-                                <el-button type="primary" size="mini" @click="setting(index)">{{ item.tool.tool ? "已设置" :
-                                    "插入工具" }}</el-button><el-button type="text" size="mini" @click="deleteSetting(index)" style="color:#818181">删除</el-button>
+                                <el-button type="primary" size="mini" @click="setting(index)">{{ item.tool.tool ? "已设置" : "插入工具" }}</el-button>
+																<!-- <el-button type="primary" size="mini">上移</el-button>
+																<el-button type="primary" size="mini">下移</el-button> -->
+																<el-button type="text" size="mini" @click="deleteSetting(index)" style="color:#818181">删除</el-button>
                             </div>
                             <!-- <div>
                                 <el-button type="primary" size="mini" @click="deleteSetting(index)">删除</el-button>
@@ -139,6 +148,10 @@ export default {
             this.$emit("update:dialogVisibleVideo", false)
         },
         addV() {
+						if(!this.json.name){
+							this.$message.error("请输入视频名称");
+							return;
+						}
             if (!this.json.video) {
                 this.$message.error("请上传视频")
                 return;
@@ -204,12 +217,20 @@ export default {
         changeTime(time, index) {
             if (time > this.videoTime) {
                 this.$message.error("设置时间不能大于视频播放时长")
-                this.$nextTick(() => {
+                return this.$nextTick(() => {
                     this.json.setting[index].time = 1
                     this.$forceUpdate();
                 })
             }
+						// 排序
+						this.json.setting.sort((a, b) => {
+						  return a.time - b.time;
+						})
+						this.$forceUpdate();
         },
+				changeVideoName(e){
+					this.$forceUpdate();
+				},
         addSetting() {
             this.json.setting.push({
                 time: "",
@@ -218,6 +239,11 @@ export default {
                     toolJson: {}
                 }
             })
+						// 排序
+						this.json.setting.sort((a, b) => {
+						  return a.time - b.time;
+						})
+						this.$forceUpdate();
         },
         deleteSetting(index) {
             this
@@ -308,7 +334,9 @@ export default {
                         if (err) {
                             _this.$message.error("上传失败");
                         } else {
+													
                             _this.json.video = data.Location;
+														_this.json.name = data.key;//视频名称
                             _this.playerO = JSON.parse(JSON.stringify(_this.playerOptions));
                             _this.playerO.sources[0].src = data.Location
                             _this.$nextTick(() => {
@@ -398,6 +426,22 @@ export default {
     margin-top: 20px;
 }
 
+.settingName{
+	display: flex;
+	align-items: center;
+	margin-bottom: 10px;
+}
+
+.settingName>.title{
+	font-size: 22px;
+	margin-right: 10px;
+	color:#222;
+}
+
+.settingName>.settingInput{
+	width: 90%;
+}
+
 .settingBtn {
     display: flex;
     align-items: center;

+ 1 - 1
src/components/pages/inviteLogin/inviteLogin.vue

@@ -189,7 +189,7 @@ export default {
     padding: 0 5px;
     overflow: hidden;
     background: rgb(225, 237, 255);
-    margin: 10px 9px 0;
+    margin: 10px 8px 0;
     color: rgb(37 124 255);
     border-radius: 5px;
     box-sizing: border-box;

+ 460 - 0
src/components/pages/inviteLoginSZ/inviteLogin.vue

@@ -0,0 +1,460 @@
+<template>
+    <div class="container" v-loading="loading">
+        <!-- <div class="i_box" v-if="steps == 1">
+            <div class="i_box_top">
+                <div><span>请输入随机码进入项目课程</span></div>
+                <div><span>账号登陆</span></div>
+                <img src="../../../assets/icon/inviteLogin/password.png" alt="">
+            </div>
+            <div class="i_box_login">
+                <el-input v-model="icode" placeholder="请输入随机码" class="input"></el-input>
+                <div @click="nextSteps" class="button">确 定</div>
+            </div>
+        </div>
+        <div class="i_box" v-if="steps == 2">
+            <div class="i_box_top">
+                <div><span>{{ res.school }}</span></div>
+                <div><span>欢迎回来!</span></div>
+                <img src="../../../assets/icon/inviteLogin/school.png" style="bottom: -40px;" alt="">
+            </div>
+            <div class="i_box_login2">
+                <div v-for="item in classJuri" @click="login(item.userid,(item.name ? item.name : item.username))" :key="item.userid">{{ item.name ? item.name :
+                    item.username }}</div>
+                <div v-if="!classJuri.length" class="none">此班级暂无学生</div>
+                <el-select v-model="userid" placeholder="选择姓名" filterable class="select">
+                    <el-option v-for="item in classJuri" :key="item.userid" :label="item.name ? item.name : item.username"
+                        :value="item.userid">
+                    </el-option>
+                </el-select>
+
+                <div @click="login" class="button">登 录</div>
+            </div>
+        </div> -->
+				<div class="c-box">
+					<div class="c-b-left"></div>
+					<div class="c-b-right">
+						<div class="c-b-r-closeArea" v-if="steps == 2" @click.stop="steps = 1">
+							<span class="el-icon-back c-b-r-ca-btn"></span>
+						</div>
+						<div class="c-b-r-main" v-if="steps == 1">
+							<div class="c-b-r-m-title">欢迎登录!</div>
+
+							<div class="c-b-r-m-form">
+								<div class="c-b-r-m-f-label">课程识别码</div>
+								<div class="c-b-r-m-f-input">
+									<el-input v-model="icode" placeholder="请输入课程识别码"  append="这是个测试" :class="[showErrMsg?'showErrMsg':'']"></el-input>
+									<div class="c-b-r-m-f-i-errMsg" v-if="showErrMsg">
+										<span class="el-icon-warning-outline"></span>
+										{{ errMsg }}
+									</div>
+								</div>
+							</div>
+
+							<div :class="['c-b-r-m-btn',btnActive?'c-b-r-m-btnActive':'']" @click.stop="nextSteps">下一步</div>
+						
+						</div>
+						<div class="c-b-r-main" v-if="steps == 2">
+							<div class="c-b-r-m-title">请选择您的姓名</div>
+							<div class="c-b-r-m-chooseNameArea">
+								<!-- <div class="c-b-r-m-cna-none">此班级暂无学生</div> -->
+								<div v-if="!classJuri.length" class="c-b-r-m-cna-none">此班级暂无学生</div>
+								<div v-for="item in classJuri" :class="['c-b-r-m-cna-item',chooseData.userid==item.userid?'c-b-r-m-cna-itemActive':'']" @click="choose(item.userid,(item.name ? item.name : item.username))" :key="item.userid">{{ item.name ? item.name :item.username }}</div>
+							</div>
+							<el-button class="c-b-r-m-loginBtn" type="primary" v-if="classJuri.length" @click.stop="login(chooseData.userid,chooseData.username)">确认登录</el-button>
+						</div>
+					</div>
+				</div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            steps: 1,
+            icode: "",
+            userid: "",
+            options: [],
+            loading: false,
+            res: {},
+            classJuri: [],
+            code: this.$route.query.code,
+            courseId:"",
+						showErrMsg:false,
+						errMsg:"",
+						chooseData:{}
+        }
+    },
+		computed:{
+			btnActive(){
+				// return this.icode!='';
+				return /^\d+$/.test(this.icode);
+			},
+		},
+		watch:{
+			icode(newValue,oldValue){
+				this.showErrMsg = false;
+				this.errMsg = "";
+			}
+		},
+    methods: {
+        //       selectSnameByCid
+        nextSteps() {
+            // let reg = /^[A-Za-z0-9]{2,}$/
+            // let reg = /^[0-9]{2,}$/
+						if(!this.btnActive || this.showErrMsg)return;
+            let reg = /^\d+$/
+            if (!reg.test(this.icode)) {
+								this.setErrMsg("请正确填写识别码")
+                // this.$message.error("请正确填写随机码")
+                return;
+            }
+            let params = {
+                code: this.icode,
+                oid: this.code,
+								// oid:"16ace517-b5c7-4168-a9bb-a9e0035df840"
+								// oid:"0fec3a8a-ad04-11ed-b13d-005056b86db5" //测试
+            };
+            this.loading = true
+            this.ajax
+                // .get(this.$store.state.api + "selectCourseByIc2", params)
+								.get(this.$store.state.api + "selectCourseByIc2SZ", params)
+                .then(res => {
+                    this.loading = false;
+                    if (res.data.length && res.data[0].length) {
+                        this.res = res.data[0][0]
+                        this.courseId = res.data[0][0].courseId
+                        this.getClass(res.data[0][0].classid)
+                    } else {
+											this.setErrMsg("不存在此识别码")
+                        // this.$message.error("不存在此随机码")
+                    }
+                })
+                .catch(err => {
+                    console.error(err);
+                });
+        },
+        getClass(classId) {
+            let params = {
+                cid: classId,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectSnameByCid", params)
+                .then((res) => {
+                    this.classJuri = res.data[0];
+                    this.steps = 2
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        login(userid,username) {
+            let courseid = this.courseId
+            this.$confirm(`确定登录${username}的账号吗?`, "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            })
+                .then(() => {
+                    window.parent.postMessage(
+                        {
+                            tools: "inviteLogin",
+                            userid: userid,
+                            courseId: courseid
+                        },
+                        "*"
+                    );
+                })
+                .catch(() => { });
+
+        },
+				// 选择学生
+				choose(userid,username){
+					this.chooseData = {
+						userid: userid,
+						username: username
+					}
+				},
+				// 设置错误信息
+				setErrMsg(msg){
+					this.showErrMsg = true;
+					this.errMsg = msg;
+				}
+    },
+}
+</script>
+
+<style scoped>
+.container {
+    width: 100vw;
+    height: 100vh;
+    overflow: hidden;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		background: url("../../../assets/inviteLoginSZBG.png") no-repeat;
+		background-size: 100% 100%;
+		position: relative;
+}
+
+.c-box{
+	width: 75%;
+	height: 75%;
+	border-radius: 12px;
+	background-color: #4B88F5;
+	overflow: hidden;
+	display: flex;
+}
+
+.c-b-left{
+	flex: 1;
+	height: 100%;
+	background: url("../../../assets/inviteLoginSZImage.png") no-repeat;
+	background-size: cover;
+	background-position: center;
+}
+
+.c-b-right{
+	flex: 1;
+	height: 100%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	background-color: white;
+	position: relative;
+}
+
+.c-b-r-closeArea{
+	width: 120px;
+	height: 120px;
+	position: absolute;
+	right: -45px;
+	top: -45px;
+	border-radius: 50%;
+	background-color: #3681FC;
+	
+}
+
+.c-b-r-ca-btn{
+	position: absolute;
+	bottom: 30px;
+	left: 30px;
+	color: white;
+	cursor: pointer;
+	font-size: 1.5em;
+}
+
+.c-b-r-main{
+	width: 80%;
+	height: 80%;
+}
+
+.c-b-r-m-title{
+	font-size: 28px;
+	font-weight: bold;
+}
+
+.c-b-r-m-form{
+	width: 100%;
+	height: auto;
+	margin-top: 40px;
+}
+
+.c-b-r-m-f-label{
+	font-size: 14px;
+	font-weight: bold;
+	margin-bottom: 5px;
+}
+.c-b-r-m-f-input{
+	position: relative;
+}
+
+.c-b-r-m-f-input>>>.el-input__inner{
+	background-color: #F0F2F5 !important;
+	height: 52px;
+	border-radius: 6px;
+}
+.showErrMsg>>>.el-input__inner{
+  color: #EE3E3E !important;
+}
+
+.c-b-r-m-f-i-errMsg{
+	position: absolute;
+	right: 10px;
+	color: #EE3E3E;
+	font-size: 14px;
+	height: 100%;
+	display: flex;
+	align-items: center;
+	top: 0;
+}
+
+.el-icon-warning-outline>span{
+	margin-right: 10px !important;
+}
+
+.c-b-r-m-btn{
+	width: 92px;
+	height: 36px;
+	box-sizing: border-box;
+	border-radius: 6px;
+	border: solid 1px #C2D9FE;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	font-size: 20px;
+	color: #C2D9FE;
+	transition: .3s;
+	margin-top: 10px;
+	cursor:not-allowed;
+}
+
+.c-b-r-m-btnActive{
+	border-color: #68A1FD;
+	color: #68A1FD;
+	cursor: pointer;
+}
+
+.c-b-r-m-chooseNameArea{
+	width: 100%;
+	height: auto;
+	max-height: 300px;
+	margin-top: 20px;
+	display: flex;
+	flex-wrap: wrap;
+
+}
+
+.c-b-r-m-cna-none{
+	font-size: 20px;
+	margin-top: 30px;
+	font-weight: bold;
+}
+
+.c-b-r-m-cna-item{
+	width: auto;
+	padding: 4px 6px;
+	background-color: #F0F2F5;
+	color: #000000;
+	box-sizing: border-box;
+	border:solid 1px #E7E7E7;
+	border-radius: 3px;
+	font-size: 14px;
+	transition: .3s;
+	cursor: pointer;
+	margin-right: 10px;
+	margin-bottom: 10px;
+}
+
+.c-b-r-m-cna-itemActive{
+  background-color: #E0EAFB;
+	color:#3681FC;
+	border-color: #3681FC;
+	
+}
+
+
+.c-b-r-m-loginBtn{
+	width: 100%;
+	height: 56px;
+	font-size: 20px;
+	margin-top: 20px;
+}
+/* .i_box {
+    height: 100%;
+    width: 100%;
+}
+
+.i_box_top {
+    height: 145px;
+    width: 100%;
+    overflow: hidden;
+    position: relative;
+    background: #fff;
+    box-sizing: border-box;
+    padding: 20px;
+}
+
+.i_box_top>div:nth-child(1) {
+    color: rgb(147, 147, 147);
+}
+
+.i_box_top>div:nth-child(2) {
+    font-size: 28px;
+    color: rgb(78, 138, 218);
+    margin-top: 5px;
+}
+
+.i_box_top>img {
+    position: absolute;
+    right: 30px;
+    bottom: -60px;
+    width: 150px;
+}
+
+.i_box_login {
+    height: calc(100% - 145px);
+    width: 100%;
+    background: linear-gradient(90deg, #477cd7, #65b9fc);
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 50px 20px;
+    box-sizing: border-box;
+    align-content: flex-start;
+}
+
+.i_box_login2 {
+    height: calc(100% - 145px);
+    background: linear-gradient(90deg, #477cd7, #65b9fc);
+    width: 100%;
+    display: flex;
+    flex-wrap: wrap;
+    overflow: auto;
+    padding-bottom: 10px;
+    box-sizing: border-box;
+    align-content: flex-start;
+}
+
+.i_box_login2 div{
+    cursor: pointer;
+    width: 80px;
+    text-align: center;
+    height: 30px;
+    line-height: 30px;
+    padding: 0 5px;
+    overflow: hidden;
+    background: rgb(225, 237, 255);
+    margin: 10px 9px 0;
+    color: rgb(37 124 255);
+    border-radius: 5px;
+    box-sizing: border-box;
+    text-overflow: ellipsis;
+}
+
+.i_box_login .input {}
+
+.i_box_login .select {
+    width: 100%;
+}
+
+.i_box_login .button {
+    margin-top: 30px;
+    background: rgb(100, 100, 100);
+    cursor: pointer;
+    color: #fff;
+    padding: 10px 50px;
+    border-radius: 5px;
+}
+
+.none{
+    width: 100% !important;
+    height: 100% !important;
+    background: unset !important;
+    color: #fff !important;
+    display: flex !important;
+    align-items: center !important;
+    justify-content: center !important;
+    margin: 0 !important;
+} */
+</style>

+ 4 - 5
src/components/pages/kindStudentEva/test/component/popbox.vue

@@ -123,7 +123,7 @@
     </div>
 
     <div style="margin: 15px 0;width: 70px;font-size: 16px;">
-      图片
+      <div v-if="judgeNum">图片</div>
     </div>
     <div class="imgBlock">
       <div
@@ -188,7 +188,7 @@ export default {
       default: 0
     },
     sUserId: {
-      type: String,
+      type: String
     },
     recordDataCopy: {
       type: Object,
@@ -282,7 +282,7 @@ export default {
         .post(this.$store.state.api + "insertRecord", params)
         .then(res => {
           // console.log(res);
-          this.$emit('updatePanelB',Date.parse(new Date()))
+          this.$emit("updatePanelB", Date.parse(new Date()));
           this.$emit("closePop");
           this.$emit("getData");
           this.$message({
@@ -317,7 +317,6 @@ export default {
       })
         .then(() => {
           this.updateCord();
-          
         })
         .catch(() => {
           this.$message({
@@ -350,7 +349,7 @@ export default {
         .post(this.$store.state.api + "updateRecordData", params)
         .then(res => {
           // console.log(res);
-         
+
           this.$emit("closePop");
           this.$emit("getData");
           this.$message({

+ 19 - 3
src/components/pages/kindStudentEva/test/diary.vue

@@ -196,7 +196,7 @@
         :sUserId="userid"
         :termList="termList"
         :weiList="weiList"
-        :studentList="studentList"
+        :studentList="studentListCopy"
         @closePop="closePop"
         @getData="getData"
         @updatePanelB="updatePanelB"
@@ -282,6 +282,8 @@ export default {
       weiList: [],
       // 班级学生数据(包括多个班)
       studentList: [],
+      studentListCopy: [],
+
       // 判断显示查看,修改
       judgeNum: 0,
 
@@ -410,6 +412,7 @@ export default {
         .then(res => {
           this.isLoading = false;
           this.tableData = res.data[0];
+          console.log("this.tableData", this.tableData);
           this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
           // console.log(" 获取筛选数据", res.data[0]);
         })
@@ -466,7 +469,12 @@ export default {
         tname: "",
         type: ""
       };
-
+      this.studentListCopy = [];
+      // 去除自己的名字。不能自己关联自己
+      this.studentListCopy = this.studentList.filter(i => {
+        return i.id !== this.info.userid;
+      });
+     
       // this.AddIsPop = true;
       this.isPop = true;
     },
@@ -514,8 +522,16 @@ export default {
           e.recordImg = e.recordImg.split(",");
         }
       }
+      this.studentListCopy = [];
       this.recordData = e;
-      // console.log('recordData',this.recordData);
+      // 去除自己的名字。不能自己关联自己
+      this.studentListCopy = this.studentList.filter(i => {
+        return i.id !== e.sid;
+      });
+      // this.studentList = res[0].filter(i => {
+      //   return i.id !== allData.sid;
+      // });
+      // console.log("recordData", this.recordData);
       this.$forceUpdate();
       this.isPop = true;
     },

+ 72 - 26
src/components/pages/library.vue

@@ -45,12 +45,13 @@
       <div v-if="showActionDiv" ref="actionDiv" :style="actionDivStyle" class="action-div">
         <div @click="actionDelete">删除</div>
         <div @click="actionRename">重命名</div>
+        <div @click="actionAdd" v-if="actionType.split('-').length == 1" ref="addTypeAction">添加分类</div>
         <div class="move" v-if="pidArray.length">
           <span>移动</span>
           <div class="pid_box">
             <div v-for="(item, index) in pidArray" :key="index" @click="actionMove(item)">
               <!-- <el-tooltip :content="item.name" placement="right" effect="dark"> -->
-                <span>{{ item.name }}</span>
+              <span>{{ item.name }}</span>
               <!-- </el-tooltip> -->
             </div>
           </div>
@@ -59,7 +60,8 @@
     </div>
     <div class="l_file_box">
       <div class="l_none" v-if="pid != 'wu' && pid.split('-').length == 1">请添加二级分类</div>
-      <fileBox :userid="userid" :typeArray="typeArray" :pid="pid" v-else></fileBox>
+      <fileBox :userid="userid" :typeArray="typeArray" :pid="pid" :type='type' @addFile="addFile" ref="fileBox" v-else>
+      </fileBox>
     </div>
   </div>
 </template>
@@ -70,6 +72,12 @@ export default {
   components: {
     fileBox,
   },
+  props: {
+    type: {
+      type: String,
+      default: '1'
+    },
+  },
   data() {
     return {
       userid: this.$route.query.userid,
@@ -103,22 +111,37 @@ export default {
           let pid = res.data[0];
           let child = res.data[1];
           for (var i = 0; i < pid.length; i++) {
-            pid[i].child = []
+            let pidChild = []
             pid[i].open = (this.typeArray.length && this.typeArray[i]) ? this.typeArray[i].open : false
             for (var j = 0; j < child.length; j++) {
               if (pid[i].id == child[j].pid) {
-                pid[i].child.push(child[j])
+                pidChild.push(child[j])
               }
             }
+            pid[i].child = pidChild
           }
+          this.typeArray = pid
+          this.$forceUpdate()
 
           let _pid = this.pid.split('-')
           if (_pid.length === 1 && this.pid != 'wu') {
-            pid[_pid[0]].open = true;
-            this.$forceUpdate()
-            this.checkType(this.pid + '-0');
+            if (pid[_pid[0]]) {
+              pid[_pid[0]].open = true
+              this.pid = this.pid + '-0'
+            } else {
+              this.pid = 'wu'
+            };
+            this.checkType(this.pid);
+          } else if (_pid.length > 1) {
+            if (this.typeArray[_pid[0]].child.length > 0 && (parseInt(_pid[1]) + 1) > this.typeArray[_pid[0]].child.length) {
+              this.pid = _pid[0] + '-0';
+              this.checkType(this.pid);
+            } else if ((parseInt(_pid[1]) + 1) > this.typeArray[_pid[0]].child.length) {
+              this.checkType(_pid[0]);
+            }
           }
-          this.typeArray = pid
+          this.$refs['fileBox'].getData()
+          console.log(this.$refs['fileBox']);
         })
         .catch((err) => {
           this.isLoading = false;
@@ -126,20 +149,20 @@ export default {
         });
     },
     addClick() {
-      if (this.pid == 'wu') {
-        this.addVisbile = true;
-        this.addInput = '一级分类标签'
-        setTimeout(() => {
-          this.$refs.divToHide.children[0].select()
-        }, 500);
-      } else {
-        let check = this.pid.split('-')
-        this.addVisbile2 = parseInt(check[0]);
-        this.addInput = '二级分类标签'
-        setTimeout(() => {
-          this.$refs.divToHide2[0].children[0].select()
-        }, 500);
-      }
+      // if (this.pid == 'wu') {
+      this.addVisbile = true;
+      this.addInput = '一级分类标签'
+      setTimeout(() => {
+        this.$refs.divToHide.children[0].select()
+      }, 500);
+      // } else {
+      //   let check = this.pid.split('-')
+      //   this.addVisbile2 = parseInt(check[0]);
+      //   this.addInput = '二级分类标签'
+      //   setTimeout(() => {
+      //     this.$refs.divToHide2[0].children[0].select()
+      //   }, 500);
+      // }
 
     },
     addType() {
@@ -196,6 +219,7 @@ export default {
       const target = event.target;
       const divToHide = this.$refs.divToHide; // 获取需要隐藏的 div 的引用
       const divToHide2 = this.$refs.divToHide2; // 获取需要隐藏的 div 的引用
+      const addTypeAction = this.$refs.addTypeAction
       const divToHide3 = this.$refs.divToHide3; // 获取需要隐藏的 div 的引用
       const divToHide4 = this.$refs.actionDiv; // 获取需要隐藏的 div 的引用
       const divToHide5 = this.$refs.divToHide5; // 获取需要隐藏的 div 的引用
@@ -205,7 +229,11 @@ export default {
         // 点击的不是需要隐藏的 div,则隐藏它
         this.addVisbile = false
       }
-      if (divToHide2 && divToHide2[0] && !divToHide2[0].contains(target) && divToHide3 && !divToHide3.contains(target)) {
+      // if (divToHide2 && divToHide2[0] && !divToHide2[0].contains(target) && divToHide3 && !divToHide3.contains(target)) {
+      //   // 点击的不是需要隐藏的 div,则隐藏它
+      //   this.addVisbile2 = ''
+      // }
+      if (divToHide2 && divToHide2[0] && !divToHide2[0].contains(target) && addTypeAction && !addTypeAction.contains(target)) {
         // 点击的不是需要隐藏的 div,则隐藏它
         this.addVisbile2 = ''
       }
@@ -240,7 +268,7 @@ export default {
       let type = this.actionType.split('-')
       let id = this.typeArray[type[0]].child[type[1]].id
       this
-        .$confirm('确定移动到'+pid.name+'吗?并且此分类的底下的文件也会跟随!', "提示", {
+        .$confirm('确定移动到' + pid.name + '吗?并且此分类的底下的文件也会跟随!', "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning",
@@ -281,6 +309,20 @@ export default {
         this.showActionDiv = false
       }, 500);
     },
+    actionAdd() {
+      let type = this.actionType.split('-')
+      if (type.length > 1) {
+        return
+      }
+      let check = type
+      this.checkType(this.actionType)
+      this.addVisbile2 = parseInt(check[0]);
+      this.addInput = '二级分类标签'
+      this.showActionDiv = false
+      setTimeout(() => {
+        this.$refs.divToHide2[0].children[0].select()
+      }, 500);
+    },
     rename() {
       if (!this.renameInput) {
         this.$message.error('请输入分类名字');
@@ -346,6 +388,9 @@ export default {
         })
         .catch(() => {
         });
+    },
+    addFile(file) {
+      this.$emit('addFile', file)
     }
   },
   beforeDestroy() {
@@ -488,7 +533,8 @@ export default {
   background-image: url('../../assets/icon/sourceFile/icon_no.png');
 }
 
-.l_type_box>.nav>.nav_b>.nav_box.active>.no {
+
+.l_type_box>.nav>.nav_b>.nav_box.active1>.no {
   background-image: url('../../assets/icon/sourceFile/icon_no_active.png');
 }
 
@@ -694,7 +740,7 @@ export default {
   overflow: hidden;
 }
 
-.l_none{
+.l_none {
   color: #00000069;
   width: 100%;
   height: 100%;

+ 23 - 4
src/components/pages/library/fileBox.vue

@@ -2,14 +2,17 @@
     <div class="f_box">
         <div class="f_box_top">
             <div class="f_box_top_left">
-                <div class="btn" @click="addImg($event)">
+                <div class="btn" @click="addImg($event)" v-if="type == '1'">
                     上传本地文件
                     <input type="file" accept="*" style="display: none" multiple="multiple"
                         @change="beforeUpload($event)" />
                 </div>
-                <div class="btn2" v-if="checkArray.length" @click="openMoveBox">移动到</div>
-                <div class="btn2" v-if="checkArray.length" @click="downPan">下载</div>
-                <div class="delBtn" v-if="checkArray.length" @click="deleteFile"></div>
+                <div class="btn" @click="addFileToTest()" :style="{opacity: checkArray.length ? 1 : .5}" v-if="type == '2'">
+                    添加至表单
+                </div>
+                <div class="btn2" v-if="checkArray.length && type == '1'" @click="openMoveBox">移动到</div>
+                <div class="btn2" v-if="checkArray.length && type == '1'" @click="downPan">下载</div>
+                <div class="delBtn" v-if="checkArray.length && type == '1'" @click="deleteFile"></div>
             </div>
             <div class="f_box_top_right">
                 <div class="input">
@@ -219,6 +222,9 @@ export default {
         pid: {
             type: String,
         },
+        type: {
+            type: String
+        }
     },
     watch: {
         pid: {
@@ -786,6 +792,19 @@ export default {
                 });
             });
         },
+        addFileToTest(){
+            if(!this.checkArray.length){
+                return
+            }
+            let file = []
+            for(let i = 0; i < this.fileArray.length; i++){
+                if(this.checkArray.includes(this.fileArray[i].id)){
+                    file.push(this.fileArray[i])
+                }
+            }
+            this.$emit('addFile', file)
+            this.checkArray = []
+        }
     },
     mounted() {
         this.getData();

+ 14 - 2
src/components/pages/student.vue

@@ -382,6 +382,12 @@ export default {
       //   this.$message.error("学生手机号不能为空");
       //   return;
       // }
+      let mail = '';
+      if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
+        mail = this.sMail;
+      }else{
+        this.sMail + "@" + this.userSuffix
+      }
       if (this.time()) {
         // let params = { un: this.sPhone };
         // this.ajax
@@ -390,7 +396,7 @@ export default {
         //     if (res.data[0].length > 0) {
         //       this.$message.error("此学生手机号码已被注册");
         //     } else {
-        let params = { un: this.sMail + '@' + this.userSuffix };
+        let params = { un: mail };
         this.ajax
           .get(this.$store.state.api + "findMail", params)
           .then((res) => {
@@ -423,9 +429,15 @@ export default {
       }
     },
     add_Student() {
+      let mail = '';
+      if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
+        mail = this.sMail;
+      }else{
+        this.sMail + "@" + this.userSuffix
+      }
       let params = [
         {
-          username: this.sMail + '@' + this.userSuffix,
+          username: mail,
           userpassword: 123456,
           alias: this.sName,
           oid: this.oid,

+ 5 - 5
src/components/pages/studentEva.vue

@@ -294,10 +294,10 @@ export default {
       for (var i = 0; i < resList.length; i++) {
         var _json = {};
         _json["姓名"] = resList[i].name;
+        _json["关联同学"] = resList[i].constus;
         _json["班级"] = resList[i].cname;
         _json["记录时间"] = resList[i].recordDate;
         _json["学期"] = resList[i].tName;
-        _json["关联"] = resList[i].constus;
         _json["维度"] = resList[i].VeidooList;
         _json["观察地点"] = resList[i].place;
         _json["观察内容"] = resList[i].recordTit;
@@ -312,11 +312,11 @@ export default {
       let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
       ws["!cols"] = [
         //设置每一列的宽度
-        { wch: 20 },
-        { wch: 30 },
-        { wch: 30 },
-        { wch: 30 },
+        { wch: 10 },
         { wch: 30 },
+        { wch: 10 },
+        { wch: 20 },
+        { wch: 20 },
         { wch: 30 },
         { wch: 30 },
         { wch: 30 },

+ 14 - 2
src/components/pages/studentManage/student.vue

@@ -401,6 +401,12 @@ export default {
       //   this.$message.error("学生手机号不能为空");
       //   return;
       // }
+      let mail = '';
+      if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
+        mail = this.sMail;
+      }else{
+        this.sMail + "@" + this.userSuffix
+      }
       if (this.time()) {
         // let params = { un: this.sPhone };
         // this.ajax
@@ -409,7 +415,7 @@ export default {
         //     if (res.data[0].length > 0) {
         //       this.$message.error("此学生手机号码已被注册");
         //     } else {
-        let params = { un: this.sMail + '@' + this.userSuffix };
+        let params = { un: mail };
         this.ajax
           .get(this.$store.state.api + "findMail", params)
           .then((res) => {
@@ -442,9 +448,15 @@ export default {
       }
     },
     add_Student() {
+      let mail = '';
+      if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
+        mail = this.sMail;
+      }else{
+        this.sMail + "@" + this.userSuffix
+      }
       let params = [
         {
-          username: this.sMail + '@' + this.userSuffix,
+          username: mail,
           userpassword: 123456,
           alias: this.sName,
           oid: this.oid,

+ 179 - 0
src/components/pages/sz/dataBoardArea/dataCenter/chartList/courseNum/index.vue

@@ -0,0 +1,179 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
+      <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+      <highcharts :options="option" style="width: 95%; height: 95%"></highcharts>
+    </div>
+  </div>
+</template>
+
+<script>
+import { Chart } from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+// import column from 'highcharts/modules/column';
+// column(HighCharts);
+
+export default {
+  components: {
+    highcharts: Chart,
+  },
+  props: {
+    weekCourse2: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        data: [],
+      },
+      option: {
+        chart: {
+          type: 'column',
+          backgroundColor: 'rgba(0,0,0,0)'
+        },
+        title: {
+          text: null
+        },
+        credits: {
+          enabled: false//不显示LOGO
+        },
+        xAxis: {
+          categories: [
+          ]
+        },
+        yAxis: [{
+          allowDecimals: false,
+          min: 0,
+          title: {
+            text: '课程总数'
+          }
+        },
+          // {
+          //   title: {
+          //     text: '项目总数'
+          //   },
+          //   opposite: true
+          // }
+        ],
+        legend: {
+          shadow: false
+        },
+        tooltip: {
+          shared: true
+        },
+        plotOptions: {
+          column: {
+            grouping: false,
+            shadow: false,
+            borderWidth: 0,
+            dataLabels: {
+              enabled: true,  //显示数量提示
+              color: '#000000',
+              formatter : function() {
+                var employee = this.point.series.chart.series[0].yData[this.point.index];
+                var optimizedEmployee = this.point.series.chart.series[1].yData[this.point.index];
+                var employeePercentage = 0;
+                if(optimizedEmployee > employee){
+                  employeePercentage = ((optimizedEmployee - employee) / optimizedEmployee) * 100
+                }
+                if (this.series.name === '本月课程总数') {
+                  return  employeePercentage.toFixed(1) + '%';
+                } else {
+                  return '';
+                }
+              }
+            }
+          }
+        },
+        series: [{
+          name: '上月课程总数',
+          color: '#96D8A8',
+          data: [],
+          pointPadding: 0.3, // 通过 pointPadding 和 pointPlacement 控制柱子位置
+          // pointPlacement: -0.2
+        }, {
+          name: '本月课程总数',
+          color: '#5E9AFC',
+          data: [],
+          pointPadding: 0.4,
+          // pointPlacement: -0.2
+        },
+          //  {
+          //   name: '上周项目总数',
+          //   color: 'rgba(248,161,63,1)',
+          //   data: [153, 178, 195],
+          //   pointPadding: 0.3,
+          //   pointPlacement: 0.2,
+          //   yAxis: 1  // 指定数据列所在的 yAxis
+          // }, {
+          //   name: '本周项目总数',
+          //   color: 'rgba(186,60,61,.9)',
+          //   data: [203, 198, 208],
+          //   pointPadding: 0.4,
+          //   pointPlacement: 0.2,
+          //   yAxis: 1
+          // }
+        ]
+      }
+    };
+  },
+  methods: {
+    setChart() {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = Highcharts.chart('cateRank', this.option);
+        // 初始化雷达图
+        // this.chartObj = chartObj;
+        // this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array) {
+      this.option.xAxis.categories = []
+      this.option.series[0].data = []
+      this.option.series[1].data = []
+      for (var i = 0; i < array.length; i++) {
+        this.option.xAxis.categories.push(array[i].name)
+        this.option.series[0].data.push(array[i].lastCourse)
+        this.option.series[1].data.push(array[i].toCourse)
+      }
+    }
+  },
+  watch: {
+    weekCourse2: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.weekCourse2)
+    // this.setChart();
+
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+</style>

+ 126 - 0
src/components/pages/sz/dataBoardArea/dataCenter/chartList/courseRank/index.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%;height: calc(100% - 30px); margin-top: 15px;overflow: auto;">
+      <el-table :data="tableData" style="width: 100%" height="100%" :header-cell-style="{ background: '#E0EAFB',color: '#000' }"
+        :row-class-name="tableRowClassName" class="tableClass">
+        <el-table-column label="排名" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column prop="courseName" label="课程名称" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="compare" label="较上周" min-width="80" align="center">
+					<template slot-scope="scope">
+						<div>
+							<!-- {{ Math.abs(scope.row.compare) }} -->
+							<div v-if="scope.row.compare>0" class="el-icon-top compareDown">{{ Math.abs(scope.row.compare) }}</div>
+							<div v-if="scope.row.compare==0">{{ Math.abs(scope.row.compare) }}</div>
+							<div v-if="scope.row.compare<0" class="el-icon-bottom compareUp">{{ Math.abs(scope.row.compare) }}</div>
+						</div>
+					</template>
+        </el-table-column>
+        <el-table-column prop="total" label="上课人次" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    rankData: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      tableData: [],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    setArray(array){
+      this.tableData = JSON.parse(JSON.stringify(array))
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.total - a.total;
+      })
+    }
+  },
+  watch: {
+    rankData: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.rankData)
+  },
+};
+</script>
+
+<style scoped>
+.el-table>>>.even_row {
+  background-color: #f2f7ff !important;
+}
+
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
+
+.data_body div::-webkit-scrollbar {
+    /*滚动条整体样式*/
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-track {
+    border-radius: 10px;
+    background-color: #fff;
+}
+
+/*定义滑块 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    -webkit-box-shadow: inset 0 0 6px #AECCFE;
+    background-color: #AECCFE;
+}
+
+.compareUp{
+	color: #17C469;
+	letter-spacing: 5px;
+}
+
+.compareDown{
+	color: #EE3E3E;
+	background-color: #FFDDDD;
+	padding: 5px 10px;
+	letter-spacing: 5px;
+	border-radius: 3px;
+}
+
+</style>

+ 167 - 0
src/components/pages/sz/dataBoardArea/dataCenter/chartList/loginTime/index.vue

@@ -0,0 +1,167 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        yearArray: {
+            type: String,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                series: [
+                    {
+                        type: 'gauge',
+                        startAngle: 180,
+                        endAngle: 0,
+                        center: ['50%', '75%'],
+                        radius: '150%',
+                        min: 0,
+                        max: 4000,
+                        splitNumber: 8,
+                        axisLine: {
+                            lineStyle: {
+                                width: 10,
+                                color: [
+                                    [0.25, 'rgb(251, 223, 148)'],
+                                    [0.5, 'rgb(145, 208, 237)'],
+                                    [0.75, 'rgb(68, 96, 193)'],
+                                    [1, 'rgb(240, 141, 158)']
+                                ]
+                            }
+                        },
+                        pointer: {
+                            icon: 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z',
+                            length: '12%',
+                            width: 12,
+                            offsetCenter: [0, '-60%'],
+                            itemStyle: {
+                                color: 'auto'
+                            }
+                        },
+                        axisTick: {
+                            length: 6,
+                            lineStyle: {
+                                color: 'auto',
+                                width: 2
+                            }
+                        },
+                        splitLine: {
+                            length: 20,
+                            lineStyle: {
+                                color: 'auto',
+                                width: 5
+                            }
+                        },
+                        axisLabel: {
+                            show:false
+                        },
+                        title:{
+                            show:false
+                        },
+                        title: {
+                            offsetCenter: [0, '10%'],
+                            fontSize: 20
+                        },
+                        detail: {
+                            fontSize: 30,
+                            offsetCenter: [0, '-15%'],
+                            color: 'inherit'
+                        },
+                        data: [
+                            {
+                                value: 0,
+                                name: '深度使用'
+                            }
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+
+                // this.option.xAxis.data = option.xdata;
+                this.option.series[0].data[0].value = this.yearArray;
+                // this.option.visualMap.max = option.max ? option.max : 0;
+
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+    },
+    watch: {
+        yearArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.ooption = {
+                    xdata: [],
+                    sdata: [],
+                    max: 0
+                }
+                let _array = newValue
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    this.option.series[0].data[0].value = this.yearArray;
+                    // this.option.xAxis.data = this.ooption.xdata;
+                    // this.option.series[0].data[0] = this.ooption.sdata;
+                    // this.option.visualMap.max = this.ooption.max ? this.ooption.max : 0;
+                    this.chartObj.setOption(this.option);
+                }
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        
+
+        this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    position: relative;
+    border-radius: 5px;
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    /* background: #fff; */
+}
+</style>
+  

+ 112 - 0
src/components/pages/sz/dataBoardArea/dataCenter/chartList/schoolRank/index.vue

@@ -0,0 +1,112 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%;height: calc(100% - 30px); margin-top: 15px;overflow: auto;">
+      <el-table :data="tableData" style="width: 100%" height="100%" :header-cell-style="{ background: '#E0EAFB',color: '#000' }"
+        :row-class-name="tableRowClassName" class="tableClass">
+        <el-table-column label="排名" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column prop="schoolName" label="学校名称" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="area" label="区域" min-width="90" align="center">
+        </el-table-column>
+        <el-table-column prop="teacherLogin" label="教师登录" min-width="90" align="center">
+        </el-table-column>
+				<el-table-column prop="studentLogin" label="学生登录" min-width="90" align="center">
+        </el-table-column>
+        <el-table-column prop="teaching" label="授课次数" min-width="90" align="center">
+        </el-table-column>
+        <el-table-column prop="submitJob" label="提交作业" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="score" label="综合得分" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    rankData: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      tableData: [],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    setArray(array){
+      this.tableData = JSON.parse(JSON.stringify(array))
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.score - a.score;
+      })
+    }
+  },
+  watch: {
+    rankData: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.rankData)
+  },
+};
+</script>
+
+<style scoped>
+.el-table>>>.even_row {
+  background-color: #f2f7ff !important;
+}
+
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
+
+.data_body div::-webkit-scrollbar {
+    /*滚动条整体样式*/
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-track {
+    border-radius: 10px;
+    background-color: #fff;
+}
+
+/*定义滑块 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    -webkit-box-shadow: inset 0 0 6px #AECCFE;
+    background-color: #AECCFE;
+}
+</style>

+ 140 - 0
src/components/pages/sz/dataBoardArea/dataCenter/chartList/teaFre/index.vue

@@ -0,0 +1,140 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    monthArray: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        login: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "axis",
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: true,
+          // data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+        },
+        yAxis: {
+          type: "value",
+          minInterval: 1
+        },
+        grid: {
+          top: "30",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        series: [
+          {
+            // data: [820, 932, 901, 934, 1290, 1330, 1320],
+            data: [],
+            type: "line",
+            areaStyle: {},
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.xAxis.data = option.xdata;
+        this.option.series[0].data = option.login;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        login: [],
+      }
+      let _array = array
+      for (var i = 0; i < _array.length; i++) {
+        this.ooption.xdata.push(_array[i].Month + '月')
+        this.ooption.login.push(_array[i].login)
+      }
+
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.xAxis.data = this.ooption.xdata;
+        this.option.series[0].data = this.ooption.login;
+        this.chartObj.setOption(this.option);
+      }
+    }
+  },
+  watch: {
+    monthArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setJson(this.monthArray)
+
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+</style>

+ 215 - 0
src/components/pages/sz/dataBoardArea/dataCenter/chartList/toolUser/index.vue

@@ -0,0 +1,215 @@
+<template>
+  <div class="data_body">
+    <!-- <img src="../../assets/dataimage/1.png" style="width:90%" /> -->
+    <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["Josn"],
+  data() {
+    return {
+      mindV: true,
+      chartObj: null,
+      timer: null,
+      range: "",
+      ooption: [],
+      option: {
+        // title: {
+        //   top: 30,
+        //   left: 'center',
+        //   text: '作业提交热力图'
+        // },
+        tooltip: {
+          formatter: function (p) {
+            const format = p.data[0];
+            return format + ' ' + p.data[1]+'次';
+          }
+        },
+        visualMap: {
+          top: 'center',
+          left: 10,
+          right: 0,
+          min: 0,
+          max: 0,
+          type: 'continuous',
+          inRange: {
+            color: ['#65b9fc', '#477cd7']
+          },
+          precision: 0,
+          calculable: true,
+        },
+        calendar: {
+          top: 'center',
+          left: 80,
+          right: 20,
+          cellSize: ["auto", 15],
+          range: "",
+          itemStyle: {
+            borderWidth: 0.5,
+          },
+          yearLabel: { show: false },
+          dayLabel: {
+            show: true,
+          },
+        },
+        series: {
+          type: 'heatmap',
+          coordinateSystem: 'calendar',
+          data: ''
+        }
+      },
+    };
+  },
+  methods: {
+    gettime() {
+      var time = new Date();
+      // time=time.setDate(time.getDate()+1);
+      // time = new Date(time);
+      // time.setTime(time.getTime());
+      var s2 = time.getFullYear() + "-" + ((time.getMonth() + 1) < 10 ? '0' + (time.getMonth() + 1) : (time.getMonth() + 1)) + "-"
+        + ((time.getDate()) < 10 ? '0' + (time.getDate()) : (time.getDate()));
+      var monthNum = 3; //要减的月数(6)自己定义
+      var dateArr = s2.split('-'); //s2当前时间
+      var year = dateArr[0]; //获取当前日期的年份
+      var month = dateArr[1]; //获取当前日期的月份
+      var day = dateArr[2]; //获取当前日期的日
+      var days = new Date(year, month, 0);
+      days = days.getDate(); //获取当前日期中月的天数
+      var year2 = year;
+      var month2 = parseInt(month) - monthNum;
+      if (month2 <= 0) {
+        // year2 = parseInt(year2) - parseInt(month2 / 12 == 0 ? 1 : parseInt(month2) / 12);
+        year2 = parseInt(year2) - 1;
+        month2 = 12 - (Math.abs(month2) % 12);
+      }
+      var day2 = day;
+      var days2 = new Date(year2, month2, 0);
+      days2 = days2.getDate();
+      if (day2 > days2) {
+        day2 = days2 < 10 ? '0' + days2 : days2;
+      }
+      if (month2 < 10) {
+        month2 = '0' + month2;
+      }
+      var t2 = year2 + '-' + month2 + '-' + day2;
+      return [t2, s2]
+    },
+    setChart(option, year) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series.data = option;
+        this.option.calendar.range = year;
+        // this.option.visualMap.max = Object.keys(this.Josn).length + (10 - (Object.keys(this.Josn).length % 10));
+        let array = []
+        for(var i = 0; i < Object.keys(this.Josn).length; i++){
+          array.push(this.Josn[Object.keys(this.Josn)[i]])
+        }
+        this.option.visualMap.max = array.sort(function (a, b) {
+          return b - a;
+        })[0];
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    getVirtualData(year) {
+      const date = +this.$echarts.time.parse(year[0]);
+      const end = +this.$echarts.time.parse(year[1]);
+      const dayTime = 3600 * 24 * 1000;
+      const data = [];
+      for (let time = date; time <= end; time += dayTime) {
+        let a = this.$echarts.time.format(time, '{yyyy}-{MM}-{dd}', false)
+        if (this.Josn[a]) {
+          data.push([a, this.Josn[a]]);
+        } else {
+          data.push([a, null]);
+        }
+      }
+      return data;
+    },
+    setData() {
+      let year = Object.keys(this.Josn)[0].split('-')[0];
+      var t = this.gettime();
+      this.ooption = this.getVirtualData(t)
+      if (!this.chartObj) {
+        this.setChart(this.ooption, t);
+      } else {
+        this.option.series.data = this.ooption;
+        this.option.calendar.range = t;
+        let array = []
+        for(var i = 0; i < Object.keys(this.Josn).length; i++){
+          array.push(this.Josn[Object.keys(this.Josn)[i]])
+        }
+        this.option.visualMap.max = array.sort(function (a, b) {
+          return b - a;
+        })[0];
+        this.chartObj.setOption(this.option, t);
+      }
+    },
+  },
+  watch: {
+    Josn: {
+      handler: function (newVal, oldVal) { 
+        this.setData();
+       },
+      deep: true,
+    },
+  },
+  beforeDestroy() {
+    window.removeEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+  mounted() {
+    this.setData();
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+  beforeDestroy() {
+    // clearInterval(this.timer);
+    // this.timer = null
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  /* display: flex; */
+  /* flex-direction: column; */
+  width: 100%;
+  height: 170px;
+  /* height: 500px; */
+  /* margin: 15px 5px 0 0; */
+  /* background: #fff; */
+  overflow: hidden;
+  flex-shrink: 0;
+  position: relative;
+}
+
+.noMind {
+  position: absolute;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100%;
+  z-index: 999;
+  /* background: #fff; */
+}
+</style>

+ 1319 - 0
src/components/pages/sz/dataBoardArea/dataCenter/index.vue

@@ -0,0 +1,1319 @@
+<template>
+  <div class="body1">
+    <!-- <loading :isLoading="isLoading"></loading> -->
+    <!-- 教师数据 -->
+    <div class="left">
+      <div class="top">
+				<div class="titleBox">
+          <div class="title">在线时长</div>
+        </div>
+				<div class="info_box">
+          <div class="info">
+						<span>{{ OnlineDuration[0] }}</span>
+            <span>累计时长</span>
+          </div>
+          <div class="info">
+						<span>{{ OnlineDuration[1] }}</span>
+            <span>人均使用时长</span>
+          </div>
+        </div>
+				<div class="dataBox">
+					<loginTime style="height: calc(100% - 100px);width: calc(100% - 100px);" :yearArray="yearArray"></loginTime>
+        </div>
+      </div>
+      <div class="bottom">
+				<div class="titleBox">
+          <div class="title">登录频次</div>
+        </div>
+				<div class="info_box">
+          <div class="info2">
+						<span>{{ LoginFrequency[0] }}</span>
+            <span>登录频次</span>
+          </div>
+          <div class="info2">
+						<span>{{ LoginFrequency[1] }}</span>
+            <span>教师登录频次</span>
+          </div>
+					<div class="info2">
+						<span>{{ LoginFrequency[2] }}</span>
+            <span>学生登录频次</span>
+          </div>
+					<div class="info2">
+						<span>{{ LoginFrequency[3] }}</span>
+            <span>人均登录频次</span>
+          </div>
+        </div>
+				<div class="dataBox">
+					<toolUser style="height: calc(100% - 50px);width: calc(100% - 50px)" :Josn="loginCountYearArray"/>
+        </div>
+      </div>
+    </div>
+    <div class="center">
+      <div class="top">
+				<div class="titleBox">
+          <div class="title">上课次数</div>
+        </div>
+				<div class="dataBox">
+         <courseNum style="height: calc(100% - 50px);width: calc(100% - 50px)" :weekCourse2="weekCourse2"/>
+        </div>
+      </div>
+      <div class="bottom">
+				<div class="titleBox">
+          <div class="title">学校排行榜</div>
+        </div>
+				<div class="dataBox">
+         <schoolRank :rankData="schoolRankData"/>
+        </div>
+      </div>
+    </div>
+    <div class="right">
+      <div class="top" style="border-radius: 5px">
+				<div class="titleBox">
+          <div class="title">基础概况</div>
+        </div>
+				<div class="info_box">
+          <div class="info3">
+						<span>{{ BasicOverview[0] }}</span>
+            <span>用户总数(个)</span>
+          </div>
+          <div class="info3">
+						<span>{{ BasicOverview[1] }}</span>
+            <span>新增用户(个)</span>
+          </div>
+					<div class="info3">
+						<span>{{ BasicOverview[2] }}</span>
+            <span>本月新增登录(次)</span>
+          </div>
+        </div>
+				<div class="dataBox">
+					<TeaFre style="height: calc(100% - 50px)" :monthArray="monthArray"/>
+        </div>
+      </div>
+      <div class="bottom">
+				<div class="titleBox">
+          <div class="title">课程排行榜</div>
+        </div>
+				<div class="dataBox">
+         <courseRank :rankData="courseRankData"/>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import loginTime from './chartList/loginTime'
+import toolUser from './chartList/toolUser'
+import TeaFre from './chartList/teaFre'
+import schoolRank from './chartList/schoolRank'
+import courseRank from './chartList/courseRank'
+import courseNum from './chartList/courseNum'
+export default {
+  components: {
+		loginTime,
+		toolUser,
+		TeaFre,
+		schoolRank,
+		courseRank,
+		courseNum
+  //   TeaFre,
+  //   TeaAct,
+  //   TeaData,
+  //   FunPlot,
+  //   WorkNum,
+  //   WorkTime,
+  //   ToolUse,
+  
+  //   TeaActSecond,
+  //   CateRank,
+  //   loading
+  },
+  props: {
+    oid: {
+      type: String,
+    },
+    org: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      isLoading: false,
+			yearArray:"0",
+			OnlineDuration:['0','0'],
+			BasicOverview:['0','0','0'],
+			LoginFrequency:['0','0','0','0'],
+			loginCountYearArray:{
+				"2023-12-06":1,
+				"2023-12-07":1,
+				"2023-12-13":1,
+				"2023-12-18":1,
+				"2023-12-19":1,
+				"2023-12-22":1,
+				"2023-12-24":1,
+				"2023-12-25":1,
+				"2023-12-26":1,
+				"2024-01-02":2,
+				"2024-01-03":1,
+				"2024-01-04":1,
+				"2024-01-08":2,
+				"2024-01-09":1,
+				"2024-01-10":1,
+				"2024-01-11":1,
+				"2024-01-12":1,
+				"2024-01-19":1,
+				"2024-01-20":1,
+				"2024-01-22":2,
+				"2024-01-23":2,
+				"2024-01-24":2,
+				"2024-01-25":1,
+				"2024-01-30":1,
+				"2024-01-31":1,
+				"2024-02-01":2,
+				"2024-02-02":1,
+				"2024-02-05":2,
+				"2024-02-06":1,
+				"2024-02-07":1,
+				"2024-02-08":1,
+				"2024-02-19":1,
+				"2024-02-20":1,
+				"2024-02-21":1,
+				"2024-02-22":1,
+				"2024-02-23":2,
+				"2024-02-24":1,
+				"2024-02-25":1,
+				"2024-02-26":1,
+				"2024-02-27":1,
+				"2024-02-28":1,
+				"2024-03-04":1,
+				"2024-03-05":1,
+				"2024-03-07":1
+			},
+			monthArray:[{"Year":2023,"Month":6,"login":210},{"Year":2023,"Month":7,"login":350},{"Year":2023,"Month":8,"login":140},{"Month":9,"Year":2023,"login":80},{"Month":10,"Year":2023,"login":280}],
+			schoolRankData:[
+				{schoolName:"深圳市南山实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"海滨实验小学逾...",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+			],
+			courseRankData:[
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+			],
+			weekCourse2:[
+				{
+					name:"三年级",
+					lastCourse:1.5,
+					toCourse:3.1
+				},
+				{
+					name:"四年级",
+					lastCourse:2.9,
+					toCourse:4
+				},
+				{
+					name:"五年级",
+					lastCourse:2,
+					toCourse:3.9
+				},
+				{
+					name:"六年级",
+					lastCourse:0.2,
+					toCourse:4
+				},
+				{
+					name:"七年级",
+					lastCourse:1.2,
+					toCourse:3
+				},
+				{
+					name:"八年级",
+					lastCourse:1.7,
+					toCourse:3.5
+				},
+				{
+					name:"数据",
+					lastCourse:3,
+					toCourse:2
+				},
+			],
+    //   skType: 0,
+    //   courseType: 0,
+    //   bType: 0,
+    //   sType: 0,
+    //   cType4: "grade",
+    //   cType: "1",
+    //   oType: false,
+    //   teacherNum: 0,
+    //   allLoginTeacher: 0,
+    //   teacherNumCountMonthArray: [],
+    //   teacherLoginCountMonthArray: [],
+    //   tedurArray: [],
+    //   allTime: 0,
+    //   workTime: [],
+    //   gradeTime: [],
+    //   subjectTime: [],
+    //   themeListTime: [],
+    //   loginCountYearArray: {},
+    //   courseArray: [],
+    //   _courseArray: [],
+    //   _course2: [],
+    //   courseNumberArray: [],
+    //   gradeArray: [],
+    //   subjectArray: [],
+    //   themeArray: [],
+    //   allArray: [],
+    //   workNumList: [],
+    //   allCourse: 0,
+    //   allProject: 0,
+    //   lightJson: {
+    //     teachers: 0,
+    //     createCourse: 0, //创建课程
+    //     gCourseTeachers: 0, //协同教研
+    //     useTemplate: 0, //使用模板
+    //     commentTeachers: 0, //互动交流
+    //     useTool: 0, //使用工具
+    //     useEvalution: 0, //实施评价
+    //     evaWorksCount: 0, //教学评一体化
+    //   },
+    //   lightJson1: {
+    //     teachers: 0,
+    //     createProject: 0, //创建项目
+    //     gProjectTeachers: 0, //师生协作
+    //     useTemplate: 0, //使用模板
+    //     commentTeachers: 0, //互动交流
+    //     useTool: 0, //使用工具
+    //   },
+    //   pusaDep: [
+    //     { value: 0, name: "登录" },
+    //     { value: 0, name: "创建" },
+    //     { value: 0, name: "授课" },
+    //     { value: 0, name: "评价" },
+    //   ],
+    //   pusaDep1: [
+    //     { value: 0, name: "登录" },
+    //     { value: 0, name: "创建" },
+    //     { value: 0, name: "师生协作" },
+    //     { value: 0, name: "使用工具" },
+    //   ],
+    //   rankData: [],
+    //   rankLoading: false,
+    //   cTypeRank: "",
+    //   classList: [],
+    };
+  },
+  mounted() {
+    // this.getData();
+  },
+  methods: {
+    // otherEchart() {
+    //   this.oType = !this.oType;
+    // },
+    // format(percentage) {
+    //   return percentage + "%";
+    // },
+    // typeChange() {
+    //   if (this.cType4 === "") {
+    //     this.courseNumberArray = this.allArray;
+    //   } else if (this.cType4 === "grade") {
+    //     this.courseNumberArray = this.gradeArray;
+    //   } else if (this.cType4 === "theme") {
+    //     this.courseNumberArray = this.themeArray;
+    //   } else if (this.cType4 === "subject") {
+    //     this.courseNumberArray = this.subjectArray;
+    //   }
+    //   this.$forceUpdate();
+    // },
+    // typeChange2() {
+    //   let _grade = JSON.parse(JSON.stringify(this._grade)); //年级
+    //   let _subject = JSON.parse(JSON.stringify(this._subject)); //学科
+    //   let _course = JSON.parse(JSON.stringify(this._courseArray));
+    //   let _course2 = JSON.parse(JSON.stringify(this._course2));
+    //   let _gradeCourse = 0; //各年级上传课程
+    //   let _subjectCourse = 0; //各学科上传课程
+    //   let _courseArray = [];
+    //   // _subject.push({ name: "其他" });
+
+    //   if (this.cType == "1") {
+    //     for (var i = 0; i < _grade.length; i++) {
+    //       _courseArray.push({
+    //         name: _grade[i].name,
+    //         id: _grade[i].id,
+    //         courseid: [],
+    //         subject: [],
+    //       });
+    //       for (var z = 0; z < _course.length; z++) {
+    //         if (_course[z].typeid && _course[z].typeid.indexOf(_grade[i].id) !== -1) {
+    //           _gradeCourse++;
+    //           if (
+    //             _courseArray[i].courseid.indexOf(_course[z].courseid) === -1
+    //           ) {
+    //             _courseArray[i].courseid.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+    //       for (var j = 0; j < _subject.length; j++) {
+    //         _courseArray[i].subject.push({
+    //           name: _subject[j].name,
+    //           id: _subject[j].id,
+    //           course: 0,
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (
+    //             _course[z].typeid && _course[z].typeid.indexOf(_subject[j].id) !== -1 &&
+    //             _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1
+    //           ) {
+    //             _courseArray[i].subject[j].course++;
+    //           }
+    //         }
+    //       }
+    //       let sum = 0;
+    //       for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
+    //         sum += _courseArray[i].subject[j].course;
+    //       }
+    //       // _courseArray[i].subject[_courseArray[i].subject.length - 1].course =
+    //       //   _courseArray[i].courseid.length - sum < 0
+    //       //     ? 0
+    //       //     : _courseArray[i].courseid.length - sum;
+    //     }
+    //   } else {
+    //     for (var i = 0; i < _grade.length; i++) {
+    //       _courseArray.push({
+    //         name: _grade[i].name,
+    //         id: _grade[i].id,
+    //         courseid: [],
+    //         subject: [],
+    //       });
+    //       for (var z = 0; z < _course2.length; z++) {
+    //         if (_course2[z].typeid && _course2[z].typeid.indexOf(_grade[i].id) !== -1) {
+    //           if (
+    //             _courseArray[i].courseid.indexOf(_course2[z].courseid) === -1
+    //           ) {
+    //             _courseArray[i].courseid.push(_course2[z].courseid);
+    //           }
+    //         }
+    //       }
+    //       for (var j = 0; j < _subject.length; j++) {
+    //         _courseArray[i].subject.push({
+    //           name: _subject[j].name,
+    //           id: _subject[j].id,
+    //           course: 0,
+    //         });
+    //         for (var z = 0; z < _course2.length; z++) {
+    //           if (
+    //             _course2[z].typeid && _course2[z].typeid.indexOf(_subject[j].id) !== -1 &&
+    //             _courseArray[i].courseid.indexOf(_course2[z].courseid) !== -1
+    //           ) {
+    //             if (this.cType == "0") {
+    //               _courseArray[i].subject[j].course += _course2[z].text
+    //                 ? parseInt((parseInt(_course2[z].text) / 3600).toFixed(0))
+    //                 : 0;
+    //             } else if (this.cType == "2") {
+    //               if (_course2[z].course_teacher.split(",").length > 0) {
+    //                 _courseArray[i].subject[j].course++;
+    //               }
+    //             } else if (this.cType == "3") {
+    //               if (_course2[z].worksCount > 0) {
+    //                 _courseArray[i].subject[j].course++;
+    //               }
+    //             } else if (this.cType == "4") {
+    //               if (_course2[z].evaCount > 0) {
+    //                 _courseArray[i].subject[j].course++;
+    //               }
+    //             }
+    //           }
+    //         }
+    //       }
+    //     }
+    //   }
+    //   // for (var j = 0; j < _subject.length; j++) {
+    //   //   for (var z = 0; z < _course.length; z++) {
+    //   //     if (_course[z].typeid == _subject[j].id) {
+    //   //       _subjectCourse++;
+    //   //     }
+    //   //   }
+    //   // }
+    //   this.courseArray = _courseArray;
+    //   this.$forceUpdate();
+    // },
+    // getData() {
+    //   this.isLoading = true;
+    //   let params = [
+    //     {
+    //       oid: this.oid,
+    //       org: this.org,
+    //     },
+    //   ];
+    //   this.ajax
+    //     .post(this.$store.state.api + "selectDataBoardTeacherNew", params)
+    //     .then((res) => {
+    //       this.isLoading = false;
+    //       let _grade = res.data[0]; //年级
+    //       let _subject = res.data[1]; //学科
+    //       this._grade = JSON.parse(JSON.stringify(_grade));
+    //       this._subject = JSON.parse(JSON.stringify(_subject));
+    //       let _themeList = res.data[2]; //主题
+    //       this.teacherNum = res.data[3][0].count; //教师总数
+    //       let _teacherNumYear = res.data[4]; //半年内教师数量
+    //       let _teacherLoginYear = res.data[5]; //半年内登录教师
+    //       let _classList1 = res.data[21]; //班级
+    //       this.classList = _classList1.filter((el) => {
+    //         return el.count > 0;
+    //       });
+    //       // this.cTypeRank = _classList1[0].id
+    //       //将数据根据time里面的月份分成多个数组
+    //       let teacherNumCountMonthArray = [];
+    //       let teacherLoginCountMonthArray = [];
+    //       const date = new Date();
+    //       var Month = date.getMonth() + 1;
+    //       var Year = date.getFullYear();
+    //       for (var i = Month; i > Month - 6; i--) {
+    //         if (i <= 0) {
+    //           teacherNumCountMonthArray.push({
+    //             Year: Year - 1,
+    //             Month: 12 + i,
+    //             num: 0,
+    //           });
+    //           teacherLoginCountMonthArray.push({
+    //             Year: Year - 1,
+    //             Month: 12 + i,
+    //             login: 0,
+    //           });
+    //         } else {
+    //           teacherNumCountMonthArray.push({
+    //             Month: i,
+    //             Year: Year,
+    //             num: 0,
+    //           });
+    //           teacherLoginCountMonthArray.push({
+    //             Month: i,
+    //             Year: Year,
+    //             login: 0,
+    //           });
+    //         }
+    //       }
+
+    //       teacherNumCountMonthArray = teacherNumCountMonthArray.reverse();
+    //       teacherLoginCountMonthArray = teacherLoginCountMonthArray.reverse();
+    //       for (var i = 0; i < _teacherNumYear.length; i++) {
+    //         let _date = new Date(_teacherNumYear[i].time);
+    //         var _month = _date.getMonth() + 1;
+    //         var _year = _date.getFullYear();
+    //         for (var j = 0; j < teacherNumCountMonthArray.length; j++) {
+    //           if (
+    //             _month == teacherNumCountMonthArray[j].Month &&
+    //             _year == teacherNumCountMonthArray[j].Year
+    //           ) {
+    //             teacherNumCountMonthArray[j].num+=_teacherNumYear[i].usernum;
+    //             break;
+    //           }
+    //         }
+    //       }
+    //       for (var i = 0; i < _teacherLoginYear.length; i++) {
+    //         let _date = new Date(_teacherLoginYear[i].time);
+    //         var _month = _date.getMonth() + 1;
+    //         var _year = _date.getFullYear();
+    //         for (var j = 0; j < teacherLoginCountMonthArray.length; j++) {
+    //           if (
+    //             _month == teacherLoginCountMonthArray[j].Month &&
+    //             _year == teacherLoginCountMonthArray[j].Year
+    //           ) {
+    //             teacherLoginCountMonthArray[j].login+=_teacherLoginYear[i].usernum;
+    //             break;
+    //           }
+    //         }
+    //       }
+    //       var allLoginTeacher = 0;
+    //       for (var i = 0; i < teacherLoginCountMonthArray.length; i++) {
+    //         allLoginTeacher += teacherLoginCountMonthArray[i].login;
+    //       }
+
+    //       this.allLoginTeacher = allLoginTeacher;
+    //       this.teacherNumCountMonthArray = teacherNumCountMonthArray;
+    //       this.teacherLoginCountMonthArray = teacherLoginCountMonthArray;
+
+    //       let _classList = res.data[21]; //查询学校教研室
+    //       let _workTime = res.data[6]; //查询教研室在线时长
+    //       var mergedArray = [];
+
+    //       for (var i = 0; i < _classList.length; i++) {
+    //         mergedArray.push({
+    //           id: _classList[i].id,
+    //           name: _classList[i].name,
+    //           text: 0,
+    //         });
+    //         for (let j = 0; j < _workTime.length; j++) {
+    //           const _user = _workTime[j];
+    //           if (_classList[i].id == _user.id) {
+    //             mergedArray[i].text += Number(_user.time);
+    //           }
+    //         }
+    //         mergedArray[i].text = (mergedArray[i].text / 60 / 60).toFixed(0); //换算成小时
+    //       }
+    //       this.workTime = mergedArray;
+
+    //       var _allTime = 0;
+
+    //       for (var i = 0; i < mergedArray.length; i++) {
+    //         _allTime += Number(mergedArray[i].text);
+    //       }
+
+    //       // this.allTime = parseInt(res.data[7][0].time) / 60 / 60;
+    //       this.allTime = _allTime;
+
+    //       let allLoginCount = res.data[8]; //一年的登录频次
+    //       let loginCountYearArray = {};
+    //       let timeArray = [];
+    //       for(var i = 0;i<allLoginCount.length;i++){
+    //         timeArray.push({time:allLoginCount[i].time, num:allLoginCount[i].usernum});
+    //       }
+    //       timeArray.forEach((item) => {
+    //         loginCountYearArray[item.time] = loginCountYearArray[item.time] + item.num || item.num;
+    //       });
+    //       // for (var i = Month; i > Month - 12; i--) {
+    //       //   if (i <= 0) {
+    //       //     loginCountYearArray.push({
+    //       //       Year: Year - 1,
+    //       //       Month: 12 + i,
+    //       //       mon: 0,
+    //       //       tue: 0,
+    //       //       wed: 0,
+    //       //       thur: 0,
+    //       //       fri: 0,
+    //       //       sat: 0,
+    //       //       sun: 0,
+    //       //     });
+    //       //   } else {
+    //       //     loginCountYearArray.push({
+    //       //       Month: i,
+    //       //       Year: Year,
+    //       //       mon: 0,
+    //       //       tue: 0,
+    //       //       wed: 0,
+    //       //       thur: 0,
+    //       //       fri: 0,
+    //       //       sat: 0,
+    //       //       sun: 0,
+    //       //     });
+    //       //   }
+    //       // }
+    //       // loginCountYearArray = loginCountYearArray.reverse();
+
+    //       // for (var i = 0; i < allLoginCount.length; i++) {
+    //       //   let _date = new Date(allLoginCount[i].time);
+    //       //   var _month = _date.getMonth() + 1;
+    //       //   var _year = _date.getFullYear();
+    //       //   var _day = _date.getDay();
+    //       //   let dayArray = ["sun", "mon", "tue", "wed", "thur", "fri", "sat"];
+    //       //   for (var j = 0; j < loginCountYearArray.length; j++) {
+    //       //     if (
+    //       //       _month == loginCountYearArray[j].Month &&
+    //       //       _year == loginCountYearArray[j].Year
+    //       //     ) {
+    //       //       loginCountYearArray[j][dayArray[_day]]++;
+    //       //       break;
+    //       //     }
+    //       //   }
+    //       // }
+    //       this.loginCountYearArray = loginCountYearArray;
+
+    //       this.allLoginTime = res.data[9][0].count; //一年的登录频次
+
+    //       let _course = res.data[10]; //课程
+    //       this._courseArray = JSON.parse(JSON.stringify(_course));
+          
+    //       this._course2 = res.data[22]; //查询课程
+    //       this.typeChange2();
+
+    //       let _gradeArray = [];
+    //       let _subjectArray = [];
+    //       let _themeArray = [];
+
+    //       for (var i = 0; i < _grade.length; i++) {
+    //         _gradeArray.push({
+    //           name: _grade[i].name,
+    //           typeid: _grade[i].id,
+    //           course: 0,
+    //           array: [],
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (_course[z].typeid && _course[z].typeid.indexOf(_grade[i].id) != -1) {
+    //             _gradeArray[i].course++;
+    //             _gradeArray[i].array.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+
+    //       for (var i = 0; i < _subject.length; i++) {
+    //         _subjectArray.push({
+    //           name: _subject[i].name,
+    //           typeid: _subject[i].id,
+    //           course: 0,
+    //           array: [],
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (_course[z].typeid && _course[z].typeid.indexOf(_subject[i].id) != -1) {
+    //             _subjectArray[i].course++;
+    //             _subjectArray[i].array.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+
+    //       for (var i = 0; i < _themeList.length; i++) {
+    //         _themeArray.push({
+    //           name: _themeList[i].name,
+    //           typeid: _themeList[i].id,
+    //           course: 0,
+    //           array: [],
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (_course[z].typeid && _course[z].typeid.indexOf(_themeList[i].id) != -1) {
+    //             _themeArray[i].course++;
+    //             _themeArray[i].array.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+    //       this.gradeArray = _gradeArray;
+    //       this.subjectArray = _subjectArray;
+    //       this.themeArray = _themeArray;
+    //       this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
+    //       this.typeChange();
+
+    //       let _teacherCourse = res.data[11]; //老师创建的课程
+    //       let cNum = 0
+    //       let cNum3 = 0
+    //       for(var i = 1; i < _teacherCourse.length; i++){
+    //         cNum += _teacherCourse[i].coursecount;
+    //         if(_teacherCourse[i].coursecount > 0){
+    //           cNum3++
+    //         }
+    //       }
+    //       this.allCourse = cNum; //得按上面计算
+    //       let _teacherProject = res.data[12]; //老师创建的项目
+    //       let cNum2 = 0
+    //       let cNum4 = 0
+    //       for(var i = 1; i < _teacherProject.length; i++){
+    //         cNum2 += _teacherProject[i].count;
+    //         if(_teacherProject[i].count > 0){
+    //           cNum4++
+    //         }
+    //       }
+    //       this.allProject = cNum2;//得按上面计算
+
+    //       var _workNumList = [];
+    //       // 创建一个对象来存储结果
+    //       var result = {};
+
+    //       // 合并数据 _teacherCourse 和 _teacherProject 到结果对象
+    //       _teacherCourse.forEach((item) => {
+    //         var userid = item.userid;
+    //         var username = item.username;
+    //         var count = item.coursecount;
+    //         if (!result[username]) {
+    //           result[username] = {
+    //             username: username,
+    //             userid: userid,
+    //             course: 0,
+    //             project: 0,
+    //           };
+    //         }
+    //         result[username].course = count;
+    //       });
+
+    //       _teacherProject.forEach((item) => {
+    //         var userid = item.userid;
+    //         var username = item.username;
+    //         var count = item.count;
+    //         if (!result[username]) {
+    //           result[username] = {
+    //             username: username,
+    //             userid: userid,
+    //             course: 0,
+    //             project: 0,
+    //           };
+    //         }
+    //         result[username].project = count;
+    //       });
+
+    //       for (var username in result) {
+    //         var entry = result[username];
+    //         _workNumList.push([
+    //           entry.course,
+    //           entry.project,
+    //           entry.username,
+    //           entry.userid,
+    //         ]);
+    //       }
+
+    //       this.workNumList = _workNumList;
+
+    //       this.lightJson.teachers = res.data[3][0].count; //教师总数
+    //       this.lightJson1.teachers = res.data[3][0].count; //教师总数
+    //       this.lightJson.createCourse = cNum3; //创建了课程的老师 --计算
+    //       this.lightJson.gCourseTeachers = res.data[13][0].count; //参与协同课程的老师
+    //       this.lightJson.commentTeachers = res.data[14][0].count; //参与互动交流的老师
+    //       this.lightJson.useTool = res.data[15][0].count; //使用工具
+    //       this.lightJson.useEvalution = res.data[16].length; //实施评价
+    //       this.lightJson.evaWorksCount = res.data[17][0].count; //教学评一体化
+
+    //       let _isLoginTeacher = res.data[18][0].usercount; //登录过的教师
+    //       let _isCourseTeacher = res.data[15][0].count; //授课了的教师
+
+    //       for (var i = 0; i < this.pusaDep.length; i++) {
+    //         if (this.pusaDep[i].name == "登录") {
+    //           this.pusaDep[i].value = (
+    //             (_isLoginTeacher / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep[i].name == "创建") {
+    //           this.pusaDep[i].value = (
+    //             (this.lightJson.createCourse / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep[i].name == "授课") {
+    //           this.pusaDep[i].value = (
+    //             (_isCourseTeacher / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep[i].name == "评价") {
+    //           this.pusaDep[i].value = (
+    //             (this.lightJson.useEvalution / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         }
+    //       }
+
+    //       this.lightJson1.createProject = cNum4; //创建项目 
+
+    //       let _teacherAndStudent = res.data[19]; //师生协作
+    //       this.lightJson1.useTool = res.data[20][0].count; //项目使用工具
+    //       let _tsCount = 0;
+
+    //       for (var i = 0; i < _teacherAndStudent.length; i++) {
+    //         if (_teacherAndStudent[i].type2) {
+    //           if (
+    //             (_teacherAndStudent[i].type =
+    //               1 && _teacherAndStudent[i].type2.indexOf(2) != -1) ||
+    //             (_teacherAndStudent[i].type =
+    //               2 && _teacherAndStudent[i].type2.indexOf(1) != -1)
+    //           ) {
+    //             _tsCount++;
+    //           }
+    //         }
+    //       }
+
+    //       this.lightJson1.gProjectTeachers = _tsCount;
+
+    //       for (var i = 0; i < this.pusaDep1.length; i++) {
+    //         if (this.pusaDep1[i].name == "登录") {
+    //           this.pusaDep1[i].value = (
+    //             (_isLoginTeacher / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep1[i].name == "创建") {
+    //           this.pusaDep1[i].value = (
+    //             (this.lightJson1.createProject / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep1[i].name == "师生协作") {
+    //           this.pusaDep1[i].value = (
+    //             (this.lightJson1.gProjectTeachers / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep1[i].name == "使用工具") {
+    //           this.pusaDep1[i].value = (
+    //             (this.lightJson1.useTool / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         }
+    //       }
+
+    //       this.$forceUpdate();
+    //     })
+    //     .catch((err) => {
+    //       this.isLoading = false;
+    //       this.$message.error(
+    //         "因加载数据量过大,服务器统计异常,请联系管理员。"
+    //       );
+    //       console.error(err);
+    //     });
+    // },
+    // checkRank() {
+    //       this.courseType = 1;
+    //   this.rankLoading = true;
+    //   let params = [
+    //     {
+    //       oid: this.oid,
+    //       org: this.org,
+    //       cid: this.cTypeRank,
+    //     },
+    //   ];
+    //   this.ajax
+    //     .post(this.$store.state.api + "selectDataboardTeacherRank", params)
+    //     .then((res) => {
+    //       this.rankLoading = false;
+    //       let rankData = [];
+    //       let teachers = res.data[0]; //教师总数
+    //       let loginTimeAll = res.data[1]; //教师总登录时长
+    //       let loginCountAll = res.data[2]; //教师总登录频次
+    //       let courses = res.data[3]; //教师创建及协同课程总数
+    //       let projects = res.data[4]; //教师创建及协同项目总数
+    //       let courseWorks = res.data[5]; //教师创建及协同有作业的课程总数
+    //       let evaWorks = res.data[6]; //教师创建及协同有作业有评价的课程总数
+
+    //       for (let i = 0; i < teachers.length; i++) {
+    //         rankData.push({
+    //           name: teachers[i].name,
+    //           userid: teachers[i].userid,
+    //           classid: teachers[i].cclassid,
+    //           loginTime: 0,
+    //           loginCount: 0,
+    //           courses: 0,
+    //           projects: 0,
+    //           courseWorks: 0,
+    //           worksRate: 0,
+    //           score: 0,
+    //         });
+    //       }
+
+    //       for (var j = 0; j < rankData.length; j++) {
+    //         for (var i = 0; i < loginTimeAll.length; i++) {
+    //           if (loginTimeAll[i].userid == rankData[j].userid) {
+    //             rankData[j].loginTime += parseInt(
+    //               (loginTimeAll[i].text / 60 / 60).toFixed(0)
+    //             );
+    //           }
+    //         }
+
+    //         for (var i = 0; i < loginCountAll.length; i++) {
+    //           if (loginCountAll[i].userid == rankData[j].userid) {
+    //             rankData[j].loginCount++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < courses.length; i++) {
+    //           if (courses[i].userid == rankData[j].userid) {
+    //             rankData[j].courses++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < projects.length; i++) {
+    //           if (projects[i].userid == rankData[j].userid) {
+    //             rankData[j].projects++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < courseWorks.length; i++) {
+    //           if (courseWorks[i].userid == rankData[j].userid) {
+    //             rankData[j].courseWorks++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < evaWorks.length; i++) {
+    //           if (evaWorks[i].userid == rankData[j].userid) {
+    //             rankData[j].worksRate++;
+    //           }
+    //         }
+
+    //         rankData[j].score = (
+    //           rankData[j].loginTime * 0.1 +
+    //           rankData[j].loginCount * 0.1 +
+    //           rankData[j].courses * 0.1 +
+    //           rankData[j].projects * 0.1 +
+    //           rankData[j].courseWorks * 0.3 +
+    //           rankData[j].worksRate * 0.3
+    //         ).toFixed(0);
+    //       }
+
+    //       this.rankData = rankData;
+    //       this.$forceUpdate();
+    //     })
+    //     .catch((err) => {
+    //       this.rankLoading = false;
+    //       this.$message.error(
+    //         "因加载数据量过大,服务器统计异常,请联系管理员。"
+    //       );
+    //       console.error(err);
+    //     });
+    // },
+  },
+};
+</script>
+
+
+<style scoped>
+.body1 {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  padding: 20px;
+  box-sizing: border-box;
+  overflow: hidden;
+  position: relative;
+}
+
+.left {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.left > .top {
+  width: 100%;
+  height: calc(100% / 5 * 2.7 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.left > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.3 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.center {
+  width: calc(100% / 4 * 2 - 20px);
+  height: 100%;
+  margin: 0 10px;
+}
+
+.center > .top {
+  width: 100%;
+  height: calc(100% / 5 * 2.7 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.center > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.3 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.right {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+
+}
+
+.right > .top {
+  width: 100%;
+  height: calc(100% / 5 * 2.7 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.right > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.3 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.titleBox {
+  height: 40px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+  box-sizing: border-box;
+  width: 100%;
+  position: relative;
+}
+
+.titleBox::after {
+  content: '';
+  position: absolute;
+  height: 2px;
+  width: calc(100% - 30px);
+  bottom: 0;
+  background: linear-gradient(90deg, rgba(54, 129, 252, 0.6) 0%, rgba(54, 129, 252, 0.1) 100%);
+}
+
+.title {
+  color: #060e17;
+  margin-right: 25px;
+  font-weight: 700;
+  display: flex;
+  align-items: center;
+	position: relative;
+}
+
+.title::before{
+  content: '';
+  background-image: url('../../../../../assets/icon/test/data_title_icon.png');
+  background-size: 100% 100%;
+  width: 20px;
+  height: 20px;
+  margin-right: 5px;
+}
+
+.dataBox {
+	flex: 1;
+  /* height: calc(100% - 40px); */
+  width: 100%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+
+/* .middleBox {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+} */
+
+
+
+/* .teaMiddle {
+  width: calc(100% / 2 - 10px);
+  height: 60px;
+  border-radius: 8px;
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  justify-content: center;
+  padding: 0 10px;
+  margin: 0 10px;
+} */
+
+/* .teaMiddle {
+  width: calc(100% / 3 - 10px);
+} */
+
+/* .timeDiv {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  margin: 0 0 0 15px;
+} */
+
+/* .timeDiv > div {
+  margin-right: 10px;
+  cursor: pointer;
+} */
+
+/* .cNum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+} */
+
+/* .tNum {
+  background: linear-gradient(
+    180deg,
+    rgb(174, 204, 254, 0.2) 0%,
+    rgb(54, 129, 252, 0.3) 100%
+  ) !important;
+} */
+
+/* .tSum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+} */
+
+/* .teaLeft > div:first-child,
+.teaMiddle > div:first-child {
+  font-size: 12px;
+  font-weight: 400;
+  color: #565e6a;
+} */
+
+/* .teaLeft > div:last-child,
+.teaMiddle > div:last-child {
+  font-size: 22px;
+  font-weight: bold;
+  color: #060e17;
+} */
+
+/* .halfBox {
+  width: 50%;
+} */
+
+/* .isClick {
+  box-sizing: border-box;
+} */
+
+/* .noClick{
+  font-weight: 500;
+  opacity: .6;
+} */
+
+/* .otherCss {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  justify-content: flex-end;
+} */
+
+/* .otherImg {
+  width: 20px;
+  height: 20px;
+  margin: 0 10px;
+  cursor: pointer;
+} */
+
+/* .otherImg > img {
+  width: 100%;
+  height: 100%;
+} */
+
+/* .allBox {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+} */
+
+/* .allBox_left {
+  width: 30%;
+  height: 100%;
+} */
+
+/* .allBox_right {
+  display: flex;
+  flex-wrap: wrap;
+  height: 100%;
+  width: 70%;
+  margin: 0 auto;
+  overflow: hidden;
+  justify-content: space-between;
+} */
+
+/* .depth {
+  width: calc(100% / 4 - 10px);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+} */
+
+/* .depth > span:nth-child(1) {
+  font-size: 14px;
+  font-weight: 700;
+  margin: 0 0 10px;
+} */
+
+/* .depth > div:nth-child(1) {
+} */
+
+.selectBox {
+  width: 100px;
+	position: absolute;
+	right: 20px;
+}
+
+.selectBox >>> .el-input__inner {
+  height: 30px;
+  line-height: 30px;
+  border: 1px solid #3681FC;
+}
+
+.selectBox >>> .el-input__icon {
+  line-height: 30px;
+}
+
+.info_box {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: space-around;
+  width: 90%;
+  margin: 0 auto;
+}
+
+.info_box>.info2,
+.info_box>.info3,
+.info_box>.info {
+  width: calc(50% - 10px);
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  height: 60px;
+  justify-content: center;
+	align-items: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+  margin-top: 10px;
+  border-radius: 5px;
+}
+
+.info_box>.info2 {
+  width: calc(100% / 4 - 10px);
+}
+
+.info_box>.info3 {
+  width: calc(100% / 3 );
+  margin-bottom: 5px;
+}
+
+.info_box>.info2>span:nth-child(1),
+.info_box>.info3>span:nth-child(1),
+.info_box>.info>span:nth-child(1) {
+	font-size: 24px;
+  font-weight: 700;
+}
+
+.info_box>.info2>span:nth-child(2),
+.info_box>.info3>span:nth-child(2),
+.info_box>.info>span:nth-child(2) {
+  font-size: 12px;
+  color: #565e6a;
+  white-space: pre-wrap;
+  word-break: break-all;
+}
+
+</style>

+ 118 - 0
src/components/pages/sz/dataBoardArea/index.vue

@@ -0,0 +1,118 @@
+<template>
+    <div class="body">
+    <div class="db_bg">
+      <div class="db_header">
+				<div class="db_header_title"></div>
+      </div>
+      <div class="db_body">
+				<dataCenter :oid="oid" :org="org"/>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import dataCenter from './dataCenter'
+export default {
+	components:{
+		dataCenter
+	},
+  data() {
+    return {
+      type: 1,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      scourseLength: 0,
+    };
+  },
+  methods: {
+    setType(type) {
+      this.type = type;
+    },
+    getData() {
+			return console.log('获取数据')
+      // this.isLoading = true;
+      // let params = [
+      //   {
+      //     oid: this.oid,
+      //     org: this.org,
+      //   },
+      // ];
+      // this.ajax
+      //   .post(this.$store.state.api + "getCourseLength", params)
+      //   .then((res) => {
+      //     this.isLoading = false;
+
+      //     this.scourseLength = res.data[0][0].count;
+      //     this.$forceUpdate();
+      //   })
+      //   .catch((err) => {
+      //     this.isLoading = false;
+      //     console.error(err);
+      //   });
+    },
+  },
+  mounted() {
+    // this.getData();
+  },
+}
+</script>
+
+<style scoped>
+.body {
+  height: 100%;
+  width: 100%;
+  min-width: 1550px;
+  min-height: 750px;
+  background: #e7f3fe;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.db_bg {
+  width: calc(100% - 30px);
+  height: calc(100% - 30px);
+  /* padding: 10px; */
+  border-radius: 8px;
+  box-sizing: border-box;
+  border: 2px solid #3681FC3D;
+  box-shadow: 20px 20px 80px 0px #3681FC3D inset;
+}
+
+.db_header {
+  width: 100%;
+  height: 50px;
+  display: flex;
+  justify-content: center;
+  position: relative;
+  /* background: #fff; */
+  align-items: center;
+}
+
+.db_header:after {
+  content: "";
+    position: absolute;
+    width: 50%;
+    height: 2px;
+    bottom: 0.5px;
+    left: 50%;
+    z-index: 1;
+    background: linear-gradient(90deg, #9ac1fd 0%, rgba(134, 179, 253, 0) 91.13%);
+}
+
+.db_header_title {
+  /* background-image: url("../../../assets/icon/test/data_title.png"); */
+  background-image: url("../../../../assets/icon/test/data_title2.png");
+  width: 290px;
+  height: 100%;
+  background-size: 100% 100%;
+}
+
+.db_body {
+  height: calc(100% - 50px);
+  width: 100%;
+  overflow: auto;
+  /* background: rgb(231, 242, 252); */
+}
+</style>

+ 179 - 0
src/components/pages/sz/dataBoardCity/dataCenter/chartList/courseNum/index.vue

@@ -0,0 +1,179 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
+      <!-- <div id="cateRank" class="echart" style="width: 100%; height: 100%"></div> -->
+      <highcharts :options="option" style="width: 95%; height: 95%"></highcharts>
+    </div>
+  </div>
+</template>
+
+<script>
+import { Chart } from 'highcharts-vue'
+import HighCharts from 'highcharts'
+//和弦图的引入依赖
+// import column from 'highcharts/modules/column';
+// column(HighCharts);
+
+export default {
+  components: {
+    highcharts: Chart,
+  },
+  props: {
+    weekCourse2: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        data: [],
+      },
+      option: {
+        chart: {
+          type: 'column',
+          backgroundColor: 'rgba(0,0,0,0)'
+        },
+        title: {
+          text: null
+        },
+        credits: {
+          enabled: false//不显示LOGO
+        },
+        xAxis: {
+          categories: [
+          ]
+        },
+        yAxis: [{
+          allowDecimals: false,
+          min: 0,
+          title: {
+            text: '课程总数'
+          }
+        },
+          // {
+          //   title: {
+          //     text: '项目总数'
+          //   },
+          //   opposite: true
+          // }
+        ],
+        legend: {
+          shadow: false
+        },
+        tooltip: {
+          shared: true
+        },
+        plotOptions: {
+          column: {
+            grouping: false,
+            shadow: false,
+            borderWidth: 0,
+            dataLabels: {
+              enabled: true,  //显示数量提示
+              color: '#000000',
+              formatter : function() {
+                var employee = this.point.series.chart.series[0].yData[this.point.index];
+                var optimizedEmployee = this.point.series.chart.series[1].yData[this.point.index];
+                var employeePercentage = 0;
+                if(optimizedEmployee > employee){
+                  employeePercentage = ((optimizedEmployee - employee) / optimizedEmployee) * 100
+                }
+                if (this.series.name === '本月课程总数') {
+                  return  employeePercentage.toFixed(1) + '%';
+                } else {
+                  return '';
+                }
+              }
+            }
+          }
+        },
+        series: [{
+          name: '上月课程总数',
+          color: '#96D8A8',
+          data: [],
+          pointPadding: 0.3, // 通过 pointPadding 和 pointPlacement 控制柱子位置
+          // pointPlacement: -0.2
+        }, {
+          name: '本月课程总数',
+          color: '#5E9AFC',
+          data: [],
+          pointPadding: 0.4,
+          // pointPlacement: -0.2
+        },
+          //  {
+          //   name: '上周项目总数',
+          //   color: 'rgba(248,161,63,1)',
+          //   data: [153, 178, 195],
+          //   pointPadding: 0.3,
+          //   pointPlacement: 0.2,
+          //   yAxis: 1  // 指定数据列所在的 yAxis
+          // }, {
+          //   name: '本周项目总数',
+          //   color: 'rgba(186,60,61,.9)',
+          //   data: [203, 198, 208],
+          //   pointPadding: 0.4,
+          //   pointPlacement: 0.2,
+          //   yAxis: 1
+          // }
+        ]
+      }
+    };
+  },
+  methods: {
+    setChart() {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = Highcharts.chart('cateRank', this.option);
+        // 初始化雷达图
+        // this.chartObj = chartObj;
+        // this.chartObj.setOption(this.option);
+      });
+    },
+    setArray(array) {
+      this.option.xAxis.categories = []
+      this.option.series[0].data = []
+      this.option.series[1].data = []
+      for (var i = 0; i < array.length; i++) {
+        this.option.xAxis.categories.push(array[i].name)
+        this.option.series[0].data.push(array[i].lastCourse)
+        this.option.series[1].data.push(array[i].toCourse)
+      }
+    }
+  },
+  watch: {
+    weekCourse2: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.weekCourse2)
+    // this.setChart();
+
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+</style>

+ 126 - 0
src/components/pages/sz/dataBoardCity/dataCenter/chartList/courseRank/index.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%;height: calc(100% - 30px); margin-top: 15px;overflow: auto;">
+      <el-table :data="tableData" style="width: 100%" height="100%" :header-cell-style="{ background: '#E0EAFB',color: '#000' }"
+        :row-class-name="tableRowClassName" class="tableClass">
+        <el-table-column label="排名" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column prop="courseName" label="课程名称" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="compare" label="较上周" min-width="80" align="center">
+					<template slot-scope="scope">
+						<div>
+							<!-- {{ Math.abs(scope.row.compare) }} -->
+							<div v-if="scope.row.compare>0" class="el-icon-top compareDown">{{ Math.abs(scope.row.compare) }}</div>
+							<div v-if="scope.row.compare==0">{{ Math.abs(scope.row.compare) }}</div>
+							<div v-if="scope.row.compare<0" class="el-icon-bottom compareUp">{{ Math.abs(scope.row.compare) }}</div>
+						</div>
+					</template>
+        </el-table-column>
+        <el-table-column prop="total" label="上课人次" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    rankData: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      tableData: [],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    setArray(array){
+      this.tableData = JSON.parse(JSON.stringify(array))
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.total - a.total;
+      })
+    }
+  },
+  watch: {
+    rankData: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.rankData)
+  },
+};
+</script>
+
+<style scoped>
+.el-table>>>.even_row {
+  background-color: #f2f7ff !important;
+}
+
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
+
+.data_body div::-webkit-scrollbar {
+    /*滚动条整体样式*/
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-track {
+    border-radius: 10px;
+    background-color: #fff;
+}
+
+/*定义滑块 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    -webkit-box-shadow: inset 0 0 6px #AECCFE;
+    background-color: #AECCFE;
+}
+
+.compareUp{
+	color: #17C469;
+	letter-spacing: 5px;
+}
+
+.compareDown{
+	color: #EE3E3E;
+	background-color: #FFDDDD;
+	padding: 5px 10px;
+	letter-spacing: 5px;
+	border-radius: 3px;
+}
+
+</style>

+ 167 - 0
src/components/pages/sz/dataBoardCity/dataCenter/chartList/loginTime/index.vue

@@ -0,0 +1,167 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%; "></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        yearArray: {
+            type: String,
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                sdata: [],
+            },
+            option: {
+                series: [
+                    {
+                        type: 'gauge',
+                        startAngle: 180,
+                        endAngle: 0,
+                        center: ['50%', '75%'],
+                        radius: '150%',
+                        min: 0,
+                        max: 4000,
+                        splitNumber: 8,
+                        axisLine: {
+                            lineStyle: {
+                                width: 10,
+                                color: [
+                                    [0.25, 'rgb(251, 223, 148)'],
+                                    [0.5, 'rgb(145, 208, 237)'],
+                                    [0.75, 'rgb(68, 96, 193)'],
+                                    [1, 'rgb(240, 141, 158)']
+                                ]
+                            }
+                        },
+                        pointer: {
+                            icon: 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z',
+                            length: '12%',
+                            width: 12,
+                            offsetCenter: [0, '-60%'],
+                            itemStyle: {
+                                color: 'auto'
+                            }
+                        },
+                        axisTick: {
+                            length: 6,
+                            lineStyle: {
+                                color: 'auto',
+                                width: 2
+                            }
+                        },
+                        splitLine: {
+                            length: 20,
+                            lineStyle: {
+                                color: 'auto',
+                                width: 5
+                            }
+                        },
+                        axisLabel: {
+                            show:false
+                        },
+                        title:{
+                            show:false
+                        },
+                        title: {
+                            offsetCenter: [0, '10%'],
+                            fontSize: 20
+                        },
+                        detail: {
+                            fontSize: 30,
+                            offsetCenter: [0, '-15%'],
+                            color: 'inherit'
+                        },
+                        data: [
+                            {
+                                value: 0,
+                                name: '深度使用'
+                            }
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(option) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    //劳动课程
+                    this.$el.querySelector("#charts_canvas")
+                );
+
+                // this.option.xAxis.data = option.xdata;
+                this.option.series[0].data[0].value = this.yearArray;
+                // this.option.visualMap.max = option.max ? option.max : 0;
+
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+    },
+    watch: {
+        yearArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.ooption = {
+                    xdata: [],
+                    sdata: [],
+                    max: 0
+                }
+                let _array = newValue
+                if (!this.chartObj) {
+                    this.setChart(this.ooption);
+                } else {
+                    this.option.series[0].data[0].value = this.yearArray;
+                    // this.option.xAxis.data = this.ooption.xdata;
+                    // this.option.series[0].data[0] = this.ooption.sdata;
+                    // this.option.visualMap.max = this.ooption.max ? this.ooption.max : 0;
+                    this.chartObj.setOption(this.option);
+                }
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        
+
+        this.setChart(this.ooption);
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    position: relative;
+    border-radius: 5px;
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 95%;
+    /* background: #fff; */
+}
+</style>
+  

+ 112 - 0
src/components/pages/sz/dataBoardCity/dataCenter/chartList/schoolRank/index.vue

@@ -0,0 +1,112 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%;height: calc(100% - 30px); margin-top: 15px;overflow: auto;">
+      <el-table :data="tableData" style="width: 100%" height="100%" :header-cell-style="{ background: '#E0EAFB',color: '#000' }"
+        :row-class-name="tableRowClassName" class="tableClass">
+        <el-table-column label="排名" min-width="50" align="center">
+          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+        </el-table-column>
+        <el-table-column prop="schoolName" label="学校名称" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="area" label="区域" min-width="90" align="center">
+        </el-table-column>
+        <el-table-column prop="teacherLogin" label="教师登录" min-width="90" align="center">
+        </el-table-column>
+				<el-table-column prop="studentLogin" label="学生登录" min-width="90" align="center">
+        </el-table-column>
+        <el-table-column prop="teaching" label="授课次数" min-width="90" align="center">
+        </el-table-column>
+        <el-table-column prop="submitJob" label="提交作业" min-width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="score" label="综合得分" min-width="80" align="center">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    rankData: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      tableData: [],
+    };
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    setArray(array){
+      this.tableData = JSON.parse(JSON.stringify(array))
+      this.tableData = this.tableData.sort(function(a,b){
+        return b.score - a.score;
+      })
+    }
+  },
+  watch: {
+    rankData: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setArray(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setArray(this.rankData)
+  },
+};
+</script>
+
+<style scoped>
+.el-table>>>.even_row {
+  background-color: #f2f7ff !important;
+}
+
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+
+.tableClass >>> td, .tableClass >>> th{
+  padding: 5px 0;
+}
+
+.data_body div::-webkit-scrollbar {
+    /*滚动条整体样式*/
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-track {
+    border-radius: 10px;
+    background-color: #fff;
+}
+
+/*定义滑块 内阴影+圆角*/
+.data_body div::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    -webkit-box-shadow: inset 0 0 6px #AECCFE;
+    background-color: #AECCFE;
+}
+</style>

+ 140 - 0
src/components/pages/sz/dataBoardCity/dataCenter/chartList/teaFre/index.vue

@@ -0,0 +1,140 @@
+<template>
+  <div class="data_body">
+    <div style="width: 100%; height: 100%">
+      <div
+        id="charts_canvas"
+        class="echart"
+        style="width: 100%; height: 100%"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    monthArray: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      chartObj: null,
+      ooption: {
+        xdata: [],
+        login: [],
+      },
+      option: {
+        tooltip: {
+          trigger: "axis",
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: true,
+          // data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+        },
+        yAxis: {
+          type: "value",
+          minInterval: 1
+        },
+        grid: {
+          top: "30",
+          left: "5%",
+          right: "5%",
+          bottom: "5%",
+          containLabel: true,
+        },
+        series: [
+          {
+            // data: [820, 932, 901, 934, 1290, 1330, 1320],
+            data: [],
+            type: "line",
+            areaStyle: {},
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return "#106bff";
+                },
+              },
+            },
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    setChart(option) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.xAxis.data = option.xdata;
+        this.option.series[0].data = option.login;
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    setJson(array) {
+      this.ooption = {
+        xdata: [],
+        login: [],
+      }
+      let _array = array
+      for (var i = 0; i < _array.length; i++) {
+        this.ooption.xdata.push(_array[i].Month + '月')
+        this.ooption.login.push(_array[i].login)
+      }
+
+      if (!this.chartObj) {
+        this.setChart(this.ooption);
+      } else {
+        this.option.xAxis.data = this.ooption.xdata;
+        this.option.series[0].data = this.ooption.login;
+        this.chartObj.setOption(this.option);
+      }
+    }
+  },
+  watch: {
+    monthArray: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        this.setJson(newValue)
+        this.$forceUpdate();
+      },
+    },
+  },
+  mounted() {
+    this.setJson(this.monthArray)
+
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  height: 100%;
+  /* display: flex; */
+  position: relative;
+  border-radius: 5px;
+  /* border: 1px solid #eee; */
+  margin: 0 auto;
+  box-sizing: border-box;
+  padding: 0;
+  width: 95%;
+  /* background: #fff; */
+}
+</style>

+ 215 - 0
src/components/pages/sz/dataBoardCity/dataCenter/chartList/toolUser/index.vue

@@ -0,0 +1,215 @@
+<template>
+  <div class="data_body">
+    <!-- <img src="../../assets/dataimage/1.png" style="width:90%" /> -->
+    <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["Josn"],
+  data() {
+    return {
+      mindV: true,
+      chartObj: null,
+      timer: null,
+      range: "",
+      ooption: [],
+      option: {
+        // title: {
+        //   top: 30,
+        //   left: 'center',
+        //   text: '作业提交热力图'
+        // },
+        tooltip: {
+          formatter: function (p) {
+            const format = p.data[0];
+            return format + ' ' + p.data[1]+'次';
+          }
+        },
+        visualMap: {
+          top: 'center',
+          left: 10,
+          right: 0,
+          min: 0,
+          max: 0,
+          type: 'continuous',
+          inRange: {
+            color: ['#65b9fc', '#477cd7']
+          },
+          precision: 0,
+          calculable: true,
+        },
+        calendar: {
+          top: 'center',
+          left: 80,
+          right: 20,
+          cellSize: ["auto", 15],
+          range: "",
+          itemStyle: {
+            borderWidth: 0.5,
+          },
+          yearLabel: { show: false },
+          dayLabel: {
+            show: true,
+          },
+        },
+        series: {
+          type: 'heatmap',
+          coordinateSystem: 'calendar',
+          data: ''
+        }
+      },
+    };
+  },
+  methods: {
+    gettime() {
+      var time = new Date();
+      // time=time.setDate(time.getDate()+1);
+      // time = new Date(time);
+      // time.setTime(time.getTime());
+      var s2 = time.getFullYear() + "-" + ((time.getMonth() + 1) < 10 ? '0' + (time.getMonth() + 1) : (time.getMonth() + 1)) + "-"
+        + ((time.getDate()) < 10 ? '0' + (time.getDate()) : (time.getDate()));
+      var monthNum = 3; //要减的月数(6)自己定义
+      var dateArr = s2.split('-'); //s2当前时间
+      var year = dateArr[0]; //获取当前日期的年份
+      var month = dateArr[1]; //获取当前日期的月份
+      var day = dateArr[2]; //获取当前日期的日
+      var days = new Date(year, month, 0);
+      days = days.getDate(); //获取当前日期中月的天数
+      var year2 = year;
+      var month2 = parseInt(month) - monthNum;
+      if (month2 <= 0) {
+        // year2 = parseInt(year2) - parseInt(month2 / 12 == 0 ? 1 : parseInt(month2) / 12);
+        year2 = parseInt(year2) - 1;
+        month2 = 12 - (Math.abs(month2) % 12);
+      }
+      var day2 = day;
+      var days2 = new Date(year2, month2, 0);
+      days2 = days2.getDate();
+      if (day2 > days2) {
+        day2 = days2 < 10 ? '0' + days2 : days2;
+      }
+      if (month2 < 10) {
+        month2 = '0' + month2;
+      }
+      var t2 = year2 + '-' + month2 + '-' + day2;
+      return [t2, s2]
+    },
+    setChart(option, year) {
+      // 雷达图显示的标签
+      let newPromise = new Promise((resolve) => {
+        resolve();
+      });
+      //然后异步执行echarts的初始化函数
+      newPromise.then(() => {
+        const chartObj = this.$echarts.init(
+          //劳动课程
+          this.$el.querySelector("#charts_canvas")
+        );
+        this.option.series.data = option;
+        this.option.calendar.range = year;
+        // this.option.visualMap.max = Object.keys(this.Josn).length + (10 - (Object.keys(this.Josn).length % 10));
+        let array = []
+        for(var i = 0; i < Object.keys(this.Josn).length; i++){
+          array.push(this.Josn[Object.keys(this.Josn)[i]])
+        }
+        this.option.visualMap.max = array.sort(function (a, b) {
+          return b - a;
+        })[0];
+        // 初始化雷达图
+        this.chartObj = chartObj;
+        this.chartObj.setOption(this.option);
+      });
+    },
+    getVirtualData(year) {
+      const date = +this.$echarts.time.parse(year[0]);
+      const end = +this.$echarts.time.parse(year[1]);
+      const dayTime = 3600 * 24 * 1000;
+      const data = [];
+      for (let time = date; time <= end; time += dayTime) {
+        let a = this.$echarts.time.format(time, '{yyyy}-{MM}-{dd}', false)
+        if (this.Josn[a]) {
+          data.push([a, this.Josn[a]]);
+        } else {
+          data.push([a, null]);
+        }
+      }
+      return data;
+    },
+    setData() {
+      let year = Object.keys(this.Josn)[0].split('-')[0];
+      var t = this.gettime();
+      this.ooption = this.getVirtualData(t)
+      if (!this.chartObj) {
+        this.setChart(this.ooption, t);
+      } else {
+        this.option.series.data = this.ooption;
+        this.option.calendar.range = t;
+        let array = []
+        for(var i = 0; i < Object.keys(this.Josn).length; i++){
+          array.push(this.Josn[Object.keys(this.Josn)[i]])
+        }
+        this.option.visualMap.max = array.sort(function (a, b) {
+          return b - a;
+        })[0];
+        this.chartObj.setOption(this.option, t);
+      }
+    },
+  },
+  watch: {
+    Josn: {
+      handler: function (newVal, oldVal) { 
+        this.setData();
+       },
+      deep: true,
+    },
+  },
+  beforeDestroy() {
+    window.removeEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+  mounted() {
+    this.setData();
+    var _this = this;
+    window.addEventListener("resize", () => {
+      if (_this.chartObj) {
+        _this.chartObj.resize();
+      }
+    });
+  },
+  beforeDestroy() {
+    // clearInterval(this.timer);
+    // this.timer = null
+  },
+};
+</script>
+
+<style scoped>
+.data_body {
+  /* display: flex; */
+  /* flex-direction: column; */
+  width: 100%;
+  height: 170px;
+  /* height: 500px; */
+  /* margin: 15px 5px 0 0; */
+  /* background: #fff; */
+  overflow: hidden;
+  flex-shrink: 0;
+  position: relative;
+}
+
+.noMind {
+  position: absolute;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100%;
+  z-index: 999;
+  /* background: #fff; */
+}
+</style>

+ 1336 - 0
src/components/pages/sz/dataBoardCity/dataCenter/index.vue

@@ -0,0 +1,1336 @@
+<template>
+  <div class="body1">
+    <!-- <loading :isLoading="isLoading"></loading> -->
+    <!-- 教师数据 -->
+    <div class="left">
+      <div class="top">
+				<div class="titleBox">
+          <div class="title">在线时长</div>
+        </div>
+				<div class="info_box">
+          <div class="info">
+						<span>{{ OnlineDuration[0] }}</span>
+            <span>累计时长</span>
+          </div>
+          <div class="info">
+						<span>{{ OnlineDuration[1] }}</span>
+            <span>人均使用时长</span>
+          </div>
+        </div>
+				<div class="dataBox">
+					<loginTime style="height: calc(100% - 100px);width: calc(100% - 100px);" :yearArray="yearArray"></loginTime>
+        </div>
+      </div>
+      <div class="bottom">
+				<div class="titleBox">
+          <div class="title">登录频次</div>
+        </div>
+				<div class="info_box">
+          <div class="info2">
+						<span>{{ LoginFrequency[0] }}</span>
+            <span>登录频次</span>
+          </div>
+          <div class="info2">
+						<span>{{ LoginFrequency[1] }}</span>
+            <span>教师登录频次</span>
+          </div>
+					<div class="info2">
+						<span>{{ LoginFrequency[2] }}</span>
+            <span>学生登录频次</span>
+          </div>
+					<div class="info2">
+						<span>{{ LoginFrequency[3] }}</span>
+            <span>人均登录频次</span>
+          </div>
+        </div>
+				<div class="dataBox">
+					<toolUser style="height: calc(100% - 50px);width: calc(100% - 50px)" :Josn="loginCountYearArray"/>
+        </div>
+      </div>
+    </div>
+    <div class="center">
+      <div class="top">
+				<div class="titleBox">
+          <div class="title">上课次数</div>
+        </div>
+				<div class="dataBox">
+         <courseNum style="height: calc(100% - 50px);width: calc(100% - 50px)" :weekCourse2="weekCourse2"/>
+        </div>
+      </div>
+      <div class="bottom">
+				<div class="titleBox">
+          <div class="title">学校排行榜</div>
+					<el-select v-model="selectArea2" @change="typeChangeArea2" class="selectBox">
+            <!-- <el-option label="全部" value=""></el-option> -->
+            <el-option label="南山区" :value="0"></el-option>
+          </el-select>
+        </div>
+				<div class="dataBox">
+         <schoolRank :rankData="schoolRankData"/>
+        </div>
+      </div>
+    </div>
+    <div class="right">
+      <div class="top" style="border-radius: 5px">
+				<div class="titleBox">
+          <div class="title">基础概况</div>
+        </div>
+				<div class="info_box">
+          <div class="info3">
+						<span>{{ BasicOverview[0] }}</span>
+            <span>用户总数(个)</span>
+          </div>
+          <div class="info3">
+						<span>{{ BasicOverview[1] }}</span>
+            <span>新增用户(个)</span>
+          </div>
+					<div class="info3">
+						<span>{{ BasicOverview[2] }}</span>
+            <span>本月新增登录(次)</span>
+          </div>
+        </div>
+				<div class="dataBox">
+					<TeaFre style="height: calc(100% - 50px)" :monthArray="monthArray"/>
+        </div>
+      </div>
+      <div class="bottom">
+				<div class="titleBox">
+          <div class="title">课程排行榜</div>
+					<el-select v-model="selectArea2" @change="typeChangeArea2" class="selectBox">
+            <!-- <el-option label="全部" value=""></el-option> -->
+            <el-option label="南山区" :value="0"></el-option>
+          
+          </el-select>
+        </div>
+				<div class="dataBox">
+         <courseRank :rankData="courseRankData"/>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import loginTime from './chartList/loginTime'
+import toolUser from './chartList/toolUser'
+import TeaFre from './chartList/teaFre'
+import schoolRank from './chartList/schoolRank'
+import courseRank from './chartList/courseRank'
+import courseNum from './chartList/courseNum'
+export default {
+  components: {
+		loginTime,
+		toolUser,
+		TeaFre,
+		schoolRank,
+		courseRank,
+		courseNum
+  //   TeaFre,
+  //   TeaAct,
+  //   TeaData,
+  //   FunPlot,
+  //   WorkNum,
+  //   WorkTime,
+  //   ToolUse,
+  
+  //   TeaActSecond,
+  //   CateRank,
+  //   loading
+  },
+  props: {
+    oid: {
+      type: String,
+    },
+    org: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      isLoading: false,
+			selectArea:0,//学校排行切换区域下拉框
+			selectArea2:0,//课程排行切换区域下拉框
+			yearArray:"0",
+			OnlineDuration:['0','0'],
+			BasicOverview:['0','0','0'],
+			LoginFrequency:['0','0','0','0'],
+			loginCountYearArray:{
+				"2023-12-06":1,
+				"2023-12-07":1,
+				"2023-12-13":1,
+				"2023-12-18":1,
+				"2023-12-19":1,
+				"2023-12-22":1,
+				"2023-12-24":1,
+				"2023-12-25":1,
+				"2023-12-26":1,
+				"2024-01-02":2,
+				"2024-01-03":1,
+				"2024-01-04":1,
+				"2024-01-08":2,
+				"2024-01-09":1,
+				"2024-01-10":1,
+				"2024-01-11":1,
+				"2024-01-12":1,
+				"2024-01-19":1,
+				"2024-01-20":1,
+				"2024-01-22":2,
+				"2024-01-23":2,
+				"2024-01-24":2,
+				"2024-01-25":1,
+				"2024-01-30":1,
+				"2024-01-31":1,
+				"2024-02-01":2,
+				"2024-02-02":1,
+				"2024-02-05":2,
+				"2024-02-06":1,
+				"2024-02-07":1,
+				"2024-02-08":1,
+				"2024-02-19":1,
+				"2024-02-20":1,
+				"2024-02-21":1,
+				"2024-02-22":1,
+				"2024-02-23":2,
+				"2024-02-24":1,
+				"2024-02-25":1,
+				"2024-02-26":1,
+				"2024-02-27":1,
+				"2024-02-28":1,
+				"2024-03-04":1,
+				"2024-03-05":1,
+				"2024-03-07":1
+			},
+			monthArray:[{"Year":2023,"Month":6,"login":210},{"Year":2023,"Month":7,"login":350},{"Year":2023,"Month":8,"login":140},{"Month":9,"Year":2023,"login":80},{"Month":10,"Year":2023,"login":280}],
+			schoolRankData:[
+				{schoolName:"深圳市南山实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"海滨实验小学逾...",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+				{schoolName:"深圳市海滨实验小学",area:"南山区",teacherLogin:0,studentLogin:0,teaching:0,submitJob:0,score:0},
+			],
+			courseRankData:[
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+				{courseName:"深圳市人工智能课程1",compare:0,total:0},
+			],
+			weekCourse2:[
+				{
+					name:"三年级",
+					lastCourse:1.5,
+					toCourse:3.1
+				},
+				{
+					name:"四年级",
+					lastCourse:2.9,
+					toCourse:4
+				},
+				{
+					name:"五年级",
+					lastCourse:2,
+					toCourse:3.9
+				},
+				{
+					name:"六年级",
+					lastCourse:0.2,
+					toCourse:4
+				},
+				{
+					name:"七年级",
+					lastCourse:1.2,
+					toCourse:3
+				},
+				{
+					name:"八年级",
+					lastCourse:1.7,
+					toCourse:3.5
+				},
+				{
+					name:"数据",
+					lastCourse:3,
+					toCourse:2
+				},
+			],
+    //   skType: 0,
+    //   courseType: 0,
+    //   bType: 0,
+    //   sType: 0,
+    //   cType4: "grade",
+    //   cType: "1",
+    //   oType: false,
+    //   teacherNum: 0,
+    //   allLoginTeacher: 0,
+    //   teacherNumCountMonthArray: [],
+    //   teacherLoginCountMonthArray: [],
+    //   tedurArray: [],
+    //   allTime: 0,
+    //   workTime: [],
+    //   gradeTime: [],
+    //   subjectTime: [],
+    //   themeListTime: [],
+    //   loginCountYearArray: {},
+    //   courseArray: [],
+    //   _courseArray: [],
+    //   _course2: [],
+    //   courseNumberArray: [],
+    //   gradeArray: [],
+    //   subjectArray: [],
+    //   themeArray: [],
+    //   allArray: [],
+    //   workNumList: [],
+    //   allCourse: 0,
+    //   allProject: 0,
+    //   lightJson: {
+    //     teachers: 0,
+    //     createCourse: 0, //创建课程
+    //     gCourseTeachers: 0, //协同教研
+    //     useTemplate: 0, //使用模板
+    //     commentTeachers: 0, //互动交流
+    //     useTool: 0, //使用工具
+    //     useEvalution: 0, //实施评价
+    //     evaWorksCount: 0, //教学评一体化
+    //   },
+    //   lightJson1: {
+    //     teachers: 0,
+    //     createProject: 0, //创建项目
+    //     gProjectTeachers: 0, //师生协作
+    //     useTemplate: 0, //使用模板
+    //     commentTeachers: 0, //互动交流
+    //     useTool: 0, //使用工具
+    //   },
+    //   pusaDep: [
+    //     { value: 0, name: "登录" },
+    //     { value: 0, name: "创建" },
+    //     { value: 0, name: "授课" },
+    //     { value: 0, name: "评价" },
+    //   ],
+    //   pusaDep1: [
+    //     { value: 0, name: "登录" },
+    //     { value: 0, name: "创建" },
+    //     { value: 0, name: "师生协作" },
+    //     { value: 0, name: "使用工具" },
+    //   ],
+    //   rankData: [],
+    //   rankLoading: false,
+    //   cTypeRank: "",
+    //   classList: [],
+    };
+  },
+  mounted() {
+    // this.getData();
+  },
+  methods: {
+		typeChangeArea(){
+			console.log(this.selectArea)
+		},
+		typeChangeArea2(){
+			console.log(this.selectArea2)
+		}
+    // otherEchart() {
+    //   this.oType = !this.oType;
+    // },
+    // format(percentage) {
+    //   return percentage + "%";
+    // },
+    // typeChange() {
+    //   if (this.cType4 === "") {
+    //     this.courseNumberArray = this.allArray;
+    //   } else if (this.cType4 === "grade") {
+    //     this.courseNumberArray = this.gradeArray;
+    //   } else if (this.cType4 === "theme") {
+    //     this.courseNumberArray = this.themeArray;
+    //   } else if (this.cType4 === "subject") {
+    //     this.courseNumberArray = this.subjectArray;
+    //   }
+    //   this.$forceUpdate();
+    // },
+    // typeChange2() {
+    //   let _grade = JSON.parse(JSON.stringify(this._grade)); //年级
+    //   let _subject = JSON.parse(JSON.stringify(this._subject)); //学科
+    //   let _course = JSON.parse(JSON.stringify(this._courseArray));
+    //   let _course2 = JSON.parse(JSON.stringify(this._course2));
+    //   let _gradeCourse = 0; //各年级上传课程
+    //   let _subjectCourse = 0; //各学科上传课程
+    //   let _courseArray = [];
+    //   // _subject.push({ name: "其他" });
+
+    //   if (this.cType == "1") {
+    //     for (var i = 0; i < _grade.length; i++) {
+    //       _courseArray.push({
+    //         name: _grade[i].name,
+    //         id: _grade[i].id,
+    //         courseid: [],
+    //         subject: [],
+    //       });
+    //       for (var z = 0; z < _course.length; z++) {
+    //         if (_course[z].typeid && _course[z].typeid.indexOf(_grade[i].id) !== -1) {
+    //           _gradeCourse++;
+    //           if (
+    //             _courseArray[i].courseid.indexOf(_course[z].courseid) === -1
+    //           ) {
+    //             _courseArray[i].courseid.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+    //       for (var j = 0; j < _subject.length; j++) {
+    //         _courseArray[i].subject.push({
+    //           name: _subject[j].name,
+    //           id: _subject[j].id,
+    //           course: 0,
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (
+    //             _course[z].typeid && _course[z].typeid.indexOf(_subject[j].id) !== -1 &&
+    //             _courseArray[i].courseid.indexOf(_course[z].courseid) !== -1
+    //           ) {
+    //             _courseArray[i].subject[j].course++;
+    //           }
+    //         }
+    //       }
+    //       let sum = 0;
+    //       for (var j = 0; j < _courseArray[i].subject.length - 1; j++) {
+    //         sum += _courseArray[i].subject[j].course;
+    //       }
+    //       // _courseArray[i].subject[_courseArray[i].subject.length - 1].course =
+    //       //   _courseArray[i].courseid.length - sum < 0
+    //       //     ? 0
+    //       //     : _courseArray[i].courseid.length - sum;
+    //     }
+    //   } else {
+    //     for (var i = 0; i < _grade.length; i++) {
+    //       _courseArray.push({
+    //         name: _grade[i].name,
+    //         id: _grade[i].id,
+    //         courseid: [],
+    //         subject: [],
+    //       });
+    //       for (var z = 0; z < _course2.length; z++) {
+    //         if (_course2[z].typeid && _course2[z].typeid.indexOf(_grade[i].id) !== -1) {
+    //           if (
+    //             _courseArray[i].courseid.indexOf(_course2[z].courseid) === -1
+    //           ) {
+    //             _courseArray[i].courseid.push(_course2[z].courseid);
+    //           }
+    //         }
+    //       }
+    //       for (var j = 0; j < _subject.length; j++) {
+    //         _courseArray[i].subject.push({
+    //           name: _subject[j].name,
+    //           id: _subject[j].id,
+    //           course: 0,
+    //         });
+    //         for (var z = 0; z < _course2.length; z++) {
+    //           if (
+    //             _course2[z].typeid && _course2[z].typeid.indexOf(_subject[j].id) !== -1 &&
+    //             _courseArray[i].courseid.indexOf(_course2[z].courseid) !== -1
+    //           ) {
+    //             if (this.cType == "0") {
+    //               _courseArray[i].subject[j].course += _course2[z].text
+    //                 ? parseInt((parseInt(_course2[z].text) / 3600).toFixed(0))
+    //                 : 0;
+    //             } else if (this.cType == "2") {
+    //               if (_course2[z].course_teacher.split(",").length > 0) {
+    //                 _courseArray[i].subject[j].course++;
+    //               }
+    //             } else if (this.cType == "3") {
+    //               if (_course2[z].worksCount > 0) {
+    //                 _courseArray[i].subject[j].course++;
+    //               }
+    //             } else if (this.cType == "4") {
+    //               if (_course2[z].evaCount > 0) {
+    //                 _courseArray[i].subject[j].course++;
+    //               }
+    //             }
+    //           }
+    //         }
+    //       }
+    //     }
+    //   }
+    //   // for (var j = 0; j < _subject.length; j++) {
+    //   //   for (var z = 0; z < _course.length; z++) {
+    //   //     if (_course[z].typeid == _subject[j].id) {
+    //   //       _subjectCourse++;
+    //   //     }
+    //   //   }
+    //   // }
+    //   this.courseArray = _courseArray;
+    //   this.$forceUpdate();
+    // },
+    // getData() {
+    //   this.isLoading = true;
+    //   let params = [
+    //     {
+    //       oid: this.oid,
+    //       org: this.org,
+    //     },
+    //   ];
+    //   this.ajax
+    //     .post(this.$store.state.api + "selectDataBoardTeacherNew", params)
+    //     .then((res) => {
+    //       this.isLoading = false;
+    //       let _grade = res.data[0]; //年级
+    //       let _subject = res.data[1]; //学科
+    //       this._grade = JSON.parse(JSON.stringify(_grade));
+    //       this._subject = JSON.parse(JSON.stringify(_subject));
+    //       let _themeList = res.data[2]; //主题
+    //       this.teacherNum = res.data[3][0].count; //教师总数
+    //       let _teacherNumYear = res.data[4]; //半年内教师数量
+    //       let _teacherLoginYear = res.data[5]; //半年内登录教师
+    //       let _classList1 = res.data[21]; //班级
+    //       this.classList = _classList1.filter((el) => {
+    //         return el.count > 0;
+    //       });
+    //       // this.cTypeRank = _classList1[0].id
+    //       //将数据根据time里面的月份分成多个数组
+    //       let teacherNumCountMonthArray = [];
+    //       let teacherLoginCountMonthArray = [];
+    //       const date = new Date();
+    //       var Month = date.getMonth() + 1;
+    //       var Year = date.getFullYear();
+    //       for (var i = Month; i > Month - 6; i--) {
+    //         if (i <= 0) {
+    //           teacherNumCountMonthArray.push({
+    //             Year: Year - 1,
+    //             Month: 12 + i,
+    //             num: 0,
+    //           });
+    //           teacherLoginCountMonthArray.push({
+    //             Year: Year - 1,
+    //             Month: 12 + i,
+    //             login: 0,
+    //           });
+    //         } else {
+    //           teacherNumCountMonthArray.push({
+    //             Month: i,
+    //             Year: Year,
+    //             num: 0,
+    //           });
+    //           teacherLoginCountMonthArray.push({
+    //             Month: i,
+    //             Year: Year,
+    //             login: 0,
+    //           });
+    //         }
+    //       }
+
+    //       teacherNumCountMonthArray = teacherNumCountMonthArray.reverse();
+    //       teacherLoginCountMonthArray = teacherLoginCountMonthArray.reverse();
+    //       for (var i = 0; i < _teacherNumYear.length; i++) {
+    //         let _date = new Date(_teacherNumYear[i].time);
+    //         var _month = _date.getMonth() + 1;
+    //         var _year = _date.getFullYear();
+    //         for (var j = 0; j < teacherNumCountMonthArray.length; j++) {
+    //           if (
+    //             _month == teacherNumCountMonthArray[j].Month &&
+    //             _year == teacherNumCountMonthArray[j].Year
+    //           ) {
+    //             teacherNumCountMonthArray[j].num+=_teacherNumYear[i].usernum;
+    //             break;
+    //           }
+    //         }
+    //       }
+    //       for (var i = 0; i < _teacherLoginYear.length; i++) {
+    //         let _date = new Date(_teacherLoginYear[i].time);
+    //         var _month = _date.getMonth() + 1;
+    //         var _year = _date.getFullYear();
+    //         for (var j = 0; j < teacherLoginCountMonthArray.length; j++) {
+    //           if (
+    //             _month == teacherLoginCountMonthArray[j].Month &&
+    //             _year == teacherLoginCountMonthArray[j].Year
+    //           ) {
+    //             teacherLoginCountMonthArray[j].login+=_teacherLoginYear[i].usernum;
+    //             break;
+    //           }
+    //         }
+    //       }
+    //       var allLoginTeacher = 0;
+    //       for (var i = 0; i < teacherLoginCountMonthArray.length; i++) {
+    //         allLoginTeacher += teacherLoginCountMonthArray[i].login;
+    //       }
+
+    //       this.allLoginTeacher = allLoginTeacher;
+    //       this.teacherNumCountMonthArray = teacherNumCountMonthArray;
+    //       this.teacherLoginCountMonthArray = teacherLoginCountMonthArray;
+
+    //       let _classList = res.data[21]; //查询学校教研室
+    //       let _workTime = res.data[6]; //查询教研室在线时长
+    //       var mergedArray = [];
+
+    //       for (var i = 0; i < _classList.length; i++) {
+    //         mergedArray.push({
+    //           id: _classList[i].id,
+    //           name: _classList[i].name,
+    //           text: 0,
+    //         });
+    //         for (let j = 0; j < _workTime.length; j++) {
+    //           const _user = _workTime[j];
+    //           if (_classList[i].id == _user.id) {
+    //             mergedArray[i].text += Number(_user.time);
+    //           }
+    //         }
+    //         mergedArray[i].text = (mergedArray[i].text / 60 / 60).toFixed(0); //换算成小时
+    //       }
+    //       this.workTime = mergedArray;
+
+    //       var _allTime = 0;
+
+    //       for (var i = 0; i < mergedArray.length; i++) {
+    //         _allTime += Number(mergedArray[i].text);
+    //       }
+
+    //       // this.allTime = parseInt(res.data[7][0].time) / 60 / 60;
+    //       this.allTime = _allTime;
+
+    //       let allLoginCount = res.data[8]; //一年的登录频次
+    //       let loginCountYearArray = {};
+    //       let timeArray = [];
+    //       for(var i = 0;i<allLoginCount.length;i++){
+    //         timeArray.push({time:allLoginCount[i].time, num:allLoginCount[i].usernum});
+    //       }
+    //       timeArray.forEach((item) => {
+    //         loginCountYearArray[item.time] = loginCountYearArray[item.time] + item.num || item.num;
+    //       });
+    //       // for (var i = Month; i > Month - 12; i--) {
+    //       //   if (i <= 0) {
+    //       //     loginCountYearArray.push({
+    //       //       Year: Year - 1,
+    //       //       Month: 12 + i,
+    //       //       mon: 0,
+    //       //       tue: 0,
+    //       //       wed: 0,
+    //       //       thur: 0,
+    //       //       fri: 0,
+    //       //       sat: 0,
+    //       //       sun: 0,
+    //       //     });
+    //       //   } else {
+    //       //     loginCountYearArray.push({
+    //       //       Month: i,
+    //       //       Year: Year,
+    //       //       mon: 0,
+    //       //       tue: 0,
+    //       //       wed: 0,
+    //       //       thur: 0,
+    //       //       fri: 0,
+    //       //       sat: 0,
+    //       //       sun: 0,
+    //       //     });
+    //       //   }
+    //       // }
+    //       // loginCountYearArray = loginCountYearArray.reverse();
+
+    //       // for (var i = 0; i < allLoginCount.length; i++) {
+    //       //   let _date = new Date(allLoginCount[i].time);
+    //       //   var _month = _date.getMonth() + 1;
+    //       //   var _year = _date.getFullYear();
+    //       //   var _day = _date.getDay();
+    //       //   let dayArray = ["sun", "mon", "tue", "wed", "thur", "fri", "sat"];
+    //       //   for (var j = 0; j < loginCountYearArray.length; j++) {
+    //       //     if (
+    //       //       _month == loginCountYearArray[j].Month &&
+    //       //       _year == loginCountYearArray[j].Year
+    //       //     ) {
+    //       //       loginCountYearArray[j][dayArray[_day]]++;
+    //       //       break;
+    //       //     }
+    //       //   }
+    //       // }
+    //       this.loginCountYearArray = loginCountYearArray;
+
+    //       this.allLoginTime = res.data[9][0].count; //一年的登录频次
+
+    //       let _course = res.data[10]; //课程
+    //       this._courseArray = JSON.parse(JSON.stringify(_course));
+          
+    //       this._course2 = res.data[22]; //查询课程
+    //       this.typeChange2();
+
+    //       let _gradeArray = [];
+    //       let _subjectArray = [];
+    //       let _themeArray = [];
+
+    //       for (var i = 0; i < _grade.length; i++) {
+    //         _gradeArray.push({
+    //           name: _grade[i].name,
+    //           typeid: _grade[i].id,
+    //           course: 0,
+    //           array: [],
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (_course[z].typeid && _course[z].typeid.indexOf(_grade[i].id) != -1) {
+    //             _gradeArray[i].course++;
+    //             _gradeArray[i].array.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+
+    //       for (var i = 0; i < _subject.length; i++) {
+    //         _subjectArray.push({
+    //           name: _subject[i].name,
+    //           typeid: _subject[i].id,
+    //           course: 0,
+    //           array: [],
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (_course[z].typeid && _course[z].typeid.indexOf(_subject[i].id) != -1) {
+    //             _subjectArray[i].course++;
+    //             _subjectArray[i].array.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+
+    //       for (var i = 0; i < _themeList.length; i++) {
+    //         _themeArray.push({
+    //           name: _themeList[i].name,
+    //           typeid: _themeList[i].id,
+    //           course: 0,
+    //           array: [],
+    //         });
+    //         for (var z = 0; z < _course.length; z++) {
+    //           if (_course[z].typeid && _course[z].typeid.indexOf(_themeList[i].id) != -1) {
+    //             _themeArray[i].course++;
+    //             _themeArray[i].array.push(_course[z].courseid);
+    //           }
+    //         }
+    //       }
+    //       this.gradeArray = _gradeArray;
+    //       this.subjectArray = _subjectArray;
+    //       this.themeArray = _themeArray;
+    //       this.allArray = [..._gradeArray, ..._subjectArray, ..._themeArray];
+    //       this.typeChange();
+
+    //       let _teacherCourse = res.data[11]; //老师创建的课程
+    //       let cNum = 0
+    //       let cNum3 = 0
+    //       for(var i = 1; i < _teacherCourse.length; i++){
+    //         cNum += _teacherCourse[i].coursecount;
+    //         if(_teacherCourse[i].coursecount > 0){
+    //           cNum3++
+    //         }
+    //       }
+    //       this.allCourse = cNum; //得按上面计算
+    //       let _teacherProject = res.data[12]; //老师创建的项目
+    //       let cNum2 = 0
+    //       let cNum4 = 0
+    //       for(var i = 1; i < _teacherProject.length; i++){
+    //         cNum2 += _teacherProject[i].count;
+    //         if(_teacherProject[i].count > 0){
+    //           cNum4++
+    //         }
+    //       }
+    //       this.allProject = cNum2;//得按上面计算
+
+    //       var _workNumList = [];
+    //       // 创建一个对象来存储结果
+    //       var result = {};
+
+    //       // 合并数据 _teacherCourse 和 _teacherProject 到结果对象
+    //       _teacherCourse.forEach((item) => {
+    //         var userid = item.userid;
+    //         var username = item.username;
+    //         var count = item.coursecount;
+    //         if (!result[username]) {
+    //           result[username] = {
+    //             username: username,
+    //             userid: userid,
+    //             course: 0,
+    //             project: 0,
+    //           };
+    //         }
+    //         result[username].course = count;
+    //       });
+
+    //       _teacherProject.forEach((item) => {
+    //         var userid = item.userid;
+    //         var username = item.username;
+    //         var count = item.count;
+    //         if (!result[username]) {
+    //           result[username] = {
+    //             username: username,
+    //             userid: userid,
+    //             course: 0,
+    //             project: 0,
+    //           };
+    //         }
+    //         result[username].project = count;
+    //       });
+
+    //       for (var username in result) {
+    //         var entry = result[username];
+    //         _workNumList.push([
+    //           entry.course,
+    //           entry.project,
+    //           entry.username,
+    //           entry.userid,
+    //         ]);
+    //       }
+
+    //       this.workNumList = _workNumList;
+
+    //       this.lightJson.teachers = res.data[3][0].count; //教师总数
+    //       this.lightJson1.teachers = res.data[3][0].count; //教师总数
+    //       this.lightJson.createCourse = cNum3; //创建了课程的老师 --计算
+    //       this.lightJson.gCourseTeachers = res.data[13][0].count; //参与协同课程的老师
+    //       this.lightJson.commentTeachers = res.data[14][0].count; //参与互动交流的老师
+    //       this.lightJson.useTool = res.data[15][0].count; //使用工具
+    //       this.lightJson.useEvalution = res.data[16].length; //实施评价
+    //       this.lightJson.evaWorksCount = res.data[17][0].count; //教学评一体化
+
+    //       let _isLoginTeacher = res.data[18][0].usercount; //登录过的教师
+    //       let _isCourseTeacher = res.data[15][0].count; //授课了的教师
+
+    //       for (var i = 0; i < this.pusaDep.length; i++) {
+    //         if (this.pusaDep[i].name == "登录") {
+    //           this.pusaDep[i].value = (
+    //             (_isLoginTeacher / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep[i].name == "创建") {
+    //           this.pusaDep[i].value = (
+    //             (this.lightJson.createCourse / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep[i].name == "授课") {
+    //           this.pusaDep[i].value = (
+    //             (_isCourseTeacher / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep[i].name == "评价") {
+    //           this.pusaDep[i].value = (
+    //             (this.lightJson.useEvalution / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         }
+    //       }
+
+    //       this.lightJson1.createProject = cNum4; //创建项目 
+
+    //       let _teacherAndStudent = res.data[19]; //师生协作
+    //       this.lightJson1.useTool = res.data[20][0].count; //项目使用工具
+    //       let _tsCount = 0;
+
+    //       for (var i = 0; i < _teacherAndStudent.length; i++) {
+    //         if (_teacherAndStudent[i].type2) {
+    //           if (
+    //             (_teacherAndStudent[i].type =
+    //               1 && _teacherAndStudent[i].type2.indexOf(2) != -1) ||
+    //             (_teacherAndStudent[i].type =
+    //               2 && _teacherAndStudent[i].type2.indexOf(1) != -1)
+    //           ) {
+    //             _tsCount++;
+    //           }
+    //         }
+    //       }
+
+    //       this.lightJson1.gProjectTeachers = _tsCount;
+
+    //       for (var i = 0; i < this.pusaDep1.length; i++) {
+    //         if (this.pusaDep1[i].name == "登录") {
+    //           this.pusaDep1[i].value = (
+    //             (_isLoginTeacher / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep1[i].name == "创建") {
+    //           this.pusaDep1[i].value = (
+    //             (this.lightJson1.createProject / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep1[i].name == "师生协作") {
+    //           this.pusaDep1[i].value = (
+    //             (this.lightJson1.gProjectTeachers / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         } else if (this.pusaDep1[i].name == "使用工具") {
+    //           this.pusaDep1[i].value = (
+    //             (this.lightJson1.useTool / this.lightJson.teachers) *
+    //             100
+    //           ).toFixed(0);
+    //         }
+    //       }
+
+    //       this.$forceUpdate();
+    //     })
+    //     .catch((err) => {
+    //       this.isLoading = false;
+    //       this.$message.error(
+    //         "因加载数据量过大,服务器统计异常,请联系管理员。"
+    //       );
+    //       console.error(err);
+    //     });
+    // },
+    // checkRank() {
+    //       this.courseType = 1;
+    //   this.rankLoading = true;
+    //   let params = [
+    //     {
+    //       oid: this.oid,
+    //       org: this.org,
+    //       cid: this.cTypeRank,
+    //     },
+    //   ];
+    //   this.ajax
+    //     .post(this.$store.state.api + "selectDataboardTeacherRank", params)
+    //     .then((res) => {
+    //       this.rankLoading = false;
+    //       let rankData = [];
+    //       let teachers = res.data[0]; //教师总数
+    //       let loginTimeAll = res.data[1]; //教师总登录时长
+    //       let loginCountAll = res.data[2]; //教师总登录频次
+    //       let courses = res.data[3]; //教师创建及协同课程总数
+    //       let projects = res.data[4]; //教师创建及协同项目总数
+    //       let courseWorks = res.data[5]; //教师创建及协同有作业的课程总数
+    //       let evaWorks = res.data[6]; //教师创建及协同有作业有评价的课程总数
+
+    //       for (let i = 0; i < teachers.length; i++) {
+    //         rankData.push({
+    //           name: teachers[i].name,
+    //           userid: teachers[i].userid,
+    //           classid: teachers[i].cclassid,
+    //           loginTime: 0,
+    //           loginCount: 0,
+    //           courses: 0,
+    //           projects: 0,
+    //           courseWorks: 0,
+    //           worksRate: 0,
+    //           score: 0,
+    //         });
+    //       }
+
+    //       for (var j = 0; j < rankData.length; j++) {
+    //         for (var i = 0; i < loginTimeAll.length; i++) {
+    //           if (loginTimeAll[i].userid == rankData[j].userid) {
+    //             rankData[j].loginTime += parseInt(
+    //               (loginTimeAll[i].text / 60 / 60).toFixed(0)
+    //             );
+    //           }
+    //         }
+
+    //         for (var i = 0; i < loginCountAll.length; i++) {
+    //           if (loginCountAll[i].userid == rankData[j].userid) {
+    //             rankData[j].loginCount++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < courses.length; i++) {
+    //           if (courses[i].userid == rankData[j].userid) {
+    //             rankData[j].courses++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < projects.length; i++) {
+    //           if (projects[i].userid == rankData[j].userid) {
+    //             rankData[j].projects++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < courseWorks.length; i++) {
+    //           if (courseWorks[i].userid == rankData[j].userid) {
+    //             rankData[j].courseWorks++;
+    //           }
+    //         }
+
+    //         for (var i = 0; i < evaWorks.length; i++) {
+    //           if (evaWorks[i].userid == rankData[j].userid) {
+    //             rankData[j].worksRate++;
+    //           }
+    //         }
+
+    //         rankData[j].score = (
+    //           rankData[j].loginTime * 0.1 +
+    //           rankData[j].loginCount * 0.1 +
+    //           rankData[j].courses * 0.1 +
+    //           rankData[j].projects * 0.1 +
+    //           rankData[j].courseWorks * 0.3 +
+    //           rankData[j].worksRate * 0.3
+    //         ).toFixed(0);
+    //       }
+
+    //       this.rankData = rankData;
+    //       this.$forceUpdate();
+    //     })
+    //     .catch((err) => {
+    //       this.rankLoading = false;
+    //       this.$message.error(
+    //         "因加载数据量过大,服务器统计异常,请联系管理员。"
+    //       );
+    //       console.error(err);
+    //     });
+    // },
+  },
+};
+</script>
+
+
+<style scoped>
+.body1 {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  padding: 20px;
+  box-sizing: border-box;
+  overflow: hidden;
+  position: relative;
+}
+
+.left {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+}
+
+.left > .top {
+  width: 100%;
+  height: calc(100% / 5 * 2.7 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.left > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.3 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.center {
+  width: calc(100% / 4 * 2 - 20px);
+  height: 100%;
+  margin: 0 10px;
+}
+
+.center > .top {
+  width: 100%;
+  height: calc(100% / 5 * 2.7 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.center > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.3 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.right {
+  width: calc(100% / 4 * 1);
+  height: 100%;
+
+}
+
+.right > .top {
+  width: 100%;
+  height: calc(100% / 5 * 2.7 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.right > .bottom {
+  width: 100%;
+  height: calc(100% / 5 * 2.3 - 5px);
+  /* background: #fff; */
+  border-radius: 5px;
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(224, 234, 251, 0.8) 100%);
+  border: 2px solid #fff;
+  box-sizing: border-box;
+	display: flex;
+	flex-direction: column;
+}
+
+.titleBox {
+  height: 40px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+  box-sizing: border-box;
+  width: 100%;
+  position: relative;
+}
+
+.titleBox::after {
+  content: '';
+  position: absolute;
+  height: 2px;
+  width: calc(100% - 30px);
+  bottom: 0;
+  background: linear-gradient(90deg, rgba(54, 129, 252, 0.6) 0%, rgba(54, 129, 252, 0.1) 100%);
+}
+
+.title {
+  color: #060e17;
+  margin-right: 25px;
+  font-weight: 700;
+  display: flex;
+  align-items: center;
+	position: relative;
+}
+
+.title::before{
+  content: '';
+  background-image: url('../../../../../assets/icon/test/data_title_icon.png');
+  background-size: 100% 100%;
+  width: 20px;
+  height: 20px;
+  margin-right: 5px;
+}
+
+.dataBox {
+	flex: 1;
+  /* height: calc(100% - 40px); */
+  width: 100%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+
+/* .middleBox {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+} */
+
+
+
+/* .teaMiddle {
+  width: calc(100% / 2 - 10px);
+  height: 60px;
+  border-radius: 8px;
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  justify-content: center;
+  padding: 0 10px;
+  margin: 0 10px;
+} */
+
+/* .teaMiddle {
+  width: calc(100% / 3 - 10px);
+} */
+
+/* .timeDiv {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  margin: 0 0 0 15px;
+} */
+
+/* .timeDiv > div {
+  margin-right: 10px;
+  cursor: pointer;
+} */
+
+/* .cNum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+} */
+
+/* .tNum {
+  background: linear-gradient(
+    180deg,
+    rgb(174, 204, 254, 0.2) 0%,
+    rgb(54, 129, 252, 0.3) 100%
+  ) !important;
+} */
+
+/* .tSum {
+  background: linear-gradient(
+    180deg,
+    rgb(125, 227, 174, 0.2) 0%,
+    rgb(23, 196, 105, 0.3) 100%
+  ) !important;
+} */
+
+/* .teaLeft > div:first-child,
+.teaMiddle > div:first-child {
+  font-size: 12px;
+  font-weight: 400;
+  color: #565e6a;
+} */
+
+/* .teaLeft > div:last-child,
+.teaMiddle > div:last-child {
+  font-size: 22px;
+  font-weight: bold;
+  color: #060e17;
+} */
+
+/* .halfBox {
+  width: 50%;
+} */
+
+/* .isClick {
+  box-sizing: border-box;
+} */
+
+/* .noClick{
+  font-weight: 500;
+  opacity: .6;
+} */
+
+/* .otherCss {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  justify-content: flex-end;
+} */
+
+/* .otherImg {
+  width: 20px;
+  height: 20px;
+  margin: 0 10px;
+  cursor: pointer;
+} */
+
+/* .otherImg > img {
+  width: 100%;
+  height: 100%;
+} */
+
+/* .allBox {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+} */
+
+/* .allBox_left {
+  width: 30%;
+  height: 100%;
+} */
+
+/* .allBox_right {
+  display: flex;
+  flex-wrap: wrap;
+  height: 100%;
+  width: 70%;
+  margin: 0 auto;
+  overflow: hidden;
+  justify-content: space-between;
+} */
+
+/* .depth {
+  width: calc(100% / 4 - 10px);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+} */
+
+/* .depth > span:nth-child(1) {
+  font-size: 14px;
+  font-weight: 700;
+  margin: 0 0 10px;
+} */
+
+/* .depth > div:nth-child(1) {
+} */
+
+.selectBox {
+  width: 100px;
+	position: absolute;
+	right: 20px;
+}
+
+.selectBox >>> .el-input__inner {
+  height: 30px;
+  line-height: 30px;
+  border: 1px solid #3681FC;
+}
+
+.selectBox >>> .el-input__icon {
+  line-height: 30px;
+}
+
+.info_box {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: space-around;
+  width: 90%;
+  margin: 0 auto;
+}
+
+.info_box>.info2,
+.info_box>.info3,
+.info_box>.info {
+  width: calc(50% - 10px);
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  height: 60px;
+  justify-content: center;
+	align-items: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+  margin-top: 10px;
+  border-radius: 5px;
+}
+
+.info_box>.info2 {
+  width: calc(100% / 4 - 10px);
+}
+
+.info_box>.info3 {
+  width: calc(100% / 3 );
+  margin-bottom: 5px;
+}
+
+.info_box>.info2>span:nth-child(1),
+.info_box>.info3>span:nth-child(1),
+.info_box>.info>span:nth-child(1) {
+	font-size: 24px;
+  font-weight: 700;
+}
+
+.info_box>.info2>span:nth-child(2),
+.info_box>.info3>span:nth-child(2),
+.info_box>.info>span:nth-child(2) {
+  font-size: 12px;
+  color: #565e6a;
+  white-space: pre-wrap;
+  word-break: break-all;
+}
+
+</style>

+ 118 - 0
src/components/pages/sz/dataBoardCity/index.vue

@@ -0,0 +1,118 @@
+<template>
+    <div class="body">
+    <div class="db_bg">
+      <div class="db_header">
+				<div class="db_header_title"></div>
+      </div>
+      <div class="db_body">
+				<dataCenter :oid="oid" :org="org"/>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import dataCenter from './dataCenter'
+export default {
+	components:{
+		dataCenter
+	},
+  data() {
+    return {
+      type: 1,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      scourseLength: 0,
+    };
+  },
+  methods: {
+    setType(type) {
+      this.type = type;
+    },
+    getData() {
+			return console.log('获取数据')
+      // this.isLoading = true;
+      // let params = [
+      //   {
+      //     oid: this.oid,
+      //     org: this.org,
+      //   },
+      // ];
+      // this.ajax
+      //   .post(this.$store.state.api + "getCourseLength", params)
+      //   .then((res) => {
+      //     this.isLoading = false;
+
+      //     this.scourseLength = res.data[0][0].count;
+      //     this.$forceUpdate();
+      //   })
+      //   .catch((err) => {
+      //     this.isLoading = false;
+      //     console.error(err);
+      //   });
+    },
+  },
+  mounted() {
+    // this.getData();
+  },
+}
+</script>
+
+<style scoped>
+.body {
+  height: 100%;
+  width: 100%;
+  min-width: 1550px;
+  min-height: 750px;
+  background: #e7f3fe;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.db_bg {
+  width: calc(100% - 30px);
+  height: calc(100% - 30px);
+  /* padding: 10px; */
+  border-radius: 8px;
+  box-sizing: border-box;
+  border: 2px solid #3681FC3D;
+  box-shadow: 20px 20px 80px 0px #3681FC3D inset;
+}
+
+.db_header {
+  width: 100%;
+  height: 50px;
+  display: flex;
+  justify-content: center;
+  position: relative;
+  /* background: #fff; */
+  align-items: center;
+}
+
+.db_header:after {
+  content: "";
+    position: absolute;
+    width: 50%;
+    height: 2px;
+    bottom: 0.5px;
+    left: 50%;
+    z-index: 1;
+    background: linear-gradient(90deg, #9ac1fd 0%, rgba(134, 179, 253, 0) 91.13%);
+}
+
+.db_header_title {
+  /* background-image: url("../../../assets/icon/test/data_title.png"); */
+  background-image: url("../../../../assets/icon/test/data_title2.png");
+  width: 290px;
+  height: 100%;
+  background-size: 100% 100%;
+}
+
+.db_body {
+  height: calc(100% - 50px);
+  width: 100%;
+  overflow: auto;
+  /* background: rgb(231, 242, 252); */
+}
+</style>

+ 1166 - 0
src/components/pages/sz/teacher.vue

@@ -0,0 +1,1166 @@
+<template>
+  <div
+    class="pb_content"
+    style="background: unset; height: 100%; overflow: auto"
+  >
+    <div
+      class="pb_content_body"
+      style="
+        background: #fff;
+        padding: 0px 25px;
+        box-sizing: border-box;
+        margin: 10px auto 0;
+        /* border-radius: 5px; */
+      "
+    >
+      <div class="pb_head">
+        <span>教师管理</span>
+      </div>
+      <div class="student_head">
+        <div class="head_left">
+          <el-input
+            v-model="sPhoneUser"
+            class="student_input"
+            placeholder="请输入用户名"
+          ></el-input>
+          <el-select
+            v-model="cid"
+            placeholder="请选择学校"
+            class="student_input inputClass"
+            @change="searchStudent"
+            v-if="org && org != 'undefined' && org != 'null'"
+          >
+            <el-option label="所有学校" value=""></el-option>
+            <el-option
+              v-for="(item, index) in classJuri"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+          <el-button class="student_button" @click="searchStudent"
+            >查询</el-button
+          >
+        </div>
+        <div class="head_right">
+          <el-button @click="addStudent">添加教师</el-button>
+          <el-upload
+            class="upload-demo newCss"
+            :http-request="handleChange"
+            :on-remove="handleRemove"
+            action="#"
+            :file-list="fileListUpload"
+            accept=".xlsx"
+          >
+            <el-button size="primary" type="primary">批量添加</el-button>
+            <div slot="tip" class="el-upload__tip" style="margin-left: 10px">
+              只能上传xlsx文件,且不超过500kb
+            </div>
+          </el-upload>
+          <!-- <el-button @click="exportExcel">导出学生</el-button> -->
+          <div @click="getExcel">xls 上传样例</div>
+        </div>
+      </div>
+    </div>
+    <div class="pb_content_body" style="margin: 0 auto">
+      <div class="student_table">
+        <el-table
+          ref="table"
+          :data="tableData"
+          border
+          :height="tableHeight"
+          :fit="true"
+          v-loading="isLoading"
+          style="width: 100%"
+          :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+          :row-class-name="tableRowClassName"
+        >
+          <el-table-column label="姓名" min-width="10" align="center">
+            <template slot-scope="scope">
+              <div class="userImg">
+                <div class="tx">
+                  <img
+                    :src="
+                      scope.row.headportrait != null
+                        ? scope.row.headportrait
+                        : tx
+                    "
+                    alt
+                  />
+                </div>
+                <div
+                  style="
+                    width: 150px;
+                    text-align: left;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                  "
+                >
+                  {{ scope.row.username }}
+                </div>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="教师账号" min-width="15" align="center">
+            <template slot-scope="scope">
+              <div>{{ scope.row.un ? scope.row.un : "" }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="身份" min-width="15" align="center">
+            <template slot-scope="scope">
+              <div>{{ scope.row.role ? '管理员' : "普通教师" }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="schoolName"
+            label="学校"
+            min-width="15"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column label="操作" width="220px">
+            <template slot-scope="scope">
+              <div style="display: flex;">
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="modifyDiaBtn(scope.row)"
+                  >修改</el-button
+                >
+                <div
+                  class="delete"
+                  @click="deleteStudent(scope.row.userid, scope.row.state)"
+                >
+                  <img src="../../../assets/remove.png" alt />
+                </div>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="student_page">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="10"
+          :total="total"
+          v-if="page"
+          @current-change="handleCurrentChange"
+        ></el-pagination>
+      </div>
+    </div>
+
+    <el-dialog
+      title="修改账号信息"
+      :visible.sync="modifyDia"
+      :append-to-body="true"
+      width="700px"
+      :before-close="handleClose"
+      :close-on-click-modal="true"
+      class="add_student"
+    >
+      <el-form class="inputClass">
+        <el-form-item label="教师名称" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入教师姓名"
+              clearable
+              v-model.trim="modifyDiaData.dName"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <el-form-item label="教师账号" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入教师姓名"
+              clearable
+              disabled
+              v-model.trim="modifyDiaData.mail"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <!-- <el-form-item label="手机号" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入手机号"
+              clearable
+              disabled
+              v-model="modifyDiaData.tel"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item> -->
+        <el-form-item
+          label="角色"
+          :label-width="formLabelWidth"
+          v-if="org && org != 'undefined' && org != 'null'"
+        >
+          <template>
+            <el-radio v-model="modifyDiaData.radio" :label="0">管理员</el-radio>
+            <el-radio v-model="modifyDiaData.radio" :label="1"
+              >普通教师</el-radio
+            >
+          </template>
+        </el-form-item>
+        <!-- <el-form-item label="所属学校" :label-width="formLabelWidth" v-else>
+          <el-select v-model="oidName.name" disabled>
+            <el-option
+              v-for="(item, index) in classJuri"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item> -->
+      </el-form>
+      <span slot="footer" class="dialog-footer flex">
+        <el-button class="right" @click="conModify">确认</el-button>
+      </span>
+    </el-dialog>
+
+    <el-dialog
+      title="添加教师"
+      :visible.sync="dialogVisible"
+      :append-to-body="true"
+      width="700px"
+      :before-close="handleClose"
+      :close-on-click-modal="true"
+      class="add_student"
+    >
+      <!-- <div slot="title" class="header-title">
+        <div class="logoImg">
+          <img src="../../../assets/logo.png" alt />
+        </div>
+        <div class="title_add_student">添加教师</div>
+      </div> -->
+      <el-form class="inputClass">
+        <el-form-item label="教师名称" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入教师姓名"
+              clearable
+              v-model="sName"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <el-form-item label="教师账号" :label-width="formLabelWidth">
+          <span>
+            <el-input
+              placeholder="请输入教师账号"
+              clearable
+              v-model="sMail"
+              class="add_input"
+            ></el-input>
+          </span>
+        </el-form-item>
+        <el-form-item label="教师账号" :label-width="formLabelWidth">
+          <span>
+            <template>
+              <el-radio v-model="addRadio" :label="0">管理员</el-radio>
+              <el-radio v-model="addRadio" :label="1">普通教师</el-radio>
+            </template>
+          </span>
+        </el-form-item>
+        <el-form-item
+          label="所属学校"
+          :label-width="formLabelWidth"
+          v-if="org && org != 'undefined' && org != 'null'"
+        >
+          <el-select v-model="schoolName" placeholder="请选择学校">
+            <el-option
+              v-for="(item, index) in classJuri"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="所属学校" :label-width="formLabelWidth" v-else>
+          <el-select v-model="oidName.name" disabled>
+            <el-option
+              v-for="(item, index) in classJuri"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <div style="text-align: center; color: #adb3b7">
+          注:添加教师的账号密码为123456
+        </div>
+      </el-form>
+      <span slot="footer" class="dialog-footer flex">
+        <el-button class="right" @click="insertStudent">确认</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import $ from "jquery";
+// import pinyin from "../../../../node_modules/js-pinyin/index";
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      formLabelWidth: "100px",
+      tableData: [],
+      dialogVisible: false,
+
+      modifyDia: false,
+      modifyDiaData: {
+        userid: "",
+        mail: "",
+        dName: "",
+        tel: "",
+        radio: 0,
+        type: 1,
+        role: 0
+      },
+      sName: "",
+      sMail: "",
+      addPol: "",
+      addTyp: 0,
+      addRadio: 1,
+      sId: "",
+      schoolName: "",
+      schoolJuri: [],
+      classJuri: [],
+      fileListUpload: [],
+      oidName: [],
+      page: 1,
+      total: 0,
+      sPhoneUser: "",
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      cid: "",
+      org: this.$route.query.org,
+      tx: require("../../../assets/avatar.png"),
+      userSuffix: ""
+    };
+  },
+  mounted() {
+    this.$nextTick(function() {
+      this.getUser()
+      this.tableHeight =
+        window.innerHeight - this.$refs.table.$el.offsetTop - 200;
+      if (this.tableHeight <= 530) {
+        this.tableHeight = 530;
+      }
+      // 监听窗口大小变化
+      let self = this;
+      window.onresize = function() {
+        self.tableHeight =
+          window.innerHeight - self.$refs.table.$el.offsetTop - 200;
+        if (self.tableHeight <= 530) {
+          self.tableHeight = 530;
+        }
+      };
+    });
+  },
+  methods: {
+    getUser() {
+      
+      let params = {
+        userid: this.userid
+      };
+      // console.log(111,params);
+      this.ajax
+        .get(this.$store.state.api + "selectUser", params)
+        .then(res => {
+          // console.log(res);
+          this.userSuffix = res.data[0][0].accountNumber.split("@")[1];
+          // console.log(this.userSuffix);
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    // 确定修改信息
+    conModify() {
+      if (!this.modifyDiaData.dName) {
+        this.$message({
+          message: "教师名称不能为空",
+          type: "error"
+        });
+        return;
+      }
+
+      let uRole = null;
+      let uType = 1;
+      if (!this.modifyDiaData.radio) {
+        uRole = 1;
+      } else {
+        uRole = 0;
+      }
+
+      let params = [
+        {
+          uid: this.modifyDiaData.userid,
+          uname: this.modifyDiaData.dName,
+          rol: uRole,
+          typ: uType
+        }
+      ];
+      this.ajax
+        .post(this.$store.state.api + "updateYTeacherInfo", params)
+        .then(res => {
+          this.$message({
+            message: "修改成功",
+            type: "success"
+          });
+          this.modifyDia = false;
+          this.getStudent();
+        })
+        .catch(err => {
+          this.isLoading = false;
+          this.$message({
+            message: "修改失败",
+            type: "error"
+          });
+          console.error(err);
+        });
+      // return console.log(data);
+
+      // this.
+    },
+    // 修改用户信息弹窗
+    modifyDiaBtn(val) {
+      // console.log(val);
+      this.modifyDiaData.userid = val.userid;
+      this.modifyDiaData.dName = val.username;
+      this.modifyDiaData.tel = "";
+      this.modifyDiaData.role = val.role;
+      this.modifyDiaData.type = val.type;
+      this.modifyDiaData.mail = val.un;
+
+      if (val.role == 1) {
+        this.modifyDiaData.radio = 0;
+      } else {
+        this.modifyDiaData.radio = 1;
+      }
+
+      this.modifyDia = true;
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    searchStudent() {
+      this.page = 1;
+      this.getStudent();
+    },
+    addStudent() {
+      this.dialogVisible = true;
+      (this.sName = ""), (this.sMail = ""), (this.schoolName = "");
+      if (this.org && this.org != "undefined" && this.org != "null") {
+        this.getClass();
+      } else {
+        this.getOidName();
+      }
+      // this.getSchool();
+    },
+    handleClose(done) {
+      done();
+    },
+    getExcel(res) {
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("../../../common/Export2Excel");
+        const tHeader = ["教师姓名", "教师账号", "学校"];
+        const data = [];
+        export_json_to_excel(tHeader, data, "上传教师样例");
+      });
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getStudent();
+    },
+    time() {
+      if (!this.now) {
+        this.now = new Date().getTime();
+        return true;
+      } else {
+        let time = new Date().getTime();
+        if (time - this.now > 3000) {
+          this.now = time;
+          return true;
+        } else {
+          return false;
+        }
+      }
+    },
+    //新增学生
+    insertStudent() {
+      this.dialogVisible = true;
+      if (this.org && this.org != "undefined" && this.org != "null") {
+        if (this.sName === "") {
+          this.$message.error("教师姓名不能为空");
+          return;
+        } else if (this.sMail === "") {
+          this.$message.error("教师账号不能为空");
+          return;
+        } else if (this.schoolName === "") {
+          this.$message.error("请选择学校");
+          return;
+        }
+        // else if (
+        //   // !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
+        //   //   this.sMail
+        //   // )
+        //   this.sMail === ""
+        // ) {
+        //   this.$message.error("学生账号不能为空");
+
+        //   // this.$message.error("邮箱格式不正确");
+        //   return;
+        // } 
+       
+      } else {
+        if (this.sName === "") {
+          this.$message.error("教师姓名不能为空");
+          return;
+        } else if (this.sMail === "") {
+          this.$message.error("教师账号不能为空");
+          return;
+        } 
+        // else if (
+        //   // !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
+        //   //   this.sMail
+        //   // )
+        //   this.sMail === ""
+        // ) {
+        //   this.$message.error("学生账号不能为空");
+
+        //   // this.$message.error("邮箱格式不正确");
+        //   return;
+        // }
+      }
+
+      let mail = '';
+      if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
+        mail = this.sMail;
+      }else{
+        mail = this.sMail + "@" + this.userSuffix
+      }
+      
+      if (this.time()) {
+        // let params = { un: this.sMail };
+        let params = { un:  mail};
+        // console.log('mail',mail,this.userSuffix);
+        this.ajax
+          .get(this.$store.state.api + "findMail", params)
+          .then(res => {
+            if (res.data[0].length > 0) {
+              this.$message.error("此邮箱已被注册");
+            } else {
+              this.add_Student();
+            }
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      }
+    },
+    add_Student() {
+      let AddT = 1;
+      let addR = 0;
+      if (!this.addRadio) {
+        addR = 1;
+      } else {
+        addR = 0;
+      }
+
+      let mail = '';
+      if(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)){
+        mail = this.sMail;
+      }else{
+        mail = this.sMail + "@" + this.userSuffix
+      }
+      let params = [
+        {
+          username: mail,
+          userpassword: 123456,
+          alias: this.sName,
+          org:
+            this.org && this.org != "undefined" && this.org != "null"
+              ? this.org
+              : "",
+          oid:
+            this.org && this.org != "undefined" && this.org != "null"
+              ? this.schoolName
+              : this.oid,
+          ph: this.sPhone,
+          sid: this.sId,
+          cid: "",
+          typ: AddT,
+          rol: addR
+        }
+      ];
+      // return console.log('params:',params);
+
+      this.ajax
+        .post(this.$store.state.api + "teacherRegistration", params)
+        .then(res => {
+          // debugger;
+          // let params = [
+          //   {
+          //     userid: res.data.uid,
+          //     username: this.sName,
+          //     sid: this.sId,
+          //     type: 1,
+          //     org: this.org,
+          //     oid: res.data.oid,
+          //     phone: res.data.ph,
+          //     cid: "",
+          //     intro: "",
+          //     sex: "0"
+          //   }
+          // ];
+          // this.ajax
+          //   .post(this.$store.state.api + "updateUserByEdu1", params)
+          //   .then(res => {
+          //     console.log(res);
+          //   })
+          //   .catch(err => {
+          //     console.error(err);
+          //   });
+          this.$message({
+            message: "新增成功",
+            type: "success"
+          });
+          this.dialogVisible = false;
+          this.sName = "";
+          this.sMail = "";
+          this.schoolName = "";
+          this.getStudent();
+        })
+        .catch(err => {
+          this.isLoading = false;
+          this.$message({
+            message: "新增失败",
+            type: "error"
+          });
+          console.error(err);
+        });
+    },
+    //获取班级列表
+    getClass() {
+      this.isLoading = true;
+      let params = {
+        org: this.org
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSchoolByOrg", params)
+        .then(res => {
+          this.isLoading = false;
+          this.classJuri = res.data[0];
+        })
+        .catch(err => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    //获取学校名称
+    getOidName() {
+      this.isLoading = true;
+      let params = {
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSchoolName2", params)
+        .then(res => {
+          this.isLoading = false;
+          this.oidName = res.data[0][0];
+        })
+        .catch(err => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    // getSchool() {
+    // 	this.isLoading = true;
+    // 	let params = {
+    // 		page: this.page,
+    // 	};
+    // 	this.ajax
+    // 		.get(this.$store.state.api + "selectOrg", params)
+    // 		.then((res) => {
+    // 			this.isLoading = false;
+    // 			this.schoolJuri = res.data[0];
+    // 		})
+    // 		.catch((err) => {
+    // 			this.isLoading = false;
+    // 			console.error(err);
+    // 		});
+    // },
+    getStudent() {
+      this.isLoading = true;
+      let params = {
+        org:
+          this.org && this.org != "undefined" && this.org != "null"
+            ? this.org
+            : "",
+        oid:
+          this.org && this.org != "undefined" && this.org != "null"
+            ? ""
+            : this.oid,
+        cu: this.cid,
+        cn: this.sPhoneUser,
+        page: this.page
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectOrgTeachar", params)
+        .then(res => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+          // console.log("this.tableData", this.tableData);
+        })
+        .catch(err => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    handleChange(file) {
+      this.fileTemp = file.file;
+      if (this.fileTemp) {
+        if (
+          this.fileTemp.type ==
+            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+          this.fileTemp.type == "application/vnd.ms-excel"
+        ) {
+          this.importCount = 1;
+          this.importfxx(this.fileTemp);
+        } else {
+          this.$message({
+            type: "warning",
+            message: "附件格式错误,请删除后重新上传!"
+          });
+        }
+      } else {
+        this.$message({
+          type: "warning",
+          message: "请上传附件!"
+        });
+      }
+    },
+    handleRemove(file, fileList) {
+      this.fileTemp = null;
+    },
+    exportExcel() {
+      try {
+        let params = {
+          oid: this.oid
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectUserBySchool", params)
+          .then(res => {
+            var res = res.data[0];
+            //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
+            //将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值
+            var array = [];
+            for (var i = 0; i < res.length; i++) {
+              var _json = {};
+              _json["用户名"] = res[i].username;
+              _json["姓名"] = res[i].alias ? res[i].alias : "";
+              _json["班级"] = res[i].classid ? res[i].classid : "";
+              array.push(_json);
+            }
+
+            var XLSX = require("xlsx");
+            const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
+            let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
+            ws["!cols"] = [
+              //设置每一列的宽度
+              { wch: 50 },
+              { wch: 50 },
+              { wch: 50 }
+            ];
+            XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
+            XLSX.writeFile(workbook, "学生信息.xlsx");
+            // const wopts = { bookType: "xlsx", bookSST: false, type: "array" };//写入的样式bookType:输出的文件类型,type:输出的数据类型,bookSST: 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
+            // const wbout = XLSX.write(workbook, wopts);// 浏览器端和node共有的API,实际上node可以直接使用xlsx.writeFile来写入文件,但是浏览器没有该API
+            // FileSaver.saveAs(new Blob([wbout], { type: "application/octet-stream" }), `${title} demo.xlsx`);//保存文件
+            this.$message({
+              message: "导出成功",
+              type: "success"
+            });
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      } catch (e) {
+        console.log(e, e.stack);
+      }
+    },
+    importfxx(obj) {
+      const loading = this.$loading.service({
+        background: "rgba(255, 255, 255, 0.7)",
+        target: document.body
+      });
+      var _$ = $;
+      this.importCount++;
+      let _this = this;
+      // 通过DOM取文件数据
+      this.file = obj;
+      var rABS = false; //是否将文件读取为二进制字符串
+      var f = this.file;
+      var reader = new FileReader();
+      //if (!FileReader.prototype.readAsBinaryString) {
+      FileReader.prototype.readAsBinaryString = function(f) {
+        var binary = "";
+        var rABS = false; //是否将文件读取为二进制字符串
+        var pt = this;
+        var wb; //读取完成的数据
+        var outdata;
+        var reader = new FileReader();
+        reader.onload = function(e) {
+          var bytes = new Uint8Array(reader.result);
+          var length = bytes.byteLength;
+          for (var i = 0; i < length; i++) {
+            binary += String.fromCharCode(bytes[i]);
+          }
+          var XLSX = require("xlsx");
+          if (rABS) {
+            wb = XLSX.read(btoa(fixdata(binary)), {
+              //手动转化
+              type: "base64"
+            });
+          } else {
+            wb = XLSX.read(binary, {
+              type: "binary"
+            });
+          }
+          outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); //outdata就是你想要的东西
+          this.da = [...outdata];
+          let arr = [];
+          this.da.map(v => {
+            let obj = {};
+            obj.name = v["教师姓名"];
+            obj.mail = v["教师账号"];
+            obj.school = v["学校"];
+            arr.push(obj);
+          });
+          console.log(arr);
+          let _b = 1;
+          for (var i = 0; i < arr.length; i++) {
+            let item = arr[i];
+            if (item.school === "") {
+              _b = 1;
+              _this.$message.error("教师学校不能为空,请重新上传");
+              break;
+            } else if (item.name === "") {
+              _b = 1;
+              _this.$message.error("教师姓名不能为空,请重新上传");
+              break;
+            } else if (item.mail === "") {
+              _b = 1;
+              _this.$message.error("教师账号不能为空,请重新上传");
+            } else if (
+              !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
+                item.mail
+              )
+            ) {
+              _b = 1;
+              _this.$message.error("有教师账号格式不正确,请重新上传");
+              break;
+            }
+          }
+          let z = 2;
+          let newArr = JSON.stringify(arr);
+          let params = [
+            {
+              arr: newArr,
+              userpassword: 123456,
+              org:
+                _this.org && _this.org != "undefined" && _this.org != "null"
+                  ? _this.org
+                  : ""
+            }
+          ];
+          _this.ajax
+            .post(_this.$store.state.api + "batchRegistrationMore1", params)
+            .then(res => {
+              if (z == 2) {
+                _this.$message({
+                  message: "新增成功",
+                  type: "success"
+                });
+                _this.getStudent();
+              }
+              loading.close();
+            })
+            .catch(err => {
+              console.error(err);
+            });
+          _this.fileListUpload = [];
+        };
+
+        reader.readAsArrayBuffer(f);
+      };
+
+      if (rABS) {
+        reader.readAsArrayBuffer(f);
+      } else {
+        reader.readAsBinaryString(f);
+      }
+    },
+    getSchoolName() {
+      let params = {
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSchoolName2", params)
+        .then(res => {
+          this.schoolName = res.data[0][0].name;
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    deleteStudent(id, state) {
+      state = 0;
+      let params = [{ uid: id, state: state }];
+      this.$confirm("此教师账号包含课程修改及授课数据,删除教师将导致数据丢失,是否继续执行相关操作?", "提示", {
+        confirmButtonText: "确定删除",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.ajax
+            .post(this.$store.state.api + "deleteStudent", params)
+            .then(res => {
+              this.$message({
+                message: "操作成功",
+                type: "success"
+              });
+              this.getStudent();
+            })
+            .catch(err => {
+              this.$message.error("操作失败");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    }
+  },
+  created() {
+    this.page = 1;
+    this.getStudent();
+    this.getSchoolName();
+    this.getClass();
+  }
+};
+</script>
+
+<style scoped>
+@media screen and (max-width: 1024px) {
+  .student_head {
+    flex-direction: column !important;
+  }
+  .head_right {
+    margin-top: 10px !important;
+  }
+}
+.pb_head > span:nth-child(2) {
+  font-size: 20px;
+  margin-left: 5px;
+  color: #828282;
+}
+.pb_head {
+  margin: 0 !important;
+  width: 100% !important;
+}
+.student_page {
+  margin-top: 10px;
+}
+.student_head {
+  margin-top: 10px;
+  padding-bottom: 10px;
+  display: flex;
+  justify-content: space-between;
+}
+.head_left {
+  display: flex;
+  align-items: center;
+}
+.head_right {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: baseline;
+}
+.student_input >>> .el-input__inner {
+  height: 30px;
+  width: 190px;
+  font-size: 13px;
+  padding: 0 10px;
+}
+.student_button {
+  color: #fff;
+  background: #2268bc;
+  width: 60px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 30px;
+}
+.head_right > button:nth-child(1) {
+  color: #fff;
+  background: #2268bc;
+  width: 70px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 30px;
+}
+.head_right > button:nth-child(2) {
+  color: #fff;
+  background: #2268bc;
+  width: 70px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 30px;
+}
+.head_right > div {
+  font-size: 12px;
+  line-height: 40px;
+  margin-left: 10px;
+  color: #2a6dbe;
+  text-decoration: underline;
+  cursor: pointer;
+}
+.student_table >>> .el-table--border td {
+  border-right: 0px !important;
+}
+.student_table >>> .el-table,
+.student_table >>> .el-table__body-wrapper {
+  height: auto !important;
+}
+.el-table >>> .even_row {
+  background-color: #f1f1f1 !important;
+}
+.de_button {
+  color: #fff;
+  background: #5190fd;
+  width: 50px;
+  height: 25px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 25px;
+}
+.add_student >>> .el-dialog__header {
+  padding: 20px 20px 10px;
+  text-align: center;
+  background: #454545;
+}
+.add_student >>> .el-dialog__title {
+  font-size: 14px !important;
+  color: #fff !important;
+}
+.add_student >>> .el-dialog__headerbtn {
+  font-size: 20px !important;
+}
+.add_student >>> .el-form-item__label {
+  margin-left: 65px;
+}
+.add_student >>> .el-form-item {
+  display: flex;
+}
+.add_student >>> .el-form-item__content {
+  margin: 0 !important;
+}
+.add_input {
+  width: 365px;
+}
+.add_student >>> .el-dialog__footer {
+  text-align: center !important;
+}
+.right {
+  width: 250px;
+  color: #fff;
+  background: #2268bc;
+  margin-bottom: 20px;
+}
+.header-title {
+  display: flex;
+}
+.logoImg {
+  width: 30px;
+}
+.logoImg > img {
+  width: 100%;
+  height: 100%;
+}
+.title_add_student {
+  margin: 0 auto;
+  color: #fff;
+}
+.upload-demo {
+  line-height: 0px !important;
+}
+.upload-demo >>> .el-button {
+  color: #fff;
+  background: #2268bc;
+  width: 70px;
+  height: 30px;
+  padding: 0 !important;
+  font-size: 12px;
+  line-height: 0 !important;
+}
+
+.userImg {
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+
+.tx {
+  width: 40px;
+  margin-right: 10px;
+}
+
+.delete {
+  width: 25px;
+  height: 25px;
+  cursor: pointer;
+  margin-left: 10px;
+}
+
+.tx > img,
+.delete > img {
+  width: 100%;
+  height: 100%;
+}
+
+.newCss {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: baseline;
+}
+
+.student_input.el-input {
+  width: auto;
+}
+
+.student_input {
+  margin-right: 10px;
+}
+
+.student_input >>> .el-input__icon {
+  line-height: unset;
+}
+</style>

+ 3 - 0
src/components/pages/task/addCourse.vue

@@ -12333,6 +12333,9 @@ export default {
     selectCourseDetail() {
       if (this.cid == "" || this.cid == undefined) {
         console.log("这是新增课程");
+        if(this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5'){
+          this.isTeacherSee = true;
+        }
         this.selectAllType();
       } else {
         this.cidType = 1;

+ 2 - 2
src/components/pages/teacherOffice/index.vue

@@ -284,8 +284,8 @@
                 <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
                   <span>{{ item.name ? item.name : "暂无姓名" }}</span>
                 </el-tooltip>
-                <el-tooltip placement="top" :content="item.username">
-                  <span>{{ item.username }}</span>
+                <el-tooltip placement="top" :content="item.username.split('@')[0]">
+                  <span>{{ item.username.split('@')[0] }}</span>
                 </el-tooltip>
               </div>
             </el-checkbox>

+ 45 - 2
src/components/pages/test/add/components/checkOrder.vue

@@ -93,6 +93,18 @@
                                         :cJson="cJson" @setJson="setJson">
                                     </fileDialog>
                                 </div>
+                                <div v-if="item3.type == 6">
+                                    <courseX :cJson="item3.json"></courseX>
+                                    <courseDialog v-if="item3.type == 6 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </courseDialog>
+                                </div>
+                                <div v-if="item3.type == 7">
+                                    <evaX :cJson="item3.json"></evaX>
+                                    <evaDialog v-if="item3.type == 7 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </evaDialog>
+                                </div>
                             </div>
                         </div>
                     </div>
@@ -113,6 +125,16 @@
                             <fileDialog v-if="item2.type == 5 && checkC === `x${index1}-${index2}`" :cJson="cJson"
                                 @setJson="setJson"></fileDialog>
                         </div>
+                        <div v-else-if="item2.type == 6">
+                            <courseX :cJson="item2.json"></courseX>
+                            <courseDialog v-if="item2.type == 6 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></courseDialog>
+                        </div>
+                        <div v-else-if="item2.type == 7">
+                            <evaX :cJson="item2.json"></evaX>
+                            <evaDialog v-if="item2.type == 7 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></evaDialog>
+                        </div>
                     </div>
                 </div>
             </div>
@@ -132,6 +154,16 @@
                     <fileDialog v-if="item1.type == 5 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
                     </fileDialog>
                 </div>
+                <div v-else-if="item1.type == 6">
+                    <courseX :cJson="item1.json"></courseX>
+                    <courseDialog v-if="item1.type == 6 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </courseDialog>
+                </div>
+                <div v-else-if="item1.type == 7">
+                    <evaX :cJson="item1.json"></evaX>
+                    <evaDialog v-if="item1.type == 7 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </evaDialog>
+                </div>
             </div>
         </div>
         <el-dialog title="修改名称" :visible.sync="groupDaliog" :append-to-body="true" width="500px"
@@ -163,7 +195,10 @@ import gapDialog from './GapFilling/index.vue'
 import gapX from './GapFilling/gap.vue'
 import fileDialog from './file/index.vue'
 import fileX from './file/file.vue'
-
+import courseDialog from './course/index.vue'
+import courseX from './course/course.vue'
+import evaDialog from './evaBox/index.vue'
+import evaX from './evaBox/eva.vue'
 export default {
     mixins: [minxinVue],
     components: {
@@ -173,6 +208,10 @@ export default {
         gapX,
         fileDialog,
         fileX,
+        courseDialog,
+        courseX,
+        evaDialog,
+        evaX,
     },
     props: {
         checkJson: {
@@ -193,7 +232,7 @@ export default {
         return {
             manualJson: [],
             isdrag: "",
-            canEdit: [1, 3, 5],
+            canEdit: [1, 3, 5, 6, 7],
             ctype: "",
             dragType: "",
             oldIndex: "",
@@ -222,6 +261,10 @@ export default {
                         className += " test_icon_gap"
                     } else if (item.type == 5) {
                         className += " test_icon_file"
+                    } else if (item.type == 6) {
+                        className += " test_course_file"
+                    } else if (item.type == 7) {
+                        className += " test_eva_file"
                     }
                     return index + 1 + "、" + (item.json && this.etype != 'edit' ? `<span class='${className}'></span>` : `<span class='${className}'></span>` + this.options2[item.type]) + (item.json && this.etype != 'edit' ? `${item.json.title}` : "");
                 } else if (item.ttype == 2) {

+ 99 - 0
src/components/pages/test/add/components/course/course.vue

@@ -0,0 +1,99 @@
+<template>
+    <div class="c_box">
+        <div class="mask"></div>
+        <!-- <div v-if="!cJson">暂未设置题目</div> -->
+        <div class="choice_box">
+            <div class="title" style="display: flex;">
+                <span>{{cJson.title }}</span>
+            </div>
+            <div class="detail" v-if="cJson.detail">{{ cJson.detail }}</div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+                // 2: { name: '多选题' }
+            }
+        }
+    },
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: calc(100% - 20px);
+    position: relative;
+    margin: 0 auto;
+    padding-left: 26px;
+    box-sizing: border-box;
+}
+
+.mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+}
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.detail {
+    width: 100%;
+    word-break: break-all;
+    color: rgb(136, 139, 146);
+    margin: 10px 0 0;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 10px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 5px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 120px;
+    /* border: 1px solid #3682fc00; */
+    border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input>div {
+    border: 1.5px dashed #dfdfdf;
+    height: 120px;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: rgb(249, 250, 251);
+    color: rgb(124, 124, 124);
+    border-radius: 5px;
+}</style>

+ 112 - 0
src/components/pages/test/add/components/course/courseDilog.vue

@@ -0,0 +1,112 @@
+<template>
+    <el-dialog title="课程选择" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="95%"
+        :before-close="handleClose" class="dialog_diy">
+        <div style="height: 100%;overflow: auto;">
+            <courseIndexVue :courseArray="courseArray" @updateCourseArray="updateCourseArray"></courseIndexVue>
+        </div>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="close()">关 闭</el-button>
+            <el-button @click="submit()" type="primary">确 定</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+import courseIndexVue from './courseIndex.vue';
+export default {
+    components: {
+        courseIndexVue,
+    },
+    props: {
+        dialogVisibleCourse: {
+            type: Boolean,
+            default: false
+        },
+        courses:{
+            type: Array,
+            default: () => []
+        }
+    },
+    data() {
+        return {
+            courseArray: []
+        };
+    },
+    watch: {
+        courses: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.courseArray = JSON.parse(JSON.stringify(this.courses));
+                this.$forceUpdate()
+            }
+        }
+    },
+    mounted () {
+        this.courseArray = JSON.parse(JSON.stringify(this.courses));
+        this.$forceUpdate()
+    },
+    methods: {
+        handleClose(done) {
+            this.close();
+            done();
+        },
+        updateCourseArray(newValue) {
+            let index = this.courseArray.findIndex(i => i === newValue)
+            if (index != -1) {
+                this.courseArray.splice(index, 1)
+            } else {
+                // 给courseArray添加课程id
+                this.courseArray.push(newValue)
+
+            }
+        },
+        close() {
+            this.$emit("update:dialogVisibleCourse", false);
+        },
+				submit(){
+					this.$emit("setCourse", this.courseArray);
+					this.close()
+				}
+    }
+};
+</script>
+
+<style scoped>
+.dialog_diy>>>.el-dialog {
+    height: 100%;
+    margin: 0 auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #454545 !important;
+    padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    height: calc(100% - 124px);
+    box-sizing: border-box;
+    padding: 0px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    background: #fff;
+}
+</style>

+ 2009 - 0
src/components/pages/test/add/components/course/courseIndex.vue

@@ -0,0 +1,2009 @@
+<template>
+    <div class="pb_content" style="height: auto; width: 94%; margin: 10px auto;background: unset;">
+      <div style="width:100%;padding:0 21px;background:#fff;border-radius: 5px;box-sizing: border-box;">
+        <!-- <div class="pb_head top">
+          <div style="
+      display: flex;
+      align-items: center;
+  ">
+            <span class="sub_head">课程管理</span>
+            <span class="subClick" @click="
+              goTo(
+                '/works?userid=' +
+                userid +
+                '&oid=' +
+                oid +
+                '&org=' +
+                org +
+                '&role=' +
+                role
+              )
+              ">评价管理</span>
+          </div>
+          <div class="student_button">
+            <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse3()">创建极简式课程</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse2()">创建任务式课程</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse()">创建阶段式课程</el-button>
+            <button class="r_pub_button_course" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
+              <span>创建课程</span>
+              <div v-show="btnDisplay" class="buttonBox">
+                <div type="primary" @click="goToCourse3()">极简式课程</div>
+                <div type="primary" @click="goToCourse2()">任务式课程</div>
+                <div type="primary" @click="goToCourse()">阶段式课程</div>
+              </div>
+            </button>
+          </div>
+        </div> -->
+        <div class="reBox">
+          <div class="reTop">
+            <!-- <div>分类筛选</div> -->
+            <div class="reTopCh">
+              <!-- <el-select v-model="groupA" @change="search" v-if="role == '1'">
+                <el-option value="4" label="全部"></el-option>
+                <el-option value="2" label="我的课程"></el-option>
+                <el-option value="3" label="协同课程"></el-option>
+                <el-option value="1" label="他人课程"></el-option>
+              </el-select>
+              <el-select v-model="groupA" @change="search" v-else>
+                <el-option value="0" label="全部"></el-option>
+                <el-option value="2" label="我的课程"></el-option>
+                <el-option value="3" label="协同课程"></el-option>
+              </el-select> -->
+              <div class="searchI">
+                <!-- @click="getCourse" -->
+                <div class="search">
+                  <img src="../../../../../../assets/icon/search.png" alt="" />
+                </div>
+                <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="getCourse()" />
+              </div>
+              <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
+            </div>
+          </div>
+          <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
+            <span><span>类型</span></span>
+            <el-radio-group v-model="pTypeCheckName" style="display: flex; align-items: center">
+              <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2" :key="index">
+                <el-radio :label="item.name" @click.native.prevent="CourseType2Click(item.name)">{{ item.name }}</el-radio>
+              </div>
+            </el-radio-group>
+          </div>
+          <div class="choose">
+            <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+              :style="{ margin: !CourseTypeJson[item.id].length && 0 }">
+              <span v-if="CourseTypeJson[item.id].length &&
+                (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
+                  ? pTypeCheck.indexOf(item.id) != -1
+                  : true)
+                "><span>{{ item.name }}</span></span>
+              <div class="typeCss" v-if="CourseTypeJson[item.id].length &&
+                (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
+                  ? pTypeCheck.indexOf(item.id) != -1
+                  : true)
+                ">
+                <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
+                  :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
+                  全部
+                </div>
+                <div v-for="(item1, index1) in CourseTypeJson[item.id]" :key="index + '-' + index1" :label="item1.id"
+                  @click="getCourse2(item.name, item.id, item1.id, 2)">
+                  <div class="cName" :class="typea == item1.id || typeb == item1.id || typed == item1.id
+                    ? 'isCType'
+                    : ''
+                    ">
+                    {{ item1.name }}
+                  </div>
+                </div>
+              </div>
+            </div>
+            <!-- <div class="all_choose" v-if="role == '1'">
+              <span><span>所有者</span></span>
+              <div class="typeCss">
+                <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4'; search();">
+                  全部
+                </div>
+                <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                  我的课程
+                </div>
+                <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                  协同课程
+                </div>
+                <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1'; search();">
+                  他人课程
+                </div>
+              </div>
+            </div>
+            <div class="all_choose" v-else>
+              <span><span>所有者</span></span>
+              <div class="typeCss">
+                <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0'; search();">
+                  全部
+                </div>
+                <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                  我的课程
+                </div>
+                <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                  协同课程
+                </div>
+              </div>
+            </div> -->
+						<div class="chooseAll">
+							<el-checkbox v-model="checkedAll" style="display: flex;">全选</el-checkbox>
+						</div>
+          </div>
+        </div>
+      </div>
+      <div class="line"></div>
+      <div class="pb_content_body" style="height: 100%;width: 100%;background: #e6eaf0;margin: 0 auto;">
+        <div class="student_head" v-if="false">
+          <div class="choose">
+            <div class="student_search">
+              <span>课程筛选</span>
+              <el-select v-model="groupA" @change="search">
+                <el-option value="0" label="我的课程"></el-option>
+                <el-option value="1" label="他人课程"></el-option>
+              </el-select>
+            </div>
+            <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
+              <span v-if="CourseTypeJson[item.id].length">{{ item.name }}</span>
+              <el-select v-if="CourseTypeJson[item.id].length" v-model="courseTypeId[item.id]" placeholder="请选择"
+                @change="getTypeName">
+                <el-option label="全部" value="1">全部</el-option>
+                <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
+                </el-option>
+              </el-select>
+            </div>
+            <div @click="clear" class="clear">重置</div>
+          </div>
+  
+          <div class="student_right">
+            <div class="head_left">
+              <el-input v-model="courseName" class="student_input" placeholder="请输入课程名称"></el-input>
+              <el-button class="course_button" @click="searchCourse">查询</el-button>
+            </div>
+          </div>
+        </div>
+        <div class="student_table">
+          <div class="course_box">
+            <div :class="['out_box',courseArray.includes(item.courseId)?'out_boxActive':'']" v-for="(item, index) in course" :key="index" @click.stop="$emit('updateCourseArray',item.courseId)">
+              <!-- <div class="myCourse" v-if="item.isCourseType == 1 && groupA == 0">
+                我的课程
+              </div>
+              <div class="myCourse" v-else-if="groupA == 1">
+                他人课程
+              </div>
+              <div class="xtCourse" v-else>协同课程</div> -->
+              <!-- <div class="myCourse" v-if="item.userid == userid">我的课程</div>
+              <div class="myCourse" style="background: #4187f0" v-else-if="!item.course_teacher ||
+                (item.course_teacher &&
+                  item.course_teacher.indexOf(userid) == -1)
+                ">
+                他人课程
+              </div>
+              <div class="xtCourse" v-else>协同课程</div> -->
+              <div class="tup">
+                <img :src="item.cover != null && item.cover != ''
+                  ? JSON.parse(item.cover).length > 0
+                    ? JSON.parse(item.cover)[0].url
+                    : mr
+                  : mr
+                  " alt />
+              </div>
+              <!-- <div class="bottom_box">
+                <div>{{ item.title }}</div>
+                <div class="kc_t" v-if="groupA == '1'">
+                  创建老师:{{ item.uname }}
+                </div>
+                <div class="kc_time">{{ item.time }}</div>
+              </div> -->
+              <div class="bottom_box">
+                <div>
+                  <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
+                    <span>{{ item.title }}</span>
+                  </el-tooltip>
+                </div>
+                <!-- v-if="item.isCourseType == 2 || groupA == 1" -->
+                <div class="kc_t">
+                  <span>{{ item.uname }}</span>
+                  <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
+                </div>
+                <div class="kc_time">
+                  <span style="color: #717C8D">创建日期:</span>{{ item.time }}
+                </div>
+                <div class="kc_time">
+                  <span style="color: #717C8D">修改日期:</span>{{ item.utime }}
+                </div>
+              </div>
+              <!-- <div class="three_bottom"> -->
+                <!-- v-if="role == '1'" -->
+                <!-- <div @click="get(item)">预览</div> -->
+                <!-- <div @click="jump(item.courseId)" v-else>评课</div> -->
+                <!-- <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 1
+                  " @click="goToCourse(item.courseId)">
+                  修改
+                </div>
+                <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 2
+                  " @click="goToCourse(item.courseId)">
+                  修改
+                </div>
+                <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 3
+                  " @click="goToCourse3(item.courseId)">
+                  修改
+                </div> -->
+                <!-- <div v-if="groupA == '0'" @click="
+                  goTo(
+                    '/works?cid=' +
+                    item.courseId +
+                    '&userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role
+                  )
+                  ">
+                  评价
+                </div> -->
+                <!-- <div @click="copyCourse(item.courseId)">
+                  复制
+                </div>
+                <div v-if="item.isCourseType == 1 || role == '1'" @click="deleteCourse(item.courseId)">
+                  删除
+                </div> -->
+                <!-- <div class="more">
+                  <span style="font-size: 18px; font-weight: 700">...</span>
+                  <div>
+                    <span @click="copyCourse(item.courseId)">复制</span>
+                    <span @click="jump(item.courseId)" v-if="role == '1'">评课</span>
+                    <span @click="get(item.courseId)" v-else>预览</span>
+                    <span @click="getNT(item.courseId)">无终端</span>
+                  </div>
+                </div> -->
+              <!-- </div> -->
+            </div>
+            <div class="course_empty" v-if="course.length == 0">暂无数据</div>
+          </div>
+        </div>
+      </div>
+      <div class="student_page">
+        <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
+          v-if="page && course.length" style="padding-bottom: 20px" @current-change="handleCurrentChange"></el-pagination>
+      </div>
+      <el-dialog :visible.sync="dialogVisible1" size="tiny">
+        <img width="100%" :src="dialogImageUrl" alt />
+      </el-dialog>
+      <el-dialog title="查看提问" :visible.sync="dialogVisible" :append-to-body="true" width="750px" :before-close="handleClose"
+        class="dialog_diy">
+        <div>
+          <div class="a_addBox">
+            <CourseProblem :problemCourse="problemCourse"></CourseProblem>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false">关 闭</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog title="查看协同课程" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="850px"
+        :before-close="handleClose" class="dialog_diy">
+        <div class="ct_box">
+          <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
+            <div class="tup">
+              <img :src="item.cover != null && item.cover != ''
+                ? JSON.parse(item.cover).length > 0
+                  ? JSON.parse(item.cover)[0].url
+                  : mr
+                : mr
+                " alt />
+            </div>
+            <div class="bottom_box">
+              <div>{{ item.title }}</div>
+              <div class="kc_t">创建老师:{{ item.uname }}</div>
+              <div class="kc_time">{{ item.time }}</div>
+            </div>
+            <div class="three_bottom">
+              <div @click="jump(item.courseId)">查看内容</div>
+              <div @click="
+                goTo(
+                  '/course/addCourse?cid=' +
+                  item.courseId +
+                  '&userid=' +
+                  userid +
+                  '&oid=' +
+                  oid +
+                  '&org=' +
+                  org
+                )
+                ">
+                编辑
+              </div>
+            </div>
+          </div>
+          <div class="course_empty" v-if="courseTeam.length == 0">暂无数据</div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisibleCourse = false">关 闭</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </template>
+  
+  <script>
+  import "../../../../../../common/aws-sdk-2.235.1.min";
+  import EditorBar from "../../../../../../components/tools/wangEnduit";
+  import CourseProblem from "../../../../components/courseProblem";
+  export default {
+    components: { EditorBar, CourseProblem },
+		props:{
+			courseArray:{
+				type:Array,
+				default:()=>[]
+			}
+		},
+		emit:['updateCourseArray'],
+    data() {
+      return {
+        itemCount: 1,
+        courseTitle: "",
+        courseText: "",
+        courseTime: "",
+        isLoading: false,
+        fileList: [],
+        fileList1: [],
+        homeworkList: [{ name: "" }],
+        formLabelWidth: "100px",
+        dialogVisible: false,
+        dialogVisible1: false,
+        dialogVisibleCourse: false,
+        dialogImageUrl: "",
+        group: "",
+        userid: this.$route.query.userid,
+        oid: this.$route.query.oid,
+        org: this.$route.query.org,
+        role: this.$route.query.role,
+        Juri: "",
+        groupList: [],
+        JuriList: [],
+        page: 1,
+        total: 0,
+        pageSize: 20,
+        tableData: [],
+        now: "",
+        courseDetail: {},
+        addCourse: {},
+        groupA: "0",
+        classX: "",
+        course: [],
+        courseName: "",
+        mr: require("../../../../../../assets/icon/kc1.png"),
+        CourseType: [],
+        CourseType2: [],
+        CourseTypeJson: {},
+        courseTypeId: {},
+        courseTypeSon: [],
+        isChoose: 0,
+        problemCourse: null, //查看提问的课程
+        courseTeam: [],
+        typeE: [],
+        typea: "",
+        typeb: "",
+        typed: "",
+        pTypeCheck: [],
+        pTypeCheckName: [],
+        btnDisplay: false,
+      };
+    },
+		computed:{
+			checkedAll:{
+				get(){
+					return this.course.every(i=>this.courseArray.includes(i.courseId));
+				},
+				set(newValue){
+					if(newValue){//获取当前页的所有
+						this.course.forEach(i=>{
+							if(!this.courseArray.includes(i.courseId)){
+								this.$emit('updateCourseArray',i.courseId)
+							}
+						})
+					}else{//删除当前页的所有
+						this.course.forEach(i=>{
+							if(this.courseArray.includes(i.courseId)){
+								this.$emit('updateCourseArray',i.courseId)
+							}
+						})
+					}
+				}
+			}
+		},
+    methods: {
+      change(val) {
+        console.log(val);
+      },
+      time() {
+        if (!this.now) {
+          this.now = new Date().getTime();
+          return true;
+        } else {
+          let time = new Date().getTime();
+          if (time - this.now > 3000) {
+            this.now = time;
+            return true;
+          } else {
+            return false;
+          }
+        }
+      },
+      addHomeworkBox() {
+        this.homeworkList.push({ name: "" });
+        this.itemCount++;
+      },
+      reduceHomeworkBox() {
+        var a = this.homeworkList;
+        a.splice(a.length - 1);
+        this.itemCount--;
+      },
+      goTo(path) {
+        this.$router.push(path);
+      },
+      CourseType2Change(val) {
+        this.pTypeCheck = [];
+        for (var i = 0; i < this.CourseType2.length; i++) {
+          let typeA = this.CourseType2[i];
+          if (val.indexOf(typeA.name) != -1) {
+            this.pTypeCheck.push(...typeA.id);
+          }
+        }
+        this.typea = "";
+        this.typeb = "";
+        this.typed = "";
+        this.getCourse();
+      },
+      CourseType2Click(val) {
+        this.pTypeCheck = [];
+        this.typeE = [];
+        if (val === this.pTypeCheckName) {
+          this.pTypeCheckName = "";
+        } else {
+          this.pTypeCheckName = val;
+          for (var i = 0; i < this.CourseType2.length; i++) {
+            let typeA = this.CourseType2[i];
+            if (val.indexOf(typeA.name) != -1) {
+              this.pTypeCheck.push(...typeA.id);
+              this.typeE = [...typeA.id];
+            }
+          }
+        }
+  
+        this.typea = "";
+        this.typeb = "";
+        this.typed = "";
+        this.getCourse();
+      },
+      goToCourse(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourse?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourse?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+        // this.$router.push(path);
+      },
+      reset() {
+        this.typeE = []
+        this.typea = ''
+        this.typeb = ''
+        this.typed = ''
+        this.courseName = ''
+        if (this.role == "1") {
+          this.groupA = "4";
+        } else {
+          this.groupA = "0";
+        }
+        this.getCourse();
+      },
+      goToCourse2(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourseT?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourseT?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+      },
+      goToCourse3(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourseE?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourseE?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+      },
+      tableRowClassName({ row, rowIndex }) {
+        if ((rowIndex + 1) % 2 === 0) {
+          return "even_row";
+        } else {
+          return "";
+        }
+      },
+      jump(cid) {
+        // window.open(
+        //   "//pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?courseId=" +
+        //     cid +
+        //     "&userid=" +
+        //     this.userid
+        // );
+        top.postMessage({ cid: cid, screenType: "2" }, "*");
+      },
+      get(item) {
+        top.postMessage({ cid: item.courseId, screenType: "3" }, "*");
+      },
+      getNT(cid) {
+        top.postMessage({ cid: cid, screenType: "3NT" }, "*");
+      },
+      handle_remove(file, fileList) {
+        var _tmp = this.fileList;
+        for (var i = 0, len = _tmp.length; i < len; i++) {
+          if (_tmp[i].uid == file.uid) {
+            _tmp.splice(i, 1);
+            break;
+          }
+          this.fileList = _tmp;
+        }
+      },
+      handle_remove1(file, fileList) {
+        var _tmp = this.fileList1;
+        for (var i = 0, len = _tmp.length; i < len; i++) {
+          if (_tmp[i].uid == file.uid) {
+            _tmp.splice(i, 1);
+            break;
+          }
+          this.fileList1 = _tmp;
+        }
+      },
+      handleCurrentChange(val) {
+        // console.log(`当前页: ${val}`);
+        this.page = val;
+        this.getCourse();
+      },
+      init() { },
+      handleClose(done) {
+        done();
+      },
+      handleRemove(file, fileList) {
+        console.log(file, fileList);
+      },
+      handlePictureCardPreview(file) {
+        this.dialogImageUrl = file.url;
+        this.dialogVisible1 = true;
+      },
+      onExceed() {
+        this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
+      },
+      //uuid生成
+      guid() {
+        return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
+          /[xy]/g,
+          function (c) {
+            var r = (Math.random() * 16) | 0,
+              v = c == "x" ? r : (r & 0x3) | 0x8;
+            return v.toString(16);
+          }
+        );
+      },
+      time() {
+        if (!this.now) {
+          this.now = new Date().getTime();
+          return true;
+        } else {
+          let time = new Date().getTime();
+          if (time - this.now > 3000) {
+            this.now = time;
+            return true;
+          } else {
+            return false;
+          }
+        }
+      },
+      searchCourse() {
+        this.page = 1;
+        this.getCourse();
+      },
+      clear() {
+        for (var i = 0; i < this.CourseType[0].length; i++) {
+          this.courseTypeId[this.CourseType[0][i].id] = "";
+        }
+        this.getCourse();
+      },
+      getCourse2(typeName, ftypeId, typeid, type) {
+        this.page = 1;
+        if (typeid == "34628934-d02f-11ec-8c78-005056b86db5" || ftypeId == '34628934-d02f-11ec-8c78-005056b86db5' || typeid == "34628934-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34628934-d02f-11ec-8c78-005056b86ac5") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typea != "") {
+                this.typea = "";
+              }
+            }
+          } else {
+            if (this.typea == typeid) {
+              this.typea = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typea = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "专栏") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "栏目") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeid == "34629bcc-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629bcc-d02f-11ec-8c78-005056b86db5') {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "学院") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeid == "34629907-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629907-d02f-11ec-8c78-005056b86db5' || typeid == "34629907-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34629907-d02f-11ec-8c78-005056b86ac5") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typed != "") {
+                this.typed = "";
+              }
+            }
+          } else {
+            if (this.typed == typeid) {
+              this.typed = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typed = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        }
+        // this.loading = true;
+        this.getCourse();
+      },
+      getCourse() {
+        if (!this.loading) {
+          this.loading = this.openLoading(
+            document.querySelector(".student_table")
+          );
+        }
+        // var typeE = [];
+        // var typea, typeb, typec, typed;
+        // if (this.isChoose == 1) {
+        //   for (var i = 0; i < this.CourseType[0].length; i++) {
+        //     if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
+        //       typeE.push(this.CourseType[0][i].id);
+        //     } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
+        //       if (this.CourseType[0][i].name == "年级") {
+        //         typea = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "专栏") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "栏目") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "学院") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "主题") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "新技能") {
+        //         typec = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "学科") {
+        //         typed = this.courseTypeId[this.CourseType[0][i].id];
+        //       }
+        //       this.courseTypeSon.push(
+        //         this.courseTypeId[this.CourseType[0][i].id]
+        //       );
+        //     }
+        //   }
+        // }
+        console.log("typea", this.typea);
+        this.isLoading = true;
+        let params = {
+          // type: this.groupA,
+					type: "4",
+          uid: this.userid,
+          oid: this.oid,
+          org: this.org,
+          typea: this.typea != undefined ? this.typea : "",
+          typeb: this.typeb != undefined ? this.typeb : "",
+          typec: "",
+          typed: this.typed != undefined ? this.typed : "",
+          typeE: this.typeE.join(","),
+          cu: "",
+          cn: this.courseName,
+          page: this.page,
+          pageSize: this.pageSize,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectCourseNew2", params)
+          .then((res) => {
+            this.loading.close();
+            this.loading = "";
+            this.isLoading = false;
+            this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+            this.course = res.data[0];
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      getTypeName() {
+        this.$forceUpdate();
+        this.page = 1;
+        this.isChoose = 1;
+        this.getCourse();
+      },
+      // searchCourse() {
+      //   this.isLoading = true;
+      //   let params = {
+      //     cu: "",
+      //     cn: this.courseName,
+      //     page: this.page,
+      //   };
+      //   this.ajax
+      //     .get(this.$store.state.api + "searchCourse", params)
+      //     .then((res) => {
+      //       this.isLoading = false;
+      //       this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+      //       this.course = res.data[0];
+      //     })
+      //     .catch((err) => {
+      //       this.isLoading = false;
+      //       console.error(err);
+      //     });
+      // },
+      deleteCourse(cid) {
+        // if (this.time()) {
+        this.$confirm("确定删除此课程吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            const loading = this.openLoading(
+              document.querySelector(".student_table")
+            );
+            this.isLoading = true;
+            let params = {
+              cid: cid,
+            };
+            this.ajax
+              .get(this.$store.state.api + "deleteCourse", params)
+              .then((res) => {
+                loading.close();
+                this.isLoading = false;
+                this.$message.success("删除成功");
+                this.getCourse();
+              })
+              .catch((err) => {
+                console.error(err);
+              });
+          })
+          .catch(() => {
+            loading.close();
+            this.isLoading = false;
+            return;
+          });
+        // }
+      },
+      selectAllType() {
+        let params = {
+          org: this.org && this.org != "" ? this.org : "",
+          oid: this.oid && this.oid != "" ? this.oid : "",
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectAllType", params)
+          .then((res) => {
+            if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+              res.data[0] = [...res.data[0], ...res.data[4]]
+            }
+            this.CourseType = res.data;
+            this.CourseType2 = [
+              { name: "智见课程", id: [] },
+              { name: "智行课程", id: [] },
+              { name: "智创课程", id: [] },
+            ];
+  
+            for (var cti = 0; cti < res.data[0].length; cti++) {
+              if (
+                res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
+                res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
+              ) {
+                this.CourseType2[0].id.push(res.data[0][cti].id);
+              } else if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
+                res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                this.CourseType2[1].id.push(res.data[0][cti].id);
+              } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
+                this.CourseType2[2].id.push(res.data[0][cti].id);
+              }
+              if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
+                res.data[0][cti].name = "年级";
+              } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                res.data[0][cti].name = "学科";
+              } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
+                res.data[0][cti].name = "主题";
+              }
+            }
+            for (var i = 0; i < res.data[0].length; i++) {
+              if (!this.cid) {
+                this.courseTypeId[res.data[0][i].id] = [];
+              }
+              if (!this.CourseTypeJson[res.data[0][i].id]) {
+                this.CourseTypeJson[res.data[0][i].id] = [];
+              }
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                if (res.data[0][i].name == "栏目") {
+                  this.CourseType[0][i].name = "主题";
+                }
+              }
+              if (res.data[2].length == 0 && res.data[3].length == 0) {
+                for (var j = 0; j < res.data[1].length; j++) {
+                  if (res.data[0][i].id == res.data[1][j].pid) {
+                    this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
+                  }
+                }
+              } else {
+                if (res.data[2].length > 0) {
+                  for (var j = 0; j < res.data[2].length; j++) {
+                    if (res.data[0][i].id == res.data[2][j].pid) {
+                      this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
+                    }
+                  }
+                }
+                if (res.data[3].length > 0) {
+                  for (var j = 0; j < res.data[3].length; j++) {
+                    if (res.data[0][i].id == res.data[3][j].pid) {
+                      this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
+                    }
+                  }
+                }
+              }
+            }
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectType() {
+        this.ajax
+          .get(this.$store.state.api + "selectType")
+          .then((res) => {
+            this.CourseType = res.data;
+            for (var i = 0; i < res.data[0].length; i++) {
+              if (!this.cid) {
+                this.courseTypeId[res.data[0][i].id] = "";
+              }
+              // if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+              //   if (res.data[0][i].name == "栏目") {
+              //     this.CourseType[0][i].name = "主题";
+              //   }
+              // }
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); //去除公共分类
+                }
+              }
+            }
+            this.selectTypeByOid();
+            this.selectTypeByOrg();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectTypeByOid() {
+        let params = {
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTypeByOid", params)
+          .then((res) => {
+            for (var i = 0; i < res.data[0].length; i++) {
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
+                }
+              }
+            }
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectTypeByOrg() {
+        let params = {
+          oid: this.org,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTypeByOrg", params)
+          .then((res) => {
+            for (var i = 0; i < res.data[0].length; i++) {
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
+                }
+              }
+            }
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      openCourse() {
+        this.dialogVisibleCourse = true;
+        this.getTeamCourse();
+      },
+      getTeamCourse() {
+        let params = {
+          uid: this.userid,
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectCourseTeam", params)
+          .then((res) => {
+            this.courseTeam = res.data[0];
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      search() {
+        this.page = 1;
+        this.getCourse();
+      },
+      checkProblem(res) {
+        this.problemCourse = res;
+        this.dialogVisible = true;
+      },
+      copyCourse(cid) {
+        let params = [
+          {
+            cid: cid,
+            uid: this.userid,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "copyCourse", params)
+          .then((res) => {
+            this.page = 1;
+            if (this.role == "1") {
+              this.groupA = "4";
+            } else {
+              this.groupA = "0";
+            }
+            this.$message.success("复制成功")
+            this.clear();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+    },
+    created() {
+      if (this.role == "1") {
+        this.groupA = "4";
+      }
+      this.page = 1;
+      // this.selectType();
+      this.selectAllType();
+      this.getCourse();
+      let _this = this
+      window.goToCourse3 = function(){
+        _this.goToCourse3()
+      }
+  
+      window.goToCourse = function(){
+        _this.goToCourse()
+      }
+    },
+  };
+  </script>
+  
+  <style scoped>
+  @media screen and (max-width: 1380px) {
+    .out_box {
+      width: calc(100% / 4 - (15px * 3) / 4) !important;
+    }
+  
+    .out_box:nth-child(5n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(4n) {
+      margin-right: 0 !important;
+    }
+  }
+  
+  @media screen and (max-width: 1080px) {
+    .out_box {
+      width: calc(100% / 3 - (15px * 2) / 3) !important;
+    }
+  
+    .out_box:nth-child(5n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(4n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(3n) {
+      margin-right: 0 !important;
+    }
+  }
+  
+  .dialog_diy>>>.el-dialog__header {
+    background: #3d67bc !important;
+    padding: 15px 20px;
+  }
+  
+  .dialog_diy>>>.el-dialog__title {
+    color: #fff;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+  }
+  
+  .student_head>>>.el-button--primary {
+    background-color: #2268bc;
+  }
+  
+  .xls_button {
+    font-size: 14px;
+    cursor: pointer;
+    text-decoration: underline;
+    color: rgb(34, 104, 188);
+  }
+  
+  .student_head {
+    display: flex;
+    justify-content: space-between;
+    align-items: baseline;
+    flex-direction: row;
+    flex-wrap: wrap;
+  }
+  
+  .top {
+    display: flex;
+    justify-content: space-between;
+    width: 100% !important;
+    box-sizing: border-box;
+    margin: 0px auto;
+    padding: 10px 5px;
+    height: 54px;
+  }
+  
+  .bgColor {
+    background: #0061FF;
+  }
+  
+  .student_search {
+    display: flex;
+    align-items: center;
+    width: calc(100% / 3);
+  }
+  
+  .student_search span {
+    margin: 0 10px 0 0;
+    min-width: 65px;
+  }
+  
+  .student_button {
+    display: flex;
+    /* overflow: hidden; */
+    height: 40px;
+  }
+  
+  .upload-demo {
+    display: flex;
+    flex-direction: column;
+    align-items: end;
+    /* position: relative; */
+    width: 100px;
+    overflow: hidden;
+  }
+  
+  .student_table {
+    /* padding: 20px 0; */
+    height: 100%;
+    /* overflow: auto; */
+    min-height: 360px;
+  }
+  
+  .student_empty {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  
+  .el-table>>>.even_row {
+    background-color: #f1f1f1;
+  }
+  
+  .time {
+    font-size: 13px;
+    color: #999;
+  }
+  
+  .course_button {
+    padding: 10px 20px;
+  }
+  
+  .course_button_box {
+    display: flex;
+    margin-top: 5px;
+    justify-content: space-between;
+  }
+  
+  .course_rate {
+    margin-top: 5px;
+  }
+  
+  .course_view {
+    display: flex;
+    align-items: center;
+    margin: 5px 0 0 0;
+  }
+  
+  .course_view i {
+    background-image: url("../../../../../../assets/liulan.png");
+    width: 25px;
+    height: 25px;
+    background-size: 100% 100%;
+    /* margin-top: 1px; */
+    line-height: 25px;
+    vertical-align: text-top;
+    background-repeat: no-repeat;
+  }
+  
+  .image {
+    width: 100%;
+    height: 150px;
+    display: block;
+  }
+  
+  .course_box {
+    display: flex;
+    flex-wrap: wrap;
+		background-color: white;
+  }
+  
+  .student_page {
+    width: 100%;
+    margin: 0 auto;
+    /* background: #e6eaf0; */
+		background-color: white;
+  }
+  
+  .course_create_box {
+    font-size: 18px;
+  }
+  
+  .course_name {
+    margin-top: 10px;
+  }
+  
+  .course_name span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .homework_box {
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+  }
+  
+  .course_homework {
+    width: 130px;
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+    align-items: center;
+    margin: 0 10px 10px 0;
+  }
+  
+  .course_type {
+    margin-top: 10px;
+    display: flex;
+  }
+  
+  .course_type1 span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .course_type2 {
+    margin-left: 20px;
+  }
+  
+  .course_type2 span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .course_empty {
+    color: rgb(110, 110, 110);
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  
+  .el_cards>>>.el-card__body {
+    height: 100%;
+  }
+  
+  .courseBtnBox {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: calc(100% - 170px);
+    padding: 10px;
+  }
+  
+  .wordUpload {
+    display: flex;
+  }
+  
+  .wordUpload>.buttonUp {
+    margin-right: 5px;
+  }
+  
+  .out_box {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    width: calc(100% / 5 - (15px * 4) / 5);
+    /* width: 280px; */
+    background: #fff;
+		/* background-color: white; */
+    margin-right: 15px;
+    /* border: 1px solid #ccc; */
+    height: fit-content;
+    box-sizing: border-box;
+    border-radius: 0px 0px 5px 5px;
+    /* overflow: hidden; */
+    margin-bottom: 15px;
+    position: relative;
+    border-radius: 8px;
+    box-sizing: border-box;
+    overflow: hidden;
+    border: 1px solid #3682fc00;
+		cursor: pointer;
+		border: 1px solid #6a9ff5;
+  }
+
+	.out_boxActive{
+		box-sizing: border-box;
+		border: 3px solid #3681FC !important;
+
+	}
+  
+  .out_box:hover {
+    border: 1px solid #3681FC;
+  }
+  
+  .out_box:nth-child(5n) {
+    margin-right: 0;
+  }
+  
+  .bottom_box {
+    display: flex;
+    padding: 10px;
+    flex-direction: column;
+    box-sizing: border-box;
+    height: 121px;
+    flex-wrap: nowrap;
+    justify-content: space-evenly;
+  }
+  
+  .bottom_box>div:nth-child(1) {
+    width: 100%;
+    /* overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold; */
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+  
+  .bottom_box>div:nth-child(1)>span:nth-child(1) {
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold;
+  }
+  
+  .bottom_box>div:nth-child(1)>span:nth-child(2) {
+    min-width: fit-content;
+    font-size: 14px;
+    color: #8c8c8c;
+  }
+  
+  .tup {
+    width: 100%;
+    height: 180px;
+    margin: 0 auto;
+    overflow: hidden;
+    display: flex;
+    align-items: center;
+    padding: 10px;
+    box-sizing: border-box;
+  }
+  
+  .tup>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+  }
+  
+  .kc_time {
+    margin-top: 8px;
+    font-size: 14px;
+    color: #717C8D;
+  }
+  
+  .kc_time+.kc_time {
+    margin-top: 0;
+  }
+  
+  .kc_t {
+    margin-top: 5px;
+    width: 100%;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+  .kc_t>span:nth-child(1) {
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+  .kc_t>span:nth-child(2) {
+    min-width: fit-content;
+    font-size: 14px;
+    color: #8c8c8c;
+  }
+  
+  .three_bottom {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-around;
+    height: 45px;
+    align-items: center;
+    background: #fff;
+    font-size: 14px;
+    border-top: 1px solid #ddd;
+    box-sizing: border-box;
+  }
+  
+  .three_bottom>div {
+    cursor: pointer;
+    width: 100%;
+    text-align: center;
+  }
+  
+  .three_bottom>div+div {
+    border-left: 1px solid #ddd;
+  }
+  
+  .three_bottom>div:hover {
+    color: #3681FC;
+    font-weight: bold;
+  }
+  
+  .three_bottom .deleteB {
+    color: #E96E6E;
+  }
+  
+  .three_bottom .deleteB:hover {
+    color: #E96E6E;
+    font-weight: bold;
+  }
+  
+  .head_left {
+    display: flex;
+  }
+  
+  .student_input>>>.el-input__inner {
+    height: 40px;
+    width: 190px;
+    font-size: 13px;
+    padding: 0 10px;
+  }
+  
+  .course_button {
+    color: #fff;
+    background: #2268bc;
+    width: 75px;
+    height: 40px;
+    padding: 0 !important;
+    font-size: 12px;
+    line-height: 40px;
+  }
+  
+  /* .all_choose {
+    margin: 15px 0 10px;
+    height: 20%;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    max-width: calc(100% / 3);
+  }
+  
+  .all_choose > span {
+    width: 50px;
+    display: block;
+  }
+  
+  .choose {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    align-content: space-between;
+    height: 100%;
+    justify-content: flex-start;
+    width: 60%;
+    min-width: 868px;
+    align-items: center;
+  } */
+  
+  /* .choose > div:nth-child(2) {
+    margin-left: 1%;
+    width: 32.33333%;
+  }
+  
+  .choose > div:nth-child(4) {
+    margin-right: 1%;
+    width: 32.33333%;
+  }
+  
+  .choose > div:nth-child(5) {
+    margin: 5px 0 0 1%;
+  }
+  
+  .choose > div:nth-child(4) > span {
+    width: 74px !important;
+    min-width: 74px;
+  }
+  
+  .choose > div:nth-child(4) >>> .el-select {
+    width: 217.5px;
+    min-width: 215.06px;
+  } */
+  
+  .clear {
+    width: 70px;
+    height: 35px;
+    background: #0061FF;
+    color: #fff;
+    text-align: center;
+    border-radius: 5px;
+    line-height: 35px;
+    cursor: pointer;
+    margin-left: 20px;
+  }
+  
+  .ct_box {
+    height: 500px;
+    overflow: auto;
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .myCourse {
+    position: absolute;
+    background: #3c3c3c;
+    width: 70px;
+    height: 30px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 30px;
+    top: 5px;
+    left: 5px;
+  }
+  
+  .xtCourse {
+    position: absolute;
+    background: #0061FF;
+    width: 70px;
+    height: 30px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 30px;
+    top: 5px;
+    left: 5px;
+  }
+  
+  .sub_head {
+    position: relative;
+  }
+  
+  .sub_head::after {
+    content: "";
+    width: 100%;
+    background: #5a9cea;
+    height: 2px;
+    position: absolute;
+    left: 0;
+    bottom: -10px;
+  }
+  
+  .subClick {
+    /* font-size: 16px; */
+    font-size: 26px;
+    cursor: pointer;
+    margin-left: 17.5px;
+    /* color: #ab582f; */
+    /* color: #409eff; */
+    color: #999;
+  }
+  
+  .subClick:hover {
+    color: #000;
+  }
+  
+  .more {
+    position: relative;
+  }
+  
+  .more:hover div {
+    display: block;
+    color: #000;
+  }
+  
+  .more div {
+    position: absolute;
+    bottom: 0px;
+    transform: translate(-50%, 100%);
+    background: #f5f4f4;
+    padding: 10px 20px;
+    z-index: 99;
+    width: 50px;
+    border-radius: 5px;
+    box-shadow: 0 0 3px 3px #80808020;
+    display: none;
+  }
+  
+  .more div>span+span {
+    margin-top: 10px;
+  }
+  
+  .more div>span {
+    display: block;
+    width: 100%;
+    text-align: center;
+  }
+  
+  .more div>span:hover {
+    color: #79a2ff;
+  }
+  
+  .line {
+    width: 100%;
+    height: 15px;
+    /* background: #e6eaf0; */
+		background-color: white;
+  }
+  
+  .reBox {
+    width: 100%;
+    /* padding-left: 20px; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    overflow: hidden;
+    padding: 10px 15px 0;
+  }
+  
+  .reTop {
+    padding: 0 0 5px;
+    /* padding: 20px 0 0 0; */
+    /* border-bottom: 1px solid #eee; */
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    align-items: center;
+    justify-content: space-between;
+  }
+  
+  .reTop>div:nth-child(1) {
+    font-weight: bold;
+    /* width: 40px; */
+    /* border-bottom: 1px solid #205cc6; */
+    /* padding-bottom: 20px; */
+    color: #205cc6;
+    /* font-size: 20px; */
+  }
+  
+  .reTop .reTopCh {
+    display: flex;
+  }
+  
+  .reTop .searchI {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    border: 1px solid #ccced3;
+    width: 250px;
+    border-radius: 8px;
+    padding: 5px 0;
+    /* margin-bottom: 10px; */
+    background: #fafafa;
+    margin: 0 0 0 10px;
+  }
+  
+  .search {
+    width: 20px;
+    padding: 0 5px;
+    display: flex;
+    align-items: center;
+  }
+  
+  .search>img {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .sInput {
+    border: none;
+    width: 85%;
+    background: #fafafa;
+  }
+  
+  .sInput:focus-visible {
+    outline: none;
+  }
+  
+  .typeCss {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    align-items: center;
+  }
+  
+  .choose {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: 100%;
+    justify-content: space-evenly;
+    align-items: flex-start;
+    padding: 10px 0;
+  }
+  
+  .all_choose {
+    display: flex;
+    flex-direction: row;
+    align-items: baseline;
+    margin: 2px 0;
+    width: 100%;
+  }
+  
+  .all_choose>span {
+    display: flex;
+    margin-right: 5px;
+  }
+  
+  .all_choose>span>span {
+    min-width: 65px;
+    max-width: 65px;
+    display: block;
+    text-align-last: justify;
+  }
+  
+  .all_choose>span::after {
+    content: ':';
+  }
+  
+  .all_choose>span:nth-child(1) {
+    font-weight: bold;
+  }
+  
+  .all_choose>>>.el-checkbox-group {
+    display: flex;
+    flex-direction: row;
+    width: 820px;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: flex-start;
+    align-items: center;
+    margin-top: 3px;
+  }
+  
+  .all_choose>.el-checkbox-group>>>.el-checkbox {
+    margin-bottom: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+  }
+  
+  .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
+    min-width: 80px;
+    overflow: hidden;
+    width: 80px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+  .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
+    width: auto;
+  }
+  
+  .cName {
+    cursor: pointer;
+    margin: 0 10px 5px 0;
+    color: #b9b6b9;
+    min-width: 80px;
+    width: 80px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+  
+  .isCType {
+    color: #6282c2;
+  }
+  
+  .pType_box {
+    margin-top: 0;
+  }
+  
+  .pType_box>>>.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
+    -webkit-box-shadow: none !important;
+    box-shadow: none !important;
+  }
+  
+  .buttonBox {
+    position: absolute;
+    bottom: -0;
+    transform: translateY(100%);
+    background: #fff;
+    border-radius: 5px;
+    box-shadow: 0 0 3px 1px #e3e3e3;
+    width: 100%;
+  }
+  
+  .buttonBox>div {
+    height: 40px;
+    line-height: 40px;
+    width: 100%;
+    text-align: center;
+    color: #000;
+    box-sizing: border-box;
+  }
+  
+  .buttonBox>div+div {
+    border-top: 1px solid #e0e0e0;
+  }
+  
+  .buttonBox>div:hover {
+    background: #f6f8ff;
+  }
+
+	.checkedAll >>> .el-checkbox{
+		display: flex !important;
+		align-items: center !important;
+
+	}
+	</style>
+  

+ 312 - 0
src/components/pages/test/add/components/course/index.vue

@@ -0,0 +1,312 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置附件</div> -->
+        <div class="box">
+            <div class="set_title">
+                <span>表单问题:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></textarea>
+            </div>
+            <div class="set_title">
+                <span>问题描述:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
+                    placeholder="请输入描述"></textarea>
+            </div>
+            <div class="set_title" style="flex-direction: column;">
+                <div class="title_setting">
+                    <span>选择课程:</span>
+                    <div @click="openCourse" class="setting">点击添加课程</div>
+                </div>
+                <!-- {{courses}} -->
+                <div class="set_title_list" v-loading="loading">
+                    <div v-for="(item, index) in courses" class="set_title_list_item" :key="index"
+                        v-if="coursesList.find(i => i.courseId == item)">
+                        <!-- {{ `课程名称:${item.title}     创建人:${item.username}`}} -->
+                        <div class="set_title_list_itemBtn el-icon-remove-outline" @click.stop="delCourse(item)"></div>
+                        <div class="set_title_list_itemLabel">
+                            <span>课程名称:{{ coursesList.find(i => i.courseId == item) &&
+        coursesList.find(i => i.courseId == item).title }}</span>
+                            <span>创建人:{{ coursesList.find(i => i.courseId == item) &&
+        coursesList.find(i => i.courseId == item).username }}</span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <courseDilogVue :dialogVisibleCourse.sync="dialogVisibleCourse" :courses="courses" @setCourse="setCourse">
+        </courseDilogVue>
+    </div>
+</template>
+
+<script>
+import courseDilogVue from './courseDilog.vue'
+// import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        // EditorBar,
+        courseDilogVue
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            loading: false,
+            ctype: 1,
+            options: [
+                { type: 1, name: '附件' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {},
+            dialogVisibleCourse: false,
+            courses: [],
+            coursesList: [],
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+            },
+            deep: true
+        },
+        async courses(newValue) {
+            this.loading = true;
+            let result = [];
+            let params = {
+                cid: this.courses.join(',')
+            }
+            let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll', params);
+            result = data.data[0]
+            this.coursesList = result;
+            this.loading = false;
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.score = ''
+            }
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+        openCourse() {
+            this.dialogVisibleCourse = true
+        },
+        setCourse(courses) {
+            this.checkJson.courses = courses
+            this.courses = courses
+            this.$forceUpdate()
+        },
+        // 删除课程
+        delCourse(cid) {
+            let index = this.courses.findIndex(i => i == cid);
+            this.courses.splice(index, 1)
+        }
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                detail: "",
+                courses: []
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+            this.courses = this.checkJson.courses
+        }
+
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+
+.title_setting{
+    margin-bottom: 10px;
+    display: flex;
+    align-items: flex-start;
+}
+
+.title_setting>span{
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.setting {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    /* justify-content: flex-end; */
+    width: 100%;
+}
+
+.setting::before {
+    content: '';
+    display: block;
+    width: 20px;
+    height: 20px;
+    background-image: url('../../../../../../assets/icon/test/test_setting_icon.png');
+    background-size: 100% 100%;
+    margin-right: 5px;
+}
+
+.set_title_list_item {
+    display: flex;
+    align-items: center;
+    width: auto;
+    height: 40px;
+    margin-bottom: 20px;
+    border-radius: 10px;
+    padding: 0 20px
+}
+
+.set_title_list_item:hover {
+    background-color: #d4dde1;
+}
+
+.set_title_list_item:hover>.set_title_list_itemBtn {
+    opacity: 1;
+}
+
+.set_title_list_itemBtn {
+    font-size: 18px;
+    margin-right: 20px;
+    cursor: pointer;
+    opacity: 0;
+}
+
+.set_title_list_itemLabel {
+    display: flex;
+    align-items: center;
+}
+
+.set_title_list_itemLabel>span {
+    margin-right: 20px;
+}
+
+.set_title_list {
+    min-width: 100%;
+    /* min-height: 200px; */
+}
+</style>

+ 98 - 0
src/components/pages/test/add/components/evaBox/eva.vue

@@ -0,0 +1,98 @@
+<template>
+    <div class="c_box">
+        <div class="mask"></div>
+        <div class="choice_box">
+            <div class="title" style="display: flex;">
+                <span>{{cJson.title }}</span>
+            </div>
+            <div class="detail" v-if="cJson.detail">{{ cJson.detail }}</div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+                // 2: { name: '多选题' }
+            }
+        }
+    },
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: calc(100% - 20px);
+    position: relative;
+    margin: 0 auto;
+    padding-left: 26px;
+    box-sizing: border-box;
+}
+
+.mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+}
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.detail {
+    width: 100%;
+    word-break: break-all;
+    color: rgb(136, 139, 146);
+    margin: 10px 0 0;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 10px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 5px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 120px;
+    /* border: 1px solid #3682fc00; */
+    border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input>div {
+    border: 1.5px dashed #dfdfdf;
+    height: 120px;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: rgb(249, 250, 251);
+    color: rgb(124, 124, 124);
+    border-radius: 5px;
+}</style>

+ 224 - 0
src/components/pages/test/add/components/evaBox/index.vue

@@ -0,0 +1,224 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置附件</div> -->
+        <div class="box">
+            <div class="set_title">
+                <span>表单问题:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></textarea>
+            </div>
+            <div class="set_title">
+                <span>问题描述:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
+                    placeholder="请输入描述"></textarea>
+            </div>
+            <div class="set_title">
+                <span>分值:</span>
+                <div class="number">
+                    <input class="binfo_input" type="value" v-model="checkJson.small" @change="numberPan"/>
+                    <span>~</span>
+                    <input class="binfo_input" type="value" v-model="checkJson.big" @change="numberPan2"/>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+// import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        // EditorBar,
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            ctype: 1,
+            options: [
+                { type: 1, name: '附件' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {}
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.small) || this.checkJson.small < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.small = 0
+            }else if(this.checkJson.small === ''){
+                this.checkJson.small = 0
+            }else if(this.checkJson.big <= this.checkJson.small){
+                this.$message.error('请输入小于'+this.checkJson.big+'的数字')
+                this.checkJson.small = this.checkJson.big - 1
+            }
+        },
+        numberPan2() {
+            if (/[^\d]/.test(this.checkJson.big) || this.checkJson.big < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.big = this.checkJson.small + 1
+            }else if(this.checkJson.big === ''){
+                this.checkJson.big = this.checkJson.small + 1
+            }else if(this.checkJson.big <= this.checkJson.small){
+                this.$message.error('请输入大于'+this.checkJson.small+'的数字')
+                this.checkJson.big = this.checkJson.small + 1
+            }
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                detail: "",
+                small: 0,
+                big: 10,
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+        }
+
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+
+.set_title > .number{
+    display: flex;
+    align-items: center;
+}
+
+.set_title > .number > span{
+    margin: 0 10px;
+}
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+</style>

+ 1 - 3
src/components/pages/test/add/components/file/file.vue

@@ -15,9 +15,7 @@
                 <span style="color: #efa030;min-width:fit-content" v-if="cJson.score">({{ cJson.score ? '分值:' + cJson.score + '分' : '' }})</span>
                 <!-- </div><div v-html="cJson.title"></div> -->
             </div>
-            <div class="detail" v-if="cJson.detail">
-                {{ cJson.detail }}
-            </div>
+            <div class="detail" v-if="cJson.detail">{{ cJson.detail }}</div>
             <div class="choices">
                 <div class="binfo_input">
                     <div><span>填写者上传区</span></div>

+ 1 - 1
src/components/pages/test/add/components/file/index.vue

@@ -22,7 +22,7 @@
             <div class="set_title">
                 <span>问题描述:</span>
                 <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
-                    placeholder="请输入答案"></textarea>
+                    placeholder="请输入描述"></textarea>
             </div>
             <!-- <div class="set_options">
                 <div class="title">附件答案:</div>

+ 205 - 0
src/components/pages/test/add/edit/check/course.vue

@@ -0,0 +1,205 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box" v-loading="isloading">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices" v-if="checkJson.courses.length">
+                <div class="course" @click="openCourse()">
+                    <div class="banner">
+                        <img :src="courseDetail.cover" alt="">
+                    </div>    
+                    <div class="content">
+                        <div class="c_c">
+                            <span>课程名字:</span>
+                            <span>{{ courseDetail.title }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>课程类型:</span>
+                            <span>{{ courseDetail.name ? courseDetail.name : '暂无' }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>创建人:</span>
+                            <span>{{ courseDetail.username }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>协作者:</span>
+                            <span>{{ courseDetail.xieName ? courseDetail.xieName : '暂无' }}</span>
+                        </div>
+                    </div>    
+                </div>
+                <div class="page" v-if="checktype == '1'">
+                    <el-button type="primary" size="mini" :disabled="page == 0" @click="setPage('-1')">上一个</el-button>
+                    <div class="p_page"><span>{{ page + 1 }}</span><span>/</span><span>{{ checkJson.courses.length }}</span>
+                    </div>
+                    <el-button type="primary" size="mini" :disabled="page == (checkJson.courses.length - 1)"
+                        @click="setPage('1')">下一个</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false,
+            page: 0,
+            isloading: false,
+            courseDetail:{}
+        }
+    },
+    computed: {
+
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        setPage(index) {
+            if (index == '1') {
+                this.page++
+            } else if (index == '-1') {
+                this.page--
+            }
+            this.checkJson.answer2 = this.checkJson.courses[this.page]
+            this.getCourse(this.checkJson.answer2)
+        },
+        openCourse(){
+            top.postMessage({ cid: this.checkJson.answer2, screenType: "3" }, "*");
+        },
+        getCourse(id) {
+            this.isloading = true
+            let params = {
+                cid: id,
+            };
+            this.ajax
+                .get(this.$store.state.api + "getCourseInfoTest", params)
+                .then((res) => {
+                    this.isloading = false
+                    this.courseDetail = res.data[0][0]
+                    this.courseDetail.cover = JSON.parse(this.courseDetail.cover)[0].url
+                })
+                .catch((err) => {
+                    this.isloading = false
+                    console.error(err);
+                });
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+        if(this.checkJson.courses.length){
+            this.page = this.checkJson.courses.indexOf(this.checkJson.answer2)
+            this.getCourse(this.checkJson.answer2)
+        }
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+}
+
+.choices > .page{
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.p_page{
+    margin: 0 10px;
+}
+
+.course {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+}
+.course > .banner {
+    width: 200px;
+    height: 120px;
+    border-radius: 5px;
+    overflow: hidden;
+    border: 1px solid #3896fc;
+    box-sizing: border-box;
+    padding: 5px;
+    margin-right: 15px;
+}
+.course > .banner > img{
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+.course > .content {}
+.course > .content > .c_c {}
+.course > .content > .c_c + .c_c{
+    margin-top: 5px;
+}
+.course > .content > .c_c span:nth-child(1){}
+.course > .content > .c_c span:nth-child(2){}
+</style>

+ 132 - 0
src/components/pages/test/add/edit/check/eva.vue

@@ -0,0 +1,132 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices">
+                <div class="score" :class="{active: (checkJson.answer2 || checkJson.answer2 === 0) && (checkJson.answer2 > index || checkJson.answer2 === index)}" @click="score(index)" v-for="(item, index) in (parseInt(checkJson.big) - parseInt(checkJson.small) + 1)" :key="index">{{ parseInt(checkJson.small) + index }}</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        score(index){
+            if(this.checktype == '2'){
+                return
+            }
+            this.checkJson.answer2 = index
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+    width: 90%;
+    margin: 0 auto;
+}
+
+.choices > .score{
+    width: 40px;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 0 20px 10px 0;
+    border-radius: 5px;
+    background: #dee0e3;
+    font-size: 18px;
+    font-weight: bold;
+    color: #fff;
+    cursor: pointer;
+}
+
+.choices > .score.active{
+    background: #65b1ff;
+}
+
+</style>

+ 115 - 18
src/components/pages/test/add/edit/check/file.vue

@@ -14,13 +14,32 @@
                 <!-- + `(${option[checkJson.type].name})` -->
                 <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
                 <span>{{ checkJson.title }}</span>
-                <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' + checkJson.score +
-                    '分' }})</span>
+                <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' + checkJson.score
+            +
+            '分' }})</span>
                 <!-- </div><div v-html="checkJson.title"></div> -->
             </div>
-            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail" style="color: #00000099;margin-top: 5px;">
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
             </div>
             <div class="choices">
+                <div class="uploadBtn" v-if="checktype == 1">
+                    <div class="btn" @click.stop="addImg($event)">
+                        <span>添加本地文件</span>
+                        <input type="file" accept="*" style="display: none" multiple="multiple"
+                            @change="beforeUpload($event)" />
+                    </div>
+                    <div class="btn" @click="openFileBox()">
+                        <span>从资源库添加</span>
+                    </div>
+                    <div class="switch">
+                        <el-switch
+                            active-color="#3681fc"
+                            v-model="isTong">
+                        </el-switch>
+                        <span @click="isTong = !isTong">同步至资源库</span>
+                    </div>
+                </div>
                 <div class="binfo_input">
                     <div class="fileBox" v-if="checkJson.file && checkJson.file.length">
                         <div class="fileC">
@@ -29,7 +48,8 @@
                                 <img class="del" src="../../../../../../assets/icon/fileIcon/deleteworks.png"
                                     @click.stop="delFile(index)" />
                                 <img class="download" src="../../../../../../assets/icon/fileIcon/download.png"
-                                    @click.stop="downloadFile(item)" :style="{ right: checktype != 1 ? '10px' : '45px' }" />
+                                    @click.stop="downloadFile(item)"
+                                    :style="{ right: checktype != 1 ? '10px' : '45px' }" />
                                 <img class="img" :src="wordIcon" alt="" v-if="item.type == 1" />
                                 <img class="img" :src="videoIcon" alt="" v-if="item.type == 2" />
                                 <img class="img" :src="item.url" alt="" v-if="item.type == 3" />
@@ -43,15 +63,15 @@
                             </div>
                         </div>
                         <!-- @click.stop="addImg($event)" -->
-                        <div class="btn" @click.stop="openFileBox()">
+                        <!-- <div class="btn" @click.stop="openFileBox()">
                             <span>点击添加文件</span>
                             <input type="file" accept="*" style="display: none" multiple="multiple" @change="beforeUpload($event)" />
-                        </div>
+                        </div> -->
                     </div>
-                    <!-- @click.stop="addImg($event)" -->
-                    <div class="uploadQ" @click.stop="openFileBox()" v-else>
-                        <span>点击添加文件</span>
-                        <input type="file" accept="*" style="display: none" multiple="multiple" @change="beforeUpload($event)" />
+                    <!-- @click.stop="addImg($event)"  @click.stop="addImg($event)" -->
+                    <div class="uploadQ" v-else>
+                        <span>填写者上传区</span>
+                        <!-- <input type="file" accept="*" style="display: none" multiple="multiple" @change="beforeUpload($event)" /> -->
                     </div>
                     <div v-if="proVisible" class="mask">
                         <div class="progressBox">
@@ -124,6 +144,7 @@ export default {
             option: {
                 1: { name: '附件' },
             },
+            userid: this.$route.query.userid,
             checkJson: undefined,
             progress: 0,
             isFinishSize: 0,
@@ -137,6 +158,7 @@ export default {
             dialogVisibleOffice: false,
             dialogVisiblefile: false,
             wurl: "",
+            isTong: false
         }
     },
     watch: {
@@ -165,7 +187,7 @@ export default {
             let cfindex2 = 0;
             for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
                 file = event.target.files[cfindex];
-            
+
                 var credentials = {
                     accessKeyId: "AKIATLPEDU37QV5CHLMH",
                     secretAccessKey: "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",
@@ -180,6 +202,8 @@ export default {
                 _this.proVisible = true;
                 // _this.isFinishSize = 0;
                 // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
+                let _name = file.name
+                let size = file.size;
                 _this.$forceUpdate();
                 if (file) {
                     var params = {
@@ -219,10 +243,10 @@ export default {
                             // }, 1000);
                             setTimeout(() => {
                                 if (
-                                cfindex2 == event.target.files.length - 1 ||
-                                cfindex2 > event.target.files.length - 1
+                                    cfindex2 == event.target.files.length ||
+                                    cfindex2 > event.target.files.length
                                 ) {
-                                _this.proVisible = false;
+                                    _this.proVisible = false;
                                 }
                             }, 1000);
                             // loading.close();
@@ -328,18 +352,27 @@ export default {
                                 }
                                 if (_this.checkJson.file) {
                                     _this.checkJson.file.push({
-                                        name: file.name,
+                                        name: _name,
                                         url: data.Location,
                                         type: _type,
                                     });
                                 } else {
                                     _this.checkJson.file = []
                                     _this.checkJson.file.push({
-                                        name: file.name,
+                                        name: _name,
                                         url: data.Location,
                                         type: _type,
                                     });
                                 }
+                                if(_this.isTong){
+                                    let _file = {
+                                        name: _name,
+                                        url: data.Location,
+                                        type: _type,
+                                        size: _this.formatFileSize(size)
+                                    }
+                                    _this.addSource(_file)
+                                }
                                 _this.$forceUpdate();
 
                                 console.log(_this.checkJson);
@@ -349,6 +382,37 @@ export default {
                 }
             }
         },
+        addSource(file) {
+            let params = [{
+                n: encodeURIComponent(file.name),
+                file: encodeURIComponent(file.url),
+                type: file.type,
+                pid: '0',
+                uid: this.userid,
+                size: file.size,
+            }];
+            this.ajax
+                .post(this.$store.state.api + "addSourceFile", params)
+                .then((res) => {
+                    // if (_ctype == 2) {
+                    //     this.$message.success('上传成功');
+                    // }
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        formatFileSize(bytes) {
+            if (bytes < 1024) {
+                return bytes + "B";
+            } else if (bytes < 1048576) {
+                return (bytes / 1024).toFixed(2) + "KB";
+            } else if (bytes < 1073741824) {
+                return (bytes / 1048576).toFixed(2) + "MB";
+            } else {
+                return (bytes / 1073741824).toFixed(2) + "GB";
+            }
+        },
         setCheckJson(name, url, type) {
             if (this.checkJson.file) {
                 this.checkJson.file.push({
@@ -485,13 +549,13 @@ export default {
 }
 
 .binfo_input>.uploadQ {
-    border: 1.5px dashed #dfdfdf;
+    /* border: 1.5px dashed #dfdfdf; */
     height: 120px;
     width: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
-    background: rgb(249, 250, 251);
+    background: #f9fafb;
     color: rgb(124, 124, 124);
     border-radius: 5px;
     cursor: pointer;
@@ -632,4 +696,37 @@ export default {
     justify-content: center;
     cursor: pointer;
 }
+
+.uploadBtn {
+    display: flex;
+    margin-bottom: 10px;
+    align-items: center;
+    width: 100%;
+    justify-content: flex-end;
+}
+
+.uploadBtn .btn {
+    display: flex;
+    cursor: pointer;
+    align-items: center;
+    height: 30px;
+    padding: 0 8px;
+    background: #fff;
+    color: #3681FC;
+    border: 1px solid #3681FC;
+    box-sizing: border-box;
+    border-radius: 4px;
+    font-size: 14px;
+    align-items: center;
+    margin-right: 10px;
+}
+
+.uploadBtn .switch{
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+}
+.uploadBtn .switch > span{
+    margin-left: 5px;
+}
 </style>

+ 42 - 14
src/components/pages/test/add/edit/check/index.vue

@@ -10,6 +10,8 @@
             <choiceV :tindex="index" :cJson.sync="item.json" v-if="item.type == 1"></choiceV>
             <gapV :tindex="index" :cJson.sync="item.json" v-if="item.type == 3"></gapV>
             <fileV :tindex="index" :cJson.sync="item.json" v-if="item.type == 5"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" v-if="item.type == 6"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
             <span v-else>暂未设置题目</span>
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -18,6 +20,8 @@
               <choiceV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 1"></choiceV>
               <gapV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 3"></gapV>
               <fileV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 5"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 6"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -30,6 +34,8 @@
             <choiceV :tindex="index" :cJson.sync="item.json" v-if="item.type == 1"></choiceV>
             <gapV :tindex="index" :cJson.sync="item.json" v-if="item.type == 3"></gapV>
             <fileV :tindex="index" :cJson.sync="item.json" v-if="item.type == 5"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" v-if="item.type == 6"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
@@ -38,6 +44,8 @@
               <choiceV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 1"></choiceV>
               <gapV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 3"></gapV>
               <fileV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 5"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 6"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -58,6 +66,8 @@
 import choiceV from './choice.vue';
 import gapV from './gap.vue';
 import fileV from './file.vue';
+import courseV from './course.vue';
+import evaV from './eva.vue';
 export default {
   props: {
     cJson: {
@@ -70,7 +80,9 @@ export default {
   components: {
     choiceV,
     gapV,
-    fileV
+    fileV,
+    courseV,
+    evaV,
   },
   data() {
     return {
@@ -83,6 +95,8 @@ export default {
         3: "问答题",
         4: "添加文档",
         5: "附件",
+        6: "课程",
+        7: "评分",
       },
       isloading:true,
     }
@@ -154,26 +168,40 @@ export default {
         this.type = _json[0].ttype
         let checkArray = _json.filter(item => {
           if (item.array) {
-            item.array = item.array.filter(item2 => {
-              if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
-                item2.json.answer2 = []
+            item.array = item.array.filter((item2) => {
+              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item.type != 7) {
+                item2.json.answer2 = [];
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
+                item2.json.answer2 = item2.json.courses[0];
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 7) {
+                item2.json.answer2 = '';
               }
               if (item2.array) {
-                item2.array = item2.array.filter(item3 => {
-                  if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
-                    item3.json.answer2 = []
+                item2.array = item2.array.filter((item3) => {
+                  if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7) {
+                    item3.json.answer2 = [];
+                  } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 6) {
+                    item3.json.answer2 = item3.json.courses[0];
+                  } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 7) {
+                    item3.json.answer2 = '';
                   }
-                  return item3
-                })
+                  return item3;
+                });
               }
-              return (item2.ttype != 1 && item2.array.length > 0) || (item2.ttype == 1)
-            })
+              return (
+                (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
+              );
+            });
           }
-          if (item.ttype == 1 && item.json && !item.json.answer2) {
-            item.json.answer2 = []
+          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7) {
+            item.json.answer2 = [];
+          } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 6) {
+            item.json.answer2 = item.json.courses[0];
+          } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 7) {
+            item.json.answer2 = '';
           }
           console.log(item.array);
-          return (item.ttype != 1 && item.array.length > 0) || (item.ttype == 1)
+          return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
         })
         console.log(checkArray);
         return checkArray

+ 72 - 0
src/components/pages/test/add/edit/edit/index.vue

@@ -21,6 +21,30 @@
                   pub_test_btn_text: item.value == 3,
                   pub_test_btn_choose: item.value == 1,
                   pub_test_btn_file: item.value == 5,
+                  pub_test_btn_course: item.value == 6,
+                  pub_test_btn_eva: item.value == 7,
+                }"
+              >
+                {{ item.label }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="e_add_box">
+        <div class="title">平台组件</div>
+        <div class="e_add_ci">
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in optionsPin"
+              :key="item.label"
+              @click="addCheck(item.value)"
+            >
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_course: item.value == 6,
                 }"
               >
                 {{ item.label }}
@@ -148,6 +172,27 @@ export default {
     },
     addCheck(topicType) {
       let type = 1;
+			// if(this.manualJson.filter(i=>i.type==6).length>=1){
+			// 	return this.$message.error("一个表单只能添加一个课程组件");
+			// }
+			function checkType(obj){
+				if(obj.filter(i=>i.array).length>0){
+					let bol = false;
+					obj.forEach(i=>{
+						console.log(i.array)
+						if(bol)return;
+						bol = checkType(i.array);
+					})
+					return bol;
+				}else if(obj.filter(i=>i.type==6).length>=1){
+					return true;
+				}else{
+					return false;
+				}
+			}
+			if(topicType == 6 && checkType(this.manualJson)){
+				return this.$message.error("一个表单只能添加一个课程组件");
+			}
       if (this.manualJson.length > 0) {
         for (var i = 0; i < this.manualJson.length; i++) {
           if (this.manualJson[i].ttype == 2) {
@@ -157,6 +202,7 @@ export default {
           }
         }
       }
+
       if (this.checkC) {
         let _check = this.checkC.replace("x", "").split("-");
         let _json = this.manualJson[_check[0]];
@@ -186,6 +232,19 @@ export default {
             type: 1,
             detail: "",
           };
+        } else if (topicType == 6) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            courses:[]
+          };
+        } else if (topicType == 7) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            small: 0,
+            big: 10,
+          };
         }
         if (_json.array) {
           if (type == 3 && _check.length == 2) {
@@ -254,6 +313,19 @@ export default {
               type: 1,
               detail: "",
             };
+          } else if (topicType == 6) {
+            json1.json = {
+              title: "标题",
+              detail: "",
+              courses:[]
+            };
+          } else if (topicType == 7) {
+            json1.json = {
+              title: "标题",
+              detail: "",
+              small: 0,
+              big: 10,
+            };
           }
           this.manualJson.push(json1);
           this.$forceUpdate()

+ 17 - 1
src/components/pages/test/add/minxins/minxin.js

@@ -22,13 +22,29 @@ const minxin = {
           value: 5,
           label: "附件"
         },
+        // {
+        //   value: 6,
+        //   label: "课程"
+        // },
+        {
+          value: 7,
+          label: "评分"
+        },
+      ],
+      optionsPin:[
+       {
+          value: 6,
+          label: "课程"
+        },
       ],
       options2: {
         1: "选择题",
         // 2: "问答题",
         3: "问答题",
         4: "添加文档",
-        5: "附件"
+        5: "附件",
+        6: "课程",
+        7: "评分",
       },
       buttonOptions: [
         { name: "分组", type: 1 },

+ 50 - 0
src/components/pages/test/add/setInfo/manualCreated.vue

@@ -118,6 +118,9 @@ export default {
         this.$message.error("请填写数字");
         this.number = "";
       }
+			if(this.topicType==6){
+				this.number = 1;
+			}
     },
     changeJson(json) {
       this.checkJson = json;
@@ -133,6 +136,27 @@ export default {
         return;
       }
       let type = 1;
+			// if(this.checkJson.filter(i=>i.type==6).length>=1){
+			// 	return this.$message.error("一个表单只能添加一个课程组件");
+			// }
+			function checkType(obj){
+				if(obj.filter(i=>i.array).length>0){
+					let bol = false;
+					obj.forEach(i=>{
+						console.log(i.array)
+						if(bol)return;
+						bol = checkType(i.array);
+					})
+					return bol;
+				}else if(obj.filter(i=>i.type==6).length>=1){
+					return true;
+				}else{
+					return false;
+				}
+			}
+			if(this.topicType == 6 && checkType(this.checkJson)){
+				return this.$message.error("一个表单只能添加一个课程组件");
+			}
       if (this.checkJson.length > 0) {
         for (var i = 0; i < this.checkJson.length; i++) {
           if (this.checkJson[i].ttype == 2) {
@@ -171,6 +195,19 @@ export default {
             type: 1,
             detail: "",
           };
+        } else if (this.topicType == 6) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            courses:[]
+          };
+        } else if (this.topicType == 7) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            small: 0,
+            big: 10,
+          };
         }
         if (_json.array) {
           if (type == 3 && _check.length == 2) {
@@ -255,6 +292,19 @@ export default {
                 type: 1,
                 detail: "",
               };
+            } else if (this.topicType == 6) {
+              json1.json = {
+                title: "标题",
+                detail: "",
+                courses:[]
+              };
+            } else if (this.topicType == 7) {
+              json1.json = {
+                title: "标题",
+                detail: "",
+                small: 0,
+                big: 10,
+              };
             }
             this.checkJson.push(json1);
           }

+ 568 - 39
src/components/pages/test/check/index.vue

@@ -6,16 +6,16 @@
           <div class="stepsNav">
             <el-breadcrumb separator-class="el-icon-arrow-right">
               <el-breadcrumb-item :to="{
-                path:
-                  '/test?userid=' +
-                  userid +
-                  '&oid=' +
-                  oid +
-                  '&org=' +
-                  org +
-                  '&role=' +
-                  role,
-              }">表单管理</el-breadcrumb-item>
+    path:
+      '/test?userid=' +
+      userid +
+      '&oid=' +
+      oid +
+      '&org=' +
+      org +
+      '&role=' +
+      role,
+  }">表单管理</el-breadcrumb-item>
               <el-breadcrumb-item>
                 <span style="color: rgb(15, 126, 255)">查看表单</span>
               </el-breadcrumb-item>
@@ -65,7 +65,7 @@
             <div class="right">
               <span :class="{ active: stype == 1 }" @click="checkDataType(1)">按题目查看</span>
               <span :class="{ active: stype == 2 }" @click="checkDataType(2)">按人员查看</span>
-              <span :class="{ active: stype == 3 }" @click="checkDataType(3)">按数量查看</span>
+              <span :class="{ active: stype == 3 }" @click="checkDataType(3)" v-show="false">按数量查看</span>
             </div>
             <div class="left">
               <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
@@ -73,7 +73,13 @@
                 <span class="serach_icon" @click="searchCourse"></span>
               </div>
               <div class="btnA" v-if="stype == 1 && !pdfLoading" @click="exportPDF">导出PDF</div>
-              <div class="btnA" v-if="stype == 2" @click="exportAllWord">导出人员数据</div>
+              <div class="btnA" v-if="stype == 2" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
+                导出数据
+                <div v-show="btnDisplay" class="buttonBox">
+                  <div type="primary" @click="exportExcel">下载汇总表格</div>
+                  <div type="primary" @click="exportAllWord">导出人员数据</div>
+                </div>
+              </div>
               <div class="btnA" v-if="stype == 3" @click="exportAllWord2">导出人员数据</div>
             </div>
           </div>
@@ -86,9 +92,10 @@
               <div class="title">
                 <el-tooltip :content="selectType(item)" placement="top" effect="dark">
                   <span class="test_icon"
-                    :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5 }"></span>
+                    :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7 }"></span>
                 </el-tooltip>
                 <span>{{ item.title }}</span>
+								<el-button v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title)">批量下载附件</el-button>
               </div>
               <div class="detail" v-if="item.detail">{{ item.detail }}</div>
               <div class="content1" v-if="item.type == 1">
@@ -155,11 +162,66 @@
                   </div>
                 </div>
               </div>
+              <div class="content4" v-if="item.type == 6">
+                <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
+                  <div class="tup">
+                    <img :src="item.cover != null && item.cover != ''
+    ? JSON.parse(item.cover).length > 0
+      ? JSON.parse(item.cover)[0].url
+      : mr
+    : mr
+    " alt />
+                    <div class="bottom_box">
+                      <div>
+                        <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
+                          <span>{{ item.title }}</span>
+                        </el-tooltip>
+                      </div>
+                      <div class="kc_t">
+                        <span>{{ item.username }}</span>
+                        <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717C8D">创建日期:</span>{{ item.time }}
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
+                  {{ courses }}
+                </div> -->
+              </div>
+              <div class="content1" v-if="item.type == 7">
+                <div class="left">
+                  <div class="title">
+                    <span>评分</span>
+                    <span>小计</span>
+                    <span>比例</span>
+                  </div>
+                  <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
+                    <span>
+                      <span>{{ data.name }}</span>
+                    </span>
+                    <span>{{ data.count }}</span>
+                    <span>
+                      <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
+                        :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress>
+                    </span>
+                  </div>
+                </div>
+                <div class="right">
+                  <checkPie :dataJ="item.array"></checkPie>
+                </div>
+              </div>
             </div>
           </div>
           <div class="table_content" v-if="stype == 2">
-            <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2"
-              v-loading="isLoading" style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }">
+            <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
+              style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+              @filter-change="handleFilterChange">
               <el-table-column fixed label="序号" width="80px" align="left">
                 <template slot-scope="scope">
                   {{ scope.$index + 1 }}
@@ -173,6 +235,7 @@
                 :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : null"
                 :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : null"
                 :filter-placement="item.type == 1 ? filterPlacement : null">
+
                 <template slot-scope="scope">
                   <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
                     <span class="answer_type" v-for="(answer2, index2) in scope.row.array[index].json.answer2"
@@ -181,7 +244,8 @@
                   <div v-if="scope.row.array[index].type == 3" style="display: flex; flex-wrap: wrap;">
                     {{ scope.row.array[index].json.answer2 }}
                   </div>
-                  <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;" class="table_file">
+                  <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;"
+                    class="table_file">
                     <div class="file" v-for="(file, index2) in scope.row.array[index].json.file"
                       :key="index + '-' + index2" @click.stop="checkFile(file)">
                       <img class="download" src="../../../../assets/icon/fileIcon/download.png"
@@ -198,9 +262,16 @@
                       </div>
                     </div>
                   </div>
+                  <div v-if="scope.row.array[index].type == 6" style="display: flex; flex-wrap: wrap;">
+                    {{ scope.row.array[index].json.answer2 }}
+                  </div>
+                  <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
+                    {{ getScore(scope.row.array[index].json) }}
+                  </div>
                 </template>
               </el-table-column>
               <el-table-column label="操作" width="300px" fixed="right">
+
                 <template slot-scope="scope">
                   <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
                   <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
@@ -211,19 +282,20 @@
           </div>
           <div class="table_content" v-if="stype == 3">
             <div class="student_table">
-              <el-table ref="table" :data="tableData" border :fit="true" v-loading="isLoading"
-                style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
-                :row-class-name="tableRowClassName">
+              <el-table ref="table" :data="tableData" border :fit="true" v-loading="isLoading" style="width: 100%"
+                :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
                 <el-table-column prop="username" label="提交人" min-width="15" align="center">
                 </el-table-column>
                 <el-table-column prop="time" label="提交时间" min-width="15" align="center">
                 </el-table-column>
                 <el-table-column label="是否批改" min-width="15" align="center">
+
                   <template slot-scope="scope">
                     <div>{{ scope.row.type == 3 ? '是' : '否' }}</div>
                   </template>
                 </el-table-column>
                 <el-table-column label="操作" width="300px">
+
                   <template slot-scope="scope">
                     <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
                     <el-button @click="setWordHtml2(scope.row)" type="primary" size="small">导出答题信息</el-button>
@@ -265,6 +337,47 @@ import { downloadPDF } from '../../../tools/pdf'
 import JSZip from "jszip";
 import FileSaver from "file-saver";
 
+import XLSX from "xlsx-js-style";
+
+const getFile = (url) => {
+    return new Promise((resolve, reject) => {
+        var credentials = {
+            accessKeyId: "AKIATLPEDU37QV5CHLMH",
+            secretAccessKey: "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",
+        }; //秘钥形式的登录上传
+        window.AWS.config.update(credentials);
+        window.AWS.config.region = "cn-northwest-1"; //设置区域
+        let url2 = url;
+        let _url2 = "";
+        if (
+            url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+        ) {
+            _url2 = url2.split(
+                "https://view.officeapps.live.com/op/view.aspx?src="
+            )[1];
+        } else {
+            _url2 = url2;
+        }
+        var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+        let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
+        var params = {
+            Bucket: "ccrb",
+            Key: name
+        };
+        s3.getObject(params, function (err, data) {
+            if (err) {
+                console.log(err, err.stack)
+                resolve({ data: 1 });
+            } else {
+                resolve({ data: data.Body });
+                console.log(data);
+            }          // sxuccessful response
+
+        });
+        // axios({
+    });
+};
+
 export default {
   components: {
     shareBox,
@@ -318,7 +431,8 @@ export default {
       wurl: "",
       chapters: [],
       filterPlacement: 'bottom-end',
-      pdfLoading: false
+      pdfLoading: false,
+      btnDisplay: false
     };
   },
   watch: {},
@@ -340,6 +454,15 @@ export default {
     //     return array.length ? _array : [];
     //   };
     // },
+    getScore() {
+      return function (item) {
+        let array = []
+        for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
+          array.push(i)
+        }
+        return item.answer2 ? array[item.answer2] : ''
+      };
+    },
     selectType() {
       return function (item) {
         if (item.type == 1 && item.atype == 2) {
@@ -350,6 +473,10 @@ export default {
           return '问答题'
         } else if (item.type == 5) {
           return '附件'
+        } else if (item.type == 6) {
+          return '课程'
+        } else if (item.type == 7) {
+          return '评分'
         }
       };
     }
@@ -454,6 +581,7 @@ export default {
         this.getData()
       }
     },
+
     getData() {
       this.isLoading = true;
       let params = {
@@ -462,7 +590,7 @@ export default {
       };
       this.ajax
         .get(this.$store.state.api + "getTestWorksNoPage", params)
-        .then((res) => {
+        .then(async (res) => {
           this.isLoading = false;
           this.testJson = res.data[0][0]
           this.works = res.data[1]
@@ -477,6 +605,14 @@ export default {
             let cJson = this.setJSON(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
             if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
               let _json = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
+
+              for (var ja = 0; ja < _json.length; ja++) {
+                let _json2 = _json[ja].json
+                if (_json[ja].type == 6) {
+                  let _cjson = await this.getCourse(_json2.answer2)
+                  _json2.answer2 =  _cjson.title
+                }
+              }
               array.push({
                 courseid: this.works[i].courseid,
                 id: this.works[i].id,
@@ -488,6 +624,7 @@ export default {
               })
             }
           }
+
           for (var i = 0; i < this.chapters.length; i++) {
             let el = this.chapters[i]
             let topic = {
@@ -498,7 +635,10 @@ export default {
               choice: el.json ? el.json.array : '',
               array: [],
               answer: el.json ? el.json.answer : '',
-              count: 0
+              count: 0,
+              courses: el.json ? el.json.courses : [],
+              small: el.json ? el.json.small : '',
+              big: el.json ? el.json.big : '',
             }
             if (topic.type == 1) {
               for (var t = 0; t < topic.choice.length; t++) {
@@ -511,6 +651,31 @@ export default {
 
             } else if (topic.type == 5) {
 
+            } else if (topic.type == 6) {
+              let _answer = topic.courses
+              topic.array = _answer
+              topic.courseArray = [];
+							let params = {
+								cid:topic.array.join(",")
+							}
+
+							let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
+							let result = data.data[0]
+							result.forEach(i=>i.update_at=new Date(i.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-'))
+							topic.courseArray = result;
+              // topic.array.forEach(async i => {
+              //   let data = await this.getCourse(i)
+							// 	console.log(data.update_at)
+              //   data.update_at = new Date(data.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-')
+              //   topic.courseArray.push(data)
+              // })
+            } else if (topic.type == 7) {
+              for (var t = parseInt(topic.small); t <= parseInt(topic.big); t++) {
+                topic.array.push({
+                  name: t,
+                  count: 0
+                })
+              }
             }
             for (var j = 0; j < array.length; j++) {
               let el2 = array[j]
@@ -541,11 +706,20 @@ export default {
                 }
               } else if (topic.type == 5) {
                 let _answer = el2.array[i].json.file ? el2.array[i].json.file : []
+								console.log(el2)
+								let _user = {userid:el2.userid,username:el2.name}
                 for (var k = 0; k < _answer.length; k++) {
-                  topic.array.push(_answer[k])
+                  topic.array.push({..._answer[k],..._user})
+                }
+              } else if (topic.type == 7) {
+                if(el2.array[i].json.answer2){
+                  let _answer = el2.array[i].json.answer2
+                  topic.array[_answer].count++
+                  topic.count++
                 }
               }
             }
+            console.log(topic)
             testArray.push(topic)
           }
           this.testArray = testArray
@@ -833,12 +1007,12 @@ export default {
     setWordHtml(data) {
       let _data = data
 
-      let _title = `<div style="font-size:40px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
       let score = this.score(data.courseJson)
       let isScore = this.score2(data.courseJson)
       let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
-      let _content = `<div style="font-size:25px;text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.name}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
-      let _detail = this.testJson.brief ? `<div style="font-size:25px;text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.name}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
+      let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
 
       let _test = `<div style='margin-top:40px;'>`
       for (let i = 0; i < _data.array.length; i++) {
@@ -860,6 +1034,13 @@ export default {
             let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
             _test += _option
           }
+        } else if (item.type == 6 && item.json.answer2) {
+            let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
+            _test += _option
+        } else if (item.type == 7 && item.json.answer2 ) {
+            let _score = this.getScore2(item.json)
+            let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
+            _test += _option
         }
       }
       _test += `</div>`
@@ -869,12 +1050,12 @@ export default {
     setWordHtml2(data) {
       let _data = data
       _data.array = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(data.courseJson))))
-      let _title = `<div style="font-size:40px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
       let score = this.score(JSON.parse(data.courseJson))
       let isScore = this.score2(JSON.parse(data.courseJson))
       let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
-      let _content = `<div style="font-size:25px;text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.username}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
-      let _detail = this.testJson.brief ? `<div style="font-size:25px;text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.username}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
+      let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
 
       let _test = `<div style='margin-top:40px;'>`
       for (let i = 0; i < _data.array.length; i++) {
@@ -896,6 +1077,13 @@ export default {
             let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
             _test += _option
           }
+        } else if (item.type == 6 && item.json.answer2) {
+            let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
+            _test += _option
+        } else if (item.type == 7 && item.json.answer2 ) {
+            let _score = this.getScore2(item.json)
+            let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
+            _test += _option
         }
       }
       _test += `</div>`
@@ -938,12 +1126,12 @@ export default {
     setWordHtmlAll(data) {
       let _data = data
 
-      let _title = `<div style="font-size:40px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
       let score = this.score(data.courseJson)
       let isScore = this.score2(data.courseJson)
       let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
-      let _content = `<div style="font-size:25px;text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.name}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
-      let _detail = this.testJson.brief ? `<div style="font-size:25px;text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.name}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
+      let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
 
       let _test = `<div style='margin-top:40px;'>`
       for (let i = 0; i < _data.array.length; i++) {
@@ -965,21 +1153,28 @@ export default {
             let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
             _test += _option
           }
+        } else if (item.type == 6 && item.json.answer2) {
+            let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
+            _test += _option
+        } else if (item.type == 7 && item.json.answer2 ) {
+            let _score = this.getScore2(item.json)
+            let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
+            _test += _option
         }
       }
       _test += `</div>`
       let _html = _title + _content + _detail + _test;
       return this.exportToWordAll(_data.name + '-' + _data.time, _html);
     },
-    setWordHtmlAll2(data) {
+    async setWordHtmlAll2(data) {
       let _data = data
       _data.array = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(data.courseJson))))
-      let _title = `<div style="font-size:40px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
       let score = this.score(JSON.parse(data.courseJson))
       let isScore = this.score2(JSON.parse(data.courseJson))
       let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
-      let _content = `<div style="font-size:25px;text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.username}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
-      let _detail = this.testJson.brief ? `<div style="font-size:25px;text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.username}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
+      let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
 
       let _test = `<div style='margin-top:40px;'>`
       for (let i = 0; i < _data.array.length; i++) {
@@ -1001,6 +1196,14 @@ export default {
             let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
             _test += _option
           }
+        } else if (item.type == 6 && item.json.answer2) {
+            let _cjson = await this.getCourse(item.json.answer2)
+            let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${_cjson.title}</div>`
+            _test += _option
+        } else if (item.type == 7 && item.json.answer2 ) {
+            let _score = this.getScore2(item.json)
+            let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
+            _test += _option
         }
       }
       _test += `</div>`
@@ -1076,7 +1279,7 @@ export default {
         .catch((err) => {
           console.error(err);
         });
-      
+
     },
     downLoadAll(url) {
       const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
@@ -1085,17 +1288,174 @@ export default {
       data.forEach((item) => {
         // 下载文件, 并存成ArrayBuffer对象
         const file_name = item.name; // 获取文件名
-        zip.file(file_name+'.doc', item.blob, { binary: true }); // 逐个添加文件
+        zip.file(file_name + '.doc', item.blob, { binary: true }); // 逐个添加文件
         cache[file_name] = item.blob;
       });
       zip.generateAsync({ type: "blob" }).then((content) => {
         // 生成二进制流
-        FileSaver.saveAs(content, this.testJson.title+".zip"); // 利用file-saver保存文件  自定义文件名
+        FileSaver.saveAs(content, this.testJson.title + ".zip"); // 利用file-saver保存文件  自定义文件名
         setTimeout(() => {
           this.pdfLoading = false;
         }, 2000);
       });
     },
+    handleFilterChange() {
+      console.log(this.$refs.table.store.states.data);
+    },
+    exportExcel() {
+      let res = this.$refs.table.store.states.data
+      if (!res.length) {
+        this.$message.error('无导出数据')
+        return
+      }
+      this.isLoading = true;
+      let chapters = this.chapters
+
+      var array = [];
+      for (var i = 0; i < res.length; i++) {
+        var _json = {};
+        _json["序号"] = i + 1;
+        _json["提交人"] = res[i].name;
+        _json["提交时间"] = res[i].time;
+        for (var j = 0; j < chapters.length; j++) {
+          _json[j + 1 + "." + chapters[j].json.title] = '';
+          if (res[i].array[j].type == 1 && res[i].array[j].json.answer2) {
+            let a = []
+            for (var answer2 = 0; answer2 < res[i].array[j].json.answer2.length; answer2++) {
+              a.push(res[i].array[j].json.array[res[i].array[j].json.answer2[answer2]].option)
+            }
+            _json[j + 1 + "." + chapters[j].json.title] = a.join('、')
+          } else if (res[i].array[j].type == 3 && res[i].array[j].json.answer2) {
+            _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
+          } else if (res[i].array[j].type == 5 && res[i].array[j].json.file) {
+            let files = []
+            for (let file = 0; file < res[i].array[j].json.file.length; file++) {
+              let check = res[i].array[j].json.file[file]
+              files.push(file + 1 + '.' + check.name + '----' + check.url)
+            }
+            _json[j + 1 + "." + chapters[j].json.title] = files.join('\n')
+          } else if (res[i].array[j].type == 6 && res[i].array[j].json.answer2) {
+            _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
+          } else if (res[i].array[j].type == 7 && res[i].array[j].json.answer2) {
+            let _score = this.getScore2(res[i].array[j].json)
+            _json[j + 1 + "." + chapters[j].json.title] = _score
+          }
+        }
+        array.push(_json);
+      }
+      let widthJson = []
+      let widthArray = Object.keys(array[0])
+      for (let i = 0; i < widthArray.length; i++) {
+        if (i == 0) {
+          widthJson.push({ wch: 5 })
+        } else {
+          widthJson.push({ wch: 30 })
+        }
+      }
+
+      const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
+      let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
+      ws["!cols"] = widthJson;
+      const styleObj = {
+        alignment: {
+          horizontal: "center",
+          vertical: "center" // 设置垂直居中
+        }
+      }; // 设置居中对齐和加粗样式
+
+      for (let cell in ws) {
+        if (!cell[0].startsWith("!")) {
+          ws[cell]["s"] = styleObj;
+        }
+      }
+
+      XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
+
+      XLSX.writeFile(workbook, this.testJson.title + ".xlsx");
+      this.isLoading = false;
+      this.$message({
+        message: "导出成功",
+        type: "success"
+      });
+    },
+    async getCourse(id) {
+      let params = {
+        cid: id,
+      };
+      let res = await this.ajax.get(this.$store.state.api + "getCourseInfoTest", params)
+      return res.data[0][0]
+    },
+    getScore2(item) {
+        let array = []
+        for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
+          array.push(i)
+        }
+        return item.answer2 ? array[item.answer2] : ''
+    },
+		downloadFileType5(fileData,title="附件"){
+			let data = fileData;
+			const zip = new JSZip();
+			let downFileArray = [];
+			let uniqueArr = data.filter((v,i,a)=>a.map(mb=>mb.userid).indexOf(v.userid)==i);
+			uniqueArr.forEach(i=>{
+				downFileArray.push({userid:i.userid,username:i.username,urlList:data.filter(d=>d.userid==i.userid).map(m=>m)});
+			})
+			let promises = [];
+			if(downFileArray.length==1){//只有一位老师的情况
+				if(downFileArray[0].urlList.length>1){//多个文件的情况
+					const folder = zip.folder(`${downFileArray[0].username}`);
+					downFileArray[0].urlList.forEach(i=>{
+						const promise = getFile(i.url).then((data) => {
+        	      if (data.data != 1) {
+        	          // 下载文件, 并存成ArrayBuffer对象
+        	          const file_name = i.name; // 获取文件名
+									  folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
+        	      }
+        	  });
+						promises.push(promise)
+					})
+					
+				}else{//只有一个文件的情况
+					promises.push(getFile(downFileArray[0].urlList[0].url).then((data) => {
+						if (data.data != 1) {
+        	      // 下载文件, 并存成ArrayBuffer对象
+        	      const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
+								zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
+        	    }
+					}))
+				}
+			}else if(downFileArray.length>1){//有多位老师的情况
+				downFileArray.forEach(i=>{
+					if(i.urlList.length==1){//只有一个文件的情况
+						promises.push(getFile(i.urlList[0].url).then((data) => {
+						  if (data.data != 1) {
+        	      // 下载文件, 并存成ArrayBuffer对象
+        	      const file_name = `${i.username}-${i.urlList[0].name}`; // 获取文件名
+								zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
+        	    }
+						}))
+					}else if(i.urlList.length>1){//有多个文件的
+						const folder = zip.folder(`${i.username}`);
+						i.urlList.forEach(ui=>{
+						  const promise = getFile(ui.url).then((data) => {
+								if (data.data != 1) {
+        	          // 下载文件, 并存成ArrayBuffer对象
+        	          const file_name = ui.name; // 获取文件名
+									  folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
+        	      }
+						  })
+							promises.push(promise)
+						})
+					}
+				})
+			}
+			Promise.all(promises).then(() => {
+          zip.generateAsync({ type: "blob" }).then((content) => {
+              // 生成二进制流
+              FileSaver.saveAs(content, `${this.testJson.title}-${title}.zip`); // 利用file-saver保存文件  自定义文件名
+          });
+      });
+		},
   },
   beforeDestroy() {
     document.getElementsByTagName('html')[0].style.overflow = ''
@@ -1353,6 +1713,7 @@ export default {
   font-size: 18px;
   display: flex;
   white-space: pre-line;
+	position: relative;
 }
 
 .title_content>.title_box>.title>.test_icon {
@@ -1659,5 +2020,173 @@ export default {
   justify-content: center;
   line-height: 1;
   margin-right: 10px;
+  position: relative;
+}
+
+.buttonBox {
+  position: absolute;
+  bottom: -0;
+  transform: translateY(100%);
+  background: #fff;
+  border-radius: 5px;
+  box-shadow: 0 0 3px 1px #e3e3e3;
+  width: 100%;
+  z-index: 999;
+}
+
+.buttonBox>div {
+  height: 40px;
+  line-height: 40px;
+  width: 100%;
+  text-align: center;
+  color: #000;
+  box-sizing: border-box;
+}
+
+.buttonBox>div+div {
+  border-top: 1px solid #e0e0e0;
+}
+
+.buttonBox>div:hover {
+  background: #f6f8ff;
+}
+
+.content4 {
+  width: 100%;
+  height: auto;
+  display: flex;
+  flex-wrap: nowrap;
+  overflow: auto;
+}
+
+.out_box {
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  /* width: 200px; */
+  min-width: 280px;
+  width: 280px;
+  background: #fff;
+  /* background-color: white; */
+  margin-right: 15px;
+  /* border: 1px solid #ccc; */
+  height: fit-content;
+  box-sizing: border-box;
+  border-radius: 0px 0px 5px 5px;
+  /* overflow: hidden; */
+  margin-bottom: 15px;
+  position: relative;
+  border-radius: 8px;
+  box-sizing: border-box;
+  overflow: hidden;
+  border: 1px solid #3682fc00;
+  cursor: pointer;
+  border: 1px solid #6a9ff5;
+  height: auto;
+}
+
+.out_boxActive {
+  box-sizing: border-box;
+  border: 3px solid #3681FC !important;
+
+}
+
+.out_box:hover {
+  border: 1px solid #3681FC;
+}
+
+
+.bottom_box {
+  width: 100%;
+  display: flex;
+  padding: 10px;
+  flex-direction: column;
+  box-sizing: border-box;
+  height: 121px;
+  flex-wrap: nowrap;
+  justify-content: space-evenly;
+}
+
+.bottom_box>div:nth-child(1) {
+  width: 100%;
+  /* overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold; */
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.bottom_box>div:nth-child(1)>span:nth-child(1) {
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-weight: bold;
+}
+
+.bottom_box>div:nth-child(1)>span:nth-child(2) {
+  min-width: fit-content;
+  font-size: 14px;
+  color: #8c8c8c;
+}
+
+.tup {
+  width: 100%;
+  height: auto;
+  margin: 0 auto;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 10px;
+  box-sizing: border-box;
+}
+
+.tup>img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+.kc_time {
+  margin-top: 8px;
+  font-size: 14px;
+  color: #717C8D;
+}
+
+.kc_time+.kc_time {
+  margin-top: 0;
+}
+
+.kc_t {
+  margin-top: 5px;
+  width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.kc_t>span:nth-child(1) {
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.kc_t>span:nth-child(2) {
+  min-width: fit-content;
+  font-size: 14px;
+  color: #8c8c8c;
+}
+
+.title_box>.title>.title_downBtn{
+	position: absolute;
+	right: 10px;
+	top: 0;
 }
 </style>

+ 18 - 679
src/components/pages/test/file/checkfile.vue

@@ -1,133 +1,18 @@
 <template>
-    <el-dialog title="上传文件" :visible.sync="dialogVisiblefile" :append-to-body="true" width="600px"
+    <el-dialog title="素材库" :visible.sync="dialogVisiblefile" :append-to-body="true" width="100%"
         :before-close="handleClose" class="dialog_diy">
-        <div class="fileCss">
-            <div>
-                <button class="info_btn" @click="addImg($event)">
-                    选择本地文件
-                    <input type="file" accept="*" style="display: none" multiple="multiple" @change="beforeUpload" />
-                </button>
-                <div class="spanName">选择本地文件</div>
-            </div>
-            <!-- <div>
-                <el-button @click="openFile">选择素材库文件</el-button>
-                <div class="spanName">选择素材库文件</div>
-            </div> -->
+        <div style="width: 100%;height: 100%;">
+            <fileBox type="2" @addFile="addFile"></fileBox>
         </div>
-        <div v-if="proVisible" class="mask">
-            <div class="progressBox">
-                <div class="lbox">
-                    <img src="../../../../assets/loading.gif" />上传中,请稍后
-                </div>
-                <!-- <div style="margin-bottom: 10px">
-                    <span>{{
-                        isFinishSize
-                    }}M</span>
-                    /
-                    <span>{{
-                        isAllSize
-                    }}M</span>
-                </div>
-                <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
-                    ? progress
-                    : 0
-                    " style="width: 80%"></el-progress> -->
-            </div>
-        </div>
-        <el-dialog title="选择素材库文件" :visible.sync="dialogVisiblefile2" :append-to-body="true" width="710px"
-            :before-close="handleClose2" class="dialog_diy">
-            <div class="file_box">
-                <div class="student_head">
-                    <div class="three">
-                        <div :class="choose == 0 ? 'choose' : ''" @click="sMtl(0)">图片</div>
-                        <div :class="choose == 1 ? 'choose' : ''" @click="sMtl(1)">视频</div>
-                        <div :class="choose == 2 ? 'choose' : ''" @click="sMtl(2)">附件</div>
-                    </div>
-                </div>
-                <div class="student_table" v-loading="isLoading">
-                    <div v-if="this.choose == 0" class="boxCss">
-                        <div class="out_box" v-for="(item, index) in chapInfo" :key="index">
-                            <div class="tup">
-                                <img :src="item.chapdataInfo ? JSON.parse(item.chapdataInfo).url : mtp
-                                    " alt="" @click="checkJson(JSON.parse(item.chapdataInfo))" />
-                                <div class="deleteWord">
-                                    <img src="../../../../assets/icon/delete.png" alt="" />
-                                </div>
-                            </div>
-                            <div class="bottom_box">
-                                <el-tooltip :content="item.chapdataInfo
-                                    ? JSON.parse(item.chapdataInfo).name
-                                    : '暂无名称'" placement="top" effect="dark">
-                                    <div>
-                                        {{
-                                            item.chapdataInfo
-                                            ? JSON.parse(item.chapdataInfo).name
-                                            : "暂无名称"
-                                        }}
-                                    </div>
-                                </el-tooltip>
-                            </div>
-                        </div>
-                    </div>
-                    <div v-if="this.choose == 1" class="boxCss">
-                        <div class="out_box" v-for="(item, index) in chapInfo" :key="index">
-                            <div class="tup">
-                                <img :src="msp" alt="" @click="checkJson(JSON.parse(item.chapdataInfo))" />
-                                <div class="deleteWord">
-                                    <img src="../../../../assets/icon/delete.png" alt="" />
-                                </div>
-                            </div>
-                            <div class="bottom_box">
-                                <el-tooltip :content="item.chapdataInfo
-                                    ? JSON.parse(item.chapdataInfo).name
-                                    : '暂无名称'" placement="top" effect="dark">
-                                    <div>
-                                        {{
-                                            item.chapdataInfo
-                                            ? JSON.parse(item.chapdataInfo).name
-                                            : "暂无名称"
-                                        }}
-                                    </div>
-                                </el-tooltip>
-                            </div>
-                        </div>
-                    </div>
-                    <div v-if="this.choose == 2" class="boxCss">
-                        <div class="out_box" v-for="(item, index) in chapInfo" :key="index">
-                            <div class="tup">
-                                <img :src="mfj" alt="" @click="checkJson(JSON.parse(item.chapdataInfo))" />
-                                <div class="deleteWord">
-                                    <img src="../../../../assets/icon/delete.png" alt="" />
-                                </div>
-                            </div>
-                            <div class="bottom_box">
-                                <el-tooltip :content="item.chapdataInfo
-                                    ? JSON.parse(item.chapdataInfo).name
-                                    : '暂无名称'" placement="top" effect="dark">
-                                    <div>
-                                        {{
-                                            item.chapdataInfo
-                                            ? JSON.parse(item.chapdataInfo).name
-                                            : "暂无名称"
-                                        }}
-                                    </div>
-                                </el-tooltip>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="student_page">
-                    <el-pagination background layout="prev, pager, next" :page-size="10" :total="total"
-                        v-if="page && chapInfo.length" @current-change="handleCurrentChange">
-                    </el-pagination>
-                </div>
-            </div>
-        </el-dialog>
-    </el-dialog>
+    </el-dialog>    
 </template>
   
 <script>
+import fileBox from '../../library.vue';
 export default {
+    components: {
+        fileBox,
+    },
     props: {
         dialogVisiblefile: {
             type: Boolean,
@@ -163,347 +48,23 @@ export default {
         close() {
             this.$emit("update:dialogVisiblefile", false);
         },
-        openFile() {
-            this.dialogVisiblefile2 = true
-            this.selectMtl();
-        },
-        sMtl(choose) {
-            this.choose = choose
-            this.page = 1
-            this.selectMtl()
-        },
-        handleCurrentChange(val) {
-            this.page = val
-            this.selectMtl()
-        },
-        selectMtl() {
-            this.isLoading = true;
-            let params = {
-                t: this.choose,
-                uid: this.userid,
-                page: this.page,
-            };
-            this.ajax
-                .get(this.$store.state.api + "selectMtl2", params)
-                .then((res) => {
-                    this.isLoading = false;
-                    this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
-                    this.chapInfo = res.data[0];
-                })
-                .catch((err) => {
-                    this.isLoading = false;
-                    console.error(err);
-                });
-        },
-        addImg(e) {
-            var el = e.currentTarget;
-            el.getElementsByTagName("input")[0].click();
-            e.target.value = "";
-        },
-        beforeUpload(event, type) {
-            // const loading = this.openLoading();
-            let cfindex2 = 0;
-            for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
-                let file = event.target.files[cfindex];
-                var credentials = {
-                    accessKeyId: "AKIATLPEDU37QV5CHLMH",
-                    secretAccessKey: "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",
-                }; //秘钥形式的登录上传
-                window.AWS.config.update(credentials);
-                window.AWS.config.region = "cn-northwest-1"; //设置区域
-
-                var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
-                var _this = this;
-
-                // _this.progress = 0;
-                _this.proVisible = true;
-                // _this.isFinishSize = 0;
-                // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
-                _this.$forceUpdate();
-                if (file) {
-                    var params = {
-                        Key:
-                            file.name.split(".")[0] +
-                            new Date().getTime() +
-                            "." +
-                            file.name.split(".")[file.name.split(".").length - 1],
-                        ContentType: file.type,
-                        Body: file,
-                        "Access-Control-Allow-Credentials": "*",
-                        ACL: "public-read",
-                    }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
-                    var options = {
-                        partSize: 2048 * 1024 * 1024,
-                        queueSize: 2,
-                        leavePartsOnError: true,
-                    };
-                    bucket
-                        .upload(params, options)
-                        .on("httpUploadProgress", function (evt) {
-                            //这里可以写进度条
-                            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
-                            // _this.progress = parseInt((evt.loaded / evt.total) * 100);
-                            // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
-                            // _this.$forceUpdate();
-                        })
-                        .send(function (err, data) {
-                            cfindex2++;
-
-                            // _this.progress = 100;
-                            // _this.isFinishSize = _this.isAllSize;
-                            // _this.$forceUpdate();
-                            // setTimeout(() => {
-                            //     _this.proVisible = false;
-                            //     _this.$forceUpdate();
-                            // }, 1000);
-                            setTimeout(() => {
-                                if (
-                                cfindex2 == event.target.files.length - 1 ||
-                                cfindex2 > event.target.files.length - 1
-                                ) {
-                                _this.proVisible = false;
-                                _this.close();
-                                }
-                            }, 1000);
-                            // loading.close();
-                            if (err) {
-                                _this.$message.error("上传失败");
-                            } else {
-                                let _type = 2;
-                                var imgA = [
-                                    "png",
-                                    "jpg",
-                                    "jpeg",
-                                    "bmp",
-                                    "gif",
-                                    "webp",
-                                    "psd",
-                                    "svg",
-                                    "tiff",
-                                ];
-                                var fileA = [
-                                    "DOC",
-                                    "DOCX",
-                                    "DOCM",
-                                    "DOTM",
-                                    "DOTX",
-                                    "PPTX",
-                                    "PPSX",
-                                    "PPT",
-                                    "PPS",
-                                    "PPTM",
-                                    "POTM",
-                                    "PPAM",
-                                    "POTX",
-                                    "PPSM",
-                                    "XLSX",
-                                    "XLS",
-                                ];
-                                var videoA = [
-                                    "AVI",
-                                    "NAVI",
-                                    "MPEG",
-                                    "ASF",
-                                    "MOV",
-                                    "WMV",
-                                    "3GP",
-                                    "RM",
-                                    "RMVB",
-                                    "FLV",
-                                    "F4V",
-                                    "H.264",
-                                    "H.265",
-                                    "REAL VIDEO",
-                                    "MKV",
-                                    "WebM",
-                                    "HDDVD",
-                                    "MP4",
-                                    "MPG",
-                                    "M4V",
-                                    "MGV",
-                                    "OGV",
-                                    "QTM",
-                                    "STR",
-                                    "AMC",
-                                    "DVX",
-                                    "EVO",
-                                    "DAT",
-                                    "OGG",
-                                    "OGM",
-                                ];
-                                if (
-                                    fileA.indexOf(
-                                        data.Location.split(".")[
-                                            data.Location.split(".").length - 1
-                                        ].toLocaleUpperCase()
-                                    ) != -1
-                                ) {
-                                    _type = 1; //word 文件
-                                } else if (
-                                    videoA.indexOf(
-                                        data.Location.split(".")[
-                                            data.Location.split(".").length - 1
-                                        ].toLocaleUpperCase()
-                                    ) != -1
-                                ) {
-                                    _type = 2; //视频
-                                } else if (
-                                    imgA.indexOf(
-                                        data.Location.split(".")[
-                                            data.Location.split(".").length - 1
-                                        ].toLocaleLowerCase()
-                                    ) != -1
-                                ) {
-                                    _type = 3; //图片
-                                } else if (
-                                    'pdf'.indexOf(
-                                        data.Location.split(".")[
-                                            data.Location.split(".").length - 1
-                                        ].toLocaleLowerCase()
-                                    ) != -1
-                                ) {
-                                    _type = 4; //pdf
-                                } else {
-                                    _type = 5; //文件
-                                }
-                                // if (_this.checkJson.file) {
-                                // _this.checkJson.file.push({
-                                //     name: file.name,
-                                //     url: data.Location,
-                                //     type: _type,
-                                // });
-                                // } else {
-                                //     _this.checkJson.file = []
-                                //     _this.checkJson.file.push({
-                                //         name: file.name,
-                                //         url: data.Location,
-                                //         type: _type,
-                                //     });
-                                // }
-                                _this.$emit("setCheckJson", file.name, data.Location, _type);
-                                _this.$forceUpdate();
-
-                                console.log(_this.checkJson);
-                                console.log(data.Location);
-                            }
-                        });
-                }
+        addFile(file){
+            for(var i = 0; i < file.length; i++){
+                this.$emit("setCheckJson", file[i].name, file[i].file, file[i].type);
             }
-        },
-        checkJson(json) {
-            let _type = 2;
-            let url = "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/"+encodeURIComponent(json.url.split(
-          "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/"
-        )[1]);
-            let name = json.name
-            var imgA = [
-                "png",
-                "jpg",
-                "jpeg",
-                "bmp",
-                "gif",
-                "webp",
-                "psd",
-                "svg",
-                "tiff",
-            ];
-            var fileA = [
-                "DOC",
-                "DOCX",
-                "DOCM",
-                "DOTM",
-                "DOTX",
-                "PPTX",
-                "PPSX",
-                "PPT",
-                "PPS",
-                "PPTM",
-                "POTM",
-                "PPAM",
-                "POTX",
-                "PPSM",
-                "XLSX",
-                "XLS",
-            ];
-            var videoA = [
-                "AVI",
-                "NAVI",
-                "MPEG",
-                "ASF",
-                "MOV",
-                "WMV",
-                "3GP",
-                "RM",
-                "RMVB",
-                "FLV",
-                "F4V",
-                "H.264",
-                "H.265",
-                "REAL VIDEO",
-                "MKV",
-                "WebM",
-                "HDDVD",
-                "MP4",
-                "MPG",
-                "M4V",
-                "MGV",
-                "OGV",
-                "QTM",
-                "STR",
-                "AMC",
-                "DVX",
-                "EVO",
-                "DAT",
-                "OGG",
-                "OGM",
-            ];
-            if (
-                fileA.indexOf(
-                    url.split(".")[
-                    url.split(".").length - 1
-                    ].toLocaleUpperCase()
-                ) != -1
-            ) {
-                _type = 1; //word 文件
-            } else if (
-                videoA.indexOf(
-                    url.split(".")[
-                    url.split(".").length - 1
-                    ].toLocaleUpperCase()
-                ) != -1
-            ) {
-                _type = 2; //视频
-            } else if (
-                imgA.indexOf(
-                    url.split(".")[
-                    url.split(".").length - 1
-                    ].toLocaleLowerCase()
-                ) != -1
-            ) {
-                _type = 3; //图片
-            } else if (
-                'pdf'.indexOf(
-                    url.split(".")[
-                    url.split(".").length - 1
-                    ].toLocaleLowerCase()
-                ) != -1
-            ) {
-                _type = 4; //pdf
-            } else {
-                _type = 5; //文件
-            }
-            this.$emit("setCheckJson", name, url, _type);
-            this.dialogVisiblefile2 = false
             this.close();
+            this.$message.success('添加成功');
+            // this.$emit("setCheckJson", name, url, _type);
         }
-    }
+
+    }   
 };
 </script>
   
 <style scoped>
 .dialog_diy>>>.el-dialog {
-    /* height: 100%; */
-    margin: 10vh auto !important;
+    height: 100%;
+    margin: 0 auto !important;
 }
 
 .dialog_diy>>>.el-dialog__header {
@@ -512,7 +73,7 @@ export default {
 }
 
 .dialog_diy>>>.el-dialog__body {
-    height: calc(100% - 124px);
+    height: calc(100% - 55px);
     box-sizing: border-box;
     padding: 0px;
 }
@@ -539,227 +100,5 @@ export default {
 }
 
 
-.fileCss {
-    width: 100%;
-    display: flex;
-    flex-direction: row;
-    flex-wrap: nowrap;
-    justify-content: space-around;
-    align-items: center;
-    padding: 40px 0;
-    box-sizing: border-box;
-}
-
-.fileCss>div {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-}
-
-.fileCss .spanName {
-    margin-top: 10px
-}
-
-
-.info_btn,
-.teacherWord {
-    color: #fff;
-    background-color: #0f7eff;
-    padding: 8px 24px;
-    font-size: 0.9375rem;
-    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
-        0px 3px 1px -2px rgb(0 0 0 / 12%);
-    min-width: 64px;
-    font-weight: 500;
-    border-radius: 4px;
-    box-sizing: border-box;
-    border: none;
-    cursor: pointer;
-}
-
-.mask {
-    background-color: rgb(0 0 0 / 30%);
-    /* position: fixed; */
-    position: absolute;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    z-index: 90;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-}
-
-.progressBox {
-    width: 300px;
-    height: 150px;
-    background: #fff;
-    border-radius: 10px;
-    box-shadow: 0 0 6px 1px #bfbfbf;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    flex-direction: column;
-    position: relative;
-    color: #6c6c6c;
-}
-
-.progressBox>>>.el-progress-bar__outer {
-    background-color: #d1dfff !important;
-}
-
-.progressBox .lbox {
-    height: 50px;
-    font-size: 19px;
-    display: flex;
-    align-items: center;
-    color: #747474;
-}
-
-.progressBox .lbox img {
-    width: 40px;
-    margin-right: 20px;
-}
-
-.closeCss {
-    position: absolute;
-    top: 8px;
-    right: 8px;
-    cursor: pointer;
-    width: 20px;
-    height: 20px;
-}
-
-.closeCss>img {
-    width: 100%;
-    height: 100%;
-}
-
-.file_box {
-    width: 100%;
-    padding: 15px;
-    box-sizing: border-box;
-}
-
-.student_head>>>.el-button--primary {
-    background-color: #2268bc;
-}
-
-.student_head {
-    display: flex;
-    justify-content: space-between;
-}
-
-.three {
-    display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-    width: 200px;
-    height: 30px;
-}
-
-.three>div {
-    cursor: pointer;
-}
-
-.choose {
-    border-bottom: 5px solid #3994fd;
-}
-
-.student_table {
-    width: 100%;
-    height: 100%;
-    background: #f2f2f2;
-    margin-top: 10px;
-}
-
-.tup {
-    width: calc(100% - 20px);
-    height: 120px;
-    margin: 0 auto;
-    position: relative;
-}
-
-.out_box:hover .deleteWord {
-    /* display: block; */
-}
-
-.deleteWord {
-    width: 25px;
-    height: 25px;
-    position: absolute;
-    right: -25px;
-    top: -10px;
-    cursor: pointer;
-    display: none;
-}
-
-.tup>img,
-.deleteWord>img {
-    width: 100%;
-    height: 100%;
-    object-fit: cover;
-}
-
-.out_box {
-    display: flex;
-    flex-direction: column;
-    flex-wrap: nowrap;
-    width: 216px;
-    padding: 10px 0;
-    background: #fff;
-    margin: 0 10px 10px 0;
-    height: fit-content;
-    cursor: pointer;
-}
-
-.out_box:nth-child(3n){
-    margin-right: 0;
-}
-
-.bottom_box {
-    display: flex;
-    text-align: center;
-    margin: 0 auto;
-    padding: 10px 0 5px 0;
-}
-
-.bottom_box>div:nth-child(1) {
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    overflow: hidden;
-    word-break: break-all;
-    width: 200px;
-}
-
-.uploadThing {
-    background: #2268bc;
-    width: 90px;
-    height: 35px;
-    color: #fff;
-    font-size: 12px;
-    text-align: center;
-    line-height: 35px;
-    cursor: pointer;
-    border-radius: 4px;
-}
-
-.top {
-    display: flex;
-    justify-content: space-between;
-}
-
-.student_page {
-    margin-top: 30px;
-}
-
-.boxCss {
-    padding: 15px 5px;
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
-    min-height: 250px;
-}
 </style>
   

+ 765 - 0
src/components/pages/test/file/checkfileJiu.vue

@@ -0,0 +1,765 @@
+<template>
+    <el-dialog title="上传文件" :visible.sync="dialogVisiblefile" :append-to-body="true" width="600px"
+        :before-close="handleClose" class="dialog_diy">
+        <div class="fileCss">
+            <div>
+                <button class="info_btn" @click="addImg($event)">
+                    选择本地文件
+                    <input type="file" accept="*" style="display: none" multiple="multiple" @change="beforeUpload" />
+                </button>
+                <div class="spanName">选择本地文件</div>
+            </div>
+            <!-- <div>
+                <el-button @click="openFile">选择素材库文件</el-button>
+                <div class="spanName">选择素材库文件</div>
+            </div> -->
+        </div>
+        <div v-if="proVisible" class="mask">
+            <div class="progressBox">
+                <div class="lbox">
+                    <img src="../../../../assets/loading.gif" />上传中,请稍后
+                </div>
+                <!-- <div style="margin-bottom: 10px">
+                    <span>{{
+                        isFinishSize
+                    }}M</span>
+                    /
+                    <span>{{
+                        isAllSize
+                    }}M</span>
+                </div>
+                <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
+                    ? progress
+                    : 0
+                    " style="width: 80%"></el-progress> -->
+            </div>
+        </div>
+        <el-dialog title="选择素材库文件" :visible.sync="dialogVisiblefile2" :append-to-body="true" width="710px"
+            :before-close="handleClose2" class="dialog_diy">
+            <div class="file_box">
+                <div class="student_head">
+                    <div class="three">
+                        <div :class="choose == 0 ? 'choose' : ''" @click="sMtl(0)">图片</div>
+                        <div :class="choose == 1 ? 'choose' : ''" @click="sMtl(1)">视频</div>
+                        <div :class="choose == 2 ? 'choose' : ''" @click="sMtl(2)">附件</div>
+                    </div>
+                </div>
+                <div class="student_table" v-loading="isLoading">
+                    <div v-if="this.choose == 0" class="boxCss">
+                        <div class="out_box" v-for="(item, index) in chapInfo" :key="index">
+                            <div class="tup">
+                                <img :src="item.chapdataInfo ? JSON.parse(item.chapdataInfo).url : mtp
+                                    " alt="" @click="checkJson(JSON.parse(item.chapdataInfo))" />
+                                <div class="deleteWord">
+                                    <img src="../../../../assets/icon/delete.png" alt="" />
+                                </div>
+                            </div>
+                            <div class="bottom_box">
+                                <el-tooltip :content="item.chapdataInfo
+                                    ? JSON.parse(item.chapdataInfo).name
+                                    : '暂无名称'" placement="top" effect="dark">
+                                    <div>
+                                        {{
+                                            item.chapdataInfo
+                                            ? JSON.parse(item.chapdataInfo).name
+                                            : "暂无名称"
+                                        }}
+                                    </div>
+                                </el-tooltip>
+                            </div>
+                        </div>
+                    </div>
+                    <div v-if="this.choose == 1" class="boxCss">
+                        <div class="out_box" v-for="(item, index) in chapInfo" :key="index">
+                            <div class="tup">
+                                <img :src="msp" alt="" @click="checkJson(JSON.parse(item.chapdataInfo))" />
+                                <div class="deleteWord">
+                                    <img src="../../../../assets/icon/delete.png" alt="" />
+                                </div>
+                            </div>
+                            <div class="bottom_box">
+                                <el-tooltip :content="item.chapdataInfo
+                                    ? JSON.parse(item.chapdataInfo).name
+                                    : '暂无名称'" placement="top" effect="dark">
+                                    <div>
+                                        {{
+                                            item.chapdataInfo
+                                            ? JSON.parse(item.chapdataInfo).name
+                                            : "暂无名称"
+                                        }}
+                                    </div>
+                                </el-tooltip>
+                            </div>
+                        </div>
+                    </div>
+                    <div v-if="this.choose == 2" class="boxCss">
+                        <div class="out_box" v-for="(item, index) in chapInfo" :key="index">
+                            <div class="tup">
+                                <img :src="mfj" alt="" @click="checkJson(JSON.parse(item.chapdataInfo))" />
+                                <div class="deleteWord">
+                                    <img src="../../../../assets/icon/delete.png" alt="" />
+                                </div>
+                            </div>
+                            <div class="bottom_box">
+                                <el-tooltip :content="item.chapdataInfo
+                                    ? JSON.parse(item.chapdataInfo).name
+                                    : '暂无名称'" placement="top" effect="dark">
+                                    <div>
+                                        {{
+                                            item.chapdataInfo
+                                            ? JSON.parse(item.chapdataInfo).name
+                                            : "暂无名称"
+                                        }}
+                                    </div>
+                                </el-tooltip>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="student_page">
+                    <el-pagination background layout="prev, pager, next" :page-size="10" :total="total"
+                        v-if="page && chapInfo.length" @current-change="handleCurrentChange">
+                    </el-pagination>
+                </div>
+            </div>
+        </el-dialog>
+    </el-dialog>
+</template>
+  
+<script>
+export default {
+    props: {
+        dialogVisiblefile: {
+            type: Boolean,
+            default: false
+        },
+    },
+    data() {
+        return {
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            dialogVisiblefile2: false,
+            userid: this.$route.query.userid,
+            page: 1,
+            isLoading: false,
+            total: 0,
+            chapInfo: [],
+            choose: 0,
+            mtp: require("../../../../assets/tup1.png"),
+            msp: require("../../../../assets/icon/fileIcon/isVideo.png"),
+            mfj: require("../../../../assets/icon/fileIcon/word2.png"),
+        };
+    },
+    methods: {
+        handleClose(done) {
+            this.close();
+            done();
+        },
+        handleClose2(done) {
+            done();
+        },
+        close() {
+            this.$emit("update:dialogVisiblefile", false);
+        },
+        openFile() {
+            this.dialogVisiblefile2 = true
+            this.selectMtl();
+        },
+        sMtl(choose) {
+            this.choose = choose
+            this.page = 1
+            this.selectMtl()
+        },
+        handleCurrentChange(val) {
+            this.page = val
+            this.selectMtl()
+        },
+        selectMtl() {
+            this.isLoading = true;
+            let params = {
+                t: this.choose,
+                uid: this.userid,
+                page: this.page,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectMtl2", params)
+                .then((res) => {
+                    this.isLoading = false;
+                    this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+                    this.chapInfo = res.data[0];
+                })
+                .catch((err) => {
+                    this.isLoading = false;
+                    console.error(err);
+                });
+        },
+        addImg(e) {
+            var el = e.currentTarget;
+            el.getElementsByTagName("input")[0].click();
+            e.target.value = "";
+        },
+        beforeUpload(event, type) {
+            // const loading = this.openLoading();
+            let cfindex2 = 0;
+            for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
+                let file = event.target.files[cfindex];
+                var credentials = {
+                    accessKeyId: "AKIATLPEDU37QV5CHLMH",
+                    secretAccessKey: "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",
+                }; //秘钥形式的登录上传
+                window.AWS.config.update(credentials);
+                window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+                var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+                var _this = this;
+
+                // _this.progress = 0;
+                _this.proVisible = true;
+                // _this.isFinishSize = 0;
+                // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
+                _this.$forceUpdate();
+                if (file) {
+                    var params = {
+                        Key:
+                            file.name.split(".")[0] +
+                            new Date().getTime() +
+                            "." +
+                            file.name.split(".")[file.name.split(".").length - 1],
+                        ContentType: file.type,
+                        Body: file,
+                        "Access-Control-Allow-Credentials": "*",
+                        ACL: "public-read",
+                    }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+                    var options = {
+                        partSize: 2048 * 1024 * 1024,
+                        queueSize: 2,
+                        leavePartsOnError: true,
+                    };
+                    bucket
+                        .upload(params, options)
+                        .on("httpUploadProgress", function (evt) {
+                            //这里可以写进度条
+                            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+                            // _this.progress = parseInt((evt.loaded / evt.total) * 100);
+                            // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
+                            // _this.$forceUpdate();
+                        })
+                        .send(function (err, data) {
+                            cfindex2++;
+
+                            // _this.progress = 100;
+                            // _this.isFinishSize = _this.isAllSize;
+                            // _this.$forceUpdate();
+                            // setTimeout(() => {
+                            //     _this.proVisible = false;
+                            //     _this.$forceUpdate();
+                            // }, 1000);
+                            setTimeout(() => {
+                                if (
+                                cfindex2 == event.target.files.length - 1 ||
+                                cfindex2 > event.target.files.length - 1
+                                ) {
+                                _this.proVisible = false;
+                                _this.close();
+                                }
+                            }, 1000);
+                            // loading.close();
+                            if (err) {
+                                _this.$message.error("上传失败");
+                            } else {
+                                let _type = 2;
+                                var imgA = [
+                                    "png",
+                                    "jpg",
+                                    "jpeg",
+                                    "bmp",
+                                    "gif",
+                                    "webp",
+                                    "psd",
+                                    "svg",
+                                    "tiff",
+                                ];
+                                var fileA = [
+                                    "DOC",
+                                    "DOCX",
+                                    "DOCM",
+                                    "DOTM",
+                                    "DOTX",
+                                    "PPTX",
+                                    "PPSX",
+                                    "PPT",
+                                    "PPS",
+                                    "PPTM",
+                                    "POTM",
+                                    "PPAM",
+                                    "POTX",
+                                    "PPSM",
+                                    "XLSX",
+                                    "XLS",
+                                ];
+                                var videoA = [
+                                    "AVI",
+                                    "NAVI",
+                                    "MPEG",
+                                    "ASF",
+                                    "MOV",
+                                    "WMV",
+                                    "3GP",
+                                    "RM",
+                                    "RMVB",
+                                    "FLV",
+                                    "F4V",
+                                    "H.264",
+                                    "H.265",
+                                    "REAL VIDEO",
+                                    "MKV",
+                                    "WebM",
+                                    "HDDVD",
+                                    "MP4",
+                                    "MPG",
+                                    "M4V",
+                                    "MGV",
+                                    "OGV",
+                                    "QTM",
+                                    "STR",
+                                    "AMC",
+                                    "DVX",
+                                    "EVO",
+                                    "DAT",
+                                    "OGG",
+                                    "OGM",
+                                ];
+                                if (
+                                    fileA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleUpperCase()
+                                    ) != -1
+                                ) {
+                                    _type = 1; //word 文件
+                                } else if (
+                                    videoA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleUpperCase()
+                                    ) != -1
+                                ) {
+                                    _type = 2; //视频
+                                } else if (
+                                    imgA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleLowerCase()
+                                    ) != -1
+                                ) {
+                                    _type = 3; //图片
+                                } else if (
+                                    'pdf'.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleLowerCase()
+                                    ) != -1
+                                ) {
+                                    _type = 4; //pdf
+                                } else {
+                                    _type = 5; //文件
+                                }
+                                // if (_this.checkJson.file) {
+                                // _this.checkJson.file.push({
+                                //     name: file.name,
+                                //     url: data.Location,
+                                //     type: _type,
+                                // });
+                                // } else {
+                                //     _this.checkJson.file = []
+                                //     _this.checkJson.file.push({
+                                //         name: file.name,
+                                //         url: data.Location,
+                                //         type: _type,
+                                //     });
+                                // }
+                                _this.$emit("setCheckJson", file.name, data.Location, _type);
+                                _this.$forceUpdate();
+
+                                console.log(_this.checkJson);
+                                console.log(data.Location);
+                            }
+                        });
+                }
+            }
+        },
+        checkJson(json) {
+            let _type = 2;
+            let url = "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/"+encodeURIComponent(json.url.split(
+          "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/"
+        )[1]);
+            let name = json.name
+            var imgA = [
+                "png",
+                "jpg",
+                "jpeg",
+                "bmp",
+                "gif",
+                "webp",
+                "psd",
+                "svg",
+                "tiff",
+            ];
+            var fileA = [
+                "DOC",
+                "DOCX",
+                "DOCM",
+                "DOTM",
+                "DOTX",
+                "PPTX",
+                "PPSX",
+                "PPT",
+                "PPS",
+                "PPTM",
+                "POTM",
+                "PPAM",
+                "POTX",
+                "PPSM",
+                "XLSX",
+                "XLS",
+            ];
+            var videoA = [
+                "AVI",
+                "NAVI",
+                "MPEG",
+                "ASF",
+                "MOV",
+                "WMV",
+                "3GP",
+                "RM",
+                "RMVB",
+                "FLV",
+                "F4V",
+                "H.264",
+                "H.265",
+                "REAL VIDEO",
+                "MKV",
+                "WebM",
+                "HDDVD",
+                "MP4",
+                "MPG",
+                "M4V",
+                "MGV",
+                "OGV",
+                "QTM",
+                "STR",
+                "AMC",
+                "DVX",
+                "EVO",
+                "DAT",
+                "OGG",
+                "OGM",
+            ];
+            if (
+                fileA.indexOf(
+                    url.split(".")[
+                    url.split(".").length - 1
+                    ].toLocaleUpperCase()
+                ) != -1
+            ) {
+                _type = 1; //word 文件
+            } else if (
+                videoA.indexOf(
+                    url.split(".")[
+                    url.split(".").length - 1
+                    ].toLocaleUpperCase()
+                ) != -1
+            ) {
+                _type = 2; //视频
+            } else if (
+                imgA.indexOf(
+                    url.split(".")[
+                    url.split(".").length - 1
+                    ].toLocaleLowerCase()
+                ) != -1
+            ) {
+                _type = 3; //图片
+            } else if (
+                'pdf'.indexOf(
+                    url.split(".")[
+                    url.split(".").length - 1
+                    ].toLocaleLowerCase()
+                ) != -1
+            ) {
+                _type = 4; //pdf
+            } else {
+                _type = 5; //文件
+            }
+            this.$emit("setCheckJson", name, url, _type);
+            this.dialogVisiblefile2 = false
+            this.close();
+        }
+    }
+};
+</script>
+  
+<style scoped>
+.dialog_diy>>>.el-dialog {
+    /* height: 100%; */
+    margin: 10vh auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #454545 !important;
+    padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    height: calc(100% - 124px);
+    box-sizing: border-box;
+    padding: 0px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    background: #fafafa;
+}
+
+
+.fileCss {
+    width: 100%;
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    justify-content: space-around;
+    align-items: center;
+    padding: 40px 0;
+    box-sizing: border-box;
+}
+
+.fileCss>div {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+}
+
+.fileCss .spanName {
+    margin-top: 10px
+}
+
+
+.info_btn,
+.teacherWord {
+    color: #fff;
+    background-color: #0f7eff;
+    padding: 8px 24px;
+    font-size: 0.9375rem;
+    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
+        0px 3px 1px -2px rgb(0 0 0 / 12%);
+    min-width: 64px;
+    font-weight: 500;
+    border-radius: 4px;
+    box-sizing: border-box;
+    border: none;
+    cursor: pointer;
+}
+
+.mask {
+    background-color: rgb(0 0 0 / 30%);
+    /* position: fixed; */
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 90;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.progressBox {
+    width: 300px;
+    height: 150px;
+    background: #fff;
+    border-radius: 10px;
+    box-shadow: 0 0 6px 1px #bfbfbf;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+    position: relative;
+    color: #6c6c6c;
+}
+
+.progressBox>>>.el-progress-bar__outer {
+    background-color: #d1dfff !important;
+}
+
+.progressBox .lbox {
+    height: 50px;
+    font-size: 19px;
+    display: flex;
+    align-items: center;
+    color: #747474;
+}
+
+.progressBox .lbox img {
+    width: 40px;
+    margin-right: 20px;
+}
+
+.closeCss {
+    position: absolute;
+    top: 8px;
+    right: 8px;
+    cursor: pointer;
+    width: 20px;
+    height: 20px;
+}
+
+.closeCss>img {
+    width: 100%;
+    height: 100%;
+}
+
+.file_box {
+    width: 100%;
+    padding: 15px;
+    box-sizing: border-box;
+}
+
+.student_head>>>.el-button--primary {
+    background-color: #2268bc;
+}
+
+.student_head {
+    display: flex;
+    justify-content: space-between;
+}
+
+.three {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    width: 200px;
+    height: 30px;
+}
+
+.three>div {
+    cursor: pointer;
+}
+
+.choose {
+    border-bottom: 5px solid #3994fd;
+}
+
+.student_table {
+    width: 100%;
+    height: 100%;
+    background: #f2f2f2;
+    margin-top: 10px;
+}
+
+.tup {
+    width: calc(100% - 20px);
+    height: 120px;
+    margin: 0 auto;
+    position: relative;
+}
+
+.out_box:hover .deleteWord {
+    /* display: block; */
+}
+
+.deleteWord {
+    width: 25px;
+    height: 25px;
+    position: absolute;
+    right: -25px;
+    top: -10px;
+    cursor: pointer;
+    display: none;
+}
+
+.tup>img,
+.deleteWord>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.out_box {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    width: 216px;
+    padding: 10px 0;
+    background: #fff;
+    margin: 0 10px 10px 0;
+    height: fit-content;
+    cursor: pointer;
+}
+
+.out_box:nth-child(3n){
+    margin-right: 0;
+}
+
+.bottom_box {
+    display: flex;
+    text-align: center;
+    margin: 0 auto;
+    padding: 10px 0 5px 0;
+}
+
+.bottom_box>div:nth-child(1) {
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    word-break: break-all;
+    width: 200px;
+}
+
+.uploadThing {
+    background: #2268bc;
+    width: 90px;
+    height: 35px;
+    color: #fff;
+    font-size: 12px;
+    text-align: center;
+    line-height: 35px;
+    cursor: pointer;
+    border-radius: 4px;
+}
+
+.top {
+    display: flex;
+    justify-content: space-between;
+}
+
+.student_page {
+    margin-top: 30px;
+}
+
+.boxCss {
+    padding: 15px 5px;
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    min-height: 250px;
+}
+</style>
+  

+ 1 - 0
src/components/pages/testPerson/index.vue

@@ -16,6 +16,7 @@ import panelA from './panel/index.vue'
 import testA from './test/index.vue'
 
 export default {
+    name:'testPerson',
     components: {
         infoA,
         panelA,

+ 427 - 226
src/components/pages/testPerson/test/test.vue

@@ -19,14 +19,14 @@
             </div>
         </div>
         <div class="check_box" v-loading="loading">
-            <div class="noneData" v-if="!worksArray.length" style="text-align: center;">
+            <div class="noneData" v-if="!worksArray.length" style="text-align: center; margin-top: 20px;">
                 暂无数据
             </div>
             <div class="test_panel" v-for="(item, index) in worksArray" :key="index">
                 <div class="test_panel_title">
                     <div class="title">
                         <span :class="{ is: item.array.length > 0, no: !item.array.length }">{{ item.array.length > 0 ?
-                            "已完成" : "未完成" }}</span>
+                "已完成" : "未完成" }}</span>
                         <span>{{ item.title }}</span>
                     </div>
                     <div class="time">
@@ -40,20 +40,21 @@
                         <span>{{ item.brief ? item.brief : "暂无描述" }}</span>
                     </div>
                     <div class="test_add_box"
-                        style="width: calc(100% - 350px - 20px);border: none;margin-right: 20px;padding: 0;" v-else>
+                        style="width: calc(100% - 350px - 20px);border: none;margin-right: 20px;padding: 0;"
+                        v-else-if="item.array">
                         <div class="test" v-for="test in item.array" :key="test.id">
                             <img :src="getImg(test.courseJson)
-                                    ? getImg(test.courseJson)
-                                    : require('../../../../assets/icon/test/teacher.jpg')
-                                " />
+                ? getImg(test.courseJson)
+                : require('../../../../assets/icon/test/teacher.jpg')
+                " />
                             <div class="time">
-                                <span>提交时间</span>
+                                <span>填写时间</span>
                                 <span>{{ test.time }}</span>
                                 <span>修改时间</span>
                                 <span>{{ test.utime }}</span>
                             </div>
-                            <img @click="deleteTest(test.id)" class="delete" src="../../../../assets/icon/test/delete.png"
-                                alt="" />
+                            <img @click="deleteTest(test.id)" class="delete"
+                                src="../../../../assets/icon/test/delete.png" alt="" />
                             <div class="mask">
                                 <div @click="doTest(test.courseid, test.id)">
                                     <span></span><span>编辑</span>
@@ -67,14 +68,24 @@
                             </div>
                         </div>
                     </div>
-                    <div class="panel">
-                        <div class="score">
+                    <div class="test_add_box"
+                        style="width: calc(100% - 50px);border: none;margin-right: 20px;padding: 0;flex-direction: column;"
+                        v-else-if="item.carray" v-loading="!item.carray.length">
+                        <div class="courseLength" v-for="(course, index) in item.carray" :key="index" @click="doTest3(item, course)">
+                            <span class="finish" :class="{is: course.array.length}"></span>
+                            <span>{{ index+1 }}、</span>
+                            <span>{{ course.title }}</span>
+                            <span>{{ course.username }}</span>
+                        </div>
+                    </div>
+                    <div class="panel" :style="{width:type == 'dda9728e-5f11-469e-89ee-aca518daf123' ? '50px' : '',minWidth:type == 'dda9728e-5f11-469e-89ee-aca518daf123'?'50px':''}">
+                        <div class="score" v-if="type != 'dda9728e-5f11-469e-89ee-aca518daf123'">
                             <div>
                                 <span>{{ getNum(item.chapters) }}</span><span>题</span>
                             </div>
                             <div>题目总数</div>
                         </div>
-                        <div class="score">
+                        <div class="score" v-if="type != 'dda9728e-5f11-469e-89ee-aca518daf123'">
                             <div>
                                 <span>{{ getScore(item.array) }}</span><span>分</span>
                             </div>
@@ -83,7 +94,7 @@
                         <div class="btn">
                             <!-- <div @click="doTest(item.courseid,item.id)"><span></span><span>编辑</span></div> -->
                             <div @click="doTest2(item.courseid)">
-                                <span></span><span>提交</span>
+                                <span></span><span>填写</span>
                             </div>
                             <!-- <div @click="checkTest(item.courseid,item.id)"><span></span><span>查看</span></div> -->
                             <!-- <div @click="copyTest(item.id)"><span></span><span>复制</span></div> -->
@@ -93,11 +104,11 @@
                 <div class="test_add_box" v-if="item.array.length > 0 && item.brief">
                     <div class="test" v-for="test in item.array" :key="test.id">
                         <img :src="getImg(test.courseJson)
-                                ? getImg(test.courseJson)
-                                : require('../../../../assets/icon/test/teacher.jpg')
-                            " />
+                ? getImg(test.courseJson)
+                : require('../../../../assets/icon/test/teacher.jpg')
+                " />
                         <div class="time">
-                            <span>提交时间</span>
+                            <span>填写时间</span>
                             <span>{{ test.time }}</span>
                             <span>修改时间</span>
                             <span>{{ test.utime }}</span>
@@ -117,6 +128,14 @@
                         </div>
                     </div>
                 </div>
+                <div class="test_add_box" v-if="item.carray.length > 0 && item.brief" style="flex-direction: column;">
+                    <div class="courseLength" v-for="(course, index) in item.carray" :key="index" @click="doTest3(item, course)">
+                            <span class="finish" :class="{is: course.array.length}"></span>
+                            <span>{{ index+1 }}、</span>
+                            <span>{{ course.title }}</span>
+                            <span>{{ course.username }}</span>
+                        </div>
+                </div>
             </div>
         </div>
     </div>
@@ -126,10 +145,10 @@
 export default {
     props: {
         userid: {
-        type: String,
+            type: String,
         },
         oid: {
-        type: String,
+            type: String,
         },
     },
     data() {
@@ -275,7 +294,7 @@ export default {
             this.type = type;
             this.getWorks();
         },
-        selectTestType() {
+        selectTestType(type) {
             let params = {
                 oid: this.oid
             };
@@ -283,10 +302,12 @@ export default {
                 .get(this.$store.state.api + "selectTestType", params)
                 .then(res => {
                     this.typeArray = res.data[0];
-                    if(this.typeArray.length){
-                        this.type = this.typeArray[0].id;
-                    }else{
-                        this.type = '0';
+                    if(type == 1){
+                        if (this.typeArray.length) {
+                            this.type = this.typeArray[0].id;
+                        } else {
+                            this.type = '0';
+                        }
                     }
                     this.getWorks()
                 })
@@ -303,7 +324,6 @@ export default {
             this.ajax
                 .get(this.$store.state.api + "getTestWorksPerson", params)
                 .then(res => {
-                    this.loading = false;
                     let array = res.data[0];
                     let array2 = res.data[1];
                     // 用于存储归类后的数据的对象
@@ -321,20 +341,53 @@ export default {
                             overtime: item.overtime,
                             chapters: item.chapters,
                             brief: item.brief,
-                            array: []
+                            typeid: item.typeid,
+                            array: item.typeid == 'dda9728e-5f11-469e-89ee-aca518daf123' ? 0 : [],
+                            carray: [],
                         };
                     });
                     worksArray = Object.values(worksArray);
-                    worksArray.forEach(el => {
+                    worksArray.forEach(async el => {
+                        if (el.typeid == 'dda9728e-5f11-469e-89ee-aca518daf123') {
+                            let courseJson = this.returnCourseJSON(el.chapters)
+                            if(courseJson && courseJson.courses.length){
+                                let courses = courseJson.courses.join(',')
+                                let _res = await this.getAllCourse(courses)
+                                console.log(_res);
+                                let _carray = []
+                                for(var i=0;i<_res.length;i++){
+                                    _carray.push({
+                                        courseid: _res[i].courseId,
+                                        title: _res[i].title,
+                                        username: _res[i].username,
+                                        array: []
+                                    })
+                                }
+                                el.carray = _carray
+                            }
+                        }
+
                         array.forEach(el2 => {
-                            if (el.courseid == el2.courseid) {
+                            if (el.courseid == el2.courseid && el.typeid != 'dda9728e-5f11-469e-89ee-aca518daf123') {
                                 el.array.push(el2);
                             }
+
+                            if(el.courseid == el2.courseid && el.typeid == 'dda9728e-5f11-469e-89ee-aca518daf123'){
+                                let courseid = this.returnCourseId(el2.courseJson)
+                                for(var c = 0; c<el.carray.length;c++){
+                                    if(el.carray[c].courseid == courseid){
+                                        el.carray[c].array.push(el2);
+                                        break
+                                    }
+                                }
+                            }
                         });
                     });
                     // worksArray[item.courseid].array.push(item);
 
                     this.worksArray = worksArray;
+                    this.loading = false;
+
                     this.$forceUpdate();
                 })
                 .catch(err => {
@@ -403,6 +456,41 @@ export default {
                 this.role
             );
         },
+        doTest3(item, course){
+            if(course.array.length){
+                this.$router.push(
+                    "/doTest?cid=" +
+                    item.courseid +
+                    "&tid=" +
+                    course.array[0].id +
+                    "&userid=" +
+                    this.userid +
+                    "&oid=" +
+                    this.oid +
+                    "&org=" +
+                    this.org +
+                    "&type=3" +
+                    "&role=" +
+                    this.role
+                );
+            }else{
+                this.$router.push(
+                    "/doTest?cid=" +
+                    item.courseid +
+                    "&userid=" +
+                    this.userid +
+                    "&oid=" +
+                    this.oid +
+                    "&org=" +
+                    this.org +
+                    "&type=3" +
+                    "&courseid=" +
+                    course.courseid +
+                    "&role=" +
+                    this.role
+                ); 
+            }
+        },
         copyTest(tid) {
             let params = [
                 {
@@ -423,7 +511,7 @@ export default {
         deleteTest(tid) {
             let _this = this;
             _this
-                .$confirm("确定删除此提交的表单么?", "提示", {
+                .$confirm("确定删除此填写的表单么?", "提示", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
                     type: "warning"
@@ -447,46 +535,138 @@ export default {
                 .catch(() => {
                     return;
                 });
-        }
+        },
+        returnCourseJSON(array) {
+            let _array = JSON.parse(array);
+            let courseJson = '';
+            s: for (var j = 0; j < _array.length; j++) {
+                let el = _array[j];
+                if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+                    for (var k2 = 0; k2 < el.array.length; k2++) {
+                        let item = el.array[k2];
+                        console.log(k2);
+                        if (item.ttype == 2 && item.array.length > 0) {
+                            for (var z = 0; z < item.array.length; z++) {
+                                let item2 = item.array[z];
+                                if (
+                                    item2.ttype == 1 &&
+                                    item2.type == 6 &&
+                                    item2.json 
+                                ) {
+                                    courseJson = item2.json
+                                    break s;
+                                }
+                            }
+                        } else if (
+                            item.ttype == 1 &&
+                            item.type == 6 &&
+                            item.json
+                        ) {
+                            courseJson = item.json
+                                    break s;
+                        }
+                    }
+                } else if (
+                    el.ttype == 1 &&
+                    el.type == 6 &&
+                    el.json 
+                ) {
+                    courseJson = el.json
+                                    break s;
+                }
+            }
+            return courseJson;
+        },
+        returnCourseId(array) {
+            let _array = JSON.parse(array);
+            let courseJson = '';
+            s: for (var j = 0; j < _array.length; j++) {
+                let el = _array[j];
+                if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+                    for (var k2 = 0; k2 < el.array.length; k2++) {
+                        let item = el.array[k2];
+                        console.log(k2);
+                        if (item.ttype == 2 && item.array.length > 0) {
+                            for (var z = 0; z < item.array.length; z++) {
+                                let item2 = item.array[z];
+                                if (
+                                    item2.ttype == 1 &&
+                                    item2.type == 6 &&
+                                    item2.json && item2.json.answer2
+                                ) {
+                                    courseJson = item2.json.answer2
+                                    break s;
+                                }
+                            }
+                        } else if (
+                            item.ttype == 1 &&
+                            item.type == 6 &&
+                            item.json && item.json.answer2
+                        ) {
+                            courseJson = item.json.answer2
+                                    break s;
+                        }
+                    }
+                } else if (
+                    el.ttype == 1 &&
+                    el.type == 6 &&
+                    el.json  && el.json.answer2
+                ) {
+                    courseJson = el.json.answer2
+                                    break s;
+                }
+            }
+            return courseJson;
+        },
+        async getAllCourse(id) {
+            let params = {
+                cid: id,
+            };
+            let res = await this.ajax.get(this.$store.state.api + "getCourseInfoTestAll", params)
+            return res.data[0]
+        },
     },
     mounted() {
-        this.selectTestType();
-        this.getWorks();
-    }
+        this.selectTestType(1);
+    },
+    activated(){
+        console.log('testperson',1111111111111111111111);
+        this.selectTestType(2);
+    },
 };
 </script>
 
 <style scoped>
 .i_body_box {
-  height: calc(100% - 30px);
-  padding: 30px 0 0;
-  box-sizing: border-box;
+    height: calc(100% - 30px);
+    padding: 30px 0 0;
+    box-sizing: border-box;
 }
 
 .check_nav {
-  display: flex;
-  height: 50px;
-  align-items: center;
-  padding: 0;
-  box-sizing: border-box;
-  width: 100%;
+    display: flex;
+    height: 50px;
+    align-items: center;
+    padding: 0;
+    box-sizing: border-box;
+    width: 100%;
 }
 
 .check_nav>.nav {
-  width: 120px;
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  color: rgb(167, 167, 167);
-  /* background: #000000; */
-  cursor: pointer;
+    width: 120px;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: rgb(167, 167, 167);
+    /* background: #000000; */
+    cursor: pointer;
 }
 
 .check_nav>.active {
-  color: #3681fc;
-  background: rgb(248, 250, 254);
-  border-radius: 10px 10px 0 0;
+    color: #3681fc;
+    background: rgb(248, 250, 254);
+    border-radius: 10px 10px 0 0;
 }
 
 .check_nav>.all::before,
@@ -495,330 +675,330 @@ export default {
 .check_nav>.jy::before,
 .check_nav>.bj::before,
 .check_nav>.yy::before {
-  content: "";
-  display: block;
-  width: 18px;
-  height: 18px;
-  background-size: 100% 100%;
-  margin-right: 5px;
+    content: "";
+    display: block;
+    width: 18px;
+    height: 18px;
+    background-size: 100% 100%;
+    margin-right: 5px;
 }
 
 .check_nav>.all::before {
 
-  background-image: url('../../../../assets/icon/test/all_icon.png');
+    background-image: url('../../../../assets/icon/test/all_icon.png');
 }
 
 .check_nav>.active.all::before {
-  background-image: url('../../../../assets/icon/test/all_icon_active.png');
+    background-image: url('../../../../assets/icon/test/all_icon_active.png');
 }
 
 .check_nav>.gr::before {
-  background-image: url('../../../../assets/icon/test/gr_icon.png');
+    background-image: url('../../../../assets/icon/test/gr_icon.png');
 }
 
 .check_nav>.active.gr::before {
-  background-image: url('../../../../assets/icon/test/gr_icon_active.png');
+    background-image: url('../../../../assets/icon/test/gr_icon_active.png');
 }
 
 .check_nav>.md::before {
-  background-image: url('../../../../assets/icon/test/md_icon.png');
+    background-image: url('../../../../assets/icon/test/md_icon.png');
 }
 
 .check_nav>.active.md::before {
-  background-image: url('../../../../assets/icon/test/md_icon_active.png');
+    background-image: url('../../../../assets/icon/test/md_icon_active.png');
 }
 
 .check_nav>.jy::before {
-  background-image: url('../../../../assets/icon/test/jy_icon.png');
+    background-image: url('../../../../assets/icon/test/jy_icon.png');
 }
 
 .check_nav>.active.jy::before {
-  background-image: url('../../../../assets/icon/test/jy_icon_active.png');
+    background-image: url('../../../../assets/icon/test/jy_icon_active.png');
 }
 
 .check_nav>.yy::before {
-  background-image: url('../../../../assets/icon/test/yy_icon.png');
+    background-image: url('../../../../assets/icon/test/yy_icon.png');
 }
 
 .check_nav>.active.yy::before {
-  background-image: url('../../../../assets/icon/test/yy_icon_active.png');
+    background-image: url('../../../../assets/icon/test/yy_icon_active.png');
 }
 
 .check_nav>.bj::before {
-  background-image: url('../../../../assets/icon/test/bj_icon.png');
+    background-image: url('../../../../assets/icon/test/bj_icon.png');
 }
 
 .check_nav>.active.bj::before {
-  background-image: url('../../../../assets/icon/test/bj_icon_active.png');
+    background-image: url('../../../../assets/icon/test/bj_icon_active.png');
 }
 
 
 .check_box {
-  height: calc(100% - 50px);
-  overflow: auto;
-  padding: 20px 0;
-  box-sizing: border-box;
-  background: rgb(248, 250, 254);
+    height: calc(100% - 50px);
+    overflow: auto;
+    padding: 0 0 20px;
+    box-sizing: border-box;
+    background: rgb(248, 250, 254);
 }
 
 .test_panel {
-  width: calc(100% - 40px);
-  margin: 0 auto;
-  background: #fff;
-  border-radius: 10px;
-  /* height: 300px; */
-  overflow: hidden;
+    width: calc(100% - 40px);
+    margin: 20px auto 0;
+    background: #fff;
+    border-radius: 10px;
+    /* height: 300px; */
+    overflow: hidden;
 }
 
 .test_panel+.test_panel {
-  margin-top: 20px;
+    margin-top: 20px;
 }
 
 .test_panel_title {
-  height: 60px;
-  display: flex;
-  align-items: center;
-  width: 100%;
-  justify-content: space-between;
-  padding: 0 20px;
-  box-sizing: border-box;
-  border-bottom: 2px solid #f0f0f0;
+    height: 60px;
+    display: flex;
+    align-items: center;
+    width: 100%;
+    justify-content: space-between;
+    padding: 0 20px;
+    box-sizing: border-box;
+    border-bottom: 2px solid #f0f0f0;
 }
 
 .test_panel_title>.title {
-  display: flex;
-  align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 .test_panel_title>.title>span:nth-child(1) {
-  font-size: 12px;
-  padding: 3px 5px;
-  border-radius: 5px;
-  margin-right: 10px;
+    font-size: 12px;
+    padding: 3px 5px;
+    border-radius: 5px;
+    margin-right: 10px;
 }
 
 .test_panel_title>.title>.is:nth-child(1) {
-  color: rgb(100, 215, 155);
-  background: rgb(241, 255, 248);
-  border: 1px solid rgb(100, 215, 155);
+    color: rgb(100, 215, 155);
+    background: rgb(241, 255, 248);
+    border: 1px solid rgb(100, 215, 155);
 }
 
 .test_panel_title>.title>.no:nth-child(1) {
-  color: rgb(240, 66, 66);
-  background: rgb(255, 241, 241);
-  border: 1px solid rgb(240, 66, 66);
+    color: rgb(240, 66, 66);
+    background: rgb(255, 241, 241);
+    border: 1px solid rgb(240, 66, 66);
 }
 
 .test_panel_title>.title>span:nth-child(2) {
-  font-size: 18px;
-  font-weight: 600;
+    font-size: 18px;
+    font-weight: 600;
 }
 
 .test_panel_title>.time {
-  font-size: 14px;
-  color: #a1a1a1;
+    font-size: 14px;
+    color: #a1a1a1;
 }
 
 .test_panel_title>.time>span+span {
-  margin-left: 10px;
+    margin-left: 10px;
 }
 
 .test_panel_box {
-  width: 100%;
-  display: flex;
-  align-items: center;
-  padding: 20px 20px;
-  box-sizing: border-box;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    padding: 20px 20px;
+    box-sizing: border-box;
 }
 
 .test_panel_box>.detail {
-  width: calc(100% - 350px - 20px);
-  margin-right: 20px;
-  color: #a1a1a1;
-  font-size: 14px;
-  line-height: 24px;
-  word-break: break-all;
-  display: -webkit-box;
-  -webkit-line-clamp: 4;
-  -webkit-box-orient: vertical;
-  overflow: hidden;
+    width: calc(100% - 350px - 20px);
+    margin-right: 20px;
+    color: #a1a1a1;
+    font-size: 14px;
+    line-height: 24px;
+    word-break: break-all;
+    display: -webkit-box;
+    -webkit-line-clamp: 4;
+    -webkit-box-orient: vertical;
+    overflow: hidden;
 }
 
 .test_panel_box>.panel {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  width: 350px;
-  min-width: 350px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width: 350px;
+    min-width: 350px;
 }
 
 .test_panel_box>.panel>.score {
-  height: 110px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  flex-direction: column;
-  border: 1px solid #dbdbdb;
-  background: rgb(252, 252, 252);
-  width: 120px;
-  border-radius: 5px;
+    height: 110px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+    border: 1px solid #dbdbdb;
+    background: rgb(252, 252, 252);
+    width: 120px;
+    border-radius: 5px;
 }
 
 .test_panel_box>.panel>.score:nth-child(1) {
-  display: flex;
+    display: flex;
 }
 
 .test_panel_box>.panel>.score>div:nth-child(1)>span:nth-child(1) {
-  font-size: 30px;
-  font-weight: 700;
+    font-size: 30px;
+    font-weight: 700;
 }
 
 .test_panel_box>.panel>.score>div:nth-child(1)>span:nth-child(2) {
-  margin-left: 5px;
+    margin-left: 5px;
 }
 
 .test_panel_box>.panel>.score>div:nth-child(2) {
-  font-size: 14px;
-  margin-top: 10px;
-  color: #a1a1a1;
+    font-size: 14px;
+    margin-top: 10px;
+    color: #a1a1a1;
 }
 
 .test_panel_box>.panel>.btn {
-  height: 100px;
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
+    height: 100px;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
 }
 
 .test_panel_box>.panel>.btn>div {
-  display: flex;
-  color: rgb(69, 141, 255);
-  align-items: center;
-  cursor: pointer;
-  font-size: 14px;
+    display: flex;
+    color: rgb(69, 141, 255);
+    align-items: center;
+    cursor: pointer;
+    font-size: 14px;
 }
 
 /* .test_panel_box > .panel >.btn > div + div{
       margin: 15px 0 0 0;
     } */
 .test_panel_box>.panel>.btn>div>span:nth-child(1) {
-  display: block;
-  width: 13px;
-  height: 13px;
-  background-size: 100% 100%;
-  margin-right: 7px;
+    display: block;
+    width: 13px;
+    height: 13px;
+    background-size: 100% 100%;
+    margin-right: 7px;
 }
 
 .test_panel_box>.panel>.btn>div:nth-child(1)>span:nth-child(1) {
-  background-image: url('../../../../assets/icon/test/edit_icon.png');
+    background-image: url('../../../../assets/icon/test/edit_icon.png');
 }
 
 .test_panel_box>.panel>.btn>div:nth-child(2)>span:nth-child(1) {
-  background-image: url('../../../../assets/icon/test/check_icon.png');
+    background-image: url('../../../../assets/icon/test/check_icon.png');
 }
 
 .test_panel_box>.panel>.btn>div:nth-child(3)>span:nth-child(1) {
-  background-image: url('../../../../assets/icon/test/paste_icon.png');
+    background-image: url('../../../../assets/icon/test/paste_icon.png');
 }
 
 .test_add_box {
-  height: 160px;
-  width: 100%;
-  padding: 0 20px;
-  border-top: 2px solid #f0f0f0;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  overflow: auto;
+    height: 160px;
+    width: 100%;
+    padding: 0 20px;
+    border-top: 2px solid #f0f0f0;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    overflow: auto;
 }
 
 
 .test_add_box>.test {
-  width: 120px;
-  min-width: 120px;
-  height: 120px;
-  border-radius: 5px;
-  /* overflow: hidden; */
-  position: relative;
+    width: 120px;
+    min-width: 120px;
+    height: 120px;
+    border-radius: 5px;
+    /* overflow: hidden; */
+    position: relative;
 }
 
 .test_add_box>.test:hover .mask {
-  display: flex;
+    display: flex;
 }
 
 .test_add_box>.test:hover .delete {
-  display: block;
+    display: block;
 }
 
 .test_add_box>.test>img {
-  width: 100%;
-  height: 100%;
-  object-fit: cover;
-  border-radius: 5px;
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+    border-radius: 5px;
 }
 
 .test_add_box>.test+.test {
-  margin-left: 10px;
+    margin-left: 10px;
 }
 
 .test_add_box>.test>.time {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  flex-direction: column;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  top: 0;
-  left: 0;
-  color: #fff;
-  background: rgba(0, 0, 0, 0.5);
-  font-size: 14px;
-  text-align: center;
-  border-radius: 5px;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    flex-direction: column;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    top: 0;
+    left: 0;
+    color: #fff;
+    background: rgba(0, 0, 0, 0.5);
+    font-size: 14px;
+    text-align: center;
+    border-radius: 5px;
 }
 
 .test_add_box>.test>.time>span {
-  margin-top: 5px;
+    margin-top: 5px;
 }
 
 .test_add_box>.test>.mask {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  background: rgba(0, 0, 0, 0.5);
-  /* display: flex; */
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  top: 0;
-  left: 0;
-  color: rgb(69, 141, 255);
-  display: none;
-  border-radius: 5px;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.5);
+    /* display: flex; */
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    top: 0;
+    left: 0;
+    color: rgb(69, 141, 255);
+    display: none;
+    border-radius: 5px;
 }
 
 .test_add_box>.test>.delete {
-  position: absolute;
-  width: 20px;
-  height: 20px;
-  right: -5px;
-  top: -5px;
-  cursor: pointer;
-  z-index: 2;
-  display: none;
+    position: absolute;
+    width: 20px;
+    height: 20px;
+    right: -5px;
+    top: -5px;
+    cursor: pointer;
+    z-index: 2;
+    display: none;
 }
 
 .test_add_box>.test>.mask>div {
-  display: flex;
-  color: #fff;
-  align-items: center;
-  cursor: pointer;
-  font-size: 14px;
+    display: flex;
+    color: #fff;
+    align-items: center;
+    cursor: pointer;
+    font-size: 14px;
 }
 
 .test_add_box>.test>.mask>div+div {
-  margin: 10px 0 0 0;
+    margin: 10px 0 0 0;
 }
 
 /* 
@@ -843,5 +1023,26 @@ export default {
 } */
 
 .bgColor {
-  background: #466b99;
-}</style>
+    background: #466b99;
+}
+
+.courseLength{
+    width: 100%;
+    cursor: pointer;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+}
+.courseLength > span + span{
+    margin-left: 10px;
+}
+.courseLength > .finish{
+    width: 15px;
+    height: 15px;
+    background-image: url('../../../../assets/icon/test/icon_course.png');
+    background-size: 100% 100%;
+}
+.courseLength > .finish.is{
+    background-image: url('../../../../assets/icon/test/icon_course_check.png');
+}
+</style>

+ 41 - 17
src/components/pages/testStudent/view/component/choice.vue

@@ -6,26 +6,31 @@
             <div class="c_title">
                 <div class="title" style="display: flex;">
                     <!-- + `(${option[checkJson.type].name})` -->
-                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
-                <span>{{ checkJson.title }}</span>
-                <!-- {{ tindex + 1 + "、" + `(${option[checkJson.type].name})` + checkJson.title }} -->
-                <span style="min-width: fit-content;" v-if="checkJson.type == 2">{{ `(${option[checkJson.type].name})` }}</span>
-                <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' + checkJson.score + '分' }})</span></div>
+                    <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                    <span>{{ checkJson.title }}</span>
+                    <!-- {{ tindex + 1 + "、" + `(${option[checkJson.type].name})` + checkJson.title }} -->
+                    <span style="min-width: fit-content;" v-if="checkJson.type == 2">{{
+            `(${option[checkJson.type].name})` }}</span>
+                    <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' +
+            checkJson.score + '分' }})</span>
+                </div>
                 <div class="p_box" v-if="isTeacher == 1 && checkJson.score">
-                    <el-input v-model="score2" class="c_input" disabled></el-input><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+                    <el-input v-model="score2" class="c_input" disabled></el-input><span
+                        style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
                 </div>
                 <div class="p_box" v-if="isTeacher == 2 && checkJson.score2">
-                    <span>{{ checkJson.score2 }}分</span><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+                    <span>{{ checkJson.score2 }}分</span><span style="margin: 0 10px;">/</span><span>{{ checkJson.score
+                        }}分</span>
                 </div>
             </div>
             <div class="choices">
                 <div class="choice" v-for="(item, index) in checkJson.array" :key="index">
-                    <div class="choice_c" v-if="checkJson.type == 2"><el-checkbox v-model="checkJson.answer2" :label="index"
-                            :disabled="checktype == 2"></el-checkbox><span
+                    <div class="choice_c" v-if="checkJson.type == 2"><el-checkbox v-model="checkJson.answer2"
+                            :label="index" :disabled="checktype == 2" @change="changeJson"></el-checkbox><span
                             :class="{ right: see && cJson.answer.indexOf(index) != -1 }"
                             @click="check(checkJson.type, index)">{{ item.option }}</span></div>
-                    <div class="choice_c" v-if="checkJson.type == 1"><el-radio v-model="checkJson.answer2[0]" :label="index"
-                            :disabled="checktype == 2"></el-radio><span
+                    <div class="choice_c" v-if="checkJson.type == 1"><el-radio v-model="checkJson.answer2[0]"
+                            :label="index" :disabled="checktype == 2" @change="changeJson"></el-radio><span
                             :class="{ right: see && cJson.answer.indexOf(index) != -1 }"
                             @click="check(checkJson.type, index)">{{ item.option }}</span></div>
                 </div>
@@ -37,7 +42,7 @@
 <script>
 export default {
     props: {
-        tindex:{
+        tindex: {
             type: Number
         },
         cJson: {
@@ -77,12 +82,29 @@ export default {
     watch: {
         checkJson: {
             handler(newValue) {
+                console.log(1);
                 this.$emit('update:cJson', newValue)
+                this.$forceUpdate()
             },
             deep: true
-        }
+        },
+        cJson: {
+            handler(newValue) {
+                if (JSON.stringify(newValue.answer2) !== JSON.stringify(this.checkJson.answer2)) {
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
     },
     methods: {
+        changeJson() {
+            console.log(1);
+            this.$forceUpdate()
+            this.$emit('update:cJson', this.checkJson)
+            this.$forceUpdate()
+        },
         depthCopy(s) {
             return JSON.parse(JSON.stringify(s));
         },
@@ -99,6 +121,8 @@ export default {
             } else if (type == 1) {
                 this.checkJson.answer2[0] = index
             }
+            console.log(1);
+            this.$emit('update:cJson', this.checkJson)
             this.$forceUpdate()
         }
     },
@@ -125,18 +149,18 @@ export default {
     white-space: pre-line;
 }
 
-.choice_box> .c_title .title {
+.choice_box>.c_title .title {
     font-weight: bold;
     width: 100%;
     word-break: break-all;
 }
 
-.choice_box> .c_title {
+.choice_box>.c_title {
     display: flex;
     justify-content: space-between;
 }
 
-.choice_box> .c_title .p_box{
+.choice_box>.c_title .p_box {
     margin-left: 5px;
     min-width: fit-content;
     display: flex;
@@ -213,7 +237,7 @@ export default {
     width: 90px;
 }
 
-.c_input >>> .el-input__inner{
+.c_input>>>.el-input__inner {
     padding: 0 5px;
     text-align: right;
 }

+ 287 - 0
src/components/pages/testStudent/view/component/course.vue

@@ -0,0 +1,287 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box" v-loading="isloading" v-if="checkJson">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices" v-if="checkJson.courses.length">
+                <div class="course" @click="openCourse()">
+                    <div class="banner">
+                        <div v-if="tid" class="isRate">已评分</div>
+                        <img :src="courseDetail.cover" alt="">
+                    </div>
+                    <div class="content">
+                        <div class="c_c">
+                            <span>课程名称:</span>
+                            <el-tooltip :content="courseDetail.title" placement="top" effect="dark">
+                                <span>{{ courseDetail.title }}</span>
+                            </el-tooltip>
+                        </div>
+                        <div class="c_c">
+                            <span>课程类型:</span>
+                            <span v-if="!courseDetail.name">{{ '暂无' }}</span>
+                            <el-tooltip v-else :content="courseDetail.name" placement="top" effect="dark">
+                                <span>{{ courseDetail.name }}</span>
+                            </el-tooltip>
+                        </div>
+                        <div class="c_c">
+                            <span>创建人:</span>
+                            <span>{{ courseDetail.username }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>协作者:</span>
+                            <span v-if="!courseDetail.xieName">{{ '暂无' }}</span>
+                            <el-tooltip v-else :content="courseDetail.xieName" placement="top" effect="dark">
+                                <span>{{ courseDetail.xieName }}</span>
+                            </el-tooltip>
+                        </div>
+                    </div>
+                </div>
+                <div class="page" v-if="checktype == '1'">
+                    <el-button type="primary" size="mini" :disabled="page == 0" @click="setPage('-1')">上一个</el-button>
+                    <div class="p_page"><span>{{ page + 1 }}</span><span>/</span><span>{{ checkJson.courses.length
+                            }}</span>
+                    </div>
+                    <el-button type="primary" size="mini" :disabled="page == (checkJson.courses.length - 1)"
+                        @click="setPage('1')">下一个</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        },
+        issetPage: {
+            type: Boolean,
+            default: false
+        },
+        tid: {
+            type: String
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false,
+            page: 0,
+            isloading: false,
+            courseDetail: {},
+            courseid: ''
+        }
+    },
+    computed: {
+
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+        cJson: {
+            handler(newValue) {
+                if (newValue.answer2 != this.checkJson.answer2) {
+                    this.checkJson = this.depthCopy(newValue)
+                    if (this.checkJson.courses.length) {
+                        this.page = this.checkJson.courses.indexOf(this.courseid)
+                        this.checkJson.answer2 = this.courseid
+                    }
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
+        courseid: {
+            handler(newValue) {
+                if (this.issetPage) {
+                    this.$emit('update:issetPage', false)
+                } else {
+                    this.$emit('getTestWorkByCid', newValue)
+                }
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        setPage(index) {
+            this.$emit('publish2')
+            setTimeout(() => {
+                if (index == '1') {
+                    this.page++
+                } else if (index == '-1') {
+                    this.page--
+                }
+                this.checkJson.answer2 = this.checkJson.courses[this.page]
+                this.courseid = this.checkJson.answer2
+                this.$forceUpdate()
+                this.getCourse(this.checkJson.answer2)
+            }, 500);
+        },
+        openCourse() {
+            top.postMessage({ cid: this.checkJson.answer2, screenType: "3" }, "*");
+        },
+        getCourse(id) {
+            this.isloading = true
+            let params = {
+                cid: id,
+            };
+            this.ajax
+                .get(this.$store.state.api + "getCourseInfoTest", params)
+                .then((res) => {
+                    this.isloading = false
+                    this.courseDetail = res.data[0][0]
+                    this.courseDetail.cover = JSON.parse(this.courseDetail.cover)[0].url
+                })
+                .catch((err) => {
+                    this.isloading = false
+                    console.error(err);
+                });
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+        if (this.checkJson.courses.length) {
+            this.page = this.checkJson.courses.indexOf(this.checkJson.answer2)
+            this.courseid = this.checkJson.answer2
+            this.getCourse(this.checkJson.answer2)
+        }
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}
+
+.choices>.page {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.p_page {
+    margin: 0 10px;
+}
+
+.course {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+}
+
+.course>.banner {
+    width: 200px;
+    height: 120px;
+    border-radius: 5px;
+    overflow: hidden;
+    border: 1px solid #3896fc;
+    box-sizing: border-box;
+    padding: 5px;
+    margin-right: 15px;
+    position: relative;
+}
+
+.isRate {
+    position: absolute;
+    background: #0061FF;
+    width: 70px;
+    height: 30px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 30px;
+    top: 5px;
+    left: 5px;
+}
+
+.course>.banner>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+
+.course>.content {}
+
+.course>.content>.c_c {
+    display: flex;
+    align-items: center;
+}
+
+.course>.content>.c_c+.c_c {
+    margin-top: 5px;
+}
+
+.course>.content>.c_c span:nth-child(1) {}
+
+.course>.content>.c_c span:nth-child(2) {
+    max-width: 250px;
+    overflow: hidden;
+    white-space: nowrap;
+    display: block;
+    text-overflow: ellipsis;
+}
+</style>

+ 141 - 0
src/components/pages/testStudent/view/component/eva.vue

@@ -0,0 +1,141 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box" v-if="checkJson">
+            <div class="title" style="display: flex;">
+                <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000099;margin-top: 5px;">
+            </div>
+            <div class="choices">
+                <div class="score" :class="{active: (checkJson.answer2 || checkJson.answer2 === 0) && (checkJson.answer2 > index || checkJson.answer2 === index)}" @click="score(index)" v-for="(item, index) in (parseInt(checkJson.big) - parseInt(checkJson.small) + 1)" :key="index">{{ parseInt(checkJson.small) + index }}</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+        cJson: {
+            handler(newValue) {
+                if(newValue.answer2 !== this.checkJson.answer2){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        score(index){
+            if(this.checktype == '2'){
+                return
+            }
+            this.checkJson.answer2 = index
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+    width: 90%;
+    margin: 0 auto;
+}
+
+.choices > .score{
+    width: 40px;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 0 20px 10px 0;
+    border-radius: 5px;
+    background: #dee0e3;
+    font-size: 18px;
+    font-weight: bold;
+    color: #fff;
+    cursor: pointer;
+}
+
+.choices > .score.active{
+    background: #65b1ff;
+}
+
+</style>

+ 309 - 179
src/components/pages/testStudent/view/component/file.vue

@@ -30,6 +30,23 @@
             <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail" style="color: #00000099;margin-top: 5px;">
             </div>
             <div class="choices">
+                <div class="uploadBtn" v-if="checktype == 1">
+                    <div class="btn" @click.stop="addImg($event)">
+                        <span>添加本地文件</span>
+                        <input type="file" accept="*" style="display: none" multiple="multiple"
+                            @change="beforeUpload($event)" />
+                    </div>
+                    <div class="btn" @click="openFileBox()">
+                        <span>从资源库添加</span>
+                    </div>
+                    <div class="switch">
+                        <el-switch
+                            active-color="#3681fc"
+                            v-model="isTong">
+                        </el-switch>
+                        <span @click="isTong = !isTong">同步至资源库</span>
+                    </div>
+                </div>
                 <div class="binfo_input">
                     <div class="fileBox" v-if="checkJson.file && checkJson.file.length">
                         <div class="fileC">
@@ -51,14 +68,14 @@
                                 </div>
                             </div>
                         </div>
-                        <div class="btn" @click.stop="openFileBox()" v-if="checktype == 1">
+                        <!-- <div class="btn" @click.stop="openFileBox()" v-if="checktype == 1">
                             <span>点击添加文件</span>
                             <input type="file" accept="*" style="display: none" @change="beforeUpload($event)" />
-                        </div>
+                        </div> -->
                     </div>
-                    <div class="uploadQ" @click.stop="openFileBox()" v-else-if="checktype == 1">
-                        <span>点击添加文件</span>
-                        <input type="file" accept="*" style="display: none" @change="beforeUpload($event)" />
+                    <div class="uploadQ" v-else-if="checktype == 1">
+                        <span>填写者上传区</span>
+                        <!-- <input type="file" accept="*" style="display: none" @change="beforeUpload($event)" /> -->
                     </div>
                     <div class="uploadQ" v-else>
                         <span>暂无添加附件</span>
@@ -68,7 +85,7 @@
                             <div class="lbox">
                                 <img src="../../../../../assets/loading.gif" />上传中,请稍后
                             </div>
-                            <div style="margin-bottom: 10px">
+                            <!-- <div style="margin-bottom: 10px">
                                 <span>{{
                                     isFinishSize
                                 }}M</span>
@@ -80,7 +97,7 @@
                             <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
                                 ? progress
                                 : 0
-                                " style="width: 80%"></el-progress>
+                                " style="width: 80%"></el-progress> -->
                         </div>
                     </div>
                 </div>
@@ -179,6 +196,7 @@ export default {
             option: {
                 1: { name: '附件' },
             },
+            userid: this.$route.query.userid,
             checkJson: undefined,
             progress: 0,
             isFinishSize: 0,
@@ -194,6 +212,7 @@ export default {
             dialogVisiblefile: false,
             wurl: "",
             isloading: false,
+            isTong: false
         }
     },
     watch: {
@@ -203,6 +222,24 @@ export default {
             },
             deep: true
         },
+        cJson: {
+            handler(newValue,oldVal) {
+                if(newValue.file && this.checkJson.file && newValue.file.length !== this.checkJson.file.length){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }else if(newValue.file && !this.checkJson.file){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }else if(!newValue.file && this.checkJson.file){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }else if (JSON.stringify(newValue) !== JSON.stringify(oldVal)) {
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
     },
     methods: {
         depthCopy(s) {
@@ -228,177 +265,235 @@ export default {
         },
         beforeUpload(event, type) {
             // const loading = this.openLoading();
-            var file = event.target.files[0];
-            var credentials = {
-                accessKeyId: "AKIATLPEDU37QV5CHLMH",
-                secretAccessKey: "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",
-            }; //秘钥形式的登录上传
-            window.AWS.config.update(credentials);
-            window.AWS.config.region = "cn-northwest-1"; //设置区域
-
-            var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
-            var _this = this;
-
-            _this.progress = 0;
-            _this.proVisible = true;
-            _this.isFinishSize = 0;
-            _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
-            _this.$forceUpdate();
-            if (file) {
-                var params = {
-                    Key:
-                        file.name.split(".")[0] +
-                        new Date().getTime() +
-                        "." +
-                        file.name.split(".")[file.name.split(".").length - 1],
-                    ContentType: file.type,
-                    Body: file,
-                    "Access-Control-Allow-Credentials": "*",
-                    ACL: "public-read",
-                }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
-                var options = {
-                    partSize: 2048 * 1024 * 1024,
-                    queueSize: 2,
-                    leavePartsOnError: true,
-                };
-                bucket
-                    .upload(params, options)
-                    .on("httpUploadProgress", function (evt) {
-                        //这里可以写进度条
-                        // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
-                        _this.progress = parseInt((evt.loaded / evt.total) * 100);
-                        _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
-                        _this.$forceUpdate();
-                    })
-                    .send(function (err, data) {
-                        _this.progress = 100;
-                        _this.isFinishSize = _this.isAllSize;
-                        _this.$forceUpdate();
-                        setTimeout(() => {
-                            _this.proVisible = false;
-                            _this.$forceUpdate();
-                        }, 1000);
-                        // loading.close();
-                        if (err) {
-                            _this.$message.error("上传失败");
-                        } else {
-                            let _type = 2;
-                            var imgA = [
-                                "png",
-                                "jpg",
-                                "jpeg",
-                                "bmp",
-                                "gif",
-                                "webp",
-                                "psd",
-                                "svg",
-                                "tiff",
-                            ];
-                            var fileA = [
-                                "DOC",
-                                "DOCX",
-                                "DOCM",
-                                "DOTM",
-                                "DOTX",
-                                "PPTX",
-                                "PPSX",
-                                "PPT",
-                                "PPS",
-                                "PPTM",
-                                "POTM",
-                                "PPAM",
-                                "POTX",
-                                "PPSM",
-                                "XLSX",
-                                "XLS",
-                            ];
-                            var videoA = [
-                                "AVI",
-                                "NAVI",
-                                "MPEG",
-                                "ASF",
-                                "MOV",
-                                "WMV",
-                                "3GP",
-                                "RM",
-                                "RMVB",
-                                "FLV",
-                                "F4V",
-                                "H.264",
-                                "H.265",
-                                "REAL VIDEO",
-                                "MKV",
-                                "WebM",
-                                "HDDVD",
-                                "MP4",
-                                "MPG",
-                                "M4V",
-                                "MGV",
-                                "OGV",
-                                "QTM",
-                                "STR",
-                                "AMC",
-                                "DVX",
-                                "EVO",
-                                "DAT",
-                                "OGG",
-                                "OGM",
-                            ];
-                            if (
-                                fileA.indexOf(
-                                    data.Location.split(".")[
-                                        data.Location.split(".").length - 1
-                                    ].toLocaleUpperCase()
-                                ) != -1
-                            ) {
-                                _type = 1; //word 文件
-                            } else if (
-                                videoA.indexOf(
-                                    data.Location.split(".")[
-                                        data.Location.split(".").length - 1
-                                    ].toLocaleUpperCase()
-                                ) != -1
-                            ) {
-                                _type = 2; //视频
-                            } else if (
-                                imgA.indexOf(
-                                    data.Location.split(".")[
-                                        data.Location.split(".").length - 1
-                                    ].toLocaleLowerCase()
-                                ) != -1
-                            ) {
-                                _type = 3; //图片
-                            } else if (
-                                'pdf'.indexOf(
-                                    data.Location.split(".")[
-                                        data.Location.split(".").length - 1
-                                    ].toLocaleLowerCase()
-                                ) != -1
-                            ) {
-                                _type = 4; //pdf
-                            } else {
-                                _type = 5; //文件
-                            }
-                            if (_this.checkJson.file) {
-                                _this.checkJson.file.push({
-                                    name: file.name,
-                                    url: data.Location,
-                                    type: _type,
-                                });
+            let file = "";
+            let cfindex2 = 0;
+            for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
+                file = event.target.files[cfindex];
+
+                var credentials = {
+                    accessKeyId: "AKIATLPEDU37QV5CHLMH",
+                    secretAccessKey: "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",
+                }; //秘钥形式的登录上传
+                window.AWS.config.update(credentials);
+                window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+                var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+                var _this = this;
+
+                // _this.progress = 0;
+                _this.proVisible = true;
+                // _this.isFinishSize = 0;
+                // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
+                let _name = file.name
+                let size = file.size;
+                _this.$forceUpdate();
+                if (file) {
+                    var params = {
+                        Key:
+                            file.name.split(".")[0] +
+                            new Date().getTime() +
+                            "." +
+                            file.name.split(".")[file.name.split(".").length - 1],
+                        ContentType: file.type,
+                        Body: file,
+                        "Access-Control-Allow-Credentials": "*",
+                        ACL: "public-read",
+                    }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+                    var options = {
+                        partSize: 2048 * 1024 * 1024,
+                        queueSize: 2,
+                        leavePartsOnError: true,
+                    };
+                    bucket
+                        .upload(params, options)
+                        .on("httpUploadProgress", function (evt) {
+                            //这里可以写进度条
+                            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+                            // _this.progress = parseInt((evt.loaded / evt.total) * 100);
+                            // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
+                            // _this.$forceUpdate();
+                        })
+                        .send(function (err, data) {
+                            cfindex2++;
+
+                            // _this.progress = 100;
+                            // _this.isFinishSize = _this.isAllSize;
+                            // _this.$forceUpdate();
+                            // setTimeout(() => {
+                            //     _this.proVisible = false;
+                            //     _this.$forceUpdate();
+                            // }, 1000);
+                            setTimeout(() => {
+                                if (
+                                    cfindex2 == event.target.files.length ||
+                                    cfindex2 > event.target.files.length
+                                ) {
+                                    _this.proVisible = false;
+                                }
+                            }, 1000);
+                            // loading.close();
+                            if (err) {
+                                _this.$message.error("上传失败");
                             } else {
-                                _this.checkJson.file = []
-                                _this.checkJson.file.push({
-                                    name: file.name,
-                                    url: data.Location,
-                                    type: _type,
-                                });
+                                let _type = 2;
+                                var imgA = [
+                                    "png",
+                                    "jpg",
+                                    "jpeg",
+                                    "bmp",
+                                    "gif",
+                                    "webp",
+                                    "psd",
+                                    "svg",
+                                    "tiff",
+                                ];
+                                var fileA = [
+                                    "DOC",
+                                    "DOCX",
+                                    "DOCM",
+                                    "DOTM",
+                                    "DOTX",
+                                    "PPTX",
+                                    "PPSX",
+                                    "PPT",
+                                    "PPS",
+                                    "PPTM",
+                                    "POTM",
+                                    "PPAM",
+                                    "POTX",
+                                    "PPSM",
+                                    "XLSX",
+                                    "XLS",
+                                ];
+                                var videoA = [
+                                    "AVI",
+                                    "NAVI",
+                                    "MPEG",
+                                    "ASF",
+                                    "MOV",
+                                    "WMV",
+                                    "3GP",
+                                    "RM",
+                                    "RMVB",
+                                    "FLV",
+                                    "F4V",
+                                    "H.264",
+                                    "H.265",
+                                    "REAL VIDEO",
+                                    "MKV",
+                                    "WebM",
+                                    "HDDVD",
+                                    "MP4",
+                                    "MPG",
+                                    "M4V",
+                                    "MGV",
+                                    "OGV",
+                                    "QTM",
+                                    "STR",
+                                    "AMC",
+                                    "DVX",
+                                    "EVO",
+                                    "DAT",
+                                    "OGG",
+                                    "OGM",
+                                ];
+                                if (
+                                    fileA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleUpperCase()
+                                    ) != -1
+                                ) {
+                                    _type = 1; //word 文件
+                                } else if (
+                                    videoA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleUpperCase()
+                                    ) != -1
+                                ) {
+                                    _type = 2; //视频
+                                } else if (
+                                    imgA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleLowerCase()
+                                    ) != -1
+                                ) {
+                                    _type = 3; //图片
+                                } else if (
+                                    'pdf'.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleLowerCase()
+                                    ) != -1
+                                ) {
+                                    _type = 4; //pdf
+                                } else {
+                                    _type = 5; //文件
+                                }
+                                if (_this.checkJson.file) {
+                                    _this.checkJson.file.push({
+                                        name: _name,
+                                        url: data.Location,
+                                        type: _type,
+                                    });
+                                } else {
+                                    _this.checkJson.file = []
+                                    _this.checkJson.file.push({
+                                        name: _name,
+                                        url: data.Location,
+                                        type: _type,
+                                    });
+                                }
+                                if(_this.isTong){
+                                    let _file = {
+                                        name: _name,
+                                        url: data.Location,
+                                        type: _type,
+                                        size: _this.formatFileSize(size)
+                                    }
+                                    _this.addSource(_file)
+                                }
+                                _this.$forceUpdate();
+
+                                _this.$emit('update:cJson', _this.checkJson)
+                                console.log(_this.checkJson);
+                                console.log(data.Location);
                             }
-                            _this.$forceUpdate();
-
-                            console.log(_this.checkJson);
-                            console.log(data.Location);
-                        }
-                    });
+                        });
+                }
+            }
+        },
+        addSource(file) {
+            let params = [{
+                n: encodeURIComponent(file.name),
+                file: encodeURIComponent(file.url),
+                type: file.type,
+                pid: '0',
+                uid: this.userid,
+                size: file.size,
+            }];
+            this.ajax
+                .post(this.$store.state.api + "addSourceFile", params)
+                .then((res) => {
+                    // if (_ctype == 2) {
+                    //     this.$message.success('上传成功');
+                    // }
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        formatFileSize(bytes) {
+            if (bytes < 1024) {
+                return bytes + "B";
+            } else if (bytes < 1048576) {
+                return (bytes / 1024).toFixed(2) + "KB";
+            } else if (bytes < 1073741824) {
+                return (bytes / 1048576).toFixed(2) + "MB";
+            } else {
+                return (bytes / 1073741824).toFixed(2) + "GB";
             }
         },
         downloadFile(f) {
@@ -478,6 +573,7 @@ export default {
         },
         delFile(index) {
             this.checkJson.file.splice(index, 1)
+            this.$emit('update:cJson', this.checkJson)
             this.$forceUpdate();
         },
         uploadCourse() {
@@ -576,13 +672,13 @@ export default {
 }
 
 .binfo_input>.uploadQ {
-    border: 1.5px dashed #dfdfdf;
+    /* border: 1.5px dashed #d1fdfdf; */
     height: 120px;
     width: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
-    background: rgb(249, 250, 251);
+    background: #f9fafb;
     color: rgb(124, 124, 124);
     border-radius: 5px;
     cursor: pointer;
@@ -767,4 +863,38 @@ export default {
 .c_input>>>.el-input__inner {
     padding: 0 5px;
     text-align: right;
-}</style>
+}
+
+.uploadBtn {
+    display: flex;
+    margin-bottom: 10px;
+    align-items: center;
+    width: 100%;
+    justify-content: flex-end;
+}
+
+.uploadBtn .btn {
+    display: flex;
+    cursor: pointer;
+    align-items: center;
+    height: 30px;
+    padding: 0 8px;
+    background: #fff;
+    color: #3681FC;
+    border: 1px solid #3681FC;
+    box-sizing: border-box;
+    border-radius: 4px;
+    font-size: 14px;
+    align-items: center;
+    margin-right: 10px;
+}
+
+.uploadBtn .switch{
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+}
+.uploadBtn .switch > span{
+    margin-left: 5px;
+}
+</style>

+ 9 - 0
src/components/pages/testStudent/view/component/gap.vue

@@ -74,6 +74,15 @@ export default {
             },
             deep: true
         },
+        cJson: {
+            handler(newValue) {
+                if(newValue.answer2 !== this.checkJson.answer2){
+                    this.checkJson = this.depthCopy(newValue)
+                    this.$forceUpdate()
+                }
+            },
+            deep: true
+        },
     },
     directives: {
         autoHeight: {

+ 96 - 28
src/components/pages/testStudent/view/component/topic.vue

@@ -10,19 +10,35 @@
     <div class="c_body" v-if="isloading">
       <div v-if="type == 3">
         <div v-for="(item, index) in checkArray[page].array" :key="index" class="check_box">
-          <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)" :style="{fontSize:item.ttype == 1 && '16px'}">{{ selectType(item, index) }}</div>
+          <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)"
+            :style="{ fontSize: item.ttype == 1 && '16px' }">{{ selectType(item, index) }}</div>
           <div v-if="item.ttype == 1" class="answerBox">
-            <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
-            <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
-            <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
+            <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see"
+              :isTeacher="isTeacher"></choiceV>
+            <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see"
+              :isTeacher="isTeacher"></gapV>
+            <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see"
+              :isTeacher="isTeacher"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 6"
+              :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 7" :see="see"
+              :isTeacher="isTeacher"></evaV>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
-            <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)" :style="{fontSize:item2.ttype == 1 && '16px'}">{{ selectType(item2, index2) }}</div>
+            <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)"
+              :style="{ fontSize: item2.ttype == 1 && '16px' }">{{ selectType(item2, index2) }}</div>
             <div v-if="item2.ttype == 1" class="answerBox">
-              <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
-              <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
-              <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
+              <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1"
+                :see="see" :isTeacher="isTeacher"></choiceV>
+              <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3"
+                :see="see" :isTeacher="isTeacher"></gapV>
+              <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5"
+                :see="see" :isTeacher="isTeacher"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 6"
+                :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 7"
+                :see="see" :isTeacher="isTeacher"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -30,19 +46,35 @@
       </div>
       <div v-else>
         <div v-for="(item, index) in checkArray" :key="index" class="check_box">
-          <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)" :style="{fontSize:item.ttype == 1 && '16px'}">{{ selectType(item, index) }}</div>
+          <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)"
+            :style="{ fontSize: item.ttype == 1 && '16px' }">{{ selectType(item, index) }}</div>
           <div v-if="item.ttype == 1" class="answerBox">
-            <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
-            <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
-            <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
+            <choiceV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-if="item.type == 1" :see="see"
+              :isTeacher="isTeacher"></choiceV>
+            <gapV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 3" :see="see"
+              :isTeacher="isTeacher"></gapV>
+            <fileV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 5" :see="see"
+              :isTeacher="isTeacher"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 6"
+              :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" :checktype="checktype" v-else-if="item.type == 7" :see="see"
+              :isTeacher="isTeacher"></evaV>
             <!-- <span v-else>暂未设置题目</span> -->
           </div>
           <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
-            <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)" :style="{fontSize:item2.ttype == 1 && '16px'}">{{ selectType(item2, index2) }}</div>
+            <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)"
+              :style="{ fontSize: item2.ttype == 1 && '16px' }">{{ selectType(item2, index2) }}</div>
             <div v-if="item2.ttype == 1" class="answerBox">
-              <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1" :see="see" :isTeacher="isTeacher"></choiceV>
-              <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3" :see="see" :isTeacher="isTeacher"></gapV>
-              <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5" :see="see" :isTeacher="isTeacher"></fileV>
+              <choiceV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-if="item2.type == 1"
+                :see="see" :isTeacher="isTeacher"></choiceV>
+              <gapV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 3"
+                :see="see" :isTeacher="isTeacher"></gapV>
+              <fileV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 5"
+                :see="see" :isTeacher="isTeacher"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 6"
+                :see="see" :isTeacher="isTeacher" @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :issetPage.sync="issetPage" :tid="tid"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" :checktype="checktype" v-else-if="item2.type == 7"
+                :see="see" :isTeacher="isTeacher"></evaV>
               <!-- <span v-else>暂未设置题目</span> -->
             </div>
           </div>
@@ -54,7 +86,8 @@
         <div class="p_page">
           <span>{{ page + 1 }}</span><span>/</span><span>{{ checkArray.length }}</span>
         </div>
-        <el-button type="primary" size="mini" :disabled="page == checkArray.length - 1" @click="setPage('1')">下一页</el-button>
+        <el-button type="primary" size="mini" :disabled="page == checkArray.length - 1"
+          @click="setPage('1')">下一页</el-button>
       </div>
     </div>
   </div>
@@ -64,6 +97,8 @@
 import choiceV from "./choice.vue";
 import gapV from './gap.vue';
 import fileV from './file.vue';
+import courseV from './course.vue';
+import evaV from './eva.vue';
 export default {
   props: {
     cJson: {
@@ -72,7 +107,7 @@ export default {
     title: {
       type: String,
     },
-    brief:{
+    brief: {
       type: String
     },
     checktype: {
@@ -90,12 +125,22 @@ export default {
     name: {
       type: String,
       default: ''
+    },
+    tid: {
+      type: String,
+      default: ''
+    },
+    gcourseid: {
+      type: String,
+      default: ''
     }
   },
   components: {
     choiceV,
     gapV,
-    fileV
+    fileV,
+    courseV,
+    evaV
   },
   data() {
     return {
@@ -108,8 +153,11 @@ export default {
         3: "问答题",
         4: "添加文档",
         5: "附件",
+        6: "课程",
+        7: "评分",
       },
       isloading: true,
+      issetPage: false
     };
   },
   computed: {
@@ -174,19 +222,21 @@ export default {
         console.log(newVal);
         console.log(oldVal);
         this.checkArray = this.setJson(this.depthCopy(newVal));
+        this.$forceUpdate()
       },
       deep: true,
     },
   },
   methods: {
-    setPage(index){
+    setPage(index) {
+      this.issetPage = true
       this.isloading = false
-      if(index == '1'){
+      if (index == '1') {
         this.page++
-      }else if(index == '-1'){
+      } else if (index == '-1') {
         this.page--
       }
-      setTimeout(()=>{
+      setTimeout(() => {
         this.isloading = true
       }, 50)
       this.$forceUpdate()
@@ -201,13 +251,21 @@ export default {
         let checkArray = _json.filter((item) => {
           if (item.array) {
             item.array = item.array.filter((item2) => {
-              if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
+              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item.type != 7) {
                 item2.json.answer2 = [];
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
+                item2.json.answer2 = this.gcourseid ? this.gcourseid : item2.json.courses[0];
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.json.answer2 !== 0 && item2.type == 7) {
+                item2.json.answer2 = '';
               }
               if (item2.array) {
                 item2.array = item2.array.filter((item3) => {
-                  if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
+                  if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7) {
                     item3.json.answer2 = [];
+                  } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 6) {
+                    item3.json.answer2 = this.gcourseid ? this.gcourseid : item3.json.courses[0];
+                  } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.json.answer2 !== 0 && item3.type == 7) {
+                    item3.json.answer2 = '';
                   }
                   return item3;
                 });
@@ -217,8 +275,12 @@ export default {
               );
             });
           }
-          if (item.ttype == 1 && item.json && !item.json.answer2) {
+          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7) {
             item.json.answer2 = [];
+          } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 6) {
+            item.json.answer2 = this.gcourseid ? this.gcourseid : item.json.courses[0];
+          } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.json.answer2 !== 0 && item.type == 7) {
+            item.json.answer2 = '';
           }
           console.log(item.array);
           return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
@@ -229,6 +291,12 @@ export default {
         return [];
       }
     },
+    getTestWorkByCid(cid){
+      this.$emit('getTestWorkByCid', cid)
+    },
+    publish2(){
+      this.$emit('publish2')
+    }
   },
   mounted() {
     this.checkArray = this.setJson(this.depthCopy(this.cJson));
@@ -254,7 +322,7 @@ export default {
   margin: 10px auto;
 }
 
-.c_box_brief{
+.c_box_brief {
   width: 90%;
   text-align: left;
   font-size: 14px;
@@ -303,7 +371,7 @@ export default {
   padding: 15px 0;
 }
 
-.check_box_xia + .check_box_xia {
+.check_box_xia+.check_box_xia {
   border-top: 1px solid #eee;
 }
 

+ 256 - 46
src/components/pages/testStudent/view/preview.vue

@@ -1,32 +1,32 @@
 <template>
-  <div class="pb_content" style="background: #F0F2F5;" v-loading="loading">
+  <div class="pb_content" style="background: #F0F2F5;" v-loading="loading || isloading">
     <div class="pb_content_body" style="position: relative; margin: 0">
       <div class="right">
         <div class="courseTop">
           <div class="stepsNav">
             <el-breadcrumb separator-class="el-icon-arrow-right">
               <el-breadcrumb-item :to="{
-                path:
-                  '/testPerson?userid=' +
-                  userid +
-                  '&oid=' +
-                  oid +
-                  '&org=' +
-                  org +
-                  '&role=' +
-                  role,
-              }"  v-if="type == 3">个人中心</el-breadcrumb-item>
+    path:
+      '/testPerson?userid=' +
+      userid +
+      '&oid=' +
+      oid +
+      '&org=' +
+      org +
+      '&role=' +
+      role,
+  }" v-if="type == 3">个人中心</el-breadcrumb-item>
               <el-breadcrumb-item :to="{
-                path:
-                  '/testStudent?userid=' +
-                  userid +
-                  '&oid=' +
-                  oid +
-                  '&org=' +
-                  org +
-                  '&role=' +
-                  role,
-              }"  v-else>表单中心</el-breadcrumb-item>
+    path:
+      '/testStudent?userid=' +
+      userid +
+      '&oid=' +
+      oid +
+      '&org=' +
+      org +
+      '&role=' +
+      role,
+  }" v-else>表单中心</el-breadcrumb-item>
               <el-breadcrumb-item>
                 <span style="color: rgb(15, 126, 255)">{{ title }}</span>
               </el-breadcrumb-item>
@@ -38,12 +38,13 @@
           <div class="edit_top">
             <div class="op_btn">
               <el-button type="primary" size="small" @click="refresh" v-if="isReset">刷新</el-button>
-              <el-button type="primary" size="small" @click="reset" >重置</el-button>
+              <el-button type="primary" size="small" @click="reset">重置</el-button>
               <el-button type="primary" size="small" @click="save" v-if="type != 3">保存</el-button>
               <el-button type="primary" size="small" @click="publish">提交</el-button>
             </div>
           </div>
-          <topicVue :cJson="cJson" :title="title" :brief="brief" ref="topicVue" v-if="!loading"></topicVue>
+          <topicVue :cJson.sync="cJson" :title="title" :brief="brief" ref="topicVue" v-if="!loading"
+            @getTestWorkByCid="getTestWorkByCid" @publish2="publish2" :tid="tid" :gcourseid="gcourseid"></topicVue>
         </div>
       </div>
     </div>
@@ -65,6 +66,7 @@ export default {
       cid: this.$route.query.cid,
       tid: this.$route.query.tid,
       type: this.$route.query.type,
+      updateType: this.$route.query.type,
       steps: 1,
       title: "",
       brief: "",
@@ -75,6 +77,9 @@ export default {
       loading: false,
       look: "",
       isReset: false,
+      isloading: false,
+      courseid: '',
+      gcourseid: this.$route.query.courseid
     }
   },
   methods: {
@@ -87,7 +92,7 @@ export default {
           type: "warning",
         })
         .then(() => {
-          if(this.type == 3){
+          if (this.type == 3) {
             this.goTo(
               "/testPerson?userid=" +
               this.userid +
@@ -98,7 +103,7 @@ export default {
               "&role=" +
               this.role
             );
-          }else{
+          } else {
             this.goTo(
               "/testStudent?userid=" +
               this.userid +
@@ -126,13 +131,21 @@ export default {
           type: "warning",
         })
         .then(() => {
-          this.cJson = JSON.parse(JSON.stringify(this.cJson2));
-          this.loading = true
-          this.isReset = false
-          setTimeout(() => {
-            this.loading = false
-          }, 0);
-          this.$forceUpdate()
+          if(this.tid){
+            this.deleteTest(this.tid)
+          }else{
+            if(this.courseid){
+              this.cJson = this.setCourseid(JSON.parse(JSON.stringify(this.cJson2)));
+            }else{
+              this.cJson = JSON.parse(JSON.stringify(this.cJson2));
+            }
+            this.loading = true
+            this.isReset = false
+            setTimeout(() => {
+              this.loading = false
+            }, 0);
+            this.$forceUpdate()
+          }
         })
         .catch(() => {
 
@@ -146,13 +159,21 @@ export default {
           type: "warning",
         })
         .then(() => {
-          this.cJson = JSON.parse(JSON.stringify(this.cJson2));
-          this.loading = true
-          this.isReset = false
-          setTimeout(() => {
-            this.loading = false
-          }, 0);
-          this.$forceUpdate()
+          if(this.tid){
+            this.deleteTest(this.tid)
+          }else{
+            if(this.courseid){
+              this.cJson = this.setCourseid(JSON.parse(JSON.stringify(this.cJson2)));
+            }else{
+              this.cJson = JSON.parse(JSON.stringify(this.cJson2));
+            }
+            this.loading = true
+            this.isReset = false
+            setTimeout(() => {
+              this.loading = false
+            }, 0);
+            this.$forceUpdate()
+          }
         })
         .catch(() => {
 
@@ -222,6 +243,84 @@ export default {
           console.error(err);
         });
     },
+    getTestWorkByCid(courseid) {
+      this.isloading = true
+      this.courseid = courseid
+      let params = {
+        cid: this.cid,
+        uid: this.userid,
+      };
+      let _courseid = courseid
+      this.ajax
+        .get(this.$store.state.api + "selectTestWorksCid", params)
+        .then((res) => {
+          if (res.data[0].length) {
+            console.log(res.data[0]);
+            let rData = res.data[0]
+            this.tid = ''
+            aa: for (var i = 0; i < rData.length; i++) {
+              let rDataJson = this.JSONSetting(JSON.parse(rData[i].courseJson))
+              let _json = JSON.parse(rData[i].courseJson)
+              for (var j = 0; j < rDataJson.length; j++) {
+                let _param = rDataJson[j]
+                if (_param.type == 6 && _param.json.answer2 && _param.json.answer2 == _courseid) {
+                  console.log(_json);
+                  this.cJson = _json
+                  let cJson = this.setJSON(JSON.parse(JSON.stringify(this.cJson)))
+                  let cJson2 = this.setJSON(this.setJson2(JSON.parse(JSON.stringify(this.cJson2))))
+                  if (JSON.stringify(cJson) != JSON.stringify(cJson2)) {
+                    this.isReset = true
+                  }
+                  this.tid = rData[i].id
+                  this.$forceUpdate()
+                  break aa;
+                }
+              }
+            }
+            if (!this.tid) {
+              this.cJson = this.setJSON(this.setCourseid(JSON.parse(JSON.stringify(this.cJson2))))
+            }
+          }else{
+            this.tid = ''
+            this.cJson = this.setJSON(this.setCourseid(JSON.parse(JSON.stringify(this.cJson2))))
+          }
+          this.$forceUpdate()
+          this.isloading = false
+        })
+        .catch((err) => {
+          this.isloading = false
+          console.error(err);
+        });
+    },
+    JSONSetting(json) {
+      let _json = json
+      let array = []
+      _json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json) {
+              array.push(item2)
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json) {
+                  array.push(item3)
+                }
+                return item3;
+              });
+            }
+            return item2;
+          });
+        }
+        if (item.ttype == 1 && item.json) {
+          array.push(item)
+        }
+        console.log(item.array);
+        return item;
+      });
+      console.log(array);
+      return array;
+    },
     setJSON(json) {
       return json.filter((item) => {
         if (item.array) {
@@ -283,6 +382,50 @@ export default {
       console.log(checkArray);
       return checkArray;
 
+    },
+    setCourseid(json) {
+      let _json = json;
+      // this.type = _json[0].ttype;
+      let checkArray = _json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item2.type != 7) {
+              item2.json.answer2 = [];
+            }else if(item2.type == 6){
+              item2.json.answer2 = this.courseid ? this.courseid : '';
+            }else if(item2.type == 7){
+              item2.json.answer2 = '';
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7) {
+                  item3.json.answer2 = [];
+                }else if(item3.type == 6){
+                  item3.json.answer2 = this.courseid ? this.courseid : '';
+                }else if(item3.type == 7){
+                  item3.json.answer2 = '';
+                }
+                return item3;
+              });
+            }
+            return (
+              (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
+            );
+          });
+        }
+        if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 6 && item.type != 7) {
+          item.json.answer2 = [];
+        }else if(item.type == 6){
+          item.json.answer2 = this.courseid ? this.courseid : '';
+        }else if(item.type == 7){
+          item.json.answer2 = '';
+        }
+        console.log(item.array);
+        return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
+      });
+      console.log(checkArray);
+      return checkArray;
+
     },
     getData() {
       this.loading = true
@@ -306,9 +449,9 @@ export default {
           }
           console.log(this.testType);
           this.look = res.data[0][0].look
-          if(this.type == 3){
+          if (this.type == 3) {
             this.getTestWorks2()
-          }else{
+          } else {
             this.getTestWorks()
           }
           this.$forceUpdate();
@@ -355,17 +498,17 @@ export default {
       console.log(cjson);
       let params = [
         {
-          uid: (this.type == 3 && this.tid) ? this.tid : this.userid,
+          uid: (this.tid) ? this.tid : this.userid,
           cid: this.cid,
           cjson: encodeURIComponent(JSON.stringify(cjson)),
           type: '2',
         },
       ];
       this.ajax
-        .post(this.$store.state.api + ((this.type == 3&& this.tid) ? "addTestWorks2" : "addTestWorks"), params)
+        .post(this.$store.state.api + ((this.tid) ? "addTestWorks2" : "addTestWorks"), params)
         .then((res) => {
           this.$message.success('提交成功')
-          if(this.type == 3){
+          if (this.type == 3) {
             this.goTo(
               "/testPerson?userid=" +
               this.userid +
@@ -376,7 +519,7 @@ export default {
               "&role=" +
               this.role
             );
-          }else{
+          } else {
             this.goTo(
               "/testStudent?userid=" +
               this.userid +
@@ -394,7 +537,74 @@ export default {
           console.error(err);
         });
     },
-
+    publish2() {
+      this.isloading = true
+      let cjson = this.$refs['topicVue'].checkArray
+      let _cjson = this.JSONSetting(JSON.parse(JSON.stringify(cjson)));
+      let pan = this.panJSON(_cjson)
+      if(!pan){
+        setTimeout(() => {
+            this.isloading = false
+          }, 500);
+        return
+      }
+      console.log(cjson);
+      let params = [
+        {
+          uid: (this.tid) ? this.tid : this.userid,
+          cid: this.cid,
+          cjson: encodeURIComponent(JSON.stringify(cjson)),
+          type: '2',
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + ((this.tid) ? "addTestWorks2" : "addTestWorks"), params)
+        .then((res) => {
+          this.$message.success('保存成功')
+          setTimeout(() => {
+            this.isloading = false
+          }, 500);
+        })
+        .catch((err) => {
+          this.$message.error("网络不佳");
+          this.isloading = false
+          console.error(err);
+        });
+    },
+    panJSON(array){
+      var pan = 0
+      for(var i = 0; i < array.length; i++){
+        if(array[i].type != 6){
+          let param = array[i].json
+          if(array[i].type == 5 && param.file && param.file.length > 0){
+            pan++
+          }else if(param.answer2.length || typeof(param.answer2) == 'number'){
+            pan++
+          }
+        }
+      }
+      if(pan > 0){
+        return true
+      }else {
+        return false
+      }
+    },
+    deleteTest(tid) {
+      let _this = this;
+      let params = [
+        {
+          tid: tid
+        }
+      ];
+      _this.ajax
+        .post(_this.$store.state.api + "deleteTestCourseWorks", params)
+        .then(res => {
+          this.getTestWorkByCid(this.courseid)
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    }
   },
   mounted() {
     this.getData();

+ 39 - 1
src/router/index.js

@@ -68,6 +68,7 @@ import tcData from '@/components/pages/tencent/data'
 import tcSchool from '@/components/pages/tencent/school'
 import tcStudent from '@/components/pages/tencent/student'
 import tcTeacher from '@/components/pages/tencent/teacher'
+import teacher from '@/components/pages/sz/teacher'
 import tcNotice from '@/components/pages/tencent/notice'
 import studioCourse from '@/components/pages/studio/course'
 import studioAddCourse from '@/components/pages/studio/addCourse'
@@ -87,6 +88,7 @@ import courseTypeAna from '@/components/pages/myReport/components/courseTypeAna'
 import toolTypeAna from '@/components/pages/myReport/components/toolTypeAna'
 import mrEva from '@/components/pages/myReport/components/mrEva'
 import inviteLogin from '@/components/pages/inviteLogin/inviteLogin'
+import inviteLoginSZ from '@/components/pages/inviteLoginSZ/inviteLogin'
 import stReport from '@/components/pages/components/stReport'
 import classReport from '@/components/pages/components/classReport'
 import courseReport from '@/components/pages/components/courseReport'
@@ -102,6 +104,8 @@ import dataBoard from '@/components/pages/dataBoard'
 import dataBoardSies from '@/components/pages/dataBoardSies'
 import dataBoardNew from '@/components/pages/dataBoardNew'
 import dataBoardTest from '@/components/pages/dataBoardTest'
+import dataBoardCity from '@/components/pages/sz/dataBoardCity'
+import dataBoardArea from '@/components/pages/sz/dataBoardArea'
 import addSynergyCourse from '@/components/pages/synergyCourse/addCourse'
 import synergyCourse from '@/components/pages/synergyCourse/course'
 import test from '@/components/pages/test/index'
@@ -772,6 +776,14 @@ export default new Router({
                 requireAuth: '' // 不需要鉴权
             }
         },
+        {
+            path: '/inviteLoginSZ',
+            name: 'inviteLoginSZ',
+            component: inviteLoginSZ,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },
         {
             path: '/stReport',
             name: 'stReport',
@@ -886,7 +898,9 @@ export default new Router({
         {
             path: '/testPerson',
             component: testPerson,
+            name: 'testPerson',
             meta: {
+                keepAlive: true,
                 requireAuth: '' // 是否需要判断是否登录,这里是需要判断
             }
         },
@@ -1001,6 +1015,30 @@ export default new Router({
             meta: {
                 requireAuth: '' // 是否需要判断是否登录,这里是需要判断
             }
-        }
+        },
+        {
+            path: '/teacher',
+            name: 'teacher',
+            component: teacher,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },
+        {
+            path: '/sz/dataBoardCity',
+            name: 'dataBoardCity',
+            component: dataBoardCity,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },
+        {
+            path: '/sz/dataBoardArea',
+            name: 'dataBoardArea',
+            component: dataBoardArea,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },
     ]
 })

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.