소스 검색

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

zhouj1203@hotmail.com 3 년 전
부모
커밋
05d59fb712
24개의 변경된 파일1049개의 추가작업 그리고 281개의 파일을 삭제
  1. 1 1
      TEAMModelBI/ClientApp/public/index.html
  2. 175 7
      TEAMModelBI/ClientApp/src/view/index/operateLog.vue
  3. 1 1
      TEAMModelBI/ClientApp/src/view/teachermanage/areamanage.vue
  4. 1 1
      TEAMModelBI/ClientApp/src/view/teachermanage/manage.vue
  5. 1 1
      TEAMModelBI/ClientApp/src/view/teachermanage/traitmanage.vue
  6. 0 125
      TEAMModelBI/Controllers/Activity/ActivitySticsController.cs
  7. 240 0
      TEAMModelBI/Controllers/Census/ActivitySticsController.cs
  8. 77 4
      TEAMModelBI/Controllers/Lesson/LessonSticsController.cs
  9. 190 0
      TEAMModelBI/Controllers/Census/PaperController.cs
  10. 10 1
      TEAMModelOS/ClientApp/src/api/schoolSetting.js
  11. 1 1
      TEAMModelOS/ClientApp/src/common/BasePreviewFile.vue
  12. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/en-US/researchCenter.js
  13. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/researchCenter.js
  14. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/researchCenter.js
  15. 1 1
      TEAMModelOS/ClientApp/src/router/routes.js
  16. 1 1
      TEAMModelOS/ClientApp/src/view/evaluation/index/CreatePaper.vue
  17. 17 7
      TEAMModelOS/ClientApp/src/view/homepage/HomePage.less
  18. 98 80
      TEAMModelOS/ClientApp/src/view/homepage/HomePage.vue
  19. 142 27
      TEAMModelOS/ClientApp/src/view/mgtPlatform/MgtPlatform.vue
  20. 23 2
      TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less
  21. 22 9
      TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue
  22. 2 2
      TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue
  23. 14 2
      TEAMModelOS/ClientApp/src/view/teachCenter/TeaResCenter.less
  24. 29 8
      TEAMModelOS/ClientApp/src/view/teachCenter/TeaResCenter.vue

+ 1 - 1
TEAMModelBI/ClientApp/public/index.html

@@ -11,7 +11,7 @@
     </title>
 </head>
 <script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
-<script src="https://at.alicdn.com/t/font_2934132_jamkq43te8b.js"></script>
+<script src="https://at.alicdn.com/t/font_2934132_93b96cu3q3k.js"></script>
 
 <body>
     <noscript>

+ 175 - 7
TEAMModelBI/ClientApp/src/view/index/operateLog.vue

@@ -4,14 +4,57 @@
             <div class="exportFile">
                 <el-button type="primary" size="small" @click="exportExcel">导出日志文件</el-button>
             </div>
-            <div class="block">
-                <span class="demonstration">日期:</span>
-                <el-date-picker v-model="times" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" clearable @change='timeChange' format="YYYY/MM/DD" value-format="x">
-                </el-date-picker>
+            <div class="iconGroup" v-show="models==='default'">
+                <div v-for="item in iconGroups" :key="item.id" :title="item.title" @click="models=item.models" @blur="models='default'" class="log-icons">
+                    <svg class="logicon" aria-hidden="true">
+                        <use :xlink:href="item.icon"></use>
+                    </svg>
+                </div>
+            </div>
+            <div class="block" v-if="models==='time'">
+                <div class="block-title"><span class="demonstration">日期:</span></div>
+                <div class="block-content">
+                    <el-date-picker v-model="times" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" clearable @change='timeChange' format="YYYY/MM/DD" value-format="x">
+                    </el-date-picker>
+                </div>
+                <div class="close-icon" @click="models='default'">
+                    <svg class="closelog-icon" aria-hidden="true">
+                        <use xlink:href="#icon-cuowuguanbiquxiao-yuankuang"></use>
+                    </svg>
+                </div>
+            </div>
+            <div class="block" v-else-if="models==='select'">
+                <div class="block-title"><span class="demonstration">平台:</span></div>
+                <div class="block-content">
+                    <el-checkbox-group v-model="cities.citiesValue" size="default" @change="changePlatform">
+                        <el-checkbox-button v-for="city in cities.data" :key="city" :label="city">{{city}}</el-checkbox-button>
+                    </el-checkbox-group>
+                </div>
+                <div class="close-icon" @click="models='default'">
+                    <svg class="closelog-icon" aria-hidden="true">
+                        <use xlink:href="#icon-cuowuguanbiquxiao-yuankuang"></use>
+                    </svg>
+                </div>
+            </div>
+            <div class="block" v-else-if="models==='search'">
+                <div class="block-search">
+                    <el-input placeholder="请输入姓名/tmdID" prefix-icon="el-icon-search" v-model="searchKey" @change="searchkeyword">
+                    </el-input>
+                    <i class="iclosebtn" @click="searchClear">
+                        <svg class="Abilityicon" aria-hidden="true">
+                            <use xlink:href="#icon-guanbi-quxiao-guanbi"></use>
+                        </svg>
+                    </i>
+                </div>
+                <div class="close-icon" @click="models='default'">
+                    <svg class="closelog-icon-repetition" aria-hidden="true">
+                        <use xlink:href="#icon-cuowuguanbiquxiao-yuankuang"></use>
+                    </svg>
+                </div>
             </div>
         </div>
         <div class="recordbox">
-            <el-table ref="multipleTableRef" :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
+            <el-table ref="multipleTableRef" :data="tableData" style="width: 100%" @selection-change="handleSelectionChange" empty-text='暂无数据'>
                 <el-table-column prop="index" label="编号" sortable align="center" />
                 <el-table-column property="name" label="操作人姓名" align="center" />
                 <el-table-column property="tmdId" label="tmdId" align="center" />
@@ -26,12 +69,24 @@
 </template>
 <script>
 import { getCurrentInstance, ref } from 'vue'
+import { Search } from '@element-plus/icons-vue'
 export default {
     setup() {
         let { proxy } = getCurrentInstance()
         let tableData = ref([])
         let originalData = ref([])
         let times = ref('')
+        let cities = ref({
+            data: ['BI', 'IES'],
+            citiesValue: ['BI', 'IES'],
+        })
+        let searchKey = ref('')
+        let models = ref('default')
+        let iconGroups = ref([
+            { id: 1, title: '平台选择', icon: '#icon-fenlei', models: 'select' },
+            { id: 2, title: '搜索', icon: '#icon-chaxun', models: 'search' },
+            { id: 3, title: '时间日期选择', icon: '#icon-riqi', models: 'time' },
+        ])
         //获取所有日志内容
         function getLogcontent(startDate, endDate, platform, model) {
             console.log(startDate, endDate, platform, model, '接收的内容')
@@ -63,13 +118,52 @@ export default {
         //日期选择
         function timeChange(val) {
             console.log(val, '时间发生变化')
+            if (!val) {
+                tableData.value = originalData.value
+                return
+            }
             let starTime = ''
             let endTime = ''
             val[0] && val[1] ? ((starTime = val[0]), (endTime = val[1]), getLogcontent(starTime, endTime)) : val === null ? (tableData.value = originalData.value) : ''
             console.log(starTime, endTime, '时间')
         }
+        //平台选择
+        function changePlatform(val) {
+            console.log(val)
+            let presentData = val
+            let filterDatas = []
+            presentData.forEach((item) => {
+                let name = item
+                originalData.value.forEach((items) => {
+                    items.platform === name ? filterDatas.push(items) : ''
+                })
+            })
+            filterDatas.sort(function (a, b) {
+                return a.index - b.index
+            })
+            tableData.value = filterDatas
+        }
+        //搜索
+        function searchkeyword(value) {
+            console.log(value)
+            if (value === '' || value === null || value === undefined) {
+                tableData.value = originalData.value
+                return
+            }
+            let key = value
+            let newdata = originalData.value.filter((item) => {
+                return item.name === key || item.tmdId === key
+            })
+            console.log(newdata, '新数据')
+            tableData.value = newdata
+        }
+        //搜索清除
+        function searchClear() {
+            tableData.value = originalData.value
+            searchKey.value = ''
+        }
         getLogcontent('', '', '', 'init')
-        return { tableData, getLogcontent, exportExcel, times, timeChange }
+        return { tableData, getLogcontent, exportExcel, times, timeChange, cities, changePlatform, Search, searchKey, models, iconGroups, searchkeyword, searchClear }
     },
 }
 </script>
@@ -81,7 +175,7 @@ export default {
 .topbox {
     text-align: left;
     padding-left: 1%;
-    line-height: 20px;
+    line-height: 48px;
     display: flex;
     justify-content: space-between;
 }
@@ -90,8 +184,82 @@ export default {
     padding: 1%;
 }
 .block {
+    display: flex;
     margin-right: 1%;
 }
+.iconGroup {
+    display: flex;
+    margin-right: 2%;
+}
+.block-title {
+    /* margin-top: 2.5%; */
+    line-height: 40px;
+}
+.block-content {
+    line-height: 0px;
+}
+.close-icon {
+    line-height: 20px;
+}
+.block-title,
+.block-content,
+.log-icons,
+.close-icon {
+    display: inline-block;
+}
+.log-icons {
+    line-height: 25px;
+}
+.block-search {
+    width: 100%;
+    position: relative;
+}
+.logicon {
+    width: 1.8em;
+    height: 1.8em;
+    vertical-align: -1em;
+    fill: currentColor;
+    overflow: hidden;
+    margin-right: 5px;
+}
+.iconGroup div {
+    margin-right: 6%;
+}
+.iconGroup div:hover,
+.closelog-icon:hover {
+    cursor: pointer;
+}
+.closelog-icon {
+    width: 1.2em;
+    height: 1.2em;
+    vertical-align: -0.9em;
+    fill: currentColor;
+    overflow: hidden;
+    margin-left: 5px;
+}
+.Abilityicon {
+    width: 1em;
+    height: 1em;
+    vertical-align: -0.3em;
+    fill: currentColor;
+    overflow: hidden;
+}
+.iclosebtn {
+    bottom: 2px;
+    position: absolute;
+    right: 5px;
+}
+.iclosebtn:hover {
+    cursor: pointer;
+}
+.closelog-icon-repetition {
+    width: 1.2em;
+    height: 1.2em;
+    vertical-align: -1.2em;
+    fill: currentColor;
+    overflow: hidden;
+    margin-left: 5px;
+}
 </style>
 <style>
 .recordbox .el-table--fit {

+ 1 - 1
TEAMModelBI/ClientApp/src/view/teachermanage/areamanage.vue

@@ -47,7 +47,7 @@
             </div>
         </div>
         <div class="traitfrom">
-            <el-table :data="optionData" style="width: 100%" :highlight-current-row="true" height="74vh" v-loading="loading">
+            <el-table :data="optionData" style="width: 100%" :highlight-current-row="true" height="74vh" v-loading="loading" empty-text='暂无数据'>
                 <el-table-column prop="index" label="编号" type=index sortable align="center" />
                 <el-table-column prop="name" label="名称" align="center" />
                 <el-table-column prop="id" label="ID编码" align="center" />

+ 1 - 1
TEAMModelBI/ClientApp/src/view/teachermanage/manage.vue

@@ -14,7 +14,7 @@
         </el-button>
     </div>
     <div class="manage-table">
-        <el-table :data="tableData.value" style="width: 100%" height="80vh" v-loading="loading" element-loading-text="Loading..." class="customer-table">
+        <el-table :data="tableData.value" style="width: 100%" height="80vh" v-loading="loading" element-loading-text="Loading..." class="customer-table" empty-text='暂无数据'>
             <el-table-column prop="id" label="编号" sortable align="center" />
             <el-table-column label="头像" align="center">
                 <template #default="scope">

+ 1 - 1
TEAMModelBI/ClientApp/src/view/teachermanage/traitmanage.vue

@@ -22,7 +22,7 @@
                     </div>
                 </el-tab-pane>
                 <el-tab-pane label="方案列表">
-                    <el-table :data="abilityProject" :highlight-current-row="true" style="width: 100%">
+                    <el-table :data="abilityProject" :highlight-current-row="true" style="width: 100%" empty-text='暂无数据'>
                         <el-table-column prop="index" label="编号" type=index width="180" align="center" />
                         <el-table-column prop="standardName" label="方案名称" width="260" align="center" />
                         <el-table-column prop="name" label="来源" align="center" />

+ 0 - 125
TEAMModelBI/Controllers/Activity/ActivitySticsController.cs

@@ -1,125 +0,0 @@
-using Azure.Cosmos;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Options;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using TEAMModelOS.Models;
-using TEAMModelOS.SDK.DI;
-using TEAMModelOS.SDK.Models;
-using System.Text.Json;
-
-namespace TEAMModelBI.Controllers.Activity
-{
-    [Route("activity")]
-    [ApiController]
-    public class ActivitySticsController : ControllerBase
-    {
-        private readonly AzureCosmosFactory _azureCosmos;
-        private readonly AzureStorageFactory _azureStorage;
-        private readonly DingDing _dingDing;
-        private readonly Option _option;
-        public readonly List<string> types = new List<string> { "Exam", "Survey", "Vote", "Homework" };
-
-        public ActivitySticsController(AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, DingDing dingDing, IOptionsSnapshot<Option> option)
-        {
-            _azureCosmos = azureCosmos;
-            _dingDing = dingDing;
-            _azureStorage = azureStorage;
-            _option = option?.Value;
-        }
-
-        /// <summary>
-        /// 统计所有的评量活动,问卷调查,投票活动,作业
-        /// </summary>
-        /// <returns></returns>
-        [HttpPost("get-allactivity")]
-        public async Task<IActionResult> GetAllActivity() 
-        {
-            try
-            {
-                var cosmosClient = _azureCosmos.GetCosmosClient();
-                List<KeyValuePair<string, int>> typeCount = new List<KeyValuePair<string, int>>();
-                foreach (var type in types)
-                {
-                    int acount = 0;
-                    string querySql = $"SELECT distinct c.id,c.code,c.name,c.pk FROM c where c.pk='{type}'  ";
-                    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: querySql, requestOptions: new QueryRequestOptions() { }))
-                    {
-                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
-                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0) 
-                        {
-                            acount += count.GetInt32();
-                            //foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
-                            //{
-                            //    acount += 1;
-                            //}
-                        }
-                    }
-
-                    KeyValuePair<string, int> valuePair = new KeyValuePair<string, int>(type, acount);
-                    typeCount.Add(valuePair);
-                }
-
-                return Ok(new { state = 200, typeCount });
-            }
-            catch (Exception ex)
-            {
-                await _dingDing.SendBotMsg($"BI,{_option.Location} /activity/get-allactivity  \n {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
-                return BadRequest();
-            }
-        }
-
-        /// <summary>
-        /// 统计顾问关联的学校活动数量:评测、问卷、投票
-        /// </summary>
-        /// <param name="jsonElement"></param>
-        /// <returns></returns>
-        [HttpPost("get-assistactivity")]
-        public async Task<IActionResult> GetAssistSchoolActivity(JsonElement jsonElement) 
-        {
-            if (!jsonElement.TryGetProperty("tmdId", out JsonElement tmdId)) return BadRequest();
-            var cosmosClient = _azureCosmos.GetCosmosClient();
-            List<string> schoolIds = new List<string>();
-
-            string schoolSql = $"SELECT DISTINCT REPLACE(c.code,'Teacher-','') AS schoolId,c.code,c.roles,c.id,c.name From c where ARRAY_CONTAINS(c.roles,'assist',true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.id='{tmdId}'";
-
-            await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText:schoolSql,requestOptions:new QueryRequestOptions() { }))
-            {
-                using var json = await JsonDocument.ParseAsync(item.ContentStream);
-                foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray()) 
-                {
-                    schoolIds.Add(obj.GetProperty("schoolId").GetString());
-                }
-            }
-            List<KeyValuePair<string, int>> typeCount = new List<KeyValuePair<string, int>>();
-            foreach (var type in types)
-            {
-                int acount = 0;
-                foreach (var itemId in schoolIds)
-                {
-                    string activitySql = $"SELECT DISTINCT c.id,c.code,c.name FROM c WHERE c.pk='{type}' AND c.school='{itemId}'";
-                    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: activitySql, requestOptions: new QueryRequestOptions() { }))
-                    {
-                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
-                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
-                        {
-                            acount += count.GetInt32();
-                            //foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
-                            //{
-                            //    acount += 1;
-                            //}
-                        }
-                    }
-                }
-
-                KeyValuePair<string, int> valuePair = new KeyValuePair<string, int>(type, acount);
-                typeCount.Add(valuePair);
-            }
-
-            return Ok(new { state = 200, typeCount });
-        }
-    }
-}

+ 240 - 0
TEAMModelBI/Controllers/Census/ActivitySticsController.cs

@@ -0,0 +1,240 @@
+using Azure.Cosmos;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Options;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using TEAMModelOS.Models;
+using TEAMModelOS.SDK.DI;
+using TEAMModelOS.SDK.Models;
+using System.Text.Json;
+
+namespace TEAMModelBI.Controllers.Census
+{
+    [Route("activity")]
+    [ApiController]
+    public class ActivitySticsController : ControllerBase
+    {
+        private readonly AzureCosmosFactory _azureCosmos;
+        private readonly AzureStorageFactory _azureStorage;
+        private readonly DingDing _dingDing;
+        private readonly Option _option;
+        public readonly List<string> types = new List<string> { "Exam", "Survey", "Vote", "Homework" };
+
+        public ActivitySticsController(AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, DingDing dingDing, IOptionsSnapshot<Option> option)
+        {
+            _azureCosmos = azureCosmos;
+            _dingDing = dingDing;
+            _azureStorage = azureStorage;
+            _option = option?.Value;
+        }
+
+        /// <summary>
+        /// 统计活动 传醍摩豆则查询相关的学校活动
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [ProducesDefaultResponseType]
+        [HttpPost("get-count")]
+        public async Task<IActionResult> GetCount(JsonElement jsonElement) 
+        {
+            jsonElement.TryGetProperty("tmdId", out JsonElement tmdId);
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            List<KeyValuePair<string, object>> typeCount = new List<KeyValuePair<string, object>>();
+
+            if (!string.IsNullOrEmpty($"{tmdId}"))
+            {
+                List<string> schoolIds = new List<string>();
+                string schoolSql = $"SELECT DISTINCT REPLACE(c.code,'Teacher-','') AS schoolId,c.code,c.roles,c.id,c.name From c where ARRAY_CONTAINS(c.roles,'assist',true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.id='{tmdId}'";
+
+                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: schoolSql, requestOptions: new QueryRequestOptions() { }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                    {
+                        schoolIds.Add(obj.GetProperty("schoolId").GetString());
+                    }
+                }
+
+                foreach (var type in types)
+                {
+                    long acount = 0;
+                    List<SchoolActivity> schoolActivities = new List<SchoolActivity>();
+                    foreach (var itemId in schoolIds)
+                    {
+                        School school = new();
+                        try
+                        {
+                            school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>(itemId, new PartitionKey("Base"));
+                        }
+                        catch
+                        {
+                        }
+
+                        SchoolActivity schoolActivity = new SchoolActivity() { id = itemId, name = school.name != null ? school.name : itemId };
+
+                        string activitySql = $"SELECT DISTINCT c.id,c.code,c.name FROM c WHERE c.pk='{type}' AND c.school='{itemId}'";
+                        await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: activitySql, requestOptions: new QueryRequestOptions() { }))
+                        {
+                            using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                            if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
+                            {
+                                acount += count.GetInt32();
+                                schoolActivity.total += count.GetInt64();
+                                //foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                                //{
+                                //    acount += 1;
+                                //}
+                            }
+                        }
+                        schoolActivities.Add(schoolActivity);
+                    }
+
+                    KeyValuePair<string, object> valuePair = new KeyValuePair<string, object>(type, schoolActivities);
+                    typeCount.Add(valuePair);
+                }
+            }
+            else 
+            {
+                foreach (var type in types)
+                {
+                    int acount = 0;
+                    string querySql = $"SELECT distinct c.id,c.code,c.name,c.pk FROM c where c.pk='{type}'  ";
+                    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: querySql, requestOptions: new QueryRequestOptions() { }))
+                    {
+                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0)
+                        {
+                            acount += count.GetInt32();
+                            //foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                            //{
+                            //    acount += 1;
+                            //}
+                        }
+                    }
+
+                    KeyValuePair<string, object> valuePair = new KeyValuePair<string, object>(type, acount);
+                    typeCount.Add(valuePair);
+                }
+            }
+
+            return Ok(new { state = 200, typeCount });
+        }
+
+        /// <summary>
+        /// 统计所有的评量活动,问卷调查,投票活动,作业
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("get-allactivity")]
+        public async Task<IActionResult> GetAllActivity() 
+        {
+            try
+            {
+                var cosmosClient = _azureCosmos.GetCosmosClient();
+                List<KeyValuePair<string, int>> typeCount = new List<KeyValuePair<string, int>>();
+                foreach (var type in types)
+                {
+                    int acount = 0;
+                    string querySql = $"SELECT distinct c.id,c.code,c.name,c.pk FROM c where c.pk='{type}'  ";
+                    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: querySql, requestOptions: new QueryRequestOptions() { }))
+                    {
+                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0) 
+                        {
+                            acount += count.GetInt32();
+                            //foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                            //{
+                            //    acount += 1;
+                            //}
+                        }
+                    }
+
+                    KeyValuePair<string, int> valuePair = new KeyValuePair<string, int>(type, acount);
+                    typeCount.Add(valuePair);
+                }
+
+                return Ok(new { state = 200, typeCount });
+            }
+            catch (Exception ex)
+            {
+                await _dingDing.SendBotMsg($"BI,{_option.Location} /activity/get-allactivity  \n {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
+                return BadRequest();
+            }
+        }
+
+        /// <summary>
+        /// 统计顾问关联的学校活动数量:评测、问卷、投票、作业
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [ProducesDefaultResponseType]
+        [HttpPost("get-assistactivity")]
+        public async Task<IActionResult> GetAssistSchoolActivity(JsonElement jsonElement) 
+        {
+            if (!jsonElement.TryGetProperty("tmdId", out JsonElement tmdId)) return BadRequest();
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            List<string> schoolIds = new List<string>();
+
+            string schoolSql = $"SELECT DISTINCT REPLACE(c.code,'Teacher-','') AS schoolId,c.code,c.roles,c.id,c.name From c where ARRAY_CONTAINS(c.roles,'assist',true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.id='{tmdId}'";
+
+            await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText:schoolSql,requestOptions:new QueryRequestOptions() { }))
+            {
+                using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray()) 
+                {
+                    schoolIds.Add(obj.GetProperty("schoolId").GetString());
+                }
+            }
+            List<KeyValuePair<string, object>> typeCount = new List<KeyValuePair<string, object>>();
+            foreach (var type in types)
+            {
+                long acount = 0;
+                List<SchoolActivity> schoolActivities = new List<SchoolActivity>();
+                foreach (var itemId in schoolIds)
+                {
+                    School school = new();
+                    try
+                    {
+                        school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>(itemId, new PartitionKey("Base"));
+                    }
+                    catch 
+                    {
+                    }
+
+                    SchoolActivity schoolActivity = new SchoolActivity() { id = itemId, name = school.name != null ? school.name : itemId };
+
+                    string activitySql = $"SELECT DISTINCT c.id,c.code,c.name FROM c WHERE c.pk='{type}' AND c.school='{itemId}'";
+                    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: activitySql, requestOptions: new QueryRequestOptions() { }))
+                    {
+                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
+                        {
+                            acount += count.GetInt32();
+                            schoolActivity.total += count.GetInt64();
+                            //foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                            //{
+                            //    acount += 1;
+                            //}
+                        }
+                    }
+                    schoolActivities.Add(schoolActivity);
+                }
+
+                KeyValuePair<string, object> valuePair = new KeyValuePair<string, object>(type, schoolActivities);
+                typeCount.Add(valuePair);
+            }
+
+            return Ok(new { state = 200, typeCount });
+        }
+
+        public record SchoolActivity 
+        {
+            public string id { get; set; }
+            public string name { get; set; }
+
+            public long total { get; set; }
+        }
+    }
+}

+ 77 - 4
TEAMModelBI/Controllers/Lesson/LessonSticsController.cs

@@ -12,7 +12,7 @@ using System.Text.Json;
 using TEAMModelOS.SDK.Models.Cosmos.Common;
 using TEAMModelOS.SDK.Models;
 
-namespace TEAMModelBI.Controllers.Lesson
+namespace TEAMModelBI.Controllers.Census
 {
     [Route("lesson")]
     [ApiController]
@@ -33,7 +33,81 @@ namespace TEAMModelBI.Controllers.Lesson
         }
 
         /// <summary>
-        /// 统计课例数量
+        /// 查询课例数量
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [HttpPost("get-count")]
+        public async Task<IActionResult> GetCount(JsonElement jsonElement)
+        {
+            jsonElement.TryGetProperty("tmdId", out JsonElement tmdId);
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            object total = new object();
+            if (!string.IsNullOrEmpty($"{tmdId}"))
+            {
+                List<SchoolLen> schoolLens = new List<SchoolLen>();
+
+                List<string> schoolIds = new List<string>();
+
+                string schoolSql = $"SELECT DISTINCT REPLACE(c.code,'Teacher-','') AS schoolId,c.code,c.roles,c.id,c.name From c where ARRAY_CONTAINS(c.roles,'assist',true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.id='{tmdId}'";
+
+                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: schoolSql, requestOptions: new QueryRequestOptions() { }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                    {
+                        schoolIds.Add(obj.GetProperty("schoolId").GetString());
+                    }
+                }
+
+                foreach (var itemId in schoolIds)
+                {
+                    SchoolLen schoolLen = new SchoolLen() { id = itemId };
+                    School school = new();
+                    try
+                    {
+                        school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>(itemId, new PartitionKey("Base"));
+                    }
+                    catch
+                    {
+                    }
+                    schoolLen.name = school != null ? school.name : itemId;
+
+                    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: "SELECT DISTINCT c.id,c.code,c.name FROM c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"LessonRecord-{itemId}") }))
+                    {
+                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0)
+                        {
+                            schoolLen.total += count.GetInt32();
+                        }
+                    }
+
+                    schoolLens.Add(schoolLen);
+                }
+                total = schoolLens;
+            }
+            else 
+            {
+
+                string lessonSql = $"select c.id,c.tmid,c.scope from c where c.pk='LessonRecord'";
+                int tempTotal = 0;
+                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: lessonSql, requestOptions: new QueryRequestOptions() { }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0)
+                    {
+                        tempTotal = count.GetInt32();
+                    }
+                }
+                total = tempTotal;
+
+            }
+
+            return Ok(new { state = 200, total });
+        }
+
+        /// <summary>
+        /// 统计所有课例数量
         /// </summary>
         /// <returns></returns>
         [HttpPost("get-total")]
@@ -41,7 +115,6 @@ namespace TEAMModelBI.Controllers.Lesson
         {
             try
             {
-                List<string> schoolIds = new List<string>();
                 var cosmosClient = _azureCosmos.GetCosmosClient();
                 string lessonSql = $"select c.id,c.tmid,c.scope from c where c.pk='LessonRecord'";
                 int total = 0;
@@ -109,7 +182,7 @@ namespace TEAMModelBI.Controllers.Lesson
                         using var json = await JsonDocument.ParseAsync(item.ContentStream);
                         if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0)
                         {
-                            schoolLen.total = count.GetInt32();
+                            schoolLen.total += count.GetInt32();
                         }
                     }
 

+ 190 - 0
TEAMModelBI/Controllers/Census/PaperController.cs

@@ -0,0 +1,190 @@
+using Azure.Cosmos;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Options;
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Threading.Tasks;
+using TEAMModelOS.Models;
+using TEAMModelOS.SDK.DI;
+using TEAMModelOS.SDK.Models;
+
+namespace TEAMModelBI.Controllers.BISchool
+{
+    /// <summary>
+    /// 试卷
+    /// </summary>
+    [Route("paper")]
+    [ApiController]
+    public class PaperController : ControllerBase
+    {
+        private readonly AzureCosmosFactory _azureCosmos;
+        private readonly AzureStorageFactory _azureStorage;
+        private readonly DingDing _dingDing;
+        private readonly Option _option;
+
+
+        public PaperController(AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, DingDing dingDing, IOptionsSnapshot<Option> option)
+        {
+            _azureCosmos = azureCosmos;
+            _azureStorage = azureStorage;
+            _dingDing = dingDing;
+            _option = option?.Value;
+        }
+
+        /// <summary>
+        /// 查询试卷的数量统计
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [HttpPost("get-count")]
+        public async Task<IActionResult> GetCount(JsonElement jsonElement)
+        {
+            jsonElement.TryGetProperty("tmdId", out JsonElement tmdId);
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            object total = new object();
+
+            if (!string.IsNullOrEmpty($"{tmdId}"))
+            {
+                List<string> schoolIds = new List<string>();
+                List<SchoolPaper> schoolPapers = new List<SchoolPaper>();
+
+                string schoolSql = $"SELECT DISTINCT REPLACE(c.code,'Teacher-','') AS schoolId,c.code,c.roles,c.id,c.name From c where ARRAY_CONTAINS(c.roles,'assist',true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.id='{tmdId}'";
+
+                await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator(queryText: schoolSql, requestOptions: new QueryRequestOptions() { }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                    {
+                        schoolIds.Add(obj.GetProperty("schoolId").GetString());
+                    }
+                }
+
+                foreach (var schoolId in schoolIds)
+                {
+                    SchoolPaper schoolPaper = new SchoolPaper() { id = schoolId };
+                    School school = new();
+                    try
+                    {
+                        school = await cosmosClient.GetContainer("TEAMModelOS", "School").ReadItemAsync<School>(schoolId, new PartitionKey("Base"));
+                    }
+                    catch
+                    {
+                    }
+                    schoolPaper.name = school != null ? school.name : schoolId;
+
+                    await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator($"select c.id from c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Paper-{schoolId}") }))
+                    {
+                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt64() > 0)
+                        {
+                            schoolPaper.total += count.GetInt64();
+                        }
+                    }
+
+                    schoolPapers.Add(schoolPaper);
+                }
+
+                total = schoolPapers;
+            }
+            else
+            {
+                long tempTotal = 0;
+                await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator(queryText: $"select c.id from c where c.pk='Item'", requestOptions: new QueryRequestOptions() { }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt64() > 0)
+                    {
+                        tempTotal += count.GetInt64();
+                    }
+                }
+                total = tempTotal;
+            }
+
+            return Ok(new { state = 200 , total });
+        }
+
+
+        /// <summary>
+        /// 查询所有的试题数量
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("get-total")]
+        public async Task<IActionResult> GetTotal()
+        {
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            long total = 0;
+            await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator(queryText: $"select c.id from c where c.pk='Item'", requestOptions: new QueryRequestOptions() { }))
+            {
+                using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt64() > 0)
+                {
+                    total += count.GetInt64();
+                }
+            }
+
+            return Ok(new { state = 200, total });
+        }
+
+        /// <summary>
+        /// 依据醍摩豆账户统计相关联的学校试卷数量
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [ProducesDefaultResponseType]
+        [HttpPost("get-assistschool")]
+        public async Task<IActionResult> GetAssistSchool(JsonElement jsonElement)
+        {
+            if (!jsonElement.TryGetProperty("tmdId", out JsonElement tmdId)) return BadRequest();
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+            List<string> schoolIds = new List<string>();
+            List<SchoolPaper> schoolPapers = new List<SchoolPaper>();
+
+            string schoolSql = $"SELECT DISTINCT REPLACE(c.code,'Teacher-','') AS schoolId,c.code,c.roles,c.id,c.name From c where ARRAY_CONTAINS(c.roles,'assist',true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.id='{tmdId}'";
+
+            await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: schoolSql, requestOptions: new QueryRequestOptions() { }))
+            {
+                using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                {
+                    schoolIds.Add(obj.GetProperty("schoolId").GetString());
+                }
+            }
+
+            foreach (var schoolId in schoolIds)
+            {
+                SchoolPaper schoolPaper = new SchoolPaper() { id = schoolId };
+                School school = new();
+                try
+                {
+                    school = await cosmosClient.GetContainer("TEAMModelOS", "School").ReadItemAsync<School>(schoolId, new PartitionKey("Base"));
+                }
+                catch
+                {
+                }
+                schoolPaper.name = school != null ? school.name : schoolId;
+
+                await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator($"select c.id from c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Paper-{schoolId}") }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt64() > 0)
+                    {
+                        schoolPaper.total += count.GetInt64();
+                    }
+                }
+
+                schoolPapers.Add(schoolPaper);
+            }
+
+            return Ok(new { state = 200, schoolPapers });
+        }
+
+        public record SchoolPaper 
+        {
+            public string id { get; set; }
+            public string name { get; set; }
+            public long total { get; set; }
+        }
+    }
+}

+ 10 - 1
TEAMModelOS/ClientApp/src/api/schoolSetting.js

@@ -77,5 +77,14 @@ export default {
     //转让管理员身份
     TransferAdminRole:function (data) {
         return post('/teacher/init/set-teacher-info', data)
-    }
+    },
+    //保存/更新学校基础设置
+    upsertSchoolSetting:function (data) {
+        return post('/school/setting/opt-setting', data)
+    },
+    //查询学校基础设置
+    getSchoolSetting:function (data) {
+        return post('/school/setting/find-id', data)
+    },
+    
 }

+ 1 - 1
TEAMModelOS/ClientApp/src/common/BasePreviewFile.vue

@@ -64,7 +64,7 @@
 
 			.preview-fail {
 				width: 700px;
-				height: 600px;
+				height: 500px;
 				display: flex;
 				justify-content: center;
 				align-items: center;

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

@@ -5,5 +5,6 @@ export default{
         part: "分",
         scienceScore: "Technological Interaction Index",
         TScore: "教学应用",
+        noVideo: "暫沒有視頻資源",
     }
 }

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

@@ -5,5 +5,6 @@ export default{
         part: "分",
         scienceScore: "科技互动指数",
         TScore: "教学应用",
+        noVideo: "暂没有视频资源",
     }
 }

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

@@ -5,5 +5,6 @@ export default{
         part: "分",
         scienceScore: "科技互動指數",
         TScore: "教學應用",
+        noVideo: "暫沒有視頻資源",
     }
 }

+ 1 - 1
TEAMModelOS/ClientApp/src/router/routes.js

@@ -483,7 +483,7 @@ export const routes = [{
 		component: resolve => require(['@/view/newcourse/MyCourse.vue'], resolve),
 		meta: {
 			activeName: 'myCourse',
-			// isKeep: true
+			isKeep: true
 		}
 	},
 	{

+ 1 - 1
TEAMModelOS/ClientApp/src/view/evaluation/index/CreatePaper.vue

@@ -136,7 +136,7 @@
 				tags: [], //试卷标签
 				curMode: 'paper',
 				isGeneratePaper: false, //是否组成试卷
-				isSaveToBank: true, //是否保存到题库
+				isSaveToBank: false, //是否保存到题库
 				isSavePoints: false, //是否同步导入的知识点到校本知识点库
 				split1: 0.2,
 				isLoading: false,

+ 17 - 7
TEAMModelOS/ClientApp/src/view/homepage/HomePage.less

@@ -68,11 +68,8 @@
     box-shadow: 0 0 10px 2px var(--card-shadow);
     padding: 25px 20px;
     position: relative;
-    // margin-right: 2%;
     margin-bottom: 30px;
-    // height: 380px;
-    // width: 25%;
-    width: 100%;
+    width: 30%;
     min-width: 200px;
     background: white;
 }
@@ -81,16 +78,25 @@
     left: 20px;
     top: 20px;
 }
+@media screen and (max-width: 1400px){
+    .train-chart-box{
+        width: 100% !important;
+        margin-right: 0px !important;
+    }
+    .ac-count-box{
+        width: 100%;
+    }
+}
 .train-chart-box{
     border-radius: 5px;
     box-shadow: 0 0 10px 2px var(--card-shadow);
-    // width: 71%;
-    width: 100%;
+    width: ~"calc(70% - 15px)";
+    margin-right: 15px;
     min-width: 500px;
     height: fit-content;
     padding: 25px 20px;
     position: relative;
-    margin-bottom: 30px;
+    margin-bottom: 15px;
     background: white;
 }
 .train-hour-wrap{
@@ -179,6 +185,10 @@
     height: 170px;
     margin: 10px 0px;
 }
+.platform-list-wrap{
+    height: 340px;
+    margin: 10px 0px;
+}
 .in-pro-ac-item {
     width: 100%;
     color: @second-textColor;

+ 98 - 80
TEAMModelOS/ClientApp/src/view/homepage/HomePage.vue

@@ -8,23 +8,23 @@
                     <div class="cus-table-box">
                         <MinTable @tmwCus="getTmwCus"></MinTable>
                     </div>
-                    <!-- 活动统计 -->
-                    <div class="ac-count-box">
-                        <p class="chart-title">
-                            {{$t('home.acCount')}}
-                        </p>
-                        <AcCountPie style="margin-top:-20px;" :count="acCount"></AcCountPie>
+                    <!-- 第三方平台连接 -->
+                    <div class="recent-box" style="height:389px">
+                        <p class="text-title">{{$t('platform.ptText')}}</p>
+                        <div class="platform-list-wrap">
+                            <vuescroll>
+                                <EmptyData v-show="!platformList.length"></EmptyData>
+                                <div class="platform-item" v-for="(item,index) in platformList" :key="index" @click="openPlatform(index)">
+                                    <div class="platform-img" :style="{backgroundImage: `url(${item.thum + '?' + areaSas})`}"></div>
+                                    <p class="platform-name">{{item.name}}</p>
+                                </div>
+                            </vuescroll>
+                        </div>
                     </div>
                 </div>
                 <div class="chart-box-column2">
                     <!-- 课堂数据 -->
                     <div class="class-chart-box" v-show="$store.state.config.srvAdrType != 'product'">
-                        <!-- <p class="chart-title">
-                            {{$t('home.classData')}}
-                            <span style="color: var(--normal-icon-color);margin-left: 6px;font-size: 12px;">
-                                ({{$t('system.preview')}})
-                            </span>
-                        </p> -->
                         <div class="cus-count-wrap">
                             <div class="cus-count-item">
                                 <p class="tag-label">{{$t('home.cusTotal')}}</p>
@@ -53,65 +53,72 @@
                             <!-- 科技分占比 -->
                             <ScoreCount :scoreCount="scoreCount"></ScoreCount>
                         </div>
-
-                        <!-- <div style="width:45%;padding-top:15px">
-                            <TeachScore class="class-chart"></TeachScore>
-                        </div> -->
                     </div>
-                    <!-- 研修数据 -->
-                    <div class="train-chart-box" v-show="$store.state.config.srvAdr == 'China'">
-                        <p class="chart-title">
-                            研修统计
-                        </p>
-                        <!-- 学时统计 -->
-                        <div class="train-hour-wrap">
-                            <!-- 总学时 -->
-                            <div class="train-hour-box">
-                                <i-circle :stroke-color="strokeColor" :percent="allPercent" :stroke-width="8" :trail-width="8" :size="180">
-                                    <span class="complete-hour">{{teacherInfo.totalTime || 0}}</span>
-                                    <span style="font-size:24px">/{{settings.allTime || 0}}</span>
-                                    <p class="total-hour-label">
-                                        {{ $t("jyzx.homePage.totalTime") }}
-                                        <Tooltip :max-width="400" transfer>
-                                            <Icon type="ios-alert" size="15" />
-                                            <div slot="content">
-                                                <div>
-                                                    {{ $t("jyzx.homePage.remarks1") }}
-                                                </div>
-                                                <div>
-                                                    {{ $t("jyzx.homePage.remarks2") }}
-                                                </div>
-                                                <div>
-                                                    {{ $t("jyzx.homePage.remarks3") }}{{ settings.lessonMinutes}}{{ $t("jyzx.homePage.remarks4") }}
+                    <!-- 研修数据 && 活动统计-->
+                    <div style="display: flex;">
+                        <!-- 研修数据 -->
+                        <div class="train-chart-box" v-show="$store.state.config.srvAdr == 'China'">
+                            <p class="chart-title">
+                                {{$t('system.menu.trainCount')}}
+                            </p>
+                            <!-- 学时统计 -->
+                            <div class="train-hour-wrap">
+                                <!-- 总学时 -->
+                                <div class="train-hour-box">
+                                    <i-circle :stroke-color="strokeColor" :percent="allPercent" :stroke-width="8" :trail-width="8" :size="160">
+                                        <span class="complete-hour">{{teacherInfo.totalTime || 0}}</span>
+                                        <span style="font-size:24px">/{{settings.allTime || 0}}</span>
+                                        <p class="total-hour-label">
+                                            {{ $t("jyzx.homePage.totalTime") }}
+                                            <Tooltip :max-width="400" transfer>
+                                                <Icon type="ios-alert" size="15" />
+                                                <div slot="content">
+                                                    <div>
+                                                        {{ $t("jyzx.homePage.remarks1") }}
+                                                    </div>
+                                                    <div>
+                                                        {{ $t("jyzx.homePage.remarks2") }}
+                                                    </div>
+                                                    <div>
+                                                        {{ $t("jyzx.homePage.remarks3") }}{{ settings.lessonMinutes}}{{ $t("jyzx.homePage.remarks4") }}
+                                                    </div>
                                                 </div>
-                                            </div>
-                                        </Tooltip>
-                                    </p>
-                                </i-circle>
-                            </div>
-                            <!-- 学时详情 -->
-                            <div class="hour-detail-box">
-                                <div class="hour-detail-item">
-                                    <HourDetail class="hour-detail-chart" :hourInfo="onlineInfo"></HourDetail>
-                                    <HourDetail class="hour-detail-chart" :hourInfo="offlineInfo"></HourDetail>
+                                            </Tooltip>
+                                        </p>
+                                    </i-circle>
                                 </div>
-                                <div class="hour-detail-item">
-                                    <HourDetail class="hour-detail-chart" :hourInfo="verifyInfo"></HourDetail>
-                                    <HourDetail class="hour-detail-chart" :hourInfo="videoInfo"></HourDetail>
+                                <!-- 学时详情 -->
+                                <div class="hour-detail-box">
+                                    <div class="hour-detail-item">
+                                        <HourDetail class="hour-detail-chart" :hourInfo="onlineInfo"></HourDetail>
+                                        <HourDetail class="hour-detail-chart" :hourInfo="offlineInfo"></HourDetail>
+                                    </div>
+                                    <div class="hour-detail-item">
+                                        <HourDetail class="hour-detail-chart" :hourInfo="verifyInfo"></HourDetail>
+                                        <HourDetail class="hour-detail-chart" :hourInfo="videoInfo"></HourDetail>
+                                    </div>
                                 </div>
                             </div>
-                        </div>
-                        <!-- 活动数量统计 -->
-                        <div class="train-count-wrap" v-show="this.$store.state.config.srvAdrType == 'product'">
-                            <div class="train-count-item" v-for="(item,index) in trainCountList" :key="index">
-                                <img :src="item.img" class="train-count-img" alt="">
-                                <div class="train-count-info">
-                                    <p class="count-label">{{item.text}}</p>
-                                    <p class="count-num">{{`${item.complete}/${item.total}`}}</p>
+                            <!-- 活动数量统计 -->
+                            <div class="train-count-wrap" v-show="this.$store.state.config.srvAdrType == 'product'">
+                                <div class="train-count-item" v-for="(item,index) in trainCountList" :key="index">
+                                    <img :src="item.img" class="train-count-img" alt="">
+                                    <div class="train-count-info">
+                                        <p class="count-label">{{item.text}}</p>
+                                        <p class="count-num">{{`${item.complete}/${item.total}`}}</p>
+                                    </div>
                                 </div>
                             </div>
                         </div>
+                        <!-- 活动统计 -->
+                        <div class="ac-count-box">
+                            <p class="chart-title">
+                                {{$t('home.acCount')}}
+                            </p>
+                            <AcCountPie style="margin-top:-20px;" :count="acCount"></AcCountPie>
+                        </div>
                     </div>
+
                 </div>
             </div>
             <div class="text-box">
@@ -160,27 +167,14 @@
                         </vuescroll>
                     </div>
                 </div>
-                <!-- 最近课堂记录 现在没有数据,暂时换成第三方平台连接-->
-                <!-- <div class="recent-box">
+                <!-- 最近课堂记录-->
+                <div class="recent-box">
                     <p class="text-title">{{$t('home.recentRecord')}}</p>
                     <div class="recent-list-wrap">
                         <vuescroll>
                             <EmptyData :textContent="$t('home.noRecord')"></EmptyData>
                         </vuescroll>
                     </div>
-                </div> -->
-                <!-- 第三方平台连接 -->
-                <div class="recent-box">
-                    <p class="text-title">{{$t('platform.ptText')}}</p>
-                    <div class="recent-list-wrap">
-                        <vuescroll>
-                            <EmptyData v-show="!platformList.length"></EmptyData>
-                            <div class="platform-item" v-for="(item,index) in platformList" :key="index" @click="openPlatform(index)">
-                                <div class="platform-img" :style="{backgroundImage: `url(${item.thum + '?' + areaSas})`}"></div>
-                                <p class="platform-name">{{item.name}}</p>
-                            </div>
-                        </vuescroll>
-                    </div>
                 </div>
             </div>
         </vuescroll>
@@ -316,7 +310,7 @@ export default {
         }
     },
     methods: {
-        openPlatform(index){
+        openPlatform(index) {
             window.open(this.platformList[index].url)
         },
         //查看课堂记录统计数据
@@ -489,7 +483,27 @@ export default {
                 path: '/home/settings'
             })
         },
-        //查询资源文件
+        // 查询学校资源平台
+        getSchoolSetting() {
+            let params = {
+                schoolId: this.$store.state.userInfo.schoolCode
+            }
+            this.$api.schoolSetting.getSchoolSetting(params).then(
+                res => {
+                    if (res.setting?.third) {
+                        let d = res.setting.third.find(item => item.tag == 'default')
+                        if(d){
+                            this.platformList.push(...d.links)
+                        }
+                        // this.schoolPlatform = d || this.schoolPlatform
+                    }
+                },
+                err => {
+
+                }
+            )
+        },
+        //查询区级资源平台
         getAreaSource() {
             let params = {
                 areaId: sessionStorage.getItem('areaId')
@@ -503,7 +517,10 @@ export default {
                     } else if (!res.error && res.file) {
                         if (res.file.third) {
                             let d = res.file.third.find(item => item.tag == 'default')
-                            this.platformList = d.links || this.platformList
+                            if(d){
+                                this.platformList.push(...d.links)
+                            }
+                            // this.platformList = d.links || this.platformList
                         }
                         this.fullData = res.file
                     }
@@ -558,6 +575,7 @@ export default {
     created() {
         this.areaSas = this.$store.state.user.userProfile.osblob_sas
         this.getAreaSource()
+        this.getSchoolSetting()
         this.getAcCount()
         this.getTeacherRecordData()
         if (this.$store.state.userInfo.hasSchool) {

+ 142 - 27
TEAMModelOS/ClientApp/src/view/mgtPlatform/MgtPlatform.vue

@@ -2,21 +2,39 @@
     <div class="mgt-platform-container">
         <vuescroll>
             <div class="platform-list-wrap">
-                <div class="platform-item" v-for="(item,index) in platformList.links" :key="index" @click="openThirdPlatform(index)">
-                    <span class="delete-platform-icon" @click.stop="delPlatform(index)" v-show="isArea">
+                <!-- 区级资源平台 -->
+                <div class="platform-item" v-for="(item,index) in areaPlatform.links" :key="item.name" @click="openAreaPlatform(index)">
+                    <span class="platform-type-label">
+                        {{$t('train.mgt.areaLabel')}}
+                    </span>
+                    <span class="delete-platform-icon" @click.stop="delAreaPlatform(index)" v-show="isArea">
+                        <Icon type="md-close" class="add-member-icon" />
+                    </span>
+                    <div class="platform-img" :style="{backgroundImage: `url(${item.thum + '?' + areaSas})`}"></div>
+                    <p class="img-text">
+                        <span>{{$t('platform.platform')}}</span>
+                        {{item.name}}
+                    </p>
+                </div>
+                <!-- 校级资源平台 -->
+                <div class="platform-item" v-for="(item,index) in schoolPlatform.links" :key="item.name" @click="openSchoolPlatform(index)">
+                    <span class="delete-platform-icon" @click.stop="delSchoolPlatform(index)" v-show="!isArea">
                         <Icon type="md-close" class="add-member-icon" />
                     </span>
+                    <span class="platform-type-label school-type">
+                        {{$t('train.mgt.schoolLabel')}}
+                    </span>
                     <div class="platform-img" :style="{backgroundImage: `url(${item.thum + '?' + areaSas})`}"></div>
                     <p class="img-text">
                         <span>{{$t('platform.platform')}}</span>
                         {{item.name}}
                     </p>
                 </div>
-                <div class="add-platform-box" @click="addStatus = true" v-show="platformList.links.length && isArea">
+                <div class="add-platform-box" @click="addStatus = true" v-show="areaPlatform.links.length">
                     <Icon type="md-add-circle" class="add-platform-icon" />
                     <p class="add-platform-text">{{$t('platform.addPlatform')}}</p>
                 </div>
-                <div v-show="!platformList.links.length" style="margin:auto">
+                <div v-show="!areaPlatform.links.length" style="margin:auto">
                     <EmptyData :textContent="$t('platform.noPlatform')" :top="120"></EmptyData>
                     <p class="add-platform" v-show="isArea" @click="addStatus = true">
                         <Icon type="md-add" />
@@ -73,7 +91,11 @@ export default {
         return {
             areaSas: '',
             fullData: {},
-            platformList: {
+            areaPlatform: {
+                tag: 'default',
+                links: []
+            },
+            schoolPlatform: {
                 tag: 'default',
                 links: []
             },
@@ -99,21 +121,24 @@ export default {
         }
     },
     methods: {
-        openThirdPlatform(index) {
-            window.open(this.platformList.links[index].url)
+        openAreaPlatform(index) {
+            window.open(this.areaPlatform.links[index].url)
+        },
+        openSchoolPlatform(index) {
+            window.open(this.schoolPlatform.links[index].url)
         },
-        delPlatform(index) {
+        delAreaPlatform(index) {
             this.$Modal.confirm({
                 title: this.$t('platform.delTitle'),
-                content: `${this.$t('platform.delContent')}${this.platformList.links[index].name}?`,
+                content: `${this.$t('platform.delContent')}${this.areaPlatform.links[index].name}?`,
                 onOk: () => {
-                    this.platformList.links.splice(index, 1)
-                    this.fullData.third = [this.platformList]
+                    this.areaPlatform.links.splice(index, 1)
+                    this.fullData.third = [this.areaPlatform]
                     this.$api.ability.upsertResAndPolicy(this.fullData).then(
                         res => {
                             this.$Message.success(this.$t('platform.delOk'))
                             this.fullData = res.file
-                            this.platformList = this.fullData.third.find(item => item.tag == 'default')
+                            this.areaPlatform = this.fullData.third.find(item => item.tag == 'default')
                             this.addStatus = false
                         },
                         err => {
@@ -122,7 +147,28 @@ export default {
                     )
                 }
             })
-
+        },
+        delSchoolPlatform(index) {
+            this.$Modal.confirm({
+                title: this.$t('platform.delTitle'),
+                content: `${this.$t('platform.delContent')}${this.schoolPlatform.links[index].name}?`,
+                onOk: () => {
+                    this.schoolPlatform.links.splice(index, 1)
+                    let params = {
+                        schoolId: this.$store.state.userInfo.schoolCode,
+                        opt: 'UpsertThird',
+                        third: [this.schoolPlatform]
+                    }
+                    this.$api.schoolSetting.upsertSchoolSetting(params).then(
+                        res => {
+                            this.$Message.success(this.$t('platform.delOk'))
+                        },
+                        err => {
+                            this.$Message.error(this.$t('platform.delErr'))
+                        }
+                    )
+                }
+            })
         },
         uploadPoster(file) {
             console.log(file)
@@ -137,7 +183,7 @@ export default {
                 return false
             }
             let regRule = /[`~!@#$%^&*()\-+=<>?:"{}|,\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g
-            if(regRule.test(file.name)){
+            if (regRule.test(file.name)) {
                 this.$Message.error(this.$t('platform.chartErr'))
                 return false
             }
@@ -181,7 +227,7 @@ export default {
                     } else if (!res.error && res.file) {
                         if (res.file.third) {
                             let d = res.file.third.find(item => item.tag == 'default')
-                            this.platformList = d || this.platformList
+                            this.areaPlatform = d || this.areaPlatform
                         }
                         this.fullData = res.file
                     }
@@ -194,19 +240,42 @@ export default {
         confirmAdd() {
             this.$refs['platform'].validate((valid) => {
                 if (valid) {
-                    this.platformList.links.push(this._.cloneDeep(this.platform))
-                    this.fullData.third = [this.platformList]
-                    this.$api.ability.upsertResAndPolicy(this.fullData).then(
-                        res => {
-                            this.$Message.success(this.$t('platform.saveOk'))
-                            this.fullData = res.file
-                            this.platformList = this.fullData.third.find(item => item.tag == 'default')
-                            this.addStatus = false
-                        },
-                        err => {
-                            this.$Message.error(this.$t('platform.saveErr'))
+                    //区级管理
+                    if (this.isArea) {
+                        this.areaPlatform.links.push(this._.cloneDeep(this.platform))
+                        this.fullData.third = [this.areaPlatform]
+                        this.$api.ability.upsertResAndPolicy(this.fullData).then(
+                            res => {
+                                this.$Message.success(this.$t('platform.saveOk'))
+                                this.fullData = res.file
+                                this.areaPlatform = this.fullData.third.find(item => item.tag == 'default')
+                                this.addStatus = false
+                                this.$refs['platform'].resetFields()
+                            },
+                            err => {
+                                this.$Message.error(this.$t('platform.saveErr'))
+                            }
+                        )
+                    }
+                    //校级管理
+                    else {
+                        this.schoolPlatform.links.push(this._.cloneDeep(this.platform))
+                        let params = {
+                            schoolId: this.$store.state.userInfo.schoolCode,
+                            opt: 'UpsertThird',
+                            third: [this.schoolPlatform]
                         }
-                    )
+                        this.$api.schoolSetting.upsertSchoolSetting(params).then(
+                            res => {
+                                this.$Message.success(this.$t('platform.saveOk'))
+                                this.addStatus = false
+                                this.$refs['platform'].resetFields()
+                            },
+                            err => {
+                                this.$Message.error(this.$t('platform.saveErr'))
+                            }
+                        )
+                    }
                 } else {
                     this.$Message.error(this.$t('platform.formErr'))
                     this.modalLoading = false
@@ -217,13 +286,34 @@ export default {
             })
         },
         cancelAdd() {
+            this.$refs['platform'].resetFields()
+        },
+        getSchoolSetting() {
+            let params = {
+                schoolId: this.$store.state.userInfo.schoolCode
+            }
+            this.$api.schoolSetting.getSchoolSetting(params).then(
+                res => {
+                    if (res.setting?.third) {
+                        let d = res.setting.third.find(item => item.tag == 'default')
+                        this.schoolPlatform = d || this.schoolPlatform
+                    }
+                },
+                err => {
 
+                }
+            )
         }
     },
     created() {
         this.areaSas = this.$store.state.user.userProfile.osblob_sas
         this.getAreaSource()
     },
+    mounted() {
+        if (!this.isArea) {
+            this.getSchoolSetting()
+        }
+    },
     computed: {
         isArea() {
             let areas = this.$store.state.user.userProfile.areas
@@ -234,6 +324,31 @@ export default {
 }
 </script>
 <style lang="less" scoped>
+.platform-type-label {
+    position: absolute;
+    left: -3px;
+    top: 5px;
+    color: white;
+    font-size: 12px;
+    padding: 2px 5px;
+    z-index: 99;
+    transform: rotate(-45deg);
+    &::after {
+        position: absolute;
+        content: " ";
+        left: -13px;
+        top: -10px;
+        z-index: -1;
+        border-right: 30px solid transparent;
+        border-left: 30px solid transparent;
+        border-bottom: 30px solid #ff9900;
+    }
+}
+.school-type {
+    &::after {
+        border-bottom: 30px solid #19be6b;
+    }
+}
 .mgt-platform-container {
     width: 100%;
     height: 100%;

+ 23 - 2
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.less

@@ -245,6 +245,7 @@
 .record-name{
     color:var(--primary-text-color);
     font-size:16px;
+    margin-top: 5px;
 }
 .record-time{
     color:#909090;
@@ -430,8 +431,7 @@
     vertical-align: text-bottom;
 }
 .record-info{
-    margin-left: 30px;
-    
+    // margin-left: 30px;
 }
 .record-info-value{
     color: #17233d;
@@ -441,4 +441,25 @@
     max-height: 100%;
     margin: auto;
     display: block;
+}
+.record-poster-wrap{
+    width: 120px;
+    background: #f3f3f3;
+    height: 65px;
+    background-size: contain;
+    background-repeat: no-repeat;
+    background-position: center;
+    margin-left: 5px;
+}
+// .record-poster{
+//     width: 120px;
+// }
+.info-split{
+    margin: 0px 25px;
+    display: inline-block;
+    width: 1px;
+    height: 12px;
+    margin-top: -7px;
+    background-color: #e8eaec;
+    vertical-align: baseline;
 }

+ 22 - 9
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -138,27 +138,29 @@
                         <div v-show="tabName == 'record'" class="animated fadeIn class-record-wrap">
                             <vuescroll>
                                 <List>
-                                    <ListItem v-for="(item,index) in recordList" :key="index">
+                                    <ListItem v-for="(item,index) in recordListShow" :key="index">
                                         <ListItemMeta @click.native="toClassRecoerd(index)" style="cursor: pointer;">
+                                            <div slot="avatar" class="record-poster-wrap" :style="{backgroundImage:`url(${item.poster})`}">
+                                            </div>
                                             <p slot="title" class="record-name" style="padding-left:10px">{{item.name}}</p>
-                                            <div slot="description" style="padding-left:10px">
-                                                <Time class="record-time" :time="item.startTime" />
+                                            <div slot="description" style="padding-left:10px;margin-top:10px">
                                                 <span class="record-info">
                                                     <span>{{$t('cusMgt.duration')}}</span>
                                                     <span class="record-info-value">{{handleDuration(item.duration)}}</span>
                                                 </span>
+                                                <span class="info-split"></span>
+                                                <Time class="record-time" :time="item.startTime" />
                                                 <div class="record-action-wrap">
                                                     <!-- <Icon class="action-icon" type="ios-stats" :title="$t('cusMgt.socrateReport')" @click.stop="viewReporte(index)" /> -->
                                                     <!-- <Icon class="action-icon" custom="iconfont icon-hi" :title="$t('cusMgt.elNotes')" @click.stop="viewNote(index)" /> -->
-                                                    <Icon class="action-icon" custom="iconfont icon-video" :title="$t('cusMgt.socrateMv')" @click.stop="viewVideo(item.id)" />
+                                                    <Icon class="action-icon" custom="iconfont icon-video" :title="$t('cusMgt.socrateMv')" @click.stop="viewVideo(item)" />
                                                     <Icon class="action-icon" type="md-share" :title="$t('cusMgt.share')" @click.stop="shareRecord" />
                                                 </div>
-                                                <p>{{item.id}}</p>
                                             </div>
                                         </ListItemMeta>
                                     </ListItem>
                                 </List>
-                                <EmptyData v-show="recordList.length == 0" :textContent="$t('cusMgt.noRecord')" :top="150"></EmptyData>
+                                <EmptyData v-show="recordListShow.length == 0" :textContent="$t('cusMgt.noRecord')" :top="150"></EmptyData>
                             </vuescroll>
                         </div>
                         <!-- 活动记录 -->
@@ -516,6 +518,7 @@ export default {
                 }
             ],
             recordList: [],
+            recordListShow: [],
             editClassStatus: false,
             showQrStatus: false,
             listLoading: false,
@@ -559,10 +562,10 @@ export default {
             }
         },
         //查看视频
-        viewVideo(id) {
+        viewVideo(item) {
             this.$router.push({
                 name: 'teachCenter',
-                query: { id }
+                query: { id: item.id, name: item.name }
             })
         },
         //查看电子笔记
@@ -1303,15 +1306,23 @@ export default {
 
         changeClassroom(index) {
             this.curClassIndex = index
+            console.log(this.teaClassList)
             if (this.tabName == 'stus') {
                 this.getStuList()
             } else if (this.tabName == 'activity') {
                 this.getActivityList()
+            } else if (this.tabName == 'record') {
+                this.filterRecordList(index)
             }
         },
+        filterRecordList(index) {
+            this.recordListShow = this.recordList.filter(item => {
+                let id = this.teaClassList[index].classId || this.teaClassList[index].stulist
+                return item.groupIds.includes(id)
+            })
+        },
         //查看课堂记录详情
         toClassRecoerd(index) {
-            this.listLoading = true
             this.$router.push({
                 name: 'classRecord',
                 params: {
@@ -1668,7 +1679,9 @@ export default {
                         item.sokrateImg = `${privateSas.url}/${privateSas.name}/records/${item.id}/Sokrates/SokratesResults/event.png${privateSas.sas}`
                         item.eNote = `${privateSas.url}/${privateSas.name}/records/${item.id}/Note.pdf${privateSas.sas}`
                         item.video = `${privateSas.url}/${privateSas.name}/records/${item.id}/Record/CourseRecord.mp4${privateSas.sas}`
+                        item.poster = `${privateSas.url}/${privateSas.name}/records/${item.id}/Record/CoverImage.jpg${privateSas.sas}`
                     })
+                    this.filterRecordList(this.curClassIndex)
                 },
                 err => {
                     this.$Message.error(this.$t('cusMgt.rcdErr'))

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

@@ -749,8 +749,8 @@
 			onDeleteShareVolume(volume) {
 				let chapterIds = volume.children.length ? volume.children.map(i => i.id) : []
 				this.$Modal.confirm({
-					title: this.$t('syllabus.tree.removeTitle'),
-					content: this.$t('syllabus.deleteIsDelConfirm'),
+					title: this.$t('syllabus.deleteVolume'),
+					content: this.$t('syllabus.deleteConfirm'),
 					onOk: () => {
 						this.$api.syllabus.ShareAgree({
 							"code": this.curTeammodelId,

+ 14 - 2
TEAMModelOS/ClientApp/src/view/teachCenter/TeaResCenter.less

@@ -29,8 +29,10 @@
         position: absolute;
         right: 0;
         bottom: 0;
-        min-width: 100%;
-        min-height: 100%;
+        /* min-width: 100%;
+        min-height: 100%; */
+        width: 100%;
+        height: 100%;
         /* height: auto;
         width: auto; */
         // 禁用单击视频暂停播放
@@ -64,4 +66,14 @@
         background-color: rgba(0, 0, 0, 0.82);
         display: flex;
     }
+
+    .no-video {
+        width: 100%;
+        height: 100%;
+        position: absolute;
+        top: 40%;
+        left: 45%;
+        font-size: 20px;
+        color: #fff;
+    }
 }

+ 29 - 8
TEAMModelOS/ClientApp/src/view/teachCenter/TeaResCenter.vue

@@ -2,12 +2,13 @@
     <div class="father">
         <div class="header">
             <Icon type="ios-arrow-back" @click="backTo" />
-            <span>{{ videoInfo.name }}</span>
+            <span>{{ recordInfo.name }}</span>
             <!-- <Icon type="ios-link" /> -->
         </div>
         <!-- 教研中心 -->
         <video id="video1" class="video-js vjs-default-skin" type="video/mp4">
         </video>
+        <div class="no-video" v-if="noVideo">{{ $t('researchCenter.video.noVideo') }}</div>
     </div>
 </template>
 
@@ -43,12 +44,16 @@ export default {
             option: undefined,
             scienceScore: 80,
             Tscore: 74,
-            videoInfo: {
-                name: "测试视频",
-                url: "https://teammodelstorage.blob.core.chinacloudapi.cn/download/firstVideo1.mp4"
-            },
+            videoInfo: undefined,
+            sokratesRecords: [],
+            recordInfo: undefined,
+            noVideo: false,
         }
     },
+    created () {
+        this.recordInfo = this.$route.query
+        this.getRecord()
+    },
     async mounted () {
         this.dataArr = require('@/static/united.json')
         this.categories = this.dataArr.labels
@@ -83,6 +88,7 @@ export default {
             this.numArr.push(det.length)
         }) */
         let status = await this.getPlayer()
+        console.log(status);
         /* if(status) {
             document.getElementsByClassName("vjs-quartet")[0].style.visibility = "hidden"
             document.getElementsByClassName("vjs-column-chart")[0].style.visibility = "hidden"
@@ -154,9 +160,18 @@ export default {
         this.getOther()
     },
     methods: {
+        getRecord() {
+            let userProfile = this.$store.state.user.userProfile
+            this.videoInfo = `${userProfile.blob_uri}/records/${this.recordInfo.id}/Record/CourseRecord.mp4?${userProfile.blob_sas}`
+            let url = `${userProfile.blob_uri}/records/${this.recordInfo.id}/Sokrates/SokratesRecords.json?${userProfile.blob_sas}`
+            this.$tools.getFile(url).then(res => {
+                this.sokratesRecords = JSON.parse(res)
+            })
+        },
         getPlayer() {
             return new Promise((r, j) => {
                 let options = {
+                    // notSupportedMessage: '此视频暂无法播放,请稍后再试',
                     controls: true,
                     preload: "auto",
                     controlBar: {
@@ -182,7 +197,7 @@ export default {
                         src: ""
                     }],
                 }
-                options.sources[0].src = this.videoInfo.url
+                options.sources[0].src = this.videoInfo
                 var that = this
                 this.player = videojs(document.getElementById("video1"), options, function() {
                     try {
@@ -255,6 +270,12 @@ export default {
                         videojs.registerComponent("cloumn", cloumn)
                         that.player.addChild("cloumn")
 
+                        this.on('error', (e) => {
+                            that.player.errorDisplay.close();   //将错误信息不显示
+                            that.noVideo = true
+                            // 自定义显示方式
+                        })
+
                         // 视频开始播放,记录时间
                         this.on('timeupdate', (e) => {
                             // that.nowTime = document.getElementById("video1").firstChild.currentTime/60
@@ -634,7 +655,7 @@ export default {
         getScore() {
             let scoreEcharts = this.$echarts.init(document.getElementById('Interaction'));
             var that = this
-            var color = new echarts.graphic.LinearGradient(0, 0, 1, 0, [
+            var color = new this.$echarts.graphic.LinearGradient(0, 0, 1, 0, [
                 {
                     offset: 0,
                     color: '#B8E4F0',
@@ -746,7 +767,7 @@ export default {
         getOther() {
             let scoreEcharts = this.$echarts.init(document.getElementById('Teaching'));
             var that = this
-            var color = new echarts.graphic.LinearGradient(0, 0, 1, 0, [
+            var color = new this.$echarts.graphic.LinearGradient(0, 0, 1, 0, [
                 {
                     offset: 0,
                     color: '#B8E4F0',