瀏覽代碼

Merge branch 'develop-rc' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop-rc

CrazyIter_Bin 3 年之前
父節點
當前提交
9f59389fd3

+ 3 - 3
TEAMModelOS/ClientApp/src/view/ability/Review.vue

@@ -307,12 +307,12 @@ export default {
       let suffix = this.getSuffix(file.name)
       console.log(file)
       console.log(fullFilePath)
-      let isImg = ['jpg', 'png'].includes(suffix)
+      let isImg = ['jpg', 'png', 'gif'].includes(suffix)
       let isDoc = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'].includes(suffix)
       let isPdf = suffix === 'pdf'
       let isVideo = suffix === 'mp4' || suffix === 'webm'
       let isAudio = ['mp3', 'wav'].includes(suffix)
-      let type = isImg ? 'image' : isVideo ? 'video' : isAudio ? 'audio' : 'doc'
+      let type = isImg ? 'image' : isVideo ? 'video' : isAudio ? 'audio' : (isDoc ? 'doc' : '')
       switch (type) {
         case 'doc':
           if (isPdf) {
@@ -493,7 +493,7 @@ export default {
     /* 根据类型换取ICON图标 */
     getTypeIcon(file) {
       let suffix = file.name.split('.')[file.name.split('.').length - 1].toLowerCase()
-      if (['jpg', 'png'].includes(suffix)) {
+      if (['jpg', 'png', 'gif','webp'].includes(suffix)) {
         return require('../../assets/icon/pic50.png')
       }
       if (['doc', 'docx'].includes(suffix)) {

+ 3 - 0
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/AddBlock.vue

@@ -55,8 +55,11 @@
             // 提交添加
             handleSubmit() {
                 let newName = this.formTop.name
+                let existBlockList = this.$parent.$parent.blockList.map(i => i.name)
                 if (!newName) {
                     this.$Message.warning(this.$t('knowledge.blockWarning'))
+                }else if(existBlockList.includes(newName)){
+                    this.$Message.warning(this.$t('knowledge.blockWarning2'))
                 } else {
                     this.isLoading = true
                     let params = {

+ 2 - 12
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/ComposeBlock.vue

@@ -84,7 +84,7 @@
 
             // 提交新增知识块
             handleSubmit() {
-                if (this.existBlockList.length) {
+                if (this.existBlockList.length && this.selectBlock) {
                     this.isLoading = true
 					let selectBlockItem = this.existBlockList.filter(item => item.name === this.selectBlock)[0]
                     let pointList = selectBlockItem.points
@@ -129,7 +129,7 @@
 						console.log(newValue);
                         this.newBlockName = ''
                         this.existBlockList = newValue
-                        this.selectBlock = newValue.length ? newValue[0].id : ''
+                        this.selectBlock = newValue.length ? newValue[0].name : ''
                     }
                 }
             }
@@ -162,21 +162,11 @@
         padding-bottom:20px;
     }
 
-    .compose-container .ivu-tabs-nav .ivu-tabs-tab-active,
-    .compose-container .ivu-tabs-nav .ivu-tabs-tab:hover {
-        /* color: #0b9775 !important; */
-    }
-
     .compose-container .ivu-tabs-bar {
         border-bottom:none;
     }
 
-    .compose-container .ivu-tabs-nav-container:focus .ivu-tabs-tab-focused {
-        /* border-color:rgb(11, 151, 117) !important; */
-    }
-
     .compose-container .ivu-tabs-ink-bar {
-        /* background:rgb(11, 151, 117) !important; */
         height:4px;
         bottom:0;
     }

+ 2 - 7
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue

@@ -271,7 +271,7 @@
 				<p class="node-title">{{ $t('syllabus.linkName') }}</p>
 				<Input v-special-char v-model="curLink.name" style="width: 100%" />
 				<p class="node-title">{{ $t('syllabus.linkUrl') }}</p>
-				<Input v-special-char v-model="curLink.url" placeholder="" style="width: 100%" />
+				<Input v-model="curLink.url" placeholder="" style="width: 100%" />
 			</div>
 			<Button @click="onAddLink" style="width: 88%;margin-left: 6%;margin-bottom: 20px;"
 				class="modal-btn">{{ $t('syllabus.confirm') }}</Button>
@@ -2297,7 +2297,7 @@
 					if ((this.isEditVolume && this.curVolume)) {
 						addVolumeParams.id = this.curVolume.id
 						addVolumeParams.order = this.curVolume.order
-						addVolumeParams.name = this.addVolumeForm.name
+						addVolumeParams.name = this.addVolumeForm.name || this.getDefaultVolumeName
 						addVolumeParams.syllabusIds = this.allChapterIds || []
 						addVolumeParams.creatorId = this.curVolume.creatorId
 						addVolumeParams.creatorName = this.curVolume.creatorName
@@ -2727,11 +2727,6 @@
 
 	.choose-content-modal {
 
-		.ivu-modal-footer,
-		.ivu-modal-body {
-			// background-color: #444444;
-		}
-
 		.ev-list-container,
 		.pl-container {
 			height: 600px !important;

+ 0 - 10
TEAMModelOS/Controllers/Teacher/InitController.cs

@@ -353,8 +353,6 @@ namespace TEAMModelOS.Controllers
                 string school_code = $"{_school_code}";
                 var jwt = new JwtSecurityToken(id_token.GetString());
                 var id = jwt.Payload.Sub;
-
-                (string ip, string region) = await LoginService.LoginIp(HttpContext, _searcher);
                 var client = _azureCosmos.GetCosmosClient();
 
                 //權限token
@@ -537,14 +535,6 @@ namespace TEAMModelOS.Controllers
                 //TODO JJ,更新Token时,在取得学校资讯时,没有传入schoolId
                 var auth_token = JwtAuthExtension.CreateAuthToken(_option.HostName, id, name?.ToString(), picture?.ToString(), _option.JwtSecretKey, Website: "IES", scope: Constant.ScopeTeacher, schoolID: school_code.ToString(), areaId: currAreaId, standard: school_base.standard, roles: roles.ToArray(), permissions: permissions.ToArray(), expire: 1);
 
-                //用户在线记录
-                try
-                {
-                    _ = _httpTrigger.RequestHttpTrigger(new { school = school_code.ToString(), scope = $"{Constant.ScopeTeacher}", id = $"{id}", ip = $"{ip}", expire = 1 }, _option.Location, "online-record");
-                }
-                catch { }
-
-
                 //取得班级
                 List<object> school_classes = new List<object>();
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator