瀏覽代碼

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

CrazyIter_Bin 3 年之前
父節點
當前提交
03d3fba8d4
共有 34 個文件被更改,包括 791 次插入294 次删除
  1. 1 1
      TEAMModeBI/ClientApp/public/index.html
  2. 0 26
      TEAMModeBI/ClientApp/src/until/inspect.js
  3. 127 15
      TEAMModeBI/ClientApp/src/view/teachermanage/areamanage.vue
  4. 30 1
      TEAMModeBI/ClientApp/src/view/teachermanage/school.vue
  5. 26 3
      TEAMModelOS/ClientApp/src/assets/iconfont/demo_index.html
  6. 7 3
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.css
  7. 1 1
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.js
  8. 7 0
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.json
  9. 二進制
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.ttf
  10. 二進制
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff
  11. 二進制
      TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff2
  12. 14 2
      TEAMModelOS/ClientApp/src/common/BaseLayout.vue
  13. 1 1
      TEAMModelOS/ClientApp/src/components/questionnaire/BaseQuestionnaire.vue
  14. 4 1
      TEAMModelOS/ClientApp/src/locale/lang/en-US/system.js
  15. 4 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/system.js
  16. 4 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/system.js
  17. 19 1
      TEAMModelOS/ClientApp/src/router/routes.js
  18. 84 73
      TEAMModelOS/ClientApp/src/view/areaMgmt/AreaLayout.vue
  19. 0 122
      TEAMModelOS/ClientApp/src/view/areaMgmt/PolicyMgt.vue
  20. 2 2
      TEAMModelOS/ClientApp/src/view/areatrain/Create.vue
  21. 2 2
      TEAMModelOS/ClientApp/src/view/areatrain/SurveyDetail.vue
  22. 24 0
      TEAMModelOS/ClientApp/src/view/homepage/NewHomePage.less
  23. 48 5
      TEAMModelOS/ClientApp/src/view/homepage/NewHomePage.vue
  24. 2 2
      TEAMModelOS/ClientApp/src/view/jyzx/DoExam.vue
  25. 2 2
      TEAMModelOS/ClientApp/src/view/jyzx/DoSurvey.vue
  26. 2 2
      TEAMModelOS/ClientApp/src/view/jyzx/Question.vue
  27. 1 1
      TEAMModelOS/ClientApp/src/view/jyzx/index.vue
  28. 343 0
      TEAMModelOS/ClientApp/src/view/mgtPlatform/MgtPlatform.vue
  29. 2 2
      TEAMModelOS/ClientApp/src/view/questionnaire/ManageQuestionnaire.vue
  30. 3 3
      TEAMModelOS/ClientApp/src/view/resource/Policy.vue
  31. 24 14
      TEAMModelOS/ClientApp/src/view/resource/SourceCenter.vue
  32. 1 1
      TEAMModelOS/ClientApp/src/view/resource/SourceDetail.vue
  33. 4 4
      TEAMModelOS/ClientApp/src/view/train/SurveyDetail.vue
  34. 2 2
      TEAMModelOS/ClientApp/src/view/train/TrainDetail.vue

+ 1 - 1
TEAMModeBI/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_pjsrjt12tsf.js"></script>
+<script src="https://at.alicdn.com/t/font_2934132_o31bgq7urir.js"></script>
 
 <body>
     <noscript>

+ 0 - 26
TEAMModeBI/ClientApp/src/until/inspect.js

@@ -16,30 +16,4 @@ export default {
     guid() {
         return this.randomId() + this.randomId() + '-' + this.randomId() + '-' + this.randomId() + '-' + this.randomId() + '-' + this.randomId() + this.randomId() + this.randomId()
     },
-    //字节大小转换
-    convertSize(limit) {
-        var size = ''
-        if (limit < 0.1 * 1024) {
-            //小于0.1KB,则转化成B
-            size = limit.toFixed(2) + 'B'
-        } else if (limit < 0.1 * 1024 * 1024) {
-            //小于0.1MB,则转化成KB
-            size = (limit / 1024).toFixed(2) + 'KB'
-        } else if (limit < 0.1 * 1024 * 1024 * 1024) {
-            //小于0.1GB,则转化成MB
-            size = (limit / (1024 * 1024)).toFixed(2) + 'MB'
-        } else {
-            //其他转化成GB
-            size = (limit / (1024 * 1024 * 1024)).toFixed(2) + 'GB'
-        }
-
-        var sizeStr = size + '' //转成字符串
-        var index = sizeStr.indexOf('.') //获取小数点处的索引
-        var dou = sizeStr.substr(index + 1, 2) //获取小数点后两位的值
-        if (dou == '00') {
-            //判断后两位是否为00,如果是则删除00
-            return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2)
-        }
-        return size
-    }
 }

+ 127 - 15
TEAMModeBI/ClientApp/src/view/teachermanage/areamanage.vue

@@ -1,6 +1,34 @@
 <template>
     <div class="areamanabox">
         <div class="nowtitle">
+            <div class="select-List">
+                <div class="province-box">
+                    <span>省:</span>
+                    <el-select v-model="provinceOptions.provinceValue" placeholder="省级" @change="areaSelctChange(provinceOptions.provinceValue,'province')">
+                        <el-option v-for="item in provinceOptions.optionInfo" :key="item.code" :label="item.name" :value="item.name">
+                        </el-option>
+                    </el-select>
+                </div>
+                <div class="city-box">
+                    <span>市:</span>
+                    <el-select v-model="cityOptions.cityValue" placeholder="市/县" @change="areaSelctChange(cityOptions.cityValue,'city')">
+                        <el-option v-for="item in cityOptions.cityInfo" :key="item.code" :label="item.name" :value="item.name">
+                        </el-option>
+                    </el-select>
+                </div>
+                <!-- <div class="dist-box">
+                    <span>区域:</span>
+                    <el-select v-model="distOptions.distValue" filterable allow-create default-first-option placeholder="区域选择" @change="areaSelctChange(distOptions.distValue,'dist')">
+                        <el-option v-for="item in distOptions.distInfo" :key="item.code" :label="item.name" :value="item.name">
+                        </el-option>
+                    </el-select>
+                </div> -->
+                <div class="close-box" v-show="provinceOptions.provinceValue || cityOptions.cityValue">
+                    <svg class="closebtnIcon" aria-hidden="true" @click="closeSelectarea">
+                        <use xlink:href="#icon-quxiao"></use>
+                    </svg>
+                </div>
+            </div>
             <div class="boxselect" @click="createArea" v-if="PowerShow">
                 <a href="#">
                     <div class="layer">
@@ -54,7 +82,7 @@
                                         </div>
                                         <el-popconfirm confirm-button-text="加入" cancel-button-text="取消" title="是否将学校加入该区域" @confirm="areaAddschool(item.schoolCode,$event)" @cancel="position=''">
                                             <template #reference>
-                                                <div class="addicon" @click="changeStyle(index)">
+                                                <div class="addiconsx" @click="changeStyle(index)">
                                                     <svg class="areaaddschool" aria-hidden="true">
                                                         <use xlink:href="#icon-tianjia"></use>
                                                     </svg>
@@ -174,6 +202,8 @@ import { ElMessageBox, ElMessage } from 'element-plus'
 import router from '@/router/index.js'
 import { useRouter } from 'vue-router'
 import Ability from '@/components/Ability.vue'
+import option from '@/static/region.json'
+const optionsData = option
 export default {
     components: {
         Ability,
@@ -183,7 +213,7 @@ export default {
         let PowerShow = proxy.$access.inspectPower('batcharea-upd')
         const store = useStore()
         let loading = ref(true)
-        let optionData = reactive([])
+        let optionData = ref([])
         let tableData = ref([])
         let nowPitch = ref()
         //当前选中的一条数据内容
@@ -207,22 +237,34 @@ export default {
         let loadingForm = ref({
             cutAbility: false,
         })
+        //地区列表
+        let provinceOptions = ref({
+            optionInfo: [],
+            provinceValue: '',
+        })
+        let cityOptions = ref({
+            cityInfo: [],
+            cityValue: '',
+        })
+        let originalDatas = ref([])
         onMounted(() => {
             getoption()
+            provinceOptions.value.optionInfo = optionsData
         })
         //获取
         function getoption() {
             proxy.$api.getCapacity({}).then((res) => {
-                optionData.push(...res.areas)
+                optionData.value.push(...res.areas)
                 loading.value = false
                 store.commit('getPoint', res.areas)
+                originalDatas.value.push(...res.areas)
             })
         }
         //table按钮
         async function operation(index, row, state) {
             console.log(row)
             currentlySelect.value = row
-            let dialogData = JSON.parse(JSON.stringify(optionData))
+            let dialogData = JSON.parse(JSON.stringify(optionData.value))
             console.log(dialogData, '进来获取的几套方案')
             dialogData.forEach((items, index) => {
                 items.id === row.id ? ((items.pitchState = true), (items.laterPitch = false), dialogData.splice(index, 1)) : ((items.pitchState = false), (items.laterPitch = false))
@@ -362,6 +404,42 @@ export default {
         function changeStyle(index) {
             position.value = index
         }
+        //地区选择
+        function areaSelctChange(value, model) {
+            console.log(originalDatas.value)
+            let data = option
+            if (model === 'province') {
+                //传输下一级的数据给select
+                let cityData = data.filter((item) => {
+                    return item.name === value
+                })
+                cityOptions.value.cityInfo = cityData[0].children
+                //遍历list
+                let schoolData = originalDatas.value.filter((items) => {
+                    return items.provName === value
+                })
+                optionData.value = schoolData
+                console.log(schoolData, optionData.value)
+            } else if (model === 'city') {
+                let distData = cityOptions.value.cityInfo.filter((item) => {
+                    return item.name === value
+                })
+                let provinceData = provinceOptions.value.provinceValue
+                let schoolData = originalDatas.value.filter((items) => {
+                    return items.cityName === value && items.provName === provinceData
+                })
+                optionData.value = schoolData
+            }
+        }
+        //地区选择close btn
+        function closeSelectarea() {
+            provinceOptions.value.provinceValue = ''
+            provinceOptions.value.optionInfo = []
+            cityOptions.value.cityValue = ''
+            cityOptions.value.cityInfo = []
+            optionData.value = originalDatas.value
+            provinceOptions.value.optionInfo = optionsData
+        }
         watch(abilityModel, (newdata) => {
             console.log(newdata)
             newdata
@@ -398,6 +476,11 @@ export default {
             CutNotarize,
             replaceProject,
             loadingForm,
+            provinceOptions,
+            cityOptions,
+            areaSelctChange,
+            originalDatas,
+            closeSelectarea,
         }
     },
 }
@@ -570,15 +653,15 @@ export default {
 .details-list-school:hover {
     background-color: #dadada;
 }
-.details-list-school:hover .addicon {
-    display: block;
+.details-list-school:hover .addiconsx {
+    display: inline-block;
 }
 .active {
     background-color: #dadada;
 }
-.active .addicon {
+/* .active .addicon {
     display: block;
-}
+} */
 .list-school-logo {
     width: 20%;
 }
@@ -593,21 +676,21 @@ export default {
 .list-school-name div span {
     color: #303133;
 }
-.addicon {
+.addiconsx {
     position: absolute;
     right: 5%;
     top: 35%;
     display: none;
 }
-.addicon:hover {
+.addiconsx:hover {
     cursor: pointer;
 }
 .areaaddschool {
-    width: 2em;
-    height: 2em;
-    vertical-align: -0.5em;
-    fill: currentColor;
-    overflow: hidden;
+    width: 2em !important;
+    height: 2em !important;
+    vertical-align: -0.5em !important;
+    fill: currentColor !important;
+    overflow: hidden !important;
 }
 .schoolRight {
     width: 60%;
@@ -728,6 +811,35 @@ export default {
     align-items: center;
     color: #ccc;
 }
+.select-List {
+    line-height: 60px;
+    text-align: left;
+    padding: 1% 2%;
+    width: 75%;
+    float: left;
+    font-weight: normal;
+}
+.province-box,
+.city-box,
+.dist-box,
+.close-box {
+    display: inline-block;
+}
+.city-box,
+.dist-box {
+    margin-left: 1%;
+}
+.closebtnIcon {
+    width: 1.8em;
+    height: 1.8em;
+    vertical-align: -0.6em;
+    fill: currentColor;
+    overflow: hidden;
+    margin-left: 8px;
+}
+.closebtnIcon:hover {
+    cursor: pointer;
+}
 </style>
 <style>
 .traitfrom .refer {

+ 30 - 1
TEAMModeBI/ClientApp/src/view/teachermanage/school.vue

@@ -23,6 +23,11 @@
                     </el-option>
                 </el-select>
             </div>
+            <div class="close-box" v-show="provinceOptions.provinceValue || cityOptions.cityValue ||distOptions.distValue">
+                <svg class="closebtnIcon" aria-hidden="true" @click="closeSelectarea">
+                    <use xlink:href="#icon-quxiao"></use>
+                </svg>
+            </div>
         </div>
         <div class="boxselect" @click="createdSchoolbtn" v-if="PowerShow">
             <a href="#">
@@ -452,6 +457,17 @@ export default {
                 ;(models.value = 'default'), (tableData.value = []), getAllschool()
             }, 2000)
         }
+        //地区选择close btn
+        function closeSelectarea() {
+            provinceOptions.value.provinceValue = ''
+            provinceOptions.value.optionInfo = []
+            cityOptions.value.cityValue = ''
+            cityOptions.value.cityInfo = []
+            distOptions.value.distValue = ''
+            distOptions.value.distInfo = []
+            tableData.value = originalData.value
+            provinceOptions.value.optionInfo = optionsData
+        }
         getAllschool()
         getAllassists()
         return {
@@ -485,6 +501,7 @@ export default {
             areaSelect,
             updateSuccess,
             PowerShow,
+            closeSelectarea,
         }
     },
 }
@@ -570,7 +587,8 @@ export default {
 }
 .province-box,
 .city-box,
-.dist-box {
+.dist-box,
+.close-box {
     display: inline-block;
 }
 .city-box,
@@ -718,6 +736,17 @@ export default {
     overflow: hidden;
     margin-top: -135px;
 }
+.closebtnIcon {
+    width: 1.8em;
+    height: 1.8em;
+    vertical-align: -0.6em;
+    fill: currentColor;
+    overflow: hidden;
+    margin-left: 8px;
+}
+.closebtnIcon:hover {
+    cursor: pointer;
+}
 </style>
 <style>
 .schoolbox .el-cascader {

+ 26 - 3
TEAMModelOS/ClientApp/src/assets/iconfont/demo_index.html

@@ -54,6 +54,12 @@
       <div class="content unicode" style="display: block;">
           <ul class="icon_lists dib-box">
           
+            <li class="dib">
+              <span class="icon iconfont">&#xe66c;</span>
+                <div class="name">应用</div>
+                <div class="code-name">&amp;#xe66c;</div>
+              </li>
+          
             <li class="dib">
               <span class="icon iconfont">&#xe66a;</span>
                 <div class="name">错题集</div>
@@ -1146,9 +1152,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1642057953481') format('woff2'),
-       url('iconfont.woff?t=1642057953481') format('woff'),
-       url('iconfont.ttf?t=1642057953481') format('truetype');
+  src: url('iconfont.woff2?t=1642388886077') format('woff2'),
+       url('iconfont.woff?t=1642388886077') format('woff'),
+       url('iconfont.ttf?t=1642388886077') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -1174,6 +1180,15 @@
       <div class="content font-class">
         <ul class="icon_lists dib-box">
           
+          <li class="dib">
+            <span class="icon iconfont icon-app"></span>
+            <div class="name">
+              应用
+            </div>
+            <div class="code-name">.icon-app
+            </div>
+          </li>
+          
           <li class="dib">
             <span class="icon iconfont icon-cuotiji"></span>
             <div class="name">
@@ -2812,6 +2827,14 @@
       <div class="content symbol">
           <ul class="icon_lists dib-box">
           
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-app"></use>
+                </svg>
+                <div class="name">应用</div>
+                <div class="code-name">#icon-app</div>
+            </li>
+          
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-cuotiji"></use>

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

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 2000444 */
-  src: url('iconfont.woff2?t=1642057953481') format('woff2'),
-       url('iconfont.woff?t=1642057953481') format('woff'),
-       url('iconfont.ttf?t=1642057953481') format('truetype');
+  src: url('iconfont.woff2?t=1642388886077') format('woff2'),
+       url('iconfont.woff?t=1642388886077') format('woff'),
+       url('iconfont.ttf?t=1642388886077') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-app:before {
+  content: "\e66c";
+}
+
 .icon-cuotiji:before {
   content: "\e66a";
 }

File diff suppressed because it is too large
+ 1 - 1
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.js


+ 7 - 0
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.json

@@ -5,6 +5,13 @@
   "css_prefix_text": "icon-",
   "description": "",
   "glyphs": [
+    {
+      "icon_id": "25739378",
+      "name": "应用",
+      "font_class": "app",
+      "unicode": "e66c",
+      "unicode_decimal": 58988
+    },
     {
       "icon_id": "12391416",
       "name": "错题集",

二進制
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.ttf


二進制
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff


二進制
TEAMModelOS/ClientApp/src/assets/iconfont/iconfont.woff2


+ 14 - 2
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -428,7 +428,7 @@ export default {
                     },
                     {
                         icon: 'iconfont icon-name-list',
-                        name: '研修名单',
+                        name: this.$t('system.menu.trainList'),
                         router: '/home/trainList',
                         tag: '',
                         role: 'admin',
@@ -438,7 +438,7 @@ export default {
                     },
                     {
                         icon: 'iconfont icon-assess',
-                        name: '研修考核',
+                        name: this.$t('system.menu.trainCheck'),
                         router: '/home/assessment',
                         tag: '',
                         role: 'admin',
@@ -500,6 +500,18 @@ export default {
                     menuName: 'OpenPlat',
                     child: [],
                     isShow: process.env.NODE_ENV == 'development' && this.checkHost()
+                },
+                //三方平台
+                {
+                    icon: 'iconfont icon-app',
+                    name: this.$t('system.menu.platform'),
+                    router: '/home/mgtPlatform',
+                    tag: '',
+                    role: 'admin',
+                    permission: '',
+                    menuName: 'mgtPlatform',
+                    child: [],
+                    isShow: process.env.NODE_ENV == 'development' && this.checkHost()
                 }
             ] : []
             this.teacherMenu = [

+ 1 - 1
TEAMModelOS/ClientApp/src/components/questionnaire/BaseQuestionnaire.vue

@@ -291,7 +291,7 @@
 					// 如果是区级
 					if(qnItem.owner === 'area'){
 						blobHost = this.$store.state.user.osblob_uri
-						sasString = { sas : '?' + this.$store.state.user.osblob_sas }
+						sasString = { sas : '?' + this.$store.state.user.userProfile.osblob_sas }
 					}
 					
 					let indexJson = JSON.parse(await this.$tools.getFile(blobHost + qnItem.blob + sasString.sas))

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

@@ -70,7 +70,10 @@ export default {
         cusVideos:'Lesson Data',
         cusVideoMgt:'Lesson Management',
         lockTips:'Lock Menu Bar',
-        unlockTips:'Unlock Menu Bar'
+        unlockTips:'Unlock Menu Bar',
+        platform:'三方平台',
+        trainList:'研修名單',
+        trainCheck:'研修考核'
     },
     compt: {
         cusWare: 'Teaching Material',

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

@@ -70,7 +70,10 @@ export default {
         cusVideos:'课例数据',
         cusVideoMgt:'课例管理',
         lockTips:'锁定菜单栏',
-        unlockTips:'解锁菜单栏'
+        unlockTips:'解锁菜单栏',
+        platform:'三方平台',
+        trainList:'研修名单',
+        trainCheck:'研修考核'
     },
     compt: {
         cusWare: '课件',

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

@@ -70,7 +70,10 @@ export default {
         cusVideos:'課例數據',
         cusVideoMgt:'課例管理',
         lockTips:'鎖定菜單欄',
-        unlockTips:'解鎖菜單欄'
+        unlockTips:'解鎖菜單欄',
+        platform:'三方平台',
+        trainList:'研修名單',
+        trainCheck:'研修考核'
     },
     compt: {
         cusWare: '教材',

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

@@ -687,7 +687,7 @@ export const routes = [{
 	{
 		path: 'homePage',
 		name: 'homePage',
-		component: resolve => require(['@/view/homepage/NewHomePage.vue'], resolve),
+		component: resolve => require(['@/view/homepage/HomePage.vue'], resolve),
 		meta: {
 			activeName: 'homePage'
 		}
@@ -1100,6 +1100,15 @@ export const routes = [{
 			activeName: 'version'
 		}
 	},
+	// 三方平台
+	{
+		path: 'mgtPlatform',
+		name: 'mgtPlatform',
+		component: resolve => require(['@/view/mgtPlatform/MgtPlatform.vue'], resolve),
+		meta: {
+			activeName: 'mgtPlatform'
+		}
+	},
 	//学校产品授权管理
 	{
 		path: 'auth',
@@ -1367,6 +1376,15 @@ export const routes = [{
 				activeName: 'areaRes'
 			}
 		},
+		// 三方平台管理
+		{
+			path: 'mgtPlatform',
+			name: 'mgtPlatform',
+			component: resolve => require(['@/view/mgtPlatform/MgtPlatform.vue'], resolve),
+			meta: {
+				activeName: 'mgtPlatform'
+			}
+		}
 	]
 },
 // 扫码签到

+ 84 - 73
TEAMModelOS/ClientApp/src/view/areaMgmt/AreaLayout.vue

@@ -3,19 +3,14 @@
         <!-- 头部菜单栏 -->
         <Header class="header">
             <div class="logo-wrap">
-                <!-- <img src="@/assets/login/ies5_logo_2.svg" :class="isCollapsed ? 'collapsed-logo-width unit-logo':'collapsed-logo-width  unit-logo'" v-show="isShowLogo" /> -->
                 <BaseAreaList></BaseAreaList>
             </div>
             <div class="school-wrap">
-                <!-- <BaseSelectSchool></BaseSelectSchool> -->
             </div>
             <slot name="header-content"></slot>
         </Header>
         <!-- 侧边菜单栏 -->
-        <Sider class="biz-menu"  @mouseover.native="mouseOver" @mouseleave.native="mouseLeave" ref="side1" hide-trigger collapsible width="190" :collapsed-width="78" v-model="isCollapsed">
-            <!-- <div class="collapse-icon-box" @click="changeMenuStatus">
-                <Icon :class="rotateIcon" custom="iconfont icon-arrow" style="color:var(--border-color)" @click.stop="changeMenuStatus" size="12" />
-            </div> -->
+        <Sider class="biz-menu" @mouseover.native="mouseOver" @mouseleave.native="mouseLeave" ref="side1" hide-trigger collapsible width="190" :collapsed-width="78" v-model="isCollapsed">
             <Menu style="margin-top:15px" width="auto" :class="['menu-item', isCollapsed ? 'collapsed-menu' : '']" accordion :active-name="activeName" :open-names="openNames">
                 <vuescroll :ops="ops">
                     <MenuGroup :title="isCollapsed ? $t('area.base.area') : $t('area.base.areaFull')">
@@ -68,7 +63,7 @@
             </Menu>
             <p class="copyright-info">
                 <!-- {{$t('system.menu.copyright')}} -->
-                <Icon :title="isLock ? $t('system.menu.unlockTips') : $t('system.menu.lockTips')" :custom="isLock ? 'iconfont icon-lock' : 'iconfont icon-unlock'" @click="isLock = !isLock" class="lock-menu-btn"/>
+                <Icon :title="isLock ? $t('system.menu.unlockTips') : $t('system.menu.lockTips')" :custom="isLock ? 'iconfont icon-lock' : 'iconfont icon-unlock'" @click="isLock = !isLock" class="lock-menu-btn" />
             </p>
         </Sider>
         <!-- Body内容部分 -->
@@ -106,46 +101,15 @@ export default {
             if (!this.isLock) this.isCollapsed = true
         },
         //根据域名判断菜单是否显示
-        checkHost(){
+        checkHost() {
             let host = window.location.host
             // let host = 'jinniu.teammodel.cn'
-            return host != 'jinniu.teammodel.cn'  
+            return host != 'jinniu.teammodel.cn'
         },
         initMenu() {
             // 区级菜单
             this.areaMenu = [
-                // {
-                //     icon: 'iconfont icon-shujufenxi',
-                //     name: '区级数据',
-                //     router: '/area/areaMgmt',
-                //     tag: '',
-                //     role: '',
-                //     permission: '',
-                //     menuName: 'areaMgmt',
-                //     child: []
-                // },
-				{
-				    icon: 'iconfont icon-basic-setting',
-				    name: this.$t('area.base.setting'),
-				    router: '/area/areaSetting',
-				    tag: '',
-				    role: 'admin|teacher|expert',
-				    permission: '',
-				    menuName: 'areaSetting',
-				    child: [],
-				    isShow: this.$store.state.config.srvAdr == 'China'
-				},
-                {
-                    icon: 'iconfont icon-policy',
-                    name: this.$t('system.menu.policy'),
-                    router: '/area/policy',
-                    tag: '',
-                    role: 'admin|teacher|expert',
-                    permission: '',
-                    menuName: 'policy',
-                    child: [],
-                    isShow: this.$store.state.config.srvAdr == 'China'
-                },
+                
                 {
                     icon: 'iconfont icon-activityS',
                     name: this.$t('area.base.allAc'),
@@ -168,17 +132,7 @@ export default {
                     child: [],
                     isShow: true
                 },
-				{
-				    icon: 'iconfont icon-spot-check',
-				    name: this.$t('area.base.expertCk'),
-				    router: '/area/spotCheck',
-				    tag: '',
-				    role: '',
-				    permission: '',
-				    menuName: 'spotCheck',
-				    child: [],
-                    isShow: this.$store.state.config.srvAdr == 'China'
-				},
+
                 {
                     icon: 'iconfont icon-vote',
                     name: this.$t('system.menu.scVote'),
@@ -199,30 +153,87 @@ export default {
                     permission: '',
                     menuName: 'manageAreaQuestionnaire',
                     child: [],
-                    isShow: true 
+                    isShow: true
                 },
-				{
-				    icon: 'iconfont icon-ability-point',
-				    name: this.$t('area.base.point'),
-				    router: '/area/areaAbilityMgmt',
-				    tag: '',
-				    role: '',
-				    permission: '',
-				    menuName: 'areaAbilityMgmt',
-				    child: [],
-                    isShow: this.$store.state.config.srvAdr == 'China'
-				},
                 {
-				    icon: 'iconfont icon-resource',
-				    name: this.$t('system.menu.resourceCenter'),
-				    router: '/area/areaRes',
-				    tag: '',
-				    role: '',
-				    permission: '',
-				    menuName: 'areaRes',
-				    child: [],
+                    icon: 'iconfont icon-app',
+                    name:  this.$t('system.menu.platform'),
+                    router: '/area/mgtPlatform',
+                    tag: '',
+                    role: '',
+                    permission: '',
+                    menuName: 'mgtPlatform',
+                    child: [],
+                    isShow: true
+                },
+                {
+                    icon: 'iconfont icon-basic-setting',
+                    name: this.$t('system.menu.train'),
+                    router: '',
+                    tag: '',
+                    subName: 'trainCenter',
+                    role: 'admin|teacher|expert',
+                    permission: '',
+                    menuName: 'areaSetting',
+                    child: [
+                        {
+                            icon: 'iconfont icon-basic-setting',
+                            name: this.$t('area.base.setting'),
+                            router: '/area/areaSetting',
+                            tag: '',
+                            role: 'admin|teacher|expert',
+                            permission: '',
+                            menuName: 'areaSetting',
+                            child: [],
+                            isShow: this.$store.state.config.srvAdr == 'China'
+                        },
+                        {
+                            icon: 'iconfont icon-policy',
+                            name: this.$t('system.menu.policy'),
+                            router: '/area/policy',
+                            tag: '',
+                            role: 'admin|teacher|expert',
+                            permission: '',
+                            menuName: 'policy',
+                            child: [],
+                            isShow: this.$store.state.config.srvAdr == 'China'
+                        },
+                        {
+                            icon: 'iconfont icon-spot-check',
+                            name: this.$t('area.base.expertCk'),
+                            router: '/area/spotCheck',
+                            tag: '',
+                            role: '',
+                            permission: '',
+                            menuName: 'spotCheck',
+                            child: [],
+                            isShow: this.$store.state.config.srvAdr == 'China'
+                        },
+                        {
+                            icon: 'iconfont icon-ability-point',
+                            name: this.$t('area.base.point'),
+                            router: '/area/areaAbilityMgmt',
+                            tag: '',
+                            role: '',
+                            permission: '',
+                            menuName: 'areaAbilityMgmt',
+                            child: [],
+                            isShow: this.$store.state.config.srvAdr == 'China'
+                        },
+                        {
+                            icon: 'iconfont icon-resource',
+                            name: this.$t('system.menu.resourceCenter'),
+                            router: '/area/areaRes',
+                            tag: '',
+                            role: '',
+                            permission: '',
+                            menuName: 'areaRes',
+                            child: [],
+                            isShow: this.$store.state.config.srvAdr == 'China'
+                        }
+                    ],
                     isShow: this.$store.state.config.srvAdr == 'China'
-				}
+                }
             ]
         },
         changeMenuStatus() {

+ 0 - 122
TEAMModelOS/ClientApp/src/view/areaMgmt/PolicyMgt.vue

@@ -1,122 +0,0 @@
-<template>
-    <div class="policy-mgt-container">
-        <div class="policy-mgt-header">
-            <span class="policy-label">政策列表</span>
-            <span class="add-policy" @click="addStatus = true">
-                <Icon type="md-add" />
-                添加政策
-            </span>
-        </div>
-        <div class="policy-mgt-list">
-            <vuescroll>
-                <div class="policy-info-item" v-for="(item,index) in policyList" :key="index">
-
-                </div>
-            </vuescroll>
-        </div>
-        <Modal v-model="addStatus" title="添加政策">
-            <Form :model="policyInfo" :label-width="80">
-                <FormItem label="类型">
-                    <Select v-model="policyInfo.tag">
-                        <Option :value="item.value" v-for="(item,index) in tagList" :key="index">
-                            {{item.label}}
-                        </Option>
-                    </Select>
-                </FormItem>
-            </Form>
-        </Modal>
-    </div>
-</template>
-<script>
-export default {
-    data() {
-        return {
-            tagList: [
-                {
-                    label: '国家文件',
-                    value: 'country'
-                },
-                {
-                    label: '省级文件',
-                    value: 'province'
-                },
-                {
-                    label: '市级文件',
-                    value: 'city'
-                },
-                {
-                    label: '解读课程',
-                    value: 'course'
-                }
-            ],
-            addStatus: false,
-            policyList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
-            policyInfo: {
-                tag: '',
-                thum: "",
-                subtitle: "",
-                content: "",
-                name: "",
-                url: "",
-                size: 1024,
-                createTime: 1631759300000,
-                extension: "doc",
-                type: "doc"
-            }
-        }
-    },
-    methods: {
-        findPolicy() {
-            let params = {
-                areaId: sessionStorage.getItem('areaId')
-            }
-            this.$api.ability.getResAndPolicy(params).then(
-                res => {
-
-                },
-                err => {
-
-                }
-            )
-        }
-    },
-    created() {
-        this.findPolicy()
-    }
-}
-</script>
-<style lang="less" scoped>
-.policy-mgt-container {
-    width: 100%;
-    height: 100%;
-}
-.policy-mgt-header {
-    width: 100%;
-    height: 45px;
-    box-shadow: 0px 2px 5px #e9e9e9;
-    line-height: 45px;
-    padding: 0px 10px;
-}
-.add-policy {
-    float: right;
-    margin-right: 20px;
-    cursor: pointer;
-    user-select: none;
-}
-.policy-label {
-    margin-left: 10px;
-}
-.policy-mgt-list {
-    width: 100%;
-    padding-top: 10px;
-    height: ~"calc(100% - 45px)";
-}
-.policy-info-item {
-    width: ~"calc(100% - 20px)";
-    height: 120px;
-    background: white;
-    margin-left: 10px;
-    border: 1px solid var(--border-color);
-    margin-bottom: 5px;
-}
-</style>

+ 2 - 2
TEAMModelOS/ClientApp/src/view/areatrain/Create.vue

@@ -670,8 +670,8 @@ export default {
                         }
                     })
                     // 现在不用每个学校上传资源,直接传到区级容器
-                    let uri = this.$store.state.user.osblob_uri
-                    let sas = this.$store.state.user.osblob_sas
+                    let uri = this.$store.state.user.userProfile.osblob_uri
+                    let sas = this.$store.state.user.userProfile.osblob_sas
                     let areaBlob = {
                         url: uri.substring(0, uri.lastIndexOf('/')),
                         id: uri.substring(uri.lastIndexOf('/') + 1),

+ 2 - 2
TEAMModelOS/ClientApp/src/view/areatrain/SurveyDetail.vue

@@ -139,8 +139,8 @@ export default {
         getBlobItems(qnItem) {
             return new Promise(async (resolve, reject) => {
                 let promiseArr = []
-                let blobHost = qnItem.owner === 'area' ? this.$store.state.user.osblob_uri : this.schoolInfo.uri
-                let sas = qnItem.owner === 'area' ?  ('?' + this.$store.state.user.osblob_sas) : ('?' + this.schoolInfo.sas)
+                let blobHost = qnItem.owner === 'area' ? this.$store.state.user.userProfile.osblob_uri : this.schoolInfo.uri
+                let sas = qnItem.owner === 'area' ?  ('?' + this.$store.state.user.userProfile.osblob_sas) : ('?' + this.schoolInfo.sas)
 
                 let indexJson = JSON.parse(await this.$tools.getFile(blobHost + qnItem.blob + sas))
                 if (indexJson.slides.length) {

+ 24 - 0
TEAMModelOS/ClientApp/src/view/homepage/NewHomePage.less

@@ -373,3 +373,27 @@
     align-items: center;
     flex-wrap: wrap;
 }
+.platform-img {
+    width: 100px;
+    height: 60px;
+    background-size: contain;
+    background-repeat: no-repeat;
+    background-position: center;
+}
+.platform-item{
+    cursor: pointer;
+    display: flex;
+    margin-right: 5px;
+    // align-items: center;
+    padding: 5px 0px;
+    margin-bottom: 10px;
+    border-bottom: 1px solid #f3f3f3;
+    &:hover{
+        background: #f3f3f3;
+    }
+}
+.platform-name{
+    font-size: 16px;
+    margin-left: 10px;
+    color: #2d8cf0;
+}

+ 48 - 5
TEAMModelOS/ClientApp/src/view/homepage/NewHomePage.vue

@@ -160,14 +160,27 @@
                         </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">第三方平台链接</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>
@@ -195,6 +208,8 @@ export default {
     inject: ['reload'],
     data() {
         return {
+            platformList: [],
+            areaSas: '',
             scoreCount: [0, 0],
             weekData: [],
             recordData: {},
@@ -301,6 +316,9 @@ export default {
         }
     },
     methods: {
+        openPlatform(index){
+            window.open(this.platformList[index].url)
+        },
         //查看课堂记录统计数据
         getTeacherRecordData() {
             this.$api.lessonRecord.getTeacherRecordData({
@@ -470,7 +488,30 @@ export default {
                 path: '/home/settings'
             })
         },
-
+        //查询资源文件
+        getAreaSource() {
+            let params = {
+                areaId: sessionStorage.getItem('areaId')
+            }
+            this.$api.ability.getResAndPolicy(params).then(
+                res => {
+                    if (res.error == 404) {
+                        this.$Message.warning('暂无数据')
+                    } else if (res.error) {
+                        this.$Message.error('查询失败')
+                    } 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
+                        }
+                        this.fullData = res.file
+                    }
+                },
+                err => {
+                    this.$Message.error('查询失败')
+                }
+            )
+        },
         //获取活动统计数据已经进行中的活动
         getAcCount() {
             this.isLoading = true
@@ -514,11 +555,13 @@ export default {
         }
     },
     created() {
+        this.areaSas = this.$store.state.user.userProfile.osblob_sas
+        this.getAreaSource()
         this.getAcCount()
         this.getTeacherRecordData()
         if (this.$store.state.userInfo.hasSchool) {
             this.findNotice()
-            if(this.$store.state.config.srvAdr == 'China'){
+            if (this.$store.state.config.srvAdr == 'China') {
                 this.getStudyTime()
             }
         }
@@ -556,7 +599,7 @@ export default {
 }
 </script>
 <style scoped lang="less">
-@import "./NewHomePage.less";
+@import "./HomePage.less";
 </style>
 <style lang="less">
 .home-page-container .ivu-card-body {

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

@@ -108,8 +108,8 @@ export default {
                 let sasString = await this.$tools.getSchoolSas()
                 // 如果是区级
                 if(qnItem.owner === 'area'){
-					blobHost = this.$store.state.user.osblob_uri
-					sasString = { sas : '?' + this.$store.state.user.osblob_sas }
+					blobHost = this.$store.state.user.userProfile.osblob_uri
+					sasString = { sas : '?' + this.$store.state.user.userProfile.osblob_sas }
 				}
                 let promiseArr = []
                 let indexJson = JSON.parse(await this.$tools.getFile(blobHost + qnItem.blob + sasString.sas))

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

@@ -105,8 +105,8 @@ export default {
                 let sasString = await this.$tools.getSchoolSas()
 				// 如果是区级
 				if(qnItem.owner === 'area'){
-					blobHost = this.$store.state.user.osblob_uri
-					sasString = { sas : '?' + this.$store.state.user.osblob_sas }
+					blobHost = this.$store.state.user.userProfile.osblob_uri
+					sasString = { sas : '?' + this.$store.state.user.userProfile.osblob_sas }
 				}
                 let promiseArr = []
                 let indexJson = JSON.parse(await this.$tools.getFile(blobHost + qnItem.blob + sasString.sas))

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

@@ -204,8 +204,8 @@ export default {
                 let promiseArr = []
 				// 如果是区级
 				if(qnItem.owner === 'area'){
-					blobHost = this.$store.state.user.osblob_uri
-					sasString = { sas : '?' + this.$store.state.user.osblob_sas }
+					blobHost = this.$store.state.user.userProfile.osblob_uri
+					sasString = { sas : '?' + this.$store.state.user.userProfile.osblob_sas }
 				} else {
                     blobHost = blobHost + '/' + cntr
                     sasString = { sas : sasString }

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

@@ -887,7 +887,7 @@ export default {
                 this.previewFile.title = item.title;
                 this.previewStatus = true
                 let urls = this.$evTools.getBlobHost() + "/" + item.cntr + item.link + '?';
-                let urlsas = urls + this.$store.state.user.osblob_sas;
+                let urlsas = urls + this.$store.state.user.userProfile.osblob_sas;
                 this.previewFile.url = urlsas;
                 // pdf只能跳转页面预览
                 if (

+ 343 - 0
TEAMModelOS/ClientApp/src/view/mgtPlatform/MgtPlatform.vue

@@ -0,0 +1,343 @@
+<template>
+    <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">
+                        <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>平台:</span>
+                        {{item.name}}
+                    </p>
+                </div>
+                <div class="add-platform-box" @click="addStatus = true" v-show="platformList.links.length && isArea">
+                    <Icon type="md-add-circle" class="add-platform-icon" />
+                    <p class="add-platform-text">添加资源</p>
+                </div>
+                <EmptyData v-show="!platformList.links.length" textContent="暂未添加第三方平台" :top="120"></EmptyData>
+                <p class="add-platform" v-show="!platformList.links.length && isArea" @click="addStatus = true">
+                    <Icon type="md-add" />
+                    添加第三方平台
+                </p>
+            </div>
+
+        </vuescroll>
+        <Modal v-model="addStatus" title="添加平台链接" @on-ok="confirmAdd" @on-cancel="cancelAdd" :loading="modalLoading" :width="800">
+            <Form ref="platform" :model="platform" :rules="platformRule" :label-width="60" label-colon>
+                <FormItem prop="thum" label="封面">
+                    <Upload v-show="!platform.thum" ref="upload" :show-upload-list="false" :format="['jpg','jpeg','png']" :max-size="1024" :on-format-error="handleFormatError" :on-exceeded-size="handleMaxSize" :before-upload="uploadPoster" type="drag" action="" style="display: inline-block;width:100px;">
+                        <div style="width: 100px;height:58px;line-height: 58px;">
+                            <Icon type="ios-image" size="20"></Icon>
+                        </div>
+                    </Upload>
+                    <img v-show="platform.thum" :src="platform.thum+'?' + areaSas" class="poster-img">
+                    <span v-if="platform.thum" @click="platform.thum = ''" class="upd-again">重新上传</span>
+                </FormItem>
+                <FormItem prop="name" label="名称">
+                    <Input v-model="platform.name" placeholder="请输入第三方平台名称" :maxlength="18" show-word-limit></Input>
+                </FormItem>
+                <FormItem label="链接" prop="url">
+                    <Input v-model="platform.url" placeholder="请输入资源链接" />
+                </FormItem>
+                <FormItem label="描述">
+                    <Input type="textarea" :rows="4" v-model="platform.content" placeholder="资源描述信息" />
+                </FormItem>
+            </Form>
+        </Modal>
+    </div>
+</template>
+<script>
+import BlobTool from '@/utils/blobTool.js'
+export default {
+    data() {
+        const validateUrl = (rule, value, callback) => {
+            if (value) {
+                let flag = this.$tools.isURL(value)
+                if (flag) {
+                    callback()
+                } else {
+                    callback(new Error('请输入正确的链接地址'))
+                }
+            } else {
+                callback(new Error('请输入平台地址'))
+            }
+        }
+        return {
+            areaSas: '',
+            fullData: {},
+            platformList: {
+                tag: 'default',
+                links: []
+            },
+            addStatus: false,
+            modalLoading: true,
+            platformRule: {
+                name: [
+                    { required: true, message: '请输入平台名称', trigger: 'change' }
+                ],
+                type: [
+                    { required: true, message: '请选择文件类型', trigger: 'change' }
+                ],
+                thum: [
+                    { required: true, message: '请上传平台Logo', trigger: 'change' }
+                ],
+                url: [
+                    { required: true, validator: validateUrl, trigger: 'change' }
+                ]
+            },
+            platform: {
+                url: '',
+                name: '',
+                content: '',
+                thum: ''
+            }
+        }
+    },
+    methods: {
+        openThirdPlatform(index) {
+            window.open(this.platformList.links[index].url)
+        },
+        delPlatform(index) {
+            this.$Modal.confirm({
+                title: "删除第三方平台",
+                content: `是否确认删除${this.platformList.links[index].name}?`,
+                onOk: () => {
+                    this.platformList.links.splice(index, 1)
+                    this.fullData.third = [this.platformList]
+                    this.$api.ability.upsertResAndPolicy(this.fullData).then(
+                        res => {
+                            this.$Message.success('保存成功')
+                            this.fullData = res.file
+                            this.platformList = this.fullData.third.find(item => item.tag == 'default')
+                            this.addStatus = false
+                        },
+                        err => {
+                            this.$Message.error('保存失败')
+                        }
+                    )
+                }
+            })
+
+        },
+        uploadPoster(file) {
+            console.log(file)
+            if (file.size > 1024 * 1024) {
+                this.handleMaxSize()
+                return false
+            }
+            let format = 'jpg,JPG,jpeg,JPEG,png,PNG'
+            let extension = file.name.substring(file.name.lastIndexOf('.') + 1)
+            if (!format.includes(extension)) {
+                this.handleFormatError()
+                return false
+            }
+            let blobUrl = this.$store.state.user.userProfile.osblob_uri
+            let blobSas = this.$store.state.user.userProfile.osblob_sas
+            let host = blobUrl.substring(0, blobUrl.lastIndexOf('/'))
+            let container = blobUrl.substring(blobUrl.lastIndexOf('/') + 1)
+            let containerClient = new BlobTool(host, container, '?' + blobSas, 'school')
+            let filePath = `${sessionStorage.getItem('areaId')}/image`
+            containerClient.upload(file, {
+                path: filePath,
+                checkSize: false,
+                root: sessionStorage.getItem('areaId') + '/'
+            }).then(
+                res => {
+                    this.platform.thum = res.url
+                },
+                err => {
+                    this.$Message.error('上传失败')
+                }
+            )
+            return false
+        },
+        handleFormatError(file) {
+            this.$Message.error('文件格式不支持')
+        },
+        handleMaxSize(file) {
+            this.$Message.error('文件超过大小限制')
+        },
+        //查询资源文件
+        getAreaSource() {
+            let params = {
+                areaId: sessionStorage.getItem('areaId')
+            }
+            this.$api.ability.getResAndPolicy(params).then(
+                res => {
+                    if (res.error == 404) {
+                        this.$Message.warning('暂无数据')
+                    } else if (res.error) {
+                        this.$Message.error('查询失败')
+                    } 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.fullData = res.file
+                    }
+                },
+                err => {
+                    this.$Message.error('查询失败')
+                }
+            )
+        },
+        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.fullData = res.file
+                            this.platformList = this.fullData.third.find(item => item.tag == 'default')
+                            this.addStatus = false
+                        },
+                        err => {
+                            this.$Message.error('保存失败')
+                        }
+                    )
+                } else {
+                    this.$Message.error('请检查信息是否正确完整填写')
+                    this.modalLoading = false
+                    setTimeout(() => {
+                        this.modalLoading = true
+                    })
+                }
+            })
+        },
+        cancelAdd() {
+
+        }
+    },
+    created() {
+        this.areaSas = this.$store.state.user.userProfile.osblob_sas
+        this.getAreaSource()
+    },
+    computed: {
+        isArea() {
+            let areas = this.$store.state.user.userProfile.areas
+            let url = window.location.href
+            return !!areas.length && url.includes('area')
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.mgt-platform-container {
+    width: 100%;
+    height: 100%;
+    background: #f3f3f3;
+}
+.add-platform-box {
+    height: 240px;
+    width: 300px;
+    background: #fcfcfc;
+    border: 1px solid #f0f0f0;
+    border-radius: 5px;
+    overflow: hidden;
+    margin-bottom: 30px;
+    margin-right: 30px;
+    // margin-top: 5px;
+    cursor: pointer;
+    text-align: center;
+    padding: 40px 10px;
+    &:hover {
+        box-shadow: 0 26px 40px -24px #aaa;
+    }
+}
+.platform-list-wrap {
+    display: flex;
+    width: 100%;
+}
+.add-platform-icon {
+    font-size: 50px;
+    margin-top: 15px;
+    display: block;
+}
+.add-platform-text {
+    margin-top: 15px;
+}
+.add-platform {
+    text-align: center;
+    color: white;
+    background: #2d8cf0;
+    width: fit-content;
+    padding: 3px 12px;
+    border-radius: 4px;
+    margin: auto;
+    margin-top: 15px;
+    cursor: pointer;
+    user-select: none;
+    &:hover {
+        background: #2b85e4;
+    }
+}
+.delete-platform-icon {
+    position: absolute;
+    z-index: 99999;
+    right: -12px;
+    top: -10px;
+    display: block;
+    width: 24px;
+    height: 24px;
+    text-align: center;
+    box-shadow: 0px 0px 2px 2px rgba(153, 177, 184, 0.2);
+    border-radius: 50%;
+    cursor: pointer;
+    display: none;
+    background: #ed4014;
+    color: white;
+}
+.poster-img {
+    width: 150px;
+}
+.upd-again {
+    color: #2db7f5;
+    font-size: 12px;
+    cursor: pointer;
+    margin-left: 10px;
+}
+.platform-item {
+    width: 300px;
+    height: 240px;
+    background: #fcfcfc;
+    border: 1px solid #f0f0f0;
+    border-radius: 5px;
+    // overflow: hidden;
+    margin-bottom: 30px;
+    margin-right: 30px;
+    // margin-top: 10px;
+    cursor: pointer;
+    position: relative;
+    transition: all 0.2s ease 0s;
+    &:hover {
+        box-shadow: 0 26px 40px -24px #aaa;
+        .delete-platform-icon {
+            display: block;
+        }
+    }
+    .platform-img {
+        transition: all 0.3s;
+        width: 300px;
+        height: 180px;
+        background-size: contain;
+        background-repeat: no-repeat;
+        background-position: center;
+        background-repeat: no-repeat;
+    }
+    .img-text {
+        background: white;
+        color: #303030;
+        font-size: 14px;
+        padding: 15px 5px;
+    }
+}
+</style>
+<style lang="less">
+.mgt-platform-container .__view {
+    padding: 20px 30px;
+}
+</style>

+ 2 - 2
TEAMModelOS/ClientApp/src/view/questionnaire/ManageQuestionnaire.vue

@@ -539,10 +539,10 @@
 			doUploadAreaBlob(qnBaseInfo, items) {
 				return new Promise(async (resolve, reject) => {
 					try {
-						let s = this.$store.state.user.osblob_uri
+						let s = this.$store.state.user.userProfile.osblob_uri
 						// 获取初始化Blob需要的数据
 						let sasData = {
-							sas: '?' + this.$store.state.user.osblob_sas,
+							sas: '?' + this.$store.state.user.userProfile.osblob_sas,
 							name: 'teammodelos',
 							// url: s.split(s.substring(s.lastIndexOf('/')))[0]
 							url: this.$evTools.getBlobHost(s)

+ 3 - 3
TEAMModelOS/ClientApp/src/view/resource/Policy.vue

@@ -207,8 +207,8 @@ export default {
                 })
                 return false
             }
-            let blobUrl = this.$store.state.user.osblob_uri
-            let blobSas = this.$store.state.user.osblob_sas
+            let blobUrl = this.$store.state.user.userProfile.osblob_uri
+            let blobSas = this.$store.state.user.userProfile.osblob_sas
             let host = blobUrl.substring(0, blobUrl.lastIndexOf('/'))
             let container = blobUrl.substring(blobUrl.lastIndexOf('/') + 1)
             let containerClient = new BlobTool(host, container, '?' + blobSas, 'school')
@@ -535,7 +535,7 @@ export default {
         }
     },
     created() {
-        this.blobSas = this.$store.state.user.osblob_sas
+        this.blobSas = this.$store.state.user.userProfile.osblob_sas
         this.findPolicy()
     },
     computed: {

+ 24 - 14
TEAMModelOS/ClientApp/src/view/resource/SourceCenter.vue

@@ -44,12 +44,12 @@
                     <Input v-model="resInfo.name" placeholder="请输入资源标题"></Input>
                 </FormItem>
                 <FormItem prop="thum" label="封面">
-                    <Upload v-show="!resInfo.thum" ref="upload" :show-upload-list="false" :format="['jpg','jpeg','png']" :max-size="2048" :on-format-error="handleFormatError" :on-exceeded-size="handleMaxSize" :before-upload="uploadPoster" type="drag" action="" style="display: inline-block;width:100px;">
+                    <Upload v-show="!resInfo.thum" ref="upload" :show-upload-list="false" :before-upload="uploadPoster" type="drag" action="" style="display: inline-block;width:100px;">
                         <div style="width: 100px;height:58px;line-height: 58px;">
                             <Icon type="ios-image" size="20"></Icon>
                         </div>
                     </Upload>
-                    <img v-show="resInfo.thum" :src="resInfo.thum" class="poster-img">
+                    <img v-show="resInfo.thum" :src="resInfo.thum + '?' + areaSas" class="poster-img">
                     <span v-if="resInfo.thum" @click="resInfo.thum = ''" class="upd-again">重新上传</span>
                 </FormItem>
                 <FormItem label="类型" prop="type">
@@ -161,16 +161,27 @@ export default {
     },
     methods: {
         uploadPoster(file) {
-            let blobUrl = this.$store.state.user.osblob_uri
-            let blobSas = this.$store.state.user.osblob_sas
+            console.log(file)
+            if (file.size > 2 * 1024 * 1024) {
+                this.handleMaxSize()
+                return false
+            }
+            let format = 'jpg,JPG,jpeg,JPEG,png,PNG'
+            let extension = file.name.substring(file.name.lastIndexOf('.') + 1)
+            if (!format.includes(extension)) {
+                this.handleFormatError()
+                return false
+            }
+            let blobUrl = this.$store.state.user.userProfile.osblob_uri
+            let blobSas = this.$store.state.user.userProfile.osblob_sas
             let host = blobUrl.substring(0, blobUrl.lastIndexOf('/'))
             let container = blobUrl.substring(blobUrl.lastIndexOf('/') + 1)
             let containerClient = new BlobTool(host, container, '?' + blobSas, 'school')
             let filePath = `${sessionStorage.getItem('areaId')}/policy`
             containerClient.upload(file, {
-                path:filePath,
-                checkSize:false,
-                root:sessionStorage.getItem('areaId') + '/'
+                path: filePath,
+                checkSize: false,
+                root: sessionStorage.getItem('areaId') + '/'
             }).then(
                 res => {
                     console.log(res)
@@ -196,17 +207,17 @@ export default {
                 })
                 return false
             }
-            let blobUrl = this.$store.state.user.osblob_uri
-            let blobSas = this.$store.state.user.osblob_sas
+            let blobUrl = this.$store.state.user.userProfile.osblob_uri
+            let blobSas = this.$store.state.user.userProfile.osblob_sas
             let host = blobUrl.substring(0, blobUrl.lastIndexOf('/'))
             let container = blobUrl.substring(blobUrl.lastIndexOf('/') + 1)
             let containerClient = new BlobTool(host, container, '?' + blobSas, 'school')
             let filePath = `${sessionStorage.getItem('areaId')}/policy`
             this.uploading = true
             containerClient.upload(file, {
-                path:filePath,
-                checkSize:false,
-                root:sessionStorage.getItem('areaId') + '/'
+                path: filePath,
+                checkSize: false,
+                root: sessionStorage.getItem('areaId') + '/'
             }).then(
                 res => {
                     console.log(res)
@@ -274,7 +285,6 @@ export default {
             })
         },
         confirmAddRes() {
-            console.log('来了')
             this.$refs['resInfo'].validate((valid) => {
                 if (valid) {
                     console.log('通过')
@@ -356,7 +366,7 @@ export default {
     },
     created() {
         this.findResource()
-        this.areaSas = this.$store.state.user.osblob_sas
+        this.areaSas = this.$store.state.user.userProfile.osblob_sas
     },
     computed: {
         sourceListShow() {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/resource/SourceDetail.vue

@@ -78,7 +78,7 @@ export default {
         }
     },
     created() {
-        this.areaSas = this.$store.state.user.osblob_sas
+        this.areaSas = this.$store.state.user.userProfile.osblob_sas
         this.sourceList = this.$route.params.sourceList || []
         this.sourceInfo = this.$route.params.sourceInfo || {}
     }

+ 4 - 4
TEAMModelOS/ClientApp/src/view/train/SurveyDetail.vue

@@ -141,8 +141,8 @@ export default {
                 // 根据试卷的Blob地址 去读取JSON文件
                 // let blobHost = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri
                 let sasString = await this.$tools.getSchoolSas()
-                let blobHost = qnItem.owner === 'area' ? this.$store.state.user.osblob_uri : JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri
-                let sas = qnItem.owner === 'area' ?  ('?' + this.$store.state.user.osblob_sas) : sasString.sas
+                let blobHost = qnItem.owner === 'area' ? this.$store.state.user.userProfile.osblob_uri : JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri
+                let sas = qnItem.owner === 'area' ?  ('?' + this.$store.state.user.userProfile.osblob_sas) : sasString.sas
                 let promiseArr = []
                 let indexJson = await this.getBlobJsonFile(qnItem.owner, qnItem.blob)
                 if (indexJson.slides.length) {
@@ -176,8 +176,8 @@ export default {
                 // let sasString = scope === 'private' ? await this.$tools.getPrivateSas() : await this.$tools.getSchoolSas()
 
                 let sasString = await this.$tools.getSchoolSas()
-                let blobHost = owner === 'area' ? this.$store.state.user.osblob_uri : JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri
-                let sas = owner === 'area' ?  ('?' + this.$store.state.user.osblob_sas) : sasString.sas
+                let blobHost = owner === 'area' ? this.$store.state.user.userProfile.osblob_uri : JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri
+                let sas = owner === 'area' ?  ('?' + this.$store.state.user.userProfile.osblob_sas) : sasString.sas
                 try {
                     let itemJson = JSON.parse(await this.$tools.getFile(blobHost + url + sas))
                     resolve(itemJson)

+ 2 - 2
TEAMModelOS/ClientApp/src/view/train/TrainDetail.vue

@@ -1167,8 +1167,8 @@ export default {
                         // 获取作答数据
                         let sasString = await this.$tools.getSchoolSas()
                         console.log('学校blob', sasString)
-                        let blobHost = res.survey.owner === 'area' ? this.$store.state.user.osblob_uri : `${sasString.url}/${sasString.name}`
-                        let sas = res.survey.owner === 'area' ? ('?' + this.$store.state.user.osblob_sas) : sasString.sas
+                        let blobHost = res.survey.owner === 'area' ? this.$store.state.user.userProfile.osblob_uri : `${sasString.url}/${sasString.name}`
+                        let sas = res.survey.owner === 'area' ? ('?' + this.$store.state.user.userProfile.osblob_sas) : sasString.sas
                         let answerData = await this.$tools.getFile(blobHost + res.survey.recordUrl + sas)
                         answerData = JSON.parse(answerData || '{}')
                         if (answerData.urecord) {