Sfoglia il codice sorgente

資料格式調整

osbert 6 anni fa
parent
commit
393d0a502d

+ 1 - 1
TEAMModelOS/ClientApp/api/classMgmt.js

@@ -1,5 +1,5 @@
 export default {
-  getTestData: function (data) {
+  GetTestData: function (data) {
     console.log(data)
   },
 }

+ 2 - 2
TEAMModelOS/ClientApp/api/index.js

@@ -1,8 +1,8 @@
 import { fetch, post } from '@/filters/http'
-import classMgmt from './classMgmt'
+import ClassMgmt from './classMgmt'
 import talMgmt from './talMgmt'
 export default {
-  classMgmt,
+  ClassMgmt,
   talMgmt,
   //获取登录跳转链接
   getLoginLink: function (data) {

+ 62 - 65
TEAMModelOS/ClientApp/view/schoolmgmtdashboard/Index.vue

@@ -95,17 +95,20 @@
                   <div class="classInfo" v-for="(item, index) in classInfoData" :key="index">
                     <Row type="flex" justify="center" align="bottom" style="border-bottom: solid 1px #94998a;padding-bottom: 7px;">
                       <Col :span="15">
-                        <h5>{{ item.className }}</h5>
-                        <span class="ellipsis subtitle">{{ item.classProduct }}&nbsp;&nbsp;|&nbsp;&nbsp;{{ item.classDetail }}</span>
+                        <h5>{{ item.groupNum }}, {{item.groupName}}</h5>
+                        <span class="ellipsis subtitle">{{ item.system }}&nbsp;&nbsp;|&nbsp;&nbsp;{{ $t('schoolMgmt.text2') }} {{item.serialExp}}, {{ item.groupTotal + $t('unit.text7') }}, {{ item.whiteBoardDriver }}, {{ item.IRSDriver }}</span>
                       </Col>
                       <Col :span="9">
-                        <span class="ellipsis teacherName">{{ item.teacherName}}</span>&nbsp;<Icon class="teachIcon" :size="15" type="ios-information-circle" />
+                        <span class="ellipsis teacherName">{{ item.teacher.name}}</span>
+                        <Tooltip :content="item.teacher.id" placement="left" theme="light">
+                          <Icon class="teachIcon" :size="15" type="ios-information-circle" />
+                        </Tooltip>
                         <Row  style="display: block;">
                           <Col :span="12" style="color: #48DBFC;">
-                            {{$t('schoolMgmt.hotclass')}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.classHot + $t('unit.text1')}}
+                            {{$t('schoolMgmt.hotclass')}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.hot + $t('unit.text1')}}
                           </Col>
-                          <Col :span="12" :class="classModeClass(item.classMode)">
-                            {{ classModeStr(item.classMode) }}&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;{{item.classTime}}
+                          <Col :span="12" :class="classModeClass(item.mode)">
+                            {{ classModeStr(item.mode) }}&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;{{item.usetime}}
                           </Col>
                         </Row>
                       </Col>
@@ -551,60 +554,54 @@ export default {
   data () {
     return {
       classInfoData:[
-        { 
-          'className': 'GE305, '+this.$t('schoolMgmt.text1')+'3',
-          'classProduct': 'Hiteach 3 TBL',
-          'classDetail': this.$t('schoolMgmt.text2')+' 2021-09-30, 50人, HBI082, RF05H',
-          'teacherName': 'Picc',
-          'classHot': '7',
-          'classTime': '00:45:03',
-          'classMode': 0
-        },
-        { 
-          'className': 'GE305, '+this.$t('schoolMgmt.text1')+'5',
-          'classProduct': 'Hiteach 3 TBL',
-          'classDetail': this.$t('schoolMgmt.text2')+' 2021-09-30, 50人, HBI082, RF05H',
-          'teacherName': 'Dr.Liang',
-          'classHot': '7',
-          'classTime': '--:--:--',
-          'classMode': 1
-        },
-        { 
-          'className': 'GE305, '+this.$t('schoolMgmt.text1')+'7',
-          'classProduct': 'Hiteach 3 TBL',
-          'classDetail': this.$t('schoolMgmt.text2')+' 2021-09-30, 50人, HBI082, RF05H',
-          'teacherName': 'Bruse',
-          'classHot': '7',
-          'classTime': '--:--:--',
-          'classMode': 2
-        },
-        { 
-          'className': 'GE305, '+this.$t('schoolMgmt.text1')+'3',
-          'classProduct': 'Hiteach 3 TBL',
-          'classDetail': this.$t('schoolMgmt.text2')+' 2021-09-30, 50人, HBI082, RF05H',
-          'teacherName': 'Picc',
-          'classHot': '7',
-          'classTime': '00:45:03',
-          'classMode': 0
-        },
-        { 
-          'className': 'GE305, '+this.$t('schoolMgmt.text1')+'5',
-          'classProduct': 'Hiteach 3 TBL',
-          'classDetail': this.$t('schoolMgmt.text2')+' 2021-09-30, 50人, HBI082, RF05H',
-          'teacherName': 'Willa',
-          'classHot': '7',
-          'classTime': '--:--:--',
-          'classMode': 1
-        },
-        { 
-          'className': 'GE305, '+this.$t('schoolMgmt.text1')+'7',
-          'classProduct': 'Hiteach 3 TBL',
-          'classDetail': this.$t('schoolMgmt.text2')+' 2021-09-30, 50人, HBI082, RF05H',
-          'teacherName': 'Bruse',
-          'classHot': '7',
-          'classTime': '--:--:--',
-          'classMode': 2
-        },
+        {
+          groupNum: 'GE305', 			// 教室代號
+          groupName: this.$t('schoolMgmt.text1') + '3',		// 教室名稱
+          groupTotal: 50,				// 上課人數
+          system: 'Hiteach 3 TBL',	// 使用版本
+          serialExp: '2021-09-30',	// 序號到期時間
+          whiteBoardDriver: 'HBI082', // 電子白板資訊
+          IRSDriver: 'RF05H',			// IRS資訊
+          teacher:{					// 教師資訊
+            name: 'picc',
+            id: 'picc#1234'
+          },
+          mode: 0, 					// 0:未啟動,1: 運行中,  2: 報修中
+          usetime: '--:--:--', 		// 使用時間          
+          hot: 7 						// 教室熱度
+        }, 
+        {
+          groupNum: 'GE305', 			// 教室代號
+          groupName: this.$t('schoolMgmt.text1') + '3',		// 教室名稱
+          groupTotal: 50,				// 上課人數
+          system: 'Hiteach 3 TBL',	// 使用版本
+          serialExp: '2021-09-30',	// 序號到期時間
+          whiteBoardDriver: 'HBI082', // 電子白板資訊
+          IRSDriver: 'RF05H',			// IRS資訊
+          teacher:{					// 教師資訊
+            name: 'picc',
+            id: 'picc#1234'
+          },
+          mode: 1, 					// 0:未啟動,1: 運行中,  2: 報修中
+          usetime: ' 00:45:03', 		// 使用時間
+          hot: 7 						// 教室熱度
+        },  
+        {
+          groupNum: 'GE305', 			// 教室代號
+          groupName: this.$t('schoolMgmt.text1') + '3',		// 教室名稱
+          groupTotal: 50,				// 上課人數
+          system: 'Hiteach 3 TBL',	// 使用版本
+          serialExp: '2021-09-30',	// 序號到期時間
+          whiteBoardDriver: 'HBI082', // 電子白板資訊
+          IRSDriver: 'RF05H',			// IRS資訊
+          teacher:{					// 教師資訊
+            name: 'picc',
+            id: 'picc#1234'
+          },
+          mode: 2, 					// 0:未啟動,1: 運行中,  2: 報修中
+          usetime: '--:--:--', 		// 使用時間
+          hot: 7 						// 教室熱度
+        },  
       ],
       scolBeg:{
         percent: '',
@@ -707,10 +704,10 @@ export default {
     classModeStr: function(val){
       switch (val) {
         case 0:
-          return this.$t('schoolMgmt.runing')
+          return this.$t('schoolMgmt.notInitiated')
           break;
         case 1:
-          return this.$t('schoolMgmt.notInitiated')
+          return this.$t('schoolMgmt.runing')
           break;
         case 2:
           return this.$t('schoolMgmt.repair')
@@ -720,10 +717,10 @@ export default {
     classModeClass: function(val){
       switch (val) {
         case 0:
-          return 'processing'
+          return 'unopen'
           break;
         case 1:
-          return 'unopen'
+          return 'processing'
           break;
         case 2:
           return 'maintain'
@@ -732,7 +729,7 @@ export default {
     }
   },
   created(){
-    this.$api.ClassMgmt.getTestData('234234');
+    this.$api.ClassMgmt.GetTestData('234234');
   },
   mounted(){
     var c=document.getElementById("floorplan");