Jelajahi Sumber

Merge branch 'master' of https://git.cocorobo.cn/chao/course_resource

lsc 4 minggu lalu
induk
melakukan
30bbb1412a
2 mengubah file dengan 174 tambahan dan 1 penghapusan
  1. 118 0
      src/assets/course.json
  2. 56 1
      src/components/main/courseSelect.vue

+ 118 - 0
src/assets/course.json

@@ -735,5 +735,123 @@
                 }
             ]
         }
+    },
+    "mod": {
+        "模块一":{
+            "shang": [
+                {
+                    "id": "d17def85-c5df-11f0-a424-005056924926",
+                    "title": "第1课-人工智能基础(1)",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%B9%BB%E7%81%AF%E7%89%87011763621537371.jpeg",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "8ea99e65-c4ef-11f0-a424-005056924926",
+                    "title": "第2课-人工智能基础(2)",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/20251121-1538001763710724363.jpg",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ],
+            "xia": [
+                
+            ]
+        },
+        "模块二":{
+            "shang": [
+                {
+                    "id": "7ed2ec66-c683-11f0-a424-005056924926",
+                    "title": "第1课-打造你的第一个智能体(上)",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/ppt%E5%B0%81%E9%9D%A21763692667014.png",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "8bd6a3ee-c4f6-11f0-a424-005056924926",
+                    "title": "第2课-打造你的第一个智能体(下)",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E6%88%AA%E5%B1%8F2025-11-21%20%E4%B8%8A%E5%8D%88101763692654734.png",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "2a258ff0-c452-11f0-a424-005056924926",
+                    "title": "第3课-工作流的艺术-指挥你的AI军团(上)",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/20251121-1120351763695353994.png",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "0e142364-c521-11f0-a424-005056924926",
+                    "title": "第4课-工作流的艺术-指挥你的AI军团(下)",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/ScreenShot_2025-11-21_154127_6561763710898789.png",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ],
+            "xia": [
+                
+            ]
+        },
+        "模块三": {
+            "shang": [
+                {
+                    "id": "18d6bbb5-c5e9-11f0-a424-005056924926",
+                    "title": "第1课-中草药百科问答器",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/PixPin_2025-11-20_16-05-011763625908128.png",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "990c38f5-c6c0-11f0-a424-005056924926",
+                    "title": "第2课-智能体 &CocoPi 从0到1打造你的AI专属角色",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F20251125-1317381764047909181.jpg",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "ae086f8e-c5ee-11f0-a424-005056924926",
+                    "title": "第3课-智能体 &CocoPi 当李白遇见科技",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/Slide11763971863505.jpeg",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ],
+            "xia": [
+                
+            ]
+        },
+        "模块四": {
+            "shang": [
+                {
+                    "id": "f69ef5aa-c456-11f0-a424-005056924926",
+                    "title": "第1课-设计思维",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%B9%BB%E7%81%AF%E7%89%8711763455735806.jpeg",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                },
+                {
+                    "id": "07d4455c-c45a-11f0-a424-005056924926",
+                    "title": "第2课-工作流设计",
+                    "url": "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%B9%BB%E7%81%AF%E7%89%8711763455136830.jpeg",
+                    "dataId": "",
+                    "dataList": [],
+                    "courseType": "2"
+                }
+            ],
+            "xia": [
+                
+            ]
+        }
     }
 }

+ 56 - 1
src/components/main/courseSelect.vue

@@ -4,6 +4,7 @@
       课程列表
     </div>
   </h2>
+  <div class="grandTitle2" v-if="gotype.gotype == 'bjs'">人工智能通识课</div>
   <div class="course_select">
     <span class="grandTitle">课程类型:</span>
     <el-button :class="courseTypeShow ? 'el_button_active' : ''" @click="SwitchCourseType(true)">AI通识课2025版</el-button>
@@ -147,6 +148,39 @@
       </el-row>
     </div>
   </div>
+  <div class="grandTitle2" v-if="gotype.gotype == 'bjs'" style="margin-top: 20px;">人工智能竞赛课</div>
+  <div class="course_select" v-if="gotype.gotype == 'bjs'">
+    <span class="grandTitle">课程类型:</span>
+    <el-button class="el_button_active">智能体课程</el-button>
+    <!-- <el-button :class="!courseTypeShow ? 'el_button_active' : ''" @click="SwitchCourseType(false)">AI通识课2024版</el-button> -->
+  </div>
+  <div class="course_select" v-if="gotype.gotype == 'bjs'">
+    <span class="grandTitle">模块:</span>
+    <el-button :class="selectmod == '模块一' ? 'el_button_active' : ''" @click="clickmod('模块一')">模块一</el-button>
+    <el-button :class="selectmod == '模块二' ? 'el_button_active' : ''" @click="clickmod('模块二')">模块二</el-button>
+    <el-button :class="selectmod == '模块三' ? 'el_button_active' : ''" @click="clickmod('模块三')">模块三</el-button>
+    <el-button :class="selectmod == '模块四' ? 'el_button_active' : ''" @click="clickmod('模块四')">模块四</el-button>
+  </div>
+ <div class="course_select" v-if="gotype.gotype == 'bjs'">
+    <div v-if="currentmodData && currentmodData.shang.length > 0">
+      <el-row :gutter="20">
+        <el-col :span="6" v-for="item in currentmodData.shang" :key="item.title" style="margin-top: 10px;">
+          <div class="grid-content ep-bg-purple">
+            <img :src="getImageUrl(item.url)" alt="">
+            <div class="course_content">
+              <div class="div_title">
+                {{ item.title }}
+              </div>
+            </div>
+            <div class="class_button" v-if="isupdateCourse">
+              <el-button :style="item.courseType == '1' ? 'width: 50%;' : 'width: 100%;'" class="el_button_active"
+                @click="openCourseDetail(item.id, item)">上课</el-button>
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
   <el-dialog v-model="dialogVisible" :before-close="handleClose" width=500>
     <template #header>
       <div class="dialog-header img_text_middle">
@@ -167,7 +201,7 @@
 </template>
 <script setup>
 import { ref, onMounted, watchEffect } from 'vue';
-import { userCurrentRole, userInfoStore, userCurrent } from '../../stores/counter'
+import { userCurrentRole, userInfoStore, userCurrent,pageGotype } from '../../stores/counter'
 import JSZip from 'jszip';
 import { saveAs } from 'file-saver';
 import DownloadImg from '@/assets/img/download.png'
@@ -190,8 +224,13 @@ const user = userInfoStore()
 const CurrentRole = userCurrentRole()
 const Current = userCurrent()
 const selectGrand = ref('三年级')
+const selectmod = ref('模块一')
+const gotype = pageGotype()
+
 const isupdateCourse = ref(false)
 const currentData = ref(courseDataJson.old.三年级)
+const currentmodData = ref(courseDataJson.mod.模块一)
+
 const dialogVisible = ref(false)
 const updateReductionId = ref("")
 const checked1 = ref(false)
@@ -201,6 +240,8 @@ const courseTypeShow = ref(true) // old 旧版 new 纲要
 const setIntervalNum = ref(null)
 
 const courseData = ref(courseDataJson.new)
+const modData = ref(courseDataJson.mod)
+
 onMounted(() => {
   currentData.value = courseData.value["三年级"]
   getTimeCourse(1, 1)
@@ -209,6 +250,10 @@ const clickGrand = val => {
   selectGrand.value = val
   currentData.value = courseData.value[val]
 }
+const clickmod = val => {
+  selectmod.value = val
+  currentmodData.value = modData.value[val]
+}
 const SwitchCourseType = (val) => {
   courseTypeShow.value = val
   if (val) {
@@ -649,4 +694,14 @@ watchEffect(() => {
   font-size: 16px;
   font-weight: 500;
 }
+.grandTitle2 {
+  font-size: 16px;
+  font-weight: 600 !important;
+  line-height: 28px;
+  letter-spacing: 0em;
+  // text-align: center;
+}
+.grandTitle3{
+  margin-top: 0;
+}
 </style>