wenbobowen 4 年之前
父节点
当前提交
505aefb84c

+ 70 - 39
src/components/newLayout/Head.vue

@@ -34,49 +34,56 @@
       </el-link>
     </el-tooltip>
     <div v-if="userInfo" class="user-info">
-      <a-popover placement="rightBottom" overlay-class-name="head-popover">
+      <a-popover placement="rightBottom" trigger="click" overlay-class-name="head-popover">
         <template #content>
           <div class="user-admin-one">
             <div class="title line">
               <svg-icon icon-class="setting" class="icon" />
               <span class="label">设置</span>
             </div>
-            <div class="item">
-              <div v-if="navTagType === 1" class="label line" @click="setNavTagType(2)">
-                顶部导航
-                <el-tooltip effect="dark" content="当前为左侧导航,点击切换为顶部导航。" placement="top-start">
-                  <i class="el-icon-info" />
-                </el-tooltip>
-              </div>
-              <div v-if="navTagType === 2" class="label line" @click="setNavTagType(1)">
-                侧边导航
-                <el-tooltip effect="dark" content="当前为顶部导航,点击切换为侧边导航。" placement="top-start">
-                  <i class="el-icon-info" />
-                </el-tooltip>
-              </div>
-              <div v-if="openPageHandle === 'self'" class="label line" @click="setOpenPageHandle('blank')">
-                详情页当前标签页打开
-                <el-tooltip effect="dark" content="当前详情页在新标签页打开,点击切换详情页在当前标签页打开。" placement="top-start">
-                  <i class="el-icon-info" />
+            <div class="item mb16">
+              <div class="label line">
+                <el-switch
+                  :value="navTagType === 1"
+                  :size="size"
+                  class="mr10"
+                  @change="setNavTagType(navTagType === 2 ? 1: 2)"
+                />
+                <span class="text">左侧导航</span>
+                <el-tooltip effect="dark" content="可设置为“左侧导航”或“顶部导航”'" placement="top-start">
+                  <i class="el-icon-info" style="vertical-align: text-bottom;" />
                 </el-tooltip>
               </div>
-              <div v-if="openPageHandle === 'blank'" class="label line" @click="setOpenPageHandle('self')">
-                详情页新标签页打开
-                <el-tooltip effect="dark" content="当前详情页在当前标签页打开,点击切换详情页在新标签页打开。" placement="top-start">
-                  <i class="el-icon-info" />
+              <div class="label line">
+                <el-switch
+                  :value="openPageHandle === 'blank'"
+                  :size="size"
+                  class="mr10"
+                  @change="setOpenPageHandle(openPageHandle === 'blank' ? 'self' : 'blank')"
+                />
+                <span class="text">详情页新标签页打开</span>
+                <el-tooltip effect="dark" content="可设置详情页在新标签页打开,或当前标签页打开。" placement="top-start">
+                  <i class="el-icon-info" style="vertical-align: text-bottom;" />
                 </el-tooltip>
               </div>
             </div>
-            <div class="title line" :class="memberCheck && 'clickText'" @click="administratorsJump()">
-              <svg-icon icon-class="admin" class="icon" />
-              <span class="label">管理员</span>
+            <div class="title line clickText" @click="administratorsJump()">
+              <span v-if="memberCheck">
+                <svg-icon icon-class="admin" class="icon" />
+                <span class="label">管理员</span>
+              </span>
             </div>
             <div class="item">
-              <div class="label line">
+              <div class="label">
                 {{ userInfo.name }} {{ userInfo.idap }}
               </div>
-              <div class="label line">
-                <el-button type="primary" plain size="small" @click="layout()">退出登录</el-button>
+              <div class="label">
+                <span class="outLogin">
+                  <!-- <svg-icon icon-class="admin" class="icon mr10" /> -->
+                  <i class="el-icon-switch-button icon" style="margin-right:4px" />
+                  <span class="label">退出</span>
+                </span>
+                <!-- <el-button type="primary" plain size="small" @click="layout()">退出登录</el-button> -->
               </div>
             </div>
             <!-- <div class="user-name">{{ userInfo.name }}</div>
@@ -111,6 +118,7 @@ export default {
   mixins: [websocket],
   data() {
     return {
+      size: 'small',
       headList: routes.filter(item => item.name !== '业务线'),
       userInfo: null,
       memberCheck: false,
@@ -211,6 +219,12 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+.mr10 {
+  margin-right: 10px;
+}
+.mb16 {
+  margin-bottom: 16px;
+}
 .head-wrapper {
   display: flex;
   flex-direction: column;
@@ -302,24 +316,23 @@ export default {
     .icon {
       margin-right: 5px;
       font-size: 12px;
-      color: #93C8FF ;
-    }
-    .label {
-      color: #9A9A9A;
-      font-size: 14px;
+      color: #409EFF;
     }
-  }
-  .clickText {
-    cursor: pointer;
     .label {
       color: #444;
-    }
-    .icon {
-      color: #409EFF;
+      font-size: 14px;
     }
   }
   .line {
     margin-bottom: 10px;
+    min-height: 21px;
+    &.clickText {
+      cursor: pointer;
+      margin-bottom: 16px;
+      .label {
+        color: #409EFF;
+      }
+    }
   }
   .item {
     margin-left: 18px;
@@ -327,6 +340,24 @@ export default {
     .label {
       color: #444;
       font-size: 12px;
+      .text {
+        display: inline-block;
+        vertical-align: bottom;
+        margin-right: 4px
+      }
+    }
+  }
+  .outLogin {
+    display: inline-block;
+    margin-top: 5px;
+    .icon {
+      display: inline-block;
+      color: #409EFF;
+      font-size: 14px;
+    }
+    .label {
+      color: #409EFF;
+      font-size: 14px;
     }
   }
   // width: 95px;

+ 3 - 3
src/views/projectManage/projectList/projectIndex.vue

@@ -443,11 +443,11 @@ export default {
     },
     link_project(id) {
       const bizId_id = EncryptId(`${this.bizId}_${id}`)
-      if (localStorage.getItem('openPageHandle') === 'blank') {
+      if (localStorage.getItem('openPageHandle') === 'self') {
+        this.$router.push({ name: '项目详情', query: { bizId_id: bizId_id }})
+      } else {
         const newTab = this.$router.resolve({ name: '项目详情', query: { bizId_id: bizId_id }})
         window.open(newTab.href, '_blank')
-      } else {
-        this.$router.push({ name: '项目详情', query: { bizId_id: bizId_id }})
       }
     },
     showSelect() {

+ 3 - 3
src/views/projectManage/requirement/list/index.vue

@@ -783,11 +783,11 @@ export default {
     },
     getToRequirementDetails(id) { // table点击跳转
       const bizId_id = EncryptId(`${this.bizId}_${id}`)
-      if (localStorage.getItem('openPageHandle') === 'blank') {
+      if (localStorage.getItem('openPageHandle') === 'self') {
+        this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
+      } else {
         const newTab = this.$router.resolve({ name: '需求详情', query: { bizId_id: bizId_id }})
         window.open(newTab.href, '_blank')
-      } else {
-        this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
       }
     },
     chartSearchFormChange(key, value) {

+ 3 - 3
src/views/projectManage/taskList/taskIndex.vue

@@ -679,11 +679,11 @@ export default {
     },
     link_task(id) {
       const bizId_id = EncryptId(`${this.bizId}_${id}`)
-      if (localStorage.getItem('openPageHandle') === 'blank') {
+      if (localStorage.getItem('openPageHandle') === 'self') {
+        this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
+      } else {
         const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id }})
         window.open(newTab.href, '_blank')
-      } else {
-        this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
       }
     },
     query_Reset() {