Sfoglia il codice sorgente

Merge branch '01/19NavMenu' into pre_online

lex-xin 4 anni fa
parent
commit
05e73bafe8

+ 17 - 21
src/App.vue

@@ -1,38 +1,34 @@
 <template>
-  <div id="app"
-       v-cloak>
+  <div id="app" v-cloak>
     <router-view v-if="isRouterAlive" />
   </div>
 </template>
 
 <script>
-import Vue from 'vue'
-
+import Vue from "vue";
 
 export default {
-  name: 'App',
-  provide () {
+  name: "App",
+  provide() {
     return {
-      reloads: this.reloads
-    }
+      reloads: this.reloads,
+    };
   },
-  data () {
+  data() {
     return {
       isRouterAlive: true,
-    }
-  },
-  created () {
-
+    };
   },
+  created() {},
   methods: {
-    reloads () {
-      this.isRouterAlive = false
+    reloads() {
+      this.isRouterAlive = false;
       this.$nextTick(function () {
-        this.isRouterAlive = true
-      })
-    }
-  }
-}
+        this.isRouterAlive = true;
+      });
+    },
+  },
+};
 </script>
 <style >
 * {
@@ -89,7 +85,7 @@ input::-webkit-inner-spin-button {
 input[type="number"] {
   -moz-appearance: textfield;
 }
-.el-dialog{
+.el-dialog {
   margin-bottom: 10vh;
 }
 .el-tabs__item.is-active {

BIN
src/assets/images/base/base-bell.png


File diff suppressed because it is too large
+ 0 - 0
src/assets/images/base/base-bell.svg


BIN
src/assets/images/base/login-logo.png


BIN
src/assets/images/base/logo.png


+ 2 - 0
src/layout/components/AppMain.vue

@@ -42,6 +42,8 @@ export default {
   position: relative;
   /* overflow: auto; */
   box-sizing: border-box;
+  margin-left: 10px;
+  margin-top: 20px;
 }
 .fixed-header + .app-main {
   padding-top: 80px;

+ 18 - 6
src/layout/components/Navbar.vue

@@ -7,9 +7,12 @@
       <i class='el-icon-location-information topIcon'></i>
 
       <el-popover placement="top-start"
-                  width="200"
-                  trigger="hover"
-                  :content="organName">
+                  width="300"
+                  trigger="hover">
+        <div class="popover-container">
+          <!-- <p style="color: red">{{ organName }}</p> -->
+          <el-tag class="navbar_tag" type="info" v-for="item in organNameList" :key="item">{{ item }}</el-tag>
+        </div>
         <span slot="reference">{{ organName.length > 10 ? organName.substr(0, 10) + '...' : organName}}</span>
       </el-popover>
     </div>
@@ -17,8 +20,7 @@
       <div class="msginfo"
            v-permission="'/journals'"
            @click="gotoRecode">
-        <img src="@/assets/images/base/base-bell.png"
-             alt="">
+       <img src='@/assets/images/base/base-bell.svg'/>
         <!-- <div class="active"></div> -->
       </div>
       <el-dropdown class="avatar-container"
@@ -29,6 +31,7 @@
                :src="$store.getters.avatar"
                class="user-avatar" />
           <img v-else
+          class="user-avatar"
                src="@/assets/images/base/placehorder-icon.png" />
           <!-- <i class="el-icon-caret-bottom" /> -->
           <span>{{ username }}</span>
@@ -110,6 +113,7 @@ export default {
     return {
       username: '',
       organName: this.$store.getters.organName,
+      organNameList: [],
       resetVisible: false,
       resetForm: {
         phone: '',
@@ -133,6 +137,7 @@ export default {
     // 手动加入
     this.toggleSideBar();
     this.username = this.$store.getters.name;
+    this.organNameList = this.organName.split(',')
   },
   methods: {
     toggleSideBar () {
@@ -178,7 +183,7 @@ export default {
       if (!this.isDisable) {
         this.isDisable = true;
         // 发请求成功后开启定时器
-        // 发送验证码 
+        // 发送验证码
         axios.post('/api-web/code/sendSms', qs.stringify({ mobile: this.$store.getters.phone })).then(res => {
           if (res.data.code == 200) {
             let timer = setInterval(res => {
@@ -214,6 +219,13 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.navbar_tag {
+  margin: 0 5px 8px;
+}
+.popover-container {
+  max-height: 350px;
+  overflow-y: scroll;
+}
 .navbar {
   display: flex;
   flex-direction: row;

+ 2 - 2
src/layout/components/Sidebar/Item.vue

@@ -15,9 +15,8 @@ export default {
   render(h, context) {
     const { icon, title } = context.props
     const vnodes = []
-
     if (icon) {
-      vnodes.push(<svg-icon icon-class={icon}/>)
+      vnodes.push(<svg-icon icon-class={icon} />)
     }
 
     if (title) {
@@ -27,3 +26,4 @@ export default {
   }
 }
 </script>
+

+ 3 - 3
src/layout/components/Sidebar/Logo.vue

@@ -38,9 +38,9 @@ export default {
   // top:10px;
   position: relative;
   width: 100%;
-  height: 60px;
-  line-height: 60px;
-  // background: #2b2f3a;
+  height: 80px;
+  line-height: 80px;
+  background: #363D55;
   text-align: center;
   overflow: hidden;
 

+ 82 - 63
src/layout/components/Sidebar/SidebarItem.vue

@@ -1,117 +1,136 @@
 <template>
-  <div v-if="!item.hidden"
-       class="menu-wrapper">
-    <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
-      <app-link v-if="onlyOneChild.meta"
-                :to="resolvePath(onlyOneChild.path)">
-        <el-menu-item :index="resolvePath(onlyOneChild.path)"
-                      :class="{'submenu-title-noDropdown':!isNest}">
-          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"
-                :title="onlyOneChild.meta.title" />
+  <div v-if="!item.hidden" class="menu-wrapper">
+    <template
+      v-if="
+        hasOneShowingChild(item.children, item) &&
+        (!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
+        !item.alwaysShow
+      "
+    >
+      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
+        <el-menu-item
+          :index="resolvePath(onlyOneChild.path)"
+          :class="{ 'submenu-title-noDropdown': !isNest }"
+        >
+          <item
+            :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
+            :title="onlyOneChild.meta.title"
+          />
         </el-menu-item>
       </app-link>
     </template>
 
-    <el-submenu v-else
-                ref="subMenu"
-                :index="resolvePath(item.path)"
-                popper-append-to-body>
+    <el-submenu
+      v-else
+      ref="subMenu"
+      :index="resolvePath(item.path)"
+      popper-append-to-body
+    >
       <template slot="title">
-        <item v-if="item.meta"
-              :icon="item.meta && item.meta.icon"
-              :title="item.meta.title" />
+        <item
+          v-if="item.meta"
+          :icon="item.meta && item.meta.icon"
+          :title="item.meta.title"
+        />
       </template>
-      <sidebar-item v-for="child in item.children"
-                    :key="child.id"
-                    :is-nest="true"
-                    :item="child"
-                    :base-path="resolvePath(child.path)"
-                    class="nest-menu" />
+      <sidebar-item
+        v-for="child in item.children"
+        :key="child.id"
+        :is-nest="true"
+        :item="child"
+        :base-path="resolvePath(child.path)"
+        class="nest-menu itemIcon"
+      />
     </el-submenu>
   </div>
 </template>
 
 <script>
-import path from 'path'
-import { isExternal } from '@/utils/validate'
-import Item from './Item'
-import AppLink from './Link'
-import FixiOSBug from './FixiOSBug'
+import path from "path";
+import { isExternal } from "@/utils/validate";
+import Item from "./Item";
+import AppLink from "./Link";
+import FixiOSBug from "./FixiOSBug";
 
 export default {
-  name: 'SidebarItem',
+  name: "SidebarItem",
   components: { Item, AppLink },
   mixins: [FixiOSBug],
   props: {
     // route object
     item: {
       type: Object,
-      required: true
+      required: true,
     },
     isNest: {
       type: Boolean,
-      default: false
+      default: false,
     },
     basePath: {
       type: String,
-      default: ''
-    }
+      default: "",
+    },
   },
-  data () {
+  data() {
     // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
     // TODO: refactor with render function
 
-    return {}
+    return {};
+  },
+  mounted() {
+    this.onlyOneChild = null;
   },
-  mounted () {
-    this.onlyOneChild = null
-  }
-  ,
   methods: {
-    hasOneShowingChild (children = [], parent) {
-      const showingChildren = children.filter(item => {
+    hasOneShowingChild(children = [], parent) {
+      const showingChildren = children.filter((item) => {
         if (item.hidden) {
-          return false
+          return false;
         } else {
           // Temp set(will be used if only has one showing child)
-          this.onlyOneChild = item
-          return true
+          this.onlyOneChild = item;
+          return true;
         }
-      })
+      });
 
       // When there is only one child router, the child router is displayed by default
       if (showingChildren.length === 1) {
-        return true
+        return true;
       }
 
       // Show parent if there are no child router to display
       if (showingChildren.length === 0) {
-        this.onlyOneChild = { ...parent, path: '', noShowingChildren: true }
-        return true
+        this.onlyOneChild = { ...parent, path: "", noShowingChildren: true };
+        return true;
       }
 
-      return false
+      return false;
     },
-    resolvePath (routePath) {
+    resolvePath(routePath) {
       if (isExternal(routePath)) {
-        return routePath
+        return routePath;
       }
       if (isExternal(this.basePath)) {
-        return this.basePath
+        return this.basePath;
       }
       // debugger
-      return path.resolve(this.basePath, routePath)
-    }
-  }
-}
+      return path.resolve(this.basePath, routePath);
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-  // 取消双击选中文字
-div{
-    -moz-user-select:none;/*火狐*/
-    -webkit-user-select:none;/*webkit浏览器*/
-    -ms-user-select:none;/*IE10*/
-    -khtml-user-select:none;/*早期浏览器*/
-      user-select:none;
+// 取消双击选中文字
+div {
+  -moz-user-select: none; /*火狐*/
+  -webkit-user-select: none; /*webkit浏览器*/
+  -ms-user-select: none; /*IE10*/
+  -khtml-user-select: none; /*早期浏览器*/
+  user-select: none;
+}
+.itemIcon {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
 }
-</style>
+
+</style>

+ 121 - 102
src/layout/components/TagsView.vue

@@ -1,23 +1,28 @@
 <template>
   <div class="tags-view-container">
-    <scroll-pane class='tags-view-wrapper'
-                 ref='scrollPane'>
-      <router-link ref='tag'
-                   class="tags-view-item"
-                   :class="isActive(tag)?'active':''"
-                   v-for="(tag,index) in Array.from(visitedViews)"
-                   :to="{path:tag.fullPath,query:tag.query,some:tag.path}"
-                   :key="index"
-                   @contextmenu.prevent.native="openMenu(tag,$event)">
-        {{generateTitle(tag.title)}}
+    <scroll-pane class="tags-view-wrapper" ref="scrollPane">
+      <router-link
+        ref="tag"
+        class="tags-view-item"
+        :class="isActive(tag) ? 'active' : ''"
+        v-for="(tag, index) in Array.from(visitedViews)"
+        :to="{ path: tag.fullPath, query: tag.query, some: tag.path }"
+        :key="index"
+        @contextmenu.prevent.native="openMenu(tag, $event)"
+      >
+        {{ generateTitle(tag.title) }}
         <!-- v-if="index == Array.from(visitedViews).length -1" -->
-        <span class='el-icon-close'
-              @click.prevent.stop='closeSelectedTag(tag)'></span>
+        <span
+          class="el-icon-close icon"
+          @click.prevent.stop="closeSelectedTag(tag)"
+        ></span>
       </router-link>
     </scroll-pane>
-    <ul class='contextmenu'
-        v-show="visible"
-        :style="{left:left+'px',top:top+'px'}">
+    <ul
+      class="contextmenu"
+      v-show="visible"
+      :style="{ left: left + 'px', top: top + 'px' }"
+    >
       <li @click="closeSelectedTag(selectedTag)">关闭</li>
       <li @click="closeOthersTags">关闭其他</li>
       <li @click="closeAllTags">关闭所有</li>
@@ -27,166 +32,180 @@
 </template>
 
 <script>
-import ScrollPane from '@/components/ScrollPane'
-import { generateTitle } from '@/utils/i18n'
-import { Searchs } from '@/helpers'
+import ScrollPane from "@/components/ScrollPane";
+import { generateTitle } from "@/utils/i18n";
+import { Searchs } from "@/helpers";
 
 export default {
-  name: 'TagsView',
+  name: "TagsView",
   components: { ScrollPane },
-  data () {
+  data() {
     return {
       visible: false,
       top: 0,
       left: 0,
-      selectedTag: {}
-    }
+      selectedTag: {},
+    };
   },
-  inject: ['reloads'],
+  inject: ["reloads"],
   computed: {
-    visitedViews () {
+    visitedViews() {
       // console.log(this.$store.state.tagsView.visitedViews)
-      return this.$store.state.tagsView.visitedViews
-    }
+      return this.$store.state.tagsView.visitedViews;
+    },
   },
   watch: {
-    $route () {
-      this.addViewTags()
-      this.moveToCurrentTag()
+    $route() {
+      this.addViewTags();
+      this.moveToCurrentTag();
     },
-    visible (value) {
+    visible(value) {
       if (value) {
-        document.body.addEventListener('click', this.closeMenu)
+        document.body.addEventListener("click", this.closeMenu);
       } else {
-        document.body.removeEventListener('click', this.closeMenu)
+        document.body.removeEventListener("click", this.closeMenu);
       }
-    }
+    },
   },
-  mounted () {
-    this.addViewTags()
-
+  mounted() {
+    this.addViewTags();
   },
   methods: {
     // generateTitle by vue-i18n
     generateTitle,
-    generateRoute () {
-      if (this.$route.path && this.$route.path != '/') {
-        return this.$route
+    generateRoute() {
+      if (this.$route.path && this.$route.path != "/") {
+        return this.$route;
       }
-      return false
+      return false;
     },
     // || route.name === this.$route.name
-    isActive (route) {
-      return route.path === this.$route.path
+    isActive(route) {
+      return route.path === this.$route.path;
     },
     syncTagViewAndSaveForm() {
-      const keys = this.$store.state.tagsView.visitedViews.map(item => item.path)
-      const searchs = new Searchs()
-      const allSearch = searchs.getSearchs()
-      const sks = Object.keys(allSearch)
+      const keys = this.$store.state.tagsView.visitedViews.map(
+        (item) => item.path
+      );
+      const searchs = new Searchs();
+      const allSearch = searchs.getSearchs();
+      const sks = Object.keys(allSearch);
       for (const item of sks) {
         if (!(keys.includes(item) || keys.includes(allSearch[item].bind))) {
-          searchs.removeByKey(item)
+          searchs.removeByKey(item);
         }
       }
     },
-    async addViewTags () {
-      const route = this.generateRoute()
+    async addViewTags() {
+      const route = this.generateRoute();
       if (!route) {
-        return false
+        return false;
       }
       // console.log(this.$route)
-      await this.$store.dispatch('addVisitedViews', route)
-      this.syncTagViewAndSaveForm()
+      await this.$store.dispatch("addVisitedViews", route);
+      this.syncTagViewAndSaveForm();
     },
-    moveToCurrentTag () {
-      const tags = this.$refs['tag']
+    moveToCurrentTag() {
+      const tags = this.$refs["tag"];
       this.$nextTick(() => {
         for (const tag of tags) {
           if (tag.path === this.$route.path) {
-            this.$refs.scrollPane.moveToTarget(tag.$el)
-            break
+            this.$refs.scrollPane.moveToTarget(tag.$el);
+            break;
           }
         }
-      })
+      });
     },
-    closeSelectedTag (view) {
-      const searchs = new Searchs()
-      searchs.remove(this.$route.path)
-      this.$store.dispatch('delVisitedViews', view).then((views) => {
+    closeSelectedTag(view) {
+      const searchs = new Searchs();
+      searchs.remove(this.$route.path);
+      this.$store.dispatch("delVisitedViews", view).then((views) => {
         if (this.isActive(view)) {
-          const latestView = views.slice(-1)[0]
+          const latestView = views.slice(-1)[0];
           if (latestView) {
-            this.$router.push(latestView.fullPath)
+            this.$router.push(latestView.fullPath);
           } else {
-            this.$router.push('/')
+            this.$router.push("/");
           }
         }
-      })
+      });
     },
-    closeOthersTags () {
-      this.$router.push(this.selectedTag.path)
-      this.$store.dispatch('delOthersViews', this.selectedTag).then(() => {
-        this.moveToCurrentTag()
-      })
+    closeOthersTags() {
+      this.$router.push(this.selectedTag.path);
+      this.$store.dispatch("delOthersViews", this.selectedTag).then(() => {
+        this.moveToCurrentTag();
+      });
     },
-    closeAllTags () {
-      this.$store.dispatch('delAllViews')
-      this.$router.push('/')
+    closeAllTags() {
+      this.$store.dispatch("delAllViews");
+      this.$router.push("/");
     },
-    openMenu (tag, e) {
-      this.visible = true
-      this.selectedTag = tag
-      this.left = e.clientX - 165
-      this.top = e.clientY + 15
+    openMenu(tag, e) {
+      this.visible = true;
+      this.selectedTag = tag;
+      this.left = e.clientX - 165;
+      this.top = e.clientY + 15;
     },
-    closeMenu () {
-      this.visible = false
+    closeMenu() {
+      this.visible = false;
     },
-    async refresh (view) {
-      await this.reloads()
-    }
-  }
-}
+    async refresh(view) {
+      await this.reloads();
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
 .tags-view-container {
   .tags-view-wrapper {
-    background: #fff;
+    background: #edeef0;
     height: 34px;
     border-bottom: 1px solid #d8dce5;
     box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
     .tags-view-item {
+      width: 120px;
+      .icon {
+        font-size: 20px;
+        position: relative;
+        top: 3px;
+        float: right;
+        margin-right: 5px;
+      }
+      border-radius: 5px 5px 0 0;
       display: inline-block;
       position: relative;
-      height: 26px;
-      line-height: 26px;
-      border: 1px solid #d8dce5;
+      height: 30px;
+      line-height: 30px;
+      // border: 1px solid #d8dce5;
       color: #495060;
-      background: #fff;
+
       padding: 0 8px;
       font-size: 12px;
-      margin-left: 5px;
+      // margin-left: 5px;
       margin-top: 4px;
       &:first-of-type {
         margin-left: 15px;
       }
       &.active {
-        background-color: #13817a;
-        color: #fff;
-        border-color: #13817a;
+        color: #495060;
+        left: -1px;
+        background-color: #fff;
+        z-index: 2;
+
         &::before {
-          content: "";
-          background: #fff;
-          display: inline-block;
-          width: 8px;
-          height: 8px;
-          border-radius: 50%;
-          position: relative;
-          margin-right: 2px;
+           border-right: 0;
         }
       }
+      &::before {
+        content: "";
+        display: inline-block;
+        position: absolute;
+        right: 0;
+        height: 20px;
+        bottom: 6px;
+        border-right: 1px solid #b5b5b5;
+      }
     }
   }
   .contextmenu {

+ 1 - 0
src/router/notKeepAliveList.js

@@ -80,5 +80,6 @@ export default [
   '/business/vipReset', // vip修改
   '/business/vipDetail', // vip查看
   '/contentManager/contentManager', // 内容管理
+  '/contentManager/contentOperation', // 内容编辑
   '/business/teamCLassList', // 班级列表
 ]

+ 15 - 4
src/styles/sidebar.scss

@@ -71,26 +71,33 @@
     // menu hover
     .submenu-title-noDropdown,
     .el-submenu__title {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+
       &:hover {
         background-color: $menuHover !important;
       }
     }
 
     .is-active>.el-submenu__title {
+      i{color: #fff;}
       color: $subMenuActiveText !important;
     }
 
     & .nest-menu .el-submenu>.el-submenu__title,
     & .el-submenu .el-menu-item {
       min-width: $sideBarWidth !important;
-      background-color: $subMenuBg !important;
+      background-color: $subMenuBg;
 
       &:hover {
-        background-color: $subMenuHover !important;
+        background-color: $subMenuHover;
       }
     }
   }
-
+  .el-menu-item.is-active {
+    background-color: $subMenuActiveBg!important;
+ }
   .hideSidebar {
     .sidebar-container {
       width: $sideBarWidth  !important;
@@ -124,6 +131,7 @@
         }
 
         .el-submenu__icon-arrow {
+          color: #fff;
           display: none;
         }
       }
@@ -185,12 +193,15 @@
     }
   }
 
-  .nest-menu .el-submenu>.el-submenu__title,
+  // .nest-menu .el-submenu>.el-submenu__title,
   .el-menu-item {
     &:hover {
       // you can use $subMenuHover
       background-color: $menuHover !important;
     }
+    .is-active {
+      background-color: #13817A !important;
+    }
   }
 
   // the scroll bar appears when the subMenu is too long

+ 7 - 6
src/styles/variables.scss

@@ -1,13 +1,14 @@
 // sidebar
-$menuText:#80BBB7;
+$menuText:#CBCBCB;    // #000
 $menuActiveText:#fff;
-$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951
-
-$menuBg:#13817A;
+$subMenuActiveText:#fff; //https://github.com/ElemeFE/element/issues/12951
+// :#13817A;
+$menuBg:#363D55;
 $menuHover:#13817A;
 
-$subMenuBg:#0E605B;
-$subMenuHover:#0E605B;
+$subMenuBg:#2C3246;
+$subMenuHover:#2C3246;
+$subMenuActiveBg:#13817A;
 
 $sideBarWidth: 165px;
 /* 改变主题色变量 */

+ 20 - 4
src/views/contentManager/components/knowledge.vue

@@ -9,7 +9,7 @@
              saveKey="contentKnowledge"
              @submit="search"
              :model="searchForm">
-      <el-form-item prop="hasPracticeCourse">
+      <el-form-item prop="tenantId">
         <el-select class="multiple"
                    v-model.trim="searchForm.tenantId"
                    placeholder="请选择对内或对外">
@@ -19,7 +19,7 @@
                      value="2"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item>
+      <el-form-item prop="subType">
         <el-select v-model="searchForm.subType"
                    clearable
                    placeholder="请选择知识类别">
@@ -33,6 +33,11 @@
                      :value="4"></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item prop="subjectId">
+          <el-select v-model="searchForm.subjectId" clearable filterable placeholder="请选择声部">
+            <el-option v-for="item in selects.subjects" :value="item.id" :label="item.name" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
       <el-form-item>
         <el-button native-type="submit" type="danger">搜索</el-button>
       </el-form-item>
@@ -56,7 +61,7 @@
         <el-table-column align='center'
                          label="跳转连接">
           <template slot-scope="scope">
-            <overflow-text :text="scope.row.linkUrl + '/' + scope.row.id"></overflow-text>
+            <overflow-text width="100%" :text="scope.row.linkUrl + '/' + scope.row.id"></overflow-text>
             <!-- {{ scope.row.linkUrl + '/' + scope.row.id }} -->
           </template>
         </el-table-column>
@@ -82,6 +87,13 @@
           </template>
         </el-table-column>
         <el-table-column align='center'
+                         prop="subjectName"
+                         label="所属声部">
+          <template slot-scope="scope">
+            {{ scope.row.subjectName }}
+          </template>
+        </el-table-column>
+        <el-table-column align='center'
                          prop="order"
                          label="排序">
         </el-table-column>
@@ -129,6 +141,7 @@
 import { newsList, newsUpdate, newsDel } from '@/api/contentManager'
 import pagination from '@/components/Pagination/index'
 import store from '@/store'
+import cleanDeep from 'clean-deep'
 import { permission } from '@/utils/directivePage'
 export default {
   name: 'knowledge',
@@ -139,6 +152,7 @@ export default {
     return {
       searchForm: {
         tenantId: '1',
+        subjectId: null,
         subType: null,
       },
       tableList: [],
@@ -154,6 +168,7 @@ export default {
     }
   },
   mounted () {
+    this.$store.dispatch('setSubjects')
     this.getList()
   },
   methods: {
@@ -169,11 +184,12 @@ export default {
         clientName: 'manage',
         tenantId: this.searchForm.tenantId,
         subType: this.searchForm.subType,
+        subjectId: this.searchForm.subjectId,
         rows: this.pageInfo.limit,
         page: this.pageInfo.page,
         type: 7
       }
-      newsList(params).then(res => {
+      newsList(cleanDeep(params)).then(res => {
         if (res.code == 200) {
           this.tableList = res.data.rows
           this.pageInfo.total = res.data.total

+ 26 - 4
src/views/contentManager/contentOperation.vue

@@ -20,13 +20,24 @@
         </el-form-item>
         <el-form-item label="适用范围"
                       prop="tenantId">
-          <el-select v-model="form.tenantId">
+          <el-select v-model="form.tenantId" style="width: 400px !important">
             <el-option label="对内"
                        value="1"></el-option>
             <el-option label="对外"
                        value="2"></el-option>
           </el-select>
         </el-form-item>
+
+        <el-form-item 
+          prop="subjectIdList"  v-if="type == 7"
+          label="所属声部"
+          :rules="[{required: true, message:'请选择声部', trigger: 'blur, change'}]">
+          <el-select v-model="form.subjectIdList" clearable filterable multiple placeholder="请选择声部" style="width: 400px !important">
+            <el-option v-for="item in selects.subjects" :value="item.id" :label="item.name" :key="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+
+
         <!-- banner图 && app按钮管理,才需要添加版本号 -->
         <el-form-item label="版本号"
                       v-if="type == 3 || type == 6 || type == 8">
@@ -56,7 +67,7 @@
         <!-- 广告管理才有类型 -->
         <el-form-item label="广告类型"
                       v-if="type == 8">
-          <el-select v-model="uploadType"
+          <el-select v-model="uploadType" style="width: 400px !important"
                      :disabled="pageType != 'create'">
             <el-option label="图片"
                        :value="1"></el-option>
@@ -118,7 +129,7 @@
                       label="知识类别"
                       prop="subType"
                       :rules="[{ required: true, message: '请选择知识类别', trigger: 'change' }]">
-          <el-select v-model="form.subType">
+          <el-select v-model="form.subType" style="width: 400px !important">
             <el-option label="演奏小技巧"
                        :value="1"></el-option>
             <el-option label="乐理基础"
@@ -414,6 +425,7 @@ export default {
         videoCoverImage: null,
         attribute1: null, // 时长
         linkUrl: url,
+        subjectIdList: null, // 声部编号
         type: query.type,
         status: 1,
         content: null,
@@ -454,6 +466,7 @@ export default {
         attribute1: null,
         linkUrl: url,
         type: query.type,
+        subjectIdList: null,
         status: 1,
         content: null,
         tenantId: null,
@@ -471,6 +484,8 @@ export default {
     }
     this.type = query.type;
     this.pageType = query.pageType;
+    // 获取声部
+    this.$store.dispatch('setSubjects')
     this.init();
   },
   methods: {
@@ -574,13 +589,18 @@ export default {
     onSubmit (formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {
-          let form = Object.assign({}, this.form)
+          let { subjectIdList, ...rest } = this.form
+          let form = {
+            ...rest,
+            subjectIdList: subjectIdList.join(',')
+          }
           let actionTime = form.actionTime
           // console.log(actionTime)
           if(actionTime && actionTime.length > 0) {
             form.onlineTime = dayjs(actionTime[0]).format('YYYY-MM-DD HH:mm:ss')
             form.offlineTime = dayjs(actionTime[1]).format('YYYY-MM-DD HH:mm:ss')
           }
+
           if (this.pageType == "create") {
             if (form.id) {
               // 判断有没有Id,如果有则删除
@@ -714,6 +734,7 @@ export default {
             if(result.onlineTime && result.offlineTime) {
               tempActionTime = [result.onlineTime, result.offlineTime]
             }
+            let subject = result.subjectIdList ? result.subjectIdList.split(',') : []
             this.form = {
               id: result.id,
               title: result.title,
@@ -724,6 +745,7 @@ export default {
               linkUrl: result.linkUrl,
               type: result.type,
               status: result.status,
+              subjectIdList: subject.map(item => { return +item }),
               memo: result.memo,
               content: result.content,
               actionTime: tempActionTime,

+ 12 - 5
src/views/login/index.vue

@@ -160,9 +160,16 @@ export default {
 };
 </script>
 
-<style lang="scss" rel="stylesheet/scss">
+<style lang="scss" rel="stylesheet/scss" scoped>
+/deep/.el-input__inner{
+   background-color:transparent!important;
+   border:1px solid transparent!important
+}
+.login-container .el-input input:-webkit-autofill{
+  background-color:transparent!important;
+}
 .login-input {
-  background-color: #fff;
+  background-color:transparent!important;
 }
 /* 修复input 背景不协调 和光标变色 */
 /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
@@ -259,7 +266,7 @@ $cursor: #000;
     width: 85%;
 
     input {
-      background: transparent;
+      background: transparent!important;
       border: 0px;
       -webkit-appearance: none;
       border-radius: 0px;
@@ -304,8 +311,8 @@ $light_gray: #eee;
     padding: 0px 35px;
     margin: 12% auto 0;
     overflow: hidden;
-    background-color: #fff;
-    opacity: 0.85;
+    background-color: rgba(255, 255, 255, 0.85);
+    // opacity: 0.85;
     box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.66);
     border-radius: 20px;
   }

+ 5 - 1
src/views/operateManager/serverIndexList.vue

@@ -175,7 +175,11 @@
             align="center"
             prop="groupNames"
             label="乐团名称"
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <overflow-text width="100%" :text="scope.row.groupNames"></overflow-text>
+            </template>
+          </el-table-column>
           <el-table-column align="center" prop="teacherName" label="指导老师">
             <template slot-scope="scope">
               <div>

Some files were not shown because too many files changed in this diff