فهرست منبع

静态数据抽离

psycho 6 سال پیش
والد
کامیت
91ef2a798e

+ 2 - 0
TEAMModelOS.SmartClass/ClientApp/app.js

@@ -10,6 +10,7 @@ import iView from 'iview';
 import 'iview/dist/styles/iview.css';
 import commons from "@/utils/public.js";
 import apiTools from '@/api/api.js';
+import staticTools from '@/static/index.js';
 import { fetch, post } from '@/filters/http.js';
 import VideoPlayer from 'vue-video-player';
 import jwtDecode from 'jwt-decode';
@@ -31,6 +32,7 @@ Vue.prototype.$get = fetch;
 Vue.prototype.$eventBus = new Vue()
 
 Vue.prototype.$jwtDecode = jwtDecode;
+Vue.prototype.$staticTools = staticTools;
 
 Vue.use(vuescroll)
 Vue.prototype.$echarts = echarts

+ 2 - 2
TEAMModelOS.SmartClass/ClientApp/components/smart-class/headers.vue

@@ -10,8 +10,8 @@
         <li :class="this.$route.path ==  '/main/LiveBroadcast' || activeIndex == 4? 'li-active':''" @click="handleMenuClick(4,'LiveBroadcast')">天天直播</li>
         <li :class="this.$route.path ==  '/main/Lessons' || activeIndex == 5? 'li-active':''" @click="handleMenuClick(5,'Lessons')">优课汇聚</li>
       </ul>
-      <span class="btn-login" v-if="isLogin == 1" >欢迎&nbsp;{{userName}}!</span>
-      <Icon type="md-power" v-if="isLogin == 1" @click="loginOut" style="margin-left:30px;" size="20" color="white" />
+      <span class="btn-login" v-if="isLogin == 1" >欢迎&nbsp;{{userName}} !</span>
+      <Icon type="md-power" v-if="isLogin == 1" @click="loginOut" style="margin-left:30px;cursor:pointer" size="20" title="退出登录" color="white" />
       <span class="btn-login" v-else @click="handleMenuClick(6,'/login')">登录</span>
     </div>
   </div>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 114422
TEAMModelOS.SmartClass/ClientApp/static/area.json


+ 10 - 0
TEAMModelOS.SmartClass/ClientApp/static/index.js

@@ -0,0 +1,10 @@
+'use strict';
+module.exports = {
+  indexNoticeList: require('@/static/indexNoticeList.json').list, //首页通知公告数据
+  indexActivityList: require('@/static/reviewAcList.json').data.list, //首页评审活动数据
+  noticeAllList: require('@/static/noticeList.json').list, //通知公告页面数据
+  reviewAcList: require('@/static/reviewAcList.json').data.list, //评审活动页面数据
+  pastAcList: require('@/static/pastAcList.json').data.list, //往届回顾页面数据
+  lessonList: require("@/static/lessonList.json"), //天天直播页面数据
+  lessons: require("@/static/lessons.json").list, //优课汇聚页面数据
+};

+ 43 - 43
TEAMModelOS.SmartClass/ClientApp/static/lessonDetails.json

@@ -3,70 +3,70 @@
     "activityStatus": 2,
     "activityStatusTip": "已结束",
     "autoChangeViewActivityStatus": true,
-    "commentCount": 52,
-    "cover": "1胡建良.png",
-    "coverHash": "127.png",
-    "coverUri": "/upload/viewactivity/cover/127/127.png?_=1557819330146",
-    "description": "<br>",
+    "commentCount": 8,
+    "cover": "徐益敏.png",
+    "coverHash": "350.png",
+    "coverUri": "/upload/viewactivity/cover/350/350.png?_=1558335549883",
+    "description": null,
     "dianZanCount": 0,
-    "employeeName": "吴雁",
-    "employeeNo": "41489",
+    "employeeName": "楼宽",
+    "employeeNo": "31050",
     "endTime": {
-      "date": 18,
+      "date": 14,
       "day": 5,
-      "hours": 16,
-      "minutes": 5,
-      "month": 4,
+      "hours": 10,
+      "minutes": 47,
+      "month": 11,
       "nanos": 0,
       "seconds": 0,
-      "time": 1526630700000,
+      "time": 1544755620000,
       "timezoneOffset": -480,
       "year": 118
     },
-    "id": 127,
+    "id": 350,
     "joinWay": 0,
-    "liveHls": "http://jpkt.sxedu.org:6080/hls/13CA5E3AD6DB4DF5865839BB47C134F8.m3u8",
-    "liveRtmp": "rtmp://jpkt.sxedu.org:1935/hls/13CA5E3AD6DB4DF5865839BB47C134F8",
-    "name": "创新实验室(学科教室)课例20180518直播",
-    "notice": "<br>",
+    "liveHls": null,
+    "liveRtmp": null,
+    "name": "2018年柯桥区天天智慧课堂十佳优质课展示",
+    "notice": null,
     "ownUnit": "柯桥区教师发展中心",
-    "parentCategoryId": 24,
-    "parentCategoryName": "创客",
-    "parentGradeId": 13,
-    "parentGradeName": "高一",
-    "parentGradeSectionId": 3,
-    "parentGradeSectionName": "中",
-    "parentProjectId": 103,
-    "parentProjectName": "简易冠啸机器人搭建",
-    "parentTeachePlateId": 19,
-    "parentTeachePlateName": "冠啸创新实验室",
-    "reviewContent": "本次直播总点击量: 68 评论数: 44 今日直播只推PC端,采用移动录播设备直播,直播视频推送画面清晰,播放过程流畅无锯齿拖影,声音干净。上课学校设备保障充分,教师教学过程实施完整。直播过程网络通畅,没有出现画面中断停顿现象。",
+    "parentCategoryId": 18,
+    "parentCategoryName": "化学",
+    "parentGradeId": 12,
+    "parentGradeName": "九年级",
+    "parentGradeSectionId": 2,
+    "parentGradeSectionName": "中",
+    "parentProjectId": 286,
+    "parentProjectName": "《分子和原子》",
+    "parentTeachePlateId": 0,
+    "parentTeachePlateName": null,
+    "reviewContent": null,
     "school": null,
-    "schoolName": "绍兴市柯桥区钱清中学",
-    "schoolNo": "11AFC704D0A5FE66E050A8C027277C89",
-    "score": 87.67,
-    "speaker": "胡建良",
+    "schoolName": "柯桥区教师发展中心",
+    "schoolNo": "11AFC704CA3EFE66E050A8C027277C89",
+    "score": null,
+    "speaker": "徐益敏",
     "startTime": {
-      "date": 18,
+      "date": 14,
       "day": 5,
-      "hours": 15,
-      "minutes": 20,
-      "month": 4,
+      "hours": 10,
+      "minutes": 0,
+      "month": 11,
       "nanos": 0,
       "seconds": 0,
-      "time": 1526628000000,
+      "time": 1544752800000,
       "timezoneOffset": -480,
       "year": 118
     },
-    "timeRangeTip": "2018.05.18 15:20 - 05.18 16:05",
-    "timeRangeTipHHmm": "15:20 - 16:05",
+    "timeRangeTip": "2018.12.14 10:00 - 12.14 10:47",
+    "timeRangeTipHHmm": "10:00 - 10:47",
     "videoHls": null,
     "videoRtmp": null,
     "viewActivityAwardSetList": [],
-    "viewCount": 97,
-    "viewType": 0,
-    "viwActivityType": 1,
-    "viwActivityTypeTip": "创新实验室",
+    "viewCount": 69,
+    "viewType": 1,
+    "viwActivityType": 0,
+    "viwActivityTypeTip": "新媒体新技术",
     "workHonor": null,
     "yearNo": 2018
   },

+ 1 - 161
TEAMModelOS.SmartClass/ClientApp/store/index.js

@@ -6,11 +6,6 @@ Vue.use(Vuex)
 // TYPES
 const MAIN_SET_COUNTER = 'MAIN_SET_COUNTER'
 
-// STATE
-//const state = {
-//  counter: 1
-//}
-
 
 // MUTATIONS
 const mutations = {
@@ -31,160 +26,5 @@ export default new Vuex.Store({
   mutations,
   actions,
   state: {
-    //选择关注年级
-    selectgrade: [],
-    //选择关注学期
-    selectterm: [],
-    //选择某次考试
-    selectexam: {},
-    //基础数据
-    basicsdata: {},
-    //柱状图
-    zhuxhuang: {},
-    //雷达图
-    leida: {},
-    //饼图
-    pie: {},
-     //折线图(大)
-    linechart: {},
-    //考试类型选择
-    examtype: {},
-
-    //文理科展现
-    wenli_show: true,
-
-    //任教老师页面
-    //选择数据对比
-    selectcontrast: [],
-    //柱状图
-    barline: {},
-    //大饼图
-    annulus: {},
-    //PR
-    accuracyPR: {},
-
-    periodList: [{
-      value: '1',
-      label: '1',
-      children: [
-        {
-          value: '1-1',
-          label: '1-1',
-          children: [
-            {
-              value: '1-1-1',
-              label: '1-1-1',
-              children: [
-                {
-                  value: '1-1-1-1',
-                  label: '1-1-1-1',
-                }
-              ]
-            },
-            {
-              value: '1-1-2',
-              label: '1-1-2',
-              children: [
-                {
-                  value: '1-1-2-1',
-                  label: '1-1-2-1',
-                }
-              ]
-            }
-          ]
-        },
-        {
-          value: '1-2',
-          label: '1-2',
-          children: [
-            {
-              value: '1-2-1',
-              label: '1-2-1',
-              children: [
-                {
-                  value: '1-2-1-1',
-                  label: '1-2-1-1',
-                }
-              ]
-            },
-            {
-              value: '1-2-2',
-              label: '1-2-2',
-              children: [
-                {
-                  value: '1-2-2-1',
-                  label: '1-2-2-1',
-                }
-              ]
-            }
-          ]
-        },
-
-      ]
-    }, {
-      value: '2',
-      label: '2',
-      children: [
-        {
-          value: '2-1',
-          label: '2-1',
-          children: [
-            {
-              value: '2-1-1',
-              label: '2-1-1',
-              children: [
-                {
-                  value: '2-1-1-1',
-                  label: '2-1-1-1',
-                }]
-            },
-            {
-              value: '2-1-2',
-              label: '2-1-2',
-              children: [
-                {
-                  value: '2-1-2-1',
-                  label: '2-1-2-1'
-                },
-                {
-                  value: '2-1-2-2',
-                  label: '2-1-2-2'
-                }
-              ]
-            },
-          ]
-        },
-        {
-          value: '2-2',
-          label: '2-2',
-          children: [
-            {
-              value: '2-2-1',
-              label: '2-2-1',
-              children: [
-                {
-                  value: '2-2-1-1',
-                  label: '2-2-1-1',
-                }]
-            },
-            {
-              value: '2-2-2',
-              label: '2-2-2',
-              children: [
-                {
-                  value: '2-2-2-1',
-                  label: '2-2-2-1'
-                },
-                {
-                  value: '2-2-2-2',
-                  label: '2-2-2-2'
-                }
-              ]
-            },
-          ]
-        },
-
-      ]
-    }]
-  },
+  }
 })

+ 2 - 3
TEAMModelOS.SmartClass/ClientApp/view/smart-class/CommentVideo.vue

@@ -7,7 +7,7 @@
 
       <div class="comment-video-src">
         <div>
-          <p style=" font-size: 14px; margin-bottom: 20px;"><span class="title-header">标题 : <span class="title-content">创新实验室(学科教室)课例20190508直播</span></span> <span class="title-header">主讲人 : 燕<span class="title-content"></span></span> <span class="liveStatus">播放成功</span></p>
+          <p style=" font-size: 14px; margin-bottom: 20px;"><span class="title-header">标题 : <span class="title-content">创新实验室(学科教室)课例20190508直播</span></span> <span class="title-header">主讲人 : 燕<span class="title-content"></span></span> <span class="liveStatus">播放成功</span></p>
         </div>
         <video controls="controls" width="780" style="display:block;"
                src="https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelcontest/20190516/acalssOne%E7%BD%91%E9%A1%B5%E7%99%BB%E5%BD%95%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95.mp4">
@@ -103,7 +103,6 @@
       } else {
         this.routerData = this.rewardDatas[index];
       }
-      
     },
     
     watch: {
@@ -119,7 +118,7 @@
     }
   }
 </script>
-<style scoped>
+<style>
   .video-page {
     width: 1200px;
     margin: 100px auto;

+ 5 - 2
TEAMModelOS.SmartClass/ClientApp/view/smart-class/LessonDetails.vue

@@ -78,6 +78,7 @@
 </template>
 <script>
   import lessonInfo from '@/static/lessonDetails.json'
+import { setTimeout } from 'core-js';
   export default {
     components: {
     },
@@ -163,7 +164,6 @@
         }]
       };
 
-      myChart.setOption(option);
 
       let comments = this.$echarts.init(document.getElementById('comments'));
       let commentList = lessonInfo.comments.map(a => a.commentCount);
@@ -212,7 +212,10 @@
         }]
       };
 
-      comments.setOption(commentsOption);
+      setTimeout(function () {
+        myChart.setOption(option);
+        comments.setOption(commentsOption);
+      }, 1000);
     }
   }
 </script>

+ 1 - 17
TEAMModelOS.SmartClass/ClientApp/view/smart-class/Lessons.vue

@@ -40,28 +40,12 @@
     },
 
     created() {
-      this.lessons = lessons.list;
+      this.lessons = this.$staticTools.lessons;
     },
     methods: {
-      getList(type) {
-        let list = noticeList.list;
-        var newArray = list.filter(function(item){
-            return item.noticeTypeId == type;
-        });
-        this.noticeList = newArray;
-      },
-
-      handleMenuClick(index,typeId,name) {
-        this.activeIndex = index;
-        this.typeName = name;
-        this.getList(typeId);
-      },
-
       goDetails() {
         this.$router.push('lessonList')
       }
-
-
     },
     mounted() {
     }

+ 1 - 1
TEAMModelOS.SmartClass/ClientApp/view/smart-class/LiveBroadcast.vue

@@ -109,7 +109,7 @@
     },
     mounted() {
       this._this = this;
-      this.lessonList = require("@/static/lessonList.json");
+      this.lessonList = this.$staticTools.lessonList;
       for (let i = 0; i < this.lessonList.length; i++) {
       
         var sdate = new Date(this.lessonList[i].startTime.time);

+ 5 - 6
TEAMModelOS.SmartClass/ClientApp/view/smart-class/PastReview.vue

@@ -60,7 +60,6 @@
   </div>
 </template>
 <script>
-  import acList from '@/static/pastAcList.json'
   export default {
     components: {
     },
@@ -70,7 +69,8 @@
         activeOrder: 0,
         pageSize: 9,
         searchVal:"",
-        activities: acList.data.list
+        activities: this.$staticTools.pastAcList,
+        allList:this.$staticTools.pastAcList
       }
     },
     methods: {
@@ -79,11 +79,11 @@
       },
       handleMenuClick(index,val) {
         this.activeIndex = index;
-        this.activities = index == 0 ? acList.data.list : acList.data.list.filter(item => item.submitTimeTip.substring(0,4) == val);
+        this.activities = index == 0 ? this.allList : this.allList.filter(item => item.submitTimeTip.substring(0,4) == val);
       },
       handleOrderClick(index) {
         this.activeOrder = index;
-        let list = acList.data.list;
+        let list = this.activities;
         this.activities = list.sort(this.compare('applyCount'));
       },
       compare(property){
@@ -94,8 +94,7 @@
         }
       },
       handleSearch() {
-        console.log(acList.data.list.filter(item => item.name.indexOf(this.searchVal) != -1));
-        this.activities = acList.data.list.filter(item => item.name.indexOf(this.searchVal) != -1);
+        this.activities = this.allList.filter(item => item.name.indexOf(this.searchVal) != -1);
       }
 
     },

+ 1 - 9
TEAMModelOS.SmartClass/ClientApp/view/smart-class/ReviewActivity.vue

@@ -27,7 +27,6 @@
   </div>
 </template>
 <script>
-    import acList from '@/static/reviewAcList.json'
   export default {
     components: {
     },
@@ -38,16 +37,9 @@
     },
 
     created() {
-      this.reviewAcList = acList.data.list;
+      this.reviewAcList = this.$staticTools.reviewAcList
     },
     methods: {
-      getList(type) {
-        let list = noticeList.list;
-        var newArray = list.filter(function(item){
-            return item.noticeTypeId == type;
-        });
-        this.noticeList = newArray;
-      },
 
       handleMenuClick(index,typeId,name) {
         this.activeIndex = index;

+ 2 - 1
TEAMModelOS.SmartClass/ClientApp/view/smart-class/RewardDetails.vue

@@ -52,7 +52,8 @@
               </Tabs>
               <Table :columns="columns1" :data="rewardDatas">
                 <template slot-scope="{ row, index }" slot="applyName" >
-                  <Icon color="#A8CDF3" size="20" type="logo-youtube" style="cursor:pointer;"/><strong  style="margin-right: 5px;cursor:pointer;" @click="showVideo(index)">{{row.applyName}}</strong>
+                  <Icon color="#A8CDF3" size="20" type="logo-youtube" style="cursor:pointer;margin-right:5px;margin-bottom:3px"/>
+                  <strong  style="margin-right: 5px;cursor:pointer;" @click="showVideo(index)">{{row.applyName}}</strong>
                 </template>
               </Table>
             </div>

+ 13 - 2
TEAMModelOS.SmartClass/ClientApp/view/smart-class/Video.vue

@@ -39,7 +39,7 @@
         </Form>
         <div class="download-video">
 
-          <a download="video" style="color:#999999;font-size:14px;" href="https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelcontest/20190516/acalssOne%E7%BD%91%E9%A1%B5%E7%99%BB%E5%BD%95%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95.mp4">
+          <a download="video" style="color:#fff;font-size:14px;" href="https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelcontest/20190516/acalssOne%E7%BD%91%E9%A1%B5%E7%99%BB%E5%BD%95%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95.mp4">
             <Icon type="md-cloud-download" size="22" color="white" />
             下载视频
           </a>
@@ -157,10 +157,12 @@
   }
   .video-detail-info {
     width:400px;
+    color:#fff;
     background:#222222;
     display:table-cell;
     vertical-align:top;
     padding:20px 10px 20px 30px;
+    font-size:14px;
     position:relative;
   }
     .video-detail-info .ivu-form-item {
@@ -168,12 +170,21 @@
     }
     .video-detail-info .ivu-form .ivu-form-item-label {
       font-size:14px;
-      color:#999999;
+      color:ffffff;
     }
     .video-detail-info .ivu-form-item-content {
       font-size: 14px;
       color: #ffffff;
     }
+
+  .video-info /deep/ .ivu-form .ivu-form-item-label {
+    color:#ffffff;
+    font-size:14px;
+  }
+
+  .video-info .ivu-form-item-content {
+    font-size:14px;
+  }
   .video-src {
     display:table-cell;
     width:800px;

+ 2 - 4
TEAMModelOS.SmartClass/ClientApp/view/smart-class/index.vue

@@ -82,8 +82,6 @@
 </template>
 <script>
   import headers from '@/components/smart-class/headers'
-  import indexNoticeList from '@/static/indexNoticeList.json'
-  import indexActivityList from '@/static/reviewAcList.json'
   export default {
     components: {
       headers
@@ -95,8 +93,8 @@
       }
     },
     created() {
-      this.noticeList = indexNoticeList.list;
-      this.activityList = indexActivityList.data.list;
+      this.noticeList = this.$staticTools.indexNoticeList;
+      this.activityList = this.$staticTools.indexActivityList;
     },
     methods: {
       handleNoticeClick() {

+ 4 - 3
TEAMModelOS.SmartClass/ClientApp/view/smart-class/notice.vue

@@ -26,7 +26,6 @@
 </template>
 <script>
 
-  import noticeList from '@/static/noticeList.json'
   export default {
     components: {
     },
@@ -44,16 +43,18 @@
             key: 'startTime'
           }
         ],
-        noticeList: noticeList.list
+        allList:[],
+        noticeList: []
       }
     },
 
     created() {
+      this.allList = this.$staticTools.noticeAllList;
       this.getList(0);
     },
     methods: {
       getList(type) {
-        let list = noticeList.list;
+        let list = this.allList;
         var newArray = list.filter(function(item){
             return item.noticeTypeId == type;
         });

+ 3 - 0
TEAMModelOS.SmartClass/TEAMModelOS.SmartClass.csproj

@@ -13,6 +13,9 @@
     <None Remove="ClientApp\components\新文件夹1\**" />
     <None Remove="Providers\**" />
   </ItemGroup>
+  <ItemGroup>
+    <Content Remove="ClientApp\static\area.json" />
+  </ItemGroup>
   <ItemGroup>
     <PackageReference Include="Microsoft.AspNetCore.App" />
   </ItemGroup>