liqk 2 роки тому
батько
коміт
a8c929eeed

+ 34 - 33
TEAMModelOS/ClientApp/src/view/areaMgmt/AreaData.vue

@@ -23,7 +23,7 @@
             </div>
             <!-- 网络研修数据统计 -->
             <div class="online-train-wrap">
-                <h4 class="block-title">{{$('td.td1')}}</h4>
+                <h4 class="block-title">{{$t('td.td1')}}</h4>
                 <div class="online-data-wrap">
                     <div class="percent-wrap border-style">
                         <Percent :count="dimensions"></Percent>
@@ -35,7 +35,7 @@
             </div>
             <!-- 学时数据统计 -->
             <div class="online-train-wrap" style="margin-bottom:40px">
-                <h4 class="block-title">{{$('td.td2')}}</h4>
+                <h4 class="block-title">{{$t('td.td2')}}</h4>
                 <div class="hour-data-wrap">
                     <div class="hour-data-item border-style" v-for="(item,index) in hourData" :key="index">
                         <p class="hour-data-title">
@@ -43,11 +43,11 @@
                             <!-- <span class="hour-value">({{item.total}}学时)</span> -->
                         </p>
                         <p class="hour-data-info" v-show="index == 0">
-                            {{`${$('td.td3')}${item.time}${$('td.td4')}`}}
-                            <span>{{`(${item.studyHour}${$('td.td5')})`}}</span>
+                            {{`${$t('td.td3')}${item.time}${$t('td.td4')}`}}
+                            <span>{{`(${item.studyHour}${$t('td.td5')})`}}</span>
                         </p>
                         <p class="hour-data-info" v-show="index !== 0" style="color:white">
-                            {{$('td.td5')}}
+                            {{$t('td.td5')}}
                             <!-- {{`总学时:${item.studyHour}学时`}} -->
                         </p>
                         <div class="hour-chart">
@@ -56,23 +56,23 @@
                                 <div>
                                     <p class="legend-item">
                                         <span>
-                                            {{$('td.td6')}}{{item.uncomplete}}{{$('unit.text7')}}
+                                            {{$t('td.td6')}}{{item.uncomplete}}{{$t('unit.text7')}}
                                         </span>
                                     </p>
                                     <p class="legend-item">
                                         <span>
-                                            {{$('td.td7')}}{{item.going}}{{$('unit.text7')}}
+                                            {{$t('td.td7')}}{{item.going}}{{$t('unit.text7')}}
                                         </span>
                                     </p>
                                     <p class="legend-item">
                                         <span>
-                                            {{$('td.td8')}}{{item.complete}}{{$('unit.text7')}}
+                                            {{$t('td.td8')}}{{item.complete}}{{$t('unit.text7')}}
                                         </span>
                                     </p>
                                 </div>
                                 <i-circle :percent="item.percent" :size="70">
                                     <span>{{item.percent}}%</span>
-                                    <p style="font-size:12px;margin-top:5px">{{$('td.td9')}}</p>
+                                    <p style="font-size:12px;margin-top:5px">{{$t('td.td9')}}</p>
                                 </i-circle>
                             </div>
                         </div>
@@ -83,7 +83,7 @@
             <!-- 学校概览 -->
             <div class="online-train-wrap" style="margin-bottom:40px">
                 <div>
-                    <h4 class="block-title">{{$('td.td10')}}</h4>
+                    <h4 class="block-title">{{$t('td.td10')}}</h4>
                 </div>
                 <div class="school-data-wrap border-style">
                     <SchoolComp :schools="schoolList"></SchoolComp>
@@ -93,14 +93,14 @@
             <!-- 学校列表 -->
             <div class="online-train-wrap" style="margin-bottom:40px">
                 <div>
-                    <h4 class="block-title">{{$('td.td11')}}</h4>
+                    <h4 class="block-title">{{$t('td.td11')}}</h4>
                     <Button class="export-data-wrap" type="primary" icon="md-cloud-download" @click="exportSchoolData">
-                        {{$('td.td12')}}
+                        {{$t('td.td12')}}
                     </Button>
                     <Button style="margin-right:15px" class="export-data-wrap" type="primary" icon="md-cloud-download" @click="exportTeacherData">
-                        {{$('td.td13')}}
+                        {{$t('td.td13')}}
                     </Button>
-                    <Input v-special-char search :placeholder="$('td.td14')" class="school-search" v-model="keyWord" @on-change="searchSchool" />
+                    <Input v-special-char search :placeholder="$t('td.td14')" class="school-search" v-model="keyWord" @on-change="searchSchool" />
                 </div>
                 <div class="school-data-wrap">
                     <div class="school-data-item border-style" v-for="(item,index) in schoolListShow" :key="index">
@@ -108,27 +108,27 @@
                         <div style="margin-left:10px;height:fit-content;">
                             <p class="school-name" :title="item.schoolName">{{item.schoolName}}</p>
                             <p class="school-value">
-                                <span>{{$('td.td15')}}:</span>
-                                <span>{{item.trainCount}}{{$('unit.text7')}}</span>
+                                <span>{{$t('td.td15')}}:</span>
+                                <span>{{item.trainCount}}{{$t('unit.text7')}}</span>
                             </p>
                             <p class="school-value">
-                                <span>{{$('td.td6')}}</span>
-                                <span>{{item.pending || 0}}{{$('unit.text7')}}</span>
+                                <span>{{$t('td.td6')}}</span>
+                                <span>{{item.pending || 0}}{{$t('unit.text7')}}</span>
                             </p>
                             <p class="school-value">
-                                <span>{{$('td.td7')}}</span>
-                                <span>{{item.going || 0}}{{$('unit.text7')}}</span>
+                                <span>{{$t('td.td7')}}</span>
+                                <span>{{item.going || 0}}{{$t('unit.text7')}}</span>
                             </p>
                             <p class="school-value">
-                                <span>{{$('td.td8')}}</span>
-                                <span>{{item.finish || 0}}{{$('unit.text7')}}</span>
+                                <span>{{$t('td.td8')}}</span>
+                                <span>{{item.finish || 0}}{{$t('unit.text7')}}</span>
                             </p>
                             <span class="to-school-detail" @click="toSchoolDetail(index)">
-                                {{$('td.td16')}}
+                                {{$t('td.td16')}}
                             </span>
                         </div>
                     </div>
-                    <EmptyData :textContent="keyWord ? $('td.td17') : $('td.td18')" v-show="!schoolListShow.length"></EmptyData>
+                    <EmptyData :textContent="keyWord ? $t('td.td17') : $t('td.td18')" v-show="!schoolListShow.length"></EmptyData>
                 </div>
             </div>
         </vuescroll>
@@ -146,6 +146,7 @@ export default {
         Percent, AbilityPoint, HourProg, CountTo, SchoolComp
     },
     data() {
+        const _this = this
         return {
             settingHours: {},
             onlineTime: 20,
@@ -168,35 +169,35 @@ export default {
                     icon: 'ios-people',
                     color: '#2d8cf0',
                     number: 0,
-                    text: this.$('td.td19'),
+                    text: _this.$t('td.td19'),
                     type: 'num'
                 },
                 {
                     icon: 'md-cube',
                     color: '#2db7f5',
                     number: 0,
-                    text: this.$('td.td15'),
+                    text: _this.$t('td.td15'),
                     type: 'num'
                 },
                 {
                     icon: 'md-bookmark',
                     color: '#5cadff',
                     number: 0,
-                    text: this.$('td.td20'),
+                    text: _this.$t('td.td20'),
                     type: 'num'
                 },
                 {
                     icon: 'md-thumbs-up',
                     color: '#ff9900',
                     number: 0,
-                    text: this.$('td.td21'),
+                    text: _this.$t('td.td21'),
                     type: 'num'
                 },
                 {
                     icon: 'md-checkmark-circle',
                     color: '#19be6b',
                     number: 0,
-                    text: this.$('td.td9'),
+                    text: _this.$t('td.td9'),
                     type: 'rate'
                 },
             ],
@@ -207,7 +208,7 @@ export default {
             trainType: [],
             hourData: [
                 {
-                    name: this.$('td.td22'),
+                    name: _this.$t('td.td22'),
                     complete: 0,
                     going: 0,
                     uncomplete: 0,
@@ -216,7 +217,7 @@ export default {
                     time: 0
                 },
                 {
-                    name: this.$('td.td23'),
+                    name: _this.$t('td.td23'),
                     complete: 0,
                     going: 0,
                     uncomplete: 0,
@@ -225,7 +226,7 @@ export default {
                     time: 0
                 },
                 {
-                    name: this.$('td.td24'),
+                    name: _this.$t('td.td24'),
                     complete: 0,
                     going: 0,
                     uncomplete: 0,
@@ -234,7 +235,7 @@ export default {
                     time: 0
                 },
                 {
-                    name: this.$('td.td25'),
+                    name: _this.$t('td.td25'),
                     complete: 0,
                     going: 0,
                     uncomplete: 0,

+ 33 - 33
TEAMModelOS/ClientApp/src/view/trainList/Join.vue

@@ -731,40 +731,40 @@ export default {
         //查询学校所有老师
         getTeacherAll() {
             this.$store.dispatch('user/getSchoolTeacher')
-        },
-        watch: {
-            joinTeachers: {
-                handler(n, o) {
-                    let data = []
-                    let groupRes = this.$jsFn.groupBy(this.joinTeachers, 'groupId')
-                    for (let index in groupRes) {
-                        data.push({
-                            groupName: groupRes[index][0].groupName,
-                            groupId: groupRes[index][0].groupId,
-                            teachers: groupRes[index]
-                        })
-                    }
-                    // data.sort((a, b) => {
-                    //     return a.groupName.localeCompare(b.groupName)
-                    // })
-                    console.log(this.emptyGroup)
-                    this.groupData = data
-                    this.groupData.push(...this.emptyGroup)
-                },
-                deep: true,
-                immediate: true
-            }
-        },
-        created() {
+        }
+    },
+    watch: {
+        joinTeachers: {
+            handler(n, o) {
+                let data = []
+                let groupRes = this.$jsFn.groupBy(this.joinTeachers, 'groupId')
+                for (let index in groupRes) {
+                    data.push({
+                        groupName: groupRes[index][0].groupName,
+                        groupId: groupRes[index][0].groupId,
+                        teachers: groupRes[index]
+                    })
+                }
+                // data.sort((a, b) => {
+                //     return a.groupName.localeCompare(b.groupName)
+                // })
+                console.log(this.emptyGroup)
+                this.groupData = data
+                this.groupData.push(...this.emptyGroup)
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    created() {
 
-        },
-        mounted() {
-            this.isProvince = sessionStorage.getItem('areaAccess') && sessionStorage.getItem('areaAccess') == 1
-            if (this.isProvince) {
-                this.getProvTeacherList()
-            } else {
-                this.getTrainList()
-            }
+    },
+    mounted() {
+        this.isProvince = sessionStorage.getItem('areaAccess') && sessionStorage.getItem('areaAccess') == 1
+        if (this.isProvince) {
+            this.getProvTeacherList()
+        } else {
+            this.getTrainList()
         }
     }
 }