소스 검색

Merge branch 'develop5.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

CrazyIter_Bin 3 년 전
부모
커밋
5fa092b16e

+ 15 - 0
TEAMModeBI/Controllers/BISchool/BatchAreaController.cs

@@ -468,6 +468,21 @@ namespace TEAMModeBI.Controllers.BISchool
                 if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
                 if (!jsonElement.TryGetProperty("tmdId", out JsonElement _tmdId)) return BadRequest();
                 if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
                 if (!jsonElement.TryGetProperty("tmdName", out JsonElement _tmdName)) return BadRequest();
 
 
+                //保存操作记录
+                BIOperateLog bIOperateLog = new BIOperateLog
+                {
+                    PartitionKey = "BILogging",
+                    RowKey = "BIOperate",
+                    tmdId = $"{_tmdId}",
+                    tmdName = $"{_tmdName}",
+                    operateDescribe = $"{_tmdName}操作切换能力点",
+                    visitApi = "dd/cut-standard",
+                    operateTime = DateTime.Now
+                };
+
+                //await _azureStorage.GetBlobServiceClient("BIOperateLog")
+                await _azureStorage.Save<BIOperateLog>(bIOperateLog);
+
                 var cosmosClient = _azureCosmos.GetCosmosClient();
                 var cosmosClient = _azureCosmos.GetCosmosClient();
 
 
                 List<string> abilityIds = new List<string>();  //册别的ID集合
                 List<string> abilityIds = new List<string>();  //册别的ID集合

+ 42 - 0
TEAMModelOS.SDK/Models/Cosmos/BI/BIOperateLog.cs

@@ -0,0 +1,42 @@
+using Microsoft.Azure.Cosmos.Table;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TEAMModelOS.SDK.Context.Attributes.Azure;
+
+namespace TEAMModelOS.SDK.Models.Cosmos.BI
+{
+    [TableName(Name = "BIOperateLog")]
+    public class BIOperateLog: TableEntity
+    {
+        /// <summary>
+        /// 醍摩豆ID
+        /// </summary>
+        public string tmdId { get; set; }
+
+        /// <summary>
+        /// 醍摩豆名称
+        /// </summary>
+        public string tmdName { get; set; }
+
+        /// <summary>
+        /// 操作描述
+        /// </summary>
+        public string operateDescribe { get; set; }
+
+        /// <summary>
+        /// 访问的Api
+        /// </summary>
+        public string visitApi { get; set; }
+
+        /// <summary>
+        /// 操作时间
+        /// </summary>
+        public DateTime operateTime { get; set; }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public long id { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
+    }
+}

+ 1 - 1
TEAMModelOS/ClientApp/src/view/jyzx/HourDetail.vue

@@ -9,7 +9,7 @@
                     {{ hourInfo.name }}:
                     {{ hourInfo.name }}:
                     <span class="detail-hour">{{ hourInfo.value }}</span> / {{ hourInfo.total }}
                     <span class="detail-hour">{{ hourInfo.value }}</span> / {{ hourInfo.total }}
                 </p>
                 </p>
-                <span v-if="hourInfo.minute" style="text-align: center; font-size: 14px;">
+                <span v-if="hourInfo.minuteTotal" style="text-align: center; font-size: 14px;">
                     <span class="detail-hour" style="font-size: 16px;">{{ hourInfo.minute }}</span> / {{ hourInfo.minuteTotal }}(分钟)
                     <span class="detail-hour" style="font-size: 16px;">{{ hourInfo.minute }}</span> / {{ hourInfo.minuteTotal }}(分钟)
                 </span>
                 </span>
             </div>
             </div>

+ 20 - 5
TEAMModelOS/ClientApp/src/view/jyzx/index.vue

@@ -12,7 +12,7 @@
                                 <p>{{ $t("jyzx.online.abilyMes") }}</p>
                                 <p>{{ $t("jyzx.online.abilyMes") }}</p>
                             </div>
                             </div>
                         </Tooltip>
                         </Tooltip>
-                        <span v-if="setting">(学时:{{ parseInt(abliyTotal/setting.lessonMinutes) }})</span>
+                        <span>(学时:{{ totalShow }})</span>
                     </span>
                     </span>
                     <span class="online-content-header-tools">
                     <span class="online-content-header-tools">
                         <Icon type="md-add" :title="$t('jyzx.online.addPoint')" @click="addPoint" />
                         <Icon type="md-add" :title="$t('jyzx.online.addPoint')" @click="addPoint" />
@@ -367,7 +367,7 @@ export default {
                             item.total = 0
                             item.total = 0
                             if(arr) {
                             if(arr) {
                                 item.total = parseInt(arr.view/60)
                                 item.total = parseInt(arr.view/60)
-                                this.abliyTotal += item.total >= times ? times : item.total
+                                this.abliyTotal += item.total >= times ? (times * 60) : arr.view
                                 item.done = item.total >= times ? true : false
                                 item.done = item.total >= times ? true : false
                             }
                             }
                         }
                         }
@@ -1385,6 +1385,11 @@ export default {
             ) {
             ) {
                 console.log("视频学完");
                 console.log("视频学完");
                 this.studyRecord.done = true
                 this.studyRecord.done = true
+                this.studyRecord.view = parseInt(e.target.currentTime)
+                let remainder = parseInt(e.target.currentTime % 60)
+                console.log(remainder);
+                this.abliyTotal += remainder
+                console.log(this.abliyTotal, "总计的时间(秒)");
                 var newArr = {
                 var newArr = {
                     hash: this.studyRecord.hash,
                     hash: this.studyRecord.hash,
                     done: this.studyRecord.done,
                     done: this.studyRecord.done,
@@ -1469,7 +1474,7 @@ export default {
                         if(localItem) {
                         if(localItem) {
                             if(localItem.view != this.studyRecord.view) {
                             if(localItem.view != this.studyRecord.view) {
                                 this.totalStudy += 1
                                 this.totalStudy += 1
-                                this.abliyTotal += 1
+                                this.abliyTotal += 60
                                 this.pointList[this.activePointIndex].total += 1
                                 this.pointList[this.activePointIndex].total += 1
                             }
                             }
                             // 找到对应的hash,并赋值
                             // 找到对应的hash,并赋值
@@ -1487,14 +1492,14 @@ export default {
                             // 没有找到
                             // 没有找到
                             local.push(newArr)
                             local.push(newArr)
                             this.totalStudy += 1
                             this.totalStudy += 1
-                            this.abliyTotal += 1
+                            this.abliyTotal += 60
                             this.pointList[this.activePointIndex].total += 1
                             this.pointList[this.activePointIndex].total += 1
                         }
                         }
                         localStorage.setItem('fileRcd', JSON.stringify(local))
                         localStorage.setItem('fileRcd', JSON.stringify(local))
                     } else {
                     } else {
                         localStorage.setItem('fileRcd', JSON.stringify([newArr]))
                         localStorage.setItem('fileRcd', JSON.stringify([newArr]))
                         this.totalStudy += 1
                         this.totalStudy += 1
-                        this.abliyTotal += 1
+                        this.abliyTotal += 60
                         this.pointList[this.activePointIndex].total += 1
                         this.pointList[this.activePointIndex].total += 1
                     }
                     }
                     this.resourceInfo.find(item => {
                     this.resourceInfo.find(item => {
@@ -1523,6 +1528,16 @@ export default {
             this.$forceUpdate()
             this.$forceUpdate()
         },
         },
     },
     },
+    computed: {
+        totalShow() {
+            if(this.setting) {
+                let total = parseInt(this.abliyTotal/60/this.setting.lessonMinutes)
+                return total > this.setting.onlineTime ? this.setting.onlineTime : total
+            } else {
+                return 0
+            }
+        },
+    },
     watch: {
     watch: {
         isAddPoint: {
         isAddPoint: {
             // 被选中的能力点——不能取消
             // 被选中的能力点——不能取消

+ 1 - 1
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -124,7 +124,7 @@
                                     <template slot-scope="{ row,index }" slot="action">
                                     <template slot-scope="{ row,index }" slot="action">
                                         <div class="item-tools">
                                         <div class="item-tools">
                                             <Icon type="md-create" size="18" style="cursor:pointer;margin-left:10px" :title="$t('schoolBaseInfo.noSetLabel')" @click="setNo(row,index)" />
                                             <Icon type="md-create" size="18" style="cursor:pointer;margin-left:10px" :title="$t('schoolBaseInfo.noSetLabel')" @click="setNo(row,index)" />
-                                            <Icon type="md-trash" size="18" style="cursor:pointer;margin-left:10px" :title="$t('schoolBaseInfo.noSetLabel')" @click="setNo(row,index)" />
+                                            <!-- <Icon type="md-trash" size="18" style="cursor:pointer;margin-left:10px" :title="$t('schoolBaseInfo.noSetLabel')" @click="setNo(row,index)" /> -->
                                         </div>
                                         </div>
                                     </template>
                                     </template>
                                 </Table>
                                 </Table>

+ 13 - 0
TEAMModelOS/ClientApp/src/view/teachermgmt/components/group/Group.less

@@ -186,4 +186,17 @@
     top: 16px;
     top: 16px;
     size: 16px;
     size: 16px;
     display: none;
     display: none;
+}
+.edit-group-name{
+    font-size: 12px;
+    color: #2d8cf0;
+    cursor: pointer;
+    position: absolute;
+    margin-top: 4px;
+    margin-left: 5px;
+}
+.rename-input{
+    width: 80%;
+    margin: 30px auto;
+    display: block;
 }
 }

+ 46 - 7
TEAMModelOS/ClientApp/src/view/teachermgmt/components/group/Group.vue

@@ -6,8 +6,11 @@
                     <div class="group-info-wrap">
                     <div class="group-info-wrap">
                         <div class="group-img-start" :style="{backgroundImage:`radial-gradient(${colorList[index % 9]},#fff)`}">
                         <div class="group-img-start" :style="{backgroundImage:`radial-gradient(${colorList[index % 9]},#fff)`}">
                         </div>
                         </div>
-                        <div style="text-align:center">
-                            <h6 class="group-name">{{item.name}}</h6>
+                        <div style="text-align:center;z-index: 99;">
+                            <h6 class="group-name">
+                                {{item.name}}
+                                <span class="edit-group-name" @click="rename(item.name,index)">修改</span>
+                            </h6>
                             <p class="group-info">
                             <p class="group-info">
                                 {{$t('teachermgmt.peopleNum')}}
                                 {{$t('teachermgmt.peopleNum')}}
                                 {{item.members.length}}
                                 {{item.members.length}}
@@ -29,8 +32,8 @@
                                 <div class="student-info-item" v-for="(teaItem,index) in item.members" :key="index">
                                 <div class="student-info-item" v-for="(teaItem,index) in item.members" :key="index">
                                     <PersonalPhoto :name="teaItem.name" :picture="teaItem.picture"></PersonalPhoto>
                                     <PersonalPhoto :name="teaItem.name" :picture="teaItem.picture"></PersonalPhoto>
                                     <p class="teacher-name">{{`${teaItem.name}(${teaItem.id})`}}</p>
                                     <p class="teacher-name">{{`${teaItem.name}(${teaItem.id})`}}</p>
-                                    <Icon type="md-remove-circle" class="remove-member-icon" @click="delMember(item.id,teaItem.id)" :title="$t('teachermgmt.rmvTch')"/>
-                                    <Icon type="md-checkmark" class="remove-member-icon" style="right:30px" @click="setLeader(item.id,teaItem.id)" :title="$t('teachermgmt.setLeader')"/>
+                                    <Icon type="md-remove-circle" class="remove-member-icon" @click="delMember(item.id,teaItem.id)" :title="$t('teachermgmt.rmvTch')" />
+                                    <Icon type="md-checkmark" class="remove-member-icon" style="right:30px" @click="setLeader(item.id,teaItem.id)" :title="$t('teachermgmt.setLeader')" />
                                 </div>
                                 </div>
                                 <EmptyData :textContent="$t('teachermgmt.noTeacher')" style="opacity:0.5" v-if="item.members.length == 0"></EmptyData>
                                 <EmptyData :textContent="$t('teachermgmt.noTeacher')" style="opacity:0.5" v-if="item.members.length == 0"></EmptyData>
                             </Draggable>
                             </Draggable>
@@ -54,6 +57,9 @@
                 </template>
                 </template>
             </Table>
             </Table>
         </Modal>
         </Modal>
+        <Modal v-model="editNameStatus" title="修改组名" :closable="false" :loading="modalLoading" @on-ok="confirmRename">
+            <Input v-model="editName" placeholder="修改组名..." class="rename-input" />
+        </Modal>
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
@@ -66,6 +72,10 @@ export default {
     },
     },
     data() {
     data() {
         return {
         return {
+            modalLoading: true,
+            editNameStatus: false,
+            editName: '',
+            editIndex: -1,
             options: {
             options: {
                 bar: {
                 bar: {
                     opacity: 0.2
                     opacity: 0.2
@@ -125,6 +135,35 @@ export default {
         }),
         }),
     },
     },
     methods: {
     methods: {
+        confirmRename() {
+            if (!this.editName) {
+                this.$Message.warning('请输入组名')
+                this.modalLoading = false
+                setTimeout(() => {
+                    this.modalLoading = true
+                })
+            } else {
+                this.groupList[this.editIndex].name = this.editName
+                this.$api.common.upsertGroupInfo(this.groupList[this.editIndex]).then(
+                    res => {
+                        this.$Message.success('修改成功')
+                    },
+                    err => {
+                        this.$Message.error('修改失败')
+                    }
+                ).finally(() => {
+                    this.editNameStatus = false
+                })
+            }
+        },
+        /**
+         * 修改组名
+         */
+        rename(name, index) {
+            this.editName = name
+            this.editIndex = index
+            this.editNameStatus = true
+        },
         setLeader(groupId, teaId) {
         setLeader(groupId, teaId) {
             let gIndex = this.groupList.findIndex(item => {
             let gIndex = this.groupList.findIndex(item => {
                 return item.id == groupId
                 return item.id == groupId
@@ -190,9 +229,9 @@ export default {
             this.$api.common.getGroupListInfo(params).then(
             this.$api.common.getGroupListInfo(params).then(
                 res => {
                 res => {
                     if (res && res.groups) {
                     if (res && res.groups) {
-                        res.groups.forEach(group=>{
-                            group.members.forEach(teacher=>{
-                                if(teacher.tag === 'leader'){
+                        res.groups.forEach(group => {
+                            group.members.forEach(teacher => {
+                                if (teacher.tag === 'leader') {
                                     group.leader = teacher.name
                                     group.leader = teacher.name
                                 }
                                 }
                             })
                             })