psycho 6 anni fa
parent
commit
185ba2e402

BIN
TEAMModelOS/ClientApp/assets/logo.png


+ 788 - 0
TEAMModelOS/ClientApp/common/SyTree.vue

@@ -0,0 +1,788 @@
+<template>
+  <div class="tree-main">
+    <Row>
+      <Select v-model="bookSelect" class="slideSelect">
+        <Option v-for="item in slideGradeList" :value="item.value" :key="item.value">{{ item.label }}</Option>
+      </Select>
+      <Button type="primary" class="btn-addClass" @click="handleAddBook">添加课纲</Button>
+    </Row>
+    <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>
+        <RadioGroup v-model="nodeType" type="button">
+          <Radio label="章节"></Radio>
+          <Radio label="课件"></Radio>
+        </RadioGroup>
+      </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>
+        <RadioGroup v-model="nodeType" type="button">
+          <Radio label="章节"></Radio>
+          <Radio label="课件"></Radio>
+        </RadioGroup>
+      </Row>
+      <Row class="modelRow">
+        <span>章节名称:</span>
+        <Input v-model="editValue" placeholder="输入节点新名称" style="width: 100%" />
+      </Row>
+    </Modal>
+    <Modal v-model="addBookFlag" title="添加课纲" ok-text="确认" cancel-text="取消" @on-ok="handleAddConfirm">
+      <Row class="modelRow">
+        <Tabs value="standard" class="addBookArea" :animated="false">
+          <TabPane label="标准课纲" name="standard">
+            <Row>
+              <span>学段</span>
+              <Select v-model="periodSelect" :label-in-value="true" filterable @on-change="periodChange" placeholder="暂无数据">
+                <Option v-for="item in periodList" :value="item.rowKey" :key="item.rowKey">{{ item.name }}</Option>
+              </Select>
+            </Row>
+            <Row>
+              <span>学科</span>
+              <Select v-model="subjectSelect" :label-in-value="true" filterable @on-change="subjectChange" placeholder="暂无数据">
+                <Option v-for="item in subjectList" :value="item.rowKey" :key="item.rowKey">{{ item.name }}</Option>
+              </Select>
+            </Row>
+            <Row>
+              <span>版本</span>
+              <Select v-model="versionSelect" :label-in-value="true" filterable @on-change="versionChange" placeholder="暂无数据">
+                <Option v-for="item in versionList" :value="item.rowKey" :key="item.rowKey">{{ item.name }}</Option>
+              </Select>
+            </Row>
+            <Row>
+              <span>册别</span>
+              <Select v-model="gradeSelect" :label-in-value="true" filterable @on-change="gradeChange" placeholder="暂无数据">
+                <Option v-for="item in gradeList" :value="item.rowKey" :key="item.rowKey">{{ item.name }}</Option>
+              </Select>
+            </Row>
+          </TabPane>
+          <TabPane label="校本课纲" name="custom">标签二的内容</TabPane>
+        </Tabs>
+      </Row>
+    </Modal>
+  </div>
+</template>
+<script>
+  export default {
+    data() {
+      return {
+        bookSelect: "语文人教课标版四年级上册",
+        periodList: [],
+        subjectList: [],
+        versionList: [],
+        gradeList: [],
+        slideGradeList: [
+          {
+            value: "语文人教课标版四年级上册",
+            label: "语文人教课标版四年级上册"
+          },
+          {
+            value: "语文人教课标版五年级上册",
+            label: "语文人教课标版五年级上册"
+          },
+          {
+            value: "语文人教课标版六年级上册",
+            label: "语文人教课标版六年级上册"
+          },
+          {
+            value: "语文人教课标版七年级上册",
+            label: "语文人教课标版七年级上册"
+          },
+          {
+            value: "语文人教课标版八年级上册",
+            label: "语文人教课标版八年级上册"
+          },
+          {
+            value: "语文人教课标版九年级上册",
+            label: "语文人教课标版九年级上册"
+          }
+        ],
+        treeData: [
+          {
+            title: "语文人教课标版四年级上册",
+            order: 0,
+            expand: true,
+            render: (h, { root, node, data }) => {
+              return h(
+                "span",
+                {
+                  style: {
+                    display: "inline-block",
+                    position: "relative",
+                    width: "94%",
+                    textAlign: "left",
+                    paddingLeft: "10px",
+                    cursor: "pointer",
+                    height: "50px",
+                    lineHeight: "50px"
+                  },
+                  on: {
+                    click: () => {
+                      this.rootClick(data);
+                    }
+                  }
+                },
+                [
+                  h("span", [
+                    h("Icon", {
+                      props: {
+                        type: "md-filing"
+                      },
+                      style: {
+                        marginRight: "5px",
+                        display: "none"
+                      }
+                    }),
+                    h("span", { on: { click: () => { } } }, data.title)
+                  ]),
+
+                  h("Button", {
+                    props: Object.assign({}, this.buttonProps, {
+                      icon: "ios-add",
+                      type: "primary"
+                    }),
+                    style: {
+                      position: "absolute",
+                      right: "30px",
+                      top: "10px",
+                      display: "none",
+                      padding: "0 10px"
+                    },
+                    on: {
+                      click: e => {
+                        e.stopPropagation();
+                        this.appendClick(data);
+                      }
+                    }
+                  })
+
+
+                ]
+              );
+            },
+            children: [
+              {
+                title: "第一章语文语文",
+                order: 0,
+                expand: true,
+                children: [
+                  {
+                    title: "大苏打",
+                    order: 0,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "三大",
+                    order: 1,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "大苏打",
+                    order: 0,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "三大",
+                    order: 1,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "大苏打",
+                    order: 0,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "三大",
+                    order: 1,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "大苏打",
+                    order: 0,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "三大",
+                    order: 1,
+                    expand: true,
+                    children: []
+                  }
+                ]
+              },
+              {
+                title: "第二章",
+                expand: true,
+                order: 1,
+                children: [
+                  {
+                    title: "第一节",
+                    order: 0,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "第二节",
+                    order: 1,
+                    expand: true,
+                    children: []
+                  },
+                  {
+                    title: "第三节",
+                    order: 2,
+                    expand: true,
+                    children: []
+                  }
+                ]
+              },
+              {
+                title: "第三章",
+                expand: true,
+                order: 1,
+                children: []
+              }
+            ]
+          }
+        ],
+        inputValue: "",
+        editValue: "",
+        modalFlag: false,
+        editFlag: false,
+        addBookFlag: false,
+        nodeType: "章节",
+        currentNode: "",
+        currentLiNode: "",
+        buttonProps: {
+          type: "default",
+          size: "small"
+        },
+        periodSelect: "",
+        subjectSelect: "",
+        versionSelect: "",
+        gradeSelect: "",
+        periodName: "",
+        subjectName: "",
+        versionName: "",
+        gradeName: "",
+      };
+    },
+
+    methods: {
+      renderContent(h, { root, node, data }) {
+        let that = this;
+        return h(
+          "span",
+          {
+            style: {
+              display: "inline-block",
+              width: "95%",
+              textAlign: "left",
+              paddingLeft: "2%",
+              cursor: "pointer",
+              position: "relative",
+              boxSizing: "border-box"
+            },
+            domProps: {
+              className: "singleClass"
+            },
+            on: {
+              click: () => {
+                this.titleClick(root, node, data, event);
+              },
+              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: "15px",
+                  display:"none"
+                },
+                on: {
+                  mouseleave: e => {
+                    e.stopPropagation();
+                    //this.hideTools(event);
+                  },
+                },
+                domProps: {
+                  className: "tools"
+                }
+              },
+              [
+                h(
+                  "Icon",
+                  {
+                    props: {
+                      type: "ios-add",
+                      title:"添加"
+                    },
+                    on: {
+                      click: e => {
+                        e.stopPropagation();
+                        this.appendClick(data);
+                      }
+                    }
+                  },
+                ),
+                h(
+                  "Icon",
+                  {
+                    props:{
+                      type: "ios-remove"
+                    },
+                    on: {
+                      click: e => {
+                        e.stopPropagation();
+                        this.remove(root, node, data);
+                      }
+                    }
+                  },
+                ),
+                h(
+                  "Icon",
+                  {
+                    props:{
+                      type: "ios-arrow-round-up"
+                    },
+                    on: {
+                      click: e => {
+                        e.stopPropagation();
+                        this.moveUp(root, node, data);
+                      }
+                    }
+                  },
+                ),
+                h(
+                  "Icon",
+                  {
+                    props:{
+                      type: "ios-arrow-round-down"
+                    },
+                    on: {
+                      click: e => {
+                        e.stopPropagation();
+                        this.moveDown(root, node, data);
+                      }
+                    }
+                  },
+                ),
+                h(
+                  "Icon",
+                  {
+                    props:{
+                      type: "ios-create-outline"
+                    },
+                    on: {
+                      click: e => {
+                        e.stopPropagation();
+                        this.editClick(node, data);
+                      }
+                    }
+                  },
+                )
+              ]
+            )
+          ]
+        );
+      },
+      // 添加节点
+      append(data, value) {
+        const children = data.children || [];
+        children.push({
+          title: value,
+          order: children.length,
+          children: [],
+          expand: true
+        });
+        this.$set(data, "children", children);
+        console.log(data);
+      },
+      // 删除节点
+      remove(root, node, data) {
+        const parentKey = root.find(el => el === node).parent;
+        const parent = root.find(el => el.nodeKey === parentKey).node;
+        const index = parent.children.indexOf(data);
+        parent.children.splice(index, 1);
+      },
+      // 点击编辑
+      editClick(node, data) {
+        this.currentNode = data;
+        this.editFlag = true;
+        this.editValue = "";
+      },
+      //添加节点 弹出输入框
+      appendClick(data) {
+        this.currentNode = data;
+        this.modalFlag = true;
+        this.inputValue = "";
+        console.log(this.common.guid());
+      },
+      // 确认添加节点
+      handleAddNode() {
+        if (this.inputValue != "") {
+          this.append(this.currentNode, this.inputValue);
+        } else {
+          this.modalFlag = false;
+        }
+      },
+      // 修改节点
+      handleUpdateNode() {
+        if (this.editValue != "") {
+          this.currentNode.title = this.editValue;
+        } else {
+          this.editFlag = false;
+        }
+      },
+      // 标题点击收缩展开
+      titleClick(root, node, data, event) {
+        //const parentKey = root.find(el => el === node).parent;
+        //const parent = root.find(el => el.nodeKey === parentKey).node;
+        //const index = parent.children.indexOf(data);
+        //let list = document.getElementsByClassName('singleClass');
+        ////for(let i=0;i<list.length;i++){
+        ////  list[i].style.backgroundColor="transparent";
+        ////}
+        //  this.currentLiNode = node;
+        //  //event.currentTarget.style.backgroundColor = "rgba(225, 224, 224, 0.18)";
+        data.expand = !data.expand;
+      },
+
+      // 根目录点击事件
+      rootClick(data) {
+        data.expand = !data.expand;
+      },
+      // 上移章节操作
+      moveUp(root, node, data) {
+        const parentKey = root.find(el => el === node).parent;
+        const parent = root.find(el => el.nodeKey === parentKey).node;
+        const index = parent.children.indexOf(data);
+        const nodeIndex = root.indexOf(node);
+        let currentTitle = data.title;
+        let currentExpand = data.expand;
+        let currentChildren = data.children || [];
+        let preChildren = (parent.children[index - 1]) ? (parent.children[index - 1]).children : [];
+        if (index != 0) {
+          data.title = parent.children[index - 1].title;
+          parent.children[index - 1].title = currentTitle;
+          parent.children[index - 1].expand = currentExpand;
+          data.children = preChildren;
+          data.expand = parent.children[index - 1].expand;
+          parent.children[index - 1].children = currentChildren;
+        }
+      },
+      // 下移章节操作
+      moveDown(root, node, data) {
+        const parentKey = root.find(el => el === node).parent;
+        const parent = root.find(el => el.nodeKey === parentKey).node;
+        const index = parent.children.indexOf(data);
+        let currentTitle = data.title;
+        let currentChildren = data.children || [];
+        let nextChildren = (parent.children[index + 1]) ? (parent.children[index + 1]).children : [];
+        if (index != parent.children.length - 1) {
+          data.title = parent.children[index + 1].title;
+          data.children = nextChildren;
+          parent.children[index + 1].title = currentTitle;
+          parent.children[index + 1].children = currentChildren;
+        }
+      },
+      // 更多操作
+      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;
+        const index = parent.children.indexOf(data);
+        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(225, 224, 224, 0.18)";
+      },
+      handleLiLeave(node, event) {
+        event.currentTarget.lastElementChild.style.display = "none";
+        if (this.currentLiNode.nodeKey != node.nodeKey) {
+          event.currentTarget.style.backgroundColor = "transparent";
+        }
+      },
+      // 添加教材
+      handleAddBook() {
+        this.$api.FindPeriods({}).then(res => {
+          this.periodList = res.result.data;
+          this.periodSelect = this.periodList[0].rowKey;
+          this.periodName = this.periodList[0].name;
+          let Pcode = {
+            value: this.periodList[0].rowKey,
+            label: this.periodList[0].name
+          }
+          this.periodChange(Pcode);
+        })
+        this.addBookFlag = true;
+      },
+
+      // 学段选择变化
+      periodChange(val) {
+        this.$api.FindSubjects({ Pcode: val.value }).then(res => {
+          if (res.result.data.length > 0) {
+            this.subjectList = res.result.data;
+            this.subjectSelect = this.subjectList[0].rowKey;
+            this.periodName = val.label;
+            let Pcode = {
+              value: this.subjectList[0].rowKey,
+              label: this.subjectList[0].name
+            }
+            this.subjectChange(Pcode);
+          }
+        })
+      },
+      // 学科选择变化
+      subjectChange(val) {
+        this.$api.FindEditions({ Pscode: val.value }).then(res => {
+          if (res.result.data.length > 0) {
+            this.versionList = res.result.data;
+            this.versionSelect = this.versionList[0].rowKey;
+            this.subjectName = val.label;
+            let Pcode = {
+              value: this.versionList[0].rowKey,
+              label: this.versionList[0].name
+            }
+            this.versionChange(Pcode);
+          }
+        })
+      },
+      // 版本选择变化
+      versionChange(val) {
+        this.$api.FindTerms({ Psecode: val.value }).then(res => {
+          this.gradeList = res.result.data;
+          this.gradeSelect = this.gradeList.length > 0 ? this.gradeList[0].rowKey : "无";
+          this.versionName = val.label;
+          let Pcode = {
+            value: this.gradeList.length > 0 ? this.gradeList[0].rowKey : "",
+            label: this.gradeList.length > 0 ? this.gradeList[0].name : ""
+          }
+          if (this.gradeList.length > 0) {
+            this.gradeChange(Pcode);
+          }
+        })
+      },
+      //册别选择变化
+      gradeChange(val) {
+        this.gradeName = val.label ? val.label : "";
+      },
+      // 确认添加教材返回教材名称
+      handleAddConfirm() {
+        let periodRowKeys = [];
+        let perioArr = this.periodList;
+        for (let item of perioArr) {
+          periodRowKeys.push(item.rowKey);
+        }
+        let bookName = this.periodName + this.subjectName + this.versionName + this.gradeName;
+        this.treeData[0].title = bookName;
+      }
+    },
+  };
+</script>
+<style>
+    .tree-main {
+      margin-left: 5%;
+      width: 90%;
+    }
+
+    .ivu-icon-ios-paper-outline {
+      font-size: 16px;
+    }
+
+    .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);
+    }
+
+    .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;
+  } */
+    .ivu-tree ul {
+      font-size: 14px;
+    }
+
+    .ivu-tree .ivu-tree-arrow {
+      width: 2%;
+    }
+
+    .ivu-input-wrapper {
+      width: 80% !important;
+    }
+
+    .modelRow {
+      margin: 20px;
+      font-size: 14px;
+    }
+
+    .tools {
+      position: absolute;
+      right: 60px;
+      display: inline-flex;
+      z-index: 999;
+    }
+      .tools .ivu-icon {
+        margin-right:15px;
+        font-size:20px;
+        font-weight:bold;
+        color:#fff;
+      }
+    .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;
+    }
+
+    .singleClass {
+      display: inline-flex !important;
+      flex-direction: row;
+      align-items: center;
+      height: 50px;
+    }
+
+    .btn-addClass {
+      width: 16%;
+      padding: 10px 6px !important;
+    }
+
+    .ivu-tabs-nav-scroll {
+      display: flex;
+      justify-content: center;
+    }
+
+    .addBookArea .ivu-select {
+      width: 80% !important;
+      margin-left: 30px;
+    }
+
+    .addBookArea .ivu-select-single .ivu-select-selection {
+      height: 32px;
+    }
+
+    .addBookArea .ivu-row {
+      margin: 30px 20px;
+    }
+
+    .addBookArea .ivu-select-selected-value {
+      height: 32px !important;
+      line-height: 32px !important;
+      font-size: 12px !important;
+    }
+
+    .ivu-tabs {
+      overflow: unset;
+    }
+</style>

+ 15 - 5
TEAMModelOS/ClientApp/router/routes.js

@@ -8,12 +8,12 @@ import SmartDashBoard from '@/view/smart-dashboard/smart-dashboard'
 
 export const routes = [
   { name: 'login', path: '/login', component: Login },
-  { name: 'ServerSideLogin', path: '/serverside/login', component: ServerSideLogin},
-  { name: 'SmartDashBoard', path: '/smartdashboard', component: SmartDashBoard },  
+  { name: 'ServerSideLogin', path: '/serverside/login', component: ServerSideLogin },
+  { name: 'SmartDashBoard', path: '/smartdashboard', component: SmartDashBoard },
   { name: 'index', path: '', component: Index },
   { name: 'saindex', path: '/saindex', component: SAIndex },
   { name: 'teach', path: '/teach', component: SATeach },
- // { name: 'HTTP404', path: '/*', component: HTTP404, display: 'Home', icon: 'home' },
+  // { name: 'HTTP404', path: '/*', component: HTTP404, display: 'Home', icon: 'home' },
   {
     path: '/Syllabus',
     component: resolve => require(['@/view/SyIndex.vue'], resolve), //路由懒加载
@@ -37,11 +37,21 @@ export const routes = [
     ]
   },
   {
-  path: '/authorization',
-  component: resolve => require(['@/view/authorization.vue'], resolve), //路由懒加载
+    path: '/authorization',
+    component: resolve => require(['@/view/authorization.vue'], resolve), //路由懒加载
   },
   {
     path: '/SyIndex',
     component: resolve => require(['@/view/syllabus/Syllabus.vue'], resolve), //路由懒加载
+    children: [
+      {
+        path: '/',
+        component: resolve => require(['@/common/SyTree.vue'], resolve),
+      },
+      {
+        path: '/BaseKnowPoint',
+        component: resolve => require(['@/view/syllabus/BaseKnowPoint.vue'], resolve),
+      }
+    ]
   }
 ]

+ 25 - 14
TEAMModelOS/ClientApp/view/index.vue

@@ -9,15 +9,15 @@
       <p v-show="isLogin" class="suc-text">授权学校: {{schoolInfo.name}}</p>
       <div v-show="isLogin" class="overlay-wrap center animated fadeIn">
         <div class="main-btn centerCol" @click="sa">
-          <img src="http://chq.dygl.pujiaoyun.cn:80/static/img/pic.png" alt="">
+          <Icon type="ios-podium" size="80"/>
           <h4 class="color1">学情分析</h4>
         </div>
         <div class="main-btn centerCol" @click="sy">
-          <img src="http://chq.dygl.pujiaoyun.cn:80/static/img/user.png" alt="">
+          <Icon type="ios-list-box" size="80"/>
           <h4 class="color1">课纲系统</h4>
         </div>
         <div class="main-btn centerCol" @click="syllabus">
-          <img src="http://chq.dygl.pujiaoyun.cn:80/static/img/user.png" alt="">
+          <Icon type="md-bookmarks" size="80"/>
           <h4 class="color1">课纲管理</h4>
         </div>
       </div>
@@ -31,7 +31,7 @@
       return {
         isLogin: false,
         username: "",
-        hasAuthSchool:false,
+        hasAuthSchool:true,
         schoolInfo: {}
       }
     },
@@ -98,6 +98,8 @@
         let teamModelId = this.getParamAsCH("id");
         let ticket = this.getParamAsCH("ticket");
         let token = localStorage.getItem('token') ? localStorage.getItem('token') : "";
+        that.$Spin.show();
+
 
         that.$api.checkLogin({
           name: name,
@@ -107,16 +109,25 @@
           sign: bcrypt.hashSync(ticket + teamModelId)
         }).then(res => {
           let token = res.result.data.jwtToken.access_token;
-          if (token) {
+          if (token && !localStorage.getItem('token')) {
             localStorage.setItem('token', token);
             localStorage.setItem('username', name);
             that.username = name;
             that.isLogin = true;
+            that.$Spin.hide();
             that.$Message.success("登录成功!");
             that.getAuthSchool();
+          } else if (token && localStorage.getItem('token')) {
+            localStorage.setItem('token', token);
+            localStorage.setItem('username', name);
+            that.username = name;
+            that.isLogin = true;
+            that.$Spin.hide();
+            that.getAuthSchool();
           }
           }).catch(res => {
             that.$Message.warning("当前未登录");
+            that.$Spin.hide();
           })
       },
       //判断当前登录用户是否有授权学校
@@ -124,7 +135,7 @@
         this.$api.getAuthSchool({}).then(res => {
           this.schoolInfo = res.result.data.school;
           this.hasAuthSchool = true;
-          localStorage.setItem('schoolInfo', res.result.data.school);
+          localStorage.setItem('schoolInfo', JSON.stringify(res.result.data.school));
         })
       }
     },
@@ -152,21 +163,21 @@
   }
 
   .overlay-wrap {
-    width: 700px;
-    height: 240px;
+    padding:20px 10px;
     background-color: rgba(218, 218, 218, 0.08);
     margin-top: 50px;
   }
 
   .overlay-wrap .main-btn {
-    height: 90%;
-    width: 45%;
+    height: 210px;
+    width: 210px;
     cursor: pointer;
-    font-size: 18px;
-    color: #fff;
+    font-size: 16px;
+    font-weight:200;
     background-color: rgba(179,179,179,.15);
     border: 0;
-    margin: 5% 2%;
+    margin: 0 10px;
+    color:#ccc;
   }
 
   .overlay-wrap .main-btn:hover {
@@ -190,7 +201,7 @@
 
   .color1 {
     margin-top: 20px;
-    color:#ccc;
+    font-weight:200;
   }
 
   .logo {

+ 137 - 0
TEAMModelOS/ClientApp/view/syllabus/BaseKnowPoint.vue

@@ -0,0 +1,137 @@
+<template>
+  <div class="point-main">
+    <Input suffix="ios-search" clearable placeholder="搜索知识点" style="width:250px !important;" />
+    <Button type="primary">添加知识点</Button>
+    <Button type="success">知识块管理</Button>
+    <Table :columns="columns1" :data="list"></Table>
+  </div>
+</template>
+<script>
+  export default {
+    data() {
+      return {
+        columns1: [
+          {
+            title: '编号',
+            key: 'id'
+          },
+          {
+            title: '名称',
+            key: 'name'
+          },
+          {
+            title: '创建时间',
+            key: 'date'
+          }
+        ],
+        list: [
+          {
+            name: '拼写规则',
+            id: 1,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '字词注音',
+            id: 2,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '汉字的辨析',
+            id: 3,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '看拼音写汉字',
+            id: 4,
+            date: '2016-10-03 15:03:26'
+          },          {
+            name: '拼写规则',
+            id: 1,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '字词注音',
+            id: 2,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '汉字的辨析',
+            id: 3,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '看拼音写汉字',
+            id: 4,
+            date: '2016-10-03 15:03:26'
+          },          {
+            name: '拼写规则',
+            id: 1,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '字词注音',
+            id: 2,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '汉字的辨析',
+            id: 3,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '看拼音写汉字',
+            id: 4,
+            date: '2016-10-03 15:03:26'
+          },          {
+            name: '拼写规则',
+            id: 1,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '字词注音',
+            id: 2,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '汉字的辨析',
+            id: 3,
+            date: '2016-10-03 15:03:26'
+          },
+          {
+            name: '看拼音写汉字',
+            id: 4,
+            date: '2016-10-03 15:03:26'
+          },
+          
+        ]
+      };
+    },
+
+    methods: {
+    }
+  };
+</script>
+<style>
+  .ivu-table-wrapper {
+    border: 0;
+  }
+
+  .ivu-table {
+    margin-top: 30px;
+  }
+
+  .ivu-table::after, .ivu-table::before {
+    display: none;
+  }
+
+  .ivu-table, .ivu-table td, .ivu-table th {
+    background: rgba(255,255,255,0);
+    color: #fff;
+    border: 0;
+    cursor:pointer;
+  }
+
+  .ivu-table-row-hover td {
+    background-color: rgba(225, 224, 224, 0.18) !important;
+  }
+</style>

+ 134 - 60
TEAMModelOS/ClientApp/view/syllabus/Syllabus.vue

@@ -1,69 +1,143 @@
 <template>
-    <div class="index">
-      <div class="header_box">
-        <SyHeader></SyHeader>
-      </div>
-      <div class="ztree_box">
-        <Ztree></Ztree>
-      </div>
-      <div class="select_box">
-      	<router-view></router-view>
-      </div>
+  <div class="index">
+    <!--<div class="header_box">
+      <SyHeader></SyHeader>
+    </div>-->
+    <img src="../../assets/logo.png" class="logo" />
+    <div class="menu-wrap">
+      <span :class='["title",activeIndex==0 ? "title-active" : ""]' @click="titleClick(0)">课纲管理</span>
+      <span :class='["title",activeIndex==1 ? "title-active" : ""]' @click="titleClick(1)">知识点管理</span>
     </div>
+    <!--<div class="user-wrap">
+      <p>当前管理员:{{username}}</p>
+      <p>授权学校:{{schoolName}}</p>
+    </div>-->
+    <div class="ztree_box">
+      <router-view></router-view>
+    </div>
+  </div>
 </template>
 <script>
-  import SyHeader from '@/common/SyHeader.vue'
-  import Ztree from '@/common/Ztree.vue'
-  import BaseContent from '@/view/syllabus/BaseContent.vue'
-  import BasePreview from '@/view/syllabus/BasePreview.vue'
-  import BasePrepare from '@/view/syllabus/BasePrepare.vue'
-    export default {
-      name: "app",
-      components:{
-        SyHeader,
-        Ztree,
-        BaseContent,
-        BasePreview,
-        BasePrepare
-      },
-      data(){
-        return{
-          ys_box:'display:inline',
-          ys:'display:none',
+  export default {
+    name: "app",
+    data() {
+      return {
+        schoolName: "",
+        username: "",
+        activeIndex: sessionStorage.getItem('kIndex') || 0
+      }
+    },
+    created() {
+      this.titleClick(this.activeIndex);
+    },
+    methods: {
+      titleClick(index) {
+        this.activeIndex = index;
+        sessionStorage.setItem('kIndex', index);
+        if (index == 0) {
+          this.$router.push('/SyIndex');
+        } else if (index == 1) {
+          this.$router.push('/BaseKnowPoint');
+        } else {
+          this.$router.push('/SyIndex');
         }
-      },
-      methods:{
-
-      },
+      }
+    },
+    mounted() {
+      this.schoolName = JSON.parse(localStorage.getItem('schoolInfo')).name;
+      this.username = localStorage.getItem('username');
     }
+  }
 </script>
 <style scoped>
-.index{
-  width:100%;
-  height:auto;
-  min-width: 1366px;
-  -o-user-select: none;
-  -moz-user-select: none; /*火狐 firefox*/
-  -webkit-user-select: none; /*webkit浏览器*/
-  -ms-user-select: none; /*IE10+*/
-  -khtml-user-select :none; /*早期的浏览器*/
-  user-select: none; 
-}
-.header_box{
-  width:100%;
-  height:140px;
-}
-.ztree_box{
-  width:19%;
-  min-height:840px;
-  padding-left: 15px;
-  padding-top:1% ;
-  float: left;
-}
-.select_box,.modification_box{
-  width:81%;
-  float: left;
-  border-left: 1px rgb(228, 228, 228) solid;
-  min-height: 840px;
-}
+  .index {
+    position: relative;
+    width: 100%;
+    min-width: 1366px;
+    padding-bottom: 150px;
+    background: linear-gradient(200deg, #7f7280, #000000);
+    -moz-user-select: none; /*火狐 firefox*/
+    -webkit-user-select: none; /*webkit浏览器*/
+    -ms-user-select: none; /*IE10+*/
+    user-select: none;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+  }
+
+  .logo {
+    position: absolute;
+    top: 30px;
+    left: 60px;
+    height: 70px;
+  }
+
+  .menu-wrap {
+    margin: 60px 0 80px 0;
+  }
+
+  .user-wrap {
+    padding: 16px;
+    color: #fff;
+    font-size: 14px;
+    font-weight: 200;
+  }
+
+  .title {
+    font-size: 18px;
+    font-weight: 400;
+    color: rgba(255,255,255,.6);
+    padding: 10px 15px;
+    cursor: pointer;
+    margin-left: 20px;
+  }
+
+  .title-active {
+    font-size: 28px;
+    font-weight: 600;
+    color: #fff;
+  }
+
+  .header_box {
+    width: 100%;
+    height: 140px;
+  }
+
+  .ztree_box {
+    width: 61%;
+    /*max-height: 800px;*/
+    min-height: 800px;
+    padding: 40px;
+    padding-bottom: 150px;
+    color: rgba(225,225,225,.8);
+    background: #b7b7b71c;
+    border-radius: 4px;
+    overflow-y: scroll;
+  }
+
+  .select_box, .modification_box {
+    width: 81%;
+    float: left;
+    border-left: 1px rgb(228, 228, 228) solid;
+    min-height: 840px;
+  }
+
+  .ztree_box::-webkit-scrollbar { /*滚动条整体样式*/
+    width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
+    height: 1px;
+  }
+
+  .ztree_box:hover .ztree_box::-webkit-scrollbar {
+    width: 5px;
+  }
+
+  .ztree_box::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
+    border-radius: 10px;
+    -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
+    background: #ffffff26;
+  }
+
+  .ztree_box::-webkit-scrollbar-track { /*滚动条里面轨道*/
+    background: #f4f4f400;
+  }
 </style>

+ 1 - 1
TEAMModelOS/webpack.config.js

@@ -1,4 +1,4 @@
-const path = require('path')
+ const path = require('path')
 const webpack = require('webpack')
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')