Browse Source

Merge branch 'http_test' into qz_daily_0.0.3

qinzhipeng_v@didiglobal.com 4 years ago
parent
commit
8e75a50ddd

+ 42 - 4
src/components/newLayout/Head.vue

@@ -36,7 +36,7 @@
     <div v-if="userInfo" class="user-info">
       <a-popover placement="rightBottom" overlay-class-name="head-popover">
         <template #content>
-          <div class="user-control">
+          <div :class="memberCheck ? 'user-admin-one' : 'user-admin'">
             <div class="user-name">{{ userInfo.name }}</div>
             <div class="line" />
             <div class="user-logout">
@@ -44,10 +44,10 @@
               <el-button v-if="navTagType === 2" type="primary" plain size="small" @click="setNavTagType(1)">侧边导航</el-button>
             </div>
             <div class="line" />
-            <div class="user-logout">
+            <div v-if="memberCheck" class="user-logout">
               <el-button type="primary" plain size="small" @click="administratorsJump()"> 管 理 员 </el-button>
             </div>
-            <div class="line" />
+            <div v-if="memberCheck" class="line" />
             <div class="user-logout">
               <el-button type="primary" plain size="small" @click="layout()">退出登录</el-button>
             </div>
@@ -65,12 +65,14 @@ import websocket from '@/views/workbench/mixins/websocket'
 import { memberGetLoginInMemberInfoByLdap } from '@/api/projectIndex'
 import { logoutUrl } from '@/apiConfig/requestIP.js'
 import { log } from '@/utils/global'
+import { verifyIsAdmin } from '@/api/configure.js'
 export default {
   mixins: [websocket],
   data() {
     return {
       headList: routes.filter(item => item.name !== '业务线'),
       userInfo: null,
+      memberCheck: false,
       target: true
     }
   },
@@ -87,6 +89,7 @@ export default {
   },
   created() {
     this.getLoginUser()
+    this.verifyIsAdmin()
   },
   methods: {
     goto(name) {
@@ -122,6 +125,11 @@ export default {
       const res = await memberGetLoginInMemberInfoByLdap()
       if (res && res.data) this.userInfo = res.data || null
     },
+    // 查看是否为管理员
+    async verifyIsAdmin() {
+      const res = await verifyIsAdmin()
+      if (res.code === 200) this.memberCheck = res.data
+    },
     // 退出登录
     layout() {
       window.location.href = logoutUrl
@@ -233,7 +241,22 @@ export default {
     height: 30px;
   }
 }
-.user-control {
+.user-admin {
+  height: 143px;
+  width: 95px;
+  display: flex;
+  flex-direction: column;
+  display: grid;
+  grid-template-rows: 47px 1px 47px 1px 47px;
+  justify-items: center;
+  align-items: center;
+  .line {
+    width: 100%;
+    height: 1px;
+    background-color: rgba(112, 112, 112, 0.2);
+  }
+}
+.user-admin-one {
   height: 190px;
   width: 95px;
   display: flex;
@@ -248,6 +271,21 @@ export default {
     background-color: rgba(112, 112, 112, 0.2);
   }
 }
+
+// .user-control {
+//   width: 95px;
+//   display: flex;
+//   flex-direction: column;
+//   display: grid;
+//   grid-template-rows: 47px 1px 47px 1px 47px;
+//   justify-items: center;
+//   align-items: center;
+//   .line {
+//     width: 100%;
+//     height: 1px;
+//     background-color: rgba(112, 112, 112, 0.2);
+//   }
+// }
 </style>
 <style lang="scss" scoped>
 .head-popover {

+ 3 - 3
src/views/ToConfigure/components/bizConfigure.vue

@@ -19,8 +19,8 @@
       <i v-if="!isCkEdit" class="el-icon-edit icon-sty" @click="isCkEdit = true" />
     </p>
     <el-radio-group v-model="ckStatus" :disabled="!isCkEdit" class="biz_radio">
-      <el-radio label="0"> 拦截 </el-radio>
-      <el-radio label="1"> 不拦截</el-radio>
+      <el-radio label="1"> 拦截 </el-radio>
+      <el-radio label="0"> 不拦截</el-radio>
     </el-radio-group>
     <el-button v-if="isCkEdit" size="small" class="biz_buttom" @click="cancel"> 取消 </el-button>
     <el-button v-if="isCkEdit" size="small" class="biz_buttom" type="primary" @click="preservation"> 保存 </el-button>
@@ -54,7 +54,7 @@ export default {
       Prohibit: true,
       Schedule: true, // 排期同步望岳
       isCkEdit: false, // checklist编辑
-      ckStatus: '1', // ckecklist状态
+      ckStatus: '0', // ckecklist状态
       bizObj: {},
       num: 30
     }

+ 1 - 4
src/views/projectManage/publishTask/index.vue

@@ -474,7 +474,7 @@ export default {
   .step {
     position: fixed;
     top: 200px;
-    right:100px;
+    right:150px;
   }
   .pubconfig {
     .control {
@@ -496,9 +496,6 @@ export default {
       font-size: 14px;
       margin-bottom: 16px;
       margin-top: 40px;
-      &:first-child {
-        margin-top: 0px;
-      }
     }
   }
 }