Explorar o código

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

CrazyIter_Bin %!s(int64=3) %!d(string=hai) anos
pai
achega
2d337add64

+ 81 - 77
TEAMModeBI/Controllers/BISchool/BatchAreaController.cs

@@ -195,7 +195,6 @@ namespace TEAMModeBI.Controllers.BISchool
 
                 //分区键
                 string partitionCode = "copyAbility-mark";
-
                 if (!string.IsNullOrEmpty($"{oldStandard}") && !string.IsNullOrEmpty($"{_oldId}")) 
                 {
                     //查询要复制区域的能力标准点 
@@ -203,30 +202,30 @@ namespace TEAMModeBI.Controllers.BISchool
                     {
                         if (!string.IsNullOrEmpty(item.blob))
                         {
-                            item.blob = item.blob.Replace($"{oldStandard}", $"{standard}");
+                            item.blob = item.blob.Replace($"/{oldStandard}/", $"/{standard}/");
                         };
 
                         item.standard = $"{standard}";
                         item.code = $"Ability-{standard}";
                         item.school = $"{standard}";
 
-                        ////添加区能力标准点
-                        //abilities.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(item, new PartitionKey($"Ability-{standard}")));
+                        //添加区能力标准点
+                        abilities.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(item, new PartitionKey($"Ability-{standard}")));
 
                     }
-                    //if (abilities.Count < 256)
-                    //{
-                    //    await Task.WhenAll(abilities);
-                    //}
-                    //else 
-                    //{
-                    //    int pages = (abilities.Count + 255) / 256;
-                    //    for(int i = 0; i < pages; i++) 
-                    //    {
-                    //        List<Task<ItemResponse<Ability>>> tempAbility = abilities.Skip((i) * 256).Take(256).ToList();
-                    //        await Task.WhenAll(tempAbility);
-                    //    }
-                    //}
+                    if (abilities.Count < 256)
+                    {
+                        await Task.WhenAll(abilities);
+                    }
+                    else
+                    {
+                        int pages = (abilities.Count + 255) / 256;
+                        for (int i = 0; i < pages; i++)
+                        {
+                            List<Task<ItemResponse<Ability>>> tempAbility = abilities.Skip((i) * 256).Take(256).ToList();
+                            await Task.WhenAll(tempAbility);
+                        }
+                    }
 
                     //微能力点
                     await foreach (var atask in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<AbilityTask>(queryText: $"select value(c) from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilityTask-{oldStandard}") }))
@@ -241,7 +240,7 @@ namespace TEAMModeBI.Controllers.BISchool
                                 {
                                     if (!string.IsNullOrEmpty($"{rnode.link}"))
                                     {
-                                        rnode.link = rnode.link.Replace($"{oldStandard}", $"{standard}");
+                                        rnode.link = rnode.link.Replace($"/{oldStandard}/", $"/{standard}/");
                                     }
                                     rnodes.Add(rnode);
                                 }
@@ -255,22 +254,14 @@ namespace TEAMModeBI.Controllers.BISchool
                         atask.standard = $"{standard}";
                         atask.codeval = $"{standard}";
 
-                        ////添加区能力标准点中的节点 
+                        //添加区能力标准点中的节点 
                         //abilityTasks.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(atask, new PartitionKey($"AbilityTask-{standard}")));
+                        await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(atask, new PartitionKey($"AbilityTask-{standard}"));
                     }
-
-                    //if (abilityTasks.Count <= 256)
-                    //{
-                    //    await Task.WhenAll(abilityTasks);
-                    //}
-                    //else 
+                    //for (int i = 0; i < abilityTasks.Count; i++)
                     //{
-                    //    int pages = (abilityTasks.Count + 255) / 256;
-                    //    for (int i = 0; i < pages; i++) 
-                    //    {
-                    //        List<Task<ItemResponse<AbilityTask>>> tempAbilityTasks = abilityTasks.Skip((i) * 256).Take(256).ToList();
-                    //        await Task.WhenAll(tempAbilityTasks);
-                    //    }
+                    //    List<Task<ItemResponse<AbilityTask>>> tempAbilityTasks = abilityTasks.Skip(i).Take(1).ToList();
+                    //    await Task.WhenAll(tempAbilityTasks);
                     //}
 
                     //新政策文件
@@ -278,7 +269,7 @@ namespace TEAMModeBI.Controllers.BISchool
                     {
                         standardFile.standard = $"{standard}";
                         standardFile.id = areaId;
-                        //await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(standardFile, new PartitionKey($"StandardFile"));
+                        await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(standardFile, new PartitionKey($"StandardFile"));
                     }
 
                     //新的区域设置
@@ -286,7 +277,7 @@ namespace TEAMModeBI.Controllers.BISchool
                     {
                         areaSetting.accessConfig = null;
                         areaSetting.id = areaId;
-                        //await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(areaSetting, new PartitionKey($"AreaSetting"));
+                        await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(areaSetting, new PartitionKey($"AreaSetting"));
                     }
 
                     //执行复制操作
@@ -301,7 +292,7 @@ namespace TEAMModeBI.Controllers.BISchool
                     var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
                     messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
                     var activeTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
-                    //await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);
+                    await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);
 
                     //发送消息实体
                     Notification notification = new Notification
@@ -321,7 +312,7 @@ namespace TEAMModeBI.Controllers.BISchool
                     var location = _option.Location;
                     await _notificationService.SendNotification(clientID, clientSecret, location, url, notification); //站内发送消息
 
-                    return Ok(new { state = 200, });
+                    return Ok(new { state = 200, area = addArea });
                 }
                 else
                 {
@@ -337,30 +328,30 @@ namespace TEAMModeBI.Controllers.BISchool
                         {
                             if (!string.IsNullOrEmpty(item.blob))
                             {
-                                item.blob = item.blob.Replace($"{area.standard}", $"{standard}");
+                                item.blob = item.blob.Replace($"/{area.standard}/", $"/{standard}/");
                             };
 
                             item.standard = $"{standard}";
                             item.code = $"Ability-{standard}";
                             item.school = $"{standard}";
 
-                            ////添加区能力标准点
-                            //abilities.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(item, new PartitionKey($"Ability-{standard}")));
+                            //添加区能力标准点
+                            abilities.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(item, new PartitionKey($"Ability-{standard}")));
                         }
 
-                        //if (abilities.Count < 256)
-                        //{
-                        //    await Task.WhenAll(abilities);
-                        //}
-                        //else
-                        //{
-                        //    int pages = (abilities.Count + 255) / 256;
-                        //    for (int i = 0; i < pages; i++)
-                        //    {
-                        //        List<Task<ItemResponse<Ability>>> tempAbility = abilities.Skip((i) * 256).Take(256).ToList();
-                        //        await Task.WhenAll(tempAbility);
-                        //    }
-                        //}
+                        if (abilities.Count < 256)
+                        {
+                            await Task.WhenAll(abilities);
+                        }
+                        else
+                        {
+                            int pages = (abilities.Count + 255) / 256;
+                            for (int i = 0; i < pages; i++)
+                            {
+                                List<Task<ItemResponse<Ability>>> tempAbility = abilities.Skip((i) * 256).Take(256).ToList();
+                                await Task.WhenAll(tempAbility);
+                            }
+                        }
 
                         //微能力点
                         await foreach (var atask in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<AbilityTask>(queryText: $"select value(c) from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilityTask-{area.standard}") }))
@@ -375,7 +366,7 @@ namespace TEAMModeBI.Controllers.BISchool
                                     {
                                         if (!string.IsNullOrEmpty($"{rnode.link}"))
                                         {
-                                            rnode.link = rnode.link.Replace($"{area.standard}", $"{standard}");
+                                            rnode.link = rnode.link.Replace($"/{area.standard}/", $"/{standard}/");
                                         }
                                         rnodes.Add(rnode);
                                     }
@@ -391,20 +382,12 @@ namespace TEAMModeBI.Controllers.BISchool
 
                             ////添加区能力标准点中的节点 
                             //abilityTasks.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(atask, new PartitionKey($"AbilityTask-{standard}")));
+                            await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(atask, new PartitionKey($"AbilityTask-{standard}"));
                         }
-
-                        //if (abilityTasks.Count <= 256)
+                        //for (int i = 0; i < abilityTasks.Count; i++)
                         //{
-                        //    await Task.WhenAll(abilityTasks);
-                        //}
-                        //else
-                        //{
-                        //    int pages = (abilityTasks.Count + 255) / 256;
-                        //    for (int i = 0; i < pages; i++)
-                        //    {
-                        //        List<Task<ItemResponse<AbilityTask>>> tempAbilityTasks = abilityTasks.Skip((i) * 256).Take(256).ToList();
-                        //        await Task.WhenAll(tempAbilityTasks);
-                        //    }
+                        //    List<Task<ItemResponse<AbilityTask>>> tempAbilityTasks = abilityTasks.Skip(i).Take(1).ToList();
+                        //    await Task.WhenAll(tempAbilityTasks);
                         //}
 
                         //新政策文件
@@ -412,7 +395,7 @@ namespace TEAMModeBI.Controllers.BISchool
                         {
                             standardFile.standard = $"{standard}";
                             standardFile.id = areaId;
-                            //await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(standardFile, new PartitionKey($"StandardFile"));
+                            await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(standardFile, new PartitionKey($"StandardFile"));
                         }
 
                         //新的区域设置
@@ -420,7 +403,7 @@ namespace TEAMModeBI.Controllers.BISchool
                         {
                             areaSetting.accessConfig = null;
                             areaSetting.id = areaId;
-                            //await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(areaSetting, new PartitionKey($"AreaSetting"));
+                            await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(areaSetting, new PartitionKey($"AreaSetting"));
                         }
 
                         //执行复制操作
@@ -435,7 +418,7 @@ namespace TEAMModeBI.Controllers.BISchool
                         var messageBatchCopyFile = new ServiceBusMessage(batchCopyFile.ToJsonString());
                         messageBatchCopyFile.ApplicationProperties.Add("name", "CopyStandardFile");
                         var activeTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
-                        //await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);  //执行复制操作
+                        await _serviceBus.GetServiceBusClient().SendMessageAsync(activeTask, messageBatchCopyFile);  //执行复制操作
 
                         //发送消息实体
                         Notification notification = new Notification
@@ -455,9 +438,9 @@ namespace TEAMModeBI.Controllers.BISchool
                         var location = _option.Location;
                         await _notificationService.SendNotification(clientID, clientSecret, location, url, notification); //发送站内发送消息
 
-                        return Ok(new { state = 201 });
+                        return Ok(new { state = 200, area });
                     }
-                    else return Ok(new { state = 202, message = "未找到默认能力点!" });
+                    else return Ok(new { state = 201, message = "未找到默认能力点!" });
                 }
             }
             catch (Exception ex)
@@ -490,7 +473,7 @@ namespace TEAMModeBI.Controllers.BISchool
                 List<string> abilityIds = new List<string>();  //册别的ID集合
 
                 //查询册别信息
-                await foreach (var tempAbility in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<Ability>(queryText: $"select value(c) from c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Ability-{_oldStandard}") })) 
+                await foreach (var tempAbility in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<Ability>(queryText: $"select value(c) from c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Ability-{_oldStandard}") }))
                 {
                     abilityIds.Add(tempAbility.id);  //查询出来册别ID添加册别ID集合
                 }
@@ -501,7 +484,7 @@ namespace TEAMModeBI.Controllers.BISchool
                 }
 
                 List<string> abilityTaskIds = new List<string>();  //章节ID集合
-                foreach (var abilityId in abilityIds) 
+                foreach (var abilityId in abilityIds)
                 {
                     await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<AbilityTask>(queryText: $"select value(c) from c where c.abilityId='{abilityId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilityTask-{_oldStandard}") }))
                     {
@@ -509,7 +492,7 @@ namespace TEAMModeBI.Controllers.BISchool
                     }
                 }
                 //删除章节
-                if (abilityTaskIds.IsNotEmpty()) 
+                if (abilityTaskIds.IsNotEmpty())
                 {
                     //var sresponse = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").DeleteItemsStreamAsync(abilityTaskIds, $"AbilityTask-{_oldStandard}");
                 }
@@ -527,7 +510,7 @@ namespace TEAMModeBI.Controllers.BISchool
                 {
                     if (!string.IsNullOrEmpty(item.blob))
                     {
-                        item.blob = item.blob.Replace($"{_newStandard}", $"{_oldStandard}");
+                        item.blob = item.blob.Replace($"/{_newStandard}/", $"/{_oldStandard}/");
                     };
 
                     item.standard = $"{_oldStandard}";
@@ -538,10 +521,20 @@ namespace TEAMModeBI.Controllers.BISchool
                     ////添加区能力标准点
                     //abilities.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(item, new PartitionKey($"Ability-{_oldStandard}")));
                 }
-                //if (abilities.IsNotEmpty())
+
+                //if (abilities.Count < 256)
                 //{
                 //    await Task.WhenAll(abilities);
                 //}
+                //else
+                //{
+                //    int pages = (abilities.Count + 255) / 256;
+                //    for (int i = 0; i < pages; i++)
+                //    {
+                //        List<Task<ItemResponse<Ability>>> tempAbility = abilities.Skip((i) * 256).Take(256).ToList();
+                //        await Task.WhenAll(tempAbility);
+                //    }
+                //}
 
                 //微能力点
                 await foreach (var atask in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<AbilityTask>(queryText: $"select value(c) from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilityTask-{_newStandard}") }))
@@ -556,7 +549,7 @@ namespace TEAMModeBI.Controllers.BISchool
                             {
                                 if (!string.IsNullOrEmpty($"{rnode.link}"))
                                 {
-                                    rnode.link = rnode.link.Replace($"{_newStandard}", $"{_oldStandard}");
+                                    rnode.link = rnode.link.Replace($"/{_newStandard}/", $"/{_oldStandard}/");
                                 }
                                 rnodes.Add(rnode);
                             }
@@ -573,11 +566,22 @@ namespace TEAMModeBI.Controllers.BISchool
 
                     ////添加区能力标准点中的节点 
                     //abilityTasks.Add(cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(atask, new PartitionKey($"AbilityTask-{_oldStandard}")));
+                    //await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(atask, new PartitionKey($"AbilityTask-{_oldStandard}"));
                 }
-                //if (abilities.IsNotEmpty())
+
+                //if (abilityTasks.Count <= 256)
                 //{
                 //    await Task.WhenAll(abilityTasks);
                 //}
+                //else
+                //{
+                //    int pages = (abilityTasks.Count + 255) / 256;
+                //    for (int i = 0; i < pages; i++)
+                //    {
+                //        List<Task<ItemResponse<AbilityTask>>> itemAbilityTask = abilityTasks.Skip((i) * 256).Take(256).ToList();
+                //        await Task.WhenAll(itemAbilityTask);
+                //    }
+                //}
 
                 //新政策文件
                 await foreach (StandardFile standardFile in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<StandardFile>(queryText: $"select value(c) from c where  c.id='{_newId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"StandardFile") }))
@@ -634,7 +638,7 @@ namespace TEAMModeBI.Controllers.BISchool
                 var location = _option.Location;
                 await _notificationService.SendNotification(clientID, clientSecret, location, url, notification); //发送站内发送消息
 
-                return Ok(new { state = 200, abilityIds, abilityTaskIds, abilities1, abilityTasks1, abilityTasks,areaSettings });
+                return Ok(new { state = 200, abilityIds, abilityTaskIds, abilities1, abilityTasks1, standardFiles, areaSettings });
             }
             catch (Exception ex)
             {

+ 1 - 2
TEAMModelOS/ClientApp/src/common/AbilityUpload.vue

@@ -202,7 +202,6 @@
 				for (let i = 0; i < list.length; i++) {
 					let file = list[i]
 					try {
-						console.log(await this.$tools.getFileMD5(file))
 						let blobFile = await containerClient.upload(file, path, {
 							onProgress: function(e) {
 								that.$set(that.progressArr, i, parseInt(e.loadedBytes * 100 / file.size))
@@ -213,7 +212,7 @@
 							await this.uploadVideoPoster(blobFile, path, containerClient)
 							blobFile.duration = await this.$tools.getVideoDuration(file)
 						}
-						blobFile.md5 = this.$tools.convertFileMD5ToString(blobFile.md5)
+						blobFile.hash = this.$tools.convertFileMD5ToString(blobFile.md5 || this.$tools.getFileMD5(file))
 						result.push(blobFile)
 					} catch (e) {
 						this.$Message.error(e)

+ 32 - 20
TEAMModelOS/ClientApp/src/common/BaseUpload.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="base-upload-container">
-		<Upload multiple type="drag" action="" :before-upload="onBeforeUpload" :show-upload-list="false">
+		<Upload multiple type="drag" action="" :disabled="isLoading" :before-upload="onBeforeUpload" :show-upload-list="false">
 			<div style="padding: 40px 0">
 				<Icon type="ios-cloud-upload" size="100"
 					style="color: #40A8F0;margin: 40px 0;"></Icon>
@@ -19,7 +19,7 @@
 				<Progress :percent="progressArr[index]" :stroke-width="12"/>
 			</div>
 		</div>
-		<Button  @click="onConfirmUpload"  v-if="!simpleUpload" style="width: 100%;margin: 0 auto;" class="modal-btn" :disabled="!fileArr.length">{{ $t("knowledge.import.tip3") }}</Button>
+		<Button  @click="onConfirmUpload" :loading="isLoading"  v-if="!simpleUpload" style="width: 100%;margin: 0 auto;" class="modal-btn" :disabled="!fileArr.length">{{ $t("knowledge.import.tip3") }}</Button>
 	</div>
 </template>
 
@@ -56,6 +56,7 @@
 		},
 		data() {
 			return {
+				isLoading:false,
 				isShowTool:true,
 				containerClient: null,
 				fileArr:[],
@@ -93,29 +94,40 @@
 				let containerClient = this.containerClient
 				let list = this.fileArr
 				let that = this
+				let promiseArr = []
+				that.isLoading = true
 				for(let i = 0 ; i < list.length; i++){
 					let file = list[i]
-					try{
-						let blobFile = await containerClient.upload(file, this.prefix,{
-							onProgress: function (e) {
-								that.$set(that.progressArr,i,parseInt(e.loadedBytes * 100 / file.size))
+					promiseArr.push(new Promise(async (r,j) => {
+						try{
+							let blobFile = await containerClient.upload(file, this.prefix,{
+								onProgress: function (e) {
+									that.$set(that.progressArr,i,parseInt(e.loadedBytes * 100 / file.size))
+								}
+							});
+							// 如果上传的是视频文件 则需要获取视频的时长信息和MD5信息
+							if (blobFile.type === 'video') {
+								blobFile.duration = await this.$tools.getVideoDuration(file)
 							}
-						});
-						// 如果上传的是视频文件 则需要获取视频的时长信息和MD5信息
-						if (blobFile.type === 'video') {
-							blobFile.duration = await this.$tools.getVideoDuration(file)
+							blobFile.hash = this.$tools.convertFileMD5ToString(blobFile.md5 || this.$tools.getFileMD5(file))
+							console.log('BaseUpload > md5',blobFile.hash);
+							r(blobFile)
+						}catch(e){
+							j(e)
 						}
-						blobFile.md5 = this.$tools.convertFileMD5ToString(blobFile.md5)
-						result.push(blobFile)
-					}catch(e){
-						console.log(e);
-						this.$Message.error(e)
-						return
-					}
+					}))
 				}
-				this.fileArr = []
-				this.progressArr = []
-				this.$emit('uploadFinish',result)
+				
+				Promise.all(promiseArr).then(result => {
+					this.$emit('uploadFinish',result)
+				}).catch(e => {
+					this.$Message.error('上传失败!')
+				}).finally(() => {
+					this.fileArr = []
+					this.progressArr = []
+					that.isLoading = false
+				})
+				
 			}
 		},
 		mounted() {

+ 61 - 23
TEAMModelOS/ClientApp/src/utils/public.js

@@ -3,6 +3,9 @@ import store from '@/store'
 import SparkMD5 from "spark-md5";
 import FileSaver from "file-saver";
 import JSZip from "jszip";
+import QRCode from 'qrcodejs2'
+import JsPDF from 'jspdf'
+import domtoimage from '@/utils/dom_to_image';
 import {
 	app
 } from '@/boot-app.js'
@@ -457,9 +460,7 @@ export default {
 		let pattern = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/
 		return s.split('//')[0] + '//' + s.match(pattern)[0]
 	},
-	/**
-	 * 获取个人容器授权
-	 */
+	/* 获取个人容器授权 */
 	getPrivateSas(code) {
 		return new Promise((r, j) => {
 			let ts = new Date().getTime()
@@ -489,9 +490,7 @@ export default {
 			}
 		})
 	},
-	/**
-	 * 获取学校容器授权
-	 */
+	/* 获取学校容器授权 */
 	getSchoolSas(code) {
 		return new Promise((r, j) => {
 			let ts = new Date().getTime()
@@ -521,9 +520,7 @@ export default {
 			}
 		})
 	},
-	/**
-	 * 获取单个文件授权
-	 */
+	/* 获取单个文件授权 */
 	getFileSas(param) {
 		console.log('获取单个文件授权', param)
 		return new Promise((r, j) => {
@@ -544,7 +541,6 @@ export default {
 			)
 		})
 	},
-
 	/* 根据容器名称获取完整授权码 */
 	getBlobSas(code) {
 		return new Promise((r, j) => {
@@ -558,22 +554,70 @@ export default {
 			})
 		})
 	},
-
+	/* 批量生成二维码 */
+	batchQrcodes(arr,pdfName) {
+		return new Promise((resolve,reject) => {
+			if(!arr.length){
+				this.$Message.warning('未获取到学生数据')
+				resolve(200)
+				return
+			}
+			let promiseArr = []
+			arr.forEach((i,index) => {
+				promiseArr.push(new Promise((r,j) => {
+					let dom = document.createElement('div')
+					let qrcode = new QRCode(dom, {
+						width: 320, // 设置宽度,单位像素
+						height: 320, // 设置高度,单位像素
+						text: arr[index], // 设置二维码内容或跳转地址
+					})
+					setTimeout(() => {
+						let base64 = dom.getElementsByTagName('img')[0].currentSrc
+						dom.remove()
+						r(base64)
+					},500)
+				}))
+			})
+			Promise.all(promiseArr).then(result => {
+				var PDF = new JsPDF({
+					orientation: 'p',
+					unit: 'mm',
+					format: 'a4',
+					putOnlyUsedFonts: true
+				})
+				PDF.setFontSize(12);
+				result.forEach((img,imgIndex) => {
+					let whichRow = parseInt((imgIndex % 30) / 5)
+					let xArr = [10,50,90,130,170]
+					let yArr = [10,55,100,145,190,235]
+					let x = xArr[imgIndex % 5]
+					let y = yArr[whichRow]
+					let xMarginLeft = ((13 - arr[imgIndex].length) / 2) * (30 / 13)
+					PDF.addImage(img, 'JPEG',x, y, 30, 30)
+					PDF.text(arr[imgIndex], x + xMarginLeft, y + 38);
+					if((imgIndex + 1) % 30 === 0 && imgIndex !== result.length - 1){
+						PDF.addPage()
+					}
+				})
+				PDF.save('二维码贴纸(' + pdfName + ').pdf')
+				resolve(200)
+			})
+		})
+	},
 	/* 弹窗下载文件操作 */
 	doDownloadByUrl(url, fileName) {
 		const downloadRes = async () => {
-			let response = await fetch(url); // 内容转变成blob地址
-			let blob = await response.blob(); // 创建隐藏的可下载链接
-			let objectUrl = window.URL.createObjectURL(blob);
+			// let response = await fetch(url); // 内容转变成blob地址
+			// let blob = await response.blob(); // 创建隐藏的可下载链接
+			// let objectUrl = window.URL.createObjectURL(blob);
 			let a = document.createElement('a');
-			a.href = objectUrl;
+			a.href = url;
 			a.download = fileName;
 			a.click()
 			a.remove();
 		}
 		downloadRes();
 	},
-
 	/* 获取视频第一帧 */
 	getVideoBase64(url) {
 		return new Promise(function(resolve, reject) {
@@ -605,7 +649,6 @@ export default {
 			});
 		})
 	},
-
 	/* 获取视频文件的持续时长 */
 	getVideoDuration(file, url) {
 		return new Promise((resolve, reject) => {
@@ -618,7 +661,6 @@ export default {
 			vid.remove()
 		})
 	},
-
 	/* 将文件MD5 Uint8Array格式转换成字符串 */
 	convertFileMD5ToString(fileData) {
 		var dataString = "";
@@ -684,7 +726,6 @@ export default {
 			};
 		})
 	},
-
 	/* 获取时间差异 */
 	getDateDiff(dateTimeStamp) {
 		var result = ''
@@ -717,7 +758,6 @@ export default {
 			result = "刚刚";
 		return result;
 	},
-
 	/* 上传视频到BLob */
 	async doUploadVideo(vm, file, editor) {
 		vm.$Spin.show({
@@ -774,7 +814,6 @@ export default {
 			vm.$Spin.hide();
 		}
 	},
-
 	/* 上传视频到BLob */
 	async doUploadAudio(vm, file, editor) {
 		console.log(vm)
@@ -950,7 +989,6 @@ export default {
 		}
 		return obj
 	},
-
 	/* 学情知识点模块数据转换 */
 	getKnowStuPercent(val, subjectIndex, index) {
 		let result = []
@@ -1000,7 +1038,7 @@ export default {
 		}
 		return obj
 	},
-
+	/* 罗马数字转换 */
 	getRomanByNum(number) {
 		var Roman = [
 			["", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"],

+ 13 - 11
TEAMModelOS/ClientApp/src/view/ability/Review.vue

@@ -34,7 +34,7 @@
                 </div>
                 <div class="file-action">
                   <span @click="onPreview(file)">{{ $t('ability.review.preview') }}</span>
-                  <span @click="onDownload(file)">{{ $t('ability.review.download') }}</span>
+                  <span @click.stop="onDownload(file)">{{ $t('ability.review.download') }}</span>
                   <span @click="onDelete(file,fileIndex,index)" v-if="isSelfMode">{{ $t('ability.review.delete') }}</span>
                 </div>
               </div>
@@ -214,9 +214,6 @@ export default {
     /* 提交评审 */
     onSubmit() {
       this.isBtnLoading = true
-      console.log(this.finalUpload)
-      console.log(this.appraiseResultArr)
-      console.log(this.appraiseResultArr.every(i => i === 'good') ? 2 : (this.appraiseResultArr.every(i => i !== 'bad') ? 1 : 0))
       if (this.finalUpload.some(i => i.urls.length === 0)) {
         this.$Message.warning(this.$t('ability.review.tip4'))
         this.isBtnLoading = false
@@ -301,9 +298,10 @@ export default {
           if (isPdf) {
             this.openPdf(fullFilePath, file.name)
           } else {
-            this.previewFile = JSON.parse(JSON.stringify(file))
-            this.previewFile.link = escape(fullFilePath)
-            this.previewStatus = true
+            // this.previewFile = JSON.parse(JSON.stringify(file))
+            // this.previewFile.link = escape(fullFilePath)
+            // this.previewStatus = true
+			this.openDoc(escape(fullFilePath))
           }
           break;
         default:
@@ -322,6 +320,10 @@ export default {
     openPdf(url) {
       window.open('/web/viewer.html?file=' + encodeURIComponent(url));
     },
+	/* 预览文档 */
+	openDoc(url) {
+	  window.open('https://view.officeapps.live.com/op/view.aspx?src=' + url);
+	},
     /* 下载文件 */
     async onDownload(file) {
       this.isLoading = true
@@ -329,11 +331,11 @@ export default {
       let fullFilePath = file.url + this.curSas.sas
       /* 下载模板制作详情说明文件 */
       const downloadRes = async () => {
-        let response = await fetch(fullFilePath); // 内容转变成blob地址
-        let blob = await response.blob();  // 创建隐藏的可下载链接
-        let objectUrl = window.URL.createObjectURL(blob);
+        // let response = await fetch(fullFilePath); // 内容转变成blob地址
+        // let blob = await response.blob();  // 创建隐藏的可下载链接
+        // let objectUrl = window.URL.createObjectURL(blob);
         let a = document.createElement('a');
-        a.href = objectUrl;
+        a.href = fullFilePath;
         a.download = file.name;
         a.click()
         a.remove();

+ 33 - 28
TEAMModelOS/ClientApp/src/view/evaluation/bank/index.vue

@@ -13,18 +13,18 @@
 		</Tabs>
 		<div class="ev-list-operation">
 			<div class="import-exercise common-save-btn">
-				<div class="ev-list-paper-tools" style="display: flex;"  v-show="currentTab === 'paper' ">
+				<div class="ev-list-paper-tools" style="display: flex;" v-show="currentTab === 'paper' ">
 					<span @click="onShowPaperList" class="bank-tools-btn" v-if="isShowBackList">
-						<Icon type="md-arrow-back" size="16"/>
+						<Icon type="md-arrow-back" size="16" />
 						<span>{{ $t('evaluation.index.backList') }}</span>
 					</span>
 					<div style="display: flex;" v-show="($access.can('admin.*||exercise-upd') || !isSchool)">
 						<span @click="goCreatePaper('auto')" class="bank-tools-btn">
-							<Icon type="md-cube" size="16"/>
+							<Icon type="md-cube" size="16" />
 							<span>{{ $t('evaluation.index.autoCreate') }}</span>
 						</span>
 						<span @click="goCreatePaper('manual')" class="bank-tools-btn">
-							<Icon type="md-hand" size="16"/>
+							<Icon type="md-hand" size="16" />
 							<span>{{ $t('evaluation.index.manualCreate') }}</span>
 						</span>
 						<!-- <span @click="goCreatePaper('import')" class="bank-tools-btn">
@@ -36,13 +36,16 @@
 						</span> -->
 					</div>
 				</div>
-				
-				<span @click="goCreateExercise" v-show="currentTab === 'exercise' && ($access.can('admin.*||exercise-upd') || !isSchool)" class="bank-tools-btn">
-					<Icon type="md-add" size="16"/>
-					<span style="display: inline-block;margin-bottom: 2px;">{{ $t('evaluation.index.addExercise') }}</span>
+
+				<span @click="goCreateExercise"
+					v-show="currentTab === 'exercise' && ($access.can('admin.*||exercise-upd') || !isSchool)"
+					class="bank-tools-btn">
+					<Icon type="md-add" size="16" />
+					<span
+						style="display: inline-block;margin-bottom: 2px;">{{ $t('evaluation.index.addExercise') }}</span>
 				</span>
 				<span @click="goCreatePaper('import',true)" class="bank-tools-btn">
-					<Icon type="md-folder"  size="16"/>
+					<Icon type="md-folder" size="16" />
 					<span>{{ $t('evaluation.index.importCreate') }}</span>
 				</span>
 			</div>
@@ -50,6 +53,7 @@
 	</div>
 </template>
 <script>
+
 	import BaseImport from '../components/BaseImport'
 	import PaperList from './TestPaperList'
 	import ExerciseList from './ExerciseList'
@@ -61,23 +65,23 @@
 		},
 		data() {
 			return {
-				isLoading:true,
+				isLoading: true,
 				tabName: 'exercise',
 				currentTab: 'exercise',
 				isAllOpen: false,
-				isShowBackList:false,
+				isShowBackList: false,
 			}
 		},
 		methods: {
-			onBackToTop(){
+			onBackToTop() {
 				this.$refs.bankContainer.scrollIntoView()
 			},
 			onTabClick(val) {
 				this.currentTab = val
 				this.onBackToTop()
 			},
-			
-			onShowPaperList(){
+
+			onShowPaperList() {
 				this.$refs.paperList.isPreview = false
 				this.$refs.paperList.isShowSheet = false
 				this.isShowBackList = false
@@ -102,8 +106,8 @@
 			goCreateExercise() {
 				this.$router.push({
 					name: this.$route.name === 'personalBank' ? 'newPrivateExercise' : 'newSchoolExercise',
-					params:{
-						scope : this.$route.name === 'personalBank' ? 'private' : 'school'
+					params: {
+						scope: this.$route.name === 'personalBank' ? 'private' : 'school'
 					}
 				})
 			},
@@ -112,10 +116,10 @@
 			goCreatePaper(type) {
 				this.$router.push({
 					name: this.$route.name === 'personalBank' ? 'newPrivatePaper' : 'newSchoolPaper',
-					params:{
-						scope : this.$route.name === 'personalBank' ? 'private' : 'school',
+					params: {
+						scope: this.$route.name === 'personalBank' ? 'private' : 'school',
 						type: type,
-						isFromItemBank:this.currentTab === 'exercise'
+						isFromItemBank: this.currentTab === 'exercise'
 					}
 				})
 			},
@@ -133,15 +137,15 @@
 				this.currentTab = this.$route.params.tabName
 				this.tabName = this.$route.params.tabName
 			}
-			
-			if(this.$route.name === 'schoolBank'){
-				this.$EventBus.$emit('showSchoolBank',true)
-			}else{
-				this.$EventBus.$emit('showSchoolBank',false)
+
+			if (this.$route.name === 'schoolBank') {
+				this.$EventBus.$emit('showSchoolBank', true)
+			} else {
+				this.$EventBus.$emit('showSchoolBank', false)
 			}
 		},
-		computed:{
-			isSchool(){
+		computed: {
+			isSchool() {
 				return this.$route.name === "schoolBank";
 			},
 			paperScrollTop() {
@@ -171,9 +175,10 @@
 </script>
 <style src="./index.less" lang="less" scoped></style>
 <style>
-	.bank-container .ivu-tabs{
+	.bank-container .ivu-tabs {
 		overflow: unset;
 	}
+
 	.bank-container .ivu-tabs-bar {
 		position: sticky;
 		top: 0;
@@ -192,7 +197,7 @@
 		font-size: 14px;
 	}
 
-	.bank-container .ivu-tabs-nav .ivu-tabs-tab-active{
+	.bank-container .ivu-tabs-nav .ivu-tabs-tab-active {
 		color: var(--tabs-text-color);
 		font-weight: bold;
 	}

+ 2 - 2
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseRepair.vue

@@ -69,7 +69,7 @@
 				<Option value="file">{{$t('evaluation.newExercise.mediaResource')}}</Option>
 			</Select>
 			<p style="margin: 15px 2px;">{{ $t('evaluation.repairResourse.description')}}</p>
-		    <Input v-special-char v-model="curRepair.name" :placeholder="$t('evaluation.repairResourse.place1')"/>
+		    <Input v-model="curRepair.name" :placeholder="$t('evaluation.repairResourse.place1')"/>
 			<p style="margin: 15px 2px;">{{ $t('evaluation.repairResourse.link')}}</p>
 			
 			<!-- 选择内容 -->
@@ -78,7 +78,7 @@
 			<div class="outlink-box" v-if="!isSiteLink" >
 				<!-- 手动输入 -->
 				<div v-for="(item,index) in outLinkArr" style="display: flex;align-items: center;margin-bottom: 10px;">
-					<Input v-special-char v-model="item.url"  :placeholder="$t('evaluation.repairResourse.place2')" style="display: inline-block;width: 95%;"/>
+					<Input v-model="item.url"  :placeholder="$t('evaluation.repairResourse.place2')" style="display: inline-block;width: 95%;"/>
 					<Icon type="ios-add-circle-outline" style="display: inline-block;margin-left: 8px;font-size: 20px;cursor: pointer;" @click="addLinkInput" v-if="index === 0"/>
 					<Icon type="ios-remove-circle-outline" style="display: inline-block;margin-left: 8px;font-size: 20px;cursor: pointer;" @click="removeLinkInput(index)" v-if="index !== 0"/>
 				</div>

+ 77 - 73
TEAMModelOS/ClientApp/src/view/newsheet/SheetBaseInfo.vue

@@ -156,88 +156,91 @@
 						isShowCode ? this.$t('answerSheet.qrCodeTitle') : this.$t('answerSheet.idTitle')
 					)
 				);
-				
-					this.idNumberBox.add(
-						// 填涂上边框
-						snap
-						.line(
-							INFO_LEFT_X,
-							ID_TITLE_Y + NUMBER_CELL_H,
-							PAPER_W - CONTENT_ML - ANCHORPROP.width - ANCHORPROP.gapX,
-							ID_TITLE_Y + NUMBER_CELL_H
-						)
-						.attr({
-							fill: "none",
-							stroke: "#000",
-							strokeWidth: 1,
-							shapeRendering: "crispEdges"
-						})
-					);
-					numbers.forEach((item, index) => {
-						// 画准考证号填涂对应锚点
-						let c1 = snap.rect(
-							INFO_LEFT_X + NUMBER_ITEM_MLR + index * cellWidth,
-							40,
-							0,
-							NUMBER_ITEM_H
-						);
-						//  画准考证号分列分割线
-						let c2 = snap
+					
+					if(!isShowCode){
+						this.idNumberBox.add(
+							// 填涂上边框
+							snap
 							.line(
-								INFO_LEFT_X + cellWidth * index,
-								ID_TITLE_Y,
-								INFO_LEFT_X + cellWidth * index,
-								ID_TITLE_Y - ID_TITLE_H + INFO_H
+								INFO_LEFT_X,
+								ID_TITLE_Y + NUMBER_CELL_H,
+								PAPER_W - CONTENT_ML - ANCHORPROP.width - ANCHORPROP.gapX,
+								ID_TITLE_Y + NUMBER_CELL_H
 							)
 							.attr({
 								fill: "none",
 								stroke: "#000",
-								strokeWidth: index === 0 ? 0 : 1,
+								strokeWidth: 1,
 								shapeRendering: "crispEdges"
-							});
-
-						this.idNumberBox.add(c1, c2);
-						const context = require.context('@/icons/answersheet', false, /.svg/)
-						const frames = []
-						context.keys().forEach(k => {
-							frames.push(context(k))
-						})
-						// 画填涂svg图片
-						for (let i = 0; i < 10; i++) {
-							let img = frames[i];
-							let x = INFO_LEFT_X + NUMBER_ITEM_MLR + cellWidth * index
-							let y = ID_TITLE_Y + NUMBER_CELL_H + 5 + NUMBER_ITEM_MT * i
-							let c3 = snap.image(
-								img,
-								x,
-								y,
-								NUMBER_ITEM_W,
+							})
+						);
+						numbers.forEach((item, index) => {
+							// 画准考证号填涂对应锚点
+							let c1 = snap.rect(
+								INFO_LEFT_X + NUMBER_ITEM_MLR + index * cellWidth,
+								40,
+								0,
 								NUMBER_ITEM_H
 							);
-							this.idNumberBox.add(c3);
-							this.svgPosArr.push({
-								ans: i + '',
-								row: index,
-								pos: [{
-										x: x - CONTENT_START_X,
-										y: y - CONTENT_START_Y
-									},
-									{
-										x: x - CONTENT_START_X,
-										y: y - CONTENT_START_Y + NUMBER_ITEM_H
-									},
-									{
-										x: x - CONTENT_START_X + NUMBER_ITEM_W,
-										y: y - CONTENT_START_Y + NUMBER_ITEM_H
-									},
-									{
-										x: x - CONTENT_START_X + NUMBER_ITEM_W,
-										y: y - CONTENT_START_Y
-									}
-								]
+							//  画准考证号分列分割线
+							let c2 = snap
+								.line(
+									INFO_LEFT_X + cellWidth * index,
+									ID_TITLE_Y,
+									INFO_LEFT_X + cellWidth * index,
+									ID_TITLE_Y - ID_TITLE_H + INFO_H
+								)
+								.attr({
+									fill: "none",
+									stroke: "#000",
+									strokeWidth: index === 0 ? 0 : 1,
+									shapeRendering: "crispEdges"
+								});
+						
+							this.idNumberBox.add(c1, c2);
+							const context = require.context('@/icons/answersheet', false, /.svg/)
+							const frames = []
+							context.keys().forEach(k => {
+								frames.push(context(k))
 							})
-						}
-					});
+							// 画填涂svg图片
+							for (let i = 0; i < 10; i++) {
+								let img = frames[i];
+								let x = INFO_LEFT_X + NUMBER_ITEM_MLR + cellWidth * index
+								let y = ID_TITLE_Y + NUMBER_CELL_H + 5 + NUMBER_ITEM_MT * i
+								let c3 = snap.image(
+									img,
+									x,
+									y,
+									NUMBER_ITEM_W,
+									NUMBER_ITEM_H
+								);
+								this.idNumberBox.add(c3);
+								this.svgPosArr.push({
+									ans: i + '',
+									row: index,
+									pos: [{
+											x: x - CONTENT_START_X,
+											y: y - CONTENT_START_Y
+										},
+										{
+											x: x - CONTENT_START_X,
+											y: y - CONTENT_START_Y + NUMBER_ITEM_H
+										},
+										{
+											x: x - CONTENT_START_X + NUMBER_ITEM_W,
+											y: y - CONTENT_START_Y + NUMBER_ITEM_H
+										},
+										{
+											x: x - CONTENT_START_X + NUMBER_ITEM_W,
+											y: y - CONTENT_START_Y
+										}
+									]
+								})
+							}
+						});
+					}
+					
 				/* 二维码区域框的信息 */
 				let qrCodeBox_x = INFO_LEFT_X - SVG_BORDER_PROP.x
 				let qrCodeBox_y = CONTENT_MT + 50  - SVG_BORDER_PROP.y + 40
@@ -293,6 +296,7 @@
 			
 			this.$EventBus.$off('changeIdMode')
 			this.$EventBus.$on('changeIdMode', val => {
+				console.log(val);
 				this.renderIdNumber(this.idLength, val);
 			})
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 887 - 863
TEAMModelOS/ClientApp/src/view/newsheet/index.vue


+ 7 - 0
TEAMModelOS/ClientApp/src/view/student-account/class/ClassMgt.vue

@@ -84,6 +84,10 @@
                 <Button v-if="$access.can('admin.*|student-upd')" class="save-btn" :loading="isSaveLoading" icon="ios-settings" @click="fastStatus = true" v-show="currentTabIndex == 2">
                     快速设置
                 </Button>
+				<!-- 快速生成名单二维码 -->
+				<Button v-if="$access.can('admin.*|student-upd') && students.length" icon="md-download" class="save-btn" @click="generateQrcodes">
+				    生成名单二维码
+				</Button>
             </div>
             <div class="class-info-content">
                 <!--基础信息-->
@@ -549,6 +553,9 @@ export default {
         }
     },
     methods: {
+		generateQrcodes(){
+			this.$tools.batchQrcodes(this.students.map(i => i.id),this.classListShow[this.curClassIndex].name)
+		},
         confirmFastSet() {
             if (!this.fastType.length) {
                 this.$Message.warning('请勾选需要快速设置的字段')

+ 8 - 1
TEAMModelOS/ClientApp/src/view/student-account/stulist/MgtStuList.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
     <div class="mgt-stu-list custom-iview-split">
         <Split v-model="split1">
             <div slot="left" class="stu-list-box">
@@ -45,6 +45,10 @@
                             <Icon type="ios-settings" size="16" />
                             <span>{{$t('cusMgt.editStu')}}</span>
                         </span>
+						<span v-if="$access.can('admin.*|student-upd') && stuListShow.length" class="action-btn" @click="generateQrcodes">
+						    <Icon type="md-download" size="16" />
+						    <span>生成名单二维码</span>
+						</span>
                     </div>
                 </div>
                 <div class="stu-list-table">
@@ -207,6 +211,9 @@ export default {
         }
     },
     methods: {
+		generateQrcodes(){
+			this.$tools.batchQrcodes(this.students.map(i => i.id),this.stuListShow[this.curIndex].name)
+		},
         confirmFastSet() {
             this.stuListShow[this.curIndex].members.forEach((item, index) => {
                 item.irs = (index + 1) + ''

+ 6 - 6
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -3767,18 +3767,18 @@ namespace TEAMModelOS.Controllers.Analysis
                     dto.exercise.scope = "school";
                     dto.exercise.score = item.score;
                     StringBuilder builder = new StringBuilder();
-                    builder.Append(fileDto.examId).Append("/");
-                    builder.Append("paper").Append("/");
-                    builder.Append(fileDto.subjectId).Append("/");
+                    builder.Append(fileDto.examId).Append('/');
+                    builder.Append("paper").Append('/');
+                    builder.Append(fileDto.subjectId).Append('/');
                     builder.Append(dto.id + ".json");
                     tasks.Add(_azureStorage.UploadFileByContainer(fileDto.code, dto.ToJsonString(), "exam", builder.ToString(), false));
 
 
                 }
                 StringBuilder paperBuilder = new StringBuilder();
-                paperBuilder.Append(fileDto.examId).Append("/");
-                paperBuilder.Append("paper").Append("/");
-                paperBuilder.Append(fileDto.subjectId).Append("/");
+                paperBuilder.Append(fileDto.examId).Append('/');
+                paperBuilder.Append("paper").Append('/');
+                paperBuilder.Append(fileDto.subjectId).Append('/');
                 paperBuilder.Append("index.json");
                 tasks.Add(_azureStorage.UploadFileByContainer(fileDto.code, paperDto.ToJsonString(), "exam", paperBuilder.ToString(), false));
 

+ 1 - 1
TEAMModelOS/Controllers/Common/AreaController.cs

@@ -525,7 +525,7 @@ namespace TEAMModelOS.Controllers
                     lateCount = records.Where(h => !string.IsNullOrEmpty(h.sign) && h.sign.Equals("1")).ToList().Count,
                     acount = records.Where(h => h.aTime > 0).ToList().Count
                 });
-                return Ok(new { survey, work = twork, exam, info, studies = moreInfo.Select(m => new { m.teac, m.stu }) });
+                return Ok(new { survey, work = twork, exam, info, studies = moreInfo.Select(m =>  m.stu ),teac = moreInfo.Select(m => m.teac).First() });
             }
             catch (Exception e)
             {

+ 2 - 1
TEAMModelOS/Properties/launchSettings.json

@@ -14,12 +14,13 @@
       "launchBrowser": false,
       "launchUrl": "selectModule",
       "environmentVariables": {
+
         "ASPNETCORE_ENVIRONMENT": "Development"
       }
     },
     "TEAMModelOS": {
       "commandName": "Project",
-      "launchBrowser": false,
+      "launchBrowser": true,
       //"launchUrl": "login",
       "applicationUrl": "https://localhost:5001;http://localhost:5000",
       "environmentVariables": {