瀏覽代碼

Eslint自动修改

OnePsycho 5 年之前
父節點
當前提交
a978f13968
共有 31 個文件被更改,包括 868 次插入1460 次删除
  1. 3 3
      TEAMModelOS/ClientApp/babel.config.js
  2. 4 4
      TEAMModelOS/ClientApp/src/boot-app.js
  3. 1 1
      TEAMModelOS/ClientApp/src/common/EmptyData.vue
  4. 8 8
      TEAMModelOS/ClientApp/src/common/Loading.vue
  5. 46 41
      TEAMModelOS/ClientApp/src/components/syllabus/DragTree.vue
  6. 0 519
      TEAMModelOS/ClientApp/src/components/syllabus/newTree.vue
  7. 4 4
      TEAMModelOS/ClientApp/src/filters/http.js
  8. 3 2
      TEAMModelOS/ClientApp/src/router/routes.js
  9. 43 43
      TEAMModelOS/ClientApp/src/view/coursemgmt/CourseManage.vue
  10. 1 1
      TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.vue
  11. 1 0
      TEAMModelOS/ClientApp/src/view/index.vue
  12. 88 74
      TEAMModelOS/ClientApp/src/view/knowledge-point/index/index.vue
  13. 16 16
      TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/addBlock.vue
  14. 26 34
      TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/addPoint.vue
  15. 11 11
      TEAMModelOS/ClientApp/src/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue
  16. 11 12
      TEAMModelOS/ClientApp/src/view/school-mgmt/SystemSetting/SystemSetting.vue
  17. 140 147
      TEAMModelOS/ClientApp/src/view/student-account/Index.vue
  18. 96 98
      TEAMModelOS/ClientApp/src/view/student-account/add-student/AddStudent.vue
  19. 1 1
      TEAMModelOS/ClientApp/src/view/student-account/add-student/Authorization.vue
  20. 0 3
      TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/KnowledgeAnalysis/KnowledgeAnalysis.vue
  21. 0 41
      TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/index.vue
  22. 11 0
      TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/Index.less
  23. 75 81
      TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/index.vue
  24. 73 98
      TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/AddEditors.vue
  25. 17 24
      TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/BaseKnowledge.vue
  26. 14 8
      TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/BaseResource.less
  27. 16 22
      TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/BaseResource.vue
  28. 19 20
      TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/addVolume.vue
  29. 1 1
      TEAMModelOS/ClientApp/src/view/teachcontent/CardItem.vue
  30. 138 142
      TEAMModelOS/ClientApp/src/view/teachcontent/index.vue
  31. 1 1
      TEAMModelOS/ClientApp/vue.config.js

+ 3 - 3
TEAMModelOS/ClientApp/babel.config.js

@@ -4,10 +4,10 @@ module.exports = {
     ],
     plugins: [
         [
-            "component",
+            'component',
             {
-                "libraryName": "element-ui",
-                "styleLibraryName": "theme-chalk"
+                'libraryName': 'element-ui',
+                'styleLibraryName': 'theme-chalk'
             }
         ]
     ]

+ 4 - 4
TEAMModelOS/ClientApp/src/boot-app.js

@@ -20,9 +20,9 @@ import Loading from '@/common/Loading'
 import BaseChangeLine from '@/components/student-analysis/total/BaseChangeLine.vue'
 import echarts from 'echarts'
 import vuescroll from 'vuescroll/dist/vuescroll-native'
-import { Tree } from 'element-ui'; //按需引入element Tree组件
-import 'element-ui/lib/theme-chalk/tree.css';
-import 'element-ui/lib/theme-chalk/icon.css';
+import { Tree } from 'element-ui' // 按需引入element Tree组件
+import 'element-ui/lib/theme-chalk/tree.css'
+import 'element-ui/lib/theme-chalk/icon.css'
 import animated from 'animate.css'
 import VueLogger from 'vuejs-logger'
 
@@ -37,7 +37,7 @@ Vue.component('BaseChangeLine', BaseChangeLine)
 const logoptions = {
     isEnabled: true,
     logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'debug',
-    stringifyArguments: false, //這個要不要自動JSON,自行選擇
+    stringifyArguments: false, // 這個要不要自動JSON,自行選擇
     showLogLevel: true,
     showMethodName: true,
     separator: '|',

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

@@ -8,7 +8,7 @@
 <script>
     export default {
         name: 'emptyData',
-        props: ['top','textTop'],
+        props: ['top', 'textTop'],
         data() {
             return {
             }

+ 8 - 8
TEAMModelOS/ClientApp/src/common/Loading.vue

@@ -20,30 +20,30 @@
             },
             type: {
                 type: String,
-                default: "1"
+                default: '1'
             },
             width: {
                 type: String,
-                default: "100"
-            },
+                default: '100'
+            }
         },
         data() {
             return {
-                imgSrc:""
+                imgSrc: ''
             }
         },
         created() {
             switch (this.type) {
-                case "1":
+                case '1':
                     this.imgSrc = require('@/assets/loading/loading.svg')
                     break
-                case "2":
+                case '2':
                     this.imgSrc = require('@/assets/loading/loading2.svg')
                     break
-                case "3":
+                case '3':
                     this.imgSrc = require('@/assets/loading/loading3.svg')
                     break
-                case "4":
+                case '4':
                     this.imgSrc = require('@/assets/loading/loading4.svg')
                     break
                 default:

+ 46 - 41
TEAMModelOS/ClientApp/src/components/syllabus/DragTree.vue

@@ -8,7 +8,11 @@
                      @node-drop="handleDrop"
                      draggable>
                 <span class="custom-tree-node" slot-scope="{ node, data }">
-                    <span>{{node.label}}</span>
+                    <span class="tree-node-lable">
+                        {{node.label}}
+                        <Icon type="md-images"/>
+                        <Icon type="md-videocam"/>
+                    </span>
                     <span class="custom-tree-tools">
                         <Icon v-show="data.pid !== 'Root'" type="ios-folder-open" size="20" title="内容" @click="onRelatedContent(node,data,$event)" />
                         <Icon v-show="data.pid !== 'Root'" type="md-create" size="20" title="编辑" @click="onEditItem(node,data,$event)" />
@@ -31,7 +35,6 @@
             <Button @click="onSubmitNode" class="modal-btn">确认</Button>
         </Modal>
 
-
         <!-- 关联内容弹窗 -->
         <Modal v-model="isRelatedContent" width="880" footer-hide class="tree-modal related-modal">
             <div class="modal-header" slot="header">内容关联 ( 当前节点:{{ currentEditData ? currentEditData.title : '' }} )</div>
@@ -47,14 +50,13 @@
     </div>
 </template>
 
-
 <script>
     import '@/utils/Math.uuid'
     import BaseResource from '@/view/syllabus/newSyllabus/operation/BaseResource'
     import BaseKnowledge from '@/view/syllabus/newSyllabus/operation/BaseKnowledge'
     export default {
         props: ['volume', 'treeData'],
-        components: { BaseResource , BaseKnowledge }, 
+        components: { BaseResource, BaseKnowledge },
         data() {
             return {
                 treeDatas: [],
@@ -63,33 +65,33 @@
                     label: 'title'
                 },
                 isEditOrAdd: false,
-                isRelatedContent:false,
+                isRelatedContent: false,
                 isEditItem: false,
                 currentVolume: null,
                 currentEditData: null,
                 currentParentData: null,
                 nodeInfo: {
                     id: null,
-                    title: "",
+                    title: '',
                     expand: true,
                     editable: true,
-                    version: "",
+                    version: '',
                     type: 1,
                     children: [],
-                    remark: "",
-                    nodeKey: "",
-                    pid: "",
-                    volumeCode: "",
+                    remark: '',
+                    nodeKey: '',
+                    pid: '',
+                    volumeCode: '',
                     status: 1,
-                    parent: ""
+                    parent: ''
                 }
-            };
+            }
         },
         created() {
             console.log(this.volume)
         },
         methods: {
-            //拖拽完成回调
+            // 拖拽完成回调
             handleDrop(draggingNode, dropNode, dropType) {
                 switch (dropType) {
                     case 'before':
@@ -115,43 +117,40 @@
                     okText: '确认',
                     cancelText: '取消',
                     onOk: () => {
-                        const parent = node.parent;
-                        const children = parent.data.children || parent.data;
-                        const index = children.findIndex(d => d.id === data.id);
-                        children.splice(index, 1);
-                        this.$Message.success("删除成功")
+                        const parent = node.parent
+                        const children = parent.data.children || parent.data
+                        const index = children.findIndex(d => d.id === data.id)
+                        children.splice(index, 1)
+                        this.$Message.success('删除成功')
                         this.$parent.hasModify = true
                     }
                 })
-
             },
 
-            //点击添加展开弹窗
+            // 点击添加展开弹窗
             onAddNode(data, e) {
-                e.stopPropagation(); //防止点击事件穿透到父层
+                e.stopPropagation() // 防止点击事件穿透到父层
                 this.isEditItem = false
                 this.isEditOrAdd = true
 
-                this.currentParentData = data //当前点击节点即为父节点
+                this.currentParentData = data // 当前点击节点即为父节点
                 this.nodeInfo.parent = data.title
                 this.nodeInfo.title = ''
             },
 
-
             // 编辑节点操作
             onEditItem(node, data, e) {
-                e.stopPropagation(); //防止点击事件穿透到父层
+                e.stopPropagation() // 防止点击事件穿透到父层
                 this.isEditOrAdd = true
                 this.isEditItem = true
 
                 this.currentEditData = data
                 this.nodeInfo.parent = node.parent.data.title
                 this.nodeInfo.title = node.data.title
-
             },
 
             onRelatedContent(node, data, e) {
-                e.stopPropagation(); //防止点击事件穿透到父层
+                e.stopPropagation() // 防止点击事件穿透到父层
                 this.isRelatedContent = true
                 this.currentEditData = data
             },
@@ -165,13 +164,13 @@
             // 提交编辑或者新增
             onSubmitNode() {
                 if (!this.nodeInfo.title) {
-                    this.$Message.warning("节点名称不能为空")
+                    this.$Message.warning('节点名称不能为空')
                     return
                 }
                 if (this.isEditItem) {
                     this.currentEditData.title = this.nodeInfo.title
                 } else {
-                    let newChild = Object.assign({}, this.nodeInfo) //创建新节点
+                    let newChild = Object.assign({}, this.nodeInfo) // 创建新节点
                     let parentNode = this.currentParentData
                     newChild.id = Math.uuid()
                     newChild.nodeKey = newChild.id
@@ -181,29 +180,28 @@
                     newChild.resources = []
                     newChild.knowledges = []
                     if (!this.currentParentData.children) {
-                        this.$set(this.currentParentData, 'children', []);
+                        this.$set(this.currentParentData, 'children', [])
                     }
                     this.currentParentData.children.push(newChild)
                 }
 
                 this.isEditOrAdd = false
                 this.$parent.hasModify = true
-                this.$Message.success(this.isEditItem ? "编辑成功" : "添加成功")
-
+                this.$Message.success(this.isEditItem ? '编辑成功' : '添加成功')
             }
 
         },
         watch: {
             // 监听课纲数据变化
             treeData: {
-                handler: function (n, o) {
+                handler: function(n, o) {
                     // 以下为拼接树形数据以及册别数据
                     let defaultTree = []
                     let volumeParent = {
                         title: this.volume.volumeName,
                         id: this.volume.volumeCode,
                         volumeCode: this.volume.volumeCode,
-                        pid: "Root",
+                        pid: 'Root',
                         children: []
                     }
                     volumeParent.children = n
@@ -213,12 +211,12 @@
             },
             // 监听课纲数据变化
             volume: {
-                handler: function (n, o) {
+                handler: function(n, o) {
                     this.volume = n
                 }
-            },
+            }
         }
-    };
+    }
 </script>
 
 <style>
@@ -262,11 +260,19 @@
         align-items: center;
     }
 
+        .custom-tree-node .tree-node-lable .ivu-icon{
+            margin-left:10px;
+            font-size:18px;
+            color:rgb(11, 151, 117);
+            display:none;
+        }
+
     .custom-tree-tools {
         display: none;
     }
 
-    .custom-tree-node:hover .custom-tree-tools {
+    .custom-tree-node:hover .custom-tree-tools,
+    .custom-tree-node:hover .tree-node-lable .ivu-icon{
         display: unset;
     }
 
@@ -330,7 +336,6 @@
         margin-top: 30px;
     }
 
-
     /*修改iview Tab标签页样式重写*/
     .tree-modal .ivu-tabs-nav {
         width:100%;
@@ -344,7 +349,7 @@
             font-size:20px;
             margin-right:15px;
         }
-    
+
     .tree-modal .ivu-tabs-nav .ivu-tabs-tab {
         width:50%;
         text-align:center;
@@ -370,4 +375,4 @@
     .tree-modal .ivu-tabs-content {
         height:100%;
     }
-</style>
+</style>

+ 0 - 519
TEAMModelOS/ClientApp/src/components/syllabus/newTree.vue

@@ -1,519 +0,0 @@
-<template>
-  <div class="tree-main">
-
-    <Tree :data="treeData" :render="renderContent" ref="tree"></Tree>
-    <Modal v-model="modalFlag" title="添加新节点" ok-text="确认" cancel-text="取消" @on-ok="handleAddNode">
-      <Row class="modelRow">
-        <span>
-          当前章节:
-          <span style="margin-left:10px;">{{currentNode.title}}</span>
-        </span>
-      </Row>
-      <Row class="modelRow">
-        <span>节点名称:</span>
-        <Input v-model="inputValue" placeholder="输入新节点名称" style="width: 100%" />
-      </Row>
-    </Modal>
-    <Modal v-model="editFlag" title="修改节点" ok-text="确认" cancel-text="取消" @on-ok="handleUpdateNode">
-      <Row class="modelRow">
-        <span>
-          当前名称:
-          <span style="margin-left:10px;">{{currentNode.title}}</span>
-        </span>
-      </Row>
-      <Row class="modelRow">
-        <span>修改名称:</span>
-        <Input v-model="editValue" placeholder="输入节点新名称" style="width: 100%" />
-      </Row>
-    </Modal>
-  </div>
-</template>
-<script>
-  export default {
-    props: ['treeDatas', 'volumeCode'],
-    data() {
-      return {
-        treeData: [],
-        inputValue: '',
-        editValue: '',
-        modalFlag: false,
-        editFlag: false,
-        addBookFlag: false,
-        nodeType: '章节',
-        currentNode: '',
-        currentLiNode: ''
-      }
-    },
-    created() {
-      this.treeData = this.treeDatas
-    },
-  //  watch: {
-  //    treeDatas: {
-  //      handler(newValue, oldValue) {
-  //        this.treeData = newValue
-  //  },
-  //  deep: true
-  // }
-  //  },
-    methods: {
-      renderContent(h, { root, node, data }) {
-        return h(
-          'span',
-          {
-            domProps: {
-              className: 'singleClass'
-            },
-            on: {
-              click: () => {
-                this.titleClick(data)
-              },
-              mouseover: e => {
-                e.stopPropagation()
-                this.handleLiOver(event)
-              },
-              mouseleave: e => {
-                e.stopPropagation()
-                this.handleLiLeave(node, event)
-              }
-            }
-          },
-          [
-            h('span', [
-              h('Icon', {
-                props: {
-                  type:
-                    data.children && data.children.length > 0
-                      ? 'md-albums'
-                      : 'ios-paper-outline'
-                },
-                style: {
-                  marginRight: '5px',
-                  display: 'none'
-                }
-              }),
-              h('span', data.title)
-            ]),
-            h(
-              'span',
-              {
-                style: {
-                  float: 'right',
-                  top: '14px',
-                  display: 'none'
-                },
-                on: {
-                  mouseleave: e => {
-                    e.stopPropagation()
-                    // this.hideTools(event);
-                  }
-                },
-                domProps: {
-                  className: 'tools'
-                }
-              },
-              [
-                h(
-                  'Icon',
-                  {
-                    props: {
-                      type: 'md-add',
-                      title: '添加'
-                    },
-                    on: {
-                      click: e => {
-                        e.stopPropagation()
-                        this.appendClick(data)
-                      }
-                    }
-                  }
-                ),
-                h(
-                  'Icon',
-                  {
-                    props: {
-                      type: 'md-remove'
-                    },
-                    on: {
-                      click: e => {
-                        e.stopPropagation()
-                        this.remove(root, node, data)
-                      }
-                    }
-                  }
-                ),
-                h(
-                  'Icon',
-                  {
-                    props: {
-                      type: 'md-arrow-round-up'
-                    },
-                    on: {
-                      click: e => {
-                        e.stopPropagation()
-                        this.moveUp(root, node, data)
-                      }
-                    }
-                  }
-                ),
-                h(
-                  'Icon',
-                  {
-                    props: {
-                      type: 'md-arrow-round-down'
-                    },
-                    on: {
-                      click: e => {
-                        e.stopPropagation()
-                        this.moveDown(root, node, data)
-                      }
-                    }
-                  }
-                ),
-                h(
-                  'Icon',
-                  {
-                    props: {
-                      type: 'md-create'
-                    },
-                    on: {
-                      click: e => {
-                        e.stopPropagation()
-                        this.editClick(node, data)
-                      }
-                    }
-                  }
-                )
-              ]
-            )
-          ]
-        )
-      },
-      // 添加节点
-      append(data, value) {
-        const children = data.children || []
-        let newChild = {
-          title: value,
-          order: children.length,
-          pid: data.rowKey,
-          children: [],
-          expand: true,
-          type: data.type,
-          volumeCode: this.volumeCode,
-          remark: '备注'
-        }
-        children.push(newChild)
-        this.$set(data, 'children', children)
-        this.$api.SaveOrUpdateSingleNode(newChild).then(res => {
-          this.$Message.success('添加成功')
-          this.$api.FindSyllabusByVolumeCode({ VolumeCode: this.volumeCode, Status: 1 }).then(res => {
-            this.treeData = res.result.data
-          })
-        })
-      },
-      // 删除节点
-      remove(root, node, data) {
-        data.status = 0
-        this.$api.SaveOrUpdateSingleNode(data).then(res => {
-          this.$Message.success('删除成功')
-          this.$api.FindSyllabusByVolumeCode({ VolumeCode: this.volumeCode, Status: 1 }).then(res => {
-            this.treeData = res.result.data
-          })
-        })
-      },
-      // 点击编辑
-      editClick(node, data) {
-        this.currentNode = data
-        this.editFlag = true
-        this.editValue = ''
-      },
-      // 添加节点 弹出输入框
-      appendClick(data) {
-        this.currentNode = data
-        this.modalFlag = true
-        this.inputValue = ''
-      },
-      // 确认添加节点
-      handleAddNode() {
-        if (this.inputValue !== '') {
-          this.append(this.currentNode, this.inputValue)
-        } else {
-          this.modalFlag = false
-        }
-      },
-      // 修改节点
-      handleUpdateNode() {
-        if (this.editValue !== '') {
-          this.$api.SaveOrUpdateSingleNode(this.currentNode).then(res => {
-            this.$Message.success('修改成功')
-            this.currentNode.title = this.editValue
-          })
-        } else {
-          this.editFlag = false
-        }
-      },
-      // 标题点击收缩展开
-      titleClick(data) {
-        data.expand = !data.expand
-      },
-      // 根目录点击事件
-      rootClick(data) {
-        data.expand = !data.expand
-      },
-      // 上移章节操作
-      moveUp(root, node, data) {
-        let that = this
-        let list = []
-        const parentKey = root.find(el => el === node).parent
-
-        // 判断是否存在父级
-        if (parentKey === null || parentKey === undefined) {
-          list = that.treeData
-        } else {
-          list = root.find(el => el.nodeKey === parentKey).node.children
-        }
-        const index = list.indexOf(data)
-        let currentOrder = data.order
-
-        // 第一个元素无法上移
-        if (index !== 0) {
-          let preData = list[index - 1]
-          if (data.order === preData.order) {
-            data.order = data.order - 1
-          } else {
-            data.order = preData.order
-            preData.order = currentOrder
-          }
-          // 更新两条数据
-          that.$api.SaveOrUpdateSingleNode(data)
-          that.$api.SaveOrUpdateSingleNode(preData)
-
-          // 移动后刷新数据
-          setTimeout(function() {
-            that.$api.FindSyllabusByVolumeCode({ VolumeCode: that.volumeCode, Status: 1 }).then(res => {
-              that.treeData = res.result.data
-            })
-          }, 500)
-        }
-      },
-      // 下移章节操作
-      moveDown(root, node, data) {
-        let that = this
-        let list = []
-        const parentKey = root.find(el => el === node).parent
-
-        // 判断是否存在父级
-        if (parentKey === null || parentKey === undefined) {
-          list = that.treeData
-        } else {
-          list = root.find(el => el.nodeKey === parentKey).node.children
-        }
-        const index = list.indexOf(data)
-        let currentOrder = data.order
-        // 最后一个元素无法下移
-        if (index !== (list.length - 1)) {
-           let nextData = list[index + 1]
-          if (data.order === nextData.order) {
-            data.order = data.order + 1
-          } else {
-            data.order = nextData.order
-            nextData.order = currentOrder
-          }
-          // 更新两条数据
-          that.$api.SaveOrUpdateSingleNode(data)
-          that.$api.SaveOrUpdateSingleNode(nextData)
-
-          // 移动后刷新数据
-          setTimeout(function() {
-            that.$api.FindSyllabusByVolumeCode({ VolumeCode: that.volumeCode, Status: 1 }).then(res => {
-              that.treeData = res.result.data
-            })
-          }, 500)
-        }
-      },
-      // 更多操作
-      handleTools(root, node, data, event) {
-        let toolsDom = event.currentTarget.nextElementSibling
-        // const parentKey = root.find(el => el === node).parent
-        // const parent = root.find(el => el.nodeKey === parentKey).node
-        let list = document.getElementsByClassName('tools')
-        let cFlag = toolsDom.style.display
-        for (let i = 0; i < list.length; i++) {
-          list[i].style.display = 'none'
-        }
-        // 判断TOOL显示与隐藏
-        if (cFlag === 'none') {
-          toolsDom.style.display = 'inline-flex'
-          toolsDom.classList.add('animated')
-          toolsDom.classList.add('slideInDown')
-        } else {
-          toolsDom.style.display = 'none'
-        }
-      },
-      // 鼠标从工具条移开的时候隐藏
-      hideTools(event) {
-        event.currentTarget.style.display = 'none'
-      },
-      handleLiOver(event) {
-        event.currentTarget.lastElementChild.style.display = 'block'
-        event.currentTarget.style.backgroundColor = 'rgba(55, 55, 55, 0.68)'
-        event.currentTarget.style.border = '1px solid #000'
-      },
-      handleLiLeave(node, event) {
-        event.currentTarget.lastElementChild.style.display = 'none'
-        if (this.currentLiNode.nodeKey !== node.nodeKey) {
-          event.currentTarget.style.backgroundColor = 'transparent'
-          event.currentTarget.style.border = '0'
-        }
-      }
-
-    }
-  }
-</script>
-<style scoped>
-  .tree-main {
-    margin-left: 5%;
-    width: 90%;
-    user-select:none;
-  }
-
-    .tree-main /deep/ .ivu-icon-ios-paper-outline {
-      font-size: 14px;
-    }
-
-    .tree-main /deep/ .ivu-select {
-      width: 80% !important;
-    }
-
-  .slideSelect .ivu-select-selection {
-    height: 40px;
-    background: #d8d8d870;
-    border: 1px solid #808080;
-  }
-
-  .slideSelect, .slideSelect .ivu-icon {
-    color: rgba(255,255,255,.8);
-  }
-
-  .tree-main /deep/ .ivu-select-single .ivu-select-selection .ivu-select-selected-value {
-    height: 40px;
-    line-height: 40px;
-    font-size: 14px;
-  }
-  /* .ivu-tree ul li {
-    margin: 18px 0;
-  } */
-  .tree-main /deep/ .ivu-tree ul {
-    font-size: 14px;
-    position:relative;
-  }
-
-  /*.tree-main /deep/ .ivu-tree ul::after {
-        content: " ";
-    position: absolute;
-    width: 0;
-    height: 100%;
-    border-left: 1px dashed #fff;
-    left: 5px;
-    top: -11px;
-  }*/
-
-    .tree-main /deep/ .ivu-tree ul li {
-      margin: 8px 0;
-    }
-
-  .ivu-tree .ivu-tree-arrow {
-    width: 2%;
-  }
-  .ivu-tree /deep/ .ivu-tree-arrow i{
-    color:#fff;
-  }
-
-  .ivu-input-wrapper {
-    width: 80% !important;
-  }
-
-  .modelRow {
-    margin: 20px;
-    font-size: 14px;
-  }
-
-  .tree-main /deep/ .tools {
-    position: absolute;
-    right: 60px;
-    bottom: 5px;
-    display: inline-flex;
-    z-index: 999;
-  }
-
-    .tree-main /deep/ .tools .ivu-icon {
-      margin-right: 15px;
-      font-size: 16px;
-      font-weight: 200;
-      color: rgba(255,255,255,.8);
-    }
-
-  .btn_more {
-    background: #fff;
-    border: 1px solid rgb(248,248,248);
-  }
-
-  .animated {
-    animation-duration: 0.5s;
-  }
-
-  @-webkit-keyframes slideInDown {
-    from {
-      -webkit-transform: translate3d(0,-10%, 0);
-      transform: translate3d(0, -10%, 0) !important;
-      visibility: visible;
-    }
-
-    to {
-      -webkit-transform: translate3d(0, 0%, 0);
-      transform: translate3d(0, 0%, 0);
-    }
-  }
-
-  @keyframes slideInDown {
-    from {
-      -webkit-transform: translate3d(0, -10%, 0);
-      transform: translate3d(0, -10%, 0) !important;
-      visibility: visible;
-    }
-
-    to {
-      -webkit-transform: translate3d(0, 0%, 0);
-      transform: translate3d(0, 0%, 0);
-    }
-  }
-
-  .slideInDown {
-    -webkit-animation-name: slideInDown;
-    animation-name: slideInDown;
-  }
-
-  .tree-main /deep/ .singleClass {
-    display: inline-flex !important;
-    position:relative;
-    flex-direction: row;
-    align-items: center;
-    width:100%;
-    font-size:14px;
-    height: 50px;
-    padding-left:10px;
-    color:#fff;
-    user-select:none;
-    cursor:pointer;
-  }
-
-   /*.tree-main /deep/ .singleClass:before {
-            content: " ";
-    position: absolute;
-    width: 100px;
-    height: 0;
-    left: 5px;
-    top: 20px;
-    border-top: 1px dashed #fff;
-    }*/
-
-</style>

+ 4 - 4
TEAMModelOS/ClientApp/src/filters/http.js

@@ -46,9 +46,9 @@ axios.interceptors.response.use(
         if (error.response && error.response.status === 401) {
             localStorage.clear()
             window.location.href = window.location.origin + '/selectModule'
-            Message.error("登录状态已过期!请重新登录!");
+            Message.error('登录状态已过期!请重新登录!')
         } else if (error.response.status === 500) {
-            Message.error("服务器错误!");
+            Message.error('服务器错误!')
         } else {
             return Promise.reject(error)
         }
@@ -97,10 +97,10 @@ export function post(url, params) {
             .then(response => {
                 if (response && response.data) {
                     resolve(response.data)
-                } 
+                }
             }, err => {
                 reject(err)
-                Message.error('数据访问错误!');
+                Message.error('数据访问错误!')
             })
     })
 }

+ 3 - 2
TEAMModelOS/ClientApp/src/router/routes.js

@@ -122,7 +122,6 @@ export const routes = [
         component: resolve => require(['@/view/student-account/Index.vue'], resolve)
     },
 
-
     // 整合功能
     {
         name: 'home',
@@ -208,8 +207,9 @@ export const routes = [
             {
                 path: 'courseManage',
                 name: 'courseManage',
-                component: resolve => require(['@/view/coursemgmt/CourseManage.vue'], resolve),
+                component: resolve => require(['@/view/coursemgmt/CourseManage.vue'], resolve)
             },
+            // 新课纲管理
             {
                 path: 'syllabus',
                 name: 'syllabus',
@@ -220,6 +220,7 @@ export const routes = [
                 name: 'teachcontent',
                 component: resolve => require(['@/view/teachcontent/index.vue'], resolve)
             },
+            // 知识点管理
             {
                 path: 'knowledge',
                 name: 'knowledge',

+ 43 - 43
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseManage.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
     <div class="course-mgmt-content">
         <div class="course-list">
             <div class="course-box">
@@ -59,23 +59,23 @@
             <div slot="footer"></div>
         </Modal>
     </div>
-        
+
 </template>
 <script>
     export default {
         data() {
             return {
-                classList:[],
+                classList: [],
                 courseInfo: {
-                    input:''
+                    input: ''
                 },
                 addCourseStatus: false,
-                tableLoading:false,
+                tableLoading: false,
                 demoLoginInfo: {
-                    user: "admin",
-                    teamModelId: "habook#0001",
-                    school: "醍摩豆书院",
-                    schoolCode: "HBCN"
+                    user: 'admin',
+                    teamModelId: 'habook#0001',
+                    school: '醍摩豆书院',
+                    schoolCode: 'HBCN'
                 },
                 searchPeriod: '',
                 searchGrade: '',
@@ -90,63 +90,63 @@
                         seatNo: 1,
                         name: '张三',
                         studentId: 'test#010101',
-                        group:'组别1'
+                        group: '组别1'
                     },
                     {
                         seatNo: 2,
                         name: '张三',
-                        studentId:'test#010101',
-                        group:'组别1'
+                        studentId: 'test#010101',
+                        group: '组别1'
                     },
                     {
                         seatNo: 3,
                         name: '张三',
-                        studentId:'test#010101',
-                        group:'组别1'
+                        studentId: 'test#010101',
+                        group: '组别1'
                     },
                     {
                         seatNo: 4,
                         name: '张三',
-                        studentId:'test#010101',
-                        group:'组别1'
+                        studentId: 'test#010101',
+                        group: '组别1'
                     },
                     {
                         seatNo: 5,
                         name: '张三',
-                        studentId:'test#010101',
-                        group:'组别1'
+                        studentId: 'test#010101',
+                        group: '组别1'
                     }
                 ],
                 tableColumns: [
-                    //{
+                    // {
                     //    type: 'selection',
                     //    width: 80,
                     //    align: 'center'
-                    //},
+                    // },
                     {
-                        key: "seatNo",
+                        key: 'seatNo',
                         title: this.$t('stuAccount.seatNo'),
                         align: 'center',
                         width: 80
                     },
                     {
-                        key: "name",
+                        key: 'name',
                         title: this.$t('stuAccount.stuName'),
                         align: 'center'
                     },
                     {
-                        key: "studentId",
+                        key: 'studentId',
                         title: this.$t('stuAccount.account'),
                         align: 'center'
                     },
                     {
-                        key: "group",
+                        key: 'group',
                         title: '组别',
                         align: 'center'
                     },
                     {
-                        key: "seatNo",
-                        title: "遥控器号码",
+                        key: 'seatNo',
+                        title: '遥控器号码',
                         width: 100,
                         align: 'center'
                     }
@@ -155,7 +155,7 @@
         },
         methods: {
             addCourse() {
-                this.addCourseStatus = true;
+                this.addCourseStatus = true
             },
             getSchoolData() {
                 this.$api.schoolSetting.findSchoolSystem({
@@ -163,25 +163,25 @@
                 }).then(res => {
                     if (res.error == null) {
                         if (res.result.data.length > 0) {
-                            this.schoolData = res.result.data[0];
-                            this.$store.commit("schoolBaseInfo/setSchoolInfo", this.schoolData);
-                            this.getClassroom();
+                            this.schoolData = res.result.data[0]
+                            this.$store.commit('schoolBaseInfo/setSchoolInfo', this.schoolData)
+                            this.getClassroom()
                         }
                     }
                 }
-                );
+                )
             },
             getGradeList(index) {
-                this.gradeList = this.schoolData.period[index].grade;
-                this.classroomShowList = this.classroomList.filter((item) => { return item.period == this.schoolData.period[index].code });
+                this.gradeList = this.schoolData.period[index].grade
+                this.classroomShowList = this.classroomList.filter((item) => { return item.period == this.schoolData.period[index].code })
                 if (this.classroomShowList.length == 0) {
-                    this.$refs.classroom.clearSingleSelect();
+                    this.$refs.classroom.clearSingleSelect()
                 }
             },
             getClassroomList(index) {
-                this.classroomShowList = this.classroomList.filter((item) => { return item.grade == this.gradeList[index].code });
+                this.classroomShowList = this.classroomList.filter((item) => { return item.grade == this.gradeList[index].code })
                 if (this.classroomShowList.length == 0) {
-                    this.$refs.classroom.clearSingleSelect();
+                    this.$refs.classroom.clearSingleSelect()
                 }
             },
             getClassroom() {
@@ -191,16 +191,16 @@
                     if (res.error == null) {
                         if (res.result.data.length > 0) {
                             this.classroomList = res.result.data;
-                            [...this.classroomShowList] = this.classroomList;
-                            this.$store.commit("schoolBaseInfo/setClassroomList", this.classroomList);
-                            this.findStudentInfo();
+                            [...this.classroomShowList] = this.classroomList
+                            this.$store.commit('schoolBaseInfo/setClassroomList', this.classroomList)
+                            this.findStudentInfo()
                         }
                     }
-                });
-            },
+                })
+            }
         },
         created() {
-            this.getSchoolData();
+            this.getSchoolData()
         }
     }
 </script>
@@ -366,4 +366,4 @@
     .add-course-modal .ivu-modal-body {
         padding:16px 30px;
     }
-</style>
+</style>

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

@@ -97,7 +97,7 @@
                                     <div class="item-question">
                                         <p>{{childIndex+1}} : <span v-html="childQuestion.question"></span></p>
                                     </div>
-                                    <div v-for="(childOption,childOptionIndex) in childQuestion.option">
+                                    <div v-for="(childOption,childOptionIndex) in childQuestion.option" :key="childOptionIndex">
                                         <p>{{String.fromCharCode(64 + parseInt(childOptionIndex+1))}} : <span v-html="childOption.value"></span></p>
                                     </div>
                                     <div class="item-answer" v-show="isShowAnswer">

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

@@ -164,6 +164,7 @@
           this.currentRole = 0
             this.$Spin.hide()
         }).catch(err => {
+            console.log(err)
             this.$Spin.hide()
         })
       },

+ 88 - 74
TEAMModelOS/ClientApp/src/view/knowledge-point/index/index.vue

@@ -7,8 +7,8 @@
         <!-- 课纲头部 切换来源以及选择学段 -->
         <div class="new-syllabus-header">
             <div>
-                <span :class="tabIndex == 0 ? 'tab-active' : ''" @click="handleTabClick(0)">校本知识</span>
-                <span :class="tabIndex == 1 ? 'tab-active' : ''" @click="handleTabClick(1)">校本知识点</span>
+                <span :class="tabIndex == 0 ? 'tab-active' : ''" @click="handleTabClick(0)">校本知识</span>
+                <span :class="tabIndex == 1 ? 'tab-active' : ''" @click="handleTabClick(1)">私有知识点</span>
             </div>
             <div class="new-syllabus-select">
                 <span>当前学段:</span>
@@ -17,7 +17,7 @@
                 </Select>
             </div>
         </div>
-        <!-- 课纲主体内容 -->
+        <!-- 主体内容 -->
         <div class="new-syllabus-content">
             <!-- 选择学科 -->
             <div class="ns-col ns-col">
@@ -37,15 +37,14 @@
                                placeholder="搜索学科..."
                                autofocus
                                style="width: 100%"
-                               @on-click="isSearchSubject = false"
-                               @on-blur="isSearchSubject = false"
+                               @on-click="onSearchSubjectClose"
                                @on-change="onSearchSubjectChange"
                                @on-enter="onSearchSubjectChange" />
                     </div>
                 </div>
                 <vuescroll>
                     <div class="gl">
-                        <div :class='["gl-item","animated","slideInUp",index == activeSubjectIndex ? "item-active":""]'
+                        <div :class='["gl-item",index == activeSubjectIndex ? "item-active":""]'
                              v-for="(item,index) in subjectList"
                              :key="index"
                              @click="hasModify ? handleConfirmSave({index},'2') : handleSubjectTap(index)">
@@ -62,7 +61,7 @@
                     <!-- 切换头部以及搜索框 -->
                     <div class="ns-header-content" v-if="!isSearchBlock">
                         <span>
-                            <Icon type="md-bookmarks" color="#fff" size="20" />
+                            <Icon type="ios-photos" color="#fff" size="20" />
                             <span style="margin-left:5px">知识块</span>
                         </span>
                         <div>
@@ -77,8 +76,7 @@
                                placeholder="搜索知识块..."
                                autofocus
                                style="width: 100%"
-                               @on-click="isSearchBlock = false"
-                               @on-blur="isSearchBlock = false"
+                               @on-click="onSearchBlockClose"
                                @on-change="onSearchBlockChange"
                                @on-enter="onSearchBlockChange" />
                     </div>
@@ -90,7 +88,7 @@
                             <EmptyBox :top="50"></EmptyBox>
                         </div>
                         <div v-else>
-                            <div :class='["gl-item","animated","slideInUp",index == activeBlockIndex ? "item-active":""]'
+                            <div :class='["gl-item",index == activeBlockIndex ? "item-active":""]'
                                  v-for="(item,index) in blockList"
                                  :key="index"
                                  @click="handleBlockTap(index,item)">
@@ -110,10 +108,12 @@
                     <!-- 切换头部以及搜索框 -->
                     <div class="ns-header-content" v-if="!isSearchPoint">
                         <span>
-                            <Icon type="md-apps" color="#fff" size="20" />
+                            <Icon type="md-cube" color="#fff" size="20" />
                             <span style="margin-left:5px">知识点</span>
                         </span>
                         <div>
+                            <Icon type="md-apps" title="切换到知识点视图" v-if="blockList.length !== 0 && isShowPoints" color="#fff" size="20" style="cursor:pointer;margin-right:10px" @click="onShowPoints" />
+                            <Icon type="ios-photos" title="切换到知识块视图" v-if="blockList.length !== 0 && !isShowPoints" color="#fff" size="18" style="cursor:pointer;margin-right:10px" @click="onShowPoints" />
                             <Icon type="md-add" v-if="blockList.length !== 0" color="#fff" size="18" style="cursor:pointer;margin-right:10px" @click="onAddPoint" />
                             <Icon type="ios-search" v-if="blockList.length !== 0" color="#fff" size="18" style="cursor:pointer" @click="isSearchPoint = true" />
                         </div>
@@ -197,13 +197,13 @@
         data() {
             return {
                 schoolInfo: {
-                    schoolCode: "HBCN",
-                    areaCode: "86"
+                    schoolCode: 'HBCN',
+                    areaCode: '86'
                 },
                 currentParams: {
-                    schoolCode: "",
-                    subjectCode: "",
-                    period: ""
+                    schoolCode: '',
+                    subjectCode: '',
+                    period: ''
                 },
                 isLoadSubject: false,
                 isLoadBlocks: false,
@@ -222,7 +222,7 @@
                 blockList: [],
                 originBlockList: [],
                 pointList: [],
-                originPointList:[],
+                originPointList: [],
                 activePeriodIndex: 0,
                 activeSubjectIndex: 0,
                 activeBlockIndex: 0,
@@ -243,7 +243,8 @@
                 pageSize: 20,
                 currentPage: 1,
                 pageSizeOpt: [5, 10, 15, 20],
-                pointOwn:"block"
+                pointOwn: 'block',
+                isShowPoints:false
             }
         },
         components: {
@@ -253,25 +254,24 @@
             this.initSchoolData()
         },
         methods: {
-            //获取当前学校学段学科等基本信息
+            // 获取当前学校学段学科等基本信息
             initSchoolData() {
                 this.$api.syllabus.GetSchoolInfo(this.schoolInfo).then(res => {
                     if (!res.error && res.result.data.length) {
-                        this.originSchoolData = res.result.data[0] //默认选择第一个
-                        this.originData = res.result.data[0] //默认选择第一个
+                        this.originSchoolData = res.result.data[0] // 默认选择第一个
+                        this.originData = res.result.data[0] // 默认选择第一个
                         this.periodList = this.originData.period
                         this.currentParams.schoolCode = this.originData.schoolCode
                         this.currentParams.period = this.originData.period[0].periodCode
-                        this.currentPeriodIndex = 0 //默认选择第一个学段
+                        this.currentPeriodIndex = 0 // 默认选择第一个学段
                         this.onPeriodChange(0)
-
                     } else {
-                        this.$Message.warning("暂无学段数据")
+                        this.$Message.warning('暂无学段数据')
                     }
                 })
             },
 
-            //根据学科获取所有知识块信息
+            // 根据学科获取所有知识块信息
             getBlocksData() {
                 let that = this
                 this.$api.knowledge.GetSchoolBlocks({ PointParams: this.currentParams }).then(res => {
@@ -280,43 +280,42 @@
                         this.blockList = list
                         this.originBlockList = list
                         this.handleBlockTap(0, list.length ? list[0] : null)
-                        setTimeout(function () {
+                        setTimeout(function() {
                             that.isLoadBlocks = false
                         }, 400)
-
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
-            //根据学科获取学科下所有知识点数据
+            // 根据学科获取学科下所有知识点数据
             getPointsData() {
                 let that = this
                 this.$api.knowledge.GetSchoolPoints(this.currentParams).then(res => {
                     if (!res.error && res.result.data) {
                         this.pointList = res.result.data
                         this.originPointList = res.result.data
-                        setTimeout(function () {
+                        setTimeout(function() {
                             that.isLoadPoints = false
-                        },800)
+                        }, 800)
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
-            //校本知识块与知识点仓库切换
+            // 校本知识块与知识点仓库切换
             handleTabClick(index) {
                 this.tabIndex = index
                 switch (index) {
                     case 0:
                         this.$refs.colRef3.style.width = '66%'
-                        this.pointOwn = "block"
+                        this.pointOwn = 'block'
                         break
                     case 1:
                         this.$refs.colRef3.style.width = '85%'
-                        this.pointOwn = "school"
+                        this.pointOwn = 'school'
                         break
                     default:
                         break
@@ -325,7 +324,7 @@
                 this.handleSubjectTap(0)
             },
 
-            //学段切换处理
+            // 学段切换处理
             onPeriodChange(index) {
                 this.preSelectVal = this.$refs.periodSelect.value
                 if (this.hasModify) {
@@ -335,23 +334,23 @@
                     this.isLoadSubject = true
                     this.activePeriodIndex = index
                     this.currentParams.period = this.originData.period[index].periodCode
-                    this.subjectList = this.periodList[index].subjects //切换学段后更新 学科 列表
+                    this.subjectList = this.periodList[index].subjects // 切换学段后更新 学科 列表
                     this.originSubjectList = this.periodList[index].subjects // 筛选学科源数据
                     this.handleSubjectTap(0)
-                    setTimeout(function () {
+                    setTimeout(function() {
                         that.isLoadSubject = false
                     }, 400)
                 }
             },
 
-            //学科点击事件
+            // 学科点击事件
             handleSubjectTap(index) {
                 this.schoolParams = {
                     schoolCode: this.originData.schoolCode,
                     subjectCode: this.subjectList[index].subjectCode,
                     period: this.currentParams.period
                 }
-                this.currentSubjectIndex = index;
+                this.currentSubjectIndex = index
                 this.currentParams.subjectCode = this.subjectList[index].subjectCode
                 this.activeSubjectIndex = index
                 if (this.tabIndex === 0) {
@@ -361,16 +360,15 @@
                     this.isLoadPoints = true
                     this.getPointsData()
                 }
-
             },
 
-            //知识块点击事件
+            // 知识块点击事件
             handleBlockTap(index, item) {
                 let that = this
                 this.activeBlockIndex = index
                 this.currentBlock = item
                 this.isLoadPoints = true
-                setTimeout(function () {
+                setTimeout(function() {
                     that.originPointList = item ? item.points : []
                     that.pointList = item ? item.points.slice(0, this.pageSize) : []
                     that.pageSizeChange(20)
@@ -378,29 +376,29 @@
                 }, 400)
             },
 
-            //添加知识块完成
+            // 添加知识块完成
             onFinishAddVolume(val) {
-                this.$Message.success("操作成功!")
-                this.handleSubjectTap(this.currentSubjectIndex) //获取最新知识块数据
-                this.isAddBlock = false  //关闭窗口
+                this.$Message.success('操作成功!')
+                this.handleSubjectTap(this.currentSubjectIndex) // 获取最新知识块数据
+                this.isAddBlock = false // 关闭窗口
             },
 
-            //添加知识点完成
+            // 添加知识点完成
             onFinishAddPoint(val) {
                 let that = this
                 this.isLoadPoints = true
 
                 if (this.tabIndex === 0) {
                     this.currentBlock = val
-                    this.blockList[this.activeBlockIndex] = val //更新当前知识块数据
+                    this.blockList[this.activeBlockIndex] = val // 更新当前知识块数据
                     this.pointList = val.points.slice(0, this.pageSize) // 更新当前知识点数据
                 } else {
                     this.handleSubjectTap(this.currentSubjectIndex)
                 }
                 this.pageChange(this.currentPage)
-                this.$Message.success("操作成功!")
-                this.isAddPoint = false  //关闭窗口
-                setTimeout(function () {
+                this.$Message.success('操作成功!')
+                this.isAddPoint = false // 关闭窗口
+                setTimeout(function() {
                     that.isLoadPoints = false
                 }, 400)
             },
@@ -440,31 +438,32 @@
                             list.splice(list.indexOf(data), 1)
                             this.$api.knowledge.SaveOrUpdateSchoolBlock([this.currentBlock]).then(res => {
                                 if (!res.error && res.result.data) {
-                                    this.$Message.success("删除成功")
+                                    this.$Message.success('删除成功')
                                     this.pageChange(this.currentPage)
                                     this.isLoadPoints = false
                                 } else {
-                                    this.$Message.warning("删除失败,错误代码:" + res.error.code + ",错误信息:" + res.error.message)
+                                    this.$Message.warning('删除失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
                                 }
                             }).catch(err => {
-                                this.$Message.warning("删除失败")
+                                console.log(err)
+                                this.$Message.warning('删除失败')
                             })
                         } else {
                             let list = this.pointList
                             list.splice(list.indexOf(data), 1)
-                            this.$api.knowledge.DeleteSchoolPoint({ id : data.id }).then(res => {
+                            this.$api.knowledge.DeleteSchoolPoint({ id: data.id }).then(res => {
                                 if (!res.error && res.result.data) {
-                                    this.$Message.success("删除成功")
+                                    this.$Message.success('删除成功')
                                     this.pageChange(this.currentPage)
                                     this.isLoadPoints = false
                                 } else {
-                                    this.$Message.warning("删除失败,错误代码:" + res.error.code + ",错误信息:" + res.error.message)
+                                    this.$Message.warning('删除失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
                                 }
                             }).catch(err => {
-                                this.$Message.warning("删除失败")
+                                console.log(err)
+                                this.$Message.warning('删除失败')
                             })
                         }
-
                     }
                 })
             },
@@ -472,7 +471,7 @@
             // 编辑知识块事件
             onEditBlock(data) {
                 this.isAddBlock = true // 打开新增窗口
-                this.isEditBlock = true //设置成编辑状态
+                this.isEditBlock = true // 设置成编辑状态
                 this.editBlock = data
             },
 
@@ -492,27 +491,44 @@
             },
 
             // 编辑知识点事件
-            onEditPoint(index,data) {
+            onEditPoint(index, data) {
                 this.isAddPoint = true // 打开新增窗口
-                this.isEditPoint = true //设置成编辑状态
+                this.isEditPoint = true // 设置成编辑状态
                 this.editPointIndex = index
-                this.currentPoint =  data
+                this.currentPoint = data
             },
 
-            //搜索知识块输入框onchange事件
+            // 搜索知识块输入框onchange事件
             onSearchBlockChange() {
-                this.blockList = this.originBlockList.filter(item => item.name.indexOf(this.searchBlock) > -1);
+                this.blockList = this.originBlockList.filter(item => item.name.indexOf(this.searchBlock) > -1)
+                if (this.blockList.length) this.handleBlockTap(0, this.blockList[0])
             },
 
-            //搜索知识点输入框onchange事件
+            // 搜索知识点输入框onchange事件
             onSearchPointChange() {
                 let list = this.tabIndex === 0 ? this.currentBlock.points : this.originPointList
-                this.pointList = list.filter(item => item.name.indexOf(this.searchPoint) > -1);
+                this.pointList = list.filter(item => item.name.indexOf(this.searchPoint) > -1)
             },
 
-            //搜索学科输入框onchange事件
+            // 清空科目搜索框
+            onSearchSubjectClose() {
+                this.searchSubject = ''
+                this.isSearchSubject = false
+                this.subjectList = this.originSubjectList
+                this.handleSubjectTap(0)
+            },
+
+            // 清空科目搜索框
+            onSearchBlockClose() {
+                this.searchBlock = ''
+                this.isSearchBlock = false
+                this.blockList = this.originBlockList
+                if (this.blockList.length) this.handleBlockTap(0, this.blockList[0])
+            },
+
+            // 搜索学科输入框onchange事件
             onSearchSubjectChange() {
-                this.subjectList = this.originSubjectList.filter(item => item.subjectName.indexOf(this.searchSubject) > -1);
+                this.subjectList = this.originSubjectList.filter(item => item.subjectName.indexOf(this.searchSubject) > -1)
                 this.handleSubjectTap(0)
             },
 
@@ -523,7 +539,6 @@
                 let end = this.pageSize * page
                 if (this.tabIndex === 0) {
                     this.pointList = this.currentBlock ? this.currentBlock.points.slice(start, end) : []
-
                 } else {
                     this.pointList = this.originPointList ? this.originPointList.slice(start, end) : []
                 }
@@ -538,10 +553,9 @@
                 this.pageSize = val
                 this.currentPage = 1
                 this.pageChange(1)
-            },
-
+            }
 
-        },
+        }
     }
 </script>
 

+ 16 - 16
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/addBlock.vue

@@ -26,8 +26,8 @@
                 originDatas: {},
                 currentPeriod: {},
                 editItem: null,
-                isLoading:false,
-                uuid:"",
+                isLoading: false,
+                uuid: '',
                 formTop: {
                     subject: '',
                     grade: '',
@@ -45,7 +45,7 @@
             handleSubmit() {
                 let newName = this.formTop.name
                 if (!newName) {
-                    this.$Message.warning("知识块名称不能为空!")
+                    this.$Message.warning('知识块名称不能为空!')
                 } else {
                     this.isLoading = true
                     this.uuid = Math.uuid()
@@ -71,19 +71,20 @@
                         if (!res.error && res.result.data) {
                             this.$emit('addFinish', false)
                         } else {
-                            this.$Message.warning("添加册别失败,错误代码:" + res.error.code + ",错误信息:" + res.error.message)
+                            this.$Message.warning('添加册别失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
                         }
                         this.closeModal()
                         this.editItem = null
                         this.isLoading = false
                     }).catch(err => {
-                        this.$Message.warning("添加册别失败")
+                        console.log(err)
+                        this.$Message.warning('添加册别失败')
                         this.isLoading = false
                     })
                 }
             },
 
-            //添加完成 关闭窗口
+            // 添加完成 关闭窗口
             closeModal() {
                 this.formTop.name = ''
             }
@@ -94,35 +95,34 @@
             originData: {
                 handler(newValue, oldValue) {
                     this.originDatas = newValue
-                },
+                }
             },
             periodIndex: {
                 handler(newValue, oldValue) {
                     this.currentPeriod = this.originDatas.period[newValue]
                     this.formTop.subject = this.currentPeriod.subjects[0].subjectCode
-                    this.formTop.name = ""
-                },
+                    this.formTop.name = ''
+                }
             },
             subjectIndex: {
                 handler(newValue, oldValue) {
                     this.formTop.subject = this.currentPeriod.subjects[newValue].subjectCode
-                },
+                }
             },
             editBlock: {
                 handler(newValue, oldValue) {
-                    if (newValue) {  // 有编辑册别传过来则为编辑状态
+                    if (newValue) { // 有编辑册别传过来则为编辑状态
                         this.editItem = newValue
                         this.formTop.subject = newValue.subjectCode
                         this.formTop.name = newValue.name
-                    } else { //否则为新增状态
+                    } else { // 否则为新增状态
                         this.formTop.subject = this.currentPeriod.subjects[0].subjectCode
-                        this.formTop.name = ""
+                        this.formTop.name = ''
                         this.editItem = newValue
                     }
-
-                },
+                }
             }
-        },
+        }
 
     }
 </script>

+ 26 - 34
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/addPoint.vue

@@ -27,8 +27,8 @@
                 schoolInfos: {},
                 editItemIndex: null,
                 addPointType: 'block',
-                isLoading:false,
-                uuid: "",
+                isLoading: false,
+                uuid: '',
                 formTop: {
                     blockName: '',
                     name: ''
@@ -45,7 +45,7 @@
                 this.isLoading = true
                 let newName = this.formTop.name
                 if (!newName) {
-                    this.$Message.warning("知识点名称不能为空!")
+                    this.$Message.warning('知识点名称不能为空!')
                 } else {
                     this.uuid = Math.uuid()
                     let params = {
@@ -71,12 +71,13 @@
                             this.isLoading = false
                             this.$emit('addFinish', res.result.data[0])
                         } else {
-                            this.$Message.warning("添加册别失败,错误代码:" + res.error.code + ",错误信息:" + res.error.message)
+                            this.$Message.warning('添加册别失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
                         }
-                        this.closeModal();
-                        this.editItemIndex = null;
+                        this.closeModal()
+                        this.editItemIndex = null
                     }).catch(err => {
-                        this.$Message.warning("添加册别失败")
+                        console.log(err)
+                        this.$Message.warning('添加册别失败')
                     })
                 }
             },
@@ -85,7 +86,7 @@
                 this.isLoading = true
                 let newName = this.formTop.name
                 if (!newName) {
-                    this.$Message.warning("知识点名称不能为空!")
+                    this.$Message.warning('知识点名称不能为空!')
                 } else {
                     this.uuid = Math.uuid()
                     let params = {
@@ -103,28 +104,24 @@
                     }
 
                     params.knowledgeId = this.currentPoint.knowledgeId || Math.uuid()
-                    
+
                     this.$api.knowledge.SaveOrUpdateSchoolPoint([params]).then(res => {
                         if (!res.error && res.result.data) {
                              this.isLoading = false
-                            this.$emit('addFinish',false)
+                            this.$emit('addFinish', false)
                         } else {
-                            this.$Message.warning("添加册别失败,错误代码:" + res.error.code + ",错误信息:" + res.error.message)
+                            this.$Message.warning('添加册别失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
                         }
-                        this.closeModal();
-                        this.currentPoint = null;
+                        this.closeModal()
+                        this.currentPoint = null
                     }).catch(err => {
-                        this.$Message.warning("添加册别失败")
+                        console.log(err)
+                        this.$Message.warning('添加册别失败')
                     })
-
-
                 }
-
-
-
             },
 
-            //添加完成 关闭窗口
+            // 添加完成 关闭窗口
             closeModal() {
                 this.formTop.name = ''
             }
@@ -137,8 +134,7 @@
                     if (newValue) {
                         this.addPointType = newValue
                     }
-
-                },
+                }
             },
 
             blockData: {
@@ -147,8 +143,7 @@
                         this.blockDatas = newValue
                         this.formTop.blockName = newValue.name
                     }
-
-                },
+                }
             },
 
             pointData: {
@@ -157,8 +152,7 @@
                         this.currentPoint = newValue
                         this.formTop.name = newValue.name
                     }
-
-                },
+                }
             },
 
             schoolParams: {
@@ -166,25 +160,23 @@
                     if (newValue) {
                         this.schoolInfos = newValue
                     }
-
-                },
+                }
             },
 
             editPointIndex: {
                 handler(newValue, oldValue) {
-                    if (newValue || newValue === 0) {  // 有编辑册别传过来则为编辑状态
+                    if (newValue || newValue === 0) { // 有编辑册别传过来则为编辑状态
                         this.editItemIndex = newValue
                         this.formTop.blockName = this.blockDatas.name
                         this.formTop.name = this.currentPoint ? this.currentPoint.name : this.blockDatas.points[newValue].name
-                    } else { //否则为新增状态
+                    } else { // 否则为新增状态
                         this.formTop.blockName = this.blockDatas.name
-                        this.formTop.name = ""
+                        this.formTop.name = ''
                         this.editItemIndex = newValue
                     }
-
-                },
+                }
             }
-        },
+        }
 
     }
 </script>

+ 11 - 11
TEAMModelOS/ClientApp/src/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue

@@ -366,14 +366,14 @@
             bundleScoll() {
                 let schoolPlanBox = document.getElementById('school-plan-box')
                 let _this = this
-                schoolPlanBox.addEventListener('mousewheel', function (e) {
+                schoolPlanBox.addEventListener('mousewheel', function(e) {
                     if (e.preventDefault) {
                         e.preventDefault()
                     } else {
                         window.event.returnValue == false
                     }
                     _this.scrollFunc(e)
-                }, false) || schoolPlanBox.addEventListener('DOMMouseScroll', function (e) {
+                }, false) || schoolPlanBox.addEventListener('DOMMouseScroll', function(e) {
                     if (e.preventDefault) {
                         e.preventDefault()
                     } else {
@@ -562,7 +562,7 @@
                     image.src = 'https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelos/test/school_plan.jpg'
                     // image.src = imgUrl;
                     image.crossOrigin = 'anonymous'
-                    image.onload = function () {
+                    image.onload = function() {
                         _this.schoolPlan.width = image.width
                         _this.schoolPlan.height = image.height
                         context.drawImage(image, 0, 0)
@@ -594,7 +594,7 @@
                         context.putImageData(imgData, 0, 0)
                         let PNGImg = new Image()
                         PNGImg.src = _this.schoolPlan.toDataURL('image/png')
-                        PNGImg.onload = function () {
+                        PNGImg.onload = function() {
                             _this.schoolImageData = PNGImg
                         }
                         _this.isFirstDraw++
@@ -638,7 +638,7 @@
                 })
             },
             delClassroom(index) {
-                //if (this.classroomList.length > 1) {
+                // if (this.classroomList.length > 1) {
                     this.classroomListShow[this.currentClassroomIndex].status = 0
                     this.$api.schoolSetting.classroomSettingSaveOrUpdate(this.classroomListShow[this.currentClassroomIndex]).then(res => {
                         if (res.error == null) {
@@ -652,9 +652,9 @@
                         }
                     })
 
-                //} else {
+                // } else {
                 //    this.$Message.warning(this.$t('schoolBaseInfo.csTips4'))
-                //}
+                // }
             },
             uploadSchoolPlan(res, file) {
                 this.$Message.success(this.$t('schoolBaseInfo.csTips5'))
@@ -744,16 +744,16 @@
                 pink.src = require('../../../assets/redpin.svg')
                 green.src = require('../../../assets/greenpin.svg')
                 let _this = this
-                white.onload = function () {
+                white.onload = function() {
                     _this.whiteImageData = white
                     _this.drawSchoolPlan()
                     _this.bundleScoll()
-                    //_this.initIcon()
+                    // _this.initIcon()
                 }
-                pink.onload = function () {
+                pink.onload = function() {
                     _this.pinImageData = pink
                 }
-                green.onload = function () {
+                green.onload = function() {
                     _this.greenImageData = green
                 }
                 this.$api.schoolSetting.findSchoolSystem({

+ 11 - 12
TEAMModelOS/ClientApp/src/view/school-mgmt/SystemSetting/SystemSetting.vue

@@ -165,7 +165,7 @@
                 </EditableLabel>
                 <Icon type="md-create" class="campus-btn-edit" title="编辑" size="20" @click="changeCampusStatus(index)" />
             </p>
-            
+
             <Icon type="md-add-circle" size="40" style="margin:auto;cursor:pointer;margin-top:30px;" @click="addCampus" />
         </Modal>
     </div>
@@ -239,7 +239,7 @@
                 }
             },
             selectCampus(index) {
-                this.selectedCampusIndex = index;
+                this.selectedCampusIndex = index
             },
             changeCampusStatus(index) {
                 this.$refs.campusName[index].handleEdit()
@@ -252,14 +252,13 @@
                     this.$Message.error({
                         background: true,
                         content: '对不起,系统授权最多设置两个校区!'
-                    });
+                    })
                 } else {
                     this.schoolSetting.campuses.push({
                         campusName: '设置校区名字',
                         campusCode: Math.uuid()
                     })
                 }
-
             },
             setCampus() {
                 this.campusStatus = true
@@ -305,7 +304,7 @@
                     semesters: [],
                     grades: [],
                     subjects: [],
-                    campuses:[]
+                    campuses: []
                 })
                 this.schoolSetting.period[0].semesters.push({
                     semesterName: this.$t('schoolBaseInfo.persetSemester'),
@@ -376,7 +375,7 @@
                         if (res.result.data.length > 0) {
                             this.isInit = true
                             this.schoolSetting = res.result.data[0]
-                            //this.updated = false
+                            // this.updated = false
                         } else {
                             this.getDefaultData()
                         }
@@ -502,7 +501,7 @@
                         }
                     ],
                     grades: JSON.parse(JSON.stringify(this.dataDefault.grades)),
-                    subjects: JSON.parse(JSON.stringify(this.dataDefault.subjects)),
+                    subjects: JSON.parse(JSON.stringify(this.dataDefault.subjects))
                 })
             },
             // 获取随机颜色十六进制
@@ -554,18 +553,18 @@
                             if (res.result.data.length = 1) {
                                 this.dataDefault = res.result.data[0]
                                 this.isInit = true
-                                this.schoolSetting.period[0].grades = JSON.parse(JSON.stringify(this.dataDefault.grades));
+                                this.schoolSetting.period[0].grades = JSON.parse(JSON.stringify(this.dataDefault.grades))
                                 this.isInit = true
-                                this.schoolSetting.period[0].subjects = JSON.parse(JSON.stringify(this.dataDefault.subjects));
+                                this.schoolSetting.period[0].subjects = JSON.parse(JSON.stringify(this.dataDefault.subjects))
                             } else {
-                                alert("API error!")
+                                alert('API error!')
                             }
                         } else {
-                            alert("API error!")
+                            alert('API error!')
                         }
                     },
                     (err) => {
-                        alert("API error!")
+                        alert('API error!')
                     }
                 )
             }

+ 140 - 147
TEAMModelOS/ClientApp/src/view/student-account/Index.vue

@@ -92,9 +92,9 @@
 </template>
 
 <script>
-  import AddStudent from "./add-student/AddStudent"
-  import ImportStudent from "./add-student/ImportStudent"
-  import Authorization from "./add-student/Authorization"
+  import AddStudent from './add-student/AddStudent'
+  import ImportStudent from './add-student/ImportStudent'
+  import Authorization from './add-student/Authorization'
   export default {
     components: {
       AddStudent,
@@ -103,192 +103,185 @@
     },
     data() {
       return {
-        classroomList:[],
-        classroomShowList:[],
-        gradeList:[],
-        searchPeriod: "",
-        searchGrade: "",
-        searchClassroom:"",
+        classroomList: [],
+        classroomShowList: [],
+        gradeList: [],
+        searchPeriod: '',
+        searchGrade: '',
+        searchClassroom: '',
         schoolData: {},
         tableLoading: false,
-        searchText:'',
-        currentPage:1,
-        pageSize:30,
-        bizType:0,
-        editStudentInfo:[],
+        searchText: '',
+        currentPage: 1,
+        pageSize: 30,
+        bizType: 0,
+        editStudentInfo: [],
         selections: [],
         selectRow: {},
-        addStudentStatus:false,
+        addStudentStatus: false,
         importStudentStatus: false,
         authorizationStatus: false,
         demoLoginInfo: {
-          user: "admin",
-          teamModelId: "habook#0001",
-          school: "醍摩豆书院",
-          schoolCode:"HBCN"
+          user: 'admin',
+          teamModelId: 'habook#0001',
+          school: '醍摩豆书院',
+          schoolCode: 'HBCN'
         },
-        model: "",
+        model: '',
         list: [],
         tableData: [],
         tableShowData: [],
-        tablePageData:[],
-        tableColumns:[]
+        tablePageData: [],
+        tableColumns: []
       }
     },
     methods: {
       cancel() {
-        console.log(this);
+        console.log(this)
       },
       getGradeList(index) {
-        this.gradeList = this.schoolData.period[index].grade;
-        this.classroomShowList = this.classroomList.filter((item) => { return item.period == this.schoolData.period[index].code });
+        this.gradeList = this.schoolData.period[index].grade
+        this.classroomShowList = this.classroomList.filter((item) => { return item.period == this.schoolData.period[index].code })
         if (this.classroomShowList.length == 0) {
-          this.$refs.classroom.clearSingleSelect();
+          this.$refs.classroom.clearSingleSelect()
         }
       },
       getClassroomList(index) {
-        this.classroomShowList = this.classroomList.filter((item) => { return item.grade == this.gradeList[index].code });
+        this.classroomShowList = this.classroomList.filter((item) => { return item.grade == this.gradeList[index].code })
         if (this.classroomShowList.length == 0) {
-          this.$refs.classroom.clearSingleSelect();
+          this.$refs.classroom.clearSingleSelect()
         }
       },
       getPageData() {
-        let start = ((this.currentPage - 1) * this.pageSize);
-        let end = 0;
+        let start = ((this.currentPage - 1) * this.pageSize)
+        let end = 0
         if (this.tableShowData.length < this.currentPage * this.pageSize) {
-          end = this.tableShowData.length;
+          end = this.tableShowData.length
         } else {
-          end = this.currentPage * this.pageSize;
+          end = this.currentPage * this.pageSize
         }
-        this.tablePageData = this.tableShowData.slice(start, end);
+        this.tablePageData = this.tableShowData.slice(start, end)
       },
       searchData() {
-        this.tableLoading = true;
-        this.tableShowData = this.tableData.filter(item => item.studentId.indexOf(this.searchText) != -1);
-        this.currentPage = 1;
-        this.getPageData();
-        this.tableLoading = false;
+        this.tableLoading = true
+        this.tableShowData = this.tableData.filter(item => item.studentId.indexOf(this.searchText) != -1)
+        this.currentPage = 1
+        this.getPageData()
+        this.tableLoading = false
       },
       cancelAll() {
-        this.selections = [];
+        this.selections = []
       },
       getIndex(_arr, _obj) {
-        var len = _arr.length;
+        var len = _arr.length
         for (let i = 0; i < len; i++) {
-          if (this.isObjEqual(_arr[i],_obj)) {
-            return parseInt(i);
+          if (this.isObjEqual(_arr[i], _obj)) {
+            return parseInt(i)
           }
         }
-        return -1;
+        return -1
       },
       isObjEqual(o1, o2) {
-        var props1 = Object.keys(o1);
-        var props2 = Object.keys(o2);
+        var props1 = Object.keys(o1)
+        var props2 = Object.keys(o2)
         if (props1.length != props2.length) {
-          return false;
+          return false
         }
         for (var i = 0, max = props1.length; i < max; i++) {
-          var propName = props1[i];
+          var propName = props1[i]
           if (o1[propName] !== o2[propName]) {
-            return false;
+            return false
           }
         }
-        return true;
+        return true
       },
       getSelectInfo(selction, row) {
-        this.selections = selction;
-        this.selectRow = row;
+        this.selections = selction
+        this.selectRow = row
       },
       closeAddStudent(data) {
         if (data.action == 1) {
-          let infoString = JSON.stringify(data.studentInfo);
-          let info = JSON.parse(infoString);
+          let infoString = JSON.stringify(data.studentInfo)
+          let info = JSON.parse(infoString)
           this.tableData.unshift(info);
-          [...this.tableShowData] = this.tableData;
-          this.getPageData();
+          [...this.tableShowData] = this.tableData
+          this.getPageData()
         } else {
-          this.findStudentInfo();
+          this.findStudentInfo()
         }
-        this.addStudentStatus = false;
+        this.addStudentStatus = false
       },
       closeImportStudent(data) {
-        //this.tableData.push(...(data.data));
-        //[...this.tableShowData] = this.tableData;
-        this.findStudentInfo();
-        this.importStudentStatus = false;
+        // this.tableData.push(...(data.data));
+        // [...this.tableShowData] = this.tableData;
+        this.findStudentInfo()
+        this.importStudentStatus = false
       },
       closeAuth() {
-        this.authorizationStatus = false;
+        this.authorizationStatus = false
       },
       addStudent() {
-        this.bizType = 1;
-        this.$refs.selection.clearCurrentRow();
-        this.addStudentStatus = true;
-        
+        this.bizType = 1
+        this.$refs.selection.clearCurrentRow()
+        this.addStudentStatus = true
       },
       importStudent() {
-        this.importStudentStatus = true;
+        this.importStudentStatus = true
       },
       showAuthorization() {
-        this.authorizationStatus = true;
+        this.authorizationStatus = true
       },
       editStudent(index) {
-        this.bizType = 2;
+        this.bizType = 2
         if (index != undefined) {
-          this.editStudentInfo = [];
-          let objStr = JSON.stringify(this.tableData[index]);
-          this.editStudentInfo.push(JSON.parse(objStr));
-          this.tableShowData[index]._checked = true;
-          this.tablePageData[index]._checked = true;
-          this.$forceUpdate();
-          this.addStudentStatus = true;
+          this.editStudentInfo = []
+          let objStr = JSON.stringify(this.tableData[index])
+          this.editStudentInfo.push(JSON.parse(objStr))
+          this.tableShowData[index]._checked = true
+          this.tablePageData[index]._checked = true
+          this.$forceUpdate()
+          this.addStudentStatus = true
         } else {
           if (this.selections.length > 0) {
-            
             this.editStudentInfo = [];
-            [...this.editStudentInfo] = this.selections;
-            this.addStudentStatus = true;
+            [...this.editStudentInfo] = this.selections
+            this.addStudentStatus = true
           } else {
-            this.$Message.error(this.$t('stuAccount.tips1'));
+            this.$Message.error(this.$t('stuAccount.tips1'))
           }
         }
-        
       },
       delStudent(index, row) {
         if (index >= 0) {
-          let showIndex = index + (this.currentPage - 1) * this.pageSize;
-          let originIndex = this.getIndex(this.tableData, this.tablePageData[index]);
+          let showIndex = index + (this.currentPage - 1) * this.pageSize
+          let originIndex = this.getIndex(this.tableData, this.tablePageData[index])
           this.$Modal.confirm({
             title: this.$t('stuAccount.tips2Title'),
-            content: '<p>' + this.$t('stuAccount.tips2Content1') +" <strong style='color:red;'>"+ this.tableShowData[showIndex].name + '</strong></p>',
+            content: '<p>' + this.$t('stuAccount.tips2Content1') + " <strong style='color:red;'>" + this.tableShowData[showIndex].name + '</strong></p>',
             onOk: () => {
               this.$api.stuAccount.deleteStudentInfo(this.tablePageData[index]).then(
                 (res) => {
                   if (res.error == null) {
-                    this.tableData.splice(originIndex, 1);
-                    this.tablePageData.splice(index, 1);  
-                    this.tableShowData.splice(showIndex, 1);
+                    this.tableData.splice(originIndex, 1)
+                    this.tablePageData.splice(index, 1)
+                    this.tableShowData.splice(showIndex, 1)
                   }
                 },
                 (err) => {
-                  alert("API error!");
+                  alert('API error!')
                 }
-              );
-              
+              )
             },
             onCancel: () => {
             }
-          });
-         
-          
+          })
         } else {
-          let i = this.getIndex(this.tableData, row);
+          let i = this.getIndex(this.tableData, row)
           if (i >= 0) {
-            this.tableData.splice(i, 1);
+            this.tableData.splice(i, 1)
           } else {
-             this.$Message.error(this.$t('stuAccount.tips3'));
+             this.$Message.error(this.$t('stuAccount.tips3'))
           }
-          
         }
       },
       getSchoolData() {
@@ -297,13 +290,13 @@
         }).then(res => {
           if (res.error == null) {
             if (res.result.data.length > 0) {
-              this.schoolData = res.result.data[0];
-              this.$store.commit("schoolBaseInfo/setSchoolInfo", this.schoolData);
-              this.getClassroom();
-            } 
+              this.schoolData = res.result.data[0]
+              this.$store.commit('schoolBaseInfo/setSchoolInfo', this.schoolData)
+              this.getClassroom()
+            }
           }
         }
-        );
+        )
       },
       getClassroom() {
         this.$api.schoolSetting.findClassInfo({
@@ -312,12 +305,12 @@
           if (res.error == null) {
             if (res.result.data.length > 0) {
               this.classroomList = res.result.data;
-              [...this.classroomShowList] = this.classroomList;
-              this.$store.commit("schoolBaseInfo/setClassroomList", this.classroomList);
-              this.findStudentInfo();
+              [...this.classroomShowList] = this.classroomList
+              this.$store.commit('schoolBaseInfo/setClassroomList', this.classroomList)
+              this.findStudentInfo()
             }
           }
-        });
+        })
       },
       initData() {
         this.tableColumns = [
@@ -327,96 +320,96 @@
             align: 'center'
           },
           {
-            key: "seatNo",
-            title:this.$t('stuAccount.seatNo'),
+            key: 'seatNo',
+            title: this.$t('stuAccount.seatNo'),
             align: 'center',
             width: 80
           },
           {
-            key: "studentId",
-            title:this.$t('stuAccount.account'),
+            key: 'studentId',
+            title: this.$t('stuAccount.account'),
             align: 'center'
           },
           {
-            key: "name",
-            title:this.$t('stuAccount.stuName'),
+            key: 'name',
+            title: this.$t('stuAccount.stuName'),
             align: 'center'
           },
           {
-            slot: "classroomName",
-            title:this.$t('stuAccount.classroomName'),
+            slot: 'classroomName',
+            title: this.$t('stuAccount.classroomName'),
             align: 'center'
           },
           {
-            slot: "classroomCode",
-            title:this.$t('stuAccount.classroomCode'),
+            slot: 'classroomCode',
+            title: this.$t('stuAccount.classroomCode'),
             align: 'center'
           },
           {
-            slot: "periodName",  
-            title:this.$t('stuAccount.period'),
+            slot: 'periodName',
+            title: this.$t('stuAccount.period'),
             align: 'center'
           },
           {
-            slot: "gradeName",
-            title:this.$t('stuAccount.grade'),
+            slot: 'gradeName',
+            title: this.$t('stuAccount.grade'),
             align: 'center'
           },
           {
-            slot: "status",
-            title:this.$t('stuAccount.authStatus'),
+            slot: 'status',
+            title: this.$t('stuAccount.authStatus'),
             align: 'center'
           },
           {
-            slot: "action",
-            title: " ",
-            width:100,
+            slot: 'action',
+            title: ' ',
+            width: 100,
             align: 'center'
           }
         ]
       },
       findStudentInfo() {
-        this.tableLoading = true;
+        this.tableLoading = true
         let params = {
           schoolCode: this.demoLoginInfo.schoolCode
         }
         this.$api.stuAccount.findStudent(params).then(
           (res) => {
             if (res.error == null) {
-              this.tableData = res.result.data;
+              this.tableData = res.result.data
               for (let item of this.tableData) {
-                let currentSchoolInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + item.classroom.periodCode + "')]");
-                let currentClassroomlInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.classroomList, "$..[?(@.classroomCode=='" + item.classroom.classroomCode + "')]");
-                
+                let currentSchoolInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + item.classroom.periodCode + "')]")
+                let currentClassroomlInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.classroomList, "$..[?(@.classroomCode=='" + item.classroom.classroomCode + "')]")
+
                 if (currentSchoolInfo.length > 0) {
-                  item.classroom.periodName = currentSchoolInfo[0].periodName;
-                  item.classroom.gradeName = this.$JSONPath.query(currentSchoolInfo, "$..grades[?(@.gradeCode=='" + item.classroom.gradeCode + "')]")[0].gradeName;
-                  item.classroom.classroomName = currentClassroomlInfo[0].classroomName;
+                  item.classroom.periodName = currentSchoolInfo[0].periodName
+                  item.classroom.gradeName = this.$JSONPath.query(currentSchoolInfo, "$..grades[?(@.gradeCode=='" + item.classroom.gradeCode + "')]")[0].gradeName
+                  item.classroom.classroomName = currentClassroomlInfo[0].classroomName
                 }
               }
-              [...this.tableShowData] = this.tableData;
-              this.getPageData();
-                this.$forceUpdate();
-                console.log(this.tableData);
-              this.tableLoading = false;
+              [...this.tableShowData] = this.tableData
+              this.getPageData()
+                this.$forceUpdate()
+                console.log(this.tableData)
+              this.tableLoading = false
             } else {
-              alert("API error!");
-              this.tableLoading = false;
+              alert('API error!')
+              this.tableLoading = false
             }
           },
           (err) => {
-            this.tableLoading = false;
+            this.tableLoading = false
           }
-        );
+        )
       }
     },
     created() {
-      this.initData();
-      this.getSchoolData();
-      //this.getClassroom();
-      //this.findStudentInfo();
+      this.initData()
+      this.getSchoolData()
+      // this.getClassroom();
+      // this.findStudentInfo();
     },
-    computed: { 
+    computed: {
     },
     mounted() {
     }

+ 96 - 98
TEAMModelOS/ClientApp/src/view/student-account/add-student/AddStudent.vue

@@ -64,7 +64,7 @@
 
 </style>
 <template>
-  
+
   <div class="account-form">
     <!--新增学生表单-->
     <Form ref="studentInfoForm" :model="studentInfo" label-position="top" :rules="ruleValidate" :show-message="showError" v-if="bizType == 1">
@@ -113,7 +113,7 @@
         <span slot="append" size="small" style="cursor:pointer;">重置密码</span>
           </Input>
         <!--<Checkbox v-model="same" @on-change="setPassword">{{$t('stuAccount.isSame')}}</Checkbox>-->
-      
+
       </FormItem>
       <FormItem :label="$t('stuAccount.stuName')" prop="name" v-if="editStudentInfo.length == 1">
         <Input v-model="editStudentInfo[0].name" :placeholder="$t('stuAccount.stuNameHolder')"></Input>
@@ -142,21 +142,21 @@
 <script>
   export default {
     props: {
-      isShow: { 
+      isShow: {
         type: Boolean,
         default: false
       },
       schoolCode: {
         type: String,
-        default: ""
+        default: ''
       },
       editStudentInfo: {
         type: Array,
         default: []
       },
-      bizType: {  
+      bizType: {
         type: Number,
-        default:0
+        default: 0
       }
     },
     data() {
@@ -168,27 +168,27 @@
           same: '',
           list: [],
           studentInfo: {
-              name: "",
-              studentId: "",
+              name: '',
+              studentId: '',
               seatNo: null,
               classroom: {
-                  classroomName: "",
-                  classroomCode: "",
-                  periodCode: "",
-                  periodName: "",
-                  gradeName: "",
-                  gradeCode: "",
+                  classroomName: '',
+                  classroomCode: '',
+                  periodCode: '',
+                  periodName: '',
+                  gradeName: '',
+                  gradeCode: ''
               },
               password: {
-                  value:""
+                  value: ''
               }
           },
         ruleValidate: {
           studentId: [
             { required: true, message: '账号不能为空', trigger: 'blur' }
           ],
-          "password.value": [
-            { required: true, message: '密码不能为空', trigger: 'blur'}
+          'password.value': [
+            { required: true, message: '密码不能为空', trigger: 'blur' }
           ],
             classroom: [
                 { required: true, message: '教室资讯不能为空', trigger: 'blur', type: 'object' }
@@ -197,7 +197,7 @@
             { required: true, message: '学生姓名不能为空', trigger: 'blur' }
           ],
           seatNo: [
-            { required: true, type:'number', message: '学生座位号不能为空', trigger: 'blur' }
+            { required: true, type: 'number', message: '学生座位号不能为空', trigger: 'blur' }
           ]
         },
         modal_loading: false
@@ -206,7 +206,7 @@
     computed: {
       show: {
         get() {
-          //if (this.bizType == 2 && this.isShow == true) {
+          // if (this.bizType == 2 && this.isShow == true) {
           //  if (this.editStudentInfo.length == 1) {
           //    let arr = this.editStudentInfo[0].studentId.split("#");
           //    if (arr.length > 1) {
@@ -215,152 +215,150 @@
           //      alert("学生账号格式错误!");
           //    }
           //  }
-          //}
-          return this.isShow;
+          // }
+          return this.isShow
         },
-        set(value){
+        set(value) {
         }
-      },
+      }
     },
     methods: {
       cancel() {
-        console.log(this);
-        this.same = false;
-        this.$parent.addStudentStatus = false;
-        this.$emit("saveStudentInfo", {
+        console.log(this)
+        this.same = false
+        this.$parent.addStudentStatus = false
+        this.$emit('saveStudentInfo', {
               action: 0
-            });
+            })
       },
       setPassword(data) {
         if (this.bizType == 2) {
           if (data) {
-            this.$set(this.editStudentInfo[0], 'password.value', this.editStudentInfo[0].studentId);
+            this.$set(this.editStudentInfo[0], 'password.value', this.editStudentInfo[0].studentId)
           } else {
-            //this.$set(this.editStudentInfo[0], 'password', "");
+            // this.$set(this.editStudentInfo[0], 'password', "");
           }
         } else {
           if (data) {
-            this.studentInfo.password.value = this.studentInfo.studentId;
+            this.studentInfo.password.value = this.studentInfo.studentId
           } else {
-            //this.studentInfo.password = "";
+            // this.studentInfo.password = "";
           }
         }
       },
       getCurrentClassroom(index) {
           if (this.bizType == 1) {
-            this.studentInfo.classroom = this.classroomList[index];
-          //this.studentInfo.periodCode = this.classroomList[index].period;
-          //this.studentInfo.gradeCode = this.classroomList[index].grade;
-          //this.studentInfo.classroomCode = this.classroomList[index].classroomCode;
-          let currentInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + this.studentInfo.classroom.periodCode + "')]");
+            this.studentInfo.classroom = this.classroomList[index]
+          // this.studentInfo.periodCode = this.classroomList[index].period;
+          // this.studentInfo.gradeCode = this.classroomList[index].grade;
+          // this.studentInfo.classroomCode = this.classroomList[index].classroomCode;
+          let currentInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + this.studentInfo.classroom.periodCode + "')]")
           if (currentInfo.length > 0) {
-            this.studentInfo.classroom.periodName = currentInfo[0].periodName;
-            this.studentInfo.classroom.gradeName = this.$JSONPath.query(currentInfo, "$..grades[?(@.gradeCode=='" + this.studentInfo.classroom.gradeCode + "')]")[0].gradeName;
+            this.studentInfo.classroom.periodName = currentInfo[0].periodName
+            this.studentInfo.classroom.gradeName = this.$JSONPath.query(currentInfo, "$..grades[?(@.gradeCode=='" + this.studentInfo.classroom.gradeCode + "')]")[0].gradeName
             }
-            
-          console.log(this.studentInfo);
-          
+
+          console.log(this.studentInfo)
           } else {
-              let currentInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + this.classroomList[index].periodCode + "')]");
-          let periodName = "数据错误";
-          let gradeName = "数据错误";
+              let currentInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + this.classroomList[index].periodCode + "')]")
+          let periodName = '数据错误'
+          let gradeName = '数据错误'
           if (currentInfo.length > 0) {
-            periodName = currentInfo[0].periodName;
-            gradeName = this.$JSONPath.query(currentInfo, "$..grades[?(@.gradeCode=='" + this.classroomList[index].gradeCode + "')]")[0].gradeName;
+            periodName = currentInfo[0].periodName
+            gradeName = this.$JSONPath.query(currentInfo, "$..grades[?(@.gradeCode=='" + this.classroomList[index].gradeCode + "')]")[0].gradeName
           }
           for (let i = 0; i < this.editStudentInfo.length; i++) {
-            this.editStudentInfo[i].classroom.periodCode = this.classroomList[index].periodCode;
-            this.editStudentInfo[i].classroom.gradeCode = this.classroomList[index].gradeCode;
-            this.editStudentInfo[i].classroom.classroomCode = this.classroomList[index].classroomCode;
-            this.editStudentInfo[i].classroom.periodName = periodName;
-            this.editStudentInfo[i].classroom.gradeName = gradeName;
+            this.editStudentInfo[i].classroom.periodCode = this.classroomList[index].periodCode
+            this.editStudentInfo[i].classroom.gradeCode = this.classroomList[index].gradeCode
+            this.editStudentInfo[i].classroom.classroomCode = this.classroomList[index].classroomCode
+            this.editStudentInfo[i].classroom.periodName = periodName
+            this.editStudentInfo[i].classroom.gradeName = gradeName
           }
         }
-        this.$forceUpdate();
+        this.$forceUpdate()
       },
       getClassroom() {
-        this.classroomList = this.$store.state.schoolBaseInfo.classroomList;
+        this.classroomList = this.$store.state.schoolBaseInfo.classroomList
         if (this.classroomList.length == 0) {
           this.$api.schoolSetting.findClassInfo({
             SchoolCode: this.schoolCode
           }).then(res => {
             if (res.error == null) {
               if (res.result.data.length > 0) {
-                this.classroomList = res.result.data;
+                this.classroomList = res.result.data
               }
             }
-          });
-        }        
+          })
+        }
       },
       confirm() {
-        this.showError = true;
+        this.showError = true
         if (this.isFull) {
-          this.same = false;
+          this.same = false
           if (this.bizType == 2) {
             if (this.editStudentInfo.length == 1) {
-              this.editStudentInfo[0].studentId = this.schoolCode + "#" + this.editStudentInfo[0].studentId;
+              this.editStudentInfo[0].studentId = this.schoolCode + '#' + this.editStudentInfo[0].studentId
             }
             this.$api.stuAccount.updateAllStudent(this.editStudentInfo).then(
               (res) => {
                 if (res.error == null) {
-                  this.show = false;
-                  this.$emit("saveStudentInfo", {
-                    action: 2,//批量修改数据
+                  this.show = false
+                  this.$emit('saveStudentInfo', {
+                    action: 2, // 批量修改数据
                     studentInfo: this.editStudentInfo
-                  });
-                  this.$refs.updateForm.resetFields();
-                  //this.initData();
-                  this.uploadLoading = false;
+                  })
+                  this.$refs.updateForm.resetFields()
+                  // this.initData();
+                  this.uploadLoading = false
                 } else {
-                  alert("API error!");
+                  alert('API error!')
                 }
               },
               (err) => {
-                alert("API error!");
+                alert('API error!')
               }
-            );
+            )
           } else {
-            this.studentInfo.schoolCode = this.schoolCode;
-            this.studentInfo.studentId = this.schoolCode+"#"+this.studentInfo.studentId;
+            this.studentInfo.schoolCode = this.schoolCode
+            this.studentInfo.studentId = this.schoolCode + '#' + this.studentInfo.studentId
             this.$api.stuAccount.saveStudent(this.studentInfo).then(
               (res) => {
                 if (res.error == null) {
-                  this.show = false;
-                  this.$emit("saveStudentInfo", {
-                    action: 1,//新增学生
+                  this.show = false
+                  this.$emit('saveStudentInfo', {
+                    action: 1, // 新增学生
                     studentInfo: this.studentInfo
-                  });
-                  this.$refs.studentInfoForm.resetFields();
+                  })
+                  this.$refs.studentInfoForm.resetFields()
                 }
               },
               (err) => {
-                alert("API error!");
+                alert('API error!')
               }
-            );
+            )
           }
-          
         } else {
-          this.$Message.error('请完善信息!');
+          this.$Message.error('请完善信息!')
         }
       },
       createClassroom() {
         this.$router.push({
-          path:"/school/classroom"
-        });
+          path: '/school/classroom'
+        })
       }
     },
-    created(){
-      this.getClassroom();
-      console.log(this.$store.state.schoolBaseInfo.schoolInfo);
+    created() {
+      this.getClassroom()
+      console.log(this.$store.state.schoolBaseInfo.schoolInfo)
     },
     mounted() {
       if (this.bizType == 2 && this.isShow == true) {
         if (this.editStudentInfo.length == 1) {
-          let arr = this.editStudentInfo[0].studentId.split("#");
+          let arr = this.editStudentInfo[0].studentId.split('#')
           if (arr.length > 1) {
-            this.editStudentInfo[0].studentId = arr[1];
+            this.editStudentInfo[0].studentId = arr[1]
           } else {
-            alert("学生账号格式错误!");
+            alert('学生账号格式错误!')
           }
         }
       }
@@ -369,32 +367,32 @@
       studentInfo: {
         handler(newValue, oldValue) {
           if (this.bizType == 1) {
-            this.showError = false;
+            this.showError = false
             this.$refs.studentInfoForm.validate((valid) => {
               if (valid) {
-                this.isFull = true;
+                this.isFull = true
               } else {
-                this.isFull = false;
+                this.isFull = false
               }
-            });
+            })
           }
         },
         deep: true
       },
       editStudentInfo: {
         handler(newValue, oldValue) {
-          this.showError = false;
+          this.showError = false
           setTimeout(() => {
             if (this.bizType == 2) {
               this.$refs.updateForm.validate((valid) => {
                 if (valid) {
-                  this.isFull = true;
+                  this.isFull = true
                 } else {
-                  this.isFull = false;
+                  this.isFull = false
                 }
-              });
+              })
             }
-          },1000);
+          }, 1000)
         },
         deep: true
       }

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

@@ -223,7 +223,7 @@
     },
     data() {
         return {
-          activePanel:'1',
+          activePanel: '1',
         flag: true,
         list: []
       }

+ 0 - 3
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/KnowledgeAnalysis/KnowledgeAnalysis.vue

@@ -155,14 +155,11 @@
         switch (arguments.length) {
           case 1:
             return parseInt(Math.random() * minNum + 1, 10)
-            break
           case 2:
             return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10)
             // 或者 Math.floor(Math.random()*( maxNum - minNum + 1 ) + minNum );
-            break
           default:
             return 0
-            break
         }
       },
       changePieOrBar() {

+ 0 - 41
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/index.vue

@@ -9,47 +9,6 @@
     </div>
 
     <div class="total-body">
-      <!-- 左侧菜单 -->
-      <!--<div class="slide-menu">
-        <div @click="handleMenuClick('0')" :class="['slide-menu-item','fl-col-center',menuIndex == '0' ? 'slide-menu-active' : '']">
-          <Icon type="md-school" />
-          <span>校园管理</span>
-        </div>
-        <div @click="handleMenuClick('1')" :class="['slide-menu-item','fl-col-center',menuIndex == '1' ? 'slide-menu-active' : '']">
-          <Icon type="ios-book" />
-          <span>课纲与内容</span>
-        </div>
-        <div @click="handleMenuClick('2')" :class="['slide-menu-item','fl-col-center',menuIndex == '2' ? 'slide-menu-active' : '']">
-          <Icon type="md-ribbon" />
-          <span>学习活动</span>
-        </div>
-        <div @click="handleMenuClick('3')" :class="['slide-menu-item','fl-col-center',menuIndex == '3' ? 'slide-menu-active' : '']">
-          <Icon type="md-people" />
-          <span>班级服务</span>
-        </div>
-        <Divider />
-        <transition name="fade">
-          <div v-show="isSubMenuShow" class="slide-sub-menu fl-col-center">
-            <Tooltip content="区班校活动和记录簿" placement="right">
-              <Icon type="md-browsers" title="" />
-            </Tooltip>
-            <Tooltip content="亲师生联络簿" placement="right">
-              <Icon type="md-happy" title="" />
-            </Tooltip>
-            <Tooltip content="操行成绩管理" placement="right">
-              <Icon type="md-paper" title="" />
-            </Tooltip>
-            <Tooltip content="成绩总览与登录" placement="right">
-              <Icon type="md-contacts" title="" />
-            </Tooltip>
-            <Tooltip content="学情仪表盘" placement="right">
-              <Icon type="md-podium" title="" color="#fff" />
-            </Tooltip>
-          </div>
-        </transition>
-
-      </div>-->
-
       <!-- 评测列表展示组件 -->
       <BaseExamList @chooseExam="chooseExam" @showEvaluationList="showEvaluationList" ref="examListRef"></BaseExamList>
 

+ 11 - 0
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/Index.less

@@ -146,6 +146,17 @@
                     top: 44px;
                     display: none;
                 }
+
+                .count-nums{
+                    color:#0f9272;
+                    font-weight:bold;
+                }
+
+                .count-nums .ivu-icon{
+                    font-size:18px;
+                    color:#0f9272;
+                    margin:10px 0 0 10px;
+                }
             }
         }
 

+ 75 - 81
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/index.vue

@@ -108,6 +108,11 @@
                                 <p class="gl-item-name">{{item.volumeName}}</p>
                                 <p class="gl-item-info">{{item.gradeName}}<span></span>{{item.semesterName}}</p>
                                 <p class="gl-item-info">共编使用者:{{item.editors ? item.editors.length : '0'}}</p>
+                                <div class="count-nums">
+                                    <Icon type="md-folder" title="内容资源数" style="margin-left:0"/> 8
+                                    <Icon type="md-cube" title="关联知识点数" /> 10
+                                    <Icon type="md-git-branch" title="节点数" /> 15
+                                </div>
                                 <span class="btn-edit" title="编辑" @click.stop="onEditVolume(item)"><Icon type="md-create" size="20" color="#d2d2d2" /></span>
                                 <span class="btn-users" title="共编使用者管理" @click.stop="onEditEditors(item)"><Icon type="md-people" size="22" color="#d2d2d2" /></span>
                                 <span class="btn-delete" title="删除" @click.stop="onDeleteVolume(item)"><Icon type="md-trash" size="22" color="#d2d2d2" /></span>
@@ -154,16 +159,10 @@
         </Modal>
 
         <!-- 共编使用者弹窗 -->
-        <Modal v-model="isEditEditors" width="560" footer-hide class="add-volume-modal">
+        <Modal v-model="isEditEditors" width="760" footer-hide class="add-volume-modal">
             <div class="modal-header" slot="header">共编使用者管理</div>
             <div class="modal-content">
-                <AddEditors :originData="originSchoolData"
-                            :periodIndex="currentPeriodIndex"
-                            :subjectIndex="currentSubjectIndex"
-                            :addType="addType"
-                            :editVolume="editVolume"
-                            @addFinish="onFinishAddVolume">
-                </AddEditors>
+                <AddEditors :editVolume="editVolume"  @addFinish="onFinishAddVolume"></AddEditors>
             </div>
         </Modal>
 
@@ -179,18 +178,18 @@
     export default {
         data() {
             return {
-                schoolInfo: { //学校基本信息
-                    schoolCode: "HBCN",
-                    areaCode: "86"
+                schoolInfo: { // 学校基本信息
+                    schoolCode: 'HBCN',
+                    areaCode: '86'
                 },
-                currentParams: { //默认API传递参数
-                    schoolCode: "",
-                    periodCode: "",
-                    subjectCode: "",
+                currentParams: { // 默认API传递参数
+                    schoolCode: '',
+                    periodCode: '',
+                    subjectCode: '',
                     type: 0,
                     status: 1
                 },
-                addType:'school',
+                addType: 'school',
                 isLoadSubject: false,
                 isLoadVolumes: false,
                 isLoadSyllabus: false,
@@ -222,7 +221,7 @@
                 editVolume: null,
                 hasModify: false,
                 preSelectVal: null,
-                isEditEditors:false
+                isEditEditors: false
             }
         },
         components: {
@@ -232,23 +231,23 @@
             this.initSchoolData()
         },
         methods: {
-            //获取当前学校学段学科等基本信息
+            // 获取当前学校学段学科等基本信息
             initSchoolData() {
                 this.$api.syllabus.GetSchoolInfo(this.schoolInfo).then(res => {
                     if (!res.error && res.result.data.length) {
-                        this.originSchoolData = res.result.data[0] //默认选择第一个
-                        this.originData = res.result.data[0] //默认选择第一个
+                        this.originSchoolData = res.result.data[0] // 默认选择第一个
+                        this.originData = res.result.data[0] // 默认选择第一个
                         this.periodList = this.originData.period
                         this.currentParams.schoolCode = this.originData.schoolCode
                         this.currentParams.periodCode = this.originData.period[0].periodCode
-                        this.currentPeriodIndex = 0 //默认选择第一个学段
+                        this.currentPeriodIndex = 0 // 默认选择第一个学段
                         this.onPeriodChange(0)
                     } else {
-                        this.$Message.warning("暂无学段数据")
+                        this.$Message.warning('暂无学段数据')
                     }
                 })
             },
-            //根据学科获取所有册别信息
+            // 根据学科获取所有册别信息
             getVolumesData() {
                 let that = this
                 this.$api.syllabus.GetVolumes(this.currentParams).then(res => {
@@ -261,33 +260,32 @@
                         this.volumeList = list
                         this.originVolumeList = list
                         this.handleVolumeTap(0, list.length > 0 ? list[0] : null)
-                        this.searchVolume = ""
-                        setTimeout(function () {
+                        this.searchVolume = ''
+                        setTimeout(function() {
                             that.isLoadVolumes = false
                         }, 400)
-
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
-            //根据册别CODE来获取对应树形课纲数据
+            // 根据册别CODE来获取对应树形课纲数据
             getTreeByVolume(volumeCode) {
                 let that = this
                 this.$api.syllabus.GetTreeByVolume({ volumeCode: volumeCode }).then(res => {
                     if (!res.error && res.result.data) {
                         this.treeData = res.result.data
-                        setTimeout(function () {
+                        setTimeout(function() {
                             that.isLoadSyllabus = false
                         }, 400)
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
-            //校本课纲与个人课纲切换
+            // 校本课纲与个人课纲切换
             handleTabClick(index) {
                 this.tabIndex = index
                 this.currentParams.type = index
@@ -300,7 +298,7 @@
                 this.onPeriodChange(this.currentPeriodIndex)
             },
 
-            //学段切换处理
+            // 学段切换处理
             onPeriodChange(index) {
                 this.preSelectVal = this.$refs.periodSelect.value
                 if (this.hasModify) {
@@ -310,30 +308,28 @@
                     this.isLoadSubject = true
                     this.activePeriodIndex = index
                     this.currentParams.periodCode = this.originData.period[index].periodCode
-                    this.subjectList = this.periodList[index].subjects //切换学段后更新 学科 列表
+                    this.subjectList = this.periodList[index].subjects // 切换学段后更新 学科 列表
                     this.originSubjectList = this.periodList[index].subjects // 筛选学科源数据
-                    this.gradeList = this.periodList[index].grades //切换学段后更新 年级 列表
-                    this.semesterList = this.periodList[index].semesters //切换学段后更新 学期 列表
+                    this.gradeList = this.periodList[index].grades // 切换学段后更新 年级 列表
+                    this.semesterList = this.periodList[index].semesters // 切换学段后更新 学期 列表
                     this.handleSubjectTap(0)
-                    this.searchSubject = ""
-                    setTimeout(function () {
+                    this.searchSubject = ''
+                    setTimeout(function() {
                         that.isLoadSubject = false
                     }, 400)
                 }
-
-
             },
 
-            //学科点击事件
+            // 学科点击事件
             handleSubjectTap(index) {
                     this.isLoadVolumes = true
-                    this.currentSubjectIndex = index;
+                    this.currentSubjectIndex = index
                     this.currentParams.subjectCode = this.subjectList[index].subjectCode
                     this.activeSubjectIndex = index
                     this.getVolumesData()
             },
 
-            //册别点击事件
+            // 册别点击事件
             handleVolumeTap(index, volume) {
                 this.activeVolumeIndex = index
                 this.currentVolume = volume
@@ -343,19 +339,18 @@
                 }
             },
 
-            //添加册别完成
+            // 添加册别完成
             onFinishAddVolume(val) {
                 if (val) {
-                    let isExist = this.volumeList.filter(item => item.id === val).length //判断列表是否已存在该学期下的册别,有则更新,无则添加
+                    let isExist = this.volumeList.filter(item => item.id === val).length // 判断列表是否已存在该学期下的册别,有则更新,无则添加
                     if (isExist) {
-                        this.$Message.success("册别已存在,已为您更新数据")
+                        this.$Message.success('册别已存在,已为您更新数据')
                     } else {
-                        this.$Message.success("添加新册别成功")
+                        this.$Message.success('添加新册别成功')
                     }
-                    this.handleSubjectTap(this.currentSubjectIndex); //获取最新册别数据
-
+                    this.handleSubjectTap(this.currentSubjectIndex) // 获取最新册别数据
                 }
-                this.isAddVolume = false  //关闭窗口
+                this.isAddVolume = false // 关闭窗口
             },
 
             // 删除册别事件
@@ -383,11 +378,11 @@
             // 编辑册别事件
             onEditVolume(data) {
                 this.isAddVolume = true // 打开新增窗口
-                this.isEditVolume = true //设置成编辑状态
+                this.isEditVolume = true // 设置成编辑状态
                 this.editVolume = data
             },
 
-            //新增册别事件
+            // 新增册别事件
             onAddVolume() {
                 this.isAddVolume = true
                 this.isEditVolume = false
@@ -395,51 +390,50 @@
             },
 
             // 管理共编使用者
-            onEditEditors(item) {
+            onEditEditors(data) {
+                this.editVolume = data
                 this.isEditEditors = true
-
             },
 
-            //筛选年级事件
+            // 筛选年级事件
             onFilterGrade(val) {
                 if (val === 'all' && this.filterSemester === 'all') {
                     this.volumeList = this.originVolumeList
                 } else if (val !== 'all' && this.filterSemester === 'all') {
-                    this.volumeList = this.originVolumeList.filter(item => item.gradeCode === val);
+                    this.volumeList = this.originVolumeList.filter(item => item.gradeCode === val)
                 } else if (val === 'all' && this.filterSemester !== 'all') {
-                    this.volumeList = this.originVolumeList.filter(item => item.semesterCode === this.filterSemester);
+                    this.volumeList = this.originVolumeList.filter(item => item.semesterCode === this.filterSemester)
                 } else {
-                    this.volumeList = this.originVolumeList.filter(item => item.semesterCode === this.filterSemester && item.gradeCode === val);
+                    this.volumeList = this.originVolumeList.filter(item => item.semesterCode === this.filterSemester && item.gradeCode === val)
                 }
 
                 this.handleVolumeTap(0, this.volumeList.length > 0 ? this.volumeList[0] : null) // 筛选完成 默认加载筛选结果第一个册别课纲
-
             },
 
-            //筛选学期事件
+            // 筛选学期事件
             onFilterSemester(val) {
                 if (val === 'all' && this.filterGrade === 'all') {
                     this.volumeList = this.originVolumeList
                 } else if (val !== 'all' && this.filterGrade === 'all') {
-                    this.volumeList = this.originVolumeList.filter(item => item.semesterCode === val);
+                    this.volumeList = this.originVolumeList.filter(item => item.semesterCode === val)
                 } else if (val === 'all' && this.filterGrade !== 'all') {
-                    this.volumeList = this.originVolumeList.filter(item => item.gradeCode === this.filterGrade);
+                    this.volumeList = this.originVolumeList.filter(item => item.gradeCode === this.filterGrade)
                 } else {
-                    this.volumeList = this.originVolumeList.filter(item => item.gradeCode === this.filterGrade && item.semesterCode === val);
+                    this.volumeList = this.originVolumeList.filter(item => item.gradeCode === this.filterGrade && item.semesterCode === val)
                 }
 
                 this.handleVolumeTap(0, this.volumeList.length > 0 ? this.volumeList[0] : null) // 筛选完成 默认加载筛选结果第一个册别课纲
             },
 
-            //搜索册别输入框onchange事件
+            // 搜索册别输入框onchange事件
             onSearchVolumeChange() {
-                this.volumeList = this.originVolumeList.filter(item => item.volumeName.indexOf(this.searchVolume) > -1);
-                if (this.volumeList.length) this.handleVolumeTap(0,this.volumeList[0]) // 获取筛选后的第一个册别课纲数据
+                this.volumeList = this.originVolumeList.filter(item => item.volumeName.indexOf(this.searchVolume) > -1)
+                if (this.volumeList.length) this.handleVolumeTap(0, this.volumeList[0]) // 获取筛选后的第一个册别课纲数据
             },
 
             // 清空科目搜索框
             onSearchSubjectClose() {
-                this.searchSubject = ""
+                this.searchSubject = ''
                 this.isSearchSubject = false
                 this.subjectList = this.originSubjectList
                 this.handleSubjectTap(0)
@@ -447,36 +441,36 @@
 
             // 清空册别搜索框
             onSearchVolumeClose() {
-                this.searchVolume = ""
+                this.searchVolume = ''
                 this.isSearchVolume = false
                 this.volumeList = this.originVolumeList
-                this.handleVolumeTap(0,this.volumeList[0])
+                this.handleVolumeTap(0, this.volumeList[0])
             },
 
-            //搜索学科输入框onchange事件
+            // 搜索学科输入框onchange事件
             onSearchSubjectChange() {
-                this.subjectList = this.originSubjectList.filter(item => item.subjectName.indexOf(this.searchSubject) > -1);
+                this.subjectList = this.originSubjectList.filter(item => item.subjectName.indexOf(this.searchSubject) > -1)
                 if (this.subjectList.length) {
                     this.handleSubjectTap(0)
                 } else {
                     this.volumeList = []
                     this.treeData = []
-                } 
+                }
             },
 
-            //显示后添加全部选项
+            // 显示后添加全部选项
             onPopperShow() {
                 if (!this.gradeList.filter(item => item.gradeCode === 'all').length) {
-                    this.gradeList.unshift({ 'gradeName': '全部', 'gradeCode': 'all' });
+                    this.gradeList.unshift({ 'gradeName': '全部', 'gradeCode': 'all' })
                     this.filterGrade = 'all'
                 }
                 if (!this.semesterList.filter(item => item.semesterCode === 'all').length) {
-                    this.semesterList.unshift({ 'semesterName': '全部', 'semesterCode': 'all' });
+                    this.semesterList.unshift({ 'semesterName': '全部', 'semesterCode': 'all' })
                     this.filterSemester = 'all'
                 }
             },
 
-            //存储变更保存最新课纲数据
+            // 存储变更保存最新课纲数据
             onSaveSyllabus() {
                 this.isLoadSyllabus = true
                 let latestTree = this.$refs.treeRef.treeDatas[0].children
@@ -485,21 +479,21 @@
                         this.treeData = res.result.data
                         this.isLoadSyllabus = false
                         this.hasModify = false
-                        this.$Message.success("保存成功")
+                        this.$Message.success('保存成功')
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
-            //更新当前课纲数据
+            // 更新当前课纲数据
             onTreeUpdate() {
                 this.handleVolumeTap(this.activeVolumeIndex, this.currentVolume)
-                this.$Message.success("更新完成")
+                this.$Message.success('更新完成')
             },
 
             // 判断用户是否放弃修改
-            handleConfirmSave(param,type) {
+            handleConfirmSave(param, type) {
                 this.$Modal.confirm({
                     title: '修改提示',
                     content: '<p>您有未保存的课纲,将会丢失所有更改,确认放弃修改?</p>',
@@ -532,7 +526,7 @@
                     }
                 })
             }
-        },
+        }
     }
 </script>
 

+ 73 - 98
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/AddEditors.vue

@@ -1,26 +1,38 @@
 
 <template>
-    <div class="form-container">
-        
-    </div>
+    <div class="editor-container">
+        <p>当前册别 : <span class="volume-name">{{ editVolume.volumeName }}</span></p>
+        <div class="fl-row-center" style="width:100%">
+            <div style="width:45%">
+                <p class="title">当前共编使用者</p>
+                <div class="show-wrap">
+                    <p v-for="(item,index) in currentList">
+                        {{item}}
+                    </p>
+                </div>
+            </div>
+            <div class="tools">
+                <Button class="btn-move">移动  <Icon type="ios-arrow-forward" /></Button>
+            </div>
+            <div style="width:45%">
+                <p class="title">选择共编使用者</p>
+                <div class="show-wrap select-wrap">
+
+                </div>
+            </div>
+            </div>
+            <Button @click="handleSubmit" :loading="isLoading" class="btn-confirm">确认</Button>
+        </div>
 </template>
 
 <script>
     export default {
-        props: ['originData', 'periodIndex','subjectIndex','editVolume','addType'],
+        props: ['editVolume'],
         data() {
             return {
-                originDatas: {},
-                currentPeriod: {},
-                editItem: {},
-                addVolumeType: 'school',
-                isLoading:false,
-                formTop: {
-                    subject: '',
-                    grade: '',
-                    semester: '',
-                    volume: ''
-                }
+                editVolume: {},
+                isLoading: false,
+                currentList: ['张三', '李四', '王五', '沈六', '李七']
             }
         },
 
@@ -41,41 +53,30 @@
                     volumeName: this.getNewVolumeName(),
                     status: 1
                 }
-                if (this.editItem) {
-                    params.id = this.editItem.id
-                    params.volumeCode = this.editItem.volumeCode
+                if (this.editVolume) {
+                    params.id = this.editVolume.id
+                    params.volumeCode = this.editVolume.volumeCode
                 }
                 if (this.addVolumeType === 'private') {
                     params.TEAMModelId = 'habook#0001'
                 }
                 this.$api.syllabus.SaveOrUpdateVolume(params).then(res => {
                     if (!res.error && res.result.data) {
-                        this.$emit('addFinish',res.result.data.id)
+                        this.$emit('addFinish', res.result.data.id)
                     } else {
-                        this.$Message.warning("操作失败,错误代码:" + res.error.code + ",错误信息:"  + res.error.message)
+                        this.$Message.warning('操作失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
                     }
                     this.isLoading = false
-                    this.closeModal();
-                    this.editItem = {};
+                    this.closeModal()
+                    this.editVolume = {}
                 }).catch(err => {
-                    this.$Message.warning("操作失败")
+                    console.log(err)
+                    this.$Message.warning('操作失败')
                     this.isLoading = false
                 })
             },
 
-            // 获取新册别名称
-            getNewVolumeName() {
-                if (this.formTop.volume) {
-                    return this.formTop.volume
-                } else {
-                    let subject = this.currentPeriod.subjects[this.subjectIndex].subjectName
-                    let grade = this.currentPeriod.grades.filter(item => item.gradeCode === this.formTop.grade)[0].gradeName
-                    let semester = this.currentPeriod.semesters.filter(item => item.semesterCode === this.formTop.semester)[0].semesterName
-                    return subject + grade + semester
-                }
-            },
-
-            //添加完成 关闭窗口
+            // 添加完成 关闭窗口
             closeModal() {
                 this.$emit('addFinish', false)
                 this.formTop.volume = ''
@@ -84,88 +85,62 @@
         mounted() {
         },
         watch: {
-            addType: {
-                handler(newValue, oldValue) {
-                    if (newValue) {
-                        this.addVolumeType = newValue
-                    }
-                },
-            },
-            originData: {
-                handler(newValue, oldValue) {
-                    this.originDatas = newValue
-                },
-            },
-            periodIndex: {
-                handler(newValue, oldValue) {
-                    this.currentPeriod = this.originDatas.period[newValue]
-                    this.formTop.subject = this.currentPeriod.subjects[0].subjectCode
-                    this.formTop.grade = this.currentPeriod.grades[0].gradeCode
-                    this.formTop.semester = this.currentPeriod.semesters[0].semesterCode
-                    this.formTop.volume = ""
-                },
-            },
-            subjectIndex: {
-                handler(newValue, oldValue) {
-                    this.formTop.subject = this.currentPeriod.subjects[newValue].subjectCode
-                },
-            },
+
             editVolume: {
                 handler(newValue, oldValue) {
-                    if (newValue) {  // 有编辑册别传过来则为编辑状态
-                        this.editItem = newValue
-                        this.formTop.subject = newValue.subjectCode
-                        this.formTop.grade = newValue.gradeCode
-                        this.formTop.semester = newValue.semesterCode
-                        this.formTop.volume = newValue.volumeName
-                    } else { //否则为新增状态
-                        this.formTop.subject = this.currentPeriod.subjects[0].subjectCode
-                        this.formTop.grade = this.currentPeriod.grades[0].gradeCode
-                        this.formTop.semester = this.currentPeriod.semesters[0].semesterCode
-                        this.formTop.volume = ""
-                        this.editItem = newValue
+                    if (newValue) {
+                        this.editVolume = newValue
+                        console.log(newValue)
                     }
-                    
-                },
+                }
             }
-        },
+        }
 
     }
 </script>
 
 <style>
-    .form-container .ivu-form .ivu-form-item-label {
-        color: #fff;
-        margin:10px 0;
+    .editor-container .volume-name{
         font-size:16px;
+        margin-left:20px;
     }
 
-    .form-container .ivu-input {
-        background: #575757;
-        border-color: transparent;
-        height: 35px;
-        color:#fff;
-    }
-    .form-container .ivu-input::-webkit-input-placeholder {
-        color:#808080;
-    }
-
-    .form-container .ivu-select-single .ivu-select-selection {
-        background: #575757;
-        color: #fbfbfb;
-        border-color: transparent;
-        height: 35px;
+    .editor-container .title {
+        margin:20px 0;
     }
 
-    .form-container .ivu-select-single .ivu-select-arrow {
-        color: #fbfbfb;
+    .editor-container .show-wrap {
+        width:100%;
+        height:420px;
+        background:#565656;
+        border-radius:6px;
     }
 
-    .form-container .ivu-btn {
+    .editor-container .btn-confirm {
         width: 100%;
         height: 40px;
+        margin-top:20px;
         background: rgb(11, 151, 117);
         border: none;
         color:#fff;
     }
+
+    .editor-container .btn-move {
+        width: 70px;
+        height: 30px;
+        background: #808080;
+        border: none;
+        color:#fff;
+    }
+
+    .editor-container .tools {
+        margin: 0 20px;
+    }
+
+    .fl-row-center {
+        display:flex;
+        flex-direction:row;
+        justify-content:space-between;
+        align-items:center;
+    }
 </style>

+ 17 - 24
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/BaseKnowledge.vue

@@ -81,7 +81,7 @@
         },
 
         created() {
-            //拿到当前册别信息 作为获取知识点数据参数
+            // 拿到当前册别信息 作为获取知识点数据参数
             this.currentVolume = this.volume
             this.currentParams = {
                 subjectCode: this.currentVolume.subjectCode,
@@ -91,9 +91,9 @@
             this.getSchoolBlocks()
         },
         methods: {
-            //切换知识点数据来源
+            // 切换知识点数据来源
             onChangeOrigin(index) {
-                this.activeIndex = index;
+                this.activeIndex = index
                 switch (index) {
                     case 0:
                         this.getSchoolBlocks()
@@ -106,38 +106,36 @@
                 }
 
                 // 切换数据源时 检测当前已选项 是否要设置选中状态
-                this.$refs.elTree.setCheckedKeys(this.checkedPoints.map(item => item.id),true)
-
+                this.$refs.elTree.setCheckedKeys(this.checkedPoints.map(item => item.id), true)
             },
 
-            //获取校本知识块
+            // 获取校本知识块
             getSchoolBlocks() {
                 this.$api.knowledge.GetSchoolBlocks({ PointParams: this.currentParams }).then(res => {
                     if (!res.error && res.result.data) {
                         let list = res.result.data
-                        list.forEach(item => { item.disabled = true }) //知识块 层级 不能被关联
+                        list.forEach(item => { item.disabled = true }) // 知识块 层级 不能被关联
                         this.treeData = list
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
-            //获取校本知识点仓库
+            // 获取校本知识点仓库
             getSchoolPoints() {
                 this.$api.knowledge.GetSchoolPoints(this.currentParams).then(res => {
                     if (!res.error && res.result.data) {
                         let list = res.result.data
                         this.treeData = list
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
             // 节点复选框被点击时事件
             handleCheckChange(data) {
-
                 const isExistIndex = this.checkedPoints.map(item => item.id).indexOf(data.id)
                 if (isExistIndex > -1) {
                     this.checkedPoints.splice(isExistIndex, 1)
@@ -145,7 +143,6 @@
                     this.checkedPoints.push(data)
                 }
                 this.hasModify = !(this.isEqual(this.checkedPoints, this.originPoints))
-
             },
 
             /** 保存知识点关联 */
@@ -154,10 +151,10 @@
                 this.currentNodeInfo.knowledges = this.checkedPoints.map(item => item.id)
                 this.$api.syllabus.SaveOrUpdateAsNodes([this.currentNodeInfo]).then(res => {
                     if (!res.error && res.result.data) {
-                        this.$emit("addPointsFinish", res.result.data)
+                        this.$emit('addPointsFinish', res.result.data)
                         this.isLoading = false
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
@@ -182,7 +179,6 @@
                 return (JSON.stringify(arr1) === JSON.stringify(arr2))
             },
 
-
             // 获取知识点完整对象数据 ID换对象
             getPointObject(arr) {
                 let params = {
@@ -196,20 +192,18 @@
                         this.checkedPoints = res.result.data
                         this.originPoints = res.result.data
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             }
 
-
-
         },
         mounted() {
         },
         watch: {
             // 监听册别数据变化
             volume: {
-                handler: function (n, o) {
+                handler: function(n, o) {
                     this.currentVolume = n
                     this.currentParams = {
                         subjectCode: n.subjectCode,
@@ -222,17 +216,17 @@
             },
             // 监听册别数据变化
             currentNode: {
-                handler: function (n, o) {
+                handler: function(n, o) {
                     this.currentNodeInfo = n
                     this.checkedPoints = []
                     this.onChangeOrigin(0)
-                    //this.getPointObject(n.knowledges) // 用ID换知识点对象数据
+                    // this.getPointObject(n.knowledges) // 用ID换知识点对象数据
                     this.hasModify = false
                 },
                 deep: true
-            },
+            }
 
-        },
+        }
 
     }
 </script>
@@ -250,7 +244,6 @@
         background: #777676 !important;
     }
 
-
     .knowledge-container .ivu-checkbox-checked .ivu-checkbox-inner,
     .knowledge-container .ivu-checkbox-indeterminate .ivu-checkbox-inner {
         border-color: #0f9272;

+ 14 - 8
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/BaseResource.less

@@ -170,7 +170,7 @@
     .resource-right {
         width: 82%;
         height: 100%;
-        padding: 0 0 0 20px;
+        padding: 0 0 0 10px;
         overflow: hidden;
 
         .resource-box {
@@ -229,15 +229,16 @@
             flex-wrap: wrap;
 
             .resource-item-list {
-                margin: 10px;
+                margin: 5px 10px;
+                padding-left: 15px;
                 width: 95%;
-                height: 80px;
+                height: 40px;
                 overflow: hidden;
                 display: flex;
                 flex-direction: row;
                 align-items: center;
-                background: #545454;
-                box-shadow: 11px 11px 5px #383838;
+                /*background: #545454;
+                box-shadow: 11px 11px 5px #383838;*/
                 border-radius: 3px;
                 cursor: pointer;
 
@@ -252,17 +253,22 @@
                     }
                 }
 
-                &-name {
+                .resource-item-name {
                     width: 80%;
 
                     .file-name {
                         display: inline-block;
-                        width: 150px;
-                        margin-top: 5px;
                         text-align: center;
                         overflow: hidden;
                         text-overflow: ellipsis;
                         white-space: nowrap;
+                        vertical-align:bottom;
+                    }
+
+                    .ivu-icon{
+                        display:inline-block;
+                        margin-right:10px;
+                        font-size:20px;
                     }
                 }
 

+ 16 - 22
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/BaseResource.vue

@@ -42,8 +42,8 @@
                                 <div :class="isShowBlocks ? 'resource-item' : 'resource-item-list'"
                                      v-for="(item,index) in resourceList" :key="index"
                                      @click="onFileSelect(item)"
-                                     :style="{backgroundColor:checkedList.indexOf(item) > -1 ? '#0f9272' : '#545454'}">
-                                    <div class="resource-item-img">
+                                     :style="{backgroundColor:checkedList.indexOf(item) > -1 ? '#0f9272' : isShowBlocks ? '#545454' : 'transparent'}">
+                                    <div class="resource-item-img" v-show="isShowBlocks">
                                         <img v-if="item.extension === 'ppt'||item.extension === 'pptx'" src="@/assets/icon/ppt50.png" width="40" />
                                         <img v-else-if="item.extension === 'doc'||item.extension === 'docx'" src="@/assets/icon/word50.png" width="40" />
                                         <img v-else-if="item.extension === 'xls'||item.extension === 'xlsx'" src="@/assets/icon/xls50.png" width="40" />
@@ -54,6 +54,7 @@
                                     </div>
                                     <div class="resource-item-name">
                                         <Tooltip>
+                                            <Icon :type="checkedList.indexOf(item) > -1 ? 'ios-checkbox-outline' : 'ios-square-outline'" v-show="!isShowBlocks"/>
                                             <p class="file-name">{{ item.fileName }}</p>
                                             <div slot="content" class="file-info">
                                                 <p><span>文件名:</span>{{item.fileName}}</p>
@@ -132,7 +133,7 @@
                 },
                 hasModify: false,
                 isLoading: false,
-                searchFile: "",
+                searchFile: '',
                 isSearchFile: false,
                 isShowBlocks: false
 
@@ -140,7 +141,7 @@
         },
 
         created() {
-            //拿到当前册别信息 作为获取知识点数据参数
+            // 拿到当前册别信息 作为获取知识点数据参数
             this.currentVolume = this.volume
             this.currentParams = {
                 subjectCode: this.currentVolume.subjectCode,
@@ -154,7 +155,7 @@
 
             /** 切换知识点数据来源 */
             onChangeOrigin(index) {
-                this.activeIndex = index;
+                this.activeIndex = index
                 switch (index) {
                     case 0:
                         this.resourceList = this.originList
@@ -188,18 +189,16 @@
                         this.resourceList = res.result.data
                         this.originList = res.result.data
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             },
 
-
             /** 改变显示视图 */
             onChangeShowType(type) {
                 this.isShowBlocks = type === '0'
             },
 
-
             /**
              * 文件点击事件
              * @param item 文件数据
@@ -229,22 +228,21 @@
 
             /** 搜索资源文件事件 */
             onSearchFileChange() {
-                this.resourceList = this.searchList.filter(item => item.fileName.indexOf(this.searchFile) > -1);
+                this.resourceList = this.searchList.filter(item => item.fileName.indexOf(this.searchFile) > -1)
             },
 
             /** 保存关联资源文件 */
             onSaveResources() {
                 this.isLoading = true
                 this.currentNodeInfo.resources = this.checkedList.map(item => item.id)
-                //this.$api.syllabus.SaveOrUpdateAsNodes([this.currentNodeInfo]).then(res => {
+                // this.$api.syllabus.SaveOrUpdateAsNodes([this.currentNodeInfo]).then(res => {
                 //    if (!res.error && res.result.data) {
                 //        this.$emit("addPointsFinish", res.result.data)
                 //        this.isLoading = false
                 //    } else {
                 //        this.$Message.warning("获取数据失败")
                 //    }
-                //})
-
+                // })
             },
 
             /**
@@ -256,7 +254,6 @@
                 return (JSON.stringify(arr1) === JSON.stringify(arr2))
             },
 
-
             /**
              * 获取知识点完整对象数据 ID换对象
              * @param arr 原始ID数组
@@ -273,20 +270,18 @@
                         this.checkedPoints = res.result.data
                         this.originPoints = res.result.data
                     } else {
-                        this.$Message.warning("获取数据失败")
+                        this.$Message.warning('获取数据失败')
                     }
                 })
             }
 
-
-
         },
         mounted() {
         },
         watch: {
             // 监听册别数据变化
             volume: {
-                handler: function (n, o) {
+                handler: function(n, o) {
                     this.currentVolume = n
                     this.currentParams = {
                         subjectCode: n.subjectCode,
@@ -298,18 +293,18 @@
             },
             // 监听册别数据变化
             currentNode: {
-                handler: function (n, o) {
+                handler: function(n, o) {
                     this.currentNodeInfo = n
                     this.checkedList = []
                     this.onChangeOrigin(0)
                     this.originResourcesList = n.resources
-                    //this.getPointObject(n.resources) // 用ID换知识点对象数据
+                    // this.getPointObject(n.resources) // 用ID换知识点对象数据
                     this.hasModify = false
                 },
                 deep: true
-            },
+            }
 
-        },
+        }
 
     }
 </script>
@@ -324,7 +319,6 @@
         background: transparent !important;
     }
 
-
     .resource-container .resource-right .__bar-is-vertical {
         background: #777676 !important;
     }

+ 19 - 20
TEAMModelOS/ClientApp/src/view/syllabus/newSyllabus/operation/addVolume.vue

@@ -29,14 +29,14 @@
 
 <script>
     export default {
-        props: ['originData', 'periodIndex','subjectIndex','editVolume','addType'],
+        props: ['originData', 'periodIndex', 'subjectIndex', 'editVolume', 'addType'],
         data() {
             return {
                 originDatas: {},
                 currentPeriod: {},
                 editItem: {},
                 addVolumeType: 'school',
-                isLoading:false,
+                isLoading: false,
                 formTop: {
                     subject: '',
                     grade: '',
@@ -72,15 +72,16 @@
                 }
                 this.$api.syllabus.SaveOrUpdateVolume(params).then(res => {
                     if (!res.error && res.result.data) {
-                        this.$emit('addFinish',res.result.data.id)
+                        this.$emit('addFinish', res.result.data.id)
                     } else {
-                        this.$Message.warning("操作失败,错误代码:" + res.error.code + ",错误信息:"  + res.error.message)
+                        this.$Message.warning('操作失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
                     }
                     this.isLoading = false
-                    this.closeModal();
-                    this.editItem = {};
+                    this.closeModal()
+                    this.editItem = {}
                 }).catch(err => {
-                    this.$Message.warning("操作失败")
+                    console.log(err)
+                    this.$Message.warning('操作失败')
                     this.isLoading = false
                 })
             },
@@ -97,7 +98,7 @@
                 }
             },
 
-            //添加完成 关闭窗口
+            // 添加完成 关闭窗口
             closeModal() {
                 this.$emit('addFinish', false)
                 this.formTop.volume = ''
@@ -111,13 +112,12 @@
                     if (newValue) {
                         this.addVolumeType = newValue
                     }
-
-                },
+                }
             },
             originData: {
                 handler(newValue, oldValue) {
                     this.originDatas = newValue
-                },
+                }
             },
             periodIndex: {
                 handler(newValue, oldValue) {
@@ -125,33 +125,32 @@
                     this.formTop.subject = this.currentPeriod.subjects[0].subjectCode
                     this.formTop.grade = this.currentPeriod.grades[0].gradeCode
                     this.formTop.semester = this.currentPeriod.semesters[0].semesterCode
-                    this.formTop.volume = ""
-                },
+                    this.formTop.volume = ''
+                }
             },
             subjectIndex: {
                 handler(newValue, oldValue) {
                     this.formTop.subject = this.currentPeriod.subjects[newValue].subjectCode
-                },
+                }
             },
             editVolume: {
                 handler(newValue, oldValue) {
-                    if (newValue) {  // 有编辑册别传过来则为编辑状态
+                    if (newValue) { // 有编辑册别传过来则为编辑状态
                         this.editItem = newValue
                         this.formTop.subject = newValue.subjectCode
                         this.formTop.grade = newValue.gradeCode
                         this.formTop.semester = newValue.semesterCode
                         this.formTop.volume = newValue.volumeName
-                    } else { //否则为新增状态
+                    } else { // 否则为新增状态
                         this.formTop.subject = this.currentPeriod.subjects[0].subjectCode
                         this.formTop.grade = this.currentPeriod.grades[0].gradeCode
                         this.formTop.semester = this.currentPeriod.semesters[0].semesterCode
-                        this.formTop.volume = ""
+                        this.formTop.volume = ''
                         this.editItem = newValue
                     }
-                    
-                },
+                }
             }
-        },
+        }
 
     }
 </script>

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

@@ -1,3 +1,3 @@
 <template>
 
-</template>
+</template>

+ 138 - 142
TEAMModelOS/ClientApp/src/view/teachcontent/index.vue

@@ -157,15 +157,15 @@
                     size: 19344,
                     createTime: '2019/01/02',
                     relationNum: 0,
-                    blobUrl: "XXXXXXXXXX",
+                    blobUrl: 'XXXXXXXXXX',
                     range: 'private',
                     sha1Code: ''
                 },
                 previewStatus: false,
-                storageSpace:0,
+                storageSpace: 0,
                 uploadStatus: false,
-                uploadFileList:[],
-                uploadUrl:'',
+                uploadFileList: [],
+                uploadUrl: '',
                 keyWord: '',
                 demoLoginInfo: {
                     user: 'admin',
@@ -173,58 +173,58 @@
                     school: '醍摩豆书院',
                     schoolCode: 'HBCN'
                 },
-                orderWay:'',
+                orderWay: '',
                 boxWidth: 0,
                 activeTypeIndex: 0,
                 fileListShow: [],
-                searchResult:[],
+                searchResult: [],
                 searchBefore: [],
                 schoolFileList: [
                     {
-                        id:'sha1Code+contentType+size',
-                        teamModelId:'habook#0001',
+                        id: 'sha1Code+contentType+size',
+                        teamModelId: 'habook#0001',
                         fileName: '校本资源PPT01',
                         extension: 'ppt',
-                        contentType:'image/jpeg',
-                        type:'document',
+                        contentType: 'image/jpeg',
+                        type: 'document',
                         size: 19344,
                         createTime: '2019/01/02',
                         relationNum: 0,
-                        blobUrl: "XXXXXXXXXX",  
+                        blobUrl: 'XXXXXXXXXX',
                         range: 'school',
-                        sha1Code:''
-                    },
+                        sha1Code: ''
+                    }
                 ],
                 fileList: [
                     {
-                        id:'sha1Code+contentType+size',
-                        teamModelId:'habook#0001',
+                        id: 'sha1Code+contentType+size',
+                        teamModelId: 'habook#0001',
                         fileName: '测试文件类型列表PPT01',
                         extension: 'ppt',
-                        contentType:'image/jpeg',
-                        type:'document',
+                        contentType: 'image/jpeg',
+                        type: 'document',
                         size: 19344,
                         createTime: '2019/01/02',
                         relationNum: 0,
-                        blobUrl: "XXXXXXXXXX",  
+                        blobUrl: 'XXXXXXXXXX',
                         range: 'private',
-                        sha1Code:''
+                        sha1Code: ''
                     },
                     {
                         fileName: '测试文件类型列表表格文件01',
                         extension: 'xls',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表防守打法',
                         extension: 'pdf',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表订单',
@@ -232,143 +232,143 @@
                         size: '2.6M',
                         createTime: '2019/01/02',
                         relationNum: 2,
-                        url:"XXXXXXXXXX"
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表的订单',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表发发发',
                         extension: 'pdf',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表发的',
                         extension: 'mp4',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表他一般',
                         extension: 'mp4',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表好友推荐',
                         extension: 'mp4',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表换个话题',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表个人化谈好',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表过-分的话',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表阿市规划局',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表特意',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表第一次见',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表检验检疫局',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表发货站小学部',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表fsagfhut757',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表飞洒打道回府原图',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表分涣发大号',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表个多月',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表grey',
@@ -376,23 +376,23 @@
                         size: '2.6M',
                         createTime: '2019/01/02',
                         relationNum: 2,
-                        url:"XXXXXXXXXX"
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表任天野上',
                         extension: 'xls',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表负责',
                         extension: 'pdf',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表残疾人非',
@@ -400,159 +400,159 @@
                         size: '2.6M',
                         createTime: '2019/01/02',
                         relationNum: 2,
-                        url:"XXXXXXXXXX"
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表公司地址',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表广东省',
                         extension: 'pdf',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表感受到发发发',
                         extension: 'mp4',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表感受到',
                         extension: 'mp4',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表未成年结局v',
                         extension: 'mp4',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表回复大学城',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表可开放性',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表回复道工序',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表回复股东会',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表回复道工序',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表回复股东会',
                         extension: 'jpg',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表kg发放的',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表恢复供电局',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表发送短信',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表发顺丰撒',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表回复手动阀',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表发高回报',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表发现',
                         extension: 'doc',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     },
                     {
                         fileName: '测试文件类型列表业人员未有',
                         extension: 'ppt',
                         size: '2.6M',
                         createTime: '2019/01/02',
-                        relationNum:2,
-                        url:"XXXXXXXXXX"
+                        relationNum: 2,
+                        url: 'XXXXXXXXXX'
                     }
                 ],
                 rangeType: 1,
@@ -564,28 +564,28 @@
                 contentTypeList: [
                     {
                         label: '全部',
-                        type:'all',
-                        icon:'md-apps'
+                        type: 'all',
+                        icon: 'md-apps'
                     },
                     {
                         label: '图片',
-                        type:'picture',
-                        icon:'ios-image-outline'
+                        type: 'picture',
+                        icon: 'ios-image-outline'
                     },
                     {
                         label: '视频',
-                        type:'video',
-                        icon:'logo-youtube'
+                        type: 'video',
+                        icon: 'logo-youtube'
                     },
                     {
                         label: '文档',
-                        type:'document',
-                        icon:'logo-wordpress'
+                        type: 'document',
+                        icon: 'logo-wordpress'
                     },
                     {
                         label: '其他',
-                        type:'other',
-                        icon:'md-filing'
+                        type: 'other',
+                        icon: 'md-filing'
                     }
                 ]
             }
@@ -606,14 +606,13 @@
                     (res) => {
                         if (res.error == null) {
                             let originalIndex = this.fileList.indexOf(this.fileListShow[index])
-                            this.fileList.splice(originalIndex,1)
-                            this.fileListShow.splice(index,1)
-                            this.$Message.success('文件删除成功!');
+                            this.fileList.splice(originalIndex, 1)
+                            this.fileListShow.splice(index, 1)
+                            this.$Message.success('文件删除成功!')
                             this
                         } else {
-                            this.$Message.error('文件删除失败!');
+                            this.$Message.error('文件删除失败!')
                         }
-                        
                     },
                     (err) => {
 
@@ -628,7 +627,7 @@
                     ]).then(
                         (res) => {
                             if (res.error == null) {
-                                this.$Message.success('文件名修改成功!');
+                                this.$Message.success('文件名修改成功!')
                             }
                         },
                         (err) => {
@@ -650,9 +649,9 @@
                 }
             },
             formatDate(timestamp) {
-                let date = new Date(timestamp/10000)
+                let date = new Date(timestamp / 10000)
                 return date.toLocaleString()
-            }, 
+            },
             findFileList() {
                 this.$api.teachContent.findResourceByDict(
                     {
@@ -667,7 +666,7 @@
                             this.storageSpace = this.fileList.reduce(
                                 (total, item) => {
                                     return total + item.size
-                                },0
+                                }, 0
                             )
                         } else {
                             aler('API error!')
@@ -683,7 +682,7 @@
                 this.$api.teachContent.saveOrUpdateResource(this.uploadFileList).then(
                     (res) => {
                         if (res.error == null) {
-                            this.$Message.success('文件上传成功!');
+                            this.$Message.success('文件上传成功!')
                         }
                     },
                     (err) => {
@@ -694,12 +693,12 @@
             toggleUpload() {
                 this.uploadStatus = !this.uploadStatus
             },
-            getFileUrl(response) {  //获取文件地址
+            getFileUrl(response) { // 获取文件地址
                 console.log(response)
                 if (response.error == null) {
                     let resData = response.result.data
                     if (resData.length > 0) {
-                        let type = 'other';
+                        let type = 'other'
                         for (let item in this.contentTypes) {
                             if (this.contentTypes[item].indexOf(resData[0].extension.toUpperCase()) !== -1) {
                                 switch (true) {
@@ -717,11 +716,9 @@
                                         break
                                     default:
                                         break
-                                        
                                 }
                                 break
                             }
-                            
                         }
                         this.uploadFileList.push({
                             teamModelId: this.demoLoginInfo.teamModelId,
@@ -733,11 +730,10 @@
                             createTime: resData[0].uploadTime,
                             relationNum: 0,
                             blobUrl: resData[0].blobUrl,
-                            range: this.rangeType === 1 ? 'private':'shcool',
+                            range: this.rangeType === 1 ? 'private' : 'shcool',
                             sha1Code: resData[0].sha1Code
                         })
                     }
-
                 } else {
                     alert('API error!')
                 }
@@ -749,7 +745,7 @@
                     groups[group] = groups[group] || []
                     groups[group].push(item)
                 })
-                return Object.keys(groups).map((group) =>{
+                return Object.keys(groups).map((group) => {
                     return groups[group]
                 })
             },
@@ -777,7 +773,7 @@
                         )
                         break
                     case 'type':
-                        
+
                         if (this.rangeType == 1) {
                             this.fileList.sort(
                                 (a, b) => {
@@ -827,7 +823,7 @@
                 } else {
                     let searchResult = this.searchBefore.filter(item => {
                         return item.fileName.indexOf(this.keyWord) !== -1
-                    });
+                    })
 
                     this.fileListShow = searchResult
                 }
@@ -836,23 +832,23 @@
                 this.rangeType = index
                 this.activeTypeIndex = 0
                 if (index == 1) {
-                    this.fileListShow = this.fileList;
+                    this.fileListShow = this.fileList
                     this.searchBefore = this.fileList
                 } else if (index == 0) {
-                    //this.fileListShow.length = 0
-                    //this.searchBefore.length = 0;
-                    this.fileListShow = this.schoolFileList;
+                    // this.fileListShow.length = 0
+                    // this.searchBefore.length = 0;
+                    this.fileListShow = this.schoolFileList
                     this.searchBefore = this.schoolFileList
                 }
             },
             selectFileType(index) {
                 this.activeTypeIndex = index
-                let type = this.contentTypeList[index].type;
-                let files = [];
+                let type = this.contentTypeList[index].type
+                let files = []
                 if (this.rangeType == 1) {
-                    files = this.fileList;
+                    files = this.fileList
                 } else {
-                    files = this.schoolFileList;
+                    files = this.schoolFileList
                 }
                 switch (type) {
                     case 'all':
@@ -884,8 +880,8 @@
             }
         },
         mounted() {
-            this.findFileList();
-            this.uploadUrl = '//' + window.location.host + '/api/File/uploadFile';
+            this.findFileList()
+            this.uploadUrl = '//' + window.location.host + '/api/File/uploadFile'
             let box = document.getElementsByClassName('content-file-list')
             this.boxWidth = box[0].clientWidth - box[0].clientWidth % 320
         }
@@ -941,4 +937,4 @@
     .file-action .ivu-select-dropdown {
         left:62px !important;
     }
-</style>
+</style>

+ 1 - 1
TEAMModelOS/ClientApp/vue.config.js

@@ -15,6 +15,6 @@ module.exports = {
             filename: 'silent-renew-oidc.html',
             excludeChunks: ['app']
         }
-    },
+    }
 
 }