Przeglądaj źródła

课程建设精品课程以及返回样式修改

11wqe1 2 miesięcy temu
rodzic
commit
59846244e7

+ 5 - 0
src/assets/icon/liyuan/courseEdit.svg

@@ -0,0 +1,5 @@
+<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.25" y="0.25" width="27.5" height="27.5" rx="13.75" stroke="black" stroke-width="0.5"/>
+<path d="M14 8H9.33333C8.97971 8 8.64057 8.14048 8.39052 8.39052C8.14048 8.64057 8 8.97971 8 9.33333V18.6667C8 19.0203 8.14048 19.3594 8.39052 19.6095C8.64057 19.8595 8.97971 20 9.33333 20H18.6667C19.0203 20 19.3594 19.8595 19.6095 19.6095C19.8595 19.3594 20 19.0203 20 18.6667V14" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M18.2499 7.75003C18.5151 7.48481 18.8748 7.33582 19.2499 7.33582C19.625 7.33582 19.9847 7.48481 20.2499 7.75003C20.5151 8.01525 20.6641 8.37496 20.6641 8.75003C20.6641 9.1251 20.5151 9.48481 20.2499 9.75003L14.2412 15.7594C14.0829 15.9175 13.8874 16.0333 13.6726 16.096L11.7572 16.656C11.6999 16.6728 11.6391 16.6738 11.5812 16.6589C11.5233 16.6441 11.4705 16.614 11.4282 16.5717C11.3859 16.5295 11.3558 16.4766 11.341 16.4188C11.3262 16.3609 11.3272 16.3001 11.3439 16.2427L11.9039 14.3274C11.9669 14.1127 12.0829 13.9174 12.2412 13.7594L18.2499 7.75003Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

+ 4 - 4
src/components/pages/classroomObservation/index.vue

@@ -16,6 +16,10 @@
 					class="co-h2-l-icon"
 					@click="$refs.addNewCourseDialogRef.open()"
 				></span> -->
+         <div class="r_pub_button_retrun"  style="margin-right: 10px;" v-if="gotype" @click.stop="$router.go(-1)">
+          <!-- <span class="co-h2-r-b-icon3"></span> -->
+          返回
+        </div>
         <span class="co-h2-l-icon"></span>
         <!-- @click="addNewCourse()" -->
         <!--<span class="co-h2-l-hr"></span>-->
@@ -157,10 +161,6 @@
             />
           </el-tooltip>
         </div>
-        <div :class="['co-h2-r-btn2']"  v-if="gotype" @click.stop="$router.go(-1)">
-          <!-- <span class="co-h2-r-b-icon3"></span> -->
-          返回
-        </div>
         <!-- <div :class="['co-h2-r-btn2']" @click.stop="home">
 					<el-tooltip
 						class="item"

+ 349 - 1
src/components/pages/liyuan/CourseCon.vue

@@ -3,6 +3,70 @@
     <topBar title="课程建设" detail="智能课程管理 · 数字化教学资源 · AI赋能备课教学"></topBar>
     <div class="cardBox">
       <card v-for="item in cardArray" :key="item.title" :title="item.title" :icon="item.icon" :to="item.to" :type="item.type"></card>
+    </div>
+      <div class="courseList" v-loading="isLoading">
+      <div class="courseListTit">精品课程</div>
+      <div class="courseListSearch">
+        <div style="display: flex;gap: 25px;">
+            <el-select v-for="(i,index) in typeList" :key="index" v-model="i.typeE" @change="search" :placeholder="i.name">
+              <el-option value="" label="全部"></el-option>
+              <el-option
+                v-for="item in i.child"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id">
+              </el-option>
+            </el-select>
+
+            <el-select v-model="groupA" @change="search" v-if="role == '1'" placeholder="所有者">
+              <el-option value="4" label="全部"></el-option>
+              <el-option value="2" label="我的课程"></el-option>
+              <el-option value="3" label="协同课程"></el-option>
+              <el-option value="1" label="他人课程"></el-option>
+            </el-select>
+            <el-select v-model="groupA" @change="search" v-else placeholder="所有者">
+              <el-option value="0" label="全部"></el-option>
+              <el-option value="2" label="我的课程"></el-option>
+              <el-option value="3" label="协同课程"></el-option>
+            </el-select>
+          
+        </div>
+        <div class="serachCon">
+          <el-input
+            placeholder="请输入关键字"
+            suffix-icon="el-icon-search"
+            @change="search"
+            v-model="courseName">
+          </el-input>
+        </div>
+      </div>
+      <div class="courseDataL">
+        <div class="Conblock" v-for="(i,index) in courseList" :key="index">
+          <div class="ConblockTit">
+              {{ i.title }}
+          </div>
+          <div style="display: flex;gap: 10px;color: #969BA3;font-size: 12px;">
+              <span v-if="i.state == 1">阶段模式</span>
+              <span v-if="i.state == 2">任务模式</span>
+              <span v-if="i.state == 3">极简模式</span>
+              <span v-if="i.state == 4 || i.state == 5">ai模式</span>
+              <span v-if="i.state == 6">上课模式</span>
+              <span>@{{ i.school }}</span>
+
+          </div>
+           <img class="PimgL" :src="i.cover != null && i.cover != ''
+              ? JSON.parse(i.cover).length > 0
+                ? JSON.parse(i.cover)[0].url
+                : mr
+              : mr
+              " alt />
+          <div class="foot">
+            <img style="cursor: pointer;" @click="goToCourse(i.courseId)" src="../../../assets/icon/liyuan/courseEdit.svg" alt="">
+            <div class="ent" @click="entCourse(i)">进入</div>
+          </div>
+        </div>
+      </div>
+
     </div>
   </div>
 </template>
@@ -10,13 +74,31 @@
 <script>
 import topBar from './components/topBar'
 import card from './components/card.vue';
+import { myMixin } from "@/mixins/mixin.js"
+
 export default {
+  mixins: [ myMixin ],
   components: {
     topBar,
     card
   },
   data() {
     return {
+      typeList:[],
+      CourseType:[],
+      CourseTypeJson:[],
+      total:0,
+      isLoading:false,
+      mr: require("../../../assets/icon/kc1.png"),
+      groupA:'', //所有者
+      courseName:'',
+      courseList:[],
+      org:this.$route.query["org"],
+      oid:this.$route.query["oid"],
+      userid:this.$route.query["userid"],
+      role:this.$route.query["role"],
+      page:1,
+      pageSize:20,
       cardArray: [
         { title: '课程管理', icon: require('../../../assets/icon/liyuan/niandukaohe.svg'), type: 1, to: "/course" },
         { title: '课程中心', icon: require('../../../assets/icon/liyuan/gerendangan.svg'), type: 4, to: `/pbl-student-table/dist/#/index?userid=${this.$route.query.userid}&oid=${this.$route.query.oid}&org=${this.$route.query.org}&tType=${this.$route.query.tType}&cid=&screenType=3&gotype=1` },
@@ -27,6 +109,184 @@ export default {
       ]
     }
   },
+    methods:{
+    search() {
+      console.log('6666');
+      this.isLoading = true;
+      
+      this.page = 1;
+      this.getCourse();
+    },
+    selectAllType() {
+      let params = {
+        org: this.org && this.org != "" ? this.org : "",
+        oid: this.oid && this.oid != "" ? this.oid : "",
+        stand: "cn"
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectAllTypeStand", params)
+        .then((res) => {
+          
+          if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+            res.data[0] = [...res.data[0], ...res.data[4]]
+          }
+          this.CourseType = res.data;
+          this.typeList = res.data[0]
+
+          for (var cti = 0; cti < res.data[0].length; cti++) {
+            if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
+              res.data[0][cti].name = "年级";
+            } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+              res.data[0][cti].name = "学科";
+            } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
+              res.data[0][cti].name = "主题";
+            }
+          }
+
+
+          for (var i = 0; i < res.data[0].length; i++) {
+            // if (!this.cid) {
+            //   this.courseTypeId[res.data[0][i].id] = [];
+            // }
+            if (!this.CourseTypeJson[res.data[0][i].id]) {
+              this.CourseTypeJson[res.data[0][i].id] = [];
+            }
+            if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+              if (res.data[0][i].name == "栏目") {
+                this.CourseType[0][i].name = "主题";
+              }
+            }
+            if (res.data[2].length == 0 && res.data[3].length == 0) {
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
+                }
+              }
+            } else {
+              if (res.data[2].length > 0) {
+                for (var j = 0; j < res.data[2].length; j++) {
+                  if (res.data[0][i].id == res.data[2][j].pid) {
+                    this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
+                  }
+                }
+              }
+              if (res.data[3].length > 0) {
+                for (var j = 0; j < res.data[3].length; j++) {
+                  if (res.data[0][i].id == res.data[3][j].pid) {
+                    this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
+                  }
+                }
+              }
+            }
+          }
+          this.typeList.forEach(e=>{
+              e.child = this.CourseTypeJson[e.id]
+              e.typeE = ''
+          })
+          
+          console.log('typeList',this.typeList);
+
+          this.getCourse()
+          // console.log('CourseTypeJson',this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5']);
+          // console.log('CourseType',this.CourseType);
+
+
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+
+    getCourse() {
+      this.isLoading = true;
+      let params = {
+        type: this.groupA ? this.groupA : 4,
+        uid: this.userid,
+        oid: this.oid,
+        org: this.org,
+        typea: this.typeList.filter(e=> e.id == "34628934-d02f-11ec-8c78-005056b86db5")[0].typeE ? this.typeList.filter(e=> e.id == "34628934-d02f-11ec-8c78-005056b86db5")[0].typeE : '',
+        typeb: this.typeList.filter(e=> e.id == "34629bcc-d02f-11ec-8c78-005056b86db5")[0].typeE ? this.typeList.filter(e=> e.id == "34629bcc-d02f-11ec-8c78-005056b86db5")[0].typeE : '',
+        typec: "",
+        typed: this.typeList.filter(e=> e.id == "34629907-d02f-11ec-8c78-005056b86db5")[0].typeE ? this.typeList.filter(e=> e.id == "34629907-d02f-11ec-8c78-005056b86db5")[0].typeE : '',
+        typeE: '',
+        cu: "",
+        cn: this.courseName,
+        page: this.page,
+        pageSize: this.pageSize,
+      };
+      console.log('params',params);
+      
+      this.ajax
+        .get(this.$store.state.api + "selectCourseNew2", params)
+        .then((res) => {
+          // this.loading.close();
+          // this.loading = "";
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.courseList = res.data[0];
+          this.isLoading = false;
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+
+    entCourse(item) {
+      let _str = ""
+      if(item.state == 1){
+        _str = "course_stageMode_open"
+      }if(item.state == 2){
+        _str = "course_taskMode_open"
+      }if(item.state == 3){
+        _str = "course_easyMode_open"
+      }if(item.state == 5){
+        _str = "course_aiMode_open"
+      }if(item.state == 6){
+        _str = "course_aiEasyMode_open"
+      }
+      this.addOp3('1', "", { courseid: item.courseId, type: _str }, "success")
+      
+       window.topU.postMessage({ cid: item.courseId, screenType: "3" }, "*");
+    },
+    goToCourse(courseId) {
+        sessionStorage.setItem('gotype', 'backCourseCon');
+
+        this.goToCourse4(courseId)
+    },
+    goToCourse4(courseId) {
+      if (courseId) {
+        this.$router.push(
+          "/newAddCourse?cid=" +
+          courseId +
+          "&userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+        );
+        this.addOp3('1', "", { courseid: courseId ,type: "course_stageMode_edit" }, "success")
+      } else {
+        this.$router.push(
+          "/newAddCourse?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+        );
+        this.addOp3('1', "", { type: "course_stageMode_createClick" }, "success")
+      }
+      // this.$router.push(path);
+    },
+  },
+  mounted(){
+    this.selectAllType()
+  }
 }
 </script>
 
@@ -35,7 +295,8 @@ export default {
   width: 100%;
   height: 100%;
   padding: 40px 90px;
-
+  display: flex;
+  flex-direction: column;
   box-sizing: border-box;
   background: #FAFAFA;
 
@@ -48,4 +309,91 @@ export default {
   width: 100%;
   margin-top: 20px;
 }
+.courseList{
+  flex: 1;
+  margin-top: 30px;
+  display: flex;
+  flex-direction: column;
+  gap: 30px;
+}
+.courseListTit{
+  font-family: PingFang SC;
+  font-weight: 600;
+  font-style: Semibold;
+  font-size: 20px;
+  line-height: 100%;
+  letter-spacing: 10%;
+}
+.courseListSearch{
+  display: flex;
+  justify-content: space-between;
+}
+.courseListSearch >>> .el-select .el-input__inner{
+  border-radius: 20px;
+  height: 28px;
+  width: 110px;
+  border: 1px solid #969BA3 !important;
+  color: #969BA3;
+}
+.courseListSearch >>> .el-input__icon{
+  line-height: 28px;
+}
+.serachCon >>> .el-input__inner{
+  height: 28px !important;
+  border-radius: 20px !important;
+  width: 300px !important;
+  border: none;
+  background: #E7E7E7;
+}
+.courseDataL{
+  display: flex;
+
+  gap: 20px;
+}
+.Conblock{
+  display: flex;
+  width: 300px;
+  flex-direction: column;
+  gap: 15px;
+  background: #fff;
+  border-radius: 12px;
+  padding: 14px 16px;
+  box-sizing: border-box;
+  box-shadow: 0px 4px 10px 0px #0000001A;
+
+}
+.PimgL{
+  width: 100%;
+  height: 126px;
+  border-radius: 10px;
+  object-fit: cover;
+}
+.ConblockTit{
+  -webkit-line-clamp: 1;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+  text-overflow: ellipsis; 
+}
+.foot{
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+  gap: 10px;
+}
+.foot > .ent{
+  border: 1px solid #000000;
+  width: 68;
+  height: 28;
+  angle: 0 deg;
+  opacity: 1;
+  gap: 10px;
+  cursor: pointer;
+  border-radius: 20px;
+  padding-top: 4px;
+  padding-right: 20px;
+  padding-bottom: 4px;
+  padding-left: 20px;
+  border-width: 1px;
+}
 </style>

+ 13 - 1
src/components/pages/newCourse/addCourse.vue

@@ -8357,7 +8357,19 @@ export default {
         })
         .catch((v) => {
           console.log(v);
-          if (v == "cancel") {
+          if (v == "cancel" && this.gotype == 'backCourseCon') {
+            this.goTo(
+              "/CourseCon?userid=" +
+                this.userid +
+                "&oid=" +
+                this.oid +
+                "&org=" +
+                this.org +
+                "&role=" +
+                this.role +
+                "&gotype=1"
+            );
+          }else if(v == "cancel"){
             this.goTo(
               "/course?userid=" +
                 this.userid +

+ 9 - 1
src/components/pages/test/add/addTest.vue

@@ -2,7 +2,15 @@
     <div class="pb_content" style="background: #F0F2F5;" v-loading="loading">
         <div class="pb_content_body" style="position: relative; margin: 0">
             <div class="right">
-                <div class="courseTop">
+                <div class="courseTop" v-if="gotype">
+                    <div
+                        class="r_pub_button_retrun"
+                        @click="retrunCourse"
+                    >
+                        返回
+                    </div>
+                </div>
+                <div class="courseTop" v-else>
                     <div class="stepsNav">
                         <el-breadcrumb separator-class="el-icon-arrow-right">
                             <el-breadcrumb-item v-if="!back" :to="{

+ 12 - 2
src/components/pages/test/check/index.vue

@@ -2,7 +2,15 @@
   <div class="pb_content" style="background: #f0f2f5" v-loading="loading">
     <div class="pb_content_body" style="position: relative; margin: 0">
       <div class="right">
-        <div class="courseTop" >
+          <div class="courseTop" v-if="gotype">
+          <div
+            class="r_pub_button_retrun"
+            @click="retrunCourse"
+          >
+            返回
+          </div>
+        </div>
+        <div class="courseTop" v-else>
           <div class="stepsNav" v-if="!examineId">
             <el-breadcrumb separator-class="el-icon-arrow-right">
               <el-breadcrumb-item
@@ -226,7 +234,9 @@
                   trigger="click"
 
                   >
-                    <div class="openCeBox" v-loading="aiscoLoading">
+                    <div class="openCeBox" 
+                    v-loading="aiscoLoading"
+                    element-loading-spinner="../../../../assets/KekeLoading.gif">
                         <div style="display: flex;justify-content: space-between;align-items: center;">
                           <div class="TopTit">智能分析列</div>
                           <el-popover

+ 3 - 2
src/components/pages/testStudent/view/preview.vue

@@ -3,7 +3,8 @@
     <div class="pb_content_body" style="position: relative; margin: 0">
       <div class="right">
         <div class="courseTop" :style="`justify-content: ${isN==1?'flex-end':'space-between'};`">
-          <div class="stepsNav" v-if="isN !=1">
+          <div class="r_pub_button_retrun" v-if="gotype" @click="retrunCourse">返回</div>
+          <div class="stepsNav" v-if="isN !=1 && !gotype">
             <el-breadcrumb v-if="!gotype" separator-class="el-icon-arrow-right">
               <el-breadcrumb-item :to="{
     path:
@@ -719,7 +720,7 @@ export default {
   align-items: center;
   width: calc(100% - 40px);
   margin: 0 auto;
-  padding: 10px 0;
+  padding: 10px 40px;
 }
 
 .stepsNav {