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

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

CrazyIter_Bin 2 éve
szülő
commit
3a145d5e35
23 módosított fájl, 1503 hozzáadás és 1464 törlés
  1. 11 6
      TEAMModelBI/ClientApp/src/view/areamanage/statistics.vue
  2. 29 3
      TEAMModelBI/ClientApp/src/view/participation/index.vue
  3. 21 10
      TEAMModelBI/ClientApp/src/view/schoolServe/analyseSchool.vue
  4. 1 1
      TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue
  5. 4 4
      TEAMModelBI/ClientApp/src/view/systemConfig/setAdmin.vue
  6. 54 1
      TEAMModelBI/Controllers/BIHome/AnalyseFileController.cs
  7. 19 20
      TEAMModelBI/Controllers/BISchool/BatchAreaController.cs
  8. 16 16
      TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs
  9. 1 1
      TEAMModelBI/Controllers/BISchool/SchoolController.cs
  10. 26 0
      TEAMModelBI/Tool/CosmosBank/stringSuffix.cs
  11. 13 13
      TEAMModelOS/ClientApp/public/lang/en-US.js
  12. 6 1
      TEAMModelOS/ClientApp/public/lang/zh-CN.js
  13. 7 2
      TEAMModelOS/ClientApp/public/lang/zh-TW.js
  14. 10 4
      TEAMModelOS/ClientApp/src/components/student-web/SettingView/Setting.vue
  15. 24 4
      TEAMModelOS/ClientApp/src/view/auth/Serial.vue
  16. 10 2
      TEAMModelOS/ClientApp/src/view/jyzx/HourDetail.vue
  17. 2 2
      TEAMModelOS/ClientApp/src/view/jyzx/application.vue
  18. 341 445
      TEAMModelOS/ClientApp/src/view/jyzx/discuss.vue
  19. 4 2
      TEAMModelOS/ClientApp/src/view/jyzx/newHomePage.vue
  20. 308 323
      TEAMModelOS/ClientApp/src/view/jyzx/topicPublish.vue
  21. 1 1
      TEAMModelOS/ClientApp/src/view/teachcontent/index.vue
  22. 2 1
      TEAMModelOS/ClientApp/src/view/user/BandPhone.vue
  23. 593 602
      TEAMModelOS/ClientApp/src/view/video/VideoReview.vue

+ 11 - 6
TEAMModelBI/ClientApp/src/view/areamanage/statistics.vue

@@ -985,7 +985,7 @@ export default {
       lastweek: {
         color: ['#3fb1e3', '#6be6c1', '#626c91', '#a0a7e6', '#c4ebad', '#96dee8'],
         legend: {
-          right: '4%',
+          right: '0%',
           orient: 'vertical',
           itemWidth: 8,
           itemHeight: 8, // 修改icon图形大小
@@ -999,7 +999,7 @@ export default {
             name: '学校数据占比',
             type: 'pie',
             radius: '75%',
-            center: ['40%', '50%'],
+            center: ['30%', '50%'],
             itemStyle: {
               borderRadius: 5,
             },
@@ -1023,7 +1023,7 @@ export default {
       monthsContrast: {
         color: ['#3fb1e3', '#6be6c1', '#626c91', '#a0a7e6', '#c4ebad', '#96dee8'],
         legend: {
-          right: '4%',
+          right: '0%',
           orient: 'vertical',
           itemWidth: 8,
           itemHeight: 8, // 修改icon图形大小
@@ -1037,7 +1037,7 @@ export default {
             name: '学校数据占比',
             type: 'pie',
             radius: '75%',
-            center: ['40%', '50%'],
+            center: ['30%', '50%'],
             itemStyle: {
               borderRadius: 5,
             },
@@ -2215,14 +2215,16 @@ export default {
 .area-item-name {
   font-size: 16px;
   font-weight: 600;
-  margin-bottom: 15px;
+  margin-bottom: 10px;
 }
 .area-item-school-title,
 .area-item-school-content {
   font-size: 14px;
   color: #636e72;
 }
-
+.area-item-school {
+  margin-bottom: 5px;
+}
 .center-resource-left-leftEcharts,
 .center-resource-left-rightbox {
   width: 50%;
@@ -2235,6 +2237,9 @@ export default {
   height: 135px;
   position: relative;
 }
+.week-echart {
+  border-bottom: 1px solid #ccc;
+}
 .echarts-title {
   position: absolute;
   left: 0.5%;

+ 29 - 3
TEAMModelBI/ClientApp/src/view/participation/index.vue

@@ -186,7 +186,9 @@
               </el-form-item>
               <el-form-item label="所属学区:" class="school-form-area">
                 <el-select v-model="areaSelect.Selectvalue" :placeholder="$t(`schoolManages.basicSet.region`)">
-                  <el-option v-for="item in areaSelect.data" :key="item.name" :label="item.name" :value="item.id">
+                  <el-option v-for="item in areaSelect.data" :key="item.name" :label="item.name" :value="item.id" :disabled="item.cutArea">
+                    <div class="areaname">{{item.name}}</div>
+                    <div class="stepicon" v-show="item.cutArea"><span>已同步省平台</span></div>
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -521,7 +523,7 @@ export default {
       proxy.$api.updateSchoolinfo(updateForm).then((res) => {
         console.log(res, '修改学校的返回')
         res.state === 200
-          ? (ElMessage.success(proxy.$t(`commonMsg.schoolUpdateSuccess`), schoolJoinarea(), schoolClose()), updateSuccess())
+          ? (ElMessage.success(proxy.$t(`commonMsg.schoolUpdateSuccess`), schoolClose()), updateSuccess())
           : ElMessage.error(proxy.$t(`commonMsg.schoolUpdateError`))
       })
     }
@@ -938,6 +940,21 @@ export default {
   top: -1px;
   left: -4px;
 }
+.stepicon {
+  float: right;
+  height: 22px;
+  line-height: 20px;
+  margin: 2px 4px 2px 0;
+  padding: 0 8px;
+  border: 1px solid #e8eaec;
+  border-radius: 3px;
+  background: #fffbe6;
+  font-size: 12px;
+  vertical-align: middle;
+  opacity: 1;
+  overflow: hidden;
+  border-color: #ffe58f;
+}
 </style>
 <style>
 .schoolboxtad .el-cascader {
@@ -1026,7 +1043,16 @@ export default {
   width: 100%;
   height: 125px;
 }
-
+.areaname,
+.stepicon {
+  display: inline-block;
+  vertical-align: top;
+}
+.stepicon {
+  float: right;
+  border: 1px solid #ccc;
+  font-size: 12px;
+}
 /* .school-form-grading .el-radio__input.is-checked .el-radio__inner::after {
   content: "";
   width: 10px;

+ 21 - 10
TEAMModelBI/ClientApp/src/view/schoolServe/analyseSchool.vue

@@ -1042,30 +1042,41 @@ export default {
           basicsData.value.totals.month[3].num = res.termACTCnt
 
           basicsData.value.totals.month[0].compare = ((res.weekLesCnt - res.lastWeekLesCnt) / res.lastWeekLesCnt).toFixed(2) * 100
-          res.lastWeekLesCnt === 0 ? basicsData.value.totals.month[0].compare = 100 : ''
+          res.lastWeekLesCnt === 0 && res.weekLesCnt !== 0 ? basicsData.value.totals.month[0].compare = 100 : res.lastWeekLesCnt === 0 && res.weekLesCnt === 0 ? basicsData.value.totals.month[0].compare = 0 : ''
 
           basicsData.value.totals.month[1].compare = ((res.weekACTCnt - res.lastWeekACTCnt) / res.lastWeekACTCnt).toFixed(2) * 100
-          res.lastWeekACTCnt === 0 ? basicsData.value.totals.month[1].compare = 100 : ''
+          res.lastWeekACTCnt === 0 && res.weekACTCnt !== 0 ? basicsData.value.totals.month[1].compare = 100 : res.lastWeekACTCnt === 0 && res.weekACTCnt === 0 ? basicsData.value.totals.month[1].compare = 0 : ''
 
           basicsData.value.totals.month[2].compare = ((res.termLesCnt - res.lastTermLesCnt) / res.lastTermLesCnt).toFixed(2) * 100
-          res.lastTermLesCnt === 0 ? basicsData.value.totals.month[2].compare = 100 : ''
+          res.lastTermLesCnt === 0 && res.termLesCnt !== 0 ? basicsData.value.totals.month[2].compare = 100 : res.lastTermLesCnt === 0 && res.termLesCnt === 0 ? basicsData.value.totals.month[2].compare = 0 : ''
 
           basicsData.value.totals.month[3].compare = ((res.termACTCnt - res.lastTermActCnt) / res.lastTermActCnt).toFixed(2) * 100
-          res.lastTermActCnt === 0 ? basicsData.value.totals.month[3].compare = 100 : ''
+          res.lastTermActCnt === 0 && res.termACTCnt !== 0 ? basicsData.value.totals.month[3].compare = 100 : res.lastTermActCnt === 0 && res.termACTCnt === 0 ? basicsData.value.totals.month[3].compare = 0 : ''
           basicsData.value.termTatal = parseInt(res.termLesCnt) + parseInt(res.termACTCnt)
           //累计数据处理
           basicsData.value.totals.total[0].num = res.lesCnt
-          basicsData.value.totals.total[1].num = 0
           basicsData.value.totals.total[2].num = res.actCnt
+          basicsData.value.totals.total[1].num = parseInt(res.lesCnt) + parseInt(res.actCnt)
           basicsData.value.totals.total[3].num = res.schoolInfo.service.length
 
           basicsData.value.totals.total[0].compare = ((res.lesCnt - res.lastYearLesCnt) / res.lastYearLesCnt).toFixed(2) * 100
-          res.lastYearLesCnt === 0 ? basicsData.value.totals.total[0].compare = 100 : ''
+          res.lastYearLesCnt === 0 && res.lesCnt !== 0 ? basicsData.value.totals.total[0].compare = 100 : res.lastYearLesCnt === 0 && res.lesCnt === 0 ? basicsData.value.totals.total[0].compare = 0 : ''
+          //累计资源和去年做比较
           basicsData.value.totals.total[1].compare = 0
+          let thisYear = parseInt(res.lesCnt) + parseInt(res.actCnt)
+          let lastYear = parseInt(res.lastYearLesCnt) + parseInt(res.lastYearACTCnt)
+          basicsData.value.totals.total[1].compare = ((thisYear - lastYear) / lastYear).toFixed(2) * 100
+          lastYear === 0 && thisYear !== 0 ? basicsData.value.totals.total[1].compare = 100 : lastYear === 0 && thisYear === 0 ? basicsData.value.totals.total[1].compare = 0 : ''
           basicsData.value.totals.total[2].compare = ((res.actCnt - res.lastYearACTCnt) / res.lastYearACTCnt).toFixed(2) * 100
-          res.lastYearLesCnt === 0 ? basicsData.value.totals.total[2].compare = 100 : ''
-          basicsData.value.totals.total[3].compare = 0
-
+          res.lastYearLesCnt === 0 && res.actCnt !== 0 ? basicsData.value.totals.total[2].compare = 100 : res.lastYearLesCnt === 0 && res.actCnt === 0 ? basicsData.value.totals.total[2].compare = 0 : ''
+          //获取去年和今年的时间戳
+          let lastyear = { start: res.buy.lastYearS / 1000, end: res.buy.lastYearE / 1000 }
+          let nowsyear = { start: res.buy.yearS / 1000, end: res.buy.yearE / 1000 }
+          console.log(lastyear, nowsyear, '时间')
+          let lastData = []; let nowData = []
+          res.buy.order.forEach((item) => { item.date >= lastyear.start && item.date <= lastyear.end ? lastData.push(item) : item.date >= nowsyear.start && item.date <= nowsyear.end ? nowData.push(item) : '' })
+          basicsData.value.totals.total[3].compare = ((nowData.length - lastData.length) / lastData.length).toFixed(2) * 100
+          lastData.length === 0 && nowData.length !== 0 ? basicsData.value.totals.total[3].compare = 100 : lastData.length === 0 && nowData.length === 0 ? basicsData.value.totals.total[3].compare = 0 : ''
           basicsData.value.accumulativeTatal = parseInt(res.lesCnt) + parseInt(res.actCnt)
 
           loadingSchool.value.basics = false
@@ -1124,7 +1135,7 @@ export default {
         for (var t = 0; t < res.weekTrend.length; t++) {
           let num = parseInt(t) + 1
           let text = '第' + num + '周'
-          console.log(text)
+          // console.log(text)
           lengedData.push(text)
         }
         console.log(lengedData)

+ 1 - 1
TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue

@@ -1468,7 +1468,7 @@ export default {
             name: '科目占比',
             type: 'pie',
             radius: '80%',
-            center: ['30%', '50%'],
+            center: ['45%', '50%'],
             itemStyle: {
               borderRadius: 2,
             },

+ 4 - 4
TEAMModelBI/ClientApp/src/view/systemConfig/setAdmin.vue

@@ -13,7 +13,7 @@
           <p class="list-item-left-name">{{item.name}}</p>
           <p class="list-item-left-content"><span class="list-item-left-title">醍摩豆账号:</span><span>{{item.tmdId}}</span></p>
           <p class="list-item-left-content"><span class="list-item-left-title">手机号:</span><span>{{item.mobile}}</span></p>
-          <p class="list-item-left-content"><span class="list-item-left-title">加入时间:</span><span>2022-03-16</span></p>
+          <!-- <p class="list-item-left-content"><span class="list-item-left-title">加入时间:</span><span>2022-03-16</span></p> -->
         </div>
         <div class="list-item-right">
           <div class="deletebtn" @click="removeadmin(item)">
@@ -122,7 +122,7 @@ export default {
       }).then(() => {
         let data = { partitionKey: value.partitionKey, rowKey: value.rowKey, isAdmin: false }
         proxy.$api
-          .removeAdmin(data)
+          .setisAdmin(data)
           .then((res) => {
             res.state === 200
               ? (ElMessage.success('操作成功'), getAdmin())
@@ -197,12 +197,12 @@ export default {
 }
 .list-item-left-name {
   font-size: 20px;
-  margin-bottom: 10px;
+  margin: 10px 0px;
   font-weight: 600;
 }
 .list-item-left-content {
   font-size: 14px;
-  margin: 5px 0px;
+  margin: 10px 0px;
 }
 .deletebtn {
   width: 40px;

+ 54 - 1
TEAMModelBI/Controllers/BIHome/AnalyseFileController.cs

@@ -9,13 +9,17 @@ using System.IO;
 using System.Linq;
 using System.Text;
 using System.Text.Json;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;
+using TEAMModelBI.Tool;
+using TEAMModelBI.Tool.CosmosBank;
 using TEAMModelOS.SDK.Context.BI;
+using TEAMModelOS.SDK.Context.Constant;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models.Cosmos.BI;
 
-namespace TEAMModelBI.Controllers.BIHome
+namespace TEAMModelBI.Controllers.BIBlob
 {
     [Route("analyse")]
     [ApiController]
@@ -30,6 +34,55 @@ namespace TEAMModelBI.Controllers.BIHome
             _azureStorage = azureStorage;
         }
 
+
+        /// <summary>
+        /// 查询一天的分析防火墙分析
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [ProducesDefaultResponseType]
+        [HttpPost("get-dayapi")]
+        public async Task<IActionResult> GetDayApi(JsonElement jsonElement)
+        {
+            jsonElement.TryGetProperty("dateTime", out JsonElement dateTime);
+            jsonElement.TryGetProperty("site", out JsonElement site);
+
+            DateTimeOffset dtOff = DateTimeOffset.UtcNow;
+
+            var blobCilent = _azureStorage.GetBlobContainerClient(containerName: "0-public");
+            if ($"{site}".Equals(BIConst.Global))
+                blobCilent = _azureStorage.GetBlobContainerClient(containerName: "0-public", BIConst.Global);
+
+            if (!string.IsNullOrEmpty($"{dateTime}"))
+                dtOff = TimeHelper.GetDateTime(dateTime.GetInt64());
+
+            string day = dtOff.ToString("yyyyMMdd");
+            Dictionary<string, RecCnt> days = new();
+
+            await foreach (BlobItem blobItem in blobCilent.GetBlobsAsync(BlobTraits.None, BlobStates.None, $"visitCnt/{day}"))
+            {
+                BlobClient tempClient = blobCilent.GetBlobClient(blobItem.Name);
+                if (await tempClient.ExistsAsync())
+                {
+                    using (var meomoryStream = new MemoryStream())
+                    {
+                        var response = blobCilent.GetBlobClient($"{blobItem.Name}").DownloadTo(meomoryStream);
+                        //var response = await blob.GetBlobClient($"{blobItem.Name}").DownloadToAsync(meomoryStream);
+                        //var temps = meomoryStream.ToString();
+                        //var temp1 = Encoding.UTF8.GetString(meomoryStream.ToArray());
+                        //var temp = Encoding.UTF8.GetString(meomoryStream.ToArray()).ToObject<RecCnt>();
+
+                        RecCnt recCnt = Encoding.UTF8.GetString(meomoryStream.ToArray()).ToString().ToObject<RecCnt>();
+
+                        string name = stringSuffix.MidStrEx(blobItem.Name, "/", ".");
+                        days.Add(name, recCnt);
+                    }
+                }
+            }
+
+            return Ok(new { state = RespondCode.Ok, days = days.ToList() });
+        }
+
         /// <summary>
         /// 本地Json
         /// </summary>

+ 19 - 20
TEAMModelBI/Controllers/BISchool/BatchAreaController.cs

@@ -119,7 +119,24 @@ namespace TEAMModelBI.Controllers.BISchool
                     } 
                 }
 
-                areas.ForEach(async area => 
+                //areas.ForEach(async area =>
+                //{
+                //    area.schoolCount = await CommonFind.GetSqlValueCount(cosmosClient, "School", $"select value(count(c.id)) from c where c.areaId='{area.id}' and c.standard='{area.standard}'", "Base");
+
+                //    area.aquoteRec = await table.QueryWhereString<AreaQuoteRecord>($"PartitionKey eq 'QuoteRecord' and  areaId eq '{area.id}'");
+                //    //List<AreaQuoteRecord> aqr = await table.QueryWhereString<AreaQuoteRecord>($"PartitionKey eq 'QuoteRecord' and  areaId eq '{area.id}'");
+                //    //aqr.Sort((x, y) => y.RowKey.CompareTo(x.RowKey));
+
+                //    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<string>(queryText: $"select value(c.accessConfig) from c where c.id='{area.id}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("AreaSetting") }))
+                //    {
+                //        if (string.IsNullOrEmpty(item))
+                //            area.cutArea = false;
+                //        else
+                //            area.cutArea = true;
+                //    };
+                //});
+
+                foreach (var area in areas)
                 {
                     area.schoolCount = await CommonFind.GetSqlValueCount(cosmosClient, "School", $"select value(count(c.id)) from c where c.areaId='{area.id}' and c.standard='{area.standard}'", "Base");
 
@@ -134,26 +151,8 @@ namespace TEAMModelBI.Controllers.BISchool
                         else
                             area.cutArea = true;
                     };
-                });
+                }
 
-                //await foreach (var item in azureClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<RecArea>(queryText: areaSql,requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Base-Area") }))
-                //{
-                //    areas.Add(item);
-                //}
-                //foreach (var recArea in areas)
-                //{
-                //    recArea.schoolCount = await CommonFind.GetSqlValueCount(cosmosClient, "School", $"select value(count(c.id)) from c where c.areaId='{recArea.id}' and c.standard='{recArea.standard}'", "Base");
-                //    List<AreaQuoteRecord> aqr = await table.QueryWhereString<AreaQuoteRecord>($"PartitionKey eq 'QuoteRecord' and  areaId eq '{recArea.id}'");
-                //    aqr.Sort((x, y) => y.RowKey.CompareTo(x.RowKey));
-                //    recArea.aquoteRec = aqr;
-                //    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<string>(queryText: $"select value(c.accessConfig) from c where c.id='{recArea.id}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("AreaSetting") }))
-                //    {
-                //        if (string.IsNullOrEmpty(item))
-                //            recArea.cutArea = false;
-                //        else
-                //            recArea.cutArea = true;
-                //    };
-                //}
 
                 return Ok(new { state = 200, areas, continuationToken });
             }

+ 16 - 16
TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs

@@ -621,30 +621,30 @@ namespace TEAMModelBI.Controllers.BISchool
                         await cosmosClient.GetContainer(Constant.TEAMModelOS, "Teacher").ReplaceItemAsync(item, item.id, new PartitionKey($"Base"));
                     }
 
-                    //修改学校顾问
-                    string sqlTxt = $"SELECT value(c) From c WHERE ARRAY_CONTAINS(c.roles,'assist',true)";
-                    List<SchoolTeacher> schoolTeachers = new List<SchoolTeacher>();
-                    await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<SchoolTeacher>(queryText: sqlTxt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Teacher-{tempShool.id}") }))
+                    if (assistId.Count > 0)
                     {
-                        if (!assistId.Contains(item.id))
+                        //修改学校顾问
+                        string sqlTxt = $"SELECT value(c) From c WHERE ARRAY_CONTAINS(c.roles,'assist',true)";
+                        List<SchoolTeacher> schoolTeachers = new List<SchoolTeacher>();
+                        await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<SchoolTeacher>(queryText: sqlTxt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Teacher-{tempShool.id}") }))
                         {
-                            if (item.roles.Contains("assist"))
+                            if (!assistId.Contains(item.id))
                             {
-                                item.roles.Remove("assist");
-                                if (item.roles.Count > 0)
-                                {
-                                    await cosmosClient.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<SchoolTeacher>(item, item.id, new PartitionKey(item.code));
-                                }
-                                else
+                                if (item.roles.Contains("assist"))
                                 {
-                                    await cosmosClient.GetContainer("TEAMModelOS", "School").DeleteItemAsync<SchoolTeacher>(item.id, new PartitionKey(item.code));
+                                    item.roles.Remove("assist");
+                                    if (item.roles.Count > 0)
+                                    {
+                                        await cosmosClient.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<SchoolTeacher>(item, item.id, new PartitionKey(item.code));
+                                    }
+                                    else
+                                    {
+                                        await cosmosClient.GetContainer("TEAMModelOS", "School").DeleteItemAsync<SchoolTeacher>(item.id, new PartitionKey(item.code));
+                                    }
                                 }
                             }
                         }
-                    }
 
-                    if (assistId.Count > 0)
-                    {
                         foreach (var itemTeacher in assistId)
                         {
                             Teacher tempTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Teacher").ReadItemAsync<Teacher>($"{itemTeacher}", new PartitionKey("Base"));

+ 1 - 1
TEAMModelBI/Controllers/BISchool/SchoolController.cs

@@ -1060,7 +1060,7 @@ namespace TEAMModelBI.Controllers.BISchool
                 //取得購買紀錄
                 List<object> order = await GetOrderHisFromCoreBBAsync(schoolId.GetString());
 
-                return Ok(new { state = RespondCode.Ok, tecCnt, classCnt, stuCnt, roomCnt, lesCnt, weekLesCnt, lastWeekLesCnt, weekACTCnt, lastWeekACTCnt, termLesCnt, lastTermLesCnt, termACTCnt, lastTermActCnt, yearLesCnt, lastYearLesCnt, yearACTCnt, lastYearACTCnt, schoolInfo, ACTCnt, order, yearS, yearE, lastYearS, lastYearE });
+                return Ok(new { state = RespondCode.Ok, tecCnt, classCnt, stuCnt, roomCnt, lesCnt, weekLesCnt, lastWeekLesCnt, weekACTCnt, lastWeekACTCnt, termLesCnt, lastTermLesCnt, termACTCnt, lastTermActCnt, yearLesCnt, lastYearLesCnt, yearACTCnt, lastYearACTCnt, schoolInfo, ACTCnt, buy = new { yearS, yearE, lastYearS, lastYearE, order } });
             }
             else
                 return Ok(new { state = RespondCode.NotFound, msg = "未找到该学校信息!" });

+ 26 - 0
TEAMModelBI/Tool/CosmosBank/stringSuffix.cs

@@ -29,6 +29,32 @@ namespace TEAMModelBI.Tool.CosmosBank
             return rg.Match(source).Value;
         }
 
+        /// <summary>
+        /// 获得字符串中开始和结束字符串中间得值
+        /// </summary>
+        /// <param name="sourse">字符串</param>
+        /// <param name="startstr">开始字符</param>
+        /// <param name="endstr">结束字符</param>
+        /// <returns></returns>
+        public static string MidStrEx(string sourse, string startstr, string endstr)
+        {
+            string result = string.Empty;
+            int startindex, endindex;
+            try
+            {
+                startindex = sourse.LastIndexOf(startstr);
+                if (startindex == -1)
+                    return result;
+                string tmpstr = sourse.Substring(startindex + startstr.Length);
+                endindex = tmpstr.IndexOf(endstr);
+                if (endindex == -1)
+                    return result;
+                result = tmpstr.Remove(endindex);
+            }
+            catch { }
+            return result;
+        }
+
         /// <summary>
         /// 获取文件后缀名,如.PDF
         /// </summary>

+ 13 - 13
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -99,6 +99,7 @@ const LANG_EN_US = {
     },
     // 研修模块
     ability: {
+        reSubmit: '重新提交',
         samePointAppraise: 'Competency Mutual Evaluation',
         otherResult: 'Mutual Evaluation Results',
         schoolResult: 'School-evaluation Results',
@@ -483,6 +484,8 @@ const LANG_EN_US = {
         classroom: 'Classroom:',
         expiredData: 'Expiry Date:',
         hadExp: '(Expired)',
+        unused: '(None activate)',
+        forever: '(Permanent License)',
         useInfo: 'Use Status:',
         unband: 'Unbind Device',
         cancel: 'Cancel',
@@ -1750,8 +1753,7 @@ const LANG_EN_US = {
         evMode3: 'OMR & Writing Assessment',
         publishType1: 'Start Now',
         publishType2: 'Scheduled Start Time',
-        testType: [
-            {
+        testType: [{
                 label: "Single Answer",
                 value: "single"
             },
@@ -2264,7 +2266,7 @@ const LANG_EN_US = {
             error1: "Failed to start",
             message1: "Switch to my topic",
             message2: "Switch to reply to my topic",
-            report: ["違法資訊", "涉黃資訊", "洩露隱私", "人身攻擊", "垃圾行銷"],
+            report: ["Illegal info", "Pornography info", "Privacy disclosure", "Personal attack", "Spam marketing"],
         },
         // 活动
         activity: {
@@ -2319,6 +2321,8 @@ const LANG_EN_US = {
             electiveCourse: "Competency",
             sendSummary: "填寫研修總結",
             plaSummary: "請填寫您的研修總結",
+            openReport: "View report",
+            message5: "All certification materials must be passed to receive credits",
         }
     },
     // 知识点管理
@@ -3171,8 +3175,7 @@ const LANG_EN_US = {
     mQuestion: {
         title: 'Survey',
         questionType: 'Survey Type',
-        type: [
-            {
+        type: [{
                 code: 0,
                 value: 'Academic Education'
             },
@@ -3189,8 +3192,7 @@ const LANG_EN_US = {
                 value: 'Others'
             }
         ],
-        state: [
-            {
+        state: [{
                 code: 100,
                 value: 'Scheduled'
             },
@@ -4155,8 +4157,7 @@ const LANG_EN_US = {
             classInteraction: "Web IRS",
             achievement: "My Grade",
         },
-        testType: [
-            {
+        testType: [{
                 label: "Single Answer",
                 value: "single"
             },
@@ -4189,8 +4190,7 @@ const LANG_EN_US = {
                 value: "connector"
             },
         ],
-        state: [
-            {
+        state: [{
                 type: 'All',
                 status: 'All Activity Status'
             },
@@ -5521,7 +5521,7 @@ const LANG_EN_US = {
         props7: 'Not enough storage space!',
         uploadText: 'Tap or drag to upload',
         resTips: 'HiTeach generates teaching materials that only support HTEX format previews',
-        space: 'Available Space:',
+        space: '剩余空間:',
         calcing: 'Calculating...',
         blobFull: '(Full)',
         otherType: 'Other types',
@@ -6890,4 +6890,4 @@ const LANG_EN_US = {
         className: 'Class',
         rate: 'Ratio'
     }
-}
+}

+ 6 - 1
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -99,6 +99,7 @@ const LANG_ZH_CN = {
     },
     // 研修模块
     ability: {
+        reSubmit: '重新提交',
         samePointAppraise: '同微能力点互评',
         otherResult: '互评结果',
         schoolResult: '校评结果',
@@ -483,6 +484,8 @@ const LANG_ZH_CN = {
         classroom: '教室:',
         expiredData: '到期日:',
         hadExp: '(已到期)',
+        unuse: '(未启用)',
+        forever:'(永久授权)',
         useInfo: '使用状况:',
         unband: '解绑设备',
         cancel: '取消',
@@ -2319,6 +2322,8 @@ const LANG_ZH_CN = {
             electiveCourse: "能力点",
             sendSummary: "填写研修总结",
             plaSummary: "请填写您的研修总结",
+            openReport: "查看报告",
+            message5: "认证材料必须全部通过才能获得学时",
         }
     },
     // 知识点管理
@@ -5521,7 +5526,7 @@ const LANG_ZH_CN = {
         props7: '存储空间不足!',
         uploadText: '点击或者拖拽上传',
         resTips: 'HiTeach生成的课件,只支持HTEX格式的教材预览',
-        space: '可用空间:',
+        space: '剩余空间:',
         calcing: '计算中...',
         blobFull: '(已满)',
         otherType: '其他',

+ 7 - 2
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -99,6 +99,7 @@ const LANG_ZH_TW = {
     },
     // 研習模块
     ability: {
+        reSubmit: '重新提交',
         samePointAppraise: '同增能項目互評',
         otherResult: '互評結果',
         schoolResult: '校評結果',
@@ -483,6 +484,8 @@ const LANG_ZH_TW = {
         classroom: '教室:',
         expiredData: '到期日:',
         hadExp: '(已到期)',
+        unuse: '(未啟用)',
+        forever: '(永久授權)',
         useInfo: '使用狀況:',
         unband: '解綁設備',
         cancel: '取消',
@@ -2264,7 +2267,7 @@ const LANG_ZH_TW = {
             error1: "發表失敗",
             message1: "切換至我的話題",
             message2: "切換至回覆我的",
-            report: ["違法資訊", "涉黃資訊", "洩露隱私", "人身攻擊", "垃圾行銷"],
+            report: ["非法資訊", "黃色資訊", "洩露隱私", "人身攻擊", "垃圾行銷"],
         },
         // 活动
         activity: {
@@ -2319,6 +2322,8 @@ const LANG_ZH_TW = {
             electiveCourse: "增能項目",
             sendSummary: "填寫研習總結",
             plaSummary: "請填寫您的研習總結",
+            openReport: "查看報告",
+            message5: "認證資料必須全部通過才能獲得學時",
         }
     },
     // 知识点管理
@@ -5521,7 +5526,7 @@ const LANG_ZH_TW = {
         props7: '儲存空間不足!',
         uploadText: '點按或者拖移上傳',
         resTips: 'HiTeach生成的教材,只支援HTEX格式',
-        space: '可用空間:',
+        space: '剩余空間:',
         calcing: '計算中…',
         blobFull: '(已滿)',
         otherType: '其他',

+ 10 - 4
TEAMModelOS/ClientApp/src/components/student-web/SettingView/Setting.vue

@@ -112,11 +112,13 @@
                     <Form ref="mobile" :model="newPhoneNum" :rules="mobileValidate" :label-width="80" label-position="right">
                         <FormItem prop="newPhoneNum" class="custom-radirs">
                             <span slot="label" class="form-label">{{ $t('studentWeb.tmManagement.phone') }}</span>
-                            <Select v-model="newPhoneNum.area" style="width:170px">
+                            <!-- <Select v-model="newPhoneNum.area" style="width:170px">
                                 <Option v-for="item in areaList" :value="item.code" :key="item.area">
                                     {{ `+${item.code}(${item.name})` }}
                                 </Option>
-                            </Select>
+                            </Select> -->
+                            <!-- 改用下面组件,根据ip地址判断区号 -->
+                            <CountryCode v-model="newPhoneNum.area" style="width:130px;display:inline-block" />
                             <Input v-special-char v-model="newPhoneNum.number" class="edit-pw-input" style="width:280px" />
                         </FormItem>
                         <FormItem prop="code" class="custom-radirs" v-if="!student">
@@ -159,9 +161,13 @@
 import BlobTool from '@/utils/blobTool.js'
 import jwtDecode from 'jwt-decode'
 import countryCode from '@/static/countryCodeData.js'
+import CountryCode from '@/components/public/countryCode/Index.vue'
 import { mapState } from 'vuex'
 export default {
     name: "",
+    components: {
+        CountryCode
+    },
     data () {
         const confirm = (rule, value, callback) => {
             if (value !== this.pw.newPw) {
@@ -254,7 +260,7 @@ export default {
         this.MyName = this.$t("studentWeb.settingView.title")
         this.$emit("onNavNo", this.MyNo)
         this.$emit("onNavName", this.MyName)
-        let curLocal = localStorage.getItem('local')
+        /* let curLocal = localStorage.getItem('local')
         let attr = 'CountryEn'
         if (curLocal.includes('cn') || curLocal.includes('CN')) {
             attr = 'CountryCn'
@@ -274,7 +280,7 @@ export default {
         this.areaList.sort((a, b) => {
             return a.code - b.code
         })
-        console.log(this.areaList);
+        console.log(this.areaList); */
         // 醍摩豆登陆
         if (this.userInfo.scope === "tmduser") {
             this.getIdInfo()

+ 24 - 4
TEAMModelOS/ClientApp/src/view/auth/Serial.vue

@@ -116,9 +116,15 @@
                                             <span class="serial-date" :style="{color:item.expired ? '#ed4014':''}">
                                                 {{$jsFn.dateFormat(item.endDate)}}
                                             </span>
-                                            <span v-if="item.expired" class="has-expired">
+                                            <span v-if="item.es == 2" class="has-expired">
                                                 {{$t('auth.hadExp')}}
                                             </span>
+                                            <span v-else-if="item.es == 1" class="has-expired">
+                                                {{$t('auth.unuse')}}
+                                            </span>
+                                            <span v-else-if="item.es == 4" class="has-expired">
+                                                {{$t('auth.forever')}}
+                                            </span>
                                             <span class="use-text">
                                                 {{$t('auth.useInfo')}}
                                             </span>
@@ -510,7 +516,7 @@ export default {
                             flag = !item.expired && item.deviceMax > item.deviceBound.length
                             break
                         case 'filter4': //过期
-                            flag = item.expired
+                            flag = item.es == 2
                             break
                         default:
                             break
@@ -537,9 +543,23 @@ export default {
         formatData() {
             let data = this._.cloneDeep(this.serial)
             let timestamp = Date.now()
-            console.log(timestamp)
             data.forEach(item => {
-                item.expired = item.endDate * 1000 < timestamp
+                //未啟用
+                if (item.regDate == 0 || item.expireStatus == "") {
+                    item.es = 1
+                }
+                //已到期
+                else if (item.expireStatus == "F" || item.endDate * 1000 < timestamp) {
+                    item.es = 2
+                }
+                //可使用
+                else if (item.expireStatus == "S" || item.expireStatus == "A") {
+                    item.es = 3
+                }
+                //永久授權
+                else if (item.expireStatus == "A" && item.endDate == 0) {
+                    item.es = 4
+                }
                 item.deviceBound.forEach(d => {
                     d.serial = item.serial
                 })

+ 10 - 2
TEAMModelOS/ClientApp/src/view/jyzx/HourDetail.vue

@@ -8,11 +8,11 @@
                 <p>
                     {{ hourInfo.name }}:
                     <span class="detail-hour">{{ hourInfo.value }}</span> / {{ hourInfo.total }}
-                    <Tooltip :max-width="400" transfer v-if="hourInfo.name === '认证材料'">
+                    <Tooltip :max-width="400" transfer v-if="hourInfo.name === $t('jyzx.homePage.application')">
                         <Icon type="ios-alert" size="15" />
                         <div slot="content">
                             <div>
-                                认证材料必须全部通过才能获得学时
+                                {{ $t('jyzx.homePage.message5') }}
                             </div>
                         </div>
                     </Tooltip>
@@ -20,6 +20,9 @@
                 <span v-if="hourInfo.minuteTotal" style="text-align: center; font-size: 14px;">
                     <span class="detail-hour" style="font-size: 16px;">{{ hourInfo.minute }}</span> / {{ hourInfo.minuteTotal }}(分钟)
                 </span>
+                <span v-if="hourInfo.offlineReport" style="font-size: 14px; color: #3283E3; cursor: pointer;" @click="openReport">
+                    {{ $t('jyzx.homePage.openReport') }}
+                </span>
             </div>
         </div>
     </div>
@@ -56,6 +59,11 @@ export default {
             }
             return 0
         },
+    },
+    methods: {
+        openReport() {
+            window.open('/web/viewer.html?file=' + encodeURIComponent(this.hourInfo.offlineReport.blob + this.$store.state.user.userProfile.osblob_sas))
+        },
     }
 }
 </script>

+ 2 - 2
TEAMModelOS/ClientApp/src/view/jyzx/application.vue

@@ -51,9 +51,9 @@
                   </p>
                 </template>
                 <template slot-scope="{ row }" slot="action">
-                  <Button type="success" size="small" @click="doUpload(row,'edit')" v-if="isShowEdit(row)">编辑</Button>
+                  <Button type="success" size="small" @click="doUpload(row,'edit')" v-if="isShowEdit(row)">{{ $t('homework.edit') }}</Button>
                   <Button type="success" size="small" @click="doUpload(row)" v-if="!row.uploads.length">{{ $t('jyzx.application.load') }}</Button>
-                  <Button type="info" size="small" @click="goAppraiseDetail(row)" v-else>{{ `评价详情` }}</Button>
+                  <Button type="info" size="small" @click="goAppraiseDetail(row)" v-else>{{ $t('ability.appraiseDetail') }}</Button>
                   <Button type="primary" size="small" @click="goTestPaper(row)" v-if="row.exerciseScore !== 1">{{ row.exerciseScore > -1 ? $t('jyzx.application.againTest') : $t('jyzx.application.meTest') }}</Button>
                 </template>
               </Table>

+ 341 - 445
TEAMModelOS/ClientApp/src/view/jyzx/discuss.vue

@@ -1,487 +1,383 @@
 <template>
-    <div style="background: #eee; padding: 20px; height: 100%" class="discuss1">
-        <Card>
-            <div style="width: 90%; margin: 0% 5%; height: 100%">
-                <topicPublish></topicPublish>
-                <div style="height: 100%">
-                    <vuescroll>
-                        <div
-                            style="
-                                width: 83%;
-                                margin: 0% 9%;
-                                margin-bottom: 130px;
-                            "
-                        >
-                            <div
-                                v-for="(item, index) in discuss"
-                                :key="index"
-                                class="discuss"
-                            >
-                                <div>
-                                    <div class="disContent">
-                                        <p class="inClass" v-if="item.relevance">{{item.relevance}}</p>
-                                        <p class="disName"
-                                           :style="{
-                                                color:
-                                                    item.tmdid ==
-                                                    $store.state.userInfo
-                                                        .TEAMModelId
-                                                        ? '#2d8cf0'
-                                                        : '',
-                                            }">
-                                            {{ item.tmdname }}
-                                        </p>
-                                    </div>
-                                    <p>
-                                        <span style="color: #2d8cf0"
-                                            >{{ $t('jyzx.common.theme') }}:</span
-                                        >{{ item.title }}
-                                    </p>
-                                    <div>
-                                        <span style="color: #2d8cf0"
-                                            >{{ $t('jyzx.common.content') }}:</span
-                                        >
-                                        <span v-html="item.comment"></span>
-                                    </div>
-                                    <div class="disAction">
-                                        <div>
-                                            <span
-                                                style="
-                                                    margin-right: 20px;
-                                                    color: #2d8cf0;
-                                                "
-                                                @click="openReply(item.id, 0)"
-                                                v-show="item.replyCount != 0"
-                                                >{{ $t('jyzx.common.comment') }}({{
-                                                    item.replyCount
-                                                }})</span
-                                            >
-                                            <span
-                                                style="
-                                                    margin-right: 20px;
-                                                    color: #2d8cf0;
-                                                "
-                                                @click="replyOther(item, index)"
-                                                >{{ $t('jyzx.common.reply') }}</span
-                                            ><span
-                                                @click="delect(item.id, index)"
-                                                v-if="
-                                                    item.tmdid ==
-                                                    $store.state.userInfo
-                                                        .TEAMModelId
-                                                "
-                                                style="margin-right: 20px"
-                                                >{{ $t('jyzx.common.delete') }}</span
-                                            >
-                                            <span @click="report(item.tmdname)"
-                                                >{{ $t('jyzx.common.report') }}</span
-                                            >
-                                        </div>
-                                        <p>{{ item.time | formatDate }}</p>
-                                    </div>
-                                </div>
-                                <!-- 回复框 -->
-                                <div class="replyDisc" v-if="activeIn == index">
-                                    <Input v-special-char
-                                        v-model="replyDis"
-                                        type="textarea"
-                                        :autosize="{ minRows: 2, maxRows: 5 }"
-                                    ></Input>
-                                    <div>
-                                        <Button
-                                            type="primary"
-                                            size="small"
-                                            @click="
-                                                reply(
-                                                    item.id,
-                                                    item.tmdname,
-                                                    item.tmdid
-                                                )
-                                            "
-                                            >{{ $t('jyzx.common.sure') }}</Button
-                                        >
-                                        <Button
-                                            style="margin-left: 8px"
-                                            @click="cancelReply"
-                                            size="small"
-                                            >{{ $t('jyzx.common.cancel') }}</Button
-                                        >
-                                    </div>
-                                </div>
-                                <!-- 别人的留言 -->
-                                <div
-                                    v-if="replyStatus && item.id === replyId && replyData.length"
-                                    class="disChild"
-                                >
-                                    <div
-                                        v-for="(child, no) in replyData"
-                                        :key="no"
-                                    >
-                                        <div class="disContent">
-                                            <p
-                                                class="disName"
-                                                :style="{
-                                                    color:
-                                                        child.tmdid ==
-                                                        $store.state.userInfo
-                                                            .TEAMModelId
-                                                            ? '#2d8cf0'
-                                                            : '',
-                                                }"
-                                            >
-                                                {{ child.tmdname }}
-                                            </p>
-                                        </div>
-                                        <p v-html="child.comment"></p>
-                                        <div class="disAction">
-                                            <div>
-                                                <span
-                                                    @click="
-                                                        delect(
-                                                            child.pid,
-                                                            index,
-                                                            child.id
-                                                        )
-                                                    "
-                                                    v-if="
-                                                        child.tmdid ==
-                                                            $store.state
-                                                                .userInfo
-                                                                .TEAMModelId ||
-                                                        item.tmdid ==
-                                                            $store.state
-                                                                .userInfo
-                                                                .TEAMModelId
-                                                    "
-                                                    style="margin-right: 20px"
-                                                    >{{ $t('jyzx.common.delete') }}</span
-                                                >
-                                                <span
-                                                    @click="
-                                                        report(child.tmdname)
-                                                    "
-                                                    >{{ $t('jyzx.common.report') }}</span
-                                                >
-                                            </div>
-                                            <p>{{ child.time | formatDate }}</p>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </vuescroll>
+  <div style="background: #eee; padding: 20px; height: 100%" class="discuss1">
+    <Card>
+      <div style="width: 90%; margin: 0% 5%; height: 100%">
+        <topicPublish></topicPublish>
+        <div style="height: 100%">
+          <vuescroll>
+            <div style="width: 83%;margin: 0% 9%;margin-bottom: 130px;">
+              <div v-for="(item, index) in discuss" :key="index" class="discuss">
+                <div>
+                  <div class="disContent">
+                    <p class="inClass" v-if="item.relevance">{{ item.relevance }}</p>
+                    <p class="disName" :style="{color:item.tmdid ==$store.state.userInfo.TEAMModelId ? '#2d8cf0': '',}">
+                      {{ item.tmdname }}
+                    </p>
+                  </div>
+                  <p>
+                    <span style="color: #2d8cf0">{{ $t('jyzx.common.theme') }}:</span>{{ item.title }}
+                  </p>
+                  <div>
+                    <span style="color: #2d8cf0">{{ $t('jyzx.common.content') }}:</span>
+                    <span v-html="item.comment"></span>
+                  </div>
+                  <div class="disAction">
+                    <div>
+                      <span style="margin-right: 20px;color: #2d8cf0;" @click="openReply(item.id, 0)" v-show="item.replyCount != 0">{{$t('jyzx.common.comment')}}({{item.replyCount}})</span>
+                      <span style="margin-right: 20px;color: #2d8cf0;" @click="replyOther(item, index)">{{ $t('jyzx.common.reply')}}</span><span @click="delect(item.id, index)" v-if="item.tmdid ==$store.state.userInfo.TEAMModelId" style="margin-right: 20px">{{ $t('jyzx.common.delete') }}</span>
+                      <span @click="report(item.tmdname)">{{ $t('jyzx.common.report') }}</span>
+                    </div>
+                    <p>{{ item.time | formatDate }}</p>
+                  </div>
                 </div>
+                <!-- 回复框 -->
+                <div class="replyDisc" v-if="activeIn == index">
+                  <Input v-special-char v-model="replyDis" type="textarea" :autosize="{ minRows: 2, maxRows: 5 }"></Input>
+                  <div>
+                    <Button type="primary" size="small" @click="
+                      reply(item.id,item.tmdname,item.tmdid)
+                    ">{{ $t('jyzx.common.sure') }}</Button>
+                    <Button style="margin-left: 8px" @click="cancelReply" size="small">{{ $t('jyzx.common.cancel')
+                    }}</Button>
+                  </div>
+                </div>
+                <!-- 别人的留言 -->
+                <div v-if="replyStatus && item.id === replyId && replyData.length" class="disChild">
+                  <div v-for="(child, no) in replyData" :key="no">
+                    <div class="disContent">
+                      <p class="disName" :style="{color:child.tmdid ==$store.state.userInfo.TEAMModelId ? '#2d8cf0': '',}">
+                        {{ child.tmdname }}
+                      </p>
+                    </div>
+                    <p v-html="child.comment"></p>
+                    <div class="disAction">
+                      <div>
+                        <span @click="delect(child.pid,index,child.id)" v-if="child.tmdid ==$store.state.userInfo.TEAMModelId ||item.tmdid ==$store.state.userInfo.TEAMModelId" style="margin-right: 20px">{{ $t('jyzx.common.delete') }}</span>
+                        <span @click="report(child.tmdname)">{{ $t('jyzx.common.report') }}</span>
+                      </div>
+                      <p>{{ child.time | formatDate }}</p>
+                    </div>
+                  </div>
+                </div>
+              </div>
             </div>
-        </Card>
-        <Modal v-model="isReport" :title="$t('jyzx.common.report')" @on-ok="ok">
-            <p>{{ $t('jyzx.common.message') }}</p>
-            <CheckboxGroup v-model="checkReport">
-                <Checkbox
-                    :label="index"
-                    v-for="(item, index) in reportList"
-                    :key="index"
-                >
-                    <span>{{ item }}</span>
-                </Checkbox>
-            </CheckboxGroup>
-        </Modal>
-    </div>
+          </vuescroll>
+        </div>
+      </div>
+    </Card>
+    <Modal v-model="isReport" :title="$t('jyzx.common.report')" @on-ok="ok">
+      <p>{{ $t('jyzx.common.message') }}</p>
+      <CheckboxGroup v-model="checkReport">
+        <Checkbox :label="index" v-for="(item, index) in reportList" :key="index">
+          <span>{{ item }}</span>
+        </Checkbox>
+      </CheckboxGroup>
+    </Modal>
+  </div>
 </template>
 <script>
 import topicPublish from "./topicPublish.vue"
 import { formatDate } from "../../utils/time.js"
 export default {
-    components: { topicPublish },
-    data() {
-        return {
-            activeIn: -1, //-1:没有点击回复
-            replyDis: "",
-            discuss: [],
-            replyDis: "",
-            replyStatus: false,
-            replyOpen: "展开回复",
-            replyData: [],
-            topicId: "",
-            replyId: "",
-            replyIndex: 0,
-            reportList: this.$t("jyzx.discuss.report"),
-            isReport: false,
-            checkReport: [],
-        }
+  components: { topicPublish },
+  data () {
+    return {
+      activeIn: -1, //-1:没有点击回复
+      replyDis: "",
+      discuss: [],
+      replyDis: "",
+      replyStatus: false,
+      replyOpen: "展开回复",
+      replyData: [],
+      topicId: "",
+      replyId: "",
+      replyIndex: 0,
+      reportList: this.$t("jyzx.discuss.report"),
+      isReport: false,
+      checkReport: [],
+    }
+  },
+  created () {
+
+  },
+  mounted () {
+    this.totaltopic()
+  },
+  methods: {
+    replyOther (data, i) {
+      if (this.activeIn == -1 || this.activeIn != i) {
+        this.activeIn = i
+        this.replyDis = ""
+      }
     },
-    created() {
-       
-        },
-        mounted() {
-            this.totaltopic()
-        },
-    methods: {
-        replyOther(data, i) {
-            if (this.activeIn == -1 || this.activeIn != i) {
-                this.activeIn = i
-                this.replyDis = ""
-            }
-        },
-        // 取消回复
-        cancelReply() {
-            this.activeIn = -1
-        },
-        //获取所有话题
-        totaltopic() {
-            let user = this.$store.state.userInfo
-            this.$api.jyzx
-                .totalTopic({
-                    code: this.$store.state.userInfo.schoolCode,
-                    source: "",
-                    comid: "",
-                    tmdid: "",
-                })
-                .then(
-                    (res) => {
-                        var traitData = JSON.parse(localStorage.getItem('trait'))
-                        for (var i = 0; i < res.length; i++) {
-                            let comment = res[i].comment
-                            var commenfrt = comment.replace("<p>", "")
-                            var commenlast = commenfrt.replace("</p>", "")
-                            res[i].comment = commenlast
-                            var comidNmae = res[i].comid
-                            var name = ''
-                            if (traitData) {
-                                var signame = traitData.filter(function (x) {
-                                    return x.comid === comidNmae
-                                })
-                                if (signame.length != 0) {
-                                    name = signame[0].no + signame[0].name
-                                }
-                            }
-                            res[i].relevance = name
-                        }
-                        res.reverse()
-                        this.discuss = res
-                        localStorage.setItem("allTopic", JSON.stringify(res))
-                    },
-                    (error) => {
-                        this.$Message.error("API异常,数据获取失败!")
-                        console.log(error, "获取失败")
-                    }
-                )
-        },
-        // 回复话题
-        reply(topicId, replyName, replyId) {
-            let userme = this.$store.state.userInfo
-            console.log(userme, this.replyDis, "用户信息")
-            this.$api.jyzx
-                .replyTopic({
-                    opt: "add",
-                    debateId: topicId,
-                    debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
-                    reply: {
-                        id: "",
-                        pid: topicId,
-                        tmdid: userme.TEAMModelId,
-                        tmdname: userme.name,
-                        comment: this.replyDis,
-                        atTmdid: replyId,
-                        atTmdname: replyName,
-                    },
+    // 取消回复
+    cancelReply () {
+      this.activeIn = -1
+    },
+    //获取所有话题
+    totaltopic () {
+      let user = this.$store.state.userInfo
+      this.$api.jyzx
+        .totalTopic({
+          code: this.$store.state.userInfo.schoolCode,
+          source: "",
+          comid: "",
+          tmdid: "",
+        })
+        .then(
+          (res) => {
+            var traitData = JSON.parse(localStorage.getItem('trait'))
+            for (var i = 0; i < res.length; i++) {
+              let comment = res[i].comment
+              var commenfrt = comment.replace("<p>", "")
+              var commenlast = commenfrt.replace("</p>", "")
+              res[i].comment = commenlast
+              var comidNmae = res[i].comid
+              var name = ''
+              if (traitData) {
+                var signame = traitData.filter(function (x) {
+                  return x.comid === comidNmae
                 })
-                .then(
-                    (res) => {
-                        console.log(res)
-                        this.$Message.success(this.$t("jyzx.common.success1"))
-                        this.discuss[this.activeIn].replyCount += 1
-                        this.activeIn = -1
-                        this.openReply(res.reply.pid, 1)
-                    },
-                    (error) => {
-                        console.log(error)
-                    }
-                )
-        },
-        //展开回复
-        openReply(topicId, status) {
-            this.topicId = topicId
-            if (!this.replyStatus) {
-                this.replyStatus = true
-                this.activeIn = -1
-            } else {
-                // status:1 回复
-                if (!status) {
-                    if (this.replyId == topicId) {
-                        this.replyStatus = false
-                    }
+                if (signame.length != 0) {
+                  name = signame[0].no + signame[0].name
                 }
+              }
+              res[i].relevance = name
             }
-            this.getReplyArr(topicId)
-        },
-        getReplyArr(topicId) {
-            this.$api.jyzx
-                .replyDetail({
-                    debateId: topicId,
-                    debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
-                })
-                .then(
-                    (res) => {
-                        this.replyData = res.debate.replies
-                        this.replyId = res.debate.id
-                    },
-                    (error) => {}
-                )
-        },
-        // 举报
-        report(name) {
-            this.isReport = true
-            this.checkReport = []
-        },
-        ok() {
-            if (this.checkReport.length) {
-                this.$Message.success(this.$t("jyzx.common.success2"))
+            res.reverse()
+            this.discuss = res
+            localStorage.setItem("allTopic", JSON.stringify(res))
+          },
+          (error) => {
+            this.$Message.error("API异常,数据获取失败!")
+            console.log(error, "获取失败")
+          }
+        )
+    },
+    // 回复话题
+    reply (topicId, replyName, replyId) {
+      let userme = this.$store.state.userInfo
+      console.log(userme, this.replyDis, "用户信息")
+      this.$api.jyzx
+        .replyTopic({
+          opt: "add",
+          debateId: topicId,
+          debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
+          reply: {
+            id: "",
+            pid: topicId,
+            tmdid: userme.TEAMModelId,
+            tmdname: userme.name,
+            comment: this.replyDis,
+            atTmdid: replyId,
+            atTmdname: replyName,
+          },
+        })
+        .then(
+          (res) => {
+            console.log(res)
+            this.$Message.success(this.$t("jyzx.common.success1"))
+            this.discuss[this.activeIn].replyCount += 1
+            this.activeIn = -1
+            this.openReply(res.reply.pid, 1)
+          },
+          (error) => {
+            console.log(error)
+          }
+        )
+    },
+    //展开回复
+    openReply (topicId, status) {
+      this.topicId = topicId
+      if (!this.replyStatus) {
+        this.replyStatus = true
+        this.activeIn = -1
+      } else {
+        // status:1 回复
+        if (!status) {
+          if (this.replyId == topicId) {
+            this.replyStatus = false
+          }
+        }
+      }
+      this.getReplyArr(topicId)
+    },
+    getReplyArr (topicId) {
+      this.$api.jyzx
+        .replyDetail({
+          debateId: topicId,
+          debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
+        })
+        .then(
+          (res) => {
+            this.replyData = res.debate.replies
+            this.replyId = res.debate.id
+          },
+          (error) => { }
+        )
+    },
+    // 举报
+    report (name) {
+      this.isReport = true
+      this.checkReport = []
+    },
+    ok () {
+      if (this.checkReport.length) {
+        this.$Message.success(this.$t("jyzx.common.success2"))
+      }
+    },
+    // 删除
+    delect (topicId, index, replyId) {
+      let cont = ""
+      if (replyId) {
+        cont = this.$t("jyzx.common.reply")
+      } else {
+        cont = this.$t("jyzx.common.theme")
+      }
+      this.$Modal.confirm({
+        title: this.$t("jyzx.common.delete"),
+        content: `您确定要删除该${cont}吗?`,
+        onOk: () => {
+          // 回复的
+          if (replyId) {
+            let req = {
+              opt: "del",
+              debateId: topicId,
+              debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
+              reply: {
+                id: replyId,
+              },
             }
-        },
-        // 删除
-        delect(topicId, index, replyId) {
-            let cont = ""
-            if (replyId) {
-                cont = this.$t("jyzx.common.reply")
-            } else {
-                cont = this.$t("jyzx.common.theme")
+            this.$api.jyzx.replyTopic(req).then((res) => {
+              if (res.status == 0) {
+                this.$Message.success(this.$t("jyzx.common.success3"))
+                this.getReplyArr(topicId)
+                this.discuss[index].replyCount--
+              } else {
+                this.$Message.warning(this.$t("jyzx.common.error"))
+              }
+            })
+          }
+          // 自己的话题
+          else {
+            let req = {
+              debateId: topicId,
+              debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
             }
-            this.$Modal.confirm({
-                title: this.$t("jyzx.common.delete"),
-                content: `您确定要删除该${cont}吗?`,
-                onOk: () => {
-                    // 回复的
-                    if (replyId) {
-                        let req = {
-                            opt: "del",
-                            debateId: topicId,
-                            debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
-                            reply: {
-                                id: replyId,
-                            },
-                        }
-                        this.$api.jyzx.replyTopic(req).then((res) => {
-                            if (res.status == 0) {
-                                this.$Message.success(this.$t("jyzx.common.success3"))
-                                this.getReplyArr(topicId)
-                                this.discuss[index].replyCount --
-                            } else {
-                                this.$Message.warning(this.$t("jyzx.common.error"))
-                            }
-                        })
-                    }
-                    // 自己的话题
-                    else {
-                        let req = {
-                            debateId: topicId,
-                            debateCode: "Debate-" + this.$store.state.userInfo.schoolCode,
-                        }
-                        // 调另一个api
-                        this.$api.jyzx.delReply(req).then((res) => {
-                            if (res.status == 200) {
-                                this.$Message.success(this.$t("jyzx.common.success3"))
-                                this.totaltopic()
-                            } else {
-                                this.$Message.warning(this.$t("jyzx.common.error"))
-                            }
-                        })
-                    }
-                },
+            // 调另一个api
+            this.$api.jyzx.delReply(req).then((res) => {
+              if (res.status == 200) {
+                this.$Message.success(this.$t("jyzx.common.success3"))
+                this.totaltopic()
+              } else {
+                this.$Message.warning(this.$t("jyzx.common.error"))
+              }
             })
+          }
         },
+      })
     },
-    //时间处理
-    filters: {
-        formatDate(time) {
-            time = time
-            let date = new Date(time)
-            return formatDate(date, "yyyy-MM-dd hh:mm")
-        },
+  },
+  //时间处理
+  filters: {
+    formatDate (time) {
+      time = time
+      let date = new Date(time)
+      return formatDate(date, "yyyy-MM-dd hh:mm")
     },
+  },
 }
 </script>
 
 <style lang="less" scoped>
 .discuss {
-    border-bottom: 1px solid var(--border-color);
-    padding: 10px;
-    padding-bottom: 20px;
+  border-bottom: 1px solid var(--border-color);
+  padding: 10px;
+  padding-bottom: 20px;
 
-    .disContent {
-        .disName {
-            font-size: 20px;
-            // color: #2d8cf0;
-        }
+  .disContent {
+    .disName {
+      font-size: 20px;
+      // color: #2d8cf0;
+    }
 
-        & > p:nth-of-type(2) {
-            margin: 5px 0;
-        }
+    & > p:nth-of-type(2) {
+      margin: 5px 0;
     }
-    .disAction {
-        margin-top: 5px;
-        & > p:last-child {
-            color: #878787;
-        }
-        div {
-            float: right;
-            span {
-                cursor: pointer;
-            }
-        }
+  }
+
+  .disAction {
+    margin-top: 5px;
+
+    & > p:last-child {
+      color: #878787;
     }
-    .inClass {
-        background: #2d8cf0;
-        color: white;
-        border-radius: 10px;
-        padding: 2px 10px;
-        margin: 2px 0;
-        float: right;
+
+    div {
+      float: right;
+
+      span {
+        cursor: pointer;
+      }
     }
-    .disChild {
-        // border: 1px solid #ccc;
-        background-color: rgb(241, 241, 241);
-        border-radius: 10px;
-        margin: 15px 40px;
-        padding: 5px 10px;
+  }
 
-        & > div {
-            padding: 2px 10px 5px;
-            &:not(:last-child) {
-                border-bottom: 1px solid #ffffff;
-                margin-bottom: 10px;
-            }
-        }
+  .inClass {
+    background: #2d8cf0;
+    color: white;
+    border-radius: 10px;
+    padding: 2px 10px;
+    margin: 2px 0;
+    float: right;
+  }
 
-        .disName {
-            font-size: 16px;
-            // color: #515a6e;
-        }
+  .disChild {
+    // border: 1px solid #ccc;
+    background-color: rgb(241, 241, 241);
+    border-radius: 10px;
+    margin: 15px 40px;
+    padding: 5px 10px;
+
+    & > div {
+      padding: 2px 10px 5px;
+
+      &:not(:last-child) {
+        border-bottom: 1px solid #ffffff;
+        margin-bottom: 10px;
+      }
     }
 
-    .replyDisc {
-        margin: 15px 40px;
-        margin-top: 10px;
-        text-align: right;
+    .disName {
+      font-size: 16px;
+      // color: #515a6e;
+    }
+  }
 
-        & > div:last-child {
-            margin-top: 10px;
-        }
+  .replyDisc {
+    margin: 15px 40px;
+    margin-top: 10px;
+    text-align: right;
+
+    & > div:last-child {
+      margin-top: 10px;
     }
+  }
 }
 </style>
 
 <style lang="less">
 .discuss1 {
-    .ivu-card-bordered,
-    .ivu-card-body {
-        height: 100%;
-    }
-    .ivu-card-body {
-        overflow: hidden;
-    }
+  .ivu-card-bordered,
+  .ivu-card-body {
+    height: 100%;
+  }
 
-    .ivu-card-bordered{
-        border: none;
-    }
+  .ivu-card-body {
+    overflow: hidden;
+  }
+
+  .ivu-card-bordered {
+    border: none;
+  }
 }
 </style>

+ 4 - 2
TEAMModelOS/ClientApp/src/view/jyzx/newHomePage.vue

@@ -170,7 +170,8 @@ export default {
             offlineInfo: {
                 name: this.$t("jyzx.homePage.offline"),
                 total: 10,
-                value: 0
+                value: 0,
+                offlineReport: null,
             },
             verifyInfo: {
                 name: this.$t("jyzx.homePage.application"),
@@ -297,7 +298,8 @@ export default {
                     // 校本研修
                     this.offlineInfo.total = res.setting.offlineTime
                     this.offlineInfo.value = res.teacherTrain.offlineTime > res.setting.offlineTime ? res.setting.offlineTime : res.teacherTrain.offlineTime
-                    
+                    this.offlineInfo.offlineReport = res.teacherTrain.offlineReport
+
                     // 认证材料
                     this.verifyInfo.total = res.setting.submitTime
                     this.verifyInfo.value = res.teacherTrain.currency.submitTime > res.setting.submitTime ? res.setting.submitTime : res.teacherTrain.currency.submitTime

+ 308 - 323
TEAMModelOS/ClientApp/src/view/jyzx/topicPublish.vue

@@ -1,47 +1,41 @@
 <template>
-    <div class="topicbox">
-        <div class="topicheader">
-            <div class="headerleft">
-                <div class="taginfo">
-                    <span>{{ $t("jyzx.discuss.topicType") }}:</span>
-                    <CheckboxGroup v-model="toType" @on-change="topicType">
-                        <Checkbox label="1" border>{{ $t("jyzx.discuss.normal") }}</Checkbox>
-                        <Checkbox label="2" border>{{ $t("jyzx.discuss.point") }}</Checkbox>
-                    </CheckboxGroup>
-                    <!-- <Tag checkable color="geekblue" size ="large" @on-change="topicType(1)">普通话题</Tag>
+  <div class="topicbox">
+    <div class="topicheader">
+      <div class="headerleft">
+        <div class="taginfo">
+          <span>{{ $t("jyzx.discuss.topicType") }}:</span>
+          <CheckboxGroup v-model="toType" @on-change="topicType">
+            <Checkbox label="1" border>{{ $t("jyzx.discuss.normal") }}</Checkbox>
+            <Checkbox label="2" border>{{ $t("jyzx.discuss.point") }}</Checkbox>
+          </CheckboxGroup>
+          <!-- <Tag checkable color="geekblue" size ="large" @on-change="topicType(1)">普通话题</Tag>
                     <Tag checkable color="volcano" size ="large" @on-change="topicType(2)">能力点话题</Tag> -->
-                </div>
-                
-                <div class="aboutme">
-                    <Dropdown @on-click="metopic">
-                        <Button>
-                            {{ showType }}
-                            <Icon type="ios-arrow-down"></Icon>
-                        </Button>
-                        <DropdownMenu slot="list">
-                            <DropdownItem name="allTopic">{{ $t("jyzx.discuss.allTopic") }}</DropdownItem>
-                            <DropdownItem name="metopic">{{ $t("jyzx.discuss.myTopic") }}</DropdownItem>
-                            <DropdownItem name="mereply">{{ $t("jyzx.discuss.replyMe") }}</DropdownItem>
-                        </DropdownMenu>
-                    </Dropdown>
-                </div>
-            </div>
-            <div class="headerright">
-                <div class="searchbox light-iview-input">
-                    <Input v-special-char
-                        search
-                        enter-button
-                        :placeholder="$t('jyzx.discuss.placeholder1')"
-                        v-model="keyword"
-                        @on-search="searchKeyword"
-                    />
-                </div>
-                
-                <div class="totalbox">
-                    <Icon type="md-add-circle" size="25" color="#57a3f3" @click="topicShow = !topicShow" :title="$t('jyzx.discuss.addTopic')" />
-                    <!-- <Button type="primary">{{ $t("jyzx.discuss.addTopic") }}</Button> -->
-                </div>
-                <!-- <div class="topicbtn">
+        </div>
+
+        <div class="aboutme">
+          <Dropdown @on-click="metopic">
+            <Button>
+              {{ showType }}
+              <Icon type="ios-arrow-down"></Icon>
+            </Button>
+            <DropdownMenu slot="list">
+              <DropdownItem name="allTopic">{{ $t("jyzx.discuss.allTopic") }}</DropdownItem>
+              <DropdownItem name="metopic">{{ $t("jyzx.discuss.myTopic") }}</DropdownItem>
+              <DropdownItem name="mereply">{{ $t("jyzx.discuss.replyMe") }}</DropdownItem>
+            </DropdownMenu>
+          </Dropdown>
+        </div>
+      </div>
+      <div class="headerright">
+        <div class="searchbox light-iview-input">
+          <Input v-special-char search enter-button :placeholder="$t('jyzx.discuss.placeholder1')" v-model="keyword" @on-search="searchKeyword" />
+        </div>
+
+        <div class="totalbox">
+          <Icon type="md-add-circle" size="25" color="#57a3f3" @click="topicShow = !topicShow" :title="$t('jyzx.discuss.addTopic')" />
+          <!-- <Button type="primary">{{ $t("jyzx.discuss.addTopic") }}</Button> -->
+        </div>
+        <!-- <div class="topicbtn">
                     <Button
                         shape="circle"
                         icon="md-chatboxes"
@@ -49,21 +43,19 @@
                         @click="topicShow = !topicShow"
                     ></Button>
                 </div> -->
-            </div>
-        </div>
-
-        <div id="statementBox" v-show="topicShow">
-            <Form :model="formItem" class="light-iview-form">
-                <FormItem>
-                    <Input v-special-char v-model="formItem.input"
-                           :placeholder="$t('jyzx.discuss.placeholder2')"></Input>
-                </FormItem>
-                <Select v-model="topicnameId" style="width:100%;margin-bottom:1%;" @on-change="comidTopic">
-                    <Option v-for="item in topicData" :value="item.comid" :key="item.comid">{{item.no}}{{ item.name }}</Option>
-                </Select>
-                <div id="div1" style="height: 370px"></div>
+      </div>
+    </div>
 
-                <!--<FormItem>
+    <div id="statementBox" v-show="topicShow">
+      <Form :model="formItem" class="light-iview-form">
+        <FormItem>
+          <Input v-special-char v-model="formItem.input" :placeholder="$t('jyzx.discuss.placeholder2')"></Input>
+        </FormItem>
+        <Select v-model="topicnameId" style="width:100%;margin-bottom:1%;" @on-change="comidTopic">
+          <Option v-for="item in topicData" :value="item.comid" :key="item.comid">{{item.no}}{{ item.name }}</Option>
+        </Select>
+        <div id="div1" style="height: 370px"></div>
+        <!--<FormItem>
         <Input v-model="formItem.textarea" type="textarea" :autosize="{minRows: 5,maxRows: 9}"></Input>
     </FormItem>
     <FormItem>
@@ -73,335 +65,328 @@
             </Upload>
         </div>
     </FormItem>-->
-                <!--<textarea id="text1" style="width:100%; height:200px;"></textarea>-->
-                <FormItem>
-                    <Button type="primary" @click="discussSubmit">{{ $t("jyzx.common.sure") }}</Button>
-                    <Button style="margin-left: 8px"
-                            @click="
-                            ()=>
-                        {
-                        topicShow = false
-                        }
-                        "
-                        >{{ $t("jyzx.common.cancel") }}
-                    </Button>
-                </FormItem>
-            </Form>
-        </div>
+        <!--<textarea id="text1" style="width:100%; height:200px;"></textarea>-->
+        <FormItem>
+          <Button type="primary" @click="discussSubmit">{{ $t("jyzx.common.sure") }}</Button>
+          <Button style="margin-left: 8px" @click="()=>{topicShow = false}">{{ $t("jyzx.common.cancel") }}
+          </Button>
+        </FormItem>
+      </Form>
     </div>
+  </div>
 </template>
 <script>
 import E from "wangeditor"
 export default {
-    data() {
-        return {
-            toType: ["1", "2"], //话题类型
-            formItem: {
-                input: "",
-            },
-            topicShow: false,
-            stemContent: "",
-            keyword: "",
-            showType: this.$t("jyzx.discuss.allTopic"),
-            topicnameId: '',
-            topicData:[]
-        }
-        },
-        created() {
-            this.getAlltrait()
-        },
-    methods: {
-        //发表话题
-        discussSubmit() {
-            console.log(this.topicnameId,'comid123456')
-            console.log(this.formItem.input, "标题")
-            console.log(this.stemContent, "内容")
-            var soureceType=''
-            var myDate = new Date().getTime()
-            var extime = new Date().getTime() + 1000 * 60 * 60 * 24 * 7
-            let user = this.$store.state.userInfo
-            var comID = this.topicnameId
-            if (this.topicnameId != '') {
-                this.soureceType = "ability"
-            } else {
-                this.soureceType ="normal"
-            }
-            this.$api.jyzx
-                .topicInitiate({
-                    comid: comID,
-                    source: this.soureceType,
-                    debate: {
-                        id: "",
-                        code: this.$store.state.userInfo.schoolCode,
-                        tmdid: user.TEAMModelId,
-                        tmdname: user.name,
-                        title: this.formItem.input,
-                        comment: this.stemContent,
-                        time: myDate,
-                        school: this.$store.state.userInfo.schoolCode,
-                        wordCount: 500,
-                        timeoutReply: false,
-                        comid:comID,
-                        expire: extime,
-                    },
-                })
-                .then(
-                    (res) => {
-                        this.$Message.success(this.$t("jyzx.discuss.success1"))
-                        console.log(res, "成功")
-                        this.topicShow = false
-                        this.$parent.$parent.totaltopic()
-                    },
-                    (error) => {
-                        this.$Message.error(this.$t("jyzx.discuss.error1"))
-                        console.log(error, "失败")
-                    }
-                )
-        },
-        // 筛选话题类型,1:普通话题,2:能力点话题
-        topicType(check) {
-            let allTopic = JSON.parse(localStorage.getItem("allTopic"))
-            if(check.length == 1) {
-                let arr = []
-                if(check.includes("2")) {
-                    allTopic.forEach(item => {
-                        if(item.relevance) {
-                            arr.push(item)
-                        }
-                    })
-                } else {
-                    allTopic.forEach(item => {
-                        if(!item.relevance) {
-                            arr.push(item)
-                        }
-                    })
-                }
-                this.$parent.$parent.discuss = arr
-            }
-            else if(check.length == 2) {
-                this.$parent.$parent.discuss = allTopic
-            }
-            else if(!check.length) {
-                this.$parent.$parent.discuss = []
-            }
-           
-        },
-        //关于我的
-        metopic(name) {
-            let allTopic = JSON.parse(localStorage.getItem("allTopic"))
-            console.log(allTopic[0].tmdid, "数据")
-            let user = this.$store.state.userInfo
-            let metopicinfo = []
-            let mereplyinfo = []
-            function sortNumber(a, b) {
-                return a.time - b.time
-            }
-            // 我的话题
-            if (name === "metopic") {
-                this.showType = this.$t("jyzx.discuss.myTopic")
-                for (var x = 0; x < allTopic.length; x++) {
-                    if (allTopic[x].tmdid === user.TEAMModelId) {
-                        metopicinfo.push(allTopic[x])
-                    }
-                }
-                metopicinfo.sort(sortNumber)
-                this.$parent.$parent.discuss = metopicinfo
-                this.$Message.success(this.$t("jyzx.discuss.message1"))
-                console.log(metopicinfo)
-            }
-            // 回复我的
-            else if (name === "mereply") {
-                this.showType = this.$t("jyzx.discuss.replyMe")
-                for (var y = 0; y < allTopic.length; y++) {
-                    if (
-                        allTopic[y].tmdid === user.TEAMModelId &&
-                        allTopic[y].replyCount !== 0
-                    ) {
-                        mereplyinfo.push(allTopic[y])
-                    }
-                }
-                mereplyinfo.reverse()
-                this.$parent.$parent.discuss = mereplyinfo
-                this.$Message.success(this.$t("jyzx.discuss.message2"))
+  data () {
+    return {
+      toType: ["1", "2"], //话题类型
+      formItem: {
+        input: "",
+      },
+      topicShow: false,
+      stemContent: "",
+      keyword: "",
+      showType: this.$t("jyzx.discuss.allTopic"),
+      topicnameId: '',
+      topicData: []
+    }
+  },
+  created () {
+    this.getAlltrait()
+  },
+  methods: {
+    //发表话题
+    discussSubmit () {
+      console.log(this.topicnameId, 'comid123456')
+      console.log(this.formItem.input, "标题")
+      console.log(this.stemContent, "内容")
+      var soureceType = ''
+      var myDate = new Date().getTime()
+      var extime = new Date().getTime() + 1000 * 60 * 60 * 24 * 7
+      let user = this.$store.state.userInfo
+      var comID = this.topicnameId
+      if (this.topicnameId != '') {
+        this.soureceType = "ability"
+      } else {
+        this.soureceType = "normal"
+      }
+      this.$api.jyzx
+        .topicInitiate({
+          comid: comID,
+          source: this.soureceType,
+          debate: {
+            id: "",
+            code: this.$store.state.userInfo.schoolCode,
+            tmdid: user.TEAMModelId,
+            tmdname: user.name,
+            title: this.formItem.input,
+            comment: this.stemContent,
+            time: myDate,
+            school: this.$store.state.userInfo.schoolCode,
+            wordCount: 500,
+            timeoutReply: false,
+            comid: comID,
+            expire: extime,
+          },
+        })
+        .then(
+          (res) => {
+            this.$Message.success(this.$t("jyzx.discuss.success1"))
+            console.log(res, "成功")
+            this.topicShow = false
+            this.$parent.$parent.totaltopic()
+          },
+          (error) => {
+            this.$Message.error(this.$t("jyzx.discuss.error1"))
+            console.log(error, "失败")
+          }
+        )
+    },
+    // 筛选话题类型,1:普通话题,2:能力点话题
+    topicType (check) {
+      let allTopic = JSON.parse(localStorage.getItem("allTopic"))
+      if (check.length == 1) {
+        let arr = []
+        if (check.includes("2")) {
+          allTopic.forEach(item => {
+            if (item.relevance) {
+              arr.push(item)
             }
-            // 所有话题
-            else if (name === "allTopic") {
-                this.showType = this.$t("jyzx.discuss.allTopic")
-                this.$parent.$parent.discuss = allTopic
+          })
+        } else {
+          allTopic.forEach(item => {
+            if (!item.relevance) {
+              arr.push(item)
             }
-        },
-        //所有话题
-        alltopics() {
-            let all = JSON.parse(localStorage.getItem("allTopic"))
-            this.$parent.$parent.discuss = all
-        },
-        //搜索关键字
-        searchKeyword() {
-            let all = JSON.parse(localStorage.getItem("allTopic"))
-            let key = this.keyword
-            console.log(key)
-            let keywordData = []
-            for (var k = 0; k < all.length; k++) {
-                if (
-                    all[k].comment.indexOf(key) > -1 ||
-                    all[k].title.indexOf(key) > -1
-                ) {
-                    keywordData.push(all[k])
-                }
-            }
-            console.log(keywordData)
-            this.$parent.$parent.discuss = keywordData
-        },
-        //获取所有能力点
-        getAlltrait() {
-            this.$api.jyzx.getAlltrait(
-                {
-                    "code": this.$store.state.userInfo.schoolCode,
-                    "scope": "school",
-                    "dimension": "",
-                    "standard": sessionStorage.getItem('standard'),
-                    "status":1
-                }
-            ).then(
-                res => {
-                    this.topicData = res.abilities
-                    console.log(this.topicData)
-                    localStorage.setItem('trait', JSON.stringify(this.topicData))
-                },
-                error => {
+          })
+        }
+        this.$parent.$parent.discuss = arr
+      }
+      else if (check.length == 2) {
+        this.$parent.$parent.discuss = allTopic
+      }
+      else if (!check.length) {
+        this.$parent.$parent.discuss = []
+      }
 
-                }
-            )
-        },
-        comidTopic(res) {
-            this.topicnameId=res
-        },
     },
+    //关于我的
+    metopic (name) {
+      let allTopic = JSON.parse(localStorage.getItem("allTopic"))
+      console.log(allTopic[0].tmdid, "数据")
+      let user = this.$store.state.userInfo
+      let metopicinfo = []
+      let mereplyinfo = []
+      function sortNumber (a, b) {
+        return a.time - b.time
+      }
+      // 我的话题
+      if (name === "metopic") {
+        this.showType = this.$t("jyzx.discuss.myTopic")
+        for (var x = 0; x < allTopic.length; x++) {
+          if (allTopic[x].tmdid === user.TEAMModelId) {
+            metopicinfo.push(allTopic[x])
+          }
+        }
+        metopicinfo.sort(sortNumber)
+        this.$parent.$parent.discuss = metopicinfo
+        this.$Message.success(this.$t("jyzx.discuss.message1"))
+        console.log(metopicinfo)
+      }
+      // 回复我的
+      else if (name === "mereply") {
+        this.showType = this.$t("jyzx.discuss.replyMe")
+        for (var y = 0; y < allTopic.length; y++) {
+          if (
+            allTopic[y].tmdid === user.TEAMModelId &&
+            allTopic[y].replyCount !== 0
+          ) {
+            mereplyinfo.push(allTopic[y])
+          }
+        }
+        mereplyinfo.reverse()
+        this.$parent.$parent.discuss = mereplyinfo
+        this.$Message.success(this.$t("jyzx.discuss.message2"))
+      }
+      // 所有话题
+      else if (name === "allTopic") {
+        this.showType = this.$t("jyzx.discuss.allTopic")
+        this.$parent.$parent.discuss = allTopic
+      }
+    },
+    //所有话题
+    alltopics () {
+      let all = JSON.parse(localStorage.getItem("allTopic"))
+      this.$parent.$parent.discuss = all
+    },
+    //搜索关键字
+    searchKeyword () {
+      let all = JSON.parse(localStorage.getItem("allTopic"))
+      let key = this.keyword
+      console.log(key)
+      let keywordData = []
+      for (var k = 0; k < all.length; k++) {
+        if (
+          all[k].comment.indexOf(key) > -1 ||
+          all[k].title.indexOf(key) > -1
+        ) {
+          keywordData.push(all[k])
+        }
+      }
+      console.log(keywordData)
+      this.$parent.$parent.discuss = keywordData
+    },
+    //获取所有能力点
+    getAlltrait () {
+      this.$api.jyzx.getAlltrait(
+        {
+          "code": this.$store.state.userInfo.schoolCode,
+          "scope": "school",
+          "dimension": "",
+          "standard": sessionStorage.getItem('standard'),
+          "status": 1
+        }
+      ).then(
+        res => {
+          this.topicData = res.abilities
+          console.log(this.topicData)
+          localStorage.setItem('trait', JSON.stringify(this.topicData))
+        },
+        error => {
 
-    mounted() {
-        let stemEditor = new E("#div1")
-        stemEditor.config.onchange = (html) => {
-            this.stemContent = html
         }
-        stemEditor.config.uploadImgShowBase64 = true
-        stemEditor.config.zIndex = 500
-        stemEditor.create()
+      )
+    },
+    comidTopic (res) {
+      this.topicnameId = res
     },
+  },
+
+  mounted () {
+    let stemEditor = new E("#div1")
+    stemEditor.config.onchange = (html) => {
+      this.stemContent = html
+    }
+    stemEditor.config.uploadImgShowBase64 = true
+    stemEditor.config.zIndex = 500
+    this.$editorTools.initMyEditor(stemEditor, this)
+    stemEditor.create()
+  },
 }
 </script>
 <style lang="less" scoped>
 .topicbox {
-    width: 100%;
-    /* height:100%; */
+  width: 100%;
+  /* height:100%; */
 }
 .statementBox .w-e-text-container {
-    z-index: 1 !important;
+  z-index: 1 !important;
 }
 .statementBox .w-e-toolbar {
-    z-index: 1 !important;
+  z-index: 1 !important;
 }
 .topicheader {
-    /* width: 90%; */
-    height: 55px;
-    /* margin: 0% 5%; */
-    border-bottom: 1px solid #ccc;
+  /* width: 90%; */
+  height: 55px;
+  /* margin: 0% 5%; */
+  border-bottom: 1px solid #ccc;
 }
 
 .headerleft {
-    width: 48%;
-    float: left;
-    // padding: 1% 0% 1% 2%;
-    padding-left: 2%;
-    display: flex;
-    // justify-content: flex-end;
-    align-items: center;
+  width: 48%;
+  float: left;
+  // padding: 1% 0% 1% 2%;
+  padding-left: 2%;
+  display: flex;
+  // justify-content: flex-end;
+  align-items: center;
 }
 
 .totalbox {
-    /* width:15%; */
-    font-size: 20px;
-    float: left;
+  /* width:15%; */
+  font-size: 20px;
+  float: left;
 }
 .taginfo {
-    display: flex;
-    align-items: center;
-    // margin-left: 4%;
+  display: flex;
+  align-items: center;
+  // margin-left: 4%;
 
-    .ivu-checkbox{
-        display: none;
-    }
+  .ivu-checkbox {
+    display: none;
+  }
 
-    .ivu-checkbox-wrapper-checked.ivu-checkbox-border{
-        background-color: #16C18E;
-        border-color: #16C18E;
-        color: #fff;
-    }
+  .ivu-checkbox-wrapper-checked.ivu-checkbox-border {
+    background-color: #16c18e;
+    border-color: #16c18e;
+    color: #fff;
+  }
 
-    .ivu-checkbox-border{
-        border: none;
-    }
+  .ivu-checkbox-border {
+    border: none;
+  }
 }
 #statementBox {
-    margin: 1%;
+  margin: 1%;
 }
 
 .searchbox {
-    width: 50%;
-    /* float: left; */
-    padding: 0% 2%;
-    display: inline-block;
-    // margin-top: 10px;
+  width: 50%;
+  /* float: left; */
+  padding: 0% 2%;
+  display: inline-block;
+  // margin-top: 10px;
 }
 
 .headerright {
-    width: 45%;
-    float: right;
-    padding: 0.5% 2% 1% 2%;
-    // text-align: right;
-    display: flex;
-    justify-content: flex-end;
-    align-items: center;
+  width: 45%;
+  float: right;
+  padding: 0.5% 2% 1% 2%;
+  // text-align: right;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
 }
 
 .aboutme {
-    /* width: 60%; */
-    /* display: inline-block;
+  /* width: 60%; */
+  /* display: inline-block;
     line-height: 40px; */
-    line-height: 48px;
-    // float: right;
-    padding-left: 2%;
+  line-height: 48px;
+  // float: right;
+  padding-left: 2%;
 
-    .ivu-dropdown{
-        cursor: pointer;
-    }
+  .ivu-dropdown {
+    cursor: pointer;
+  }
 }
 
 .topicbtn {
-    width: 15%;
-    // float: right;
+  width: 15%;
+  // float: right;
 }
 
 .ivu-btn-circle {
-    font-size: 27px !important;
+  font-size: 27px !important;
 }
 
 .statementBox {
-    width: 90%;
-    padding: 1%;
-    margin: 0% 3%;
+  width: 90%;
+  padding: 1%;
+  margin: 0% 3%;
 }
 
 .addfile,
 .addimage {
-    float: left;
-    margin: 0% 1% 0% 0%;
+  float: left;
+  margin: 0% 1% 0% 0%;
 }
 </style>
 <style lang="less">
 .taginfo {
-
-    .ivu-checkbox{
-        display: none;
-    }
+  .ivu-checkbox {
+    display: none;
+  }
 }
 </style>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/teachcontent/index.vue

@@ -1267,7 +1267,7 @@ export default {
       if (this.routerScope == 'school') {
         return this.SCHOOL_SPACE * 1024 * 1024 * 1024 - this.teachSpace - (this.sizeInfo.total || 0)
       } else {
-        return this.PRIVATE_SPACE * 1024 * 1024 * 1024
+        return this.PRIVATE_SPACE * 1024 * 1024 * 1024 - (this.sizeInfo?.total || 0)
       }
     },
     /* 判断是否为国际站 */

+ 2 - 1
TEAMModelOS/ClientApp/src/view/user/BandPhone.vue

@@ -151,9 +151,9 @@ export default {
          * 2. 三方登录(微信)绑定
          */
         bandphone() {
+            this.loading = true
             this.$refs['sendForm'].validate((valid) => {
                 if (valid) {
-                    this.loading = true
                     //研修中心账号绑定 TODO 账号绑定操作
                     if (this.routerData.loginType && this.routerData.loginType == 'trainsso') {
                         this.bandTrain()
@@ -163,6 +163,7 @@ export default {
                         this.bandWeChat()
                     }
                 } else {
+                    this.loading = false
                     this.$Message.error(this.$t('login.fullinfo'))
                 }
             })

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 593 - 602
TEAMModelOS/ClientApp/src/view/video/VideoReview.vue