Pārlūkot izejas kodu

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

zengyicheng 1 gadu atpakaļ
vecāks
revīzija
3eed694192

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.441c1258e81baebf26815f3bc741bb75.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.d2a60cf4f8d4649786e6.js></script><script type=text/javascript src=./static/js/app.07aafedc441abc999ce6.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.5c06d18a7f635b5dc11ce2d6207542b3.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.80563afc1c81a8896e85.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.441c1258e81baebf26815f3bc741bb75.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.441c1258e81baebf26815f3bc741bb75.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.5c06d18a7f635b5dc11ce2d6207542b3.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.5c06d18a7f635b5dc11ce2d6207542b3.css.map


BIN
dist/static/img/checka.462e87f.png


BIN
dist/static/img/fengmian.fb0414c.jpg


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.07aafedc441abc999ce6.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.80563afc1c81a8896e85.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.80563afc1c81a8896e85.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/vendor.f1661c5ebfd33221b88f.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/vendor.f1661c5ebfd33221b88f.js.map


+ 11 - 0
package-lock.json

@@ -27,6 +27,7 @@
         "jsmind": "^0.4.8",
         "lamejs": "^1.2.1",
         "pdfjs-dist": "^2.5.207",
+        "qrcodejs2": "^0.0.2",
         "qs": "^6.10.1",
         "relation-graph": "^1.1.0",
         "v-viewer": "^1.6.4",
@@ -13619,6 +13620,11 @@
         "teleport": ">=0.2.0"
       }
     },
+    "node_modules/qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
+    },
     "node_modules/qs": {
       "version": "6.10.1",
       "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.10.1.tgz?cache=0&sync_timestamp=1616385315895&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.10.1.tgz",
@@ -29484,6 +29490,11 @@
       "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
       "dev": true
     },
+    "qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
+    },
     "qs": {
       "version": "6.10.1",
       "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.10.1.tgz?cache=0&sync_timestamp=1616385315895&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.10.1.tgz",

+ 1 - 0
package.json

@@ -29,6 +29,7 @@
     "jsmind": "^0.4.8",
     "lamejs": "^1.2.1",
     "pdfjs-dist": "^2.5.207",
+    "qrcodejs2": "^0.0.2",
     "qs": "^6.10.1",
     "relation-graph": "^1.1.0",
     "v-viewer": "^1.6.4",

+ 2 - 1
src/App.vue

@@ -102,7 +102,8 @@ export default {
         "/scourse",
         "/studentCheckCourse",
         "/tcData",
-        "/studioCourse"
+        "/studioCourse",
+        "/teacherSource",
         // "/eventCenter",
         // "/addRace",
         // "/anliDetail",

BIN
src/assets/icon/source/check.png


BIN
src/assets/icon/source/checka.png


BIN
src/assets/icon/source/fengmian.jpg


BIN
src/assets/icon/source/image.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/components/json2.json


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 189 - 511
src/components/pages/addCourse.vue


+ 257 - 197
src/components/pages/course.vue

@@ -3,54 +3,63 @@
     <div class="pb_head top">
       <div>
         <span class="sub_head">课程管理</span>
-        <span
-          class="subClick"
-          @click="
-            goTo('/works?userid=' + userid + '&oid=' + oid + '&org=' + org+ '&role=' + role)
-          "
-          >评价管理</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="goToCourse()"
-          >添加课程</el-button
-        >
+        <el-button type="primary" class="bgColor" @click="goToCourse()">添加课程</el-button>
       </div>
     </div>
     <div class="reBox">
-        <div class="reTop">
-          <div>分类筛选</div>
-          <div>
-            <!-- @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 class="reTop">
+        <div>分类筛选</div>
+        <div>
+          <!-- @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>
-        <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">{{ item.name }}:</span>
-            <div class="typeCss" v-if="CourseTypeJson[item.id].length">
-              <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'
-                    : ''
+      </div>
+      <div class="pType_box all_choose"  v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
+        <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)">{{ item.name }}:</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>
+                {{ item1.name }}
               </div>
             </div>
           </div>
         </div>
+      </div>
     </div>
     <div class="line"></div>
     <div class="pb_content_body" style="height: 100%">
@@ -63,25 +72,12 @@
               <el-option value="1" label="他人课程"></el-option>
             </el-select>
           </div>
-          <div
-            class="all_choose"
-            v-for="(item, index) in CourseType[0]"
-            :key="index"
-          >
+          <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-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 v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
               </el-option>
             </el-select>
           </div>
@@ -90,14 +86,8 @@
 
         <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
-            >
+            <el-input v-model="courseName" class="student_input" placeholder="请输入课程名称"></el-input>
+            <el-button class="course_button" @click="searchCourse">查询</el-button>
           </div>
         </div>
       </div>
@@ -114,21 +104,18 @@
             <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 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
+              <img :src="item.cover != null && item.cover != ''
+                  ? JSON.parse(item.cover).length > 0
+                    ? JSON.parse(item.cover)[0].url
                     : mr
-                "
-                alt
-              />
+                  : mr
+                " alt />
             </div>
             <!-- <div class="bottom_box">
               <div>{{ item.title }}</div>
@@ -152,32 +139,27 @@
             <div class="three_bottom">
               <div @click="get(item.courseId)" v-if="role == '1'">预览</div>
               <div @click="jump(item.courseId)" v-else>评课</div>
-              <div v-if="(item.userid == userid || item.course_teacher.indexOf(userid) != -1)" @click="goToCourse(item.courseId)">
+              <div v-if="(item.userid == userid || item.course_teacher.indexOf(userid) != -1)"
+                @click="goToCourse(item.courseId)">
                 修改
               </div>
-              <div
-                v-if="groupA == '0'"
-                @click="
-                  goTo(
-                    '/works?cid=' +
-                      item.courseId +
-                      '&userid=' +
-                      userid +
-                      '&oid=' +
-                      oid +
-                      '&org=' +
-                      org +
-                      '&role=' +
-                      role 
-                  )
-                "
-              >
+              <div v-if="groupA == '0'" @click="
+                goTo(
+                  '/works?cid=' +
+                  item.courseId +
+                  '&userid=' +
+                  userid +
+                  '&oid=' +
+                  oid +
+                  '&org=' +
+                  org +
+                  '&role=' +
+                  role
+                )
+                ">
                 报告
               </div>
-              <div
-                v-if="item.isCourseType == 1 || role == '1'"
-                @click="deleteCourse(item.courseId)"
-              >
+              <div v-if="item.isCourseType == 1 || role == '1'" @click="deleteCourse(item.courseId)">
                 删除
               </div>
               <div class="more">
@@ -196,27 +178,14 @@
       </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>
+      <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"
-    >
+    <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>
@@ -226,32 +195,17 @@
         <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"
-    >
+    <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="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
+            <img :src="item.cover != null && item.cover != ''
+                ? JSON.parse(item.cover).length > 0
+                  ? JSON.parse(item.cover)[0].url
                   : mr
-              "
-              alt
-            />
+                : mr
+              " alt />
           </div>
           <div class="bottom_box">
             <div>{{ item.title }}</div>
@@ -260,20 +214,18 @@
           </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 @click="
+              goTo(
+                '/course/addCourse?cid=' +
+                item.courseId +
+                '&userid=' +
+                userid +
+                '&oid=' +
+                oid +
+                '&org=' +
+                org
+              )
+              ">
               编辑
             </div>
           </div>
@@ -329,16 +281,19 @@ export default {
       courseName: "",
       mr: require("../../assets/icon/kc1.png"),
       CourseType: [],
+      CourseType2: [],
       CourseTypeJson: {},
       courseTypeId: {},
       courseTypeSon: [],
       isChoose: 0,
       problemCourse: null, //查看提问的课程
       courseTeam: [],
-      typeE:[],
-      typea:"",
-      typeb:"",
-      typed:"",
+      typeE: [],
+      typea: "",
+      typeb: "",
+      typed: "",
+      pTypeCheck:[],
+      pTypeCheckName: [],
     };
   },
   methods: {
@@ -371,30 +326,64 @@ export default {
     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
+          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.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
         );
       }
       // this.$router.push(path);
@@ -446,7 +435,7 @@ export default {
       this.page = val;
       this.getCourse();
     },
-    init() {},
+    init() { },
     handleClose(done) {
       done();
     },
@@ -462,7 +451,7 @@ export default {
     },
     //uuid生成
     guid() {
-      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(
+      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (
         c
       ) {
         var r = (Math.random() * 16) | 0,
@@ -499,7 +488,11 @@ export default {
       if (typeName == "年级") {
         if (type == 1) {
           if (this.typeE.indexOf(typeid) != -1) {
-            this.typeE.splice(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 != "") {
@@ -509,6 +502,9 @@ export default {
         } 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) {
@@ -519,7 +515,11 @@ export default {
       } else if (typeName == "专栏") {
         if (type == 1) {
           if (this.typeE.indexOf(typeid) != -1) {
-            this.typeE.splice(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 != "") {
@@ -529,6 +529,9 @@ export default {
         } 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) {
@@ -539,7 +542,11 @@ export default {
       } else if (typeName == "栏目") {
         if (type == 1) {
           if (this.typeE.indexOf(typeid) != -1) {
-            this.typeE.splice(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 != "") {
@@ -549,6 +556,9 @@ export default {
         } 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) {
@@ -559,7 +569,11 @@ export default {
       } else if (typeName == "主题") {
         if (type == 1) {
           if (this.typeE.indexOf(typeid) != -1) {
-            this.typeE.splice(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 != "") {
@@ -569,6 +583,9 @@ export default {
         } 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) {
@@ -579,7 +596,11 @@ export default {
       } else if (typeName == "学院") {
         if (type == 1) {
           if (this.typeE.indexOf(typeid) != -1) {
-            this.typeE.splice(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 != "") {
@@ -589,6 +610,9 @@ export default {
         } 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) {
@@ -599,7 +623,11 @@ export default {
       } else if (typeName == "学科") {
         if (type == 1) {
           if (this.typeE.indexOf(typeid) != -1) {
-            this.typeE.splice(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 != "") {
@@ -609,6 +637,9 @@ export default {
         } 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) {
@@ -654,7 +685,7 @@ export default {
       //     }
       //   }
       // }
-      console.log("typea",this.typea);
+      console.log("typea", this.typea);
       this.isLoading = true;
       let params = {
         type: this.groupA,
@@ -752,6 +783,23 @@ export default {
         .get(this.$store.state.api + "selectAllType", params)
         .then((res) => {
           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].name == "年级" ||
+              res.data[0][cti].name == "学科"
+            ) {
+              this.CourseType2[1].id.push(res.data[0][cti].id);
+              this.CourseType2[0].id.push(res.data[0][cti].id);
+            } else if (res.data[0][cti].name == "主题") {
+              this.CourseType2[2].id.push(res.data[0][cti].id);
+            }
+          }
           for (var i = 0; i < res.data[0].length; i++) {
             if (!this.cid) {
               this.courseTypeId[res.data[0][i].id] = [];
@@ -905,9 +953,9 @@ export default {
         .post(this.$store.state.api + "copyCourse", params)
         .then(res => {
           this.page = 1;
-          if(this.role == '1'){
+          if (this.role == '1') {
             this.groupA = '4'
-          }else{
+          } else {
             this.groupA = "0";
           }
           this.clear();
@@ -918,7 +966,7 @@ export default {
     }
   },
   created() {
-    if(this.role == '1'){
+    if (this.role == '1') {
       this.groupA = '4'
     }
     this.page = 1;
@@ -930,28 +978,28 @@ export default {
 </script>
 
 <style scoped>
-.dialog_diy >>> .el-dialog__header {
+.dialog_diy>>>.el-dialog__header {
   background: #3d67bc !important;
   padding: 15px 20px;
 }
 
-.dialog_diy >>> .el-dialog__title {
+.dialog_diy>>>.el-dialog__title {
   color: #fff;
 }
 
-.dialog_diy >>> .el-dialog__headerbtn {
+.dialog_diy>>>.el-dialog__headerbtn {
   top: 19px;
 }
 
-.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
   color: #fff;
 }
 
-.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
   color: #fff;
 }
 
-.student_head >>> .el-button--primary {
+.student_head>>>.el-button--primary {
   background-color: #2268bc;
 }
 
@@ -1018,7 +1066,7 @@ export default {
   align-items: center;
 }
 
-.el-table >>> .even_row {
+.el-table>>>.even_row {
   background-color: #f1f1f1;
 }
 
@@ -1130,7 +1178,7 @@ export default {
   justify-content: center;
 }
 
-.el_cards >>> .el-card__body {
+.el_cards>>>.el-card__body {
   height: 100%;
 }
 
@@ -1146,7 +1194,7 @@ export default {
   display: flex;
 }
 
-.wordUpload > .buttonUp {
+.wordUpload>.buttonUp {
   margin-right: 5px;
 }
 
@@ -1176,7 +1224,7 @@ export default {
   justify-content: space-evenly;
 }
 
-.bottom_box > div:nth-child(1) {
+.bottom_box>div:nth-child(1) {
   width: 230px;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -1192,7 +1240,7 @@ export default {
   align-items: center;
 }
 
-.tup > img {
+.tup>img {
   width: 100%;
   height: 100%;
   object-fit: contain;
@@ -1222,11 +1270,11 @@ export default {
   font-size: 14px;
 }
 
-.three_bottom > div {
+.three_bottom>div {
   cursor: pointer;
 }
 
-.three_bottom > div:hover {
+.three_bottom>div:hover {
   color: #79a2ff;
 }
 
@@ -1234,7 +1282,7 @@ export default {
   display: flex;
 }
 
-.student_input >>> .el-input__inner {
+.student_input>>>.el-input__inner {
   height: 40px;
   width: 190px;
   font-size: 13px;
@@ -1351,6 +1399,7 @@ export default {
 .sub_head {
   position: relative;
 }
+
 .sub_head::after {
   content: "";
   width: 100%;
@@ -1370,9 +1419,11 @@ export default {
   /* color: #409eff; */
   color: #999;
 }
-.subClick:hover{
+
+.subClick:hover {
   color: #000;
 }
+
 .more {
   position: relative;
 }
@@ -1395,21 +1446,21 @@ export default {
   display: none;
 }
 
-.more div > span + span {
+.more div>span+span {
   margin-top: 10px;
 }
 
-.more div > span {
+.more div>span {
   display: block;
   width: 100%;
   text-align: center;
 }
 
-.more div > span:hover {
+.more div>span:hover {
   color: #79a2ff;
 }
 
-.line{
+.line {
   width: 100%;
   height: 15px;
   background: #e6eaf0;
@@ -1556,4 +1607,13 @@ export default {
 .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;
+}
+
 </style>

+ 14 - 0
src/components/pages/studio/addCourse.vue

@@ -6148,6 +6148,11 @@ export default {
           this.taskCount
         ].toolArray[this.toolIndex].sourceIndex = 0;
       }
+      let time = new Date()
+      let nowTime = this.timestampToTime(time.toLocaleString('en-US',{hour12: false}).split(" "))
+      this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          this.taskCount
+        ].toolArray[this.toolIndex].createTime = nowTime
       this.setPeople(this.unitIndex, this.taskCount, this.userid);
       this.editSourceType = 1;
       this.sourcesData = [];
@@ -6155,6 +6160,15 @@ export default {
       this.dialogVisibleTool = false;
       this.setVHeight();
     },
+    timestampToTime(times) {
+        let time = times[1]
+        let mdy = times[0]
+        mdy = mdy.split('/')
+        let month = parseInt(mdy[0]) > 9 ? parseInt(mdy[0]) : '0'+parseInt(mdy[0]);
+        let day = parseInt(mdy[1]) > 9 ? parseInt(mdy[1]) : '0'+parseInt(mdy[1]);
+        let year = parseInt(mdy[2])
+        return year + '-' + month + '-' + day + ' ' + time
+    },
     openToolFun(tool, taskCount, i) {
       this.taskCount = taskCount;
       this.toolIndex = i;

+ 760 - 0
src/components/pages/teacherSource/dialog.vue

@@ -0,0 +1,760 @@
+<template>
+    <div class="pb_content" style="background: unset">
+        <div class="pb_content_body" style="
+          background: #fff;
+          padding: 0px 25px;
+          box-sizing: border-box;
+          border-radius: 5px;
+          font-size: 16px;
+        ">
+            <div class="reBox">
+                <div class="reTop">
+                    <div>分类筛选</div>
+                    <div>
+                        <!-- @click="getCourse" -->
+                        <div class="search" @click="getSource">
+                            <img src="../../../assets/icon/search.png" alt="" />
+                        </div>
+                        <input class="sInput" type="text" placeholder="请输入关键字" v-model="sourceName"
+                            @keyup.enter="getSource" />
+                    </div>
+                </div>
+                <div class="choose">
+                    <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+                        :style="{ margin: !CourseTypeJson[item.id].length && 0 }"  v-if="(item.name != '类型') || typea != '' || typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1">
+                        <span v-if="CourseTypeJson[item.id].length">{{ item.name }}:</span>
+                        <div class="typeCss" v-if="CourseTypeJson[item.id].length">
+                            <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
+                                :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
+                                全部
+                            </div>
+                            <div v-for="(item1, index1) in ctype(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
+                                        ? 'isCType'
+                                        : ''
+                                    ">
+                                    {{ item1.name }}
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="pb_content_body">
+            <div class="student_table" v-loading="loading">
+                <div class="source-box" v-for="(item, index) in res" :key="index">
+                    <img class="checkImg" src="../../../assets/icon/source/checka.png" @click="checka(item)" v-if="sourceData[item.id]"/>
+                    <img class="checkImg" src="../../../assets/icon/source/check.png" @click="checka(item)" v-else/>
+                    <!-- <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
+                    <div class="title"><span>{{ item.name }}</span></div> -->
+                    <div class="fengmian">
+                        <img src="../../../assets/icon/source/fengmian.jpg" alt="">
+                        <div class="ftitle"><span>{{ item.name }}</span></div>
+                    </div>
+                    <div class="detail">{{ item.detail }}</div>
+                    <div class="label"><span v-for="(k, ki) in item.label.split(',')" :key="index + '-' + ki">{{ k ? k : "无" }}</span>
+                    </div>
+                    <div class="button"><span @click="check(item.url)">查看</span></div>
+                </div>
+                <div v-if="!res.length" style="text-align: center; width: 100%;">暂无数据</div>
+            </div>
+            <div class="student_page">
+                <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total" v-if="page && total"
+                    @current-change="handleCurrentChange">
+                </el-pagination>
+            </div>
+        </div>
+        <el-dialog title="添加资源" :visible.sync="dialogVisible" :append-to-body="true" width="800px"
+            :before-close="handleClose" class="dialog_diy">
+            <div class="add-box">
+                <div class="span-box">
+                    <span><span style="color: red">*</span>工具名称</span><el-input class="input" v-model="s_title"
+                        placeholder="请输入工具名称"></el-input>
+                </div>
+                <div class="type-box">
+                    <div class="both">
+                        <div class="choose2">
+                            <div class="all_choose2" v-for="(item, index) in CourseType[0]" :key="index">
+                                <span v-if="CourseTypeJson[item.id].length > 0
+                                    ">{{ item.name }}</span>
+                                <el-checkbox-group v-model="courseTypeId2" v-if="CourseTypeJson[item.id].length > 0
+                                    ">
+                                    <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id"
+                                        :label="item1.id">{{ item1.name }}</el-checkbox>
+                                </el-checkbox-group>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="span-box">
+                    <span><span style="color: red">*</span>网址来源</span><el-input class="input" v-model="s_url"
+                        placeholder="请输入网址来源"></el-input>
+                </div>
+                <div class="span-box">
+                    <span><span style="color: red">*</span>工具描述</span><el-input class="input" type="textarea" resize="none"
+                        rows="5" v-model="s_detail" placeholder="请输入工具描述"></el-input>
+                </div>
+                <div class="span-box">
+                    <span>标签</span><el-select class="input" v-model="s_label" multiple placeholder="请选择标签">
+                        <el-option label="无需登录" value="无需登录"></el-option>
+                        <el-option label="扫码登录" value="扫码登录"></el-option>
+                        <el-option label="注册登录" value="注册登录"></el-option>
+                        <el-option label="免费" value="免费"></el-option>
+                        <el-option label="付费" value="付费"></el-option>
+                        <el-option label="中文" value="中文"></el-option>
+                        <el-option label="英文" value="英文"></el-option>
+                    </el-select>
+
+                </div>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="add()">确定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        sourceData: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            page: 1,
+            pageSize: 20,
+            total: 0,
+            isLoading: false,
+            dialogVisible: false,
+            title: "",
+            tableData: [],
+            res: [],
+            userid: this.$route.query.userid,
+            org: this.$route.query.org,
+            oid: this.$route.query.oid,
+            CourseType: [],
+            CourseTypeJson: {},
+            courseTypeId: {},
+            courseTypeSon: [],
+            isChoose: 0,
+            sourceName: "",
+            typea: "",
+            typeb: "",
+            typeE: [],
+            courseTypeId2: [],
+            s_title: "",
+            s_url: "",
+            s_detail: "",
+            s_label: [],
+        };
+    },
+    mounted() {
+        this.selectAllType();
+    },
+    computed: {
+        ctype() {
+            return function (tid) {
+                if(tid == 'e4cb3395-5602-4441-801c-f380e8935a74'){
+                    return this.CourseTypeJson[tid]
+                }else{
+                    if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
+                        return this.CourseTypeJson[tid].filter(e => {
+                            return ['备课资源','作业资源' ].indexOf(e.name) != -1 
+                        })
+                    }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
+                        return this.CourseTypeJson[tid].filter(e => {
+                            return ['语文','科学','英语','历史','化学'].indexOf(e.name) != -1 
+                        })
+                    }else if(this.typea == 'd760341a-5ab7-417f-bfc8-0fd3f183408a'){
+                        return this.CourseTypeJson[tid].filter(e => {
+                            return  ['优质课例'].indexOf(e.name) != -1 
+                        })
+                    }else{
+                        return this.CourseTypeJson[tid]
+                    }
+                }
+            };
+        }
+    },
+    methods: {
+        checka(item){
+            let _sourceData = this.sourceData
+            if(_sourceData[item.id]){
+                delete _sourceData[item.id]
+            }else{
+                _sourceData[item.id] = item
+            }
+            this.$forceUpdate()
+            this.$emit("update:sourceData",_sourceData)
+        },
+        check(url){
+            window.open(url)
+        },
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getSource();
+        },
+        handleClose(done) {
+            done();
+        },
+        selectAllType() {
+            let params = {
+                org: this.org && this.org != "" ? this.org : "",
+                oid: this.oid && this.oid != "" ? this.oid : "",
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectAllSourceType", params)
+                .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.CourseTypeJson[res.data[0][i].id]) {
+                            this.CourseTypeJson[res.data[0][i].id] = [];
+                        }
+
+                        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);
+                });
+        },
+        getCourse2(typeName, ftypeId, typeid, type) {
+            this.typeb = "";
+            this.page = 1;
+            if (typeName == "场景") {
+                if (type == 1) {
+                    if (this.typeE.indexOf(typeid) != -1) {
+                        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 = "";
+                    } 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) {
+                        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 = "";
+                    } else {
+                        this.typeb = typeid;
+                        if (this.typeE.indexOf(ftypeId) != -1) {
+                            this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+                        }
+                    }
+                }
+            }
+            if(this.typea == "" && this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') == -1){
+                this.typeE = []
+            }
+            this.getSource();
+        },
+        getSource() {
+            this.loading = true
+            let params = {
+                uid: this.userid,
+                oid: this.oid,
+                org: this.org,
+                typea: this.typea != undefined ? this.typea : "",
+                typeb: this.typeb != undefined ? this.typeb : "",
+                typeE: this.typeE.join(","),
+                cn: this.sourceName,
+                page: this.page,
+                pageSize: this.pageSize,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectSource", params)
+                .then((res) => {
+                    this.loading = false
+                    this.res = res.data[0];
+                    this.total = res.data[0].length ? res.data[0][0].num : 0;
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        addSource() {
+            this.courseTypeId2 = []
+            this.s_title = ""
+            this.s_url = ""
+            this.s_detail = ""
+            this.s_label = []
+            this.dialogVisible = true
+        },
+        add() {
+            if (this.s_title == '') {
+                this.$message.error('请填写工具名称')
+                return
+            }
+            if (this.s_url == '') {
+                this.$message.error('请填写网址来源')
+                return
+            }
+            if (this.s_detail == '') {
+                this.$message.error('请填写工具描述')
+                return
+            }
+            let params = [{
+                name: this.s_title,
+                url: this.s_url,
+                detail: this.s_detail,
+                label: this.s_label.join(","),
+                userid: this.userid,
+                courseType: JSON.stringify(this.courseTypeId2)
+            }]
+            this.ajax
+                .post(this.$store.state.api + "addSource", params)
+                .then((res) => {
+                    this.$message({
+                        message: "添加成功",
+                        type: "success",
+                    });
+                    this.dialogVisible = false
+                    this.getSource();
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        }
+    },
+    created() {
+        this.getSource();
+    },
+};
+</script>
+  
+<style scoped>
+.pb_head {
+    display: flex;
+    justify-content: space-between;
+}
+
+.student_head {
+    margin-bottom: 20px;
+}
+
+.student_page {
+    margin-top: 10px;
+}
+
+.pb_head {
+    margin: 0 !important;
+    width: 100% !important;
+}
+
+.bgColor {
+    background: #466b99;
+}
+
+.reBox {
+    background: #fff;
+    margin: 0 auto;
+    padding: 10px 5px;
+    box-sizing: border-box;
+}
+
+.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>div:nth-child(2) {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    border: 1px solid #ccced3;
+    width: 300px;
+    border-radius: 8px;
+    padding: 5px 0;
+    /* margin-bottom: 10px; */
+    background: #fafafa;
+}
+
+.search {
+    width: 20px;
+    padding: 0 5px;
+}
+
+.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 {
+    min-width: 80px;
+    display: block;
+    letter-spacing: 14px;
+}
+
+.all_choose>span:nth-child(1) {
+    font-weight: bold;
+}
+
+
+.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;
+}
+
+.dialog_diy>>>.el-dialog {
+    height: 100% !important;
+    margin: 0 auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #3c3c3c !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;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    background: #fafafa;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    height: calc(100% - 125px);
+    box-sizing: border-box;
+}
+
+
+.both {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    width: 100%;
+    align-items: center;
+    justify-content: flex-start;
+    margin: 15px 0;
+}
+
+.all_choose2 {
+    display: flex;
+    flex-direction: row;
+    align-items: flex-start;
+    width: 100%;
+}
+
+.all_choose2>span {
+    min-width: 100px;
+    display: block;
+    letter-spacing: 14px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+.all_choose2>span:nth-child(1) {
+    font-weight: bold;
+}
+
+.all_choose2>>>.el-checkbox-group {
+    display: flex;
+    flex-direction: row;
+    width: 100%;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: flex-start;
+    align-items: center;
+    margin-top: 3px;
+}
+
+.all_choose2>.el-checkbox-group>>>.el-checkbox {
+    margin-bottom: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+
+.all_choose2>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
+    min-width: 80px;
+    overflow: hidden;
+    width: 80px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.all_choose2>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
+    width: auto;
+}
+
+.choose2 {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: 100%;
+    justify-content: space-evenly;
+    align-items: flex-start;
+}
+
+.add-box {
+    height: 100%;
+    overflow: auto;
+    width: 100%;
+    background: #fff;
+    border-radius: 10px;
+    box-sizing: border-box;
+    padding: 20px;
+}
+
+.span-box {
+    display: flex;
+    margin-bottom: 20px;
+}
+
+.span-box>span {
+    font-weight: bold;
+    min-width: 100px;
+}
+
+.span-box>.input {
+    width: 100%;
+}
+
+.type-box {
+    width: 100%;
+}
+
+.student_table {
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.source-box {
+    width: calc(100% / 4 - 15px);
+    background: #fff;
+    overflow: hidden;
+    margin: 0 20px 20px 0;
+    position: relative;
+    display:flex;
+    flex-direction: column;
+}
+.source-box:nth-child(4n){
+    margin-right: 0;
+}
+.checkImg{
+    position: absolute;
+    top: 10px;
+    z-index: 10;
+    right: 10px;
+    cursor: pointer;
+    width: 30px;
+    border-radius:5px;
+}
+
+.fengmian{
+    width: 100%;
+    position: relative;
+}
+.fengmian>img{
+    width: 100%;
+}
+
+.fengmian>.ftitle{
+    position: absolute;
+    bottom: 10%;
+    color: rgb(88, 121, 198);
+    width: 90%;
+    text-align: center;
+    font-weight: 700;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 24px;
+    left: 50%;
+    transform: translateX(-50%);
+}
+.source-box .iamge {
+    width: 150px;
+    height: 125px;
+    margin: 0 auto;
+}
+
+.source-box .iamge>img {
+    width: 100%;
+    height: 100%;
+}
+
+.source-box .title {
+    width: 90%;
+    font-size: 18px;
+    text-align: center;
+    margin: 5px auto;
+    font-weight: 700;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    height:24px;
+}
+
+.source-box .detail {
+    text-align: center;
+    width: 90%;
+    margin: 5px auto;
+    color: #acacac;
+    display: block;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    height: 42px;
+    font-size: 15px;
+}
+
+.source-box .label {
+    width: 90%;
+    margin: 10px auto 5px;
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.source-box .label>span {
+    padding: 5px 10px;
+    background: rgb(98, 180, 238);
+    color: #fff;
+    border-radius: 5px;
+    margin: 0 0 5px 5px;
+}
+
+.source-box .button {
+    width: 100%;
+    text-align: center;
+    display: flex;
+    height: 40px;
+    background: rgb(244, 244, 244);
+    margin-top:auto;
+}
+
+.source-box .button>span {
+    width: 100%;
+    cursor: pointer;
+    height: 100%;
+    line-height: 40px;
+}</style>
+  

+ 787 - 0
src/components/pages/teacherSource/index.vue

@@ -0,0 +1,787 @@
+<template>
+    <div class="pb_content" style="background: unset">
+        <div class="pb_content_body" style="
+          background: #fff;
+          padding: 0px 25px;
+          box-sizing: border-box;
+          border-radius: 5px;
+        ">
+            <div class="pb_head">
+                <span>教师资源</span>
+                <div class="student_button">
+                    <el-button type="primary" class="bgColor" @click="addSource" v-show="false">添加资源</el-button>
+                </div>
+            </div>
+            <div class="reBox">
+                <div class="reTop">
+                    <div>分类筛选</div>
+                    <div>
+                        <!-- @click="getCourse" -->
+                        <div class="search" @click="getSource">
+                            <img src="../../../assets/icon/search.png" alt="" />
+                        </div>
+                        <input class="sInput" type="text" placeholder="请输入关键字" v-model="sourceName"
+                            @keyup.enter="getSource" />
+                    </div>
+                </div>
+                <div class="choose">
+                    <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+                        :style="{ margin: !CourseTypeJson[item.id].length && 0 }" v-if="(item.name != '类型') || typea != '' || typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') != -1">
+                        <span v-if="CourseTypeJson[item.id].length">{{ item.name }}:</span>
+                        <div class="typeCss" v-if="CourseTypeJson[item.id].length">
+                            <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
+                                :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
+                                全部
+                            </div>
+                            <div v-for="(item1, index1) in ctype(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
+                                        ? 'isCType'
+                                        : ''
+                                    ">
+                                    {{ item1.name }}
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="pb_content_body">
+            <div class="student_table" v-loading="loading">
+                <div class="source-box" v-for="(item, index) in res" :key="index">
+                    <!-- <div class="iamge"><img src="../../../assets/icon/source/image.png" alt=""></div>
+                    <div class="title"><span>{{ item.name }}</span></div> -->
+                    <div class="fengmian">
+                        <img src="../../../assets/icon/source/fengmian.jpg" alt="">
+                        <div class="ftitle"><span>{{ item.name }}</span></div>
+                    </div>
+                    <div class="detail">{{ item.detail }}</div>
+                    <div class="label"><span v-for="(k, ki) in item.label.split(',')" :key="index + '-' + ki">{{ k ? k : "无" }}</span>
+                    </div>
+                    <div class="button"><span @click="check(item.url)">查看</span><span @click="updateSource(item)" v-show="false">修改</span></div>
+                </div>
+                <div v-if="!res.length" style="text-align: center; width: 100%;">暂无数据</div>
+            </div>
+            <div class="student_page">
+                <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total" v-if="page && total"
+                    @current-change="handleCurrentChange">
+                </el-pagination>
+            </div>
+        </div>
+        <el-dialog title="添加资源" :visible.sync="dialogVisible" :append-to-body="true" width="800px"
+            :before-close="handleClose" class="dialog_diy">
+            <div class="add-box">
+                <div class="span-box">
+                    <span><span style="color: red">*</span>工具名称</span><el-input class="input" v-model="s_title"
+                        placeholder="请输入工具名称"></el-input>
+                </div>
+                <div class="type-box">
+                    <div class="both">
+                        <div class="choose2">
+                            <div class="all_choose2" v-for="(item, index) in CourseType[0]" :key="index">
+                                <span v-if="CourseTypeJson[item.id].length > 0
+                                    ">{{ item.name }}</span>
+                                <el-checkbox-group v-model="courseTypeId2" v-if="CourseTypeJson[item.id].length > 0
+                                    ">
+                                    <el-checkbox v-for="item1 in ctype" :key="item1.id"
+                                        :label="item1.id">{{ item1.name }}</el-checkbox>
+                                </el-checkbox-group>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="span-box">
+                    <span><span style="color: red">*</span>网址来源</span><el-input class="input" v-model="s_url"
+                        placeholder="请输入网址来源"></el-input>
+                </div>
+                <div class="span-box">
+                    <span><span style="color: red">*</span>工具描述</span><el-input class="input" type="textarea" resize="none"
+                        rows="5" v-model="s_detail" placeholder="请输入工具描述"></el-input>
+                </div>
+                <div class="span-box">
+                    <span>标签</span><el-select class="input" v-model="s_label" multiple placeholder="请选择标签">
+                        <el-option label="无需登录" value="无需登录"></el-option>
+                        <el-option label="扫码登录" value="扫码登录"></el-option>
+                        <el-option label="注册登录" value="注册登录"></el-option>
+                        <el-option label="免费" value="免费"></el-option>
+                        <el-option label="付费" value="付费"></el-option>
+                        <el-option label="中文" value="中文"></el-option>
+                        <el-option label="英文" value="英文"></el-option>
+                    </el-select>
+
+                </div>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="add()" v-if="updateType == 1">确定</el-button>
+                <el-button type="primary" @click="update()" v-if="updateType == 2">确定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+  
+<script>
+export default {
+    data() {
+        return {
+            page: 1,
+            pageSize: 20,
+            total: 0,
+            isLoading: false,
+            dialogVisible: false,
+            title: "",
+            tableData: [],
+            res: [],
+            userid: this.$route.query.userid,
+            org: this.$route.query.org,
+            oid: this.$route.query.oid,
+            CourseType: [],
+            CourseTypeJson: {},
+            courseTypeId: {},
+            courseTypeSon: [],
+            isChoose: 0,
+            sourceName: "",
+            typea: "",
+            typeb: "",
+            typeE: [],
+            courseTypeId2: [],
+            s_title: "",
+            s_url: "",
+            s_detail: "",
+            s_label: [],
+            updateType:1,
+            updateId:""
+        };
+    },
+    mounted() {
+        this.selectAllType();
+    },
+    computed: {
+        ctype() {
+            return function (tid) {
+                if(tid == 'e4cb3395-5602-4441-801c-f380e8935a74'){
+                    return this.CourseTypeJson[tid]
+                }else{
+                    if(this.typea == 'b107f98f-1dc4-4ede-80b4-178ba22b6a59'){
+                        return this.CourseTypeJson[tid].filter(e => {
+                            return ['备课资源','作业资源' ].indexOf(e.name) != -1 
+                        })
+                    }else if(this.typea == '3b12e8d9-866f-46bb-aa22-76cb3b7788b3'){
+                        return this.CourseTypeJson[tid].filter(e => {
+                            return ['语文','科学','英语','历史','化学'].indexOf(e.name) != -1 
+                        })
+                    }else if(this.typea == 'd760341a-5ab7-417f-bfc8-0fd3f183408a'){
+                        return this.CourseTypeJson[tid].filter(e => {
+                            return  ['优质课例'].indexOf(e.name) != -1 
+                        })
+                    }else{
+                        return this.CourseTypeJson[tid]
+                    }
+                }
+            };
+        }
+    },
+    methods: {
+        check(url){
+            window.open(url)
+        },
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getSource();
+        },
+        handleClose(done) {
+            done();
+        },
+        selectAllType() {
+            let params = {
+                org: this.org && this.org != "" ? this.org : "",
+                oid: this.oid && this.oid != "" ? this.oid : "",
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectAllSourceType", params)
+                .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.CourseTypeJson[res.data[0][i].id]) {
+                            this.CourseTypeJson[res.data[0][i].id] = [];
+                        }
+
+                        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);
+                });
+        },
+        getCourse2(typeName, ftypeId, typeid, type) {
+            this.typeb = "";
+            this.page = 1;
+            if (typeName == "场景") {
+                if (type == 1) {
+                    if (this.typeE.indexOf(typeid) != -1) {
+                        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 = "";
+                    } 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) {
+                        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 = "";
+                    } else {
+                        this.typeb = typeid;
+                        if (this.typeE.indexOf(ftypeId) != -1) {
+                            this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+                        }
+                    }
+                }
+            }
+            if(this.typea == "" && this.typeE.indexOf('e4cb3395-5602-4441-801c-f380e8935a74') == -1){
+                this.typeE = []
+            }
+            this.getSource();
+        },
+        getSource() {
+            this.loading = true
+            let params = {
+                uid: this.userid,
+                oid: this.oid,
+                org: this.org,
+                typea: this.typea != undefined ? this.typea : "",
+                typeb: this.typeb != undefined ? this.typeb : "",
+                typeE: this.typeE.join(","),
+                cn: this.sourceName,
+                page: this.page,
+                pageSize: this.pageSize,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectSource", params)
+                .then((res) => {
+                    this.loading = false
+                    this.res = res.data[0];
+                    this.total = res.data[0].length ? res.data[0][0].num : 0;
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        addSource() {
+            this.courseTypeId2 = []
+            this.s_title = ""
+            this.s_url = ""
+            this.s_detail = ""
+            this.s_label = []
+            this.updateType = 1
+            this.dialogVisible = true
+        },
+        updateSource(item) {
+            this.courseTypeId2 = item.typeid ? item.typeid.split(",") : []
+            this.s_title = item.name
+            this.s_url = item.url
+            this.s_detail = item.detail
+            this.s_label = item.label.split(",")
+            this.updateType = 2
+            this.updateId = item.id
+            this.dialogVisible = true
+        },
+        add() {
+            if (this.s_title == '') {
+                this.$message.error('请填写工具名称')
+                return
+            }
+            if (this.s_url == '') {
+                this.$message.error('请填写网址来源')
+                return
+            }
+            if (this.s_detail == '') {
+                this.$message.error('请填写工具描述')
+                return
+            }
+            let params = [{
+                name: this.s_title,
+                url: this.s_url,
+                detail: this.s_detail,
+                label: this.s_label.join(","),
+                userid: this.userid,
+                courseType: JSON.stringify(this.courseTypeId2)
+            }]
+            this.ajax
+                .post(this.$store.state.api + "addSource", params)
+                .then((res) => {
+                    this.$message({
+                        message: "添加成功",
+                        type: "success",
+                    });
+                    this.dialogVisible = false
+                    this.getSource();
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        },
+        update() {
+            if (this.s_title == '') {
+                this.$message.error('请填写工具名称')
+                return
+            }
+            if (this.s_url == '') {
+                this.$message.error('请填写网址来源')
+                return
+            }
+            if (this.s_detail == '') {
+                this.$message.error('请填写工具描述')
+                return
+            }
+            let params = [{
+                id:this.updateId,
+                name: this.s_title,
+                url: this.s_url,
+                detail: this.s_detail,
+                label: this.s_label.join(","),
+                userid: this.userid,
+                courseType: JSON.stringify(this.courseTypeId2)
+            }]
+            this.ajax
+                .post(this.$store.state.api + "updateSource", params)
+                .then((res) => {
+                    this.$message({
+                        message: "修改成功",
+                        type: "success",
+                    });
+                    this.dialogVisible = false
+                    this.getSource();
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        }
+    },
+    created() {
+        this.getSource();
+    },
+};
+</script>
+  
+<style scoped>
+.pb_head {
+    display: flex;
+    justify-content: space-between;
+}
+
+.student_head {
+    margin-bottom: 20px;
+}
+
+.student_page {
+    margin-top: 10px;
+}
+
+.pb_head {
+    margin: 0 !important;
+    width: 100% !important;
+}
+
+.bgColor {
+    background: #466b99;
+}
+
+.reBox {
+    background: #fff;
+    margin: 0 auto;
+    padding: 10px 5px;
+    box-sizing: border-box;
+}
+
+.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>div:nth-child(2) {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    border: 1px solid #ccced3;
+    width: 300px;
+    border-radius: 8px;
+    padding: 5px 0;
+    /* margin-bottom: 10px; */
+    background: #fafafa;
+}
+
+.search {
+    width: 20px;
+    padding: 0 5px;
+}
+
+.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 {
+    min-width: 80px;
+    display: block;
+    letter-spacing: 14px;
+}
+
+.all_choose>span:nth-child(1) {
+    font-weight: bold;
+}
+
+
+.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;
+}
+
+.dialog_diy>>>.el-dialog {
+    height: 100% !important;
+    margin: 0 auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #3c3c3c !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;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    background: #fafafa;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    height: calc(100% - 125px);
+    box-sizing: border-box;
+}
+
+
+.both {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    width: 100%;
+    align-items: center;
+    justify-content: flex-start;
+    margin: 15px 0;
+}
+
+.all_choose2 {
+    display: flex;
+    flex-direction: row;
+    align-items: flex-start;
+    width: 100%;
+}
+
+.all_choose2>span {
+    min-width: 100px;
+    display: block;
+    letter-spacing: 14px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+.all_choose2>span:nth-child(1) {
+    font-weight: bold;
+}
+
+.all_choose2>>>.el-checkbox-group {
+    display: flex;
+    flex-direction: row;
+    width: 100%;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: flex-start;
+    align-items: center;
+    margin-top: 3px;
+}
+
+.all_choose2>.el-checkbox-group>>>.el-checkbox {
+    margin-bottom: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+
+.all_choose2>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
+    min-width: 80px;
+    overflow: hidden;
+    width: 80px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.all_choose2>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
+    width: auto;
+}
+
+.choose2 {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: 100%;
+    justify-content: space-evenly;
+    align-items: flex-start;
+}
+
+.add-box {
+    height: 100%;
+    overflow: auto;
+    width: 100%;
+    background: #fff;
+    border-radius: 10px;
+    box-sizing: border-box;
+    padding: 20px;
+}
+
+.span-box {
+    display: flex;
+    margin-bottom: 20px;
+}
+
+.span-box>span {
+    font-weight: bold;
+    min-width: 100px;
+}
+
+.span-box>.input {
+    width: 100%;
+}
+
+.type-box {
+    width: 100%;
+}
+
+.student_table {
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.source-box {
+    width: calc(100% / 4 - 15px);
+    background: #fff;
+    overflow: hidden;
+    margin: 0 20px 20px 0;
+    display: flex;
+    flex-direction: column;
+}
+.source-box:nth-child(4n){
+    margin-right: 0;
+}
+.source-box .iamge {
+    width: 150px;
+    height: 125px;
+    margin: 0 auto;
+}
+
+.source-box .iamge>img {
+    width: 100%;
+    height: 100%;
+}
+.fengmian{
+    width: 100%;
+    position: relative;
+}
+.fengmian>img{
+    width: 100%;
+}
+
+.fengmian>.ftitle{
+    position: absolute;
+    bottom: 10%;
+    color: rgb(88, 121, 198);
+    width: 90%;
+    text-align: center;
+    font-weight: 700;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 24px;
+    left: 50%;
+    transform: translateX(-50%);
+}
+.source-box .title {
+    width: 90%;
+    font-size: 18px;
+    text-align: center;
+    margin: 5px auto;
+    font-weight: 700;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    height:24px;
+}
+
+.source-box .detail {
+    text-align: center;
+    width: 90%;
+    margin: 5px auto;
+    color: #acacac;
+    display: block;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    height: 42px;
+    font-size: 15px;
+}
+
+.source-box .label {
+    width: 90%;
+    margin: 10px auto 5px;
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.source-box .label>span {
+    padding: 5px 10px;
+    background: rgb(98, 180, 238);
+    color: #fff;
+    border-radius: 5px;
+    margin: 0 0 5px 5px;
+}
+
+.source-box .button {
+    width: 100%;
+    text-align: center;
+    display: flex;
+    height: 40px;
+    background: rgb(244, 244, 244);
+    margin-top: auto;
+}
+
+.source-box .button>span {
+    width: 100%;
+    cursor: pointer;
+    height: 100%;
+    line-height: 40px;
+}</style>
+  

+ 1 - 1
src/components/pages/tencent/school.vue

@@ -25,7 +25,7 @@
             <div>
               <el-button size="small" type="primary" @click="openAddSchool(1)">
                 添加学校</el-button>
-              <el-upload class="upload-demo newCss" v-if="false" :http-request="importA" :on-remove="handleRemove" action="#"
+              <el-upload class="upload-demo newCss" v-show="false" :http-request="importA" :on-remove="handleRemove" action="#"
                 :file-list="fileListUpload" accept=".xlsx">
                 <el-button size="primary" type="primary">批量添加</el-button>
               </el-upload>

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

@@ -161,7 +161,7 @@
               min-width="20"
               align="center"
             ></el-table-column>
-            <el-table-column label="操作" min-width="30">
+            <el-table-column label="操作" width="200px">
               <template slot-scope="scope">
                 <!-- <el-button
                 type="primary"

+ 12 - 0
src/router/index.js

@@ -89,7 +89,10 @@ import evaReport from '@/components/pages/components/evaReport'
 import learnAna from '@/components/pages/learnAnalysis/learnAna'
 import modelReport from '@/components/pages/learnAnalysis/components/modelReport'
 import lookModel from '@/components/pages/learnAnalysis/components/lookModel'
+import teacherSource from '@/components/pages/teacherSource/index'
 
+// 全局修改默认配置,点击空白处不能关闭弹窗
+ElementUI.Dialog.props.closeOnClickModal.default = false
 Vue.use(Router).use(ElementUI)
 
 export default new Router({
@@ -768,5 +771,14 @@ export default new Router({
                 requireAuth: '' // 不需要鉴权
             }
         },
+        {
+            path: '/teacherSource',
+            name: 'teacherSource',
+            component: teacherSource,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },
+        
     ]
 })

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels