瀏覽代碼

修改管理后台界面展示效果

huxz 7 年之前
父節點
當前提交
2d80e04301

+ 34 - 0
sso-manage-console-web/src/assets/js/utils.js

@@ -0,0 +1,34 @@
+function formatDate (row, column, value) {
+  if (!value) {
+    return ''
+  }
+
+  const date = new Date(value)
+  let str = ''
+  str += date.getFullYear() + '-'
+  if (date.getMonth() + 1 < 10) {
+    str += '0'
+  }
+  str += (date.getMonth() + 1) + '-'
+  if (date.getDate() < 10) {
+    str += '0'
+  }
+  str += date.getDate() + ' '
+  if (date.getHours() < 10) {
+    str += '0'
+  }
+  str += date.getHours() + ':'
+  if (date.getMinutes() < 10) {
+    str += '0'
+  }
+  str += date.getMinutes() + ':'
+  if (date.getSeconds() < 10) {
+    str += '0'
+  }
+  str += date.getSeconds()
+  return str
+}
+
+export {
+  formatDate
+}

+ 3 - 7
sso-manage-console-web/src/components/accounts/appeals/AppealHome.vue

@@ -61,8 +61,8 @@
         width="100">
         <template slot-scope="scope">
           <span v-if="scope.row.status === 2">已认证</span>
-          <span v-if="scope.row.status === 0">未认证</span>
-          <span v-if="scope.row.status === 1" style="color: #E68615;">待认证</span>
+          <!--<span v-if="scope.row.status === 0">未认证</span>-->
+          <span v-if="scope.row.status === 1" style="color: #E68615;">申诉中</span>
           <span v-if="scope.row.status === 3">未通过</span>
         </template>
       </el-table-column>
@@ -350,11 +350,7 @@
       key: 'AUTHENTICATED',
       value: 2
     }, {
-      label: '未认证',
-      key: 'NOT_APPLYING',
-      value: 0
-    }, {
-      label: '待认证',
+      label: '申诉中',
       key: 'TO_BE_CERTIFIED',
       value: 1
     }, {

+ 2 - 1
sso-manage-console-web/src/components/accounts/enterprises/EnterpriseAdmin.vue

@@ -103,7 +103,7 @@
               const routeLocation = {name: 'UserBasicInfo', params: enterprise.admin, replace: true}
               this.$router.push(routeLocation)
             }
-          } else if (info.label === '申诉状态' && info.value) {
+          } else if (info.label === '申诉状态' && info.value && info.value === '申诉中') {
             info.suffixClass = 'admin-message'
             info.action = () => {
               const routeLocation = {name: 'AppealHome', replace: true}
@@ -160,6 +160,7 @@
           this.$store.commit(types.CHOOSE_ENTERPRISE, userSpace)
 
           this.$message.success('保存成功')
+          this.changeAdminVisible = false
         }
         const error = response => {
           this.$message.error(response)

+ 5 - 2
sso-manage-console-web/src/components/accounts/enterprises/EnterpriseHome.vue

@@ -69,7 +69,8 @@
       </el-table-column>
       <el-table-column
         prop="registerDate"
-        label="注册时间">
+        label="注册时间"
+        :formatter="formatDate">
       </el-table-column>
     </el-table>
   </common-home>
@@ -78,6 +79,7 @@
 <script>
   import _ from 'lodash'
   import axios from '@/assets/js/axios'
+  import { formatDate } from '@/assets/js/utils'
   import * as types from '@/store/mutation-types'
   import {ValidCode} from '@/Constant'
   import CommonHome from '../common/CommonHome'
@@ -168,7 +170,8 @@
         this.$store.commit(types.CHOOSE_ENTERPRISE, row)
         const routeLocation = {name: 'EnterpriseBasicInfo', params: row}
         this.$router.push(routeLocation)
-      }
+      },
+      formatDate: formatDate
     }
   }
 </script>

+ 9 - 0
sso-manage-console-web/src/components/accounts/enterprises/EnterpriseMembers.vue

@@ -20,6 +20,11 @@
             prop="vipName"
             label="用户名称"
             width="110">
+            <template slot-scope="scope">
+              <el-button type="text" size="small" @click="routeToUserDetail(scope.row)">
+                {{ scope.row.vipName }}
+              </el-button>
+            </template>
           </el-table-column>
           <el-table-column
             prop="userUU"
@@ -134,6 +139,10 @@
 
         axios.put(`/api/user/space/${this.enterprise.spaceUU}/unbindUser`, {}, {params}).then(
           success).catch(error)
+      },
+      routeToUserDetail (user) {
+        const routeLocation = {name: 'UserBasicInfo', params: user, replace: true}
+        this.$router.push(routeLocation)
       }
     },
     watch: {

+ 0 - 1
sso-manage-console-web/src/components/accounts/users/UserBasicInfo.vue

@@ -114,7 +114,6 @@
         const success = () => {
           this.isChange = false
           this.$message.success('保存成功')
-          this.$router.go(-1)
         }
         const error = error => {
           this.$message.error(error)

+ 1 - 1
sso-manage-console-web/src/store/modules/enterprises.js

@@ -7,7 +7,7 @@ const state = {
   allApps: []
 }
 
-const validStatus = ['未申请', '申诉中', '已认证', '未通过']
+const validStatus = ['未申请', '申诉中', '未申请', '未申请']
 
 // Getters
 const getters = {