wucl 2 سال پیش
والد
کامیت
d6e6ff3c2a

+ 7 - 6
src/api/modules/message.js

@@ -1,12 +1,13 @@
 import request from '@/utils/request'
 /*
-* 岗位
+* 消息
 */
 export default {
-  sendCode(params) {
-    return request.get(`sms/sendCode`, { params: params })
-  },
-  checkSmsCode(params) {
-    return request.get(`sms/checkSmsCode`, { params: params })
+  notRead() {
+    return request.get(`message/notRead`)
   },
+
+  updateRead(params){
+    return request.get(`message/updateRead/${params}`)
+  }
 }

+ 14 - 1
src/api/modules/user.js

@@ -47,5 +47,18 @@ export default {
   },
   usersByDepartment(params){
     return request.get(`user/departmentName/${params}`)
-  }
+  },
+  validPassword2(params){
+    return request.post(`/user/validSettlePassword/${md5(params)}`)
+  },
+  resetSettlePwd(params){
+    return request.put(`user/resetSettlePassword/${params}`)
+  },
+  modifySettlePass(params){
+    return request.put(`/user/updateSettlePassword`, {
+      originalPassword: md5(params.originalPassword),
+      currentPassword: md5(params.currentPassword),
+      repeatPassword: md5(params.repeatPassword)
+    })
+  },
 }

BIN
src/assets/icon/message.png


BIN
src/assets/images/no-auth.png


BIN
src/assets/images/no-message.png


+ 64 - 1
src/layout/components/AppMain.vue

@@ -1,16 +1,59 @@
 <template>
-  <section class="app-main">
+  <section class="app-main" v-if="show">
     <transition name="fade-transform" mode="out-in">
       <keep-alive :include="cachedViews">
         <router-view :key="key" />
       </keep-alive>
     </transition>
   </section>
+  <section class="app-main" v-else>
+    <el-empty :image="require('../../assets/images/no-auth.png')" :image-size=700 description="Oops! 需要输入查询密码...">
+      <i class="el-icon-edit" :style="iconstyle"  @click="openDig" @mouseover="hoverIcon"></i>
+    </el-empty>
+  </section>
 </template>
 
 <script>
+  import eventBus from '../../utils/eventBus.js'
 export default {
   name: 'AppMain',
+  props:{
+    show:{
+      type: Boolean,
+      require: true,
+      default:true
+    }
+  },
+
+  watch:{
+    show:{
+      handler(newValue,oldValue){
+        const path = this.$route.path;
+        if (newValue && path==='/brokerage/item/settle'){
+          this.getMessageId();
+        }
+      },
+      deep: true,
+      immediate: true
+    },
+    $route: {
+      deep: true,
+      immediate: true,
+      handler() {
+        if (!this.$route.path.startsWith("/brokerage")){
+          this.getMessageId();
+        }else{
+          this.messageId = null;
+        }
+      },
+    },
+  },
+  data(){
+    return {
+      iconstyle:"color:blue;font-size: 20px;",
+      messageId:null,
+    }
+  },
   computed: {
     cachedViews() {
       return this.$store.state.tagsView.cachedViews
@@ -18,6 +61,26 @@ export default {
     key() {
       return this.$route.path
     }
+  },
+
+  mounted(){
+      eventBus.$on("messageId", res=>{
+      this.messageId = res;
+      })
+  },
+
+  methods:{
+    openDig(){
+      eventBus.$emit("openDig",true)
+    },
+    hoverIcon(){
+      this.iconstyle = "color:blue;font-size: 20px; cursor:pointer"
+    },
+
+    getMessageId(){
+      this.$emit('getMessageId', this.messageId)
+    }
+
   }
 }
 </script>

+ 240 - 113
src/layout/components/Navbar.vue

@@ -1,16 +1,44 @@
 <template>
-  <div class="navbar" >
+  <div class="navbar">
     <div class="logclass" @mouseenter="setStatus(true)" @click="setStatus(!showLevel1Status)">
       <img style="width: 18px;" src="../../assets/level.png" alt="">
     </div>
     <div class="titleDiv"><img src="../../assets/images/logo.png" style="height: 50px;margin-top: 5px;"></div>
     <div class="right-menu" background-color="rgba(42,143,227,1)">
+      <el-dropdown class="message-container right-menu-item" trigger="click" placement="bottom-start">
+
+        <div class="message-wrapper-nb">
+          <el-badge :value= messageNum>
+            <img src="../../assets/icon/message.png" class="message" alt="">
+          </el-badge>
+        </div>
+        <el-dropdown-menu slot="dropdown" style="border-radius: 20px;">
+          <el-dropdown-item v-if="messages.length>0">
+            <el-card  class="message-info" shadow="hover"  v-for="(item , id) in messages" :key="id" @click.native="toDetail(item)">
+              <el-badge is-dot class="red-point">
+                <div class="info-icon">
+                  <i class="el-icon-message"></i>
+                </div>
+                <div class="message-title">
+                  {{ item.title }}
+                  <div class="message-time">
+                    {{item.created}}
+                  </div>
+                </div>
+                <div class="message-content">
+                 {{ showMsg(item)}}
+                </div>
+              </el-badge>
+            </el-card>
+          </el-dropdown-item>
+          <el-dropdown-item v-else>
+            <el-empty :image="require('../../assets/images/no-message.png')" :image-size=400 description="还没有消息哟~"></el-empty>
+          </el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper-nb">
-          <img
-            :src="avatar"
-            class="user-avatar"
-          >
+          <img :src="avatar" class="user-avatar">
           <span style="margin-left: 10px;font-size: 14px;">{{ userInfo.name }}</span>
           <i class="el-icon-caret-bottom" />
         </div>
@@ -23,151 +51,250 @@
           </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
-      <img
-        src="../../assets/icon/logout.png"
-        alt=""
-        style="width: 16px;position: absolute;top: 22px;right: 20px;cursor: pointer;"
-        @click="logout"
-      >
+      <img src="../../assets/icon/logout.png" alt=""
+        style="width: 16px;position: absolute;top: 22px;right: 20px;cursor: pointer;" @click="logout">
     </div>
-    <!--<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />-->
   </div>
 </template>
 
 <script>
-  import { mapGetters } from 'vuex'
-  import avatar from '../../assets/icon/avatar.png'
-
-  export default {
-    data() {
-      return {
-        showLevel1Status: false,
-        sysCfg: '',
-        avatar,
-      }
+import { mapGetters } from 'vuex'
+import avatar from '../../assets/icon/avatar.png'
+import eventBus from '../../utils/eventBus.js'
+// import settlePswDig from "./SettlePswDig.vue";
+
+export default {
+
+  props:{
+    messages:{
+      type: Array,
+      require: false,
+      default : []
     },
-    computed: {
-      ...mapGetters([
-        'userInfo',
-      ])
+    messageNum:{
+      type: Number,
+      require: true,
+      default: null
     },
-    methods: {
-      async logout() {
-        await this.$store.dispatch('user/logout');
-        // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
-        this.$router.push(`/login`);
-      },
-      setStatus(data) {
-        this.showLevel1Status = data;
-        this.$emit('getStatus', this.showLevel1Status)
+
+  },
+  data() {
+    return {
+      showLevel1Status: false,
+      sysCfg: '',
+      avatar,
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'userInfo',
+    ]),
+  },
+
+  methods: {
+    async logout() {
+      await this.$store.dispatch('user/logout');
+      // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
+      this.$router.push(`/login`);
+    },
+    setStatus(data) {
+      this.showLevel1Status = data;
+      this.$emit('getStatus', this.showLevel1Status)
+    },
+    showMsg(message){
+      let xMessage ="";
+      if (message.type === 'BUSINESS'){
+        let m = JSON.parse(message.message);
+        xMessage = m.content;
+      }
+      else{
+        xMessage = message.message;
       }
+      if (xMessage.length>28){
+        xMessage =  xMessage.substring(0,28) +"...";
+      }
+      return xMessage;
+    },
+    toDetail(message){
+      eventBus.$emit("messageId",message.id)
+      if (message.type === 'BUSINESS'){
+        let m = JSON.parse(message.message);
+        if (m.bizType === 'MARKET_VISIT_REPLY'){
+          this.$router.push({path:'/market/visit/detail',query:{id:m.bizTableId,activeName:'replyList'}});
+        }
+        if (m.bizType === 'MARKET_LOG_REPLY'){
+          this.$router.push({path:'/market/staff/log'});
+        }
+      }
+
+      if (message.type === 'SETTLE'){
+        eventBus.$emit("openDig",true)
+        this.$router.push({path:'/brokerage/item/settle'});
+      }
+    },
+
+    setRead(messageId){
+      this.$api.message.updateRead(messageId).then(
+        res =>{
+          if (res.code===200){
+            this.$parent.getMessages();
+          }
+        }
+      );
     }
   }
+}
 </script>
 
 <style lang="scss" scoped>
-  @import url('../../styles/menu/menuIcon.css');
-  .logclass {
-    width: 60px;
-    height: 60px;
-    background-color: #4B63F7;
-    box-sizing: border-box;
-    float: left;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-  }
+@import url('../../styles/menu/menuIcon.css');
+
+.logclass {
+  width: 60px;
+  height: 60px;
+  background-color: #4B63F7;
+  box-sizing: border-box;
+  float: left;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 
-  .titleDiv {
-    margin-right: 50px;
-    margin-left: 17px;
-    width: 200px;
+.titleDiv {
+  margin-right: 50px;
+  margin-left: 17px;
+  width: 200px;
+  height: 100%;
+  float: left;
+}
+
+.navbar {
+  height: 60px;
+  overflow: hidden;
+  position: relative;
+  background-color: #fdffff;
+  box-shadow: 0px 2px 5px 0px rgba(153, 153, 153, 0.15);
+
+  .hamburger-container {
+    line-height: 46px;
     height: 100%;
     float: left;
+    cursor: pointer;
+    transition: background .3s;
+    -webkit-tap-highlight-color: transparent;
+
+    &:hover {
+      background: rgba(0, 0, 0, .025)
+    }
   }
 
-  .navbar {
-    height: 60px;
-    overflow: hidden;
-    position: relative;
-    background-color: #fdffff;
-    box-shadow: 0px 2px 5px 0px rgba(153, 153, 153, 0.15);
+  .breadcrumb-container {
+    float: left;
+  }
 
-    .hamburger-container {
-      line-height: 46px;
-      height: 100%;
-      float: left;
-      cursor: pointer;
-      transition: background .3s;
-      -webkit-tap-highlight-color: transparent;
+  .errLog-container {
+    display: inline-block;
+    vertical-align: top;
+  }
 
-      &:hover {
-        background: rgba(0, 0, 0, .025)
-      }
-    }
+  .right-menu {
+    float: right;
+    height: 100%;
+    line-height: 50px;
 
-    .breadcrumb-container {
-      float: left;
+    &:focus {
+      outline: none;
     }
 
-    .errLog-container {
+    .right-menu-item {
       display: inline-block;
-      vertical-align: top;
-    }
-
-    .right-menu {
-      float: right;
+      padding: 0 8px;
       height: 100%;
-      line-height: 50px;
+      font-size: 18px;
+      color: #5a5e66;
+      vertical-align: text-bottom;
+
+      &.hover-effect {
+        cursor: pointer;
+        transition: background .3s;
 
-      &:focus {
-        outline: none;
+        &:hover {
+          /*background: rgba(0, 0, 0, .025)*/
+        }
       }
+    }
 
-      .right-menu-item {
-        display: inline-block;
-        padding: 0 8px;
-        height: 100%;
-        font-size: 18px;
-        color: #5a5e66;
-        vertical-align: text-bottom;
+    .avatar-container {
+      margin-right: 80px;
 
-        &.hover-effect {
+      .avatar-wrapper-nb {
+        margin-top: 5px;
+        position: relative;
+        background-color: #FFFFFF !important;
+        display: flex;
+        align-items: center;
+
+        .user-avatar {
           cursor: pointer;
-          transition: background .3s;
+          width: 40px;
+          height: 40px;
+          border-radius: 50%;
+        }
 
-          &:hover {
-            /*background: rgba(0, 0, 0, .025)*/
-          }
+        .el-icon-caret-bottom {
+          cursor: pointer;
+          position: absolute;
+          right: -20px;
+          top: 20px;
+          font-size: 12px;
         }
       }
+    }
 
-      .avatar-container {
-        margin-right: 80px;
-
-        .avatar-wrapper-nb {
-          margin-top: 5px;
-          position: relative;
-          background-color: #FFFFFF !important;
-          display: flex;
-          align-items: center;
-
-          .user-avatar {
-            cursor: pointer;
-            width: 40px;
-            height: 40px;
-            border-radius: 50%;
-          }
+    .message-container {
 
-          .el-icon-caret-bottom {
-            cursor: pointer;
-            position: absolute;
-            right: -20px;
-            top: 20px;
-            font-size: 12px;
-          }
+      .message-wrapper-nb {
+        margin-top: 15px;
+        position: relative;
+        background-color: #FFFFFF !important;
+        display: flex;
+        align-items: center;
+
+        .message {
+          cursor: pointer;
+          width: 30px;
+          height: 30px;
         }
       }
+
     }
   }
+}
+
+.message-info {
+  width: 400px;
+
+  .message-title {
+    font-weight: bold;
+    .message-time {
+      font-size: xx-small;
+      color: grey;
+      position: relative;
+      float: right;
+      font-weight: normal;
+    }
+  }
+
+  .message-content {
+    font-size: smaller;
+    height: 30px;
+    overflow: hidden;
+    color: grey;
+    width: 350px;
+  }
+}
+.info-icon{
+  float: left;
+  position: relative;
+}
 </style>

+ 83 - 0
src/layout/components/SettlePswDig.vue

@@ -0,0 +1,83 @@
+<template>
+    <div>
+        <el-dialog :visible.sync="isShowProp" width="30%" custom-class="customClass"
+            :before-close="cleanPassword2">
+            <el-card shadow="always">
+                <div>
+                    <el-input v-model="password2" type="password">
+                        <template slot="prepend">请输入查询密码</template>
+                        <el-button slot="append" @mouseover.native="hoverBtn" @mouseleave.native="loseBtn" :style=hoverStyle
+                            @click="validPassword2">确认</el-button>
+                    </el-input>
+                </div>
+            </el-card>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import eventBus from '../../utils/eventBus.js'
+export default {
+    name: "settlePswDig",
+    props: {
+        isShow: {
+            type: Boolean,
+            require: true,
+            default: false
+        },
+
+    },
+    data() {
+        return {
+            password2: null,
+            hoverStyle: null,
+            isShowProp:false,
+            validCache:false
+        }
+    },
+    watch:{
+        isShow:{
+            handler(newValue,oldValue){
+                this.isShowProp = newValue
+            },
+            deep: true,
+            immediate:true
+        }
+    },
+    mounted(){
+        eventBus.$on("openDig", res=>{
+            if (!this.isShowProp){
+                this.isShowProp = res
+            }
+        })
+    },
+    methods: {
+        validPassword2() {
+            const password2 = this.password2;
+            this.$api.user.validPassword2(password2).then(res => {
+                this.password2 = null;
+                if (res.data === true) {
+                    this.$parent.validSettlePsw()
+                }
+            })
+        },
+        cleanPassword2(done) {
+            this.password2 = null;
+            done();
+
+        },
+        hoverBtn() {
+            this.hoverStyle = "background-color:rgb(64,158,255) ;color:white ;font-weight:bold";
+        },
+        loseBtn() {
+            this.hoverStyle = null;
+        },
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+/deep/.customClass{
+    border-radius: 10px;
+  }
+</style>

+ 114 - 110
src/layout/components/Sidebar/level1.vue

@@ -1,146 +1,150 @@
 <template>
   <div class="level1" @click.stop>
     <el-scrollbar wrap-class="scrollbar-wrapper">
-      <el-menu
-        background-color="#4B63F7"
-        :default-active="activeIndex"
-        text-color="#ffffff"
-        active-text-color="#FFFFFF"
-        font-weight="bold"
-      >
+      <el-menu background-color="#4B63F7" :default-active="activeIndex" text-color="#ffffff" active-text-color="#FFFFFF"
+        font-weight="bold">
         <!--        <el-menu-item v-if="$route.path !== '/home/index'" index="99999" @click="handleSelect('/home/index')">首页</el-menu-item>-->
         <!--        <el-menu-item index="99999" @click="handleSelect('/home/index')">首页xx</el-menu-item>-->
-        <el-menu-item
-          v-for="(item) in permission_menus"
-          :key="'id'+item.id"
-          :index="'id'+item.id"
-          @click="menusClick(item)"
-          style="display: flex;align-items: center;position: relative;right: -1px;"
-        >
-          <i :class="'menu-sprites '+item.pcIcon + '2'" style="transform: scale(0.8);margin-right: 14px;"></i>
-          {{item.name}}
+        <el-menu-item v-for="(item) in permission_menus" :key="'id' + item.id" :index="'id' + item.id"
+          @click="menusClick(item)" style="display: flex;align-items: center;position: relative;right: -1px;">
+          <i :class="'menu-sprites ' + item.pcIcon + '2'" style="transform: scale(0.8);margin-right: 14px;"></i>
+          {{ item.name }}
         </el-menu-item>
       </el-menu>
     </el-scrollbar>
+  <!-- <settlePswDig :isShow="isShow" :item="item">
+  </settlePswDig> -->
   </div>
 </template>
 
 <script>
-  import { mapGetters } from 'vuex'
-
-  export default {
-    data() {
-      return {
-        // activeIndex: 'id' + this.permission_menusLevelList[0].id,
-        activeIndex: '',
-        activeItem: {},
-        treeListData: [],
-        levelList: []
-      }
-    },
-    computed: {
-      ...mapGetters([
-        'permission_menus',
-        'permission_menusLevelList'
-      ]),
-    },
-    watch: {
-      permission_menus: {
-        immediate: true, // immediate选项可以开启首次赋值监听
-        deep: true,
-        handler(newv) {
-          if (newv && newv.length && !this.activeIndex) {
-            this.activeItem = newv[0]
-            this.activeIndex = 'id' + this.activeItem.id
-            // this.jumpMenu(this.activeItem)
-          }
+import { mapGetters } from 'vuex'
+export default {
+  props:{
+     pass:{
+      type: Boolean,
+      require: true,
+      default:true
+     }
+  },
+  data() {
+    return {
+      // activeIndex: 'id' + this.permission_menusLevelList[0].id,
+      activeIndex: '',
+      activeItem: {},
+      treeListData: [],
+      levelList: [],
+      // isShow:false,
+      // item:null
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'permission_menus',
+      'permission_menusLevelList'
+    ]),
+  },
+  watch: {
+    permission_menus: {
+      immediate: true, // immediate选项可以开启首次赋值监听
+      deep: true,
+      handler(newv) {
+        if (newv && newv.length && !this.activeIndex) {
+          this.activeItem = newv[0]
+          this.activeIndex = 'id' + this.activeItem.id
+          // this.jumpMenu(this.activeItem)
         }
       }
-    },
-    created() {
-    },
-    methods: {
-      menusClick(item) {
+    }
+  },
+  created() {
+  },
+  methods: {
+  
+    menusClick(item) {
         this.activeItem = item
         this.jumpMenu(item)
         this.$emit('getStatus', false)
-      },
-      jumpMenu(mn) {
-        // 跳转涉及到 menuTree.vue   PermissionButton.vue    login.vue home/index.vue
+    },
+    jumpMenu(mn) {
+      // 跳转涉及到 menuTree.vue   PermissionButton.vue    login.vue home/index.vue
 
-        let jumpItem = null
+      let jumpItem = null
 
-        function tree(data) {
-          if (jumpItem) {
-            return
-          }
-          if (data.menuType === '菜单' && data.pcUrl) {
-            jumpItem = data
-          } else {
-            if (data.children && data.children.length > 0) {
-              data.children.forEach(item => {
-                tree(item)
-              })
-            }
+      function tree(data) {
+        if (jumpItem) {
+          return
+        }
+        if (data.menuType === '菜单' && data.pcUrl) {
+          jumpItem = data
+        } else {
+          if (data.children && data.children.length > 0) {
+            data.children.forEach(item => {
+              tree(item)
+            })
           }
         }
+      }
 
-        tree(mn)
-        // console.log(jumpItem, 'jumpItem')
+      tree(mn)
+      // console.log(jumpItem, 'jumpItem')
 
-        if (jumpItem && jumpItem.pcUrl) {
-          if (jumpItem.external) {
-            if (jumpItem.ifNewTag === false) { // 当前页面
-              this.$router.push({
-                path: jumpItem.pcUrl,
-                query: {
-                  link: jumpItem.outerUrl?encodeURIComponent(jumpItem.outerUrl):''
-                }
-              })
-            } else { // true 或未设置(兼容以前未设置的情况) 新开页面
-              window.open(jumpItem.outerUrl)
-            }
-          } else {
-            if (jumpItem.ifNewTag) { // 必须设为新开才新开,其他都是在当前页面。和上面相反
-              this.$targetNewPage({
-                path: jumpItem.pcUrl,
-                query: {}
-              })
-            } else {
-              this.$router.push({
-                path: jumpItem.pcUrl,
-                query: {}
-              })
-            }
+      if (jumpItem && jumpItem.pcUrl) {
+        if (jumpItem.external) {
+          if (jumpItem.ifNewTag === false) { // 当前页面
+            this.$router.push({
+              path: jumpItem.pcUrl,
+              query: {
+                link: jumpItem.outerUrl ? encodeURIComponent(jumpItem.outerUrl) : ''
+              }
+            })
+          } else { // true 或未设置(兼容以前未设置的情况) 新开页面
+            window.open(jumpItem.outerUrl)
           }
         } else {
-          console.error(new Error('一级未找到菜单'))
+          if (jumpItem.ifNewTag) { // 必须设为新开才新开,其他都是在当前页面。和上面相反
+            this.$targetNewPage({
+              path: jumpItem.pcUrl,
+              query: {}
+            })
+          } else {
+            this.$router.push({
+              path: jumpItem.pcUrl,
+              query: {}
+            })
+          }
         }
+      } else {
+        console.error(new Error('一级未找到菜单'))
       }
     }
   }
+}
 </script>
 <style lang="scss">
-  .level1 {
-    .el-menu-item.is-active {
-      background-color: #4B63F7 !important;
-      &:before {
-        content: '';
-        display: inline-block;
-        width: 2px;
-        height: 100%;
-        background-color: #fff;
-        position: absolute;
-        left: -1px;
-      }
+.level1 {
+  .el-menu-item.is-active {
+    background-color: #4B63F7 !important;
+
+    &:before {
+      content: '';
+      display: inline-block;
+      width: 2px;
+      height: 100%;
+      background-color: #fff;
+      position: absolute;
+      left: -1px;
     }
   }
+}
 </style>
 <style lang="scss" scoped>
-  @import url('../../../styles/menu/menuIcon.css');
-  .level1 {
-    width: 200px;
-    background-color: #1890ff;
-    overflow: hidden;
-  }
+@import url('../../../styles/menu/menuIcon.css');
+
+.level1 {
+  width: 200px;
+  background-color: #1890ff;
+  overflow: hidden;
+}
+
 </style>

+ 62 - 2
src/layout/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="layout-index">
     <div :class="{'fixed-header':true}">
-      <navbar @getStatus="getStatus" />
+      <navbar @getStatus="getStatus" :messages="messages" :messageNum="messageNum" ref="navbar"/>
     </div>
     <!--    <div class="level-box" v-show="showLevel1Status" @click="showLevel1Status = false">-->
     <!--&lt;!&ndash;    <div class="level-box" @click="showLevel1Status = false">&ndash;&gt;-->
@@ -46,9 +46,10 @@
         :class="{'side-right': !sideBarStatus}"
       >
         <tags-view />
-        <app-main />
+        <app-main :show="show" @getMessageId="getMessageId"/>
       </el-scrollbar>
     </div>
+      <SettlePswDig :isShow="!show"/>
   </div>
 </template>
 
@@ -56,6 +57,7 @@
 import { AppMain, Navbar, Sidebar, TagsView } from "./components";
 import { mapGetters, mapState } from "vuex";
 import level1 from "./components/Sidebar/level1";
+import SettlePswDig from "./components/SettlePswDig"
 import $ from "jquery";
 import drawer from "./components/drawer";
 
@@ -68,11 +70,16 @@ export default {
     level1,
     drawer,
     TagsView,
+    SettlePswDig,
   },
   data() {
     return {
       showLevel1Status: false,
       sideBarStatus: true,
+      messages:[],
+      messageNum:null,
+      pass:true,
+      validCache:false
     };
   },
   watch: {
@@ -83,6 +90,13 @@ export default {
         if (!this.$route.meta) {
           this.sideBarStatus = false;
         }
+        let path = this.$route.path;
+        if (path.startsWith("/brokerage")){
+          this.pass = false;
+        }else{
+          this.pass = true;
+          this.validCache = false;
+        }
       },
     },
   },
@@ -91,14 +105,60 @@ export default {
     classObj() {
       return {};
     },
+    show: {
+          get() {
+              console.log(this.pass  || this.validCache)
+              return (this.pass  || this.validCache)
+          },
+          set(){
+              this.pass  || this.validCache
+          }
+        }
+  },
+
+  created(){
+    this.getMessages();
   },
   methods: {
+    validSettlePsw(){
+      this.pass = true;
+      this.validCache = true;
+      const ms = this.messages;
+      if (this.$route.path === '/brokerage/item/settle'){
+          for(let m in ms){
+            if (ms[m].type==='SETTLE'){
+              this.getMessageId(ms[m].id);
+            }
+          }
+      }
+    },
     getStatus(data) {
       this.showLevel1Status = data;
       if (this.$route.query.menuId) {
         this.sideBarStatus = true;
       }
     },
+
+    getMessages(){
+      this.$api.message.notRead().then((res) =>{
+        if (res.code=== 200){
+            this.messages = res.data;
+            if (res.data.length>0){
+              this.messageNum =  res.data.length;
+            }
+            else{
+              this.messageNum = null;
+            }
+        }
+      })
+    },
+
+    getMessageId(messageId){
+      console.log("shoudao messageid")
+      if (messageId){
+        this.$refs.navbar.setRead(messageId);
+      }
+    }
   },
 };
 </script>

+ 2 - 0
src/utils/eventBus.js

@@ -0,0 +1,2 @@
+import vue from 'vue'
+export default  new vue();

+ 1 - 1
src/views/brokerage/deductionTech.vue

@@ -213,7 +213,7 @@
                             <template slot-scope="{row}">
                                 <el-progress type="circle"
                                     :percentage="Math.floor((row.residueAmount / row.brokerageAmount) * 100) / 100 * 100"
-                                    width=50 stroke-width=3 :color="colors"></el-progress>
+                                    :width=50 :stroke-width=3 :color="colors"></el-progress>
                             </template>
                         </el-table-column>
                         <el-table-column label="转入奖金池时间" align="center">

+ 1 - 1
src/views/login/index.vue

@@ -66,7 +66,7 @@
         </el-form-item>
       </el-form>    
     </div>
-    <div class="tag">v2.0.0613</div>
+    <div class="tag">v2.0.0705</div>
   </div>
 </template>
 

+ 1 - 0
src/views/market/visit/detail.vue

@@ -295,6 +295,7 @@
     },
     created() {
       this.listQuery = this.$route.query.listQuery;
+      this.activeName = this.$route.query.activeName;
       this.getCustomer();
       this.getDetail();
       this.getNotRead();

+ 13 - 1
src/views/market/visit/list.vue

@@ -50,6 +50,11 @@
         >重置
         </el-button>
       </template>
+      <template slot="right">
+        <PermissionButton menu-code="_views_visit_export" class-name="filter-item" round type="primary" name="导出"
+          @click="visitExport">
+        </PermissionButton>
+      </template>
       <parentTable
         v-loading="listLoading"
         :data="pageData.records"
@@ -116,7 +121,7 @@
               name=""
               type="primary"
               :page-jump="true"
-              :page-query="{id: row.id,listQuery:listQuery}"
+              :page-query="{id: row.id,listQuery:listQuery,activeName:'first'}"
               round
               size="mini"
             />
@@ -177,6 +182,7 @@
           page: 1,
           size: 10,
           descs: 'id',
+          keyword:null
         },
       }
     },
@@ -197,6 +203,12 @@
       that.getList();
     },
     methods: {
+      visitExport() {
+      this.$utils.exportUtil(
+        "/visit/export", this.listQuery,
+        "导出"
+      );
+    },
       jumpReply(id){
         this.$router.push({path:'/market/visit/reply', query:{bizTableId:id}})
       },

+ 67 - 0
src/views/profile/profile.vue

@@ -133,6 +133,7 @@
                       </el-form-item>
                     </el-col>
                     <el-button type="primary" style="margin-left: 300px" @click="openDialog">修改密码</el-button>
+                    <el-button type="primary" @click="openDialogX">修改提成查询密码</el-button>
                   </el-row>
                   <div style="margin-top:20px;width:100%;height:1px;background:rgba(242,242,242,1);"/>
                   <div style="margin-bottom: 30px">
@@ -284,6 +285,25 @@
         <el-button type="primary" @click="savePass('dialogForm')">修 改</el-button>
       </div>
     </el-dialog>
+    <el-dialog class="dialog" title="修改提成查询密码" :visible.sync="dialogFormVisibleX" :close-on-click-modal="false" width="600px" custom-class="customClass">
+      <el-form :model="dialogFormX" :rules="rules" ref="dialogFormX" label-position="right"
+               label-width="110px"
+               style="width: 400px; margin-left:50px;">
+        <el-form-item label="原查询密码" prop="originalPassword">
+          <el-input v-model="dialogFormX.originalPassword" type="password" autocomplete="off"/>
+        </el-form-item>
+        <el-form-item label="新查询密码" prop="currentPassword">
+          <el-input v-model="dialogFormX.currentPassword" type="password" autocomplete="off"/>
+        </el-form-item>
+        <el-form-item label="确认密码" prop="repeatPassword">
+          <el-input v-model="dialogFormX.repeatPassword" type="password" autocomplete="off"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisibleX = false">取 消</el-button>
+        <el-button type="primary" @click="saveSettlePass('dialogFormX')">修 改</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -297,6 +317,7 @@
     data() {
       return {
         dialogFormVisible:false,
+        dialogFormVisibleX:false,
         type: 'detail',
         postForm: {
           userPosts: [],
@@ -315,6 +336,11 @@
           currentPassword: '',
           repeatPassword: '',
         },
+        dialogFormX:{
+          originalPassword: '',
+          currentPassword: '',
+          repeatPassword: '',
+        },
         rules: {
           originalPassword: [{
             required: true,
@@ -371,6 +397,9 @@
       openDialog(){
         this.dialogFormVisible = true;
       },
+      openDialogX(){
+        this.dialogFormVisibleX = true;
+      },
       savePass(formName) {
         this.$refs[formName].validate((valid) => {
           if (valid) {
@@ -409,6 +438,44 @@
           }
         })
       },
+      saveSettlePass(formName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            if (this.dialogFormX.currentPassword.length!=8){
+              this.$notify({
+                title: '错误',
+                message: '新密码必须是8位字符',
+                type: 'error',
+                duration: 3000
+              });
+              return
+            }
+            if (this.dialogFormX.currentPassword != this.dialogFormX.repeatPassword){
+              this.$notify({
+                title: '错误',
+                message: '两次输入的密码不一致,请检查。',
+                type: 'error',
+                duration: 3000
+              });
+              return
+            }
+            this.$api.user.modifySettlePass(this.dialogFormX).then(res => {
+              if (res.code === 200) {
+                this.$notify({
+                  title: '成功',
+                  message: '修改提成查询密码成功',
+                  type: 'success',
+                  duration: 2000
+                })
+                this.dialogFormVisibleX = false
+              }
+            })
+          } else {
+            console.log('error submit!!')
+            return false
+          }
+        })
+      },
     }
   }
 </script>

+ 20 - 0
src/views/staff/detail.vue

@@ -136,6 +136,7 @@
                       </el-form-item>
                     </el-col>
                     <el-button type="danger" style="margin-left: 300px" @click="initPassword">重置密码</el-button>
+                    <el-button type="danger" @click="initSettlePassword">重置提成查询密码</el-button>
                   </el-row>
                   <div style="margin-top:20px;width:100%;height:1px;background:rgba(242,242,242,1);"/>
                   <div style="margin-bottom: 30px">
@@ -315,6 +316,25 @@
       }
     },
     methods: {
+      initSettlePassword(){
+        this.$confirm('确认重置提成查询密码, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$api.user.resetSettlePwd(this.postForm.id).then(res => {
+            if (res.code === 200) {
+              this.$notify({
+                title: '成功',
+                message: '重置提成查询密码成功。',
+                type: 'success',
+                duration: 2000
+              })
+            }
+          })
+        }).catch(() => {
+        })
+      },
       initPassword() {
         this.$confirm('确认初始密码, 是否继续?', '提示', {
           confirmButtonText: '确定',