Преглед изворни кода

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop5.0-tmd

liqk пре 4 година
родитељ
комит
ae5808393b
18 измењених фајлова са 273 додато и 48 уклоњено
  1. 24 0
      TEAMModelFunction/ActivityHttpTrigger.cs
  2. 34 0
      TEAMModelFunction/MonitorServicesBus.cs
  3. 15 0
      TEAMModelOS.SDK/Models/Cosmos/Common/Bloblog.cs
  4. 40 9
      TEAMModelOS.SDK/Models/Cosmos/School/School.cs
  5. 1 1
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/billboard-lightbox.css
  6. 7 2
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/common.css
  7. 1 8
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/home-view.css
  8. 30 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testReport.css
  9. 36 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testReport.less
  10. 13 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-test.css
  11. 2 2
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-view.css
  12. 2 2
      TEAMModelOS/ClientApp/src/components/student-web/EventView/BillBoardandLightBox.vue
  13. 18 2
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue
  14. 21 1
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperTest.vue
  15. 14 11
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/QuesNaire.vue
  16. 7 6
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/Vote.vue
  17. 7 3
      TEAMModelOS/Controllers/Core/BlobController.cs
  18. 1 1
      TEAMModelOS/TEAMModelOS.csproj

+ 24 - 0
TEAMModelFunction/ActivityHttpTrigger.cs

@@ -294,6 +294,7 @@ namespace TEAMModelFunction
             }
             return new OkObjectResult(new { });
         }
+
         /// <summary>
         /// 设置问卷调查未初始化学生列表的业务
         /// </summary>
@@ -470,5 +471,28 @@ namespace TEAMModelFunction
                 return new BadRequestResult();
             }
         }
+        /// <summary>
+        ///获取单个目录的大小,用于获取评测,试题,试卷,问卷,投票等 文件层级超过两层的文件。
+        ///例如 /exam/uuid/xxx  /item/uuid/xxx   /paper/uuid/xxx  /vote/uuid/xxx  /suervy/uuid/xxx
+        /// {""}
+        /// </summary>
+        /// <param name="req"></param>
+        /// <param name="log"></param>
+        /// <returns></returns>
+        [FunctionName("get-blobsize")]
+        public async Task<IActionResult> GetBlobsize(
+            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
+            ILogger log)
+        {
+            string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
+            var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
+            if (data.TryGetProperty("name", out JsonElement name)) {
+                await _azureStorage.GetBlobContainerClient($"{name}").GetBlobsSize();
+            }
+           
+            return new OkObjectResult(new { code = 200 });
+        }
+          
     }
+  
 }

+ 34 - 0
TEAMModelFunction/MonitorServicesBus.cs

@@ -144,6 +144,40 @@ namespace TEAMModelFunction
             }
         }
 
+        /*
+         public async Task Blob([ServiceBusTrigger("%Azure:ServiceBus:ActiveTask%", "blob", Connection = "Azure:ServiceBus:ConnectionString")] string msg) {
+            try
+            {
+               // await _dingDing.SendBotMsg($"ServiceBus,Blob(){msg}", GroupNames.醍摩豆服務運維群組);
+                var jsonMsg = JsonDocument.Parse(msg);
+                if(jsonMsg.RootElement.TryGetProperty("name", out JsonElement name)&& name.ValueKind==JsonValueKind.String)
+                {
+                    jsonMsg.RootElement.TryGetProperty("root", out JsonElement root);
+                    List<string> roots= root.ToObject<List<string>>();
+                    List<Dictionary<string, double?>> list = new List<Dictionary<string, double?>>();
+                    foreach (var rt in roots) {
+                        var client = _azureStorage.GetBlobContainerClient($"{name}");
+                        var size = await client.GetBlobsCatalogSize(rt);
+                        list.Add(size.Item2);
+                        await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", new RedisValue($"{name}"), new RedisValue($"{long.Parse($"{size.Item1}")}"));
+                        foreach (var key in size.Item2.Keys)
+                        {
+                            await _azureRedis.GetRedisClient(8).SortedSetRemoveAsync($"Blob:Catalog:{name}", key);
+                            await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Blob:Catalog:{name}", key, size.Item2[key].HasValue ? size.Item2[key].Value : 0);
+                        }
+                    }
+                    await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Blob() 容器:{name}使用:{root},文件分类:{list.ToJsonString()}",
+                            GroupNames.成都开发測試群組);
+                }
+            }
+            catch (Exception ex)
+            {
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Blob()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
+            }
+        }
+         
+         */
+
         /// <summary>
         /// 完善课程变更,StuListChange,  originCode是学校编码 则表示名单是学校自定义名单,如果是tmdid则表示醍摩豆的私有名单,scope=school,private。
         /// </summary>

+ 15 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/Bloblog.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace TEAMModelOS.SDK.Models
+{
+    public class Bloblog :CosmosEntity
+    {
+        public string name { get; set; }
+        public string url { get; set; }
+        public string time { get; set; }
+        public long  size { get; set; }
+        public string period { get; set; }
+    }
+}

+ 40 - 9
TEAMModelOS.SDK/Models/Cosmos/School/School.cs

@@ -8,38 +8,69 @@ using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.DI;
 
 namespace TEAMModelOS.SDK.Models
-{    
+{
     public class School : CosmosEntity
-    {        
+    {
         public School()
         {
             pk = "Base";
             timeZone = new TimeZone();
             period = new List<Period>();
         }
-        
+
+        /// <summary>
+        /// 学校编码
+        /// </summary>
         public string schoolCode { get; set; }
+        /// <summary>
+        /// 学校名称
+        /// </summary>
         public string name { get; set; }
+        /// <summary>
+        /// 学段
+        /// </summary>
         public List<Period> period { get; set; }
-        public List<Campus> campuses { get; set; }  
-        
+        /// <summary>
+        /// 校区
+        /// </summary>
+        public List<Campus> campuses { get; set; }
+        /// <summary>
+        /// 地区
+        /// </summary>
         public string region { get; set; }
         public string province { get; set; }
+        /// <summary>
+        /// 省份
+        /// </summary>
         public string city { get; set; }
+        /// <summary>
+        ///授权给 学校的Blob 容器空间大小 单位为G
+        ///1252748378/1024/1024/1024
+        ///1GB=1024MB,1MB=1024KB,1KB=1024B  存储最小单位为B字节
+        /// </summary>
         public int size { get; set; }
-
-
+        /// <summary>
+        /// 地址
+        /// </summary>
         public string address { get; set; }
+        /// <summary>
+        /// Logo
+        /// </summary>
         public string picture { get; set; }
-
+        /// <summary>
+        /// 时区
+        /// </summary>
         public TimeZone timeZone { get; set; }
         /// <summary>
         /// 1 普教,2 高职教
         /// </summary>
         public int type { get; set; }
+      
 
     }
-
+    /// <summary>
+    /// 课表计划
+    /// </summary>
     public class TimeTable
     {
         public string id { get; set; }

+ 1 - 1
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/billboard-lightbox.css

@@ -112,7 +112,7 @@
   }
 }
 .dec {
-  margin-top: 10px;
+  margin-top: 20px;
 }
 .dec .referlink {
   color: #24b880;

+ 7 - 2
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/common.css

@@ -375,9 +375,14 @@ body,
 }
 .title-rect-name {
   font-size: 20px;
-  position: relative;
+  /* position: relative;
   top: -5px;
-  left: 10px;
+  left: 10px; */
+  border-left: 10px solid #24b880;
+  padding-left: 10px;
+  height: 20px;
+  line-height: 20px;
+  margin-bottom: 10px;
 }
 .base-info {
   text-align: right;

+ 1 - 8
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/home-view.css

@@ -175,14 +175,7 @@
 .home-view .calenderCard .title {
   font-weight: bolder;
 }
-.home-view .calenderCard .title-rect-name {
-  color: #515a6e;
-  border-left: 10px solid #24b880;
-  padding-left: 10px;
-  height: 20px;
-  line-height: 20px;
-  left: 0;
-}
+
 .home-view .calenderCard .classtitle {
   font-size: 18px;
   /*font-family: Arial Rounded MT Bold;*/

+ 30 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testReport.css

@@ -0,0 +1,30 @@
+.filterBtn .ivu-checkbox-group {
+  display: inline-block;
+}
+.filterBtn .ivu-checkbox-group .ivu-checkbox-wrapper {
+  height: 26px;
+  line-height: 26px;
+  border-radius: 4px;
+  font-weight: bolder;
+  border: 1px solid #c5c5c5;
+  padding: 0 10px;
+  margin-right: 10px;
+}
+.filterBtn .ivu-checkbox-group .ivu-checkbox-wrapper .ivu-checkbox {
+  display: none;
+}
+.filterBtn .ivu-checkbox-group .ivu-checkbox-wrapper-checked {
+  color: #fff;
+}
+.filterBtn .ivu-checkbox-group .ivu-checkbox-wrapper-checked:nth-child(1) {
+  background: #00ad6c;
+  border-color: #00ad6c;
+}
+.filterBtn .ivu-checkbox-group .ivu-checkbox-wrapper-checked:nth-child(2) {
+  background: #ff5508;
+  border-color: #ff5508;
+}
+.filterBtn .ivu-checkbox-group .ivu-checkbox-wrapper-checked:nth-child(3) {
+  background: #b7b7b7;
+  border-color: #b7b7b7;
+}

+ 36 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testReport.less

@@ -0,0 +1,36 @@
+.filterBtn .ivu-checkbox-group {
+    display: inline-block;
+
+    .ivu-checkbox-wrapper {
+        height: 26px;
+        line-height: 26px;
+        border-radius: 4px;
+        font-weight: bolder;
+        border: 1px solid rgb(197, 197, 197);
+        padding: 0 10px;
+        margin-right: 10px;
+
+        .ivu-checkbox {
+            display: none;
+        }
+    }
+
+    .ivu-checkbox-wrapper-checked {
+        color: #fff;
+
+        &:nth-child(1) {
+            background: #00ad6c;
+            border-color: #00ad6c;
+        }
+
+        &:nth-child(2) {
+            background: #ff5508;
+            border-color: #ff5508;
+        }
+
+        &:nth-child(3) {
+            background: #b7b7b7;
+            border-color: #b7b7b7;
+        }
+    }
+}

+ 13 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-test.css

@@ -395,6 +395,19 @@
   background-color: #24b880 !important;
   border: none;
 }
+
+
+.lesson-test-pop .testButn .ivu-radio-wrapper-checked {
+    background: #24b880;
+}
+
+.lesson-test-pop .testButn .ivu-radio {
+    display: none;
+}
+
+
+
+
 .lesson-test-pop .testbg {
   z-index: 2;
   text-align: left;

+ 2 - 2
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-view.css

@@ -29,14 +29,14 @@
   height: auto;
 }
 
-.lesson-test .title-rect-name {
+/* .lesson-test .title-rect-name {
   border-left: 10px solid #24b880;
   padding-left: 10px;
   height: 20px;
   line-height: 20px;
   left: 0;
   margin-bottom: 10px;
-}
+} */
 
 
 .paper-tasks {

+ 2 - 2
TEAMModelOS/ClientApp/src/components/student-web/EventView/BillBoardandLightBox.vue

@@ -1,14 +1,14 @@
 <template>
     <div class="billboard-and-LightBox">
         <div class="title-rect-group">
-            <div class="title-rect" />
+            <!-- <div class="title-rect" /> -->
             <h2 class="title-rect-name">{{$t('studentWeb.billboard.description')}}</h2>
         </div>
         <div class="dec">
             <p><span v-html="activityData.description"></span></p>
         </div>
         <div class="title-rect-group" v-if="this.$store.getters.getItemTitle.eventType  === 'vote'">
-            <div class="title-rect" />
+            <!-- <div class="title-rect" /> -->
             <h2 class="title-rect-name">{{$t("studentWeb.vote.voteRecord")}}</h2>
         </div>
         <div class="dec" v-if="this.$store.getters.getItemTitle.eventType == 'vote'">

+ 18 - 2
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue

@@ -74,7 +74,19 @@
                 <h2 class="title-rect-name" @click="checkedAnsFilter">{{$t("studentWeb.exam.report.answerBack")}}</h2>
             </div>
             <div class="filterBtn">
-                <label class="checkAns">
+                <CheckboxGroup v-model="checkedAns">
+                    <Checkbox label="right">
+                        {{$t("studentWeb.exam.report.right")}}: {{rightAns.right}}
+                    </Checkbox>
+                    <Checkbox label="wrong">
+                        {{$t("studentWeb.exam.report.wrong")}}: {{rightAns.wrong}}
+                    </Checkbox>
+                    <Checkbox label="noAns">
+                        {{$t("studentWeb.exam.report.noScore")}}: {{rightAns.noAns}}
+                    </Checkbox>
+                </CheckboxGroup>
+                
+                <!-- <label class="checkAns">
                     <input type="checkbox" value="right" v-model="checkedAns" />
                     <span>{{$t("studentWeb.exam.report.right")}}: {{rightAns.right}}</span>
                     <div class="rightBtn"></div>
@@ -88,7 +100,7 @@
                     <input type="checkbox" value="noAns" v-model="checkedAns" />
                     <span>{{$t("studentWeb.exam.report.noScore")}}: {{ rightAns.noAns}}</span>
                     <div class="noAnsBtn"></div>
-                </label>
+                </label> -->
                 <svg-icon icon-class="AnsWerDetail" :class="{ ansDetail: !closeAnsDetail, closeAnsDetail: closeAnsDetail,}" />
                 <button :class="['wrong-exercises', rightAns.wrong != 0 ? 'wrong' : 'nowrong']" @click="showTest">
                     {{$t("studentWeb.exam.report.wrongPractice")}}
@@ -573,6 +585,10 @@
     };
 </script>
 
+<style>
+    @import "~@/assets/student-web/component_styles/lesson-testReport.css";
+</style>
+
 <style scoped>
     .lesson-test-report {
         min-height: 600px;

+ 21 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperTest.vue

@@ -112,6 +112,12 @@
                             </div>
                             <!--判断题选项-->
                             <div v-if="getQue(queNo).type == 'judge'" align="center">
+                                <!-- <div class="testButn">
+                                    <Radio-group v-model="checkers[queNo][0]">
+                                        <Radio label="A"><Icon type="md-checkmark" /></Radio>
+                                        <Radio label="B"><Icon type="md-close" /></Radio>
+                                    </Radio-group>
+                                </div> -->
                                 <label class="testBtn yesNoBtn">
                                     <input type="radio" value="A" v-model="checkers[queNo][0]" :disabled="!closeTest" />
                                     <div class="testbg">
@@ -586,7 +592,21 @@
                 }
 
             }
-        }
+        },
+        // 导航守卫监听
+        /* beforeRouteLeave(to, from, next) {
+            console.log(1111111111);
+            this.$Modal.confirm({
+                title: $t("studentWeb.exam.testpop.exitQuizhint"),
+                content: "cwsdgrtht",
+                onOk: () => {
+                    next(true)
+                },
+                onCancel: () => {
+                    next(false)
+                },
+            })
+        }, */
     }
 </script>
 

+ 14 - 11
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/QuesNaire.vue

@@ -52,26 +52,29 @@
 		<div v-if="surveyInfo.progress !== 'finish' && !alreadyAnswered">
 			<BillBoardandLightBox :activityData="surveyInfo" />
 			<div class="title-rect-group">
-				<div class="title-rect" />
+				<!-- <div class="title-rect" /> -->
 				<h2 class="title-rect-name">{{ $t('survey.studentWeb.content') }}</h2>
 			</div>
 			<br />
-
+			<!-- 问卷内容 -->
 			<div v-for="(item, index) in surveyInfo.items" :key="index" class="survey-item">
-				<br />
+				<!-- <br /> -->
 				<div style="display: flex;font-weight: bold;">
 					<span>{{ index + 1 }}. </span>
 					<span v-html="item.question"></span>({{ typeList[item.type] }})<span></span>
 				</div>
+				<!-- 非问答 -->
 				<div v-if="item.type !== 'subjective'">
-					<label class="unitTestBtn" v-for="(option, optionIndex) in item.option" :key="optionIndex">
+					<div class="unitTestBtn" v-for="(option, optionIndex) in item.option" :key="optionIndex">
 						<div class="unitTestbg" @click="onOptionClick(item,index,option.code)"
 							:style="{ backgroundColor: submitArr[index].includes(option.code) ?  '#24b880' : 'transparent' }">
-							{{ option.code }}. <span v-html="option.value" style="margin-left: 10px;"></span></div>
-					</label>
+							{{ option.code }}. <span v-html="option.value" style="margin-left: 10px;"></span>
+						</div>
+					</div>
 				</div>
+				<!-- 问答 -->
 				<div v-if="item.type === 'subjective'">
-					<Input v-model="submitArr[index][0]" type="textarea" :rows="8" :placeholder="$t('stuentWeb.exam.inputAnswers')" />
+					<Input v-model="submitArr[index][0]" type="textarea" :rows="8" :placeholder="$t('studentWeb.exam.inputAnswers')" />
 				</div>
 				<Divider v-if="index != surveyInfo.items.length - 1" />
 			</div>
@@ -100,7 +103,7 @@
 		},
 		data(vm) {
 			return {
-				surveyInfo: {
+				surveyInfo: { //问卷信息
 					items: []
 				},
 				checkers: [],
@@ -117,7 +120,7 @@
 					'judge': vm.$t('survey.questionaire.judge'),
 					'subjective': vm.$t('survey.questionaire.subjective')
 				},
-				submitArr: []
+				submitArr: [] //填写的数据
 			};
 		},
 
@@ -255,7 +258,7 @@
 				console.log(this.surveyInfo)
 			},
 
-			// 获取blob里的试题数据
+			// 获取blob里的问卷内容
 			getBlobItems(qnItem) {
 				return new Promise(async (resolve, reject) => {
 					let schoolBlobHost = JSON.parse(decodeURIComponent(localStorage.student_profile, "utf-8")).blob_uri
@@ -290,7 +293,7 @@
 				})
 			},
 			
-			// 获取blob里的试题数据
+			// 获取blob里的问卷信息
 			getBlobJsonFile(scope,url,container){
 				return new Promise(async (resolve,reject) => {
 					let blobUrl = JSON.parse(decodeURIComponent(localStorage.student_profile, "utf-8")).blob_uri

+ 7 - 6
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/Vote.vue

@@ -29,7 +29,7 @@
                 <BillBoardandLightBox :activityData="voteInfo" :voteRes="voteResData" />
                 <div class="vote-title">
                     <div class="title-rect-group">
-                        <div class="title-rect" />
+                        <!-- <div class="title-rect" /> -->
                         <h2 class="title-rect-name">{{ $t("studentWeb.vote.bollotbox") }}</h2>
                         <p v-if="voteInfo.repeat" style="margin-left:15px;margin-top:2px">{{ $t("studentWeb.vote.surplusTickets")}} <span style="font-size:16px">{{voteCount}}</span><span> {{ $t("studentWeb.vote.tickets")}} </span></p>
                     </div>
@@ -37,7 +37,7 @@
                         <span style="margin-left:5px">{{$t("studentWeb.vote.voteRes")}}</span>
                     </Button>
                 </div>
-                <!--和評測模組一樣-->
+                <!-- 投票内容 -->
                 <div class="question-box"><span v-html="voteInfo.description"></span></div>
                 <div>
                     <div class="checkAnswer" v-for="(item, index) in voteInfo.options" :key="index">
@@ -69,6 +69,7 @@
 
             </div>
         </div>
+        <!-- 投票结果 -->
         <div class="voteResults" v-if="showResult">
             <h3 class="voteResultsMainRow ">
                 {{ $t("studentWeb.vote.voteResult") }}
@@ -116,13 +117,13 @@
                 voteChecked: [],
                 WarmMessageisOpen: false,
                 clickbutnoChoose: false,
-                voteInfo: {},
+                voteInfo: {}, //投票信息
                 voteRes: {},
                 voteResData: [],
                 isVote: false,
                 voteStatus:false,
                 voteNum: 0,
-                showResult: false,
+                showResult: false, //显示投票结果
                 chooseVoteRes: {},
                 isLoad: false,
                 isResult: false,
@@ -233,8 +234,8 @@
                 return val1.code.toLowerCase() < val2.code.toLowerCase()
              },
             showRes() {
-            this.showResult = !this.showResult
-             },
+                this.showResult = !this.showResult
+            },
             //获取投票结果
             getVote(data) {
                 if (!this.voteInfo.repeat) {

+ 7 - 3
TEAMModelOS/Controllers/Core/BlobController.cs

@@ -153,7 +153,7 @@ namespace TEAMModelOS.Controllers.Core
                     await _azureRedis.GetRedisClient(8).SortedSetRemoveAsync($"Blob:Catalog:{blobContainerName}", u);
                     catalog[u] = 0;
                 }
-                var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "update", name = blobContainerName }.ToJsonString());
+                var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "update",root=new string[] { u }, name = blobContainerName }.ToJsonString());
                 messageBlob.ApplicationProperties.Add("name", "Blob");
                 var ActiveTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
                 await _serviceBus.GetServiceBusClient().SendMessageAsync(ActiveTask, messageBlob);
@@ -227,9 +227,11 @@ namespace TEAMModelOS.Controllers.Core
                     long? useSize = blobSize + urlSize.Select(x=>x.size).Sum();
                     await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", blobContainerName, useSize);
                     Dictionary<string, double?> catalog = new Dictionary<string, double?>();
+                    HashSet<string> root = new HashSet<string>();
                     foreach (var x in urlSize)
                     {
                         string u = System.Web.HttpUtility.UrlDecode(x.url, Encoding.UTF8).Split("/")[0];
+                        root.Add(u);
                         //释放文件夹空间
                         await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Blob:Catalog:{blobContainerName}", u, -x.size);
                         catalog[u] = await _azureRedis.GetRedisClient(8).SortedSetScoreAsync($"Blob:Catalog:{blobContainerName}", u);
@@ -239,7 +241,7 @@ namespace TEAMModelOS.Controllers.Core
                             catalog[u] = 0;
                         }
                     }
-                    var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "update", name = blobContainerName }.ToJsonString());
+                    var messageBlob = new ServiceBusMessage(new { id = Guid.NewGuid().ToString(), progress = "update", root = root.ToArray(), name = blobContainerName }.ToJsonString());
                     messageBlob.ApplicationProperties.Add("name", "Blob");
                     var ActiveTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
                     await _serviceBus.GetServiceBusClient().SendMessageAsync(ActiveTask, messageBlob);
@@ -427,8 +429,10 @@ namespace TEAMModelOS.Controllers.Core
             long? useSize = blobSize + disSize;
             await _azureRedis.GetRedisClient(8).HashSetAsync($"Blob:Record", name, useSize);
             Dictionary<string, double?> catalog = new Dictionary<string, double?>();
+            HashSet<string> root = new HashSet<string>();
             foreach (var x in urls) {
                 string u = System.Web.HttpUtility.UrlDecode(x.url, Encoding.UTF8).Split("/")[0];
+                root.Add(u);
                 await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Blob:Catalog:{name}", u, x.size);
                 catalog[u]= await _azureRedis.GetRedisClient(8).SortedSetScoreAsync($"Blob:Catalog:{name}", u);
                 if (catalog[u] < 0) {
@@ -436,7 +440,7 @@ namespace TEAMModelOS.Controllers.Core
                     catalog[u] = 0;
                 }
             }
-            var messageBlob = new ServiceBusMessage(new {id=Guid.NewGuid().ToString(), progress = "update",name=name}.ToJsonString());
+            var messageBlob = new ServiceBusMessage(new {id=Guid.NewGuid().ToString(), progress = "update", root= root.ToArray(), name=name}.ToJsonString());;
             messageBlob.ApplicationProperties.Add("name", "Blob");
             var ActiveTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
             await _serviceBus.GetServiceBusClient().SendMessageAsync(ActiveTask, messageBlob);

+ 1 - 1
TEAMModelOS/TEAMModelOS.csproj

@@ -22,7 +22,7 @@
   </ItemGroup>
   <ItemGroup>
     <PackageReference Include="DotNetZip" Version="1.15.0" />
-    <PackageReference Include="HTEXLib" Version="2.5.5" />
+    <PackageReference Include="HTEXLib" Version="2.5.6" />
     <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
     <PackageReference Include="VueCliMiddleware" Version="5.0.0" />
   </ItemGroup>