Forráskód Böngészése

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

OnePsycho 4 éve
szülő
commit
3f9de1cdc6
40 módosított fájl, 566 hozzáadás és 188 törlés
  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. 6 6
      TEAMModelOS/ClientApp/src/assets/iconfont/demo_index.html
  6. 3 3
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.css
  7. 1 1
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.json
  8. BIN
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.ttf
  9. BIN
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff
  10. BIN
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff2
  11. 1 1
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/billboard-lightbox.css
  12. 7 2
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/common.css
  13. 1 8
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/home-view.css
  14. 30 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testReport.css
  15. 36 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/lesson-testReport.less
  16. 13 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-test.css
  17. 2 2
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-view.css
  18. 15 2
      TEAMModelOS/ClientApp/src/common/UploadModal.vue
  19. 2 2
      TEAMModelOS/ClientApp/src/components/student-web/EventView/BillBoardandLightBox.vue
  20. 18 2
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue
  21. 21 1
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperTest.vue
  22. 14 11
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/QuesNaire.vue
  23. 7 6
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/Vote.vue
  24. 1 1
      TEAMModelOS/ClientApp/src/locale/lang/en-US/teachContent.js
  25. 1 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/teachContent.js
  26. 1 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/teachContent.js
  27. 49 16
      TEAMModelOS/ClientApp/src/store/module/teachers.js
  28. 1 1
      TEAMModelOS/ClientApp/src/utils/blobTool.js
  29. 5 0
      TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less
  30. 27 16
      TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue
  31. 1 1
      TEAMModelOS/ClientApp/src/view/student-account/AddStudent.vue
  32. 23 60
      TEAMModelOS/ClientApp/src/view/student-account/ImportStudent.vue
  33. 3 7
      TEAMModelOS/ClientApp/src/view/student-account/Index.vue
  34. 118 0
      TEAMModelOS/ClientApp/src/view/teachcontent/ResBelong.vue
  35. 14 3
      TEAMModelOS/ClientApp/src/view/teachcontent/index.less
  36. 20 21
      TEAMModelOS/ClientApp/src/view/teachcontent/index.vue
  37. 2 0
      TEAMModelOS/ClientApp/src/view/teachermgmt/components/personnel/Index.vue
  38. 2 0
      TEAMModelOS/ClientApp/src/view/teachermgmt/components/userList/Index.vue
  39. 7 3
      TEAMModelOS/Controllers/Core/BlobController.cs
  40. 1 1
      TEAMModelOS/TEAMModelOS.csproj

+ 24 - 0
TEAMModelFunction/ActivityHttpTrigger.cs

@@ -294,6 +294,7 @@ namespace TEAMModelFunction
             }
             }
             return new OkObjectResult(new { });
             return new OkObjectResult(new { });
         }
         }
+
         /// <summary>
         /// <summary>
         /// 设置问卷调查未初始化学生列表的业务
         /// 设置问卷调查未初始化学生列表的业务
         /// </summary>
         /// </summary>
@@ -470,5 +471,28 @@ namespace TEAMModelFunction
                 return new BadRequestResult();
                 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>
         /// <summary>
         /// 完善课程变更,StuListChange,  originCode是学校编码 则表示名单是学校自定义名单,如果是tmdid则表示醍摩豆的私有名单,scope=school,private。
         /// 完善课程变更,StuListChange,  originCode是学校编码 则表示名单是学校自定义名单,如果是tmdid则表示醍摩豆的私有名单,scope=school,private。
         /// </summary>
         /// </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;
 using TEAMModelOS.SDK.DI;
 
 
 namespace TEAMModelOS.SDK.Models
 namespace TEAMModelOS.SDK.Models
-{    
+{
     public class School : CosmosEntity
     public class School : CosmosEntity
-    {        
+    {
         public School()
         public School()
         {
         {
             pk = "Base";
             pk = "Base";
             timeZone = new TimeZone();
             timeZone = new TimeZone();
             period = new List<Period>();
             period = new List<Period>();
         }
         }
-        
+
+        /// <summary>
+        /// 学校编码
+        /// </summary>
         public string schoolCode { get; set; }
         public string schoolCode { get; set; }
+        /// <summary>
+        /// 学校名称
+        /// </summary>
         public string name { get; set; }
         public string name { get; set; }
+        /// <summary>
+        /// 学段
+        /// </summary>
         public List<Period> period { get; set; }
         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 region { get; set; }
         public string province { get; set; }
         public string province { get; set; }
+        /// <summary>
+        /// 省份
+        /// </summary>
         public string city { get; set; }
         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; }
         public int size { get; set; }
-
-
+        /// <summary>
+        /// 地址
+        /// </summary>
         public string address { get; set; }
         public string address { get; set; }
+        /// <summary>
+        /// Logo
+        /// </summary>
         public string picture { get; set; }
         public string picture { get; set; }
-
+        /// <summary>
+        /// 时区
+        /// </summary>
         public TimeZone timeZone { get; set; }
         public TimeZone timeZone { get; set; }
         /// <summary>
         /// <summary>
         /// 1 普教,2 高职教
         /// 1 普教,2 高职教
         /// </summary>
         /// </summary>
         public int type { get; set; }
         public int type { get; set; }
+      
 
 
     }
     }
-
+    /// <summary>
+    /// 课表计划
+    /// </summary>
     public class TimeTable
     public class TimeTable
     {
     {
         public string id { get; set; }
         public string id { get; set; }

+ 6 - 6
TEAMModelOS/ClientApp/src/assets/iconfont/demo_index.html

@@ -56,7 +56,7 @@
           
           
             <li class="dib">
             <li class="dib">
               <span class="icon iconfont">&#xe603;</span>
               <span class="icon iconfont">&#xe603;</span>
-                <div class="name">method-draw-image (3)</div>
+                <div class="name">手机未认证</div>
                 <div class="code-name">&amp;#xe603;</div>
                 <div class="code-name">&amp;#xe603;</div>
               </li>
               </li>
           
           
@@ -774,9 +774,9 @@
 <pre><code class="language-css"
 <pre><code class="language-css"
 >@font-face {
 >@font-face {
   font-family: 'iconfont';
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1621848601882') format('woff2'),
-       url('iconfont.woff?t=1621848601882') format('woff'),
-       url('iconfont.ttf?t=1621848601882') format('truetype');
+  src: url('iconfont.woff2?t=1621999720250') format('woff2'),
+       url('iconfont.woff?t=1621999720250') format('woff'),
+       url('iconfont.ttf?t=1621999720250') format('truetype');
 }
 }
 </code></pre>
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -805,7 +805,7 @@
           <li class="dib">
           <li class="dib">
             <span class="icon iconfont icon-phone-unverify"></span>
             <span class="icon iconfont icon-phone-unverify"></span>
             <div class="name">
             <div class="name">
-              method-draw-image (3)
+              手机未认证
             </div>
             </div>
             <div class="code-name">.icon-phone-unverify
             <div class="code-name">.icon-phone-unverify
             </div>
             </div>
@@ -1886,7 +1886,7 @@
                 <svg class="icon svg-icon" aria-hidden="true">
                 <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-phone-unverify"></use>
                   <use xlink:href="#icon-phone-unverify"></use>
                 </svg>
                 </svg>
-                <div class="name">method-draw-image (3)</div>
+                <div class="name">手机未认证</div>
                 <div class="code-name">#icon-phone-unverify</div>
                 <div class="code-name">#icon-phone-unverify</div>
             </li>
             </li>
           
           

+ 3 - 3
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
 @font-face {
   font-family: "iconfont"; /* Project id 2000444 */
   font-family: "iconfont"; /* Project id 2000444 */
-  src: url('iconfont.woff2?t=1621848601882') format('woff2'),
-       url('iconfont.woff?t=1621848601882') format('woff'),
-       url('iconfont.ttf?t=1621848601882') format('truetype');
+  src: url('iconfont.woff2?t=1621999720250') format('woff2'),
+       url('iconfont.woff?t=1621999720250') format('woff'),
+       url('iconfont.ttf?t=1621999720250') format('truetype');
 }
 }
 
 
 .iconfont {
 .iconfont {

+ 1 - 1
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.json

@@ -7,7 +7,7 @@
   "glyphs": [
   "glyphs": [
     {
     {
       "icon_id": "21777109",
       "icon_id": "21777109",
-      "name": "method-draw-image (3)",
+      "name": "手机未认证",
       "font_class": "phone-unverify",
       "font_class": "phone-unverify",
       "unicode": "e603",
       "unicode": "e603",
       "unicode_decimal": 58883
       "unicode_decimal": 58883

BIN
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.ttf


BIN
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff


BIN
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff2


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

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

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

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

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

@@ -175,14 +175,7 @@
 .home-view .calenderCard .title {
 .home-view .calenderCard .title {
   font-weight: bolder;
   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 {
 .home-view .calenderCard .classtitle {
   font-size: 18px;
   font-size: 18px;
   /*font-family: Arial Rounded MT Bold;*/
   /*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;
   background-color: #24b880 !important;
   border: none;
   border: none;
 }
 }
+
+
+.lesson-test-pop .testButn .ivu-radio-wrapper-checked {
+    background: #24b880;
+}
+
+.lesson-test-pop .testButn .ivu-radio {
+    display: none;
+}
+
+
+
+
 .lesson-test-pop .testbg {
 .lesson-test-pop .testbg {
   z-index: 2;
   z-index: 2;
   text-align: left;
   text-align: left;

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

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

+ 15 - 2
TEAMModelOS/ClientApp/src/common/UploadModal.vue

@@ -1,6 +1,8 @@
 <template>
 <template>
     <Modal v-model="uploadStatus" :ok-text="textLoading ? $t('updModal.uploading') : isComplete ? $t('updModal.complete'):$t('updModal.comfirmUpd')" :cancel-text="$t('updModal.cancelUpd')" :title="$t('teachContent.btnUpload')" class="upload-modal dark-iview-modal" width="800" :mask-closable="false" :closable="false" @on-ok="modalOk" @on-cancel="modalCancel" :loading="modalLoading">
     <Modal v-model="uploadStatus" :ok-text="textLoading ? $t('updModal.uploading') : isComplete ? $t('updModal.complete'):$t('updModal.comfirmUpd')" :cancel-text="$t('updModal.cancelUpd')" :title="$t('teachContent.btnUpload')" class="upload-modal dark-iview-modal" width="800" :mask-closable="false" :closable="false" @on-ok="modalOk" @on-cancel="modalCancel" :loading="modalLoading">
         <div class="upload-file-box">
         <div class="upload-file-box">
+            <!-- <p>上传到:{{pdInfo.filterPeriodName}}</p> -->
+            <ResBelong v-show="routerScope == 'school'" showLabel class="upd-to-pd" :pdId="pdId"></ResBelong>
             <Upload type="drag" action="" :show-upload-list="false" multiple :before-upload="customUpload" class="upload-wrap" :disabled="textLoading">
             <Upload type="drag" action="" :show-upload-list="false" multiple :before-upload="customUpload" class="upload-wrap" :disabled="textLoading">
                 <Icon class="upload-icon" custom="iconfont icon-upload" v-show="!uploadedList.length" />
                 <Icon class="upload-icon" custom="iconfont icon-upload" v-show="!uploadedList.length" />
                 <p class="upload-text" :style="{marginTop: uploadedList.length ? '25px':'0px'}">
                 <p class="upload-text" :style="{marginTop: uploadedList.length ? '25px':'0px'}">
@@ -64,8 +66,12 @@
 
 
 </template>
 </template>
 <script>
 <script>
-import BlobTool from '@/utils/blobTool.js';
+import BlobTool from '@/utils/blobTool.js'
+import ResBelong from '@/view/teachcontent/ResBelong.vue'
 export default {
 export default {
+    components: {
+        ResBelong
+    },
     data() {
     data() {
         return {
         return {
             uploadedList: [],
             uploadedList: [],
@@ -121,6 +127,11 @@ export default {
                 return []
                 return []
             },
             },
             type: Array
             type: Array
+        },
+        //资源所属学段
+        pdId: {
+            default: '',
+            type: String
         }
         }
     },
     },
     methods: {
     methods: {
@@ -378,7 +389,6 @@ export default {
             let n = file.name.substring(0, file.name.lastIndexOf('.'))
             let n = file.name.substring(0, file.name.lastIndexOf('.'))
             let dataUrl = await this.$jsFn.createVideoPoster(file.url + this.sasString, file.name, 0.1)
             let dataUrl = await this.$jsFn.createVideoPoster(file.url + this.sasString, file.name, 0.1)
             let f = this.$jsFn.dataURLtoFile(dataUrl, n + '.png')
             let f = this.$jsFn.dataURLtoFile(dataUrl, n + '.png')
-            console.log(f)
             this.containerClient.upload(f, 'thum').then(
             this.containerClient.upload(f, 'thum').then(
                 res => {
                 res => {
                     console.log(this.$t('updModal.posterOk'))
                     console.log(this.$t('updModal.posterOk'))
@@ -447,6 +457,9 @@ export default {
 
 
 </script>
 </script>
 <style scoped>
 <style scoped>
+.upd-to-pd{
+    margin-bottom: 10px;
+}
 .upload-text {
 .upload-text {
     margin: 10px 0px;
     margin: 10px 0px;
     font-size: 24px;
     font-size: 24px;

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

@@ -1,14 +1,14 @@
 <template>
 <template>
     <div class="billboard-and-LightBox">
     <div class="billboard-and-LightBox">
         <div class="title-rect-group">
         <div class="title-rect-group">
-            <div class="title-rect" />
+            <!-- <div class="title-rect" /> -->
             <h2 class="title-rect-name">{{$t('studentWeb.billboard.description')}}</h2>
             <h2 class="title-rect-name">{{$t('studentWeb.billboard.description')}}</h2>
         </div>
         </div>
         <div class="dec">
         <div class="dec">
             <p><span v-html="activityData.description"></span></p>
             <p><span v-html="activityData.description"></span></p>
         </div>
         </div>
         <div class="title-rect-group" v-if="this.$store.getters.getItemTitle.eventType  === 'vote'">
         <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>
             <h2 class="title-rect-name">{{$t("studentWeb.vote.voteRecord")}}</h2>
         </div>
         </div>
         <div class="dec" v-if="this.$store.getters.getItemTitle.eventType == 'vote'">
         <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>
                 <h2 class="title-rect-name" @click="checkedAnsFilter">{{$t("studentWeb.exam.report.answerBack")}}</h2>
             </div>
             </div>
             <div class="filterBtn">
             <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" />
                     <input type="checkbox" value="right" v-model="checkedAns" />
                     <span>{{$t("studentWeb.exam.report.right")}}: {{rightAns.right}}</span>
                     <span>{{$t("studentWeb.exam.report.right")}}: {{rightAns.right}}</span>
                     <div class="rightBtn"></div>
                     <div class="rightBtn"></div>
@@ -88,7 +100,7 @@
                     <input type="checkbox" value="noAns" v-model="checkedAns" />
                     <input type="checkbox" value="noAns" v-model="checkedAns" />
                     <span>{{$t("studentWeb.exam.report.noScore")}}: {{ rightAns.noAns}}</span>
                     <span>{{$t("studentWeb.exam.report.noScore")}}: {{ rightAns.noAns}}</span>
                     <div class="noAnsBtn"></div>
                     <div class="noAnsBtn"></div>
-                </label>
+                </label> -->
                 <svg-icon icon-class="AnsWerDetail" :class="{ ansDetail: !closeAnsDetail, closeAnsDetail: closeAnsDetail,}" />
                 <svg-icon icon-class="AnsWerDetail" :class="{ ansDetail: !closeAnsDetail, closeAnsDetail: closeAnsDetail,}" />
                 <button :class="['wrong-exercises', rightAns.wrong != 0 ? 'wrong' : 'nowrong']" @click="showTest">
                 <button :class="['wrong-exercises', rightAns.wrong != 0 ? 'wrong' : 'nowrong']" @click="showTest">
                     {{$t("studentWeb.exam.report.wrongPractice")}}
                     {{$t("studentWeb.exam.report.wrongPractice")}}
@@ -573,6 +585,10 @@
     };
     };
 </script>
 </script>
 
 
+<style>
+    @import "~@/assets/student-web/component_styles/lesson-testReport.css";
+</style>
+
 <style scoped>
 <style scoped>
     .lesson-test-report {
     .lesson-test-report {
         min-height: 600px;
         min-height: 600px;

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

@@ -112,6 +112,12 @@
                             </div>
                             </div>
                             <!--判断题选项-->
                             <!--判断题选项-->
                             <div v-if="getQue(queNo).type == 'judge'" align="center">
                             <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">
                                 <label class="testBtn yesNoBtn">
                                     <input type="radio" value="A" v-model="checkers[queNo][0]" :disabled="!closeTest" />
                                     <input type="radio" value="A" v-model="checkers[queNo][0]" :disabled="!closeTest" />
                                     <div class="testbg">
                                     <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>
 </script>
 
 

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

@@ -52,26 +52,29 @@
 		<div v-if="surveyInfo.progress !== 'finish' && !alreadyAnswered">
 		<div v-if="surveyInfo.progress !== 'finish' && !alreadyAnswered">
 			<BillBoardandLightBox :activityData="surveyInfo" />
 			<BillBoardandLightBox :activityData="surveyInfo" />
 			<div class="title-rect-group">
 			<div class="title-rect-group">
-				<div class="title-rect" />
+				<!-- <div class="title-rect" /> -->
 				<h2 class="title-rect-name">{{ $t('survey.studentWeb.content') }}</h2>
 				<h2 class="title-rect-name">{{ $t('survey.studentWeb.content') }}</h2>
 			</div>
 			</div>
 			<br />
 			<br />
-
+			<!-- 问卷内容 -->
 			<div v-for="(item, index) in surveyInfo.items" :key="index" class="survey-item">
 			<div v-for="(item, index) in surveyInfo.items" :key="index" class="survey-item">
-				<br />
+				<!-- <br /> -->
 				<div style="display: flex;font-weight: bold;">
 				<div style="display: flex;font-weight: bold;">
 					<span>{{ index + 1 }}. </span>
 					<span>{{ index + 1 }}. </span>
 					<span v-html="item.question"></span>({{ typeList[item.type] }})<span></span>
 					<span v-html="item.question"></span>({{ typeList[item.type] }})<span></span>
 				</div>
 				</div>
+				<!-- 非问答 -->
 				<div v-if="item.type !== 'subjective'">
 				<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)"
 						<div class="unitTestbg" @click="onOptionClick(item,index,option.code)"
 							:style="{ backgroundColor: submitArr[index].includes(option.code) ?  '#24b880' : 'transparent' }">
 							: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>
+				<!-- 问答 -->
 				<div v-if="item.type === 'subjective'">
 				<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>
 				</div>
 				<Divider v-if="index != surveyInfo.items.length - 1" />
 				<Divider v-if="index != surveyInfo.items.length - 1" />
 			</div>
 			</div>
@@ -100,7 +103,7 @@
 		},
 		},
 		data(vm) {
 		data(vm) {
 			return {
 			return {
-				surveyInfo: {
+				surveyInfo: { //问卷信息
 					items: []
 					items: []
 				},
 				},
 				checkers: [],
 				checkers: [],
@@ -117,7 +120,7 @@
 					'judge': vm.$t('survey.questionaire.judge'),
 					'judge': vm.$t('survey.questionaire.judge'),
 					'subjective': vm.$t('survey.questionaire.subjective')
 					'subjective': vm.$t('survey.questionaire.subjective')
 				},
 				},
-				submitArr: []
+				submitArr: [] //填写的数据
 			};
 			};
 		},
 		},
 
 
@@ -255,7 +258,7 @@
 				console.log(this.surveyInfo)
 				console.log(this.surveyInfo)
 			},
 			},
 
 
-			// 获取blob里的试题数据
+			// 获取blob里的问卷内容
 			getBlobItems(qnItem) {
 			getBlobItems(qnItem) {
 				return new Promise(async (resolve, reject) => {
 				return new Promise(async (resolve, reject) => {
 					let schoolBlobHost = JSON.parse(decodeURIComponent(localStorage.student_profile, "utf-8")).blob_uri
 					let schoolBlobHost = JSON.parse(decodeURIComponent(localStorage.student_profile, "utf-8")).blob_uri
@@ -290,7 +293,7 @@
 				})
 				})
 			},
 			},
 			
 			
-			// 获取blob里的试题数据
+			// 获取blob里的问卷信息
 			getBlobJsonFile(scope,url,container){
 			getBlobJsonFile(scope,url,container){
 				return new Promise(async (resolve,reject) => {
 				return new Promise(async (resolve,reject) => {
 					let blobUrl = JSON.parse(decodeURIComponent(localStorage.student_profile, "utf-8")).blob_uri
 					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" />
                 <BillBoardandLightBox :activityData="voteInfo" :voteRes="voteResData" />
                 <div class="vote-title">
                 <div class="vote-title">
                     <div class="title-rect-group">
                     <div class="title-rect-group">
-                        <div class="title-rect" />
+                        <!-- <div class="title-rect" /> -->
                         <h2 class="title-rect-name">{{ $t("studentWeb.vote.bollotbox") }}</h2>
                         <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>
                         <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>
                     </div>
@@ -37,7 +37,7 @@
                         <span style="margin-left:5px">{{$t("studentWeb.vote.voteRes")}}</span>
                         <span style="margin-left:5px">{{$t("studentWeb.vote.voteRes")}}</span>
                     </Button>
                     </Button>
                 </div>
                 </div>
-                <!--和評測模組一樣-->
+                <!-- 投票内容 -->
                 <div class="question-box"><span v-html="voteInfo.description"></span></div>
                 <div class="question-box"><span v-html="voteInfo.description"></span></div>
                 <div>
                 <div>
                     <div class="checkAnswer" v-for="(item, index) in voteInfo.options" :key="index">
                     <div class="checkAnswer" v-for="(item, index) in voteInfo.options" :key="index">
@@ -69,6 +69,7 @@
 
 
             </div>
             </div>
         </div>
         </div>
+        <!-- 投票结果 -->
         <div class="voteResults" v-if="showResult">
         <div class="voteResults" v-if="showResult">
             <h3 class="voteResultsMainRow ">
             <h3 class="voteResultsMainRow ">
                 {{ $t("studentWeb.vote.voteResult") }}
                 {{ $t("studentWeb.vote.voteResult") }}
@@ -116,13 +117,13 @@
                 voteChecked: [],
                 voteChecked: [],
                 WarmMessageisOpen: false,
                 WarmMessageisOpen: false,
                 clickbutnoChoose: false,
                 clickbutnoChoose: false,
-                voteInfo: {},
+                voteInfo: {}, //投票信息
                 voteRes: {},
                 voteRes: {},
                 voteResData: [],
                 voteResData: [],
                 isVote: false,
                 isVote: false,
                 voteStatus:false,
                 voteStatus:false,
                 voteNum: 0,
                 voteNum: 0,
-                showResult: false,
+                showResult: false, //显示投票结果
                 chooseVoteRes: {},
                 chooseVoteRes: {},
                 isLoad: false,
                 isLoad: false,
                 isResult: false,
                 isResult: false,
@@ -233,8 +234,8 @@
                 return val1.code.toLowerCase() < val2.code.toLowerCase()
                 return val1.code.toLowerCase() < val2.code.toLowerCase()
              },
              },
             showRes() {
             showRes() {
-            this.showResult = !this.showResult
-             },
+                this.showResult = !this.showResult
+            },
             //获取投票结果
             //获取投票结果
             getVote(data) {
             getVote(data) {
                 if (!this.voteInfo.repeat) {
                 if (!this.voteInfo.repeat) {

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/en-US/teachContent.js

@@ -31,7 +31,7 @@ export default {
   props7: '存儲空間不足!',
   props7: '存儲空間不足!',
   uploadText: '點擊或者拖拽上傳',
   uploadText: '點擊或者拖拽上傳',
 
 
-  resTips: 'HiTeach生成的課件,不包含PPT等其他檔案',
+  resTips: 'HiTeach生成的課件,只支持HTEX格式的教材預覽',
   space: '空間:',
   space: '空間:',
   calcing: '計算中…',
   calcing: '計算中…',
   blobFull: '(已滿)',
   blobFull: '(已滿)',

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/teachContent.js

@@ -31,7 +31,7 @@ export default {
   props7: '存储空间不足!',
   props7: '存储空间不足!',
   uploadText: '点击或者拖拽上传',
   uploadText: '点击或者拖拽上传',
 
 
-  resTips:'HiTeach生成的课件,不包含PPT等其他文件',
+  resTips:'HiTeach生成的课件,只支持HTEX格式的教材预览',
   space:'空间:',
   space:'空间:',
   calcing:'计算中...',
   calcing:'计算中...',
   blobFull:'(已满)',
   blobFull:'(已满)',

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/teachContent.js

@@ -31,7 +31,7 @@ export default {
   props7: '儲存空間不足!',
   props7: '儲存空間不足!',
   uploadText: '點按或者拖移上傳',
   uploadText: '點按或者拖移上傳',
 
 
-  resTips: 'HiTeach生成的教材,不包含PPT等其他檔案',
+  resTips: 'HiTeach生成的課件,只支持HTEX格式的教材預覽',
   space: '空間:',
   space: '空間:',
   calcing: '計算中…',
   calcing: '計算中…',
   blobFull: '(已滿)',
   blobFull: '(已滿)',

+ 49 - 16
TEAMModelOS/ClientApp/src/store/module/teachers.js

@@ -18,31 +18,24 @@ export default {
                 (resolve, reject) => {
                 (resolve, reject) => {
                     if (context.state.teacherList.length == 0) {
                     if (context.state.teacherList.length == 0) {
                         apiTools.courseMgmt.getSchoolTeacher({
                         apiTools.courseMgmt.getSchoolTeacher({
-                            'school_code': context.rootState.userInfo.schoolCode 
+                            'school_code': context.rootState.userInfo.schoolCode
                         }).then(
                         }).then(
                             (res) => {
                             (res) => {
                                 if (res) {
                                 if (res) {
-                                    if (res.teachers.length > 0) {
-                                        context.commit('setTeacherList', res.teachers)
-                                        resolve({
-                                            code: 1,
-                                            message: '数据请求成功'
-                                        })
-                                    } else {
-                                        resolve({
-                                            code: 2,
-                                            message: '请求成功,数据为空'
-                                        })
-                                    }
-                                } else {
+                                    context.commit('setTeacherList', res.teachers)
                                     resolve({
                                     resolve({
+                                        data: res.teachers,
+                                        message: '数据请求成功'
+                                    })
+                                } else {
+                                    reject({
                                         code: 0,
                                         code: 0,
                                         message: '请求失败,API error!'
                                         message: '请求失败,API error!'
                                     })
                                     })
                                 }
                                 }
                             },
                             },
                             (err) => {
                             (err) => {
-                                resolve({
+                                reject({
                                     code: 0,
                                     code: 0,
                                     message: '请求失败,API error!'
                                     message: '请求失败,API error!'
                                 })
                                 })
@@ -50,11 +43,51 @@ export default {
                         )
                         )
                     } else {
                     } else {
                         resolve({
                         resolve({
-                            code: 3,
+                            data: context.state.teacherList,
                             message: '数据已请求,无需重复请求'
                             message: '数据已请求,无需重复请求'
                         })
                         })
                     }
                     }
                 }
                 }
+                // (resolve, reject) => {
+                //     if (context.state.teacherList.length == 0) {
+                //         apiTools.courseMgmt.getSchoolTeacher({
+                //             'school_code': context.rootState.userInfo.schoolCode 
+                //         }).then(
+                //             (res) => {
+                //                 if (res) {
+                //                     if (res.teachers.length > 0) {
+                //                         context.commit('setTeacherList', res.teachers)
+                //                         resolve({
+                //                             code: 1,
+                //                             message: '数据请求成功'
+                //                         })
+                //                     } else {
+                //                         resolve({
+                //                             code: 2,
+                //                             message: '请求成功,数据为空'
+                //                         })
+                //                     }
+                //                 } else {
+                //                     resolve({
+                //                         code: 0,
+                //                         message: '请求失败,API error!'
+                //                     })
+                //                 }
+                //             },
+                //             (err) => {
+                //                 resolve({
+                //                     code: 0,
+                //                     message: '请求失败,API error!'
+                //                 })
+                //             }
+                //         )
+                //     } else {
+                //         resolve({
+                //             code: 3,
+                //             message: '数据已请求,无需重复请求'
+                //         })
+                //     }
+                // }
             )
             )
         }
         }
     }
     }

+ 1 - 1
TEAMModelOS/ClientApp/src/utils/blobTool.js

@@ -272,7 +272,7 @@ export default class BlobTool {
         let parseRes = []
         let parseRes = []
         let names = []
         let names = []
         fileList.forEach((item, index) => {
         fileList.forEach((item, index) => {
-            if (item.url.indexOf('/res/') > 0) {
+            if (item.url.indexOf('/res/') > 0 && item.url.indexOf('.HTE') < 0) {
                 let fileItem = {}
                 let fileItem = {}
                 let startIndex = JsFn.findChartIndex(item.blob, '/', 1)
                 let startIndex = JsFn.findChartIndex(item.blob, '/', 1)
                 let endIndex = JsFn.findChartIndex(item.blob, '/', 2)
                 let endIndex = JsFn.findChartIndex(item.blob, '/', 2)

+ 5 - 0
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less

@@ -335,4 +335,9 @@
     right: 15px;
     right: 15px;
     top: 50%;
     top: 50%;
     margin-top: -10px;
     margin-top: -10px;
+}
+.no-school-tips{
+    color: #ff9900;
+    text-align: center;
+    margin-top: 80px;
 }
 }

+ 27 - 16
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -85,7 +85,7 @@
                                     <Icon type="md-trash" size="16" />
                                     <Icon type="md-trash" size="16" />
                                     {{$t('cusMgt.delStu')}}
                                     {{$t('cusMgt.delStu')}}
                                 </span>
                                 </span>
-                                <span class="action-btn-wrap" @click="addStuStatus = true">
+                                <span v-show="$store.state.userInfo.hasSchool" class="action-btn-wrap" @click="addStuStatus = true">
                                     <Icon type="md-add" size="16" />
                                     <Icon type="md-add" size="16" />
                                     {{$t('cusMgt.addStu')}}
                                     {{$t('cusMgt.addStu')}}
                                 </span>
                                 </span>
@@ -206,7 +206,7 @@
                                 <EmptyData v-show="acList.length == 0" :textContent="acTypeLabel + $t('cusMgt.noAc')" :top="150"></EmptyData>
                                 <EmptyData v-show="acList.length == 0" :textContent="acTypeLabel + $t('cusMgt.noAc')" :top="150"></EmptyData>
                             </vuescroll>
                             </vuescroll>
                         </div>
                         </div>
-                        <!-- 课程时段 暂不实做-->
+                        <!-- 个人课程时段 暂不实做-->
                         <!-- <div v-show="tabName == 'time'" class="animated fadeIn class-record-wrap">
                         <!-- <div v-show="tabName == 'time'" class="animated fadeIn class-record-wrap">
                             <vuescroll>
                             <vuescroll>
                                 <h2 style="margin-top:120px;color:#ddd;text-align:center"> 
                                 <h2 style="margin-top:120px;color:#ddd;text-align:center"> 
@@ -296,7 +296,10 @@
                 <span>{{$t('cusMgt.name')}}</span>
                 <span>{{$t('cusMgt.name')}}</span>
                 <Input v-model="listName" :placeholder="$t('cusMgt.nameHolder')" style="width: 300px" />
                 <Input v-model="listName" :placeholder="$t('cusMgt.nameHolder')" style="width: 300px" />
             </div>
             </div>
-            <StudentList @getSelectInfo="(selction)=>{createStuList = selction}"></StudentList>
+            <StudentList v-if="$store.state.userInfo.hasSchool" @getSelectInfo="(selction)=>{createStuList = selction}"></StudentList>
+            <p v-else class="no-school-tips">
+                您暂未加入学校无法添加学校学生,只能创建好名单,让学生通过扫码加入名单!
+            </p>
         </Modal>
         </Modal>
         <Modal v-model="addCusStatus" :title="$t('cusMgt.addCus')" @on-ok="confirmAddCus" class-name="dark-iview-modal dark-iview-form">
         <Modal v-model="addCusStatus" :title="$t('cusMgt.addCus')" @on-ok="confirmAddCus" class-name="dark-iview-modal dark-iview-form">
             <Form ref="addCusInfo" :model="addCusInfo" :rules="ruleAddCus">
             <Form ref="addCusInfo" :model="addCusInfo" :rules="ruleAddCus">
@@ -342,16 +345,7 @@ export default {
             }
             }
         }
         }
         return {
         return {
-            cusType: [
-                {
-                    label: this.$t('cusMgt.scCus'),
-                    value: 'school'
-                },
-                {
-                    label: this.$t('cusMgt.privCus'),
-                    value: 'private'
-                }
-            ],
+            cusType: [],
             curPd: '',
             curPd: '',
             isShowSchd: false,
             isShowSchd: false,
             schoolBase: {
             schoolBase: {
@@ -466,7 +460,7 @@ export default {
             listLoading: false,
             listLoading: false,
             newSlStatus: false,
             newSlStatus: false,
             stuLoading: false,
             stuLoading: false,
-            listType: 'school',
+            listType: 'private',
             tabName: 'record',
             tabName: 'record',
             addCusStatus: false,
             addCusStatus: false,
             addStuStatus: false,
             addStuStatus: false,
@@ -493,6 +487,21 @@ export default {
         }
         }
     },
     },
     methods: {
     methods: {
+        initData(){
+            this.cusType = [
+                {
+                    label: this.$t('cusMgt.privCus'),
+                    value: 'private'
+                }
+            ]
+            if(this.$store.state.userInfo.hasSchool){
+                this.cusType.unshift({
+                    label: this.$t('cusMgt.scCus'),
+                    value: 'school'
+                })
+                this.listType = 'school'
+            }
+        },
         selectTab(tab) {
         selectTab(tab) {
             this.tabName = tab
             this.tabName = tab
             if (this.tabName == 'activity') {
             if (this.tabName == 'activity') {
@@ -972,7 +981,6 @@ export default {
         },
         },
         //确认添加自定义名单
         //确认添加自定义名单
         confirmCreateList() {
         confirmCreateList() {
-            console.log('学生名单', this.createStuList)
             if (!this.listName) {
             if (!this.listName) {
                 this.$Message.warning(this.$t('cusMgt.nameWarning'))
                 this.$Message.warning(this.$t('cusMgt.nameWarning'))
                 this.modalLoading = false
                 this.modalLoading = false
@@ -997,6 +1005,7 @@ export default {
                     tmids: [],
                     tmids: [],
                     course: null
                     course: null
                 }
                 }
+                
                 this.saveStuList(stuList, true)
                 this.saveStuList(stuList, true)
             }
             }
         },
         },
@@ -1133,7 +1142,7 @@ export default {
         selectCourse(index) {
         selectCourse(index) {
             this.curClassIndex = 0
             this.curClassIndex = 0
             this.curCusIndex = index
             this.curCusIndex = index
-            if (!this.courseListShow[this.curCusIndex].schedule) {
+            if (this.courseListShow.length && !this.courseListShow[this.curCusIndex].schedule) {
                 this.getCusInfo()
                 this.getCusInfo()
             } else {
             } else {
                 this.changeClassroom(0)
                 this.changeClassroom(0)
@@ -1192,6 +1201,7 @@ export default {
                 this.$Message.error(this.$t('cusMgt.updateErr'))
                 this.$Message.error(this.$t('cusMgt.updateErr'))
             }).finally(() => {
             }).finally(() => {
                 this.listLoading = false
                 this.listLoading = false
+                this.listName = ''
             })
             })
         },
         },
         //获取标准课程列表(调整)
         //获取标准课程列表(调整)
@@ -1324,6 +1334,7 @@ export default {
             let dom = document.getElementById('table-height')
             let dom = document.getElementById('table-height')
             this.tableHeight = dom.offsetHeight - 50
             this.tableHeight = dom.offsetHeight - 50
         })
         })
+        this.initData()
     },
     },
     computed: {
     computed: {
         //课程学段
         //课程学段

+ 1 - 1
TEAMModelOS/ClientApp/src/view/student-account/AddStudent.vue

@@ -102,7 +102,7 @@
                     </Select>
                     </Select>
                 </FormItem>
                 </FormItem>
             </div>
             </div>
-            <!-- 教室資訊 -->
+            <!-- 教室資訊 -- 班级 -->
             <FormItem :label="$t('stuAccount.classroomInfo')" prop="classId">
             <FormItem :label="$t('stuAccount.classroomInfo')" prop="classId">
                 <Select filterable style="width:100%" :placeholder="$t('stuAccount.classroomInfoHolder')" v-model="studentInfo.classId" clearable>
                 <Select filterable style="width:100%" :placeholder="$t('stuAccount.classroomInfoHolder')" v-model="studentInfo.classId" clearable>
                     <Option v-for="(item,index) in filterClasses" :value="item.id" :key="index" @click.native="setCurrentClassDetail(item)">{{ item.name }}</Option>
                     <Option v-for="(item,index) in filterClasses" :value="item.id" :key="index" @click.native="setCurrentClassDetail(item)">{{ item.name }}</Option>

+ 23 - 60
TEAMModelOS/ClientApp/src/view/student-account/ImportStudent.vue

@@ -138,7 +138,7 @@
                 tableLoading: false,
                 tableLoading: false,
                 systemColumn: [
                 systemColumn: [
                     'id',
                     'id',
-                    'pw',
+                    // 'pw',//密码默认同账号
                     'name',
                     'name',
                     'className',
                     'className',
                     'classId',
                     'classId',
@@ -254,6 +254,7 @@
                     const columnStr = columns.join('')
                     const columnStr = columns.join('')
                     let flag = true
                     let flag = true
                     let column = ''
                     let column = ''
+                    console.log('汇入表头:',columns)
                     for (let item of this.systemColumn) {
                     for (let item of this.systemColumn) {
                         let f = 0
                         let f = 0
                         for (let i of columns) {
                         for (let i of columns) {
@@ -271,21 +272,23 @@
                     if (flag) {
                     if (flag) {
                         // 处理表格导入数据类型
                         // 处理表格导入数据类型
                         this.tableData = results.filter(item => {
                         this.tableData = results.filter(item => {
-                            let arr = item.id.split('#')
-                            if (arr.length == 2) {
+                            // let arr = item.id.split('#') //账号id不用#
+                            // if (arr.length == 2) {
                                 for (let i of this.systemColumn) {
                                 for (let i of this.systemColumn) {
                                     if (i != 'no') {
                                     if (i != 'no') {
                                         if (typeof item[i] === 'number') {
                                         if (typeof item[i] === 'number') {
                                             item[i] = item[i] + ''
                                             item[i] = item[i] + ''
                                         }
                                         }
-                                        if (item.pw == undefined) {
-                                            item.pw = arr[1]
-                                        }
+                                        //表格去掉pw栏位,密码默认同账号id
+                                        // if (item.pw == undefined) {
+                                        //     item.pw = arr[1]
+                                        // }
+                                        item.pw = item.id
                                     }
                                     }
                                 }
                                 }
-                            } else {
-                                item._disabled = true
-                            }
+                            // } else {
+                            //     item._disabled = true
+                            // }
                             return item
                             return item
                         })
                         })
 
 
@@ -361,47 +364,6 @@
                     this.showRemoveFile = true
                     this.showRemoveFile = true
                 }
                 }
             },
             },
-            groupBy(array, key) {
-                const groups = {}
-                array.forEach(function (item) {
-                    const group = JSON.stringify(item[key])
-                    groups[group] = groups[group] || []
-                    groups[group].push(item)
-                })
-                return Object.keys(groups).map(function (group) {
-                    return groups[group]
-                })
-            },
-            /*
-            *获取对象在对象数组的中index
-            */
-            getIndex(_arr, _obj) {
-                var len = _arr.length
-                for (let i = 0; i < len; i++) {
-                    if (this.isObjEqual(_arr[i], _obj)) {
-                        return parseInt(i)
-                    }
-                }
-                return -1
-            },
-
-            /*
-            * 判断两个json对象是否相同
-            */
-            isObjEqual(o1, o2) {
-                var props1 = Object.keys(o1)
-                var props2 = Object.keys(o2)
-                if (props1.length != props2.length) {
-                    return false
-                }
-                for (var i = 0, max = props1.length; i < max; i++) {
-                    var propName = props1[i]
-                    if (o1[propName] !== o2[propName]) {
-                        return false
-                    }
-                }
-                return true
-            },
             saveFileData() {
             saveFileData() {
                 if (this.isError == 0) {
                 if (this.isError == 0) {
                     this.uploadLoading = true
                     this.uploadLoading = true
@@ -476,10 +438,10 @@
                         title: this.$t('stuAccount.stuName'),
                         title: this.$t('stuAccount.stuName'),
                         key: 'name'
                         key: 'name'
                     },
                     },
-                    {
-                        title: '年級',
-                        slot: 'gradeIndex'
-                    },
+                    // {
+                    //     title: '年級',
+                    //     slot: 'gradeIndex'
+                    // },
                     {
                     {
                         title: this.$t('stuAccount.classroomName'),
                         title: this.$t('stuAccount.classroomName'),
                         key: 'className'
                         key: 'className'
@@ -502,7 +464,8 @@
                 this.errNumReset()
                 this.errNumReset()
                 excelData.forEach( (item, index, array) => {
                 excelData.forEach( (item, index, array) => {
                     // 座號、ID、教室ID、教室名稱必填
                     // 座號、ID、教室ID、教室名稱必填
-                    if(item.no == '' || item.no == null || item.id == '' || item.id == null || item.classId == '' || item.classId == null || item.className == '' || item.className == null || item.gradeIndex == '' || item.gradeIndex == null) {
+                    // if(item.no == '' || item.no == null || item.id == '' || item.id == null || item.classId == '' || item.classId == null || item.className == '' || item.className == null || item.gradeIndex == '' || item.gradeIndex == null) {
+                    if(!item.no || !item.id || !item.classId || !item.className) {
                         _this.excelValid.fieldIds.push(item.id)
                         _this.excelValid.fieldIds.push(item.id)
                         _this.excelFiledNum++
                         _this.excelFiledNum++
                     } else {
                     } else {
@@ -540,11 +503,11 @@
                             if(data.length > 0 && data[item.gradeIndex-1]) {
                             if(data.length > 0 && data[item.gradeIndex-1]) {
                                 gradeID = data[item.gradeIndex-1].id
                                 gradeID = data[item.gradeIndex-1].id
                             }
                             }
-
-                            if(gradeID != classInfo[0].gradeId){
-                                _this.excelValid.gradeIds.push(item.id)
-                                _this.gradeNum++
-                            }
+                            // //不用设置年级,通过学级自动计算年级
+                            // if(gradeID != classInfo[0].gradeId){
+                            //     _this.excelValid.gradeIds.push(item.id)
+                            //     _this.gradeNum++
+                            // }
                         } else {
                         } else {
                             let data = array.filter( (i) => {
                             let data = array.filter( (i) => {
                                 return i.classId == item.classId && i.gradeIndex != item.gradeIndex
                                 return i.classId == item.classId && i.gradeIndex != item.gradeIndex

+ 3 - 7
TEAMModelOS/ClientApp/src/view/student-account/Index.vue

@@ -49,12 +49,11 @@
                 </div>
                 </div>
                 <div class="sc-menu-right sc-text-no-select" v-if="authorizationStatus == false">
                 <div class="sc-menu-right sc-text-no-select" v-if="authorizationStatus == false">
                     <ul v-if="$access.can('admin.*|student-upd')">
                     <ul v-if="$access.can('admin.*|student-upd')">
-                        <!--授權管理開關-->
-                        <li @click="showAuthorization()">
+                        <!--授權管理開關 0531无法完成,暂时隐藏-->
+                        <!-- <li @click="showAuthorization()">
                             <Icon custom="iconfont icon-auth-key" color="white" size="18" />
                             <Icon custom="iconfont icon-auth-key" color="white" size="18" />
                             <span>{{ $t('stuAccount.menuAuth') }}</span>
                             <span>{{ $t('stuAccount.menuAuth') }}</span>
-                        </li>
-                        <!--授權管理開關-->
+                        </li> -->
                         <li @click="importStudent()">
                         <li @click="importStudent()">
                             <Icon type="md-arrow-round-up" color="white" size="18" />
                             <Icon type="md-arrow-round-up" color="white" size="18" />
                             <span>{{ $t('stuAccount.importStu') }}</span>
                             <span>{{ $t('stuAccount.importStu') }}</span>
@@ -665,8 +664,6 @@ export default {
                 this.pointNum += this.basicCount
                 this.pointNum += this.basicCount
                 if (temp.length == 0) {
                 if (temp.length == 0) {
                     this.$Message.info(this.$t('stuAccount.isBottom'))
                     this.$Message.info(this.$t('stuAccount.isBottom'))
-                    //多语系后面统一处理
-                    //this.$Message.info(this.$t('已經到底了'))
                 } else {
                 } else {
                     this.tableShowData.push(...temp)
                     this.tableShowData.push(...temp)
                 }
                 }
@@ -675,7 +672,6 @@ export default {
         /**根据学段、年级、班级搜索 */
         /**根据学段、年级、班级搜索 */
         filterData: function () {
         filterData: function () {
             let data = this.students
             let data = this.students
-
             // 筛选没有关联班级的学生
             // 筛选没有关联班级的学生
             if (this.searchClassroom == 'noclass') {
             if (this.searchClassroom == 'noclass') {
                 if (this.searchClassroom) {
                 if (this.searchClassroom) {

+ 118 - 0
TEAMModelOS/ClientApp/src/view/teachcontent/ResBelong.vue

@@ -0,0 +1,118 @@
+<template>
+    <div class="pd-select-wrap">
+        <Dropdown class="sort-dropdown" trigger="click" placement="bottom-start" @on-click="function(e){ filterPeriod = e }" @on-visible-change="dropdownStates" v-if="$store.state.user.schoolProfile.school_base">
+            <span style="cursor: pointer;">
+                <span v-show="showLabel">上传至:</span>
+                <b class="title">{{ filterPeriodName }}</b>
+                <Icon type="ios-arrow-down" style="margin-left:8px;"></Icon>
+            </span>
+            <DropdownMenu slot="list" v-for="(item,index) in periods" :value="item.id" :key="index">
+                <DropdownItem :name="item.id">{{ item.name }}</DropdownItem>
+            </DropdownMenu>
+            <DropdownMenu slot="list">
+                <DropdownItem name="public">公共资源</DropdownItem>
+            </DropdownMenu>
+        </Dropdown>
+    </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+export default {
+    name: 'BasePdSelect',
+    props: {
+        pdId:{
+            type:String,
+            default:''
+        },
+        showLabel:{
+            type:Boolean,
+            default:false
+        }
+    },
+    data() {
+        return {
+            filterPeriod: '',
+        }
+    },
+    created() {
+        this.$store.dispatch('user/getSchoolProfile').then(
+            (res) => {
+                if (res) {
+                    if (this.periods && !this.pdId) {
+                        this.filterPeriod = this.periods[0].id
+                    }else{
+                        this.filterPeriod = this.pdId
+                    }
+                }
+            },
+            (err) => {
+                this.$Message.error('API error!')
+            }
+        )
+    },
+    methods: {
+        dropdownStates(flag) {
+            // if (!flag) this.filterByPeriod()
+        }
+    },
+    computed: {
+        ...mapGetters({
+            periods: 'user/getPeriods', // 學制s
+        }),
+        filterPeriodName(){
+            let data = this.periods
+            let pId = this.filterPeriod
+            let name = ''
+            if (pId !== '') {
+                let temp = data.find(item => {
+                    return pId == item.id
+                })
+                if (temp) {
+                    name = temp.name
+                }else{
+                    name = '公共资源'
+                }
+            }
+            return name
+        },
+    },
+    watch: {
+        filterPeriod() {
+            this.$emit('pd-change', this.filterPeriod)
+        },
+        pdId:{
+            handler(){
+                this.filterPeriod = this.pdId
+            }, 
+            immediate:true
+        }
+    }
+}
+</script>
+<style lang="less">
+.pd-select-wrap {
+    display: inline-block;
+    color: #a5a5a5;
+}
+.sort-dropdown {
+    .title {
+        color: white;
+        font-size: 14px;
+    }
+    .ivu-select-dropdown {
+        background-color: #2d2d2d;
+        border-radius: 2px;
+        border: 1px #464646 solid;
+        .ivu-dropdown-menu {
+            li {
+                color: #ccc;
+                font-size: 12px !important;
+                &:hover {
+                    color: #2d2d2d;
+                }
+            }
+        }
+    }
+}
+</style>

+ 14 - 3
TEAMModelOS/ClientApp/src/view/teachcontent/index.less

@@ -45,10 +45,7 @@
 }
 }
 .key-word-search {
 .key-word-search {
     width: 240px;
     width: 240px;
-    float:left;
     margin-right: 20px;
     margin-right: 20px;
-    margin-top: 12px;
-    margin-left:10px;
 }
 }
 .teach-content-top {
 .teach-content-top {
     .tab-box {
     .tab-box {
@@ -510,3 +507,17 @@
     margin-left: 10px;
     margin-left: 10px;
     cursor: pointer;
     cursor: pointer;
 }
 }
+
+.pd-filter-wrap{
+    color: #a5a5a5;
+    float: left;
+    margin-left: 10px;
+    margin-top: 15px;
+}
+.filter-wrap{
+    position: absolute;
+    left: 50%;
+    display: flex;
+    margin-left: -240px;
+    margin-top: 12px;
+}

+ 20 - 21
TEAMModelOS/ClientApp/src/view/teachcontent/index.vue

@@ -5,7 +5,7 @@
             <!--文件分类列表-->
             <!--文件分类列表-->
             <div class="content-type-list">
             <div class="content-type-list">
                 <vuescroll>
                 <vuescroll>
-                    <div :class="item.type === activeType ? 'content-type-item content-type-item-active':'content-type-item'" v-for="(item,index) in contentTypeList" :key="index" @click="selectFileType(index)">
+                    <div @click="selectFileType(index)" :class="item.type === activeType ? 'content-type-item content-type-item-active':'content-type-item'" v-for="(item,index) in contentTypeList" :key="index">
                         <Icon v-if="item.icon.indexOf('iconfont') != -1" :custom="item.icon" color="white" size="20" />
                         <Icon v-if="item.icon.indexOf('iconfont') != -1" :custom="item.icon" color="white" size="20" />
                         <Icon v-else :type="item.icon" color="white" size="20" />
                         <Icon v-else :type="item.icon" color="white" size="20" />
                         <span class="content-type-label">{{item.label}}</span>
                         <span class="content-type-label">{{item.label}}</span>
@@ -76,18 +76,20 @@
                         </div>
                         </div>
                     </div>
                     </div>
                 </vuescroll>
                 </vuescroll>
-
             </div>
             </div>
             <!--文件表格列表-->
             <!--文件表格列表-->
             <div class="content-file-list-box">
             <div class="content-file-list-box">
                 <!--筛选、操作域-->
                 <!--筛选、操作域-->
                 <div class="content-file-filter">
                 <div class="content-file-filter">
-                    <Input v-model="keyWord" search size="small" :placeholder="$t('teachContent.searchText')" class="key-word-search" @on-change="searchKeyWord" @on-search="searchKeyWord" />
-                    <CheckboxGroup v-model="extFilter" style="display:inline-block;margin-left:38px;margin-top:13px;" @on-change="filterFileByExtension">
-                        <Checkbox :label="item" v-for="(item ,index) in extensions" :key="index">
-                            <span>{{item}}</span>
-                        </Checkbox>
-                    </CheckboxGroup>
+                    <ResBelong class="pd-filter-wrap" v-show="routerScope == 'school'" @pd-change="(data)=>{filterPeriod = data}"></ResBelong>
+                    <div class="filter-wrap">
+                        <Input v-model="keyWord" search size="small" :placeholder="$t('teachContent.searchText')" class="key-word-search" @on-change="searchKeyWord" @on-search="searchKeyWord" />
+                        <CheckboxGroup v-model="extFilter"  @on-change="filterFileByExtension">
+                            <Checkbox :label="item" v-for="(item ,index) in extensions" :key="index">
+                                <span>{{item}}</span>
+                            </Checkbox>
+                        </CheckboxGroup>
+                    </div>
                     <span v-if="$access.can('admin.*|content-school-upd') || routerScope == 'private'" class="action-btn-wrap" @click="delFileBatch">
                     <span v-if="$access.can('admin.*|content-school-upd') || routerScope == 'private'" class="action-btn-wrap" @click="delFileBatch">
                         <Icon type="md-trash" class="toggle-btn-icon" />
                         <Icon type="md-trash" class="toggle-btn-icon" />
                         {{$t('teachContent.delBatch')}}
                         {{$t('teachContent.delBatch')}}
@@ -170,7 +172,8 @@
             </div>
             </div>
         </div>
         </div>
         <!--上传文件-->
         <!--上传文件-->
-        <UploadModal ref="uploadModal" :sasString="sasString" :urlString="urlString" :path="folder" :containerName="containerName" :quality="1" @successData="getFileUrl"></UploadModal>
+        <UploadModal ref="uploadModal" :sasString="sasString" :urlString="urlString" :path="folder" :containerName="containerName" :quality="1" @successData="getFileUrl" :pdId="filterPeriod">
+        </UploadModal>
         <!--文件预览-->
         <!--文件预览-->
         <div v-if="previewStatus" class="image-viewer">
         <div v-if="previewStatus" class="image-viewer">
             <div style="width:fit-content;position:relative;margin:auto;">
             <div style="width:fit-content;position:relative;margin:auto;">
@@ -190,17 +193,20 @@
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
+import { mapGetters } from 'vuex'
 import BlobTool from '@/utils/blobTool.js';
 import BlobTool from '@/utils/blobTool.js';
 import FileSaver from "file-saver";
 import FileSaver from "file-saver";
 import JSZip from "jszip";
 import JSZip from "jszip";
 import elementResizeDetectorMaker from "element-resize-detector"
 import elementResizeDetectorMaker from "element-resize-detector"
 import VueWaterfall from 'vue-waterfall-easy'
 import VueWaterfall from 'vue-waterfall-easy'
+import ResBelong from './ResBelong.vue'
 export default {
 export default {
     components: {
     components: {
-        VueWaterfall
+        VueWaterfall, ResBelong
     },
     },
     data() {
     data() {
         return {
         return {
+            filterPeriod: '',
             formatErr: false,
             formatErr: false,
             sizeLoading: false,
             sizeLoading: false,
             editIndex: -1,
             editIndex: -1,
@@ -245,7 +251,8 @@ export default {
                 video: true,
                 video: true,
                 audio: true,
                 audio: true,
                 doc: true,
                 doc: true,
-                other: true
+                other: true,
+                res: true
             }
             }
         }
         }
     },
     },
@@ -481,7 +488,7 @@ export default {
                     title: this.$t('teachContent.tableC4'),
                     title: this.$t('teachContent.tableC4'),
                     slot: 'size',
                     slot: 'size',
                     key: 'size',
                     key: 'size',
-                    width: 100,
+                    width: 120,
                     align: 'center',
                     align: 'center',
                     sortable: true
                     sortable: true
                 },
                 },
@@ -505,7 +512,7 @@ export default {
                     label: '最近',
                     label: '最近',
                     type: 'recent',
                     type: 'recent',
                     icon: 'md-time',
                     icon: 'md-time',
-                    tips: '仅本地临时缓存最近上传的资源,最多保存20条。退出账号或更换电脑记录将会清空。'
+                    tips: '临时缓存最近上传的资源,最多保存20条。退出账号或更换电脑缓存记录将会清空。'
                 },
                 },
                 {
                 {
                     label: this.$t('teachContent.filterRes'),
                     label: this.$t('teachContent.filterRes'),
@@ -1044,14 +1051,6 @@ export default {
 .dialog-p {
 .dialog-p {
     word-wrap: break-word;
     word-wrap: break-word;
 }
 }
-
-.key-word-search {
-    width: 240px;
-    float: right;
-    margin-right: 20px;
-    margin-top: 12px;
-}
-
 .upload-modal .ivu-upload-drag {
 .upload-modal .ivu-upload-drag {
     background: #404040;
     background: #404040;
     border-color: #606060;
     border-color: #606060;

+ 2 - 0
TEAMModelOS/ClientApp/src/view/teachermgmt/components/personnel/Index.vue

@@ -598,6 +598,8 @@ export default {
                             else {
                             else {
                                 alert('Can not update param.')
                                 alert('Can not update param.')
                             }
                             }
+                            //清空vuex教师列表,保证其他页面获取最新数据
+                            this.$store.commit('teachers/setTeacherList', [])
                         },
                         },
                         (err) => {
                         (err) => {
                             this.$Message.error('user/updSchoolUserStatus API error!')
                             this.$Message.error('user/updSchoolUserStatus API error!')

+ 2 - 0
TEAMModelOS/ClientApp/src/view/teachermgmt/components/userList/Index.vue

@@ -854,6 +854,8 @@ export default {
             res => {
             res => {
               if (res.code === 1) {
               if (res.code === 1) {
                 this.$Message.info(this.$t('teachermgmt.message.info1'))
                 this.$Message.info(this.$t('teachermgmt.message.info1'))
+                //清空vuex教师列表,保证其他页面获取最新数据
+                this.$store.commit('teachers/setTeacherList', [])
               } else {
               } else {
                 this.$Message.error('Can not set Auth.')
                 this.$Message.error('Can not set Auth.')
               }
               }

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

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

+ 1 - 1
TEAMModelOS/TEAMModelOS.csproj

@@ -22,7 +22,7 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="DotNetZip" Version="1.15.0" />
     <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="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
     <PackageReference Include="VueCliMiddleware" Version="5.0.0" />
     <PackageReference Include="VueCliMiddleware" Version="5.0.0" />
   </ItemGroup>
   </ItemGroup>