Bladeren bron

Merge branch 'develop3.0' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0

李思淳 5 jaren geleden
bovenliggende
commit
f82c9481cd

+ 25 - 0
.dockerignore

@@ -0,0 +1,25 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md

+ 33 - 2
TEAMModelOS.SDK/Module/Grpc/Common/Internal/ProtoCommentGenerator.cs

@@ -18,10 +18,32 @@ namespace Grpc.Extension.Common.Internal
         static List<Type> protoTypes;
         static ProtoCommentGenerator()
         {
+
+            
+            string path = Environment.CurrentDirectory;
+            string[] temp = path.Split("\\".ToCharArray());
+            string patha = "";
+            for (int i = 0; i < temp.Length - 1; i++)
+            {
+                patha += temp[i];
+                patha += "\\";
+            }
             //加载注释xml文件
-            var files = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.xml");
+            ///var files = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.xml");
+            var files = Directory.GetFiles(patha, "*.xml", SearchOption.AllDirectories);
+            Dictionary<string, string> keys = new Dictionary<string, string>();
+            foreach (string file in files) {
+                string[] p= file.Split("\\".ToCharArray());
+                string fileName = p[p.Length - 1];
+                keys[fileName] = file;
+            }
+            List<string> fils = new List<string>();
+            foreach (string file in keys.Keys)
+            {
+                fils.Add(keys[file]);
+            }
             var assembliyNames = new List<string>();
-            foreach (var file in files)
+            foreach (var file in fils)
             {
                 var xe = XElement.Load(file);
                 //检查是否为注释xml文件
@@ -30,6 +52,15 @@ namespace Grpc.Extension.Common.Internal
                 foreach (var item in xe.Element("members").Elements())
                 {
                     var name = item.Attribute("name")?.Value;
+                    //bool flag = false;
+                    //foreach (XmlCommentInfo commentInfo in xmlComments) {
+                    //    if (name.Equals(commentInfo.FullName)) {
+                    //        flag = true;
+                    //    }
+                    //}
+                    //if (flag) {
+                    //    continue;
+                    //}
                     var nameArr = name?.Split(':');
                     if (name != null && nameArr.Length > 1)
                     {

+ 2 - 0
TEAMModelOS.SDK/Module/Grpc/Common/Internal/ProtoGenerator.cs

@@ -72,6 +72,7 @@ namespace Grpc.Extension.Common.Internal
                 if (!string.IsNullOrWhiteSpace(GrpcExtensionsOptions.Instance.ProtoNameSpace))
                 {
                     sb.AppendLine("option csharp_namespace = \"" + GrpcExtensionsOptions.Instance.ProtoNameSpace.Trim() +"."+ srv + "\";");
+                    sb.AppendLine("option java_package = \"" + GrpcExtensionsOptions.Instance.ProtoNameSpace.Trim() + "." + srv + "\";");
                 }
                 if (!string.IsNullOrWhiteSpace(pkgName))
                 {
@@ -128,6 +129,7 @@ namespace Grpc.Extension.Common.Internal
             if (!string.IsNullOrWhiteSpace(GrpcExtensionsOptions.Instance.ProtoNameSpace))
             {
                 sb.AppendLine("option csharp_namespace = \"" + GrpcExtensionsOptions.Instance.ProtoNameSpace.Trim() +"."+ srvName + "\";");
+                sb.AppendLine("option java_package = \"" + GrpcExtensionsOptions.Instance.ProtoNameSpace.Trim() + "." + srvName + "\";");
             }
             if (!string.IsNullOrWhiteSpace(pkgName))
             {

+ 1 - 7
TEAMModelOS.sln

@@ -9,9 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TEAMModelOS", "TEAMModelOS\
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TEAMModelOS.Service", "TEAMModelOS.Service\TEAMModelOS.Service.csproj", "{04508AB6-CD54-46B4-B96D-9672EB66761B}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TEAMModelOS.Grpc", "TEAMModelOS.Grpc\TEAMModelOS.Grpc.csproj", "{BD5B38BD-F2B8-4EB7-B060-9D757DC4D430}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TEAMModelGrpc", "TEAMModelGrpc\TEAMModelGrpc.csproj", "{7E4E8BEA-D487-45B5-A46D-16610B14CBD2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TEAMModelGrpc", "TEAMModelGrpc\TEAMModelGrpc.csproj", "{7E4E8BEA-D487-45B5-A46D-16610B14CBD2}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -31,10 +29,6 @@ Global
 		{04508AB6-CD54-46B4-B96D-9672EB66761B}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{04508AB6-CD54-46B4-B96D-9672EB66761B}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{04508AB6-CD54-46B4-B96D-9672EB66761B}.Release|Any CPU.Build.0 = Release|Any CPU
-		{BD5B38BD-F2B8-4EB7-B060-9D757DC4D430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{BD5B38BD-F2B8-4EB7-B060-9D757DC4D430}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{BD5B38BD-F2B8-4EB7-B060-9D757DC4D430}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{BD5B38BD-F2B8-4EB7-B060-9D757DC4D430}.Release|Any CPU.Build.0 = Release|Any CPU
 		{7E4E8BEA-D487-45B5-A46D-16610B14CBD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{7E4E8BEA-D487-45B5-A46D-16610B14CBD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{7E4E8BEA-D487-45B5-A46D-16610B14CBD2}.Release|Any CPU.ActiveCfg = Release|Any CPU

+ 49 - 18
TEAMModelOS/ClientApp/src/common/CollapseMenuLayout.less

@@ -16,19 +16,20 @@
         top: 0px;
         right: 0px;
         z-index: 999;
-        width: ~"calc(100% - 240px)";
+        /*width: ~"calc(100% - 240px)";*/
+        width: 100%;
         height: 83px;
-        background: #000;
-        transition: width 0.5s;
+        background: #101010;
+        transition: width 1s;
     }
 
     .biz-menu {
-        height: 100%;
+        height: ~"calc(100% - 83px)";
         position: absolute;
-        top: 0px;
+        top: 83px;
         left: 0px;
         z-index: 999;
-        background:#000;
+        background: #101010;
     }
 
     .content-wrap {
@@ -37,13 +38,15 @@
         top: 83px;
         bottom: 0px;
         width: 100%;
-        padding-left: 240px;
+        padding-left: 248px;
         overflow-y: auto;
-        background:#191919;
+        background: #191919;
+        transition: padding-left 0.4s;
     }
 
     .collapsed-padding {
         padding-left: 78px;
+        transition: padding-left 0.4s;
     }
 }
 
@@ -55,7 +58,7 @@
 
 .collapsed-header-width {
     width: ~"calc(100% - 78px)" !important;
-    transition: width 0.2s !important;
+    transition: width 1s !important;
 }
 
 .collapsed-logo-width {
@@ -66,8 +69,11 @@
 
 .logo-wrap {
     display: flex;
+    height: 83px;
+    margin-left: 30px;
+    float: left;
     align-items: center;
-    margin-left: -5px;
+    margin-left: 20px;
 
     .unit-logo {
         height: 30px;
@@ -85,19 +91,44 @@
 
 
 .rotate-icon {
-    transform: rotate(-90deg);
-    transition: transform 0.2s ease;
+    transform: rotate(-180deg);
+    margin-right:-2px !important;
+    transition: transform 0.5s ease;
 }
-.menu-icon {
-    float: left;
-    line-height: 83px;
-    margin-left: 30px;
+.collapse-icon {
     cursor: pointer;
-    color:white;
-    font-size:24px;
+    color: #CCCCCC;
+    font-size: 24px;
+    margin-right: 12px;
+    transition: color 1s;
+
+    &:hover {
+        color: aqua;
+        transition: color 1s;
+    }
 }
 .collapse-icon-size {
     font-size: 26px !important;
     margin-left: -4px;
     margin-top:15px;
 }
+.menu-item {
+    height: ~"calc(100% - 30px)";
+}
+.collapse-icon-box {
+    width: 100%;
+    text-align: right;
+    cursor: pointer;
+    transition: background 1s;
+
+    &:hover {
+        background: #404040;
+        border-radius: 4px;
+        transition: background 1s;
+    }
+
+    &:hover .collapse-icon {
+        color: aqua;
+        transition: color 1s;
+    }
+}

+ 75 - 52
TEAMModelOS/ClientApp/src/common/CollapseMenuLayout.vue

@@ -1,10 +1,13 @@
 <template>
     <div class="layout">
         <!-- 头部菜单栏 -->
-        <Header :class="isCollapsed ?'collapsed-header-width header':'header'">
-            <Icon :class="rotateIcon"
-                  type="md-menu"
-                  @click="changeMenuStatus" />
+        <Header :class="isCollapsed ?'header':'header'">
+            <div class="logo-wrap">
+                <img src="../assets/tmd_logo.png"
+                     :class="isCollapsed ? 'collapsed-logo-width unit-logo':'collapsed-logo-width  unit-logo'" />
+                <span class="unit-name">醍摩豆云平台</span>
+            </div>
+            
             <slot name="header-content"></slot>
         </Header>
         <!-- 侧边菜单栏 -->
@@ -15,43 +18,41 @@
                width="248"
                :collapsed-width="78"
                v-model="isCollapsed">
-            <Menu width="auto" accordion :class="menuitemClasses">
-                <Submenu name="unit-logo-box" class="unit-logo-box">
-                    <template slot="title">
-                        <div class="logo-wrap">
-                            <img src="../assets/tmd_logo.png"
-                                 :class="isCollapsed ? 'collapsed-logo-width unit-logo':'unit-logo'" />
-                            <span class="unit-name">醍摩豆云平台</span>
-                        </div>
-                    </template>
-                </Submenu>
-                <Submenu :name="index" v-for="(item,index) in menuTree">
-                    <template slot="title">
-                        <Poptip trigger="hover"
-                                placement="right-start"
-                                width="160"
-                                transfer
-                                popper-class="poptip-style"
-                                padding="0px 0px">
-                            <Icon :type="item.icon" :class="isCollapsed ? 'collapse-icon-size':''" size="20" />
-                            <span>{{item.name}}</span>
-                            <div slot="content" v-if="isCollapsed" class="poptop-content-radius">
-                                <Menu theme="dark" width="120" v-for="(menuItem,i) in item.child">
-                                    <MenuItem :name="menuItem.router" :to="menuItem.router">{{menuItem.name}}</MenuItem>
-                                </Menu>
-                            </div>
-                        </Poptip>
-                    </template>
-                    <MenuItem :name="menuItem.router" :to="menuItem.router" v-for="(menuItem,i) in item.child" @click.native="closeCollapse">
-                        <span>
-                            {{menuItem.name}}
-                            <label style="color:aqua;margin-left:2px;">
-                                {{menuItem.tag}}
-                            </label>
-                        </span>
-                        
-                    </MenuItem>
-                </Submenu>
+            <div class="collapse-icon-box" @click="changeMenuStatus">
+                <Icon :class="rotateIcon"
+                      type="md-arrow-dropleft"
+                      @click.stop="changeMenuStatus" />
+            </div>
+            <Menu width="auto" :class="menuitemClasses">
+                <vuescroll>
+                    <Submenu :name="index" v-for="(item,index) in menuTree">
+                        <template slot="title">
+                            <Poptip trigger="hover"
+                                    placement="right-start"
+                                    width="160"
+                                    transfer
+                                    popper-class="poptip-style"
+                                    padding="0px 0px">
+                                <Icon :type="item.icon" :class="isCollapsed ? 'collapse-icon-size':''" size="20" />
+                                <span>{{item.name}}</span>
+                                <div slot="content" v-if="isCollapsed" class="poptop-content-radius">
+                                    <Menu theme="dark" width="120" v-for="(menuItem,i) in item.child">
+                                        <MenuItem :name="menuItem.router" :to="menuItem.router">{{menuItem.name}}</MenuItem>
+                                    </Menu>
+                                </div>
+                            </Poptip>
+                        </template>
+                        <MenuItem :name="menuItem.router" :to="menuItem.router" v-for="(menuItem,i) in item.child" @click.native="closeCollapse">
+                            <span>
+                                {{menuItem.name}}
+                                <label style="color:aqua;margin-left:2px;">
+                                    {{menuItem.tag}}
+                                </label>
+                            </span>
+
+                        </MenuItem>
+                    </Submenu>
+                </vuescroll>
             </Menu>
         </Sider>
         <!-- Body内容部分 -->
@@ -150,7 +151,7 @@
                             {
                                 icon: '',
                                 name: '题目/库管理',
-                                router: '/home/testPaperList',
+                                router: '/home/evaluation/testPaperList',
                                 tag:'T'
                             },
                             {
@@ -158,25 +159,49 @@
                                 name: '知识点管理',
                                 router: '/home/knowledge',
                                 tag:'T'
+                            },
+                            {
+                                icon: '',
+                                name: '自学单元',
+                                router: '/home/manageUnit',
+                                tag:'T'
+                            },
+                            {
+                                icon: '',
+                                name: '编序式教材',
+                                router: '/home/manageOrderLearn',
+                                tag:'T'
                             }
                         ]
                     },
                     {
                         icon: 'ios-star',
-                        name: '活动管理',
+                        name: '学生活动管理',
                         router: '',
                         child: [
                             {
                                 icon: '',
-                                name: '评测活动',
+                                name: '评量测验',
                                 router: '/home/manageEvaluation',
                                 tag:'T'
                             },
                             {
                                 icon: '',
-                                name: '自主学习活动',
-                                router: '/home/manageOrderLearn',
+                                name: '自主学习',
+                                router: '/home/manageSelfLearn',
                                 tag:'T'
+                            },
+                            {
+                                icon: '',
+                                name: '作业活动',
+                                router: '/home/404',
+                                tag:'×'
+                            },
+                            {
+                                icon: '',
+                                name: '投票活动',
+                                router: '/home/404',
+                                tag:'×'
                             }
                         ]
                     }
@@ -193,7 +218,7 @@
         },
         computed: {
             rotateIcon() {
-                return ["menu-icon", this.isCollapsed ? "rotate-icon" : ""]
+                return ["collapse-icon", this.isCollapsed ? "rotate-icon" : ""]
             },
             menuitemClasses() {
                 return ["menu-item", this.isCollapsed ? "collapsed-menu" : ""]
@@ -211,7 +236,7 @@
     }
 
     .biz-menu .ivu-menu-light {
-        background: #000;
+        background: #101010;
         color: #CCCCCC;
     }
 
@@ -226,9 +251,7 @@
         z-index: 2;
     }
 
-    .menu-item {
-        color:red;
-    }
+    
     .menu-item span {
         display: inline-block;
         overflow: hidden;
@@ -244,7 +267,7 @@
 
     .menu-item i {
         transform: translateX(0px);
-        transition: font-size 0.2s ease, transform 0.2s ease;
+        transition: font-size 0.5s ease, transform 0.5s ease;
         vertical-align: middle;
         font-size: 16px;
     }

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

@@ -38,7 +38,11 @@ export const routes = [
         redirect: 'totalIndex',
         component: resolve => require(['@/view/Home'], resolve),
         children: [
-
+            //{
+            //    name: 'home404',
+            //    path: '404',
+            //    component: resolve => require(['@/view/404'], resolve)
+            //},
             {
                 name: 'totalIndex',
                 path: '/home',
@@ -196,6 +200,11 @@ export const routes = [
                 name: 'createOrderLearn',
                 component: resolve => require(['@/view/selflearning/CreateOrderLearn.vue'], resolve)
             },
+            {
+                path: 'createSelfLearn',
+                name: 'createSelfLearn',
+                component: resolve => require(['@/view/selflearning/CreateSelfLearn.vue'], resolve)
+            },
             {
                 path: 'manageEvaluation',
                 name: 'manageEvaluation',
@@ -211,6 +220,11 @@ export const routes = [
                 name: 'manageOrderLearn',
                 component: resolve => require(['@/view/selflearning/ManageOrderLearn.vue'], resolve)
             },
+            {
+                path: 'manageSelfLearn',
+                name: 'manageSelfLearn',
+                component: resolve => require(['@/view/selflearning/ManageSelfLearn.vue'], resolve)
+            },
             {
                 path: 'activityReport',
                 name: 'activityReport',

+ 1 - 1
TEAMModelOS/ClientApp/src/view/selflearning/CreateLearnUnit.less

@@ -187,5 +187,5 @@
     float: right;
     cursor: pointer;
     margin-top: 6px;
-    margin-right: 40px;
+    margin-right: 10px;
 }

+ 0 - 4
TEAMModelOS/ClientApp/src/view/selflearning/CreateLearnUnit.vue

@@ -4,10 +4,6 @@
             <span class="name-label">名称:</span>
             <Input v-model="learnUnit.name" placeholder="请输入名称..." :class="checkName ? '':'my-error-style'" style="width: 300px" @on-blur="checkUnitName" />
             <span style="color:#ed4014;margin-left:15px;" v-show="!checkName">名称不能为空</span>
-            <!--<span class="header-btn-save" @click="saveLearnUnitData()">
-                <Icon type="ios-albums-outline" color="#1CD0A1" style="margin-right:5px;" />
-                保存数据
-            </span>-->
             <Button class="btn-save" type="text" :loading="isLoading" ghost icon="ios-albums-outline" @click="saveLearnUnitData">保存数据</Button>
         </div>
         <div class="learn-unit-main">

+ 67 - 0
TEAMModelOS/ClientApp/src/view/selflearning/CreateSelfLearn.less

@@ -0,0 +1,67 @@
+@main-bgColor: rgb(40,40,40); //主背景颜色
+@borderColor: #424242;
+@primary-textColor: #fff; //文本主颜色
+@second-textColor: #a5a5a5; //文本副级颜色
+@primary-fontSize: 14px;
+@second-fontSize: 16px;
+
+.create-self-container {
+    width: 100%;
+    height: 100%;
+
+    .create-self-header {
+        width: 100%;
+        height: 45px;
+        line-height: 45px;
+        padding: 0px 15px;
+        border-bottom: 1px solid @borderColor;
+    }
+
+    .create-self-main{
+        width:100%;
+        height:~"calc(100% - 45px)";
+        display:flex;
+        flex-direction:row;
+    }
+}
+.create-self-header {
+    &-label {
+        color: #fff;
+        font-size: 16px;
+    }
+}
+.btn-save {
+    color: rgb(107, 223, 195);
+    float: right;
+    cursor: pointer;
+    margin-top: 6px;
+    margin-right: 15px;
+}
+.create-self-main {
+    .self-base-info-box {
+        width: 350px;
+        height: 100%;
+        border-right: 1px solid @borderColor;
+        padding-left: 15px;
+
+        .self-base-info-header {
+            width: 100%;
+            height: 40px;
+            color: @second-textColor;
+            line-height: 40px;
+            border-bottom: 1px solid @borderColor;
+        }
+    }
+
+    .self-content-box {
+        width: ~"calc(100% - 350px)";
+        height: 100%;
+        padding-left: 15px;
+        .self-content-box-header{
+            height:40px;
+            line-height:40px;
+            color:@second-textColor;
+            border-bottom:1px solid @borderColor;
+        }
+    }
+}

+ 43 - 0
TEAMModelOS/ClientApp/src/view/selflearning/CreateSelfLearn.vue

@@ -0,0 +1,43 @@
+<template>
+    <div class="create-self-container">
+        <div class="create-self-header">
+            <span class="create-self-header-label">创建自主学习</span>
+            <Button class="btn-save" type="text" :loading="isLoading" ghost icon="ios-albums-outline" @click="saveData">保存数据</Button>
+        </div>
+        <div class="create-self-main">
+            <div class="self-base-info-box">
+                <div class="self-base-info-header">
+                    <span>基础信息</span>
+                </div>
+            </div>
+            <div class="self-content-box">
+                <div class="self-content-box-header">
+                    <span>自学内容</span>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+    export default {
+        data() {
+            return {
+                isLoading: false,
+
+            }
+        },
+        methods: {
+            saveData() {
+                this.isLoading = true
+                setTimeout(() => {
+                    this.isLoading = false
+                },2000)
+            }
+        }
+    }
+</script>
+<style lang="less" scoped>
+    @import "./CreateSelfLearn.less";
+</style>
+<style>
+</style>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/selflearning/ManageOrderLearn.vue

@@ -4,7 +4,7 @@
             <vuescroll>
                 <div class="order-learn-list-label">
                     <span>
-                        学习活动列表
+                        编序式教材列表
                     </span>
                     <Icon type="md-add" class="to-create-icon" @click="goToCreate"/>
                 </div>

+ 37 - 0
TEAMModelOS/ClientApp/src/view/selflearning/ManageSelfLearn.less

@@ -0,0 +1,37 @@
+@main-bgColor: rgb(40,40,40); //主背景颜色
+@borderColor: #424242;
+@primary-textColor: #fff; //文本主颜色
+@second-textColor: #a5a5a5; //文本副级颜色
+@primary-fontSize: 14px;
+@second-fontSize: 16px;
+
+.self-learn-container {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: row;
+    .self-learn-list-box{
+        width:350px;
+        height:100%;
+        padding-left:15px;
+        border-right:1px solid @borderColor;
+    }
+}
+.self-learn-list-box {
+    .list-box-header {
+        height: 45px;
+        line-height: 45px;
+        border-bottom: 1px solid @borderColor;
+        span{
+            color:@second-textColor;
+        }
+    }
+}
+.to-create-icon {
+    float: right;
+    margin-right: 20px;
+    margin-top: 12px;
+    cursor: pointer;
+    color: white;
+    font-size: 18px;
+}

+ 32 - 0
TEAMModelOS/ClientApp/src/view/selflearning/ManageSelfLearn.vue

@@ -0,0 +1,32 @@
+<template>
+    <div class="self-learn-container">
+        <div class="self-learn-list-box">
+            <div class="list-box-header">
+                <span>自学活动列表</span>
+                <Icon type="md-add" class="to-create-icon" @click="goToCreate" />
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+    export default {
+        data() {
+            return {
+
+            }
+        },
+        methods: {
+            goToCreate() {
+                this.$router.push({
+                    name: 'createSelfLearn'
+                })
+            }
+        }
+    }
+</script>
+<style lang="less" scoped>
+@import "./ManageSelfLearn.less";
+</style>
+<style>
+
+</style>