chao 1 year ago
parent
commit
9893341572

+ 1 - 1
dist/assets/Details-eu5cAVe2.js → dist/assets/Details-CM3DIcFF.js

@@ -1 +1 @@
-import{u as m,r as i,o as p,a as r,b as a,c as t,w as o,d as c,e as u,t as b,f,g as h,C as v,h as k,P as y,i as g,j as C}from"./index-yQYs7y3d.js";const x={class:"iframDiv"},w={__name:"Details",setup(N){const{query:n,params:s}=m();console.log(n,s);const e=i("");return p(()=>{e.value=s.title}),(V,B)=>{const l=r("el-breadcrumb-item"),_=r("el-breadcrumb"),d=r("el-page-header");return a(),t(d,null,{breadcrumb:o(()=>[c(_,{separator:"/"},{default:o(()=>[c(l,{to:{path:"/"}},{default:o(()=>[u(" 首页 ")]),_:1}),c(l,null,{default:o(()=>[u(b(f(s).title),1)]),_:1})]),_:1})]),default:o(()=>[h("div",x,[e.value=="课程列表"?(a(),t(v,{key:0})):e.value=="资源中心"?(a(),t(k,{key:1})):e.value=="实践中心"?(a(),t(y,{key:2})):e.value=="其他课程资源"?(a(),t(g,{key:3})):C("",!0)])]),_:1})}}};export{w as default};
+import{u as m,r as i,o as p,a as r,b as a,c as t,w as o,d as c,e as u,t as b,f,g as h,C as v,h as k,P as y,i as g,j as C}from"./index-6Mk8Rs_B.js";const x={class:"iframDiv"},w={__name:"Details",setup(N){const{query:n,params:s}=m();console.log(n,s);const e=i("");return p(()=>{e.value=s.title}),(V,B)=>{const l=r("el-breadcrumb-item"),_=r("el-breadcrumb"),d=r("el-page-header");return a(),t(d,null,{breadcrumb:o(()=>[c(_,{separator:"/"},{default:o(()=>[c(l,{to:{path:"/"}},{default:o(()=>[u(" 首页 ")]),_:1}),c(l,null,{default:o(()=>[u(b(f(s).title),1)]),_:1})]),_:1})]),default:o(()=>[h("div",x,[e.value=="课程列表"?(a(),t(v,{key:0})):e.value=="资源中心"?(a(),t(k,{key:1})):e.value=="实践中心"?(a(),t(y,{key:2})):e.value=="其他课程资源"?(a(),t(g,{key:3})):C("",!0)])]),_:1})}}};export{w as default};

+ 1 - 1
dist/assets/admin-h19Sna1H.js → dist/assets/admin-FLD7BrUD.js

@@ -1 +1 @@
-import{_ as d,k as _,r as a,b as c,l as s,p as n,m as i,g as t,d as p}from"./index-yQYs7y3d.js";const l=e=>(n("data-v-5156346f"),e=e(),i(),e),u={class:"adminStudent"},f=l(()=>t("div",{style:{width:"100%",height:"100%"}},[t("iframe",{src:"//beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=a77e9404-efec-11e9-96f9-028edca3b798&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=",frameborder:"0",allow:"camera *; fullscreen *;fullscreen 'src'"})],-1)),m=[f],h={__name:"adminStudent",setup(e){return _({user:"",region:"",date:""}),a(0),a(5),a(4),a(10),(o,r)=>(c(),s("div",u,m))}},b=d(h,[["__scopeId","data-v-5156346f"]]),S={__name:"admin",setup(e){return(o,r)=>(c(),s("div",null,[p(b)]))}};export{S as default};
+import{_ as d,k as _,r as a,b as c,l as s,p as n,m as i,g as t,d as p}from"./index-6Mk8Rs_B.js";const l=e=>(n("data-v-5156346f"),e=e(),i(),e),u={class:"adminStudent"},f=l(()=>t("div",{style:{width:"100%",height:"100%"}},[t("iframe",{src:"//beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=a77e9404-efec-11e9-96f9-028edca3b798&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=",frameborder:"0",allow:"camera *; fullscreen *;fullscreen 'src'"})],-1)),m=[f],h={__name:"adminStudent",setup(e){return _({user:"",region:"",date:""}),a(0),a(5),a(4),a(10),(o,r)=>(c(),s("div",u,m))}},b=d(h,[["__scopeId","data-v-5156346f"]]),S={__name:"admin",setup(e){return(o,r)=>(c(),s("div",null,[p(b)]))}};export{S as default};

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-6Mk8Rs_B.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-bpm8dDPw.css


+ 2 - 2
dist/index.html

@@ -8,8 +8,8 @@
     <script>
       document.domain = "cocorobo.cn"
     </script>
-    <script type="module" crossorigin src="./assets/index-yQYs7y3d.js"></script>
-    <link rel="stylesheet" crossorigin href="./assets/index-64Zc-ID8.css">
+    <script type="module" crossorigin src="./assets/index-6Mk8Rs_B.js"></script>
+    <link rel="stylesheet" crossorigin href="./assets/index-bpm8dDPw.css">
   </head>
   <body>
     <div id="app"></div>

+ 0 - 1
src/components/header/headerRight.vue

@@ -61,7 +61,6 @@ watchEffect(() => {
             admin.value = true
         }
     }
-
 })
 </script>
 <style scoped lang="scss">

+ 33 - 30
src/components/main/Practice.vue

@@ -2,28 +2,27 @@
   <h2 class="contentTitle">实践中心</h2>
   <el-row :gutter="20">
     <el-col :span="6">
-      <div class="grid-content" @click="openApplication('szdjgCocooroboX')">
-        <!-- <router-link to="/iframe/实践中心/图形化"> -->
+      <div class="grid-content">
+        <router-link to="/iframe/实践中心/图形化">
         <img :src="GraphicsImg" alt="">
         <div>
           <span>图形化</span>
           <p>通过组合图形化程序进行人工智能硬件控制程序编写。</p>
         </div>
-        <!-- </router-link> -->
-
+      </router-link>
       </div>
     </el-col>
     <el-col :span="6">
-      <div class="grid-content" @click="openApplication('szdjgPython')">
-        <!-- <router-link to="/iframe/实践中心/Python"> -->
+      <div class="grid-content">
+        <router-link to="/iframe/实践中心/Python">
         <img :src="pythonImg" alt="">
         <div>
           <span>Python</span>
           <p>通过编写Python语言进行人工智能硬件控制程序编写。</p>
         </div>
-        <!-- </router-link> -->
-
+      </router-link>
       </div>
+      
     </el-col>
   </el-row>
 </template>
@@ -50,33 +49,37 @@ const openApplication = (type) => {
       min-height: 36px;
       background: #fff;
       border-radius: 10px;
-      text-decoration: none;
-      display: block;
-      position: relative;
-      padding: 16px;
-      cursor: pointer;
-
-      img {
-        width: 56px;
-      }
 
-      div {
-        position: absolute;
-        left: 80px;
-        top: 16px;
+      a {
+        text-decoration: none;
+        display: block;
+        position: relative;
+        padding: 16px;
 
-        span {
-          color: rgba(0, 0, 0, 0.9);
-          font-size: 14px;
-          margin-bottom: 10px;
-          font-weight: 400;
+        img {
+          width: 56px;
         }
 
-        p {
-          color: rgba(0, 0, 0, 0.4);
-          font-size: 12px;
-          padding-right: 20px;
+        div {
+          position: absolute;
+          left: 80px;
+          top: 16px;
+
+          span {
+            color: rgba(0, 0, 0, 0.9);
+            font-size: 14px;
+            margin-bottom: 10px;
+            font-weight: 400;
+          }
+
+          p {
+            color: rgba(0, 0, 0, 0.4);
+            font-size: 12px;
+            padding-right: 20px;
+          }
         }
+
+
       }
     }
   }

+ 25 - 12
src/components/main/courseSelect.vue

@@ -18,10 +18,10 @@
             <img :src="getImageUrl(item.url)" alt="">
             <div class="course_content">
               <p>{{ item.title }}<span>上册</span></p>
-              <div class="class_button">
-                <el-button>还原</el-button>
-                <el-button>备课</el-button>
-                <el-button class="el_button_active">上课</el-button>
+              <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);">还原</el-button>
+                <el-button style="width: 30%;background: #fff" @click="updateCourse(item.id)">修改</el-button>FF
+                <el-button class="el_button_active" @click="openCourseDetail(item.id)">查看</el-button>
               </div>
             </div>
           </div>
@@ -36,10 +36,10 @@
             <div class="course_content">
               <p>{{ item.title }} <span>下册</span></p>
             </div>
-            <div class="class_button">
-              <el-button style="width: 30%;">还原</el-button>
-              <el-button style="width: 30%;">备课</el-button>
-              <el-button style="width: 30%;" class="el_button_active">上课</el-button>
+            <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);">还原</el-button>
+              <el-button style="width: 30%;background: #fff" @click="updateCourse(item.id)">修改</el-button>
+              <el-button style="width: 30%;" class="el_button_active" @click="openCourseDetail(item.id)">查看</el-button>
             </div>
           </div>
         </el-col>
@@ -48,9 +48,12 @@
   </div>
 </template>
 <script setup>
-import { ref, onMounted } from 'vue';
+import { ref, onMounted, watchEffect } from 'vue';
+import { userInfoStore } from '../../stores/counter'
 
+const user = userInfoStore()
 const selectGrand = ref('三年级')
+const isupdateCourse = ref(false)
 const currentData = ref({
   shang: [
   ],
@@ -218,9 +221,6 @@ const courseData = {
 onMounted(() => {
   currentData.value = courseData["三年级"]
 })
-const getCurrenData = () => {
-  currentData.value = courseData[value.value]
-}
 const clickGrand = val => {
   selectGrand.value = val
   currentData.value = courseData[val]
@@ -232,6 +232,19 @@ const getImageUrl = (url) => {
 const openCourseDetail = (id) => {
   top.U.MD.D.I.openInApplication("studyDetail", id, 2, 1); //这个是打开指定的课程接口
 }
+const updateCourse = id => {
+  top.U.MD.D.I.openInApplication('openCourseUpdate', id)
+}
+
+watchEffect(() => {
+  if (JSON.stringify(user.user) != "{}") {
+    isLogin.value = true
+    userName.value = user.user.userName
+    if (user.user.currentRole == "areaAdministrator" || user.user.currentRole == "userAdministrator" || user.user.currentRole == "securityAuditor" || user.user.currentRole == "schoolAdministrator" || user.user.currentRole == "schoolSecurityAuditor" || user.user.currentRole == "teacher") {
+      isupdateCourse.value = true
+    }
+  }
+})
 </script>
 <style lang="scss" scoped>
 .course_select {

+ 18 - 3
src/views/main.vue

@@ -4,23 +4,38 @@
         <CourseSelect></CourseSelect>
         <resource></resource>
         <Practice></Practice>
-        <other></other>
-        <Edu></Edu>
+        <other v-if="isupdateCourse"></other>
+        <Edu v-if="isupdateCourse"></Edu>
     </div>
 </template>
 <script setup>
-import { ref } from 'vue';
+import { ref,watchEffect } from 'vue';
 import BannerVue from '@/components/main/banner.vue'
 import CourseSelect from '@/components/main/courseSelect.vue'
 import resource from '@/components/main/resource.vue';
 import Practice from '@/components/main/Practice.vue';
 import other from '@/components/main/other.vue';
 import Edu from '@/components/main/edu.vue';
+import { userInfoStore } from '../stores/counter'
+
+const user = userInfoStore()
+const isupdateCourse = ref(false)
+
+watchEffect(() => {
+  if (JSON.stringify(user.user) != "{}") {
+    isLogin.value = true
+    userName.value = user.user.userName
+    if (user.user.currentRole == "areaAdministrator" || user.user.currentRole == "userAdministrator" || user.user.currentRole == "securityAuditor" || user.user.currentRole == "schoolAdministrator" || user.user.currentRole == "schoolSecurityAuditor" || user.user.currentRole == "teacher") {
+      isupdateCourse.value = true
+    }
+  }
+})
 </script>
 <style lang="scss" scoped>
 .main{
     background: #F0F2F5;
     padding: 20px 10%;
+    min-height: calc(100% - 60px);
 }
 
 </style>

Some files were not shown because too many files changed in this diff