Tang 4 лет назад
Родитель
Сommit
1191f2bc3c


+ 229 - 0
src/components/tabberList copy.vue

@@ -0,0 +1,229 @@
+<template>
+  <div id="tabberList">
+    <div
+      class="btnMove"
+      v-if="showBtn"
+      @mousedown="leftMoveStart"
+      @mouseup="leftMoveEnd"
+    >
+      <i class="el-icon-arrow-left"></i>
+    </div>
+    <div class="listBox" ref="barparent">
+      <div
+        class="listChildren"
+        v-for="(item, index) in tabberLists"
+        :key="index"
+        :class="item.path === navActive ? 'activeListChildren' : ''"
+        @click="changeActive(item)"
+         @contextmenu.prevent="rightBtn(item)"
+      >
+        {{ item.title }}
+        <i
+          class="el-icon-close"
+          v-if="item.path !== '/home'"
+          @click.stop="close(item, index)"
+        ></i>
+      </div>
+    </div>
+
+    <div
+      class="btnMove"
+      v-if="showBtn"
+      @mousedown="rightMoveStart"
+      @mouseup="rightMoveEnd"
+    >
+      <i class="el-icon-arrow-right"></i>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      showBtn: false,
+      navActive: this.$store.getters.navActive,
+    };
+  },
+  computed: {
+    tabberLists: function () {
+      return this.$store.state.tabberLists;
+    },
+  },
+  watch: {
+    "$store.getters.navActive"(newval, olval) {
+      new Promise((resolve, reject) => {
+        this.navActive = newval;
+        resolve();
+      }).then(() => {
+        setTimeout(() => {
+          this.watchChangeStatus();
+        }, 100);
+      });
+    },
+    "$store.getters.tabberLists"(newval, olval) {
+      this.$nextTick(() => {
+        this.changeLists();
+      });
+    },
+  },
+  mounted() {
+    this.changeLists();
+    setTimeout(() => {
+      this.watchChangeStatus();
+    }, 100);
+  },
+  methods: {
+    rightBtn(option){
+      // var lists = JSON.parse(localStorage['tabberLists'])
+      // var newLists = []
+      // lists.forEach((item,index) => {
+      //   if(item.path === '/home' || item.path === option.path){
+      //     newLists.push(item)
+      //   }
+      // })
+      // localStorage['tabberLists'] = JSON.stringify(newLists)
+      // this.$store.commit('closeMoreLists')
+    },
+    changeLists() {
+      if (this.$refs.barparent.offsetWidth < this.$refs.barparent.scrollWidth) {
+        this.showBtn = true;
+      } else {
+        this.showBtn = false;
+      }
+    },
+    // 选中状态变化触发
+    watchChangeStatus() {
+      if (
+        document.querySelector(".activeListChildren") === null &&
+        document.querySelector(".activeListChildren") === null
+      ) {
+      } else {
+        var eOffsetLeft = document.querySelector(".activeListChildren")
+          .offsetLeft;
+        var eOffsetWidth = document.querySelector(".activeListChildren")
+          .offsetWidth;
+      }
+
+      var pyl =
+        this.$refs.barparent.scrollLeft + this.$refs.barparent.offsetWidth;
+      var cyl = eOffsetLeft + eOffsetWidth;
+      var syl = this.$refs.barparent.scrollLeft;
+      if (cyl > pyl) {
+        this.$refs.barparent.scrollLeft += cyl - pyl + eOffsetWidth / 2;
+      }
+      if (syl > eOffsetLeft) {
+        this.$refs.barparent.scrollLeft -= syl - eOffsetLeft + eOffsetWidth / 2;
+      }
+    },
+    // 左右标鼠标事件---start
+    leftMoveStart() {
+      var self = this;
+      this.leftM = setInterval(() => {
+        self.$refs.barparent.scrollLeft -= 4;
+      }, 10);
+    },
+    leftMoveEnd() {
+      clearInterval(this.leftM);
+    },
+    rightMoveStart() {
+      var self = this;
+      this.rightM = setInterval(() => {
+        self.$refs.barparent.scrollLeft += 4;
+      }, 10);
+    },
+    rightMoveEnd() {
+      clearInterval(this.rightM);
+    },
+    leftMove() {
+      if (this.$refs.barparent.scrollLeft === 0) {
+      } else {
+        this.$refs.barparent.scrollLeft -= 40;
+      }
+    },
+    rightMove() {
+      this.$refs.barparent.scrollLeft += 40;
+    },
+    // 左右标鼠标事件---end
+
+    //点击跳转路由
+    changeActive(v) {
+      this.$router.push({
+        path: v.path,
+      });
+    },
+    //关闭
+    close(i, v) {
+      var data = {
+        item: i,
+        index: v,
+        path: this.$route.path,
+      };
+      this.$store.commit("delTabberLists", data);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+#tabberList {
+  height: 40px;
+  background-color: #fff;
+  padding: 0px 16px;
+  box-shadow: 0px 3px 5px 0px rgba(28, 41, 90, 0.05);
+  display: flex;
+  align-items: center;
+  width: 100%;
+  // overflow-x: auto;
+  .btnMove {
+    width: 28px;
+    height: 28px;
+    border-radius: 4px;
+    border: 1px solid #e3edfe;
+    cursor: pointer;
+    text-align: center;
+    line-height: 28px;
+    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
+  }
+  .listBox {
+    display: flex;
+    align-items: center;
+    width: 100%;
+    overflow-x: auto;
+    margin: 0px 10px;
+    height: 100%;
+    transition: all 0.4s;
+    position: relative;
+    &::-webkit-scrollbar {
+      display: none;
+    }
+    .listChildren {
+      display: flex;
+      align-items: center;
+      background-color: #fff;
+      height: 100%;
+      border-radius: 8px 8px 0px 0px;
+      padding: 0px 14px;
+      line-height: 100%;
+      color: #999;
+      font-size: 16px;
+      cursor: pointer;
+      white-space: nowrap;
+      transition: all 0.3s;
+      i {
+        font-size: 12px;
+        margin-left: 16px;
+        color: #999 !important;
+      }
+      &:hover{
+      background-color: #e3edfe;
+
+      }
+    }
+    .activeListChildren {
+      background-color: #e3edfe;
+      color: #2f4379;
+    }
+  }
+}
+</style>

+ 191 - 142
src/components/tabberList.vue

@@ -1,38 +1,36 @@
 <template>
 <template>
   <div id="tabberList">
   <div id="tabberList">
-    <div
-      class="btnMove"
-      v-if="showBtn"
-      @mousedown="leftMoveStart"
-      @mouseup="leftMoveEnd"
-    >
-      <i class="el-icon-arrow-left"></i>
+    <div class="lefts" @click="Move('left')">
+      <i class="el-icon-caret-left"></i>
     </div>
     </div>
-    <div class="listBox" ref="barparent">
+    <div class="lisBx">
       <div
       <div
-        class="listChildren"
+        class="lisboxssT"
+        :class="item.path === navActive ? 'activesBtns' : ''"
         v-for="(item, index) in tabberLists"
         v-for="(item, index) in tabberLists"
         :key="index"
         :key="index"
-        :class="item.path === navActive ? 'activeListChildren' : ''"
-        @click="changeActive(item)"
-         @contextmenu.prevent="rightBtn(item)"
+        @click.stop="actives(item, $event)"
+        @contextmenu.prevent="rightBtn(item, $event)"
       >
       >
         {{ item.title }}
         {{ item.title }}
         <i
         <i
-          class="el-icon-close"
+          class="el-icon-close iconClose"
           v-if="item.path !== '/home'"
           v-if="item.path !== '/home'"
           @click.stop="close(item, index)"
           @click.stop="close(item, index)"
         ></i>
         ></i>
       </div>
       </div>
     </div>
     </div>
-
+    <div class="rights" @click="Move('right')">
+      <i class="el-icon-caret-right"></i>
+    </div>
     <div
     <div
-      class="btnMove"
-      v-if="showBtn"
-      @mousedown="rightMoveStart"
-      @mouseup="rightMoveEnd"
+      class="rightBts"
+      v-if="visible"
+      :style="{ top: top + 'px', left: left + 'px' }"
     >
     >
-      <i class="el-icon-arrow-right"></i>
+      <div class="bls" @click="removeLeft">关闭左侧</div>
+      <div class="bls" @click="removeRight">关闭右侧</div>
+      <div class="bls" @click="removeQI">关闭其他</div>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -41,117 +39,144 @@
 export default {
 export default {
   data() {
   data() {
     return {
     return {
-      showBtn: false,
-      navActive: this.$store.getters.navActive,
+      top: 0,
+      left: 0,
+      visible: false,
+      pageClickItem: {},
     };
     };
   },
   },
+  watch: {
+    visible(value) {
+      if (value) {
+        document.body.addEventListener("click", this.closeMenu);
+      } else {
+        document.body.removeEventListener("click", this.closeMenu);
+      }
+    },
+  },
   computed: {
   computed: {
     tabberLists: function () {
     tabberLists: function () {
       return this.$store.state.tabberLists;
       return this.$store.state.tabberLists;
     },
     },
+    navActive: function () {
+      this.changes();
+      return this.$store.getters.navActive;
+    },
   },
   },
-  watch: {
-    "$store.getters.navActive"(newval, olval) {
-      new Promise((resolve, reject) => {
-        this.navActive = newval;
-        resolve();
-      }).then(() => {
-        setTimeout(() => {
-          this.watchChangeStatus();
-        }, 100);
+  methods: {
+    removeLeft() {
+      if (this.pageClickItem.path === "/home") {
+        return;
+      }
+      var self = this;
+      var ary = JSON.parse(JSON.stringify(this.$store.state.tabberLists));
+      var newAry = [];
+      ary.map((item, index) => {
+        if (item.path === self.pageClickItem.path) {
+          newAry = ary.splice(index, ary.length);
+          newAry.unshift(ary[0]);
+        }
       });
       });
+      this.changeMove(newAry);
     },
     },
-    "$store.getters.tabberLists"(newval, olval) {
-      this.$nextTick(() => {
-        this.changeLists();
+    removeRight() {
+      var self = this;
+      var ary = JSON.parse(JSON.stringify(this.$store.state.tabberLists));
+      var newAry = [];
+      ary.map((item, index) => {
+        if (item.path === self.pageClickItem.path) {
+          newAry = ary.splice(0, index + 1);
+        }
       });
       });
+      this.changeMove(newAry);
     },
     },
-  },
-  mounted() {
-    this.changeLists();
-    setTimeout(() => {
-      this.watchChangeStatus();
-    }, 100);
-  },
-  methods: {
-    rightBtn(option){
-      // var lists = JSON.parse(localStorage['tabberLists'])
-      // var newLists = []
-      // lists.forEach((item,index) => {
-      //   if(item.path === '/home' || item.path === option.path){
-      //     newLists.push(item)
-      //   }
-      // })
-      // localStorage['tabberLists'] = JSON.stringify(newLists)
-      // this.$store.commit('closeMoreLists')
-    },
-    changeLists() {
-      if (this.$refs.barparent.offsetWidth < this.$refs.barparent.scrollWidth) {
-        this.showBtn = true;
-      } else {
-        this.showBtn = false;
+    removeQI() {
+      var self = this;
+      var ary = JSON.parse(JSON.stringify(this.$store.state.tabberLists));
+      var newAry = [];
+      ary.map((item, index) => {
+        if (item.path === self.pageClickItem.path) {
+          newAry.push(item);
+        }
+      });
+      if (this.pageClickItem.path !== "/home") {
+        newAry.unshift(ary[0]);
       }
       }
+      this.changeMove(newAry);
     },
     },
-    // 选中状态变化触发
-    watchChangeStatus() {
-      if (
-        document.querySelector(".activeListChildren") === null &&
-        document.querySelector(".activeListChildren") === null
-      ) {
-      } else {
-        var eOffsetLeft = document.querySelector(".activeListChildren")
-          .offsetLeft;
-        var eOffsetWidth = document.querySelector(".activeListChildren")
-          .offsetWidth;
+    changeMove(v) {
+      this.$store.state.tabberLists = v;
+      localStorage["tabberLists"] = JSON.stringify(v);
+      if (this.pageClickItem.path !== this.$store.getters.navActive) {
+        this.$router.push({
+          path: this.pageClickItem.path,
+        });
       }
       }
-
-      var pyl =
-        this.$refs.barparent.scrollLeft + this.$refs.barparent.offsetWidth;
-      var cyl = eOffsetLeft + eOffsetWidth;
-      var syl = this.$refs.barparent.scrollLeft;
-      if (cyl > pyl) {
-        this.$refs.barparent.scrollLeft += cyl - pyl + eOffsetWidth / 2;
+    },
+    Move(str) {
+      var a = document.getElementsByClassName("lisBx");
+      var scrollWidth = a[0].scrollWidth - a[0].clientWidth;
+      var aScroll =
+        a[0].scrollLeft - a[0].clientWidth <= 0
+          ? 0
+          : a[0].scrollLeft - a[0].clientWidth;
+      var bScroll =
+        a[0].scrollLeft + a[0].clientWidth >= scrollWidth
+          ? scrollWidth
+          : a[0].scrollLeft + a[0].clientWidth;
+      if (str === "left") {
+        var aInt = setInterval(() => {
+          if (a[0].scrollLeft <= aScroll) {
+            clearInterval(aInt);
+            return;
+          } else {
+            a[0].scrollLeft = a[0].scrollLeft - 10;
+          }
+        }, 3);
       }
       }
-      if (syl > eOffsetLeft) {
-        this.$refs.barparent.scrollLeft -= syl - eOffsetLeft + eOffsetWidth / 2;
+      if (str === "right") {
+        var bInt = setInterval(() => {
+          if (a[0].scrollLeft >= bScroll) {
+            clearInterval(bInt);
+            return;
+          } else {
+            a[0].scrollLeft = a[0].scrollLeft + 10;
+          }
+        }, 3);
       }
       }
     },
     },
-    // 左右标鼠标事件---start
-    leftMoveStart() {
-      var self = this;
-      this.leftM = setInterval(() => {
-        self.$refs.barparent.scrollLeft -= 4;
-      }, 10);
-    },
-    leftMoveEnd() {
-      clearInterval(this.leftM);
-    },
-    rightMoveStart() {
-      var self = this;
-      this.rightM = setInterval(() => {
-        self.$refs.barparent.scrollLeft += 4;
-      }, 10);
+    rightBtn(item, e) {
+      this.top = e.pageY;
+      this.left = e.pageX;
+      this.visible = true;
+      this.pageClickItem = item;
     },
     },
-    rightMoveEnd() {
-      clearInterval(this.rightM);
+    closeMenu() {
+      this.visible = false;
     },
     },
-    leftMove() {
-      if (this.$refs.barparent.scrollLeft === 0) {
-      } else {
-        this.$refs.barparent.scrollLeft -= 40;
+    actives(v, e) {
+      if (v.path === this.$store.getters.navActive) {
+        return;
       }
       }
-    },
-    rightMove() {
-      this.$refs.barparent.scrollLeft += 40;
-    },
-    // 左右标鼠标事件---end
-
-    //点击跳转路由
-    changeActive(v) {
+      this.changeStyMover(e.target.offsetLeft);
       this.$router.push({
       this.$router.push({
         path: v.path,
         path: v.path,
       });
       });
     },
     },
+    changeStyMover(ext) {
+      var a = document.getElementsByClassName("lisBx");
+      a[0].scrollLeft = ext - a[0].clientWidth / 2;
+    },
+    changes() {
+      var self = this;
+      this.$nextTick(() => {
+        setTimeout(() => {
+          var est =
+            document.getElementsByClassName("activesBtns")[0].offsetLeft;
+          self.changeStyMover(est);
+        }, 300);
+      });
+    },
     //关闭
     //关闭
     close(i, v) {
     close(i, v) {
       var data = {
       var data = {
@@ -167,63 +192,87 @@ export default {
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
 #tabberList {
 #tabberList {
+  padding: 0px 8px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
   height: 40px;
   height: 40px;
   background-color: #fff;
   background-color: #fff;
-  padding: 0px 16px;
   box-shadow: 0px 3px 5px 0px rgba(28, 41, 90, 0.05);
   box-shadow: 0px 3px 5px 0px rgba(28, 41, 90, 0.05);
-  display: flex;
-  align-items: center;
-  width: 100%;
-  // overflow-x: auto;
-  .btnMove {
-    width: 28px;
-    height: 28px;
+  .rightBts {
+    position: fixed;
+    width: 100px;
+    z-index: 10000;
+    box-shadow: 2px 2px 10px #aaa !important;
     border-radius: 4px;
     border-radius: 4px;
-    border: 1px solid #e3edfe;
+    border: 1px solid #9e9e9e;
+    background-color: #fff;
+    .bls {
+      cursor: pointer;
+      height: 40px;
+      line-height: 40px;
+      text-align: center;
+      border-bottom: 1px solid #eee;
+      font-size: 14px;
+      color: rgba(0, 0, 0, 0.65);
+      &:last-child {
+        border-bottom: none;
+      }
+    }
+  }
+  .lefts {
+    width: 36px;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    margin-right: 4px;
     cursor: pointer;
     cursor: pointer;
+    border-radius: 8px;
+    border: 1px solid #eee;
+  }
+  .rights {
+    width: 36px;
+    height: 36px;
+    line-height: 36px;
     text-align: center;
     text-align: center;
-    line-height: 28px;
-    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
+    cursor: pointer;
+    margin-left: 4px;
+    border-radius: 8px;
+    border: 1px solid #eee;
   }
   }
-  .listBox {
+  .lisBx {
+    position: relative;
+    flex: 1;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
-    width: 100%;
     overflow-x: auto;
     overflow-x: auto;
-    margin: 0px 10px;
-    height: 100%;
-    transition: all 0.4s;
-    position: relative;
-    &::-webkit-scrollbar {
-      display: none;
-    }
-    .listChildren {
-      display: flex;
-      align-items: center;
+    transition: all 0.2s;
+    .lisboxssT {
       background-color: #fff;
       background-color: #fff;
-      height: 100%;
-      border-radius: 8px 8px 0px 0px;
-      padding: 0px 14px;
-      line-height: 100%;
+      border-radius: 8px;
+      margin: 0px 1px;
+      padding: 0px 10px;
+      height: 36px;
+      line-height: 36px;
+      flex-shrink: 0;
       color: #999;
       color: #999;
       font-size: 16px;
       font-size: 16px;
       cursor: pointer;
       cursor: pointer;
-      white-space: nowrap;
-      transition: all 0.3s;
-      i {
+      transition: all 0.2s;
+      .iconClose {
         font-size: 12px;
         font-size: 12px;
-        margin-left: 16px;
-        color: #999 !important;
       }
       }
-      &:hover{
-      background-color: #e3edfe;
-
+      &:hover {
+        background-color: #e3edfe;
       }
       }
     }
     }
-    .activeListChildren {
+    .activesBtns {
       background-color: #e3edfe;
       background-color: #e3edfe;
       color: #2f4379;
       color: #2f4379;
     }
     }
+    &::-webkit-scrollbar {
+      display: none;
+    }
   }
   }
 }
 }
 </style>
 </style>

+ 56 - 8
src/components/userInfoS.vue

@@ -100,39 +100,87 @@
             <tr>
             <tr>
               <td class="label">学信网学籍证明</td>
               <td class="label">学信网学籍证明</td>
               <td class="flex">
               <td class="flex">
-                <img
+                <el-image
+                class="el_images"
+                lazy
+                :z-index="2099"
+                :src="$methodsTools.splitImgHost(education.studentStatusImg)"
+                style="width:100%;height: 100%"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(education.studentStatusImg),
+                ]"
+                alt="加载失败..."
+              >
+              </el-image>
+                <!-- <img
                   style="width: 100%"
                   style="width: 100%"
                   :src="
                   :src="
                     $methodsTools.splitImgHost(education.studentStatusImg)
                     $methodsTools.splitImgHost(education.studentStatusImg)
                   "
                   "
                   alt=""
                   alt=""
-                />
+                /> -->
               </td>
               </td>
               <td class="label">一寸照片</td>
               <td class="label">一寸照片</td>
               <td class="flex">
               <td class="flex">
-                <img
+                <el-image
+                class="el_images"
+                lazy
+                :z-index="2099"
+                :src="$methodsTools.splitImgHost(propData.oneInchPhotos)"
+                style="width:100%;height: 100%"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(propData.oneInchPhotos),
+                ]"
+                alt="加载失败..."
+              >
+              </el-image>
+                <!-- <img
                   style="width: 100%"
                   style="width: 100%"
                   :src="$methodsTools.splitImgHost(propData.oneInchPhotos)"
                   :src="$methodsTools.splitImgHost(propData.oneInchPhotos)"
                   alt=""
                   alt=""
-                />
+                /> -->
               </td>
               </td>
             </tr>
             </tr>
             <tr>
             <tr>
               <td class="label">身份证人像面</td>
               <td class="label">身份证人像面</td>
               <td class="flex">
               <td class="flex">
-                <img
+                <el-image
+                class="el_images"
+                lazy
+                :z-index="2099"
+                :src="$methodsTools.splitImgHost(propData.idCardImg1)"
+                style="width:100%;height: 100%"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(propData.idCardImg1),
+                ]"
+                alt="加载失败..."
+              >
+              </el-image>
+                <!-- <img
                   style="width: 100%"
                   style="width: 100%"
                   :src="$methodsTools.splitImgHost(propData.idCardImg1)"
                   :src="$methodsTools.splitImgHost(propData.idCardImg1)"
                   alt=""
                   alt=""
-                />
+                /> -->
               </td>
               </td>
               <td class="label">身份证国徽面</td>
               <td class="label">身份证国徽面</td>
               <td class="flex">
               <td class="flex">
-                <img
+                <el-image
+                class="el_images"
+                lazy
+                :z-index="2099"
+                :src="$methodsTools.splitImgHost(propData.idCardImg2)"
+                style="width:100%;height: 100%"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(propData.idCardImg2),
+                ]"
+                alt="加载失败..."
+              >
+              </el-image>
+                <!-- <img
                   style="width: 100%"
                   style="width: 100%"
                   :src="$methodsTools.splitImgHost(propData.idCardImg2)"
                   :src="$methodsTools.splitImgHost(propData.idCardImg2)"
                   alt=""
                   alt=""
-                />
+                /> -->
               </td>
               </td>
             </tr>
             </tr>
           </table>
           </table>

+ 8 - 2
src/layout/permission.js

@@ -64,14 +64,20 @@ router.beforeEach((to, from, next) => {
             // }
             // }
             // 加载进度条end
             // 加载进度条end
         } else {
         } else {
+            let TenantId = 0
+            if(router.history.pending){
+                TenantId = router.history.pending.query.TenantId
+            }
             localStorage.clear()
             localStorage.clear()
             store.state.tabberLists = []
             store.state.tabberLists = []
             store.state.routes = []
             store.state.routes = []
             store.state.allRoutes = []
             store.state.allRoutes = []
-            next('/login')
+            next({path:'/login',query:{
+                TenantId: TenantId
+            }})
             Message({
             Message({
                 type: 'info',
                 type: 'info',
-                message: '请重新登入'
+                message: '登录已过期,请重新登录'
             });
             });
             // 加载进度条end
             // 加载进度条end
         }
         }

+ 26 - 24
src/layout/structure/content/navBar.vue

@@ -16,7 +16,7 @@
       <img class="avatar" src="@/assets/images/Avatar@2x.png" alt="" />
       <img class="avatar" src="@/assets/images/Avatar@2x.png" alt="" />
       <el-dropdown @command="handleCommand">
       <el-dropdown @command="handleCommand">
         <span class="el-dropdown-link">
         <span class="el-dropdown-link">
-          {{ userName }}<i class="el-icon-arrow-down el-icon--right"></i>
+          {{ userName ? userName : '加载中...' }}<i class="el-icon-arrow-down el-icon--right"></i>
         </span>
         </span>
         <el-dropdown-menu slot="dropdown">
         <el-dropdown-menu slot="dropdown">
           <el-dropdown-item command="a">乌鸦坐飞机</el-dropdown-item>
           <el-dropdown-item command="a">乌鸦坐飞机</el-dropdown-item>
@@ -32,24 +32,31 @@ import cookie from "@/utils/cookie";
 export default {
 export default {
   data() {
   data() {
     return {
     return {
-      userName: "加载中...",
+      // userName: "加载中...",
     };
     };
   },
   },
-  watch: {
-    "$store.state.userInfo"(newval, olval) {
-      console.log(newval);
-      this.userName = newval[0].user.nickName;
-    },
-  },
+  // watch: {
+  //   "$store.state.userInfo"(newval, olval) {
+  //     console.log(newval);
+  //     this.userName = newval[0].user.nickName;
+  //   },
+  // },
   computed: {
   computed: {
     // 菜单栏状态
     // 菜单栏状态
     navStatusCss() {
     navStatusCss() {
       return this.$store.state.navStatus;
       return this.$store.state.navStatus;
     },
     },
+    userName(){
+      if(this.$store.state.userInfo.length){
+        return this.$store.state.userInfo[0].user.nickName
+      }else{
+        return '加载异常'
+      }
+    }
   },
   },
-  mounted() {
-    this.userName = this.$store.state.userInfo[0].user.nickName;
-  },
+  // mounted() {
+  //   this.userName = this.$store.state.userInfo[0].user.nickName;
+  // },
   methods: {
   methods: {
     // 收起or展示菜单栏
     // 收起or展示菜单栏
     changeNavStatus() {
     changeNavStatus() {
@@ -57,21 +64,16 @@ export default {
     },
     },
     //用户下拉功能
     //用户下拉功能
     handleCommand(command) {
     handleCommand(command) {
-      // if (command === "exit") {
-      //   // cookie.delCookie("token");
-      //   this.delCookie("token");
-      //   this.$router.replace({
-      //     path: `/login?TenantId=${sessionStorage.TenantId}`,
-      //   });
-      //   this.$message("退出成功!");
-      // }
+      var self = this;
       switch (command) {
       switch (command) {
         case "exit":
         case "exit":
-          this.delCookie("token");
-          this.$router.replace({
-          path: `/login?TenantId=${sessionStorage.TenantId}`,
-        });
-          this.$message("退出成功!");
+          self.$store.dispatch("outLogin").then(() => {
+            self.delCookie('token')
+            self.$router.replace({
+              path: `/login?TenantId=${sessionStorage.TenantId}`,
+            });
+            self.$message("退出成功!");
+          });
           break;
           break;
         case "a":
         case "a":
           this.$message("乌鸦坐飞机!");
           this.$message("乌鸦坐飞机!");

+ 0 - 1
src/layout/structure/content/renderPage.vue

@@ -34,7 +34,6 @@ export default {
   min-width: 786px;
   min-width: 786px;
   .routerView {
   .routerView {
     max-height: calc(100vh - 120px);
     max-height: calc(100vh - 120px);
-    // background-color: #fff;
     padding: 16px;
     padding: 16px;
     overflow-x: auto;
     overflow-x: auto;
     &::-webkit-scrollbar {
     &::-webkit-scrollbar {

+ 16 - 8
src/store/index.js

@@ -19,7 +19,7 @@ const store = new Vuex.Store({
         routes: [],//新增路由
         routes: [],//新增路由
         allRoutes: [],// 总路由
         allRoutes: [],// 总路由
         userInfo: [],//用户信息
         userInfo: [],//用户信息
-        UserDict:[],//字典数据
+        UserDict: [],//字典数据
     },
     },
     getters: {
     getters: {
         addRouters(state) {
         addRouters(state) {
@@ -45,7 +45,9 @@ const store = new Vuex.Store({
 
 
         },
         },
         userData(state, data) {
         userData(state, data) {
-            state.userInfo.push(data)
+            var a = []
+            a.push(data)
+            state.userInfo = a
         },
         },
         //更新导航栏菜单状态
         //更新导航栏菜单状态
         uploadTabberLists(state, data) {
         uploadTabberLists(state, data) {
@@ -84,17 +86,18 @@ const store = new Vuex.Store({
             }
             }
 
 
         },
         },
-        closeMoreLists(state,data){
-            console.log(data,9999)
+        closeMoreLists(state, data) {
+            console.log(data, 9999)
         },
         },
         delTabberLists(state, option) {
         delTabberLists(state, option) {
+            console.log(option)
             var tabberL = JSON.parse(localStorage['tabberLists'])
             var tabberL = JSON.parse(localStorage['tabberLists'])
             tabberL.splice(option.index, 1)
             tabberL.splice(option.index, 1)
             localStorage['tabberLists'] = JSON.stringify(tabberL)
             localStorage['tabberLists'] = JSON.stringify(tabberL)
             state.tabberLists = tabberL
             state.tabberLists = tabberL
             if (option.path === option.item.path) {
             if (option.path === option.item.path) {
                 if (state.tabberLists.length === 1) {
                 if (state.tabberLists.length === 1) {
-                    router.replace({
+                    router.push({
                         path: '/home'
                         path: '/home'
                     })
                     })
                 } else {
                 } else {
@@ -116,17 +119,22 @@ const store = new Vuex.Store({
             var cval = cookie.getCookie(name);
             var cval = cookie.getCookie(name);
             if (cval != null)
             if (cval != null)
                 document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
                 document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
+            // console.log(cval)
+
         },
         },
-        GetUserDict(state){
+        GetUserDict(state) {
             api.obtaindictdata().then(res => {
             api.obtaindictdata().then(res => {
                 state.UserDict = res.rows
                 state.UserDict = res.rows
             })
             })
-        }
+        },
     },
     },
     actions: {
     actions: {
         outLogin({ commit, state }) {
         outLogin({ commit, state }) {
             return new Promise((resolve, reject) => {
             return new Promise((resolve, reject) => {
-                commit('delCookie', 'token')
+                // commit('delCookie', 'token')
+                state.userInfo = [] 
+                localStorage.removeItem("tabberLists");
+                state.tabberLists = []
                 resolve()
                 resolve()
             })
             })
         },
         },

+ 21 - 13
src/utils/request.js

@@ -2,6 +2,7 @@ import axios from "axios"; //引用axios
 import { Message } from 'element-ui'
 import { Message } from 'element-ui'
 import router from '@/router/index'//引入路由对象
 import router from '@/router/index'//引入路由对象
 import cookie from '@/utils/cookie'
 import cookie from '@/utils/cookie'
+import store from '@/store/index'
 // Vue.use(ElementUI);
 // Vue.use(ElementUI);
 
 
 // axios 配置
 // axios 配置
@@ -47,21 +48,28 @@ service.interceptors.response.use(
             if (response.data.code !== 200) {
             if (response.data.code !== 200) {
                 if (response.data.code === 401) {
                 if (response.data.code === 401) {
                     Message.error('登录状态过期,请重新登录!')
                     Message.error('登录状态过期,请重新登录!')
-                    delCookie('token')
-                    setTimeout(() => {
-                        router.replace({
-                            path: `/login?TenantId=${sessionStorage.TenantId}`
-                        })
-                    }, 1000)
+                    store.dispatch('outLogin').then(() => {
+                        delCookie('token')
+                        setTimeout(() => {
+                            router.replace({
+                                path: `/login?TenantId=${sessionStorage.TenantId}`
+                            })
+                        }, 1000)
+                    })
                 } else if (response.data.code === 503) {
                 } else if (response.data.code === 503) {
                     Message.error(response.data.msg)
                     Message.error(response.data.msg)
-                    delCookie('token')
-                    setTimeout(() => {
-                        router.replace({
-                            path: `/login`,
-                        })
-                    }, 10)
-                }else{
+                    store.dispatch('outLogin').then(() => {
+                        delCookie('token')
+                        if(router.history.current.name == "login"){
+                            return
+                        }
+                        setTimeout(() => {
+                            router.replace({
+                                path: `/login`,
+                            })
+                        }, 10)
+                    })
+                } else {
                     Message.error(response.data.msg)
                     Message.error(response.data.msg)
                     return response.data
                     return response.data
                 }
                 }

+ 1929 - 0
src/view/courseQuestionBank/questionBankManagement copy/index.vue

@@ -0,0 +1,1929 @@
+<template>
+  <div id="questionBankManagement">
+    <search-box :formList="formList" @search="search" @init="init" />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="infoMessage(props.scope.row)"
+          >详情</el-button
+        >
+        <el-button type="text" @click="modify(props.scope.row)">修改</el-button>
+        <el-button type="text" @click="dels(props.scope.row)">删除</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="pageSize"
+      :currentPage="currentPage"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogBox"
+      width="920px"
+      :show-close="false"
+      :destroy-on-close="true"
+      :fullscreen="fullscreen"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Max@2x.png"
+            alt=""
+            @click="fullscreen = !fullscreen"
+          />
+          <img src="@/assets/images/Close@2x.png" alt="" @click="closeBefore" />
+        </div>
+      </div>
+      <el-row class="contentBox" :span="24">
+        <el-col :span="24" class="juscon">
+          <el-steps :active="activeTableStatus">
+            <el-step title="填写题库信息"></el-step>
+            <el-step title="填写章节信息"></el-step>
+          </el-steps>
+        </el-col>
+        <el-col :span="24" v-show="activeTableStatus === 1">
+          <el-col :span="12">
+            <el-col :span="24">
+              <header>题库分类</header>
+              <el-cascader
+                style="width: 100%"
+                v-model="poppleData.categoryId"
+                :options="optionsTion"
+                :size="'medium'"
+                clearable
+                :disabled="statusPop === 2"
+                :props="{
+                  label: 'categoryName',
+                  value: 'categoryId',
+                  checkStrictly: true,
+                  emitPath: false,
+                }"
+              ></el-cascader>
+            </el-col>
+            <el-col :span="24">
+              <header>题库名称:</header>
+              <el-input
+                :disabled="statusPop === 2"
+                placeholder="请输入课程名称"
+                v-model="poppleData.bankName"
+              />
+            </el-col>
+            <el-col :span="24">
+              <header>练习类型:</header>
+              <el-radio-group
+                v-model="poppleData.typeId"
+                :disabled="statusPop === 2 || statusPop === 0"
+                @change="changeisZTpaper"
+              >
+                <el-radio :label="1">普通练习</el-radio>
+                <el-radio :label="2">押题试卷</el-radio>
+                <el-radio :label="3">真题试卷</el-radio>
+              </el-radio-group>
+            </el-col>
+            <el-col :span="24" v-if="isZTpaper">
+              <header>主讲名师</header>
+              <el-select
+                :disabled="statusPop === 2"
+                style="width: 100%"
+                multiple
+                v-model="poppleData.teacherIds"
+                placeholder="请选择主讲名师"
+              >
+                <el-option
+                  v-for="item in optionsTeach"
+                  :key="item.teacherId"
+                  :label="item.teacherName"
+                  :value="item.teacherId"
+                >
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="24">
+              <header>价格:</header>
+              <el-input
+                placeholder="请输入价格"
+                :disabled="statusPop === 2"
+                v-model="poppleData.price"
+              >
+                <template slot="append">元</template>
+              </el-input>
+            </el-col>
+            <el-col :span="24">
+              <header>排序:</header>
+              <el-input-number
+                :disabled="statusPop === 2"
+                v-model="poppleData.sort"
+                controls-position="right"
+                :min="0"
+                placeholder="请输入排序"
+              ></el-input-number>
+            </el-col>
+          </el-col>
+          <el-col :span="12">
+            <el-col :span="24">
+              <header>课程封面:</header>
+              <div class="imgBox">
+                <label class="imgLabel" for="inputs">
+                  <div class="msPhoto" v-if="poppleData.coverUrl">
+                    <img
+                      :src="$methodsTools.splitImgHost(poppleData.coverUrl)"
+                      alt="图片加载失败"
+                    />
+                  </div>
+                  <div class="imgbbx" v-else>
+                    <p style="margin-top: 49px">
+                      点击添加或将文件拖拽到这里上传
+                    </p>
+                    <i class="el-icon-plus"></i>
+                    <p style="margin-bottom: 37px">
+                      图片格式:.jpg/.png/jpeg/bmp
+                    </p>
+                  </div>
+                  <input
+                    :disabled="statusPop === 2"
+                    id="inputs"
+                    type="file"
+                    ref="file"
+                    style="display: none"
+                    @change="getImgFile"
+                  />
+                </label>
+                <p style="color: #999999">请上传比例为16:9且小于2m的图片</p>
+              </div>
+            </el-col>
+            <el-col :span="24">
+              <header>是否启用:</header>
+              <el-radio-group
+                v-model="poppleData.status"
+                :disabled="statusPop === 2"
+              >
+                <el-radio :label="1">是</el-radio>
+                <el-radio :label="0">否</el-radio>
+              </el-radio-group>
+            </el-col>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="24">
+              <header>课程简介:</header>
+              <div
+                style="
+                  max-height: 300px;
+                  overflow-y: auto;
+                  border: 1px solid #e2e2e2;
+                  border-radius: 8px;
+                  padding: 13px;
+                "
+                v-if="statusPop === 2"
+                v-html="poppleData.introduction"
+              ></div>
+              <editor
+                v-else
+                v-model="poppleData.introduction"
+                :min-height="100"
+                :max-height="300"
+                :uploadStatus="uploadStatus"
+              /> </el-col
+          ></el-col>
+        </el-col>
+        <el-col :span="24" v-show="activeTableStatus === 2">
+          <div v-if="showTKtype === 1">
+            <div>
+              <el-button type="primary" @click="changeList({ level: 0 }, 0)"
+                >添加章节</el-button
+              >
+              <el-button>导入章节</el-button>
+            </div>
+            <div>
+              <el-table
+                align="center"
+                ref="pager"
+                :data="tableDatas"
+                style="width: 100%"
+                row-key="id"
+                :load="load"
+                lazy
+                @expand-change="expandChange"
+                :tree-props="{
+                  children: 'children',
+                  hasChildren: 'hasChildren',
+                }"
+                destroy-on-close
+                :key="Math.random()"
+              >
+                <el-table-column type="index" width="50" label="序号">
+                </el-table-column>
+                <el-table-column
+                  v-for="(item, index) in poppleTableHeader"
+                  :key="index"
+                  :label="item.label"
+                  :width="item.width"
+                  align="center"
+                >
+                  <template slot-scope="scope">
+                    <span v-if="item.scope === 'level'">{{
+                      scope.row[item.prop] === 0 ? "章" : "节"
+                    }}</span>
+                    <span v-else>{{ scope.row[item.prop] }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  label="操作"
+                  align="center"
+                  fixed="right"
+                  width="180px"
+                >
+                  <template slot-scope="scope">
+                    <div v-if="scope.row.level === 0">
+                      <el-button type="text" @click="changeList(scope.row, 0)"
+                        >添加下级</el-button
+                      >
+                      <el-button type="text" @click="changeList(scope.row, 1)"
+                        >修改</el-button
+                      >
+                      <el-button type="text" @click="delF(scope.row)"
+                        >删除</el-button
+                      >
+                    </div>
+                    <div v-else>
+                      <el-button type="text" @click="xqpaperTopic(scope.row)"
+                        >详情题目</el-button
+                      >
+                      <el-button type="text" @click="changeList(scope.row, 1)"
+                        >修改</el-button
+                      >
+                      <el-button type="text" @click="delFChild(scope.row)"
+                        >删除</el-button
+                      >
+                    </div>
+                  </template></el-table-column
+                >
+              </el-table>
+              <el-dialog
+                width="520px"
+                :visible.sync="innerVisible"
+                append-to-body
+                :show-close="false"
+                :fullscreen="fullscreenChild"
+                :close-on-click-modal="false"
+              >
+                <div slot="title" class="hearders">
+                  <div class="leftTitle">
+                    {{ int === 0 ? "添加" : "修改" }}
+                  </div>
+                  <div class="rightBoxs">
+                    <img
+                      src="@/assets/images/Max@2x.png"
+                      alt=""
+                      @click="fullscreenChild = !fullscreenChild"
+                    />
+                    <img
+                      src="@/assets/images/Close@2x.png"
+                      alt=""
+                      @click="closeBeforeChild"
+                    />
+                  </div>
+                </div>
+                <el-col :span="24">
+                  <el-col :span="18" style="margin: 30px 0px 10px">
+                    <el-form label-width="150px">
+                      <el-form-item
+                        v-for="(items, indexs) in formTables"
+                        :key="indexs"
+                        :label="items.label"
+                      >
+                        <el-input
+                          v-if="items.scope === 'dis'"
+                          v-model="formTableChild[items.prop]"
+                          :placeholder="items.placeholder"
+                          :disabled="formTableChild.level === 0 ? true : false"
+                        ></el-input>
+                        <el-radio-group
+                          v-else-if="items.scope === 'radio'"
+                          v-model="formTableChild.status"
+                        >
+                          <el-radio :label="1">是</el-radio>
+                          <el-radio :label="0">否</el-radio>
+                        </el-radio-group>
+                        <el-input
+                          v-else
+                          v-model="formTableChild[items.prop]"
+                          :placeholder="items.placeholder"
+                        ></el-input>
+                      </el-form-item>
+                    </el-form>
+                  </el-col>
+                </el-col>
+                <span slot="footer" class="dialog-footer">
+                  <el-button @click="closeBeforeChild">取 消</el-button>
+                  <el-button type="primary" @click="submitChild"
+                    >确 定</el-button
+                  >
+                </span>
+              </el-dialog>
+            </div>
+            <pagination
+              :total="totalChild"
+              :pageSize="pageSizeChild"
+              :currentPage="currentPageChild"
+              @handleSizeChange="handleSizeChangeChild"
+              @handleCurrentChange="handleCurrentChangeChild"
+            />
+          </div>
+          <div v-if="showTKtype === 2">
+            <div>
+              <el-button type="primary" @click="paperAddORChange"
+                >添加试卷</el-button
+              >
+              <el-button>导入试卷</el-button>
+            </div>
+            <div>
+              <el-table
+                ref="pager"
+                :data="tableDataspaper"
+                style="width: 100%"
+                destroy-on-close
+                :key="Math.random()"
+              >
+                <el-table-column
+                  type="index"
+                  width="50"
+                  label="序号"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column
+                  v-for="(item, index) in poppleTableHeaderpaper"
+                  :key="index"
+                  :label="item.label"
+                  :width="item.width"
+                  align="center"
+                >
+                  <template slot-scope="scope">
+                    <span>{{ scope.row[item.prop] }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作" align="center" fixed="right">
+                  <template slot-scope="scope">
+                    <el-button type="text" @click="xqpaperTopic(scope.row)"
+                      >详情题目</el-button
+                    >
+                    <el-button type="text" @click="paperAddORChange(scope.row)"
+                      >修改</el-button
+                    >
+                    <el-button type="text" @click="delPaper(scope.row)"
+                      >删除</el-button
+                    >
+                  </template></el-table-column
+                >
+              </el-table>
+              <el-dialog
+                width="520px"
+                :visible.sync="innerVisiblePaper"
+                append-to-body
+                :show-close="false"
+                :fullscreen="fullscreenChildPaper"
+                :close-on-click-modal="false"
+              >
+                <div slot="title" class="hearders">
+                  <div class="leftTitle">
+                    {{ statusPaperDia === 1 ? "添加" : "修改" }}
+                  </div>
+                  <div class="rightBoxs">
+                    <img
+                      src="@/assets/images/Max@2x.png"
+                      alt=""
+                      @click="fullscreenChildPaper = !fullscreenChildPaper"
+                    />
+                    <img
+                      src="@/assets/images/Close@2x.png"
+                      alt=""
+                      @click="closeBeforeChildPaper"
+                    />
+                  </div>
+                </div>
+                <el-col :span="24">
+                  <el-col :span="18" style="margin: 30px 0px 10px">
+                    <el-form label-width="150px">
+                      <el-form-item
+                        v-for="(items, indexs) in formTablesPaper"
+                        :key="indexs"
+                        :label="items.label"
+                      >
+                        <el-input
+                          v-if="items.scope === 'dis'"
+                          v-model="formTableChildPaper[items.prop]"
+                          :placeholder="items.placeholder"
+                          :disabled="
+                            formTableChildPaper.level === 0 ? true : false
+                          "
+                        ></el-input>
+                        <el-radio-group
+                          v-else-if="items.scope === 'radio'"
+                          v-model="formTableChildPaper.status"
+                        >
+                          <el-radio :label="1">是</el-radio>
+                          <el-radio :label="0">否</el-radio>
+                        </el-radio-group>
+                        <el-input
+                          v-else
+                          v-model="formTableChildPaper[items.prop]"
+                          :placeholder="items.placeholder"
+                        ></el-input>
+                      </el-form-item>
+                    </el-form>
+                  </el-col>
+                </el-col>
+                <span slot="footer" class="dialog-footer">
+                  <el-button @click="closeBeforeChildPaper">取 消</el-button>
+                  <el-button type="primary" @click="submitnewPaper"
+                    >确 定</el-button
+                  >
+                </span>
+              </el-dialog>
+            </div>
+            <pagination
+              :total="totalChildTopic"
+              :pageSize="pageSizeChildTopic"
+              :currentPage="currentPageChildTopic"
+              @handleSizeChange="handleSizeChangeChildTopic"
+              @handleCurrentChange="handleCurrentChangeChildTopic"
+            />
+          </div>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="backTable" v-if="activeTableStatus !== 1"
+          >上一步</el-button
+        >
+        <el-button @click="closeBefore">取 消</el-button>
+        <el-button
+          v-if="activeTableStatus === 1"
+          type="primary"
+          @click="submitTabel"
+          >下一步</el-button
+        ><el-button
+          v-if="activeTableStatus === 2"
+          type="primary"
+          @click="dialogBox = false"
+          >确定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import searchBox from "@/components/searchBox";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+import Editor from "@/components/Editor";
+export default {
+  components: { searchBox, tableList, pagination, Editor },
+  data() {
+    return {
+      uploadStatus: 2, //富文本组件传值
+      loading: false, //当前表单加载是否加载动画
+      isZTpaper: true, //主讲老师列表是否显示
+      navText: {
+        title: "题库合计",
+        index: 0,
+        ch: "个",
+        num: true,
+        choice: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      formTableChild: {},
+      formTableChildPaper: {},
+      formTables: [
+        {
+          label: "名称",
+          prop: "name",
+          placeholder: "输入名称",
+        },
+        {
+          label: "排序",
+          prop: "sort",
+          placeholder: "输入排序",
+        },
+        {
+          label: "是否启用",
+          prop: "status",
+          scope: "radio",
+        },
+      ],
+      formTablesPaper: [
+        {
+          label: "名称",
+          prop: "name",
+          placeholder: "输入名称",
+        },
+        {
+          label: "排序",
+          prop: "sort",
+          placeholder: "输入排序",
+        },
+        {
+          label: "是否启用",
+          prop: "status",
+          scope: "radio",
+        },
+      ], //试卷添加或修改表单
+      tableSet: [
+        {
+          label: "题库名称",
+          prop: "bankName",
+          hidden: true,
+          width: "150px",
+        },
+        {
+          label: "题库类型",
+          prop: "categoryName",
+          hidden: true,
+          width: "150px",
+        },
+        {
+          label: "练习类型",
+          prop: "typeId",
+          hidden: true,
+          scope: "typeId",
+        },
+        {
+          label: "排序",
+          prop: "sort",
+          hidden: true,
+        },
+        {
+          label: "题目个数",
+          prop: "questionNum",
+          hidden: true,
+        },
+        {
+          label: "启用状态",
+          prop: "status",
+          hidden: true,
+          scope: "status",
+        },
+      ], //表头信息
+      showTKtype: 0, //1:章节表格 2:试卷表格
+      tableData: [], //表单数据
+
+      total: 0, //一共多少条
+      pageSize: 10, //每页多少条数据
+      currentPage: 1, //当前页码
+
+      totalChild: 0, //一共多少条
+      pageSizeChild: 5, //每页多少条数据
+      currentPageChild: 1, //当前页码
+
+      totalChildTopic: 0, //一共多少条
+      pageSizeChildTopic: 5, //每页多少条数据
+      currentPageChildTopic: 1, //当前页码
+
+      formList: [
+        {
+          label: "题库名称",
+          prop: "bankName",
+          placeholder: "输入题库名称",
+        },
+        {
+          label: "启用状态",
+          prop: "status",
+          scope: "select",
+          placeholder: "选择启用状态",
+          options: [
+            {
+              label: "启用",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+        {
+          label: "题库类型",
+          prop: "categoryId",
+          scope: "cascader",
+          placeholder: "选择题库类型",
+          options: [],
+          props: {
+            label: "categoryName",
+            value: "categoryId",
+          },
+        },
+        {
+          label: "练习类型",
+          prop: "typeId",
+          scope: "select",
+          placeholder: "选择练习类型",
+          options: [
+            {
+              label: "普通练习",
+              value: 1,
+            },
+            {
+              label: "押题试卷",
+              value: 2,
+            },
+            {
+              label: "真题试卷",
+              value: 3,
+            },
+          ],
+        },
+      ], //搜索栏
+      optionsTion: [],
+      optionsTeach: [],
+      poppleData: {},
+      fullscreen: false,
+      fullscreenChild: false,
+      fullscreenChildPaperTopic: false,
+      dialogBox: false,
+      innerVisible: false,
+      statusPop: 0,
+      beif: "", //备份数据
+      activeTableStatus: 1, //步骤条当前状态
+      tableDatas: [], //表格数据
+      poppleTableHeader: [
+        {
+          label: "名称",
+          prop: "name",
+          width: "150px",
+        },
+        {
+          label: "级别",
+          prop: "level",
+          width: "80px",
+          scope: "level",
+        },
+        {
+          label: "题目数量",
+          prop: "questionNum",
+          width: "150px",
+        },
+        {
+          label: "排序",
+          prop: "sort",
+        },
+      ], //表头数据
+      tableDataspaper: [], //试卷数据
+      poppleTableHeaderpaper: [
+        {
+          label: "名称",
+          prop: "name",
+          width: "150px",
+        },
+        {
+          label: "题目数量",
+          prop: "questionNum",
+          width: "150px",
+        },
+        {
+          label: "排序",
+          prop: "sort",
+        },
+      ], //试卷表头数据
+      innerVisiblePaper: false,
+      fullscreenChildPaper: false,
+      innerVisiblePaperTopic: false,
+      formTablesPaperTopic: [
+        {
+          label: "类型:",
+          prop: "type",
+          scope: "radio",
+          options: [
+            {
+              label: "单选题",
+              value: 1,
+            },
+            {
+              label: "多选题",
+              value: 2,
+            },
+            {
+              label: "判断题",
+              value: 3,
+            },
+            {
+              label: "案例题",
+              value: 4,
+            },
+          ],
+          optionschild: [
+            {
+              label: "单选题",
+              value: 1,
+            },
+            {
+              label: "多选题",
+              value: 2,
+            },
+            {
+              label: "判断题",
+              value: 3,
+            },
+          ],
+        },
+        {
+          label: "题目:",
+          prop: "content",
+          scope: "textarea",
+          placeholder: "请输入题目",
+        },
+        {
+          label: "图片:",
+          prop: "imgUrl",
+          scope: "photo",
+        },
+        {
+          label: "选项",
+          prop: "options",
+          scope: "options",
+        },
+        {
+          label: "正确答案",
+          prop: "asd",
+          scope: "optionsResult",
+        },
+        {
+          label: "答案解析",
+          prop: "analysisContent",
+          scope: "textarea",
+        },
+      ],
+      formTopic: [],
+      int: -1,
+      statusPaperDia: 0, //添加试卷窗口 当前状态为添加1还是修改0
+      treeObj: {},
+      priceTest: /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/,
+    };
+  },
+  mounted() {
+    this.search();
+    this.initCascader();
+    this.initTeacherList();
+  },
+  methods: {
+    changeisZTpaper(v) {
+      if (v === 3) {
+        this.isZTpaper = false;
+      } else {
+        this.isZTpaper = true;
+      }
+    },
+    // 初始化教师列表
+    initTeacherList() {
+      var data = {
+        status: "0,1",
+      };
+      this.$api.inquireCourseTeacher(data).then((res) => {
+        console.log(res);
+        this.optionsTeach = res.rows;
+      });
+    },
+    //级联选择器数据
+    initCascader() {
+      this.$api
+        .inquireProfessionClassification()
+        .then((res) => {
+          this.arrayChangeType(res.rows);
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 接口数据转换级联类型
+    arrayChangeType(options) {
+      let result = [];
+      if (!Array.isArray(options)) {
+        return result;
+      }
+      options.forEach((item) => {
+        delete item.children;
+      });
+      let map = {};
+      options.forEach((item) => {
+        map[item.categoryId] = item;
+      });
+      options.forEach((item) => {
+        let parent = map[item.pid];
+        if (parent) {
+          (parent.children || (parent.children = [])).push(item);
+        } else {
+          result.push(item);
+        }
+      });
+      result = result.sort(this.sortBy("sort", true));
+      result.forEach((item, index) => {
+        if (item.children) {
+          item.children.sort(this.sortBy("sort", true));
+        }
+      });
+      this.formList.forEach((item, index) => {
+        if (item.prop === "categoryId") {
+          item.options = result;
+          this.optionsTion = result;
+        }
+      });
+      return result;
+    },
+    sortBy(attr, rev) {
+      //第二个参数没有传递 默认升序排列
+      if (rev == undefined) {
+        rev = 1;
+      } else {
+        rev = rev ? 1 : -1;
+      }
+
+      return function (a, b) {
+        a = a[attr];
+        b = b[attr];
+        if (a < b) {
+          return rev * -1;
+        }
+        if (a > b) {
+          return rev * 1;
+        }
+        return 0;
+      };
+    },
+    backTable() {
+      if (this.statusPop === 1) {
+        this.statusPop = 0;
+        this.activeTableStatus--;
+      } else {
+        this.activeTableStatus--;
+      }
+    },
+    nextTable() {
+      this.activeTableStatus++;
+    },
+    getImgFile() {
+      var self = this;
+      var file = this.$refs.file.files[0];
+      if (file === undefined) {
+        self.$set(self.poppleData, "coverUrl", "");
+        return;
+      }
+      if (file.size > 2 * 1024 * 1024) {
+        this.$message.error("图片不得大于2MB");
+        return;
+      }
+      var type = this.$refs.file.value.toLowerCase().split(".").splice(-1);
+      if (
+        type[0] != "jpg" &&
+        type[0] != "png" &&
+        type[0] != "jpeg" &&
+        type[0] != "bmp"
+      ) {
+        this.$message.error("上传格式需为:.jpg/.png/.jpeg/bmp");
+        this.$refs.file.value = "";
+        return;
+      }
+      var reader = new FileReader();
+      reader.readAsDataURL(file);
+      reader.onload = function (ev) {
+        self.$set(self.poppleData, "coverUrl", ev.target.result);
+      };
+    },
+    // 试卷题目图片
+    getImgFiletopic(options, childIndex, e) {
+      if (childIndex !== null) {
+        var self = this;
+        var indexNum = -1;
+        var indexChildNum = -1;
+        this.formTopic.forEach((item, index) => {
+          if (item.questionId === options.questionId) {
+            indexNum = index;
+            item.jsonStr.forEach((i, l) => {
+              if (l === childIndex) {
+                indexChildNum = l;
+              }
+            });
+          }
+        });
+        var file = e.target.files[0];
+        if (file === undefined) {
+          self.$set(
+            self.formTopic[indexNum].jsonStr[indexChildNum],
+            "imgUrl",
+            ""
+          );
+          return;
+        }
+        if (file.size > 2 * 1024 * 1024) {
+          this.$message.error("图片不得大于2MB");
+          return;
+        }
+        var type = e.target.value.toLowerCase().split(".").splice(-1);
+        if (
+          type[0] != "jpg" &&
+          type[0] != "png" &&
+          type[0] != "jpeg" &&
+          type[0] != "bmp"
+        ) {
+          this.$message.error("上传格式需为:.jpg/.png/.jpeg/bmp");
+          e.target.value = "";
+          return;
+        }
+        var reader = new FileReader();
+        reader.readAsDataURL(file);
+        reader.onload = function (ev) {
+          self.$set(
+            self.formTopic[indexNum].jsonStr[indexChildNum],
+            "imgUrl",
+            ev.target.result
+          );
+        };
+      } else {
+        var self = this;
+        var indexNum = -1;
+        this.formTopic.forEach((item, index) => {
+          if (item.questionId === options.questionId) {
+            indexNum = index;
+          }
+        });
+        var file = e.target.files[0];
+        if (file === undefined) {
+          self.$set(self.formTopic[indexNum], "imgUrl", "");
+          return;
+        }
+        if (file.size > 2 * 1024 * 1024) {
+          this.$message.error("图片不得大于2MB");
+          return;
+        }
+        var type = e.target.value.toLowerCase().split(".").splice(-1);
+        if (
+          type[0] != "jpg" &&
+          type[0] != "png" &&
+          type[0] != "jpeg" &&
+          type[0] != "bmp"
+        ) {
+          this.$message.error("上传格式需为:.jpg/.png/.jpeg/bmp");
+          e.target.value = "";
+          return;
+        }
+        var reader = new FileReader();
+        reader.readAsDataURL(file);
+        reader.onload = function (ev) {
+          self.$set(self.formTopic[indexNum], "imgUrl", ev.target.result);
+        };
+      }
+    },
+    // 详情
+    infoMessage(options) {
+      var data = options.bankId;
+      this.$api.obtainbank(data).then((res) => {
+        this.poppleData = res.data;
+        if (res.data.typeId === 3) {
+          this.isZTpaper = false;
+        } else {
+          this.isZTpaper = true;
+          this.poppleData.teacherIds = res.data.teacherIds
+            .split(",")
+            .map(Number);
+        }
+        this.beif = res.data.coverUrl;
+      });
+      this.statusPop = 2;
+      this.activeTableStatus = 1;
+      this.dialogBox = true;
+    },
+    //添加
+    addClick() {
+      this.poppleData = {};
+      this.tableDatas = [];
+      this.statusPop = 1;
+      this.activeTableStatus = 1;
+      this.dialogBox = true;
+    },
+    // 修改
+    modify(options) {
+      var data = options.bankId;
+      this.$api.obtainbank(data).then((res) => {
+        console.log(res);
+        this.poppleData = res.data;
+        if (res.data.typeId === 3) {
+          this.isZTpaper = false;
+        } else {
+          this.isZTpaper = true;
+          if (this.poppleData.teacherIds === null) {
+          } else {
+            this.poppleData.teacherIds = res.data.teacherIds
+              .split(",")
+              .map(Number);
+          }
+        }
+        this.beif = res.data.coverUrl;
+      });
+      this.statusPop = 0;
+      this.activeTableStatus = 1;
+      this.dialogBox = true;
+    },
+    //确定提交
+    async submitTabel() {
+      var self = this;
+      if (
+        this.poppleData.categoryId === undefined ||
+        this.poppleData.categoryId === null
+      ) {
+        this.$message.error("请选择题库分类");
+        return;
+      }
+      if (!this.poppleData.bankName) {
+        this.$message.error("请输入题库名称");
+        return;
+      }
+      if (this.poppleData.typeId === undefined) {
+        this.$message.error("请选择练习类型");
+        return;
+      }
+      if (this.poppleData.typeId === 3) {
+        this.poppleData.teacherIds = "";
+      } else {
+        if (
+          !this.poppleData.teacherIds ||
+          this.poppleData.teacherIds.length === 0
+        ) {
+          this.$message.error("请选择主讲名师");
+          return;
+        }
+      }
+      if (this.poppleData.price === undefined) {
+        this.$message.error("请输入价格");
+        return;
+      }
+      if (this.poppleData.sort === undefined) {
+        this.$message.error("请输入排序");
+        return;
+      }
+      if (!this.priceTest.test(this.poppleData.price)) {
+        this.$message.error("请输入正确价格");
+        this.poppleData.price = "";
+        return;
+      }
+      if (!this.poppleData.introduction) {
+        this.$message.error("请输入课程简介");
+        return;
+      }
+      if (this.poppleData.status === undefined) {
+        this.$message.error("请选择是否启用该课程");
+        return;
+      }
+      if (!this.poppleData.coverUrl || this.poppleData.coverUrl.length === 0) {
+        this.$message.error("请上传课程封面");
+        return;
+      }
+      var data = {
+        categoryId: this.poppleData.categoryId,
+        bankName: this.poppleData.bankName,
+        typeId: this.poppleData.typeId,
+        introduction: this.poppleData.introduction,
+        price: this.poppleData.price,
+        status: this.poppleData.status,
+        sort: this.poppleData.sort,
+        teacherIds:
+          this.poppleData.typeId !== 3
+            ? this.poppleData.teacherIds.join(",")
+            : "",
+      };
+      if (this.statusPop === 1) {
+        const awtimg = await this.imgUpload(2);
+        data.coverUrl = this.poppleData.coverUrl;
+        this.submitFun(data);
+      } else if (this.statusPop === 0) {
+        data.bankId = this.poppleData.bankId;
+        if (
+          this.poppleData.coverUrl === this.beif &&
+          this.poppleData.coverUrl.length !== 0
+        ) {
+          this.submitFun(data);
+        } else {
+          const awtimg = await this.imgUpload(2);
+          data.coverUrl = this.poppleData.coverUrl;
+          this.submitFun(data);
+        }
+      } else if (this.statusPop === 2) {
+        if (this.poppleData.typeId === 1) {
+          this.showTKtype = 1;
+          this.getZJList(this.poppleData.bankId).then(() => {
+            this.nextTable();
+          });
+        } else {
+          this.showTKtype = 2;
+          this.getPAPERList(this.poppleData.bankId).then(() => {
+            this.nextTable();
+          });
+        }
+      }
+    },
+    submitFun(data) {
+      if (data.bankId) {
+        this.$api
+          .editbank(data)
+          .then((res) => {
+            console.log(res);
+            this.$message.success("修改成功!");
+            this.search();
+            if (this.poppleData.typeId === 1) {
+              this.showTKtype = 1;
+              this.getZJList(data.bankId).then(() => {
+                this.nextTable();
+              });
+            } else {
+              this.showTKtype = 2;
+              this.getPAPERList(this.poppleData.bankId).then(() => {
+                this.nextTable();
+              });
+            }
+          })
+          .catch((err) => {
+            this.$message.error(err);
+          });
+      } else {
+        this.$api
+          .addbank(data)
+          .then((res) => {
+            this.$message.success("添加成功!");
+            this.search();
+            this.poppleData.bankId = res.log.primary_key_id;
+            if (this.poppleData.typeId === 1) {
+              this.showTKtype = 1;
+              this.getZJList(res.log.primary_key_id).then(() => {
+                this.nextTable();
+              });
+            } else {
+              this.showTKtype = 2;
+              this.getPAPERList(this.poppleData.bankId).then(() => {
+                this.nextTable();
+              });
+            }
+          })
+          .catch((err) => {
+            this.$message.error(err);
+          });
+      }
+    },
+    //获取大章
+    getZJList(index) {
+      var self = this;
+      return new Promise((resolve, reject) => {
+        var data = {
+          bankId: index,
+          status: "0,1",
+          pageSize: this.pageSizeChild,
+          pageNum: this.currentPageChild,
+        };
+        var nullBox = [];
+        this.$api.inquirebankchapterList(data).then((res) => {
+          res.rows.forEach((item) => {
+            item.id = item.bankChapterId + "";
+            item.level = 0;
+            item.hasChildren = true;
+            nullBox.push(item);
+          });
+          nullBox.sort(self.sortBy("sort", true));
+          self.tableDatas = nullBox;
+          self.totalChild = res.total;
+          resolve();
+        });
+      });
+    },
+    //获取试卷
+    getPAPERList(index) {
+      var self = this;
+      return new Promise((resolve, reject) => {
+        var data = {
+          bankId: index,
+          status: "0,1",
+          pageSize: this.pageSizeChildTopic,
+          pageNum: this.currentPageChildTopic,
+        };
+        var nullBox = [];
+        this.$api.inquirebankexamList(data).then((res) => {
+          res.rows.forEach((item) => {
+            // item.id = item.bankChapterId + "";
+            // item.level = 0;
+            item.hasChildren = true;
+            nullBox.push(item);
+          });
+          nullBox.sort(self.sortBy("sort", true));
+          self.tableDataspaper = nullBox;
+          self.totalChildTopic = res.total;
+          resolve();
+        });
+      });
+    },
+    imgUpload(int) {
+      var self = this;
+      return new Promise((resolve, reject) => {
+        this.$upload
+          .upload(this.$refs.file.files[0], int)
+          .then((res) => {
+            self.poppleData.coverUrl = res;
+            resolve();
+          })
+          .catch((err) => {
+            self.$message.error("图片上传错误");
+          });
+      });
+    },
+
+    //删除
+    dels(options) {
+      console.log(options);
+      var self = this;
+      this.$confirm("此操作将删除该课程, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          var data = {
+            bankId: options.bankId,
+            categoryId: options.categoryId,
+            bankName: options.bankName,
+            teacherIds: "",
+            price: options.price,
+            status: -1,
+            typeId: options.typeId,
+          };
+          this.$api
+            .editbank(data)
+            .then((res) => {
+              this.$message.success("删除成功!");
+              this.search();
+            })
+            .catch((err) => {
+              this.$message.error("删除失败:" + err);
+            });
+        })
+        .catch(() => {
+          this.$message("取消删除");
+        });
+    },
+    sortBy(attr, rev) {
+      //第二个参数没有传递 默认升序排列
+      if (rev == undefined) {
+        rev = 1;
+      } else {
+        rev = rev ? 1 : -1;
+      }
+
+      return function (a, b) {
+        a = a[attr];
+        b = b[attr];
+        if (a < b) {
+          return rev * -1;
+        }
+        if (a > b) {
+          return rev * 1;
+        }
+        return 0;
+      };
+    },
+    search(v) {
+      if (v === undefined) {
+        v = {
+          status: "0,1",
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        };
+      }
+      var data = {
+        bankName: v.bankName || "",
+        categoryId: v.categoryId || "",
+        status: v.status === undefined ? "0,1" : v.status,
+        typeId: v.typeId,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      };
+      this.loading = true;
+      this.$api
+        .inquirebankList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+          this.loading = false;
+        })
+        .catch((err) => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search();
+    },
+    //窗口关闭
+    closeBefore() {
+      this.dialogBox = false;
+      this.fullscreen = false;
+      this.poppleData = {};
+    },
+    closeBeforeChild() {
+      this.innerVisible = false;
+      this.fullscreenChild = false;
+      // this.poppleData = {};
+    },
+    closeBeforeChildPaper() {
+      this.innerVisiblePaper = false;
+          this.fullscreenChildPaper = false;
+    },
+    closeBeforeChildPaperTopic() {
+      this.innerVisiblePaperTopic = false;
+          this.innerVisiblePaperTopic = false;
+    },
+    handleSizeChange(v) {
+      this.pageSize = v;
+      this.currentPage = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.currentPage = v;
+      this.search();
+    },
+
+    handleSizeChangeChild(v) {
+      this.pageSizeChild = v;
+      this.currentPageChild = 1;
+      this.getZJList(this.poppleData.bankId);
+    },
+    handleCurrentChangeChild(v) {
+      this.currentPageChild = v;
+      this.getZJList(this.poppleData.bankId);
+    },
+
+    handleSizeChangeChildTopic(v) {
+      this.pageSizeChildTopic = v;
+      this.currentPageChildTopic = 1;
+      this.getPAPERList(this.poppleData.bankId);
+    },
+    handleCurrentChangeChildTopic(v) {
+      this.currentPageChildTopic = v;
+      this.getPAPERList(this.poppleData.bankId);
+    },
+
+    //点击多级触发异步
+    async load(tree, treeNode, resolve) {
+      this.treeObj[tree.bankChapterId] = { tree, treeNode, resolve };
+      var data = {
+        status: "0,1",
+        bankChapterId: tree.bankChapterId,
+      };
+      const loadChildren = await this.$api.inquirebanksectionList(data);
+      if (Array.isArray(loadChildren.rows) && loadChildren.rows.length > 0) {
+        loadChildren.rows.forEach((item) => {
+          item.id = tree.bankChapterId + "." + item.bankSectionId;
+          item.level = 1;
+        });
+        loadChildren.rows.sort(this.sortBy("sort", true));
+        if (loadChildren.rows === 0) {
+          this.$message.warning("暂无下级");
+        }
+        resolve(loadChildren.rows); // 返回最终数据对象
+      } else {
+        tree.children = [];
+        resolve([]);
+      }
+    },
+    //添加or修改章节or子节
+    changeList(row, int) {
+      console.log(row);
+      this.int = int;
+      var kelone = JSON.stringify(row);
+      this.formTableChild = JSON.parse(kelone);
+      if (int === 0 && row.bankId !== undefined) {
+        this.formTableChild = {
+          level: 1,
+          bankId: row.bankId,
+          bankChapterId: row.bankChapterId,
+        };
+      }
+      this.innerVisible = true;
+    },
+    expandChange() {
+      console.log(111);
+    },
+    // 修改子节点
+    changeTableList() {
+      var data = {
+        bankChapterId: this.formTableChild.bankChapterId,
+        bankSectionId: this.formTableChild.bankSectionId,
+        name: this.formTableChild.name,
+        sort: this.formTableChild.sort,
+        status: this.formTableChild.status,
+      };
+      this.$api.editbanksection(data).then((res) => {
+        this.$message.success("修改成功");
+        this.getZJList(this.poppleData.bankId);
+
+        // 处理懒加载节点,先清空再渲染。
+        // 利用refs得到表格的数据结构,拿到 lazyTreeNodeMap 这个懒加载对象。
+        // 这里面存储的就是你之前加载的所有节点数据对象了。然后清空操作节点的父节点对象。
+        this.$refs.pager.store.states.lazyTreeNodeMap[
+          this.formTableChild.bankChapterId
+        ] = [];
+        // 根据我们声明的maps对象,拿到父节点。然后手动进行接口请求,重新进行数据渲染。
+        const { tree, treeNode, resolve } =
+          this.treeObj[this.formTableChild.bankChapterId];
+        this.load(tree, treeNode, resolve);
+        this.innerVisible = false;
+      });
+    },
+
+    //章节操作
+    submitChild() {
+      if (this.formTableChild.name === undefined) {
+        this.$message.error("请输入名字");
+        return;
+      }
+      if (this.formTableChild.sort === undefined) {
+        this.$message.error("请输入排序");
+        return;
+      }
+      if (this.formTableChild.status === undefined) {
+        this.$message.error("请选择是否启用");
+        return;
+      }
+      // int = 0 添加
+      if (this.int === 0) {
+        if (this.formTableChild.bankChapterId) {
+          //添加下级
+          var data = {
+            bankChapterId: this.formTableChild.bankChapterId,
+            name: this.formTableChild.name,
+            sort: this.formTableChild.sort,
+            status: this.formTableChild.status,
+          };
+          this.$api.addbanksection(data).then((res) => {
+            this.$message.success("添加下级成功");
+            this.getZJList(this.poppleData.bankId);
+            if (
+              this.$refs.pager.store.states.lazyTreeNodeMap[
+                this.formTableChild.bankChapterId
+              ] === undefined
+            ) {
+            } else {
+              this.$refs.pager.store.states.lazyTreeNodeMap[
+                this.formTableChild.bankChapterId
+              ] = [];
+              // 根据我们声明的maps对象,拿到父节点。然后手动进行接口请求,重新进行数据渲染。
+              const { tree, treeNode, resolve } =
+                this.treeObj[this.formTableChild.bankChapterId];
+              this.load(tree, treeNode, resolve);
+            }
+            this.innerVisible = false;
+          });
+        } else {
+          // 添加章节
+          var data = {
+            bankId: this.poppleData.bankId,
+            name: this.formTableChild.name,
+            sort: this.formTableChild.sort,
+            status: this.formTableChild.status,
+          };
+          this.$api.addbankchapter(data).then((res) => {
+            this.$message.success("添加成功");
+            this.getZJList(this.poppleData.bankId);
+            this.innerVisible = false;
+          });
+        }
+      }
+      //int = 1 修改
+      if (this.int === 1) {
+        // 章修改
+        if (this.formTableChild.bankSectionId === undefined) {
+          var data = {
+            bankId: this.poppleData.bankId,
+            bankChapterId: this.formTableChild.bankChapterId,
+            name: this.formTableChild.name,
+            sort: this.formTableChild.sort,
+            status: this.formTableChild.status,
+          };
+          this.$api.editbankchapter(data).then((res) => {
+            this.$message.success("修改成功");
+            this.getZJList(this.poppleData.bankId);
+            this.innerVisible = false;
+          });
+        } else {
+          // 节点修改
+          this.changeTableList();
+        }
+      }
+    },
+    delF(row) {
+      this.$confirm("是否确认删除该章?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          var data = {
+            bankId: this.poppleData.bankId,
+            bankChapterId: row.bankChapterId,
+            name: row.name,
+            sort: row.sort,
+            status: -1,
+          };
+          this.$api.editbankchapter(data).then((res) => {
+            this.$message.success("删除成功");
+            this.getZJList(this.poppleData.bankId);
+            this.innerVisible = false;
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    delFChild(rowsz) {
+      this.$confirm("是否确认删除该节?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          var data = {
+            bankChapterId: rowsz.bankChapterId,
+            bankSectionId: rowsz.bankSectionId,
+            name: rowsz.name,
+            sort: rowsz.sort,
+            status: -1,
+          };
+          this.$api.editbanksection(data).then((res) => {
+            this.$message.success("删除成功");
+            this.getZJList(this.poppleData.bankId);
+
+            // 处理懒加载节点,先清空再渲染。
+            // 利用refs得到表格的数据结构,拿到 lazyTreeNodeMap 这个懒加载对象。
+            // 这里面存储的就是你之前加载的所有节点数据对象了。然后清空操作节点的父节点对象。
+            this.$refs.pager.store.states.lazyTreeNodeMap[rowsz.bankChapterId] =
+              [];
+            // 根据我们声明的maps对象,拿到父节点。然后手动进行接口请求,重新进行数据渲染。
+            const { tree, treeNode, resolve } =
+              this.treeObj[rowsz.bankChapterId];
+            this.load(tree, treeNode, resolve);
+            this.innerVisible = false;
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    //添加试卷或修改试卷窗口
+    paperAddORChange(options) {
+      if (options.examId) {
+        // 执行修改操作
+        this.statusPaperDia = 0;
+        this.formTableChildPaper = options;
+      } else {
+        // 执行添加操作
+        this.statusPaperDia = 1;
+        this.formTableChildPaper = {
+          bankId: this.poppleData.bankId,
+        };
+      }
+      this.innerVisiblePaper = true;
+    },
+    //提交试卷修改或添加操作
+    submitnewPaper() {
+      if (!this.formTableChildPaper.name) {
+        this.$message.error("请输入试卷名称");
+        return;
+      }
+      if (this.formTableChildPaper.sort === undefined) {
+        this.$message.error("请输入试卷排序");
+        return;
+      }
+      if (this.formTableChildPaper.status === undefined) {
+        this.$message.error("请选择该试卷是否启用");
+        return;
+      }
+      var data = {
+        bankId: this.formTableChildPaper.bankId,
+        name: this.formTableChildPaper.name,
+        sort: this.formTableChildPaper.sort,
+        status: this.formTableChildPaper.status,
+      };
+      if (this.statusPaperDia === 0) {
+        (data.examId = this.formTableChildPaper.examId),
+          this.$api.editbankexam(data).then(() => {
+            this.$message.success("试卷修改成功!");
+            this.getPAPERList(data.bankId).then((res) => {
+              this.innerVisiblePaper = false;
+            });
+          });
+      }
+      if (this.statusPaperDia === 1) {
+        this.$api.addbankexam(data).then(() => {
+          this.$message.success("试卷添加成功!");
+          this.getPAPERList(data.bankId).then((res) => {
+            this.innerVisiblePaper = false;
+          });
+        });
+      }
+    },
+    delPaper(options) {
+      this.$confirm("此操作将删除该试卷, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          var data = {
+            bankId: options.bankId,
+            examId: options.examId,
+            name: options.name,
+            sort: options.sort,
+            status: -1,
+          };
+          this.$api.editbankexam(data).then(() => {
+            this.$message.success("删除成功!");
+            this.getPAPERList(data.bankId).then((res) => {
+              this.innerVisiblePaper = false;
+            });
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    //查看详情题目
+    xqpaperTopic(v) {
+      console.log(this.poppleData);
+      if (v.bankSectionId) {
+        var data = {
+          bankSectionId: v.bankSectionId,
+        };
+      } else {
+        var data = {
+          examId: v.examId,
+        };
+      }
+      data.typeId = this.poppleData.typeId;
+      this.$router.push({
+        path: "/questionBank",
+        query: data,
+      });
+    },
+    //新增题目
+    addItem(v) {
+      this.formTopic = [{}];
+      this.innerVisiblePaperTopic = true;
+    },
+    resultFormTable(faindex, chilindex) {
+      if (chilindex === null) {
+      } else {
+      }
+    },
+    //新增案例
+    addAnli(options) {
+      console.log(options);
+    },
+    // 删除选项
+    closeThislist(options, index) {
+      this.formTopic.forEach((items, indexs) => {
+        if (items.questionId === options.questionId) {
+          if (items.type === "1") {
+            items.jsonStr.splice(index, 1);
+          } else if (items.type === "2") {
+            items.jsonStr.splice(index, 1);
+          }
+          // this.$set(this.formTopic[indexs],'jsonStr',options.jsonStr)
+        }
+      });
+      console.log(this.formTopic);
+    },
+    // 新增选项
+    addList(options) {
+      var sut = {
+        questionId: options.questionId,
+        imgUrl: null,
+        optionAnswer: 0,
+        status: 1,
+        content: "",
+      };
+      this.formTopic.forEach((item, index) => {
+        if (item.questionId === options.questionId) {
+          item.jsonStr.push(sut);
+        }
+      });
+    },
+    // 单选框选中
+    actionListRadio(fatherNum, childNum) {
+      this.formTopic.forEach((item, index) => {
+        if (item.questionId === fatherNum) {
+          item.jsonStr.forEach((items, indexs) => {
+            if (indexs === childNum) {
+              items.optionAnswer = 1;
+            } else {
+              items.optionAnswer = 0;
+            }
+          });
+        }
+      });
+    },
+    // 复选框改变
+    actionListCheck(fatherNum, childNum, e) {
+      this.formTopic.forEach((item, index) => {
+        if (item.questionId === fatherNum) {
+          item.jsonStr.forEach((items, indexs) => {
+            if (indexs === childNum) {
+              if (items.optionAnswer === 1) {
+                items.optionAnswer = 0;
+              } else {
+                items.optionAnswer = 1;
+              }
+            }
+          });
+        }
+      });
+      console.log(this.formTopic);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-dropdown {
+  color: #409eff;
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__body {
+    padding: 0;
+    .contentBox {
+      padding: 20px 20px 5px;
+      .el-col {
+        padding: 0px 20px;
+        margin-bottom: 30px;
+        header {
+          margin-bottom: 6px;
+          color: #2f4378;
+          font-size: 14px;
+        }
+      }
+      .juscon {
+        float: none;
+        width: 50%;
+        margin: 0 auto;
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+.imgBoxTopic {
+  width: 150px;
+  height: 150px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    background-color: #f9f9f9;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 150px;
+      img {
+        max-width: 100%;
+        max-height: 150px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 8px 0;
+        font-size: 20px;
+      }
+    }
+  }
+}
+.listChildoptions {
+  margin-bottom: 8px;
+  display: flex;
+  align-items: center;
+}
+</style>

+ 98 - 29
src/view/courseQuestionBank/questionBankManagement/index.vue

@@ -12,8 +12,20 @@
         <el-button type="text" @click="infoMessage(props.scope.row)"
         <el-button type="text" @click="infoMessage(props.scope.row)"
           >详情</el-button
           >详情</el-button
         >
         >
-        <el-button type="text" @click="modify(props.scope.row)">修改</el-button>
+        <!-- <el-button type="text" @click="modify(props.scope.row)">修改</el-button> -->
         <el-button type="text" @click="dels(props.scope.row)">删除</el-button>
         <el-button type="text" @click="dels(props.scope.row)">删除</el-button>
+        <el-dropdown @command="handleCommand($event, props.scope.row)">
+          <span
+            class="el-dropdown-link"
+            style="margin-left: 10px; cursor: pointer"
+          >
+            更多
+          </span>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="a">修改题库</el-dropdown-item>
+            <el-dropdown-item command="b">修改章节</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
       </template>
       </template>
     </table-list>
     </table-list>
     <pagination
     <pagination
@@ -45,7 +57,7 @@
         </div>
         </div>
       </div>
       </div>
       <el-row class="contentBox" :span="24">
       <el-row class="contentBox" :span="24">
-        <el-col :span="24" class="juscon">
+        <el-col v-if="!teShu" :span="24" class="juscon">
           <el-steps :active="activeTableStatus">
           <el-steps :active="activeTableStatus">
             <el-step title="填写题库信息"></el-step>
             <el-step title="填写题库信息"></el-step>
             <el-step title="填写章节信息"></el-step>
             <el-step title="填写章节信息"></el-step>
@@ -74,7 +86,7 @@
               <header>题库名称:</header>
               <header>题库名称:</header>
               <el-input
               <el-input
                 :disabled="statusPop === 2"
                 :disabled="statusPop === 2"
-                placeholder="请输入课程名称"
+                placeholder="请输入题库名称"
                 v-model="poppleData.bankName"
                 v-model="poppleData.bankName"
               />
               />
             </el-col>
             </el-col>
@@ -131,7 +143,7 @@
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-col :span="24">
             <el-col :span="24">
-              <header>课程封面:</header>
+              <header>题库封面:</header>
               <div class="imgBox">
               <div class="imgBox">
                 <label class="imgLabel" for="inputs">
                 <label class="imgLabel" for="inputs">
                   <div class="msPhoto" v-if="poppleData.coverUrl">
                   <div class="msPhoto" v-if="poppleData.coverUrl">
@@ -174,7 +186,7 @@
           </el-col>
           </el-col>
           <el-col :span="24">
           <el-col :span="24">
             <el-col :span="24">
             <el-col :span="24">
-              <header>课程简介:</header>
+              <header>题库简介:</header>
               <div
               <div
                 style="
                 style="
                   max-height: 300px;
                   max-height: 300px;
@@ -462,21 +474,24 @@
         </el-col>
         </el-col>
       </el-row>
       </el-row>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
-        <el-button @click="backTable" v-if="activeTableStatus !== 1"
+        <el-button @click="backTable" v-if="activeTableStatus !== 1 && !teShu"
           >上一步</el-button
           >上一步</el-button
         >
         >
         <el-button @click="closeBefore">取 消</el-button>
         <el-button @click="closeBefore">取 消</el-button>
         <el-button
         <el-button
-          v-if="activeTableStatus === 1"
+          v-if="activeTableStatus === 1 && !teShu"
           type="primary"
           type="primary"
           @click="submitTabel"
           @click="submitTabel"
           >下一步</el-button
           >下一步</el-button
         ><el-button
         ><el-button
-          v-if="activeTableStatus === 2"
+          v-if="activeTableStatus === 2 && !teShu"
           type="primary"
           type="primary"
           @click="dialogBox = false"
           @click="dialogBox = false"
           >确定</el-button
           >确定</el-button
         >
         >
+        <el-button v-if="activeTableStatus === 1 && teShu" type="primary" @click="submitTabel"
+          >确定修改</el-button
+        >
       </div>
       </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
@@ -700,6 +715,7 @@ export default {
       innerVisiblePaper: false,
       innerVisiblePaper: false,
       fullscreenChildPaper: false,
       fullscreenChildPaper: false,
       innerVisiblePaperTopic: false,
       innerVisiblePaperTopic: false,
+      teShu: false,
       formTablesPaperTopic: [
       formTablesPaperTopic: [
         {
         {
           label: "类型:",
           label: "类型:",
@@ -1011,6 +1027,51 @@ export default {
       this.activeTableStatus = 1;
       this.activeTableStatus = 1;
       this.dialogBox = true;
       this.dialogBox = true;
     },
     },
+    handleCommand(command, options) {
+      var self = this;
+      if (command === "a") {
+        var data = options.bankId;
+        this.$api.obtainbank(data).then((res) => {
+          this.poppleData = res.data;
+          if (res.data.typeId === 3) {
+            this.isZTpaper = false;
+          } else {
+            this.isZTpaper = true;
+            if (this.poppleData.teacherIds === null) {
+            } else {
+              this.poppleData.teacherIds = res.data.teacherIds
+                .split(",")
+                .map(Number);
+            }
+          }
+          this.beif = res.data.coverUrl;
+        });
+        this.teShu = true;
+        this.statusPop = 0;
+        this.activeTableStatus = 1;
+        this.dialogBox = true;
+      }
+      if (command === "b") {
+        self.poppleData = options;
+        if (self.poppleData.typeId === 1) {
+          self.showTKtype = 1;
+          self.getZJList(options.bankId).then(() => {
+            self.teShu = true;
+            self.statusPop = 0;
+            self.activeTableStatus = 2;
+            self.dialogBox = true;
+          });
+        } else {
+          self.showTKtype = 2;
+          self.getPAPERList(options.bankId).then(() => {
+            self.teShu = true;
+            self.statusPop = 0;
+            self.activeTableStatus = 2;
+            self.dialogBox = true;
+          });
+        }
+      }
+    },
     // 修改
     // 修改
     modify(options) {
     modify(options) {
       var data = options.bankId;
       var data = options.bankId;
@@ -1077,15 +1138,15 @@ export default {
         return;
         return;
       }
       }
       if (!this.poppleData.introduction) {
       if (!this.poppleData.introduction) {
-        this.$message.error("请输入课程简介");
+        this.$message.error("请输入题库简介");
         return;
         return;
       }
       }
       if (this.poppleData.status === undefined) {
       if (this.poppleData.status === undefined) {
-        this.$message.error("请选择是否启用该课程");
+        this.$message.error("请选择是否启用该题库");
         return;
         return;
       }
       }
       if (!this.poppleData.coverUrl || this.poppleData.coverUrl.length === 0) {
       if (!this.poppleData.coverUrl || this.poppleData.coverUrl.length === 0) {
-        this.$message.error("请上传课程封面");
+        this.$message.error("请上传题库封面");
         return;
         return;
       }
       }
       var data = {
       var data = {
@@ -1132,27 +1193,34 @@ export default {
       }
       }
     },
     },
     submitFun(data) {
     submitFun(data) {
+      var self = this;
       if (data.bankId) {
       if (data.bankId) {
-        this.$api
+        self.$api
           .editbank(data)
           .editbank(data)
           .then((res) => {
           .then((res) => {
-            console.log(res);
-            this.$message.success("修改成功!");
-            this.search();
-            if (this.poppleData.typeId === 1) {
-              this.showTKtype = 1;
-              this.getZJList(data.bankId).then(() => {
-                this.nextTable();
-              });
-            } else {
-              this.showTKtype = 2;
-              this.getPAPERList(this.poppleData.bankId).then(() => {
-                this.nextTable();
-              });
+            if (res.code === 200) {
+              self.$message.success("修改成功!");
+              self.search();
+              if (self.teShu) {
+                self.dialogBox = false;
+                self.teShu = false;
+                return;
+              }
+              if (self.poppleData.typeId === 1) {
+                self.showTKtype = 1;
+                self.getZJList(data.bankId).then(() => {
+                  self.nextTable();
+                });
+              } else {
+                self.showTKtype = 2;
+                self.getPAPERList(self.poppleData.bankId).then(() => {
+                  self.nextTable();
+                });
+              }
             }
             }
           })
           })
           .catch((err) => {
           .catch((err) => {
-            this.$message.error(err);
+            self.$message.error(err);
           });
           });
       } else {
       } else {
         this.$api
         this.$api
@@ -1247,7 +1315,7 @@ export default {
     dels(options) {
     dels(options) {
       console.log(options);
       console.log(options);
       var self = this;
       var self = this;
-      this.$confirm("此操作将删除该课程, 是否继续?", "提示", {
+      this.$confirm("此操作将删除该题库, 是否继续?", "提示", {
         confirmButtonText: "确定",
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         cancelButtonText: "取消",
         type: "warning",
         type: "warning",
@@ -1330,6 +1398,7 @@ export default {
     },
     },
     //窗口关闭
     //窗口关闭
     closeBefore() {
     closeBefore() {
+      this.teShu = false
       this.dialogBox = false;
       this.dialogBox = false;
       this.fullscreen = false;
       this.fullscreen = false;
       this.poppleData = {};
       this.poppleData = {};
@@ -1341,11 +1410,11 @@ export default {
     },
     },
     closeBeforeChildPaper() {
     closeBeforeChildPaper() {
       this.innerVisiblePaper = false;
       this.innerVisiblePaper = false;
-          this.fullscreenChildPaper = false;
+      this.fullscreenChildPaper = false;
     },
     },
     closeBeforeChildPaperTopic() {
     closeBeforeChildPaperTopic() {
       this.innerVisiblePaperTopic = false;
       this.innerVisiblePaperTopic = false;
-          this.innerVisiblePaperTopic = false;
+      this.innerVisiblePaperTopic = false;
     },
     },
     handleSizeChange(v) {
     handleSizeChange(v) {
       this.pageSize = v;
       this.pageSize = v;

+ 6 - 0
src/view/examManagement/examArrangement/index.vue

@@ -144,6 +144,12 @@
               v-model="poppleData.examAdress"
               v-model="poppleData.examAdress"
             ></el-input>
             ></el-input>
           </el-form-item>
           </el-form-item>
+          <el-form-item label="官方网站">
+            <el-input
+              :disabled="statusPop === 2"
+              v-model="poppleData.examFromUrl"
+            ></el-input>
+          </el-form-item>
           <el-form-item label="报名网址">
           <el-form-item label="报名网址">
             <el-input
             <el-input
               :disabled="statusPop === 2"
               :disabled="statusPop === 2"

+ 1 - 1
src/view/jobSearchManagement/interviewCalendar/index.vue

@@ -419,7 +419,7 @@ export default {
 .box{
 .box{
   display: flex;
   display: flex;
   width: 100%;
   width: 100%;
-  min-width: 1350px;
+  // min-width: 1350px;
 
 
 }
 }
 .interviewCalendar{
 .interviewCalendar{

+ 8 - 6
src/view/systemSettings/personalCenter/index.vue

@@ -91,7 +91,6 @@ export default {
   },
   },
   methods: {
   methods: {
     init() {
     init() {
-      console.log(this.$store.state.userInfo[0].user);
       this.formLabelAlign = {
       this.formLabelAlign = {
         nickName: this.$store.state.userInfo[0].user.nickName,
         nickName: this.$store.state.userInfo[0].user.nickName,
         userName: this.$store.state.userInfo[0].user.userName,
         userName: this.$store.state.userInfo[0].user.userName,
@@ -108,6 +107,7 @@ export default {
           this.init();
           this.init();
     },
     },
     submit() {
     submit() {
+      var self = this
       var testPhone = /^1[3-9](\d){9}$/;
       var testPhone = /^1[3-9](\d){9}$/;
       if (this.bfdata.userName.length === 0) {
       if (this.bfdata.userName.length === 0) {
         this.$message.error("请输入账号名称");
         this.$message.error("请输入账号名称");
@@ -124,12 +124,14 @@ export default {
       this.bfdata.userId = this.$store.state.userInfo[0].user.userId;
       this.bfdata.userId = this.$store.state.userInfo[0].user.userId;
       this.$api.editsystemuser(this.bfdata).then((res) => {
       this.$api.editsystemuser(this.bfdata).then((res) => {
         if (res.code === 200) {
         if (res.code === 200) {
-          this.$message.success("修改成功!");
-          this.dialogVisible = false;
-          this.init();
+          self.$message.success("修改成功!");
+          self.dialogVisible = false;
+          self.$store.dispatch('GetUserInfo').then(() => {
+            self.init();
+      })
         } else {
         } else {
-          this.dialogVisible = false;
-          this.init();
+          self.dialogVisible = false;
+          self.init();
         }
         }
       });
       });
     },
     },

+ 2 - 2
src/view/userManagement/personalManagement/index.vue

@@ -206,7 +206,7 @@
           style="max-height: 680px; overflow: auto; margin: 20px 0px"
           style="max-height: 680px; overflow: auto; margin: 20px 0px"
         >
         >
           <el-form-item label="学校名称" prop="schoolName">
           <el-form-item label="学校名称" prop="schoolName">
-            <el-select v-model="poppleData2.schoolName" placeholder="请选择">
+            <el-select v-model="poppleData2.schoolName" filterable placeholder="请选择">
               <el-option
               <el-option
                 v-for="item in schoolNameList"
                 v-for="item in schoolNameList"
                 :key="item.value"
                 :key="item.value"
@@ -288,7 +288,7 @@
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
           <el-form-item label="院系" prop="department">
           <el-form-item label="院系" prop="department">
-            <el-select v-model="poppleData2.department" placeholder="请选择">
+            <el-select v-model="poppleData2.department" filterable placeholder="请选择">
               <el-option
               <el-option
                 v-for="item in departmentList"
                 v-for="item in departmentList"
                 :key="item.value"
                 :key="item.value"