浏览代码

統測活動 老師報名資訊追加國省市

jeff 8 月之前
父节点
当前提交
39b3fc076a

+ 6 - 0
TEAMModelOS.SDK/Models/Cosmos/Teacher/JointEvent.cs

@@ -65,6 +65,12 @@ namespace TEAMModelOS.SDK.Models
         public string schoolId { get; set; } //老師教育雲綁定的學校ID
         public string schoolName { get; set; } //老師教育雲綁定的學校名稱
         public string periodId { get; set; } //老師個人課程時為null
+        public string countryId { get; set; }
+        public string countryName { get; set; }
+        public string provinceId { get; set; }
+        public string provinceName { get; set; }
+        public string cityId { get; set; }
+        public string cityName { get; set; }
         public List<JointEventGroupCourse> courseLists { get; set; } = new();
         public class JointEventGroupCourse
         {

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -8033,6 +8033,7 @@ const LANG_EN_US = {
         check: 'check',
         Warning02: 'The ongoing schedule cannot be edited',
         jointTime: 'Registration time',
+        location: 'Location',
         pleaseEnterEventName: 'Please enter the event name',
         pleaseEnterSchedule: 'Please enter the schedule',
         accountNotExist: 'Account does not exist',

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -8034,6 +8034,7 @@ const LANG_ZH_CN = {
         check: '检查',
         Warning02: '进行中时程不可编辑',
         jointTime: '报名时间',
+        location: '位置',
         pleaseEnterEventName: '请输入活动名称',
         pleaseEnterSchedule: '请输入时程',
         accountNotExist: '帐号不存在',

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -8034,6 +8034,7 @@ const LANG_ZH_TW = {
         check: '檢查',
         Warning02: '進行中時程不可編輯',
         jointTime: '報名時間',
+        location: '位置',
         pleaseEnterEventName: '請輸入活動名稱',
         pleaseEnterSchedule: '請輸入時程',
         accountNotExist: '帳號不存在',

+ 16 - 5
TEAMModelOS/ClientApp/src/view/htcommunity/htMgtHome.vue

@@ -168,10 +168,11 @@
             </span>
         </el-dialog>
         <!-- 報名狀況彈出視窗 -->
-        <el-dialog :title="this.$t('htcommunity.joinStatus')" :visible.sync="showJoinModal" width="70%">
-            <el-button type="primary" class="btn-new" size="small" style="margin-top: 0" @click="exportExcel('teacherCourse')">{{this.$t("htcommunity.export")}}</el-button>
-            <el-table :data="joinTeacherCourseArr" class="table-main" border v-loading="teacherCourseLoading" @sort-change="onSortChangeCourse">
+        <el-dialog :title="this.$t('htcommunity.joinStatus')" :visible.sync="showJoinModal" width="75%">
+            <el-button type="primary" class="btn-new" size="small" style="margin-top: 0; margin-bottom: 10px; margin-left: 0; " @click="exportExcel('teacherCourse')">{{this.$t("htcommunity.export")}}</el-button>
+            <el-table :data="joinTeacherCourseArr" border v-loading="teacherCourseLoading" @sort-change="onSortChangeCourse">
                 <el-table-column prop="jointGroupName" :label="this.$t('htcommunity.jointGroup')" sortable="custom" min-width="50"></el-table-column>
+                <el-table-column prop="location" :label="this.$t('htcommunity.location')" sortable="custom" min-width="50"></el-table-column>
                 <el-table-column prop="schoolName" :label="this.$t('htcommunity.schoolName')" sortable="custom" min-width="50"></el-table-column>
                 <el-table-column prop="creatorName" :label="this.$t('htcommunity.teacherName')" sortable="custom" min-width="50"></el-table-column>
                 <el-table-column prop="creatorId" :label="this.$t('htcommunity.tmid')" min-width="50"></el-table-column>
@@ -468,6 +469,9 @@ export default {
                                       courseGroupId = g.id;
                                       courseGroupName = g.name;
                                       let createTimeYmd = new Date(item.createTime).toLocaleString('en-US', { hour12: false }).split(" ");
+                                      let countryName = (item.countryName != null) ? item.countryName : "";
+                                      let provinceName = (item.provinceName != null) ? item.provinceName : "";
+                                      let cityName = (item.cityName != null) ? item.cityName : "";
                                       //資料生成
                                       let jointCourseRow = {
                                           id: item.id,
@@ -482,6 +486,13 @@ export default {
                                           courseName: courseName,
                                           groupId: courseGroupId,
                                           groupName: courseGroupName,
+                                          countryId: item.countryId,
+                                          countryName: countryName,
+                                          provinceId: item.provinceId,
+                                          provinceName: provinceName,
+                                          cityId: item.cityId,
+                                          cityName: cityName,
+                                          location: cityName,
                                           createTime: this.timeCycle(createTimeYmd),
                                       }
                                       this.joinTeacherCourseArr.push(jointCourseRow);
@@ -779,7 +790,7 @@ export default {
         let key = data.prop // 当前排序依据
         switch (order) {
             case 'ascending':
-                if (key == 'jointGroupName' || key == 'creatorName' || key == 'schoolName') {
+                if (key == 'jointGroupName' || key == 'creatorName' || key == 'schoolName' || key == 'location') {
                     this.joinTeacherCourseArr = this.joinTeacherCourseArr.sort((a, b) => {
                         return a[key].toLowerCase().localeCompare(b[key].toLowerCase());
                     })
@@ -791,7 +802,7 @@ export default {
                 }
                 break
             case 'descending':
-                if (key == 'jointGroupName' || key == 'creatorName' || key == 'schoolName') {
+                if (key == 'jointGroupName' || key == 'creatorName' || key == 'schoolName' || key == 'location') {
                     this.joinTeacherCourseArr = this.joinTeacherCourseArr.sort((a, b) => {
                         return b[key].toLowerCase().localeCompare(a[key].toLowerCase());
                     })

+ 18 - 0
TEAMModelOS/Controllers/Teacher/JointEventController.cs

@@ -604,6 +604,12 @@ namespace TEAMModelOS.Controllers.Common
                 string creatorEmail = (request.TryGetProperty("creatorEmail", out JsonElement _creatorEmail)) ? _creatorEmail.ToString() : string.Empty;
                 string schoolId = (request.TryGetProperty("schoolId", out JsonElement _schoolId)) ? _schoolId.ToString() : string.Empty;
                 string schoolName = (request.TryGetProperty("schoolName", out JsonElement _schoolName)) ? _schoolName.ToString() : string.Empty;
+                string countryId = (request.TryGetProperty("countryId", out JsonElement _countryId)) ? _countryId.ToString() : string.Empty;
+                string countryName = (request.TryGetProperty("countryName", out JsonElement _countryName)) ? _countryName.ToString() : string.Empty;
+                string provinceId = (request.TryGetProperty("provinceId", out JsonElement _provinceId)) ? _provinceId.ToString() : string.Empty;
+                string provinceName = (request.TryGetProperty("provinceName", out JsonElement _provinceName)) ? _provinceName.ToString() : string.Empty;
+                string cityId = (request.TryGetProperty("cityId", out JsonElement _cityId)) ? _cityId.ToString() : string.Empty;
+                string cityName = (request.TryGetProperty("cityName", out JsonElement _cityName)) ? _cityName.ToString() : string.Empty;
                 string scope = (request.TryGetProperty("scope", out JsonElement _scope)) ? _scope.ToString() : string.Empty;
                 List<JointEventGroupBase.JointEventGroupCourse> courseLists = (request.TryGetProperty("courseLists", out JsonElement _courseLists)) ? _courseLists.ToObject<List<JointEventGroupBase.JointEventGroupCourse>>() : null;
                 if (string.IsNullOrWhiteSpace(jointEventId) || string.IsNullOrWhiteSpace(jointGroupId) || string.IsNullOrWhiteSpace(creatorId) || courseLists == null || string.IsNullOrWhiteSpace(scope))
@@ -646,6 +652,12 @@ namespace TEAMModelOS.Controllers.Common
                         jointCourse.creatorEmail = creatorEmail;
                         jointCourse.schoolId = schoolId;
                         jointCourse.schoolName = schoolName;
+                        jointCourse.countryId = countryId;
+                        jointCourse.countryName = countryName;
+                        jointCourse.provinceId = provinceId;
+                        jointCourse.provinceName = provinceName;
+                        jointCourse.cityId = cityId;
+                        jointCourse.cityName = cityName;
                         jointCourse.createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
                     }
                     //修改
@@ -1350,6 +1362,12 @@ namespace TEAMModelOS.Controllers.Common
             public string schoolId { get; set; } //老師教育雲綁定的學校ID
             public string schoolName { get; set; } //老師教育雲綁定的學校名稱
             public string periodId { get; set; } //老師個人課程時為null
+            public string countryId { get; set; }
+            public string countryName { get; set; }
+            public string provinceId { get; set; }
+            public string provinceName { get; set; }
+            public string cityId { get; set; }
+            public string cityName { get; set; }
             public List<JointEventGroupCourseDto> courseLists { get; set; } = new();
             public long createTime { get; set; }
             public class JointEventGroupCourseDto