chao 2 týždňov pred
rodič
commit
c12279f7fa

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/assets/Details-I1V_MFyp.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/assets/admin-BfluqGXi.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/assets/index-hpWPu8Nf.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/assets/index-yCVjghuJ.js


+ 2 - 2
dist/index.html

@@ -8,8 +8,8 @@
     <script>
       document.domain = "cocorobo.cn"
     </script>
-    <script type="module" crossorigin src="./assets/index-zbjDykjs.js"></script>
-    <link rel="stylesheet" crossorigin href="./assets/index-6zDw5fEV.css">
+    <script type="module" crossorigin src="./assets/index-yCVjghuJ.js"></script>
+    <link rel="stylesheet" crossorigin href="./assets/index-hpWPu8Nf.css">
   </head>
   <body>
     <div id="app"></div>

+ 4 - 1
src/App.vue

@@ -5,11 +5,12 @@ import Header from './views/header.vue';
 import axios from 'axios';
 import qs from 'qs';
 import { ElMessageBox } from 'element-plus'
-import { userInfoStore, userCurrentRole } from './stores/counter'
+import { userInfoStore, userCurrentRole,userCurrent } from './stores/counter'
 
 const route = useRoute()
 const store = userInfoStore()
 const CurrentRole = userCurrentRole()
+const Current = userCurrent()
 const name = ref('')
 const isShow = ref(true)
 const setTimeState = ref(null)
@@ -84,6 +85,7 @@ const userInfo = (data) => {
   if (data.currentRole == "edupersonnel" || data.currentRole == "areaAdministrator" || data.currentRole == "userAdministrator" || data.currentRole == "securityAuditor" || data.currentRole == "schoolAdministrator" || data.currentRole == "schoolSecurityAuditor" || data.currentRole == "teacher") {
     isShow.value = true
     CurrentRole.setUserCurrentRole(data.currentRole)
+    Current.setUserCurrent(data)
     userIdentity = 1
     let userGrand = ""
     if (data.childList && data.childList.length > 0) {
@@ -128,6 +130,7 @@ const userInfo2 = (data) => {
   let userIdentity = 1
   isShow.value = true
   CurrentRole.currentRole == data.user_role.join(",")
+  Current.setUserCurrent(data)
   userIdentity = 1
   let userGrand = ""
 

+ 38 - 18
src/components/main/courseSelect.vue

@@ -68,11 +68,11 @@
                 </template>
                 <ul class="beike">
                   <li @click="openCourseDetail(item.id)">查看</li>
-                  <li @click="updateCourse(item.id)">修改</li>
+                  <li @click="updateCourse(item.id,item)">修改</li>
                   <li @click="ReductionCourse(item.id)">还原</li>
                 </ul>
               </el-popover>
-              <el-button :style="item.courseType == '1'?'width: 50%;':'width: 100%;'" class="el_button_active" @click="openCourseDetail(item.id)">上课</el-button>
+              <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>
@@ -128,11 +128,11 @@
                 </template>
                 <ul class="beike">
                   <li @click="openCourseDetail(item.id)">查看</li>
-                  <li @click="updateCourse(item.id)">修改</li>
+                  <li @click="updateCourse(item.id,item)">修改</li>
                   <li @click="ReductionCourse(item.id)">还原</li>
                 </ul>
               </el-popover>
-              <el-button :style="item.courseType == '1'?'width: 50%;':'width: 100%;'" class="el_button_active" @click="openCourseDetail(item.id)">上课</el-button>
+              <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>
@@ -159,7 +159,7 @@
 </template>
 <script setup>
 import { ref, onMounted, watchEffect } from 'vue';
-import { userCurrentRole, userInfoStore } from '../../stores/counter'
+import { userCurrentRole, userInfoStore,userCurrent } from '../../stores/counter'
 import JSZip from 'jszip';
 import { saveAs } from 'file-saver';
 import DownloadImg from '@/assets/img/download.png'
@@ -167,6 +167,7 @@ import PDFImg from '@/assets/img/PDF.png'
 import WarningImg from '@/assets/icon/icon.png'
 import courseDataJson from '@/assets/course.json'
 import { Value } from 'sass';
+import { dataType } from 'element-plus/es/components/table-v2/src/common';
 
 
 const props = defineProps({
@@ -178,6 +179,7 @@ const props = defineProps({
 const volumes = ref(true)
 const user = userInfoStore()
 const CurrentRole = userCurrentRole()
+const Current = userCurrent()
 const selectGrand = ref('三年级')
 const isupdateCourse = ref(false)
 const currentData = ref(courseDataJson.old.三年级)
@@ -210,9 +212,10 @@ const getImageUrl = (url) => {
   return new URL(url, import.meta.url).href
 }
 
-const openCourseDetail = (id) => {
+const openCourseDetail = (id,item) => {
   console.log(user.user)
   // 会返回复制得课程
+  getTimeCourse(id,item)
   top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/getcopyCourseByUseridSz", [id, user.user.userid], function (res) {
     console.log(res)
     if (res.value[0].length > 0) {
@@ -227,20 +230,37 @@ const openCourseDetail = (id) => {
   }, [], { "type": "POST", "withCredentials": true });
 
 }
-const getTimeCourse = (id) => {
-  try {
-    setInterval(() => {
-      top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/addOperationTimeT", [user.user.userid, id, '5', 30], function (res) {
-        console.log(res, "22222222222222222");
-      }, [], { "type": "POST", "withCredentials": true });
-    }, 30000)
-  } catch (e) {
-    console.log(e)
-  }
+const getTimeCourse = (id,item) => {
+  const interValtTime = Math.floor(Math.random() * (10 - 5 + 1) + 5) * 60 * 1000;
+  // const params = {
+  //   serverName: "深教AI6",
+  //   dataType: type,
+  //   teacherName: user.user.name,
+  //   teacherAccount: "",
+  //   eduId: id,
+  //   schoolName: user.user.schoolName,
+  //   schoolType: user.user.userid,
+  //   area: user.user.name,
+  //   courseName: user.user.type,
+  //   courseGrade: user.user.role,
+  //   courseTime: user.user.grade,
+  //   startTime: user.user.class,
+  //   endTime: user.user.subject,
+  // }
+  console.log(user.user,Current,item,id,interValtTime)
+  // try {
+  //   setInterval(() => {
+  //     top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/addOperationTimeT", [user.user.userid, id, '5', 30], function (res) {
+  //       console.log(res, "22222222222222222");
+  //     }, [], { "type": "POST", "withCredentials": true });
+  //   }, interValtTime)
+  // } catch (e) {
+  //   console.log(e)
+  // }
 }
-const updateCourse = id => {
+const updateCourse = (id,item) => {
   // 会返回courseId和state 两个参数  然后打开
-  getTimeCourse(id)
+  getTimeCourse(id,item)
   top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/getcopyCourseByUseridSz", [id, user.user.userid], function (res) {
     console.log(res)
     if (res.value[0].length > 0) {

+ 14 - 0
src/stores/counter.js

@@ -28,3 +28,17 @@ export const userCurrentRole = defineStore({
     }
   }
 })
+
+export const userCurrent = defineStore({
+  id: 'userCurrentRoleId',
+  state: () => {
+    return {
+      userCurrent: {}
+    }
+  },
+  actions: {
+    setUserCurrent(userCurrent) {
+      this.userCurrent = userCurrent
+    }
+  }
+})

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov