|
@@ -35,7 +35,32 @@
|
|
|
<div class="grid-content ep-bg-purple">
|
|
|
<img :src="getImageUrl(item.url)" alt="">
|
|
|
<div class="course_content">
|
|
|
- <p>{{ item.title }} <span>下册</span></p>
|
|
|
+ <div class="div_title">
|
|
|
+ <span>下册</span>
|
|
|
+ {{ item.title }}
|
|
|
+ <!-- <el-popover placement="bottom" :width="200" trigger="click" show-after="1000">
|
|
|
+ <template #reference>
|
|
|
+ <img :src="DownloadImg" alt="" @click="getDate(item.id)">
|
|
|
+ </template>
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+ <span>资源列表({{ item.data.length }})</span>
|
|
|
+ <el-checkbox v-model="checked1" label="全选" size="large" @click="checkedAll(item.id)" />
|
|
|
+ </div>
|
|
|
+ <div v-if="item.data.length>0">
|
|
|
+ <div v-for="dataitem in item.data" :key="dataitem.id">
|
|
|
+ {{ dataitem }}
|
|
|
+ <img :src="PDFImg" alt="">
|
|
|
+ <span>资料下载</span>
|
|
|
+ <img :src="DownloadImg" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ 暂无数据
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="class_button" v-if="isupdateCourse">
|
|
|
<el-button style="width: 30%;background: rgba(240, 242, 245, 1);color: rgba(0, 0, 0, 0.6);"
|
|
@@ -69,6 +94,8 @@
|
|
|
<script setup>
|
|
|
import { ref, onMounted, watchEffect } from 'vue';
|
|
|
import { userCurrentRole, userInfoStore } from '../../stores/counter'
|
|
|
+import DownloadImg from '@/assets/img/download.png'
|
|
|
+import PDFImg from '@/assets/img/PDF.png'
|
|
|
import WarningImg from '@/assets/icon/icon.png'
|
|
|
import san1 from '../../assets/img/三下1.png'
|
|
|
import san2 from '@/assets/img/三下2.png'
|
|
@@ -94,6 +121,7 @@ import ba1 from '@/assets/img/八下1.png'
|
|
|
import ba2 from '@/assets/img/八下2.png'
|
|
|
import ba3 from '@/assets/img/八下3.png'
|
|
|
import ba4 from '@/assets/img/八下4.png'
|
|
|
+import { TRUE } from 'sass';
|
|
|
|
|
|
const user = userInfoStore()
|
|
|
const CurrentRole = userCurrentRole()
|
|
@@ -124,6 +152,8 @@ const currentData = ref({
|
|
|
})
|
|
|
const dialogVisible = ref(false)
|
|
|
const updateReductionId = ref("")
|
|
|
+const checked1 = ref(false)
|
|
|
+const visible = ref(false)
|
|
|
|
|
|
const courseData = {
|
|
|
"三年级": {
|
|
@@ -266,11 +296,17 @@ const courseData = {
|
|
|
}
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
+ // for (let i = 0; i < courseData["三年级"].xia.length; i++) {
|
|
|
+ // let o = courseData["三年级"].xia[i]
|
|
|
+ // courseData["三年级"].xia[i].data = getDate(o.id)
|
|
|
+ // }
|
|
|
+ getDate("bd49ea05-ed72-11ee-b534-005056b86db5")
|
|
|
currentData.value = courseData["三年级"]
|
|
|
})
|
|
|
const clickGrand = val => {
|
|
|
selectGrand.value = val
|
|
|
currentData.value = courseData[val]
|
|
|
+
|
|
|
}
|
|
|
const getImageUrl = (url) => {
|
|
|
return new URL(url, import.meta.url).href
|
|
@@ -301,9 +337,9 @@ const updateCourse = id => {
|
|
|
// let isSave = res.value[0].filter(x => {
|
|
|
// return x.courseId == id
|
|
|
// })
|
|
|
- top.U.MD.D.I.openInApplication('openCourseUpdate', res.value[0][0].courseId); //这个是打开指定的课程接口
|
|
|
+ top.U.MD.D.I.openInApplication('openCourseNewUpdate', res.value[0][0].courseId); //这个是打开指定的课程接口
|
|
|
} else {
|
|
|
- updateCourseId(id, "openCourseUpdate")
|
|
|
+ updateCourseId(id, "openCourseNewUpdate")
|
|
|
}
|
|
|
}, [], { "type": "POST", "withCredentials": true });
|
|
|
}
|
|
@@ -312,8 +348,8 @@ const updateCourseId = (id, type) => {
|
|
|
top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/copyCourseSz", [id, user.user.userid], function (res) {
|
|
|
console.log(res)
|
|
|
if (res.value[0][0].courseId != "") {
|
|
|
- if (type == "openCourseUpdate") {
|
|
|
- top.U.MD.D.I.openInApplication("openCourseUpdate", res.value[0][0].courseId)
|
|
|
+ if (type == "openCourseNewUpdate") {
|
|
|
+ top.U.MD.D.I.openInApplication("openCourseNewUpdate", res.value[0][0].courseId)
|
|
|
} else {
|
|
|
top.U.MD.D.I.openInApplication("studyDetail", res.value[0][0].courseId, 3, user.user.type);
|
|
|
}
|
|
@@ -345,9 +381,24 @@ const updateReduction = () => {
|
|
|
console.log(res, "还原")
|
|
|
dialogVisible.value = false
|
|
|
}, [], { "type": "POST", "withCredentials": true });
|
|
|
+}
|
|
|
+
|
|
|
+const getDate = id => {
|
|
|
+ console.log(id)
|
|
|
+ top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/selectCourseDetailSz", [id], function (res) {
|
|
|
+ console.log(res)
|
|
|
+ }, [], { "type": "POST", "withCredentials": true });
|
|
|
|
|
|
}
|
|
|
|
|
|
+const checkedAll = (id) => {
|
|
|
+ console.log(id, checked1.value)
|
|
|
+ // checked1.value = true
|
|
|
+}
|
|
|
+
|
|
|
+// 获取课程下载资料
|
|
|
+// top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/selectCourseDetailSz", ['课程id'], function (res) {}, [], { "type": "POST", "withCredentials": true });
|
|
|
+
|
|
|
watchEffect(() => {
|
|
|
if (JSON.stringify(user.user) != "{}") {
|
|
|
if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || user.user.type != 2) {
|
|
@@ -373,7 +424,7 @@ watchEffect(() => {
|
|
|
}
|
|
|
|
|
|
.course_content {
|
|
|
- p {
|
|
|
+ .div_title {
|
|
|
margin-top: 10px;
|
|
|
|
|
|
span {
|
|
@@ -382,9 +433,14 @@ watchEffect(() => {
|
|
|
background: rgba(224, 234, 251, 1);
|
|
|
border-radius: 5px;
|
|
|
font-size: 12px;
|
|
|
- float: right;
|
|
|
color: rgba(54, 129, 252, 1);
|
|
|
}
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 28px;
|
|
|
+ cursor: pointer;
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|