lsc 1 年之前
父節點
當前提交
8f0fb9b259

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: 'Source Han Sans SC', sans-serif;
-    }</style><link href=./static/css/app.8d7b34c6e24c1771e6c100b6bab885dd.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.1fdcaa96d898ba711ec1.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() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.e2da8f1b06ea3d8640484cbb3042ce07.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.e2da8f1b06ea3d8640484cbb3042ce07.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.02708450765739705ad4.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.02708450765739705ad4.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


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

@@ -5357,8 +5357,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>

+ 46 - 25
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" :type='type' @addFile="addFile" ref="fileBox" v-else></fileBox>
+      <fileBox :userid="userid" :typeArray="typeArray" :pid="pid" :type='type' @addFile="addFile" ref="fileBox" v-else>
+      </fileBox>
     </div>
   </div>
 </template>
@@ -123,18 +125,18 @@ export default {
 
           let _pid = this.pid.split('-')
           if (_pid.length === 1 && this.pid != 'wu') {
-            if(pid[_pid[0]]){
+            if (pid[_pid[0]]) {
               pid[_pid[0]].open = true
               this.pid = this.pid + '-0'
-            }else {
+            } 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) {
+          } 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){
+            } else if ((parseInt(_pid[1]) + 1) > this.typeArray[_pid[0]].child.length) {
               this.checkType(_pid[0]);
             }
           }
@@ -147,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() {
@@ -217,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 的引用
@@ -226,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 = ''
       }
@@ -261,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",
@@ -302,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('请输入分类名字');
@@ -368,7 +389,7 @@ export default {
         .catch(() => {
         });
     },
-    addFile(file){
+    addFile(file) {
       this.$emit('addFile', file)
     }
   },
@@ -719,7 +740,7 @@ export default {
   overflow: hidden;
 }
 
-.l_none{
+.l_none {
   color: #00000069;
   width: 100%;
   height: 100%;

+ 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>

+ 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,

+ 14 - 8
src/components/pages/testPerson/test/test.vue

@@ -78,7 +78,7 @@
                             <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="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>
@@ -294,7 +294,7 @@ export default {
             this.type = type;
             this.getWorks();
         },
-        selectTestType() {
+        selectTestType(type) {
             let params = {
                 oid: this.oid
             };
@@ -302,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()
                 })
@@ -625,8 +627,12 @@ export default {
         },
     },
     mounted() {
-        this.selectTestType();
-    }
+        this.selectTestType(1);
+    },
+    activated(){
+        console.log('testperson',1111111111111111111111);
+        this.selectTestType(2);
+    },
 };
 </script>
 

+ 2 - 0
src/router/index.js

@@ -898,7 +898,9 @@ export default new Router({
         {
             path: '/testPerson',
             component: testPerson,
+            name: 'testPerson',
             meta: {
+                keepAlive: true,
                 requireAuth: '' // 是否需要判断是否登录,这里是需要判断
             }
         },

Some files were not shown because too many files changed in this diff