From 6707a0c122c489266cd9013439cb464b763d7bc8 Mon Sep 17 00:00:00 2001
From: v_yutyi
Date: Thu, 21 Oct 2021 10:06:33 +0800
Subject: [PATCH] =?UTF-8?q?optimization:=20=E4=B8=AA=E4=BA=BA=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95=E6=97=B6=E9=97=B4?=
=?UTF-8?q?/=E7=BB=84=E7=BB=87=E6=8B=93=E6=89=91=E6=90=9C=E7=B4=A2?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=20#73?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/src/common/demand-import.js | 2 +
.../organization/details/UserMaterial.vue | 14 ++++
src/pages/src/views/organization/index.vue | 11 +++
.../views/organization/table/UserTable.vue | 5 +-
.../views/organization/tree/TreeSearch.vue | 71 +++++++++++++------
5 files changed, 79 insertions(+), 24 deletions(-)
diff --git a/src/pages/src/common/demand-import.js b/src/pages/src/common/demand-import.js
index 24fc74e6a..13959604a 100644
--- a/src/pages/src/common/demand-import.js
+++ b/src/pages/src/common/demand-import.js
@@ -54,6 +54,7 @@ import {
bkTable,
bkTableColumn,
bkTagInput,
+ bkTag,
bkTimePicker,
bkTimeline,
bkTransfer,
@@ -112,6 +113,7 @@ Vue.use(bkTabPanel);
Vue.use(bkTable);
Vue.use(bkTableColumn);
Vue.use(bkTagInput);
+Vue.use(bkTag);
Vue.use(bkTimePicker);
Vue.use(bkTimeline);
Vue.use(bkTransfer);
diff --git a/src/pages/src/views/organization/details/UserMaterial.vue b/src/pages/src/views/organization/details/UserMaterial.vue
index 724956bf2..54d3e49fc 100644
--- a/src/pages/src/views/organization/details/UserMaterial.vue
+++ b/src/pages/src/views/organization/details/UserMaterial.vue
@@ -118,6 +118,20 @@
{{passwordValidDays}}
+
+
{{$t('创建时间')}}
+
:
+
+ {{currentProfile.create_time}}
+
+
+
+
{{$t('最近一次登录时间')}}
+
:
+
+ {{currentProfile.update_time}}
+
+
diff --git a/src/pages/src/views/organization/index.vue b/src/pages/src/views/organization/index.vue
index e88efd222..bd2d300b1 100644
--- a/src/pages/src/views/organization/index.vue
+++ b/src/pages/src/views/organization/index.vue
@@ -325,6 +325,7 @@ import PullUser from './table/PullUser';
import DetailsBar from './details/DetailsBar';
import SetDepartment from '@/components/organization/SetDepartment';
+import moment from 'moment';
export default {
components: {
@@ -548,6 +549,14 @@ export default {
{
key: 'departments',
name: 'departments',
+ },
+ {
+ key: 'create_time',
+ name: 'create_time',
+ },
+ {
+ key: 'update_time',
+ name: 'update_time',
}
);
this.userMessage.tableHeardList = tableHeardList;
@@ -873,6 +882,8 @@ export default {
// 查看当前用户的信息
viewDetails(item) {
+ item.create_time = moment(item.create_time).format('YYYY-MM-DD HH:mm:ss');
+ item.update_time = moment(item.update_time).format('YYYY-MM-DD HH:mm:ss');
this.currentProfile = item;
this.detailsBarInfo.type = 'view';
this.detailsBarInfo.title = this.currentProfile.display_name;
diff --git a/src/pages/src/views/organization/table/UserTable.vue b/src/pages/src/views/organization/table/UserTable.vue
index d5c8df9c1..b19db7464 100644
--- a/src/pages/src/views/organization/table/UserTable.vue
+++ b/src/pages/src/views/organization/table/UserTable.vue
@@ -47,7 +47,7 @@
-
@@ -144,11 +144,12 @@ export default {
currentPage: null, // 当前加载了多少页
pageLimit: 20, // 大于此条数前端分页
lineHeight: 42, // 列表行高
+ labelName: ['id', 'isCheck', 'departments', 'originItem', 'create_time', 'update_time'],
};
},
computed: {
activeTableHeardList() {
- const arr = ['id', 'isCheck', 'departments'];
+ const arr = ['id', 'isCheck', 'departments', 'create_time', 'update_time'];
return this.userMessage.tableHeardList.filter(item => arr.indexOf(item.key) === -1);
},
enumInfo() {
diff --git a/src/pages/src/views/organization/tree/TreeSearch.vue b/src/pages/src/views/organization/tree/TreeSearch.vue
index 54e1a105b..068576400 100644
--- a/src/pages/src/views/organization/tree/TreeSearch.vue
+++ b/src/pages/src/views/organization/tree/TreeSearch.vue
@@ -74,8 +74,12 @@
:key="'department' + index"
:class="{ 'active': (activeType === 'department' && activeIndex === index) }"
@click="handleSelect(item)">
- {{ item.name }}
- {{ getDepartmentDetail(item) }}
+
+ {{ item.name }}
+ {{ getDepartmentDetail(item) }}
+
+ {{ $t('已删除') }}
@@ -98,11 +102,15 @@
:key="'user' + index"
:class="{ 'active': (activeType === 'user' && activeIndex === index) }"
@click="handleSelect(item)">
-
- {{ item.username + '(' + item.display_name + ') ' }}
- {{item.category_name}}
-
- {{ getUserDetail(item) }}
+
+
+ {{ item.username + '(' + item.display_name + ') ' }}
+ {{item.category_name}}
+
+ {{ getUserDetail(item) }}
+
+ {{ getStatus(item.status) }}
@@ -163,6 +171,14 @@ export default {
}
return `${groupName}:${itemInfo[groupType]}`;
},
+ getStatus(status) {
+ switch (status) {
+ case 'LOCKED':
+ return this.$t('已冻结');
+ case 'DISABLED':
+ return this.$t('已禁用');
+ }
+ },
dealDepartmentPath(path) {
const length = path.length;
// 目前的宽度最多展示28个汉字
@@ -536,27 +552,38 @@ export default {
display: block;
padding: 10px 20px 12px;
cursor: pointer;
-
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
&.active,
&:hover {
background: #e1ecff;
}
-
- .item-title {
- margin-bottom: 4px;
- font-weight: bold;
- color: #63656e;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-
- .category-label {
- font-weight: normal;
- background: #f0f1f5;
- padding: 2px 4px;
+ .match-item-left {
+ .item-title {
+ margin-bottom: 4px;
+ font-weight: bold;
+ color: #63656e;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ .category-label {
+ font-weight: normal;
+ background: #f0f1f5;
+ padding: 2px 4px;
+ }
}
}
-
+ .bk-tag {
+ font-size: 13px;
+ height: 30px;
+ line-height: 30px;
+ color: #aaa;
+ background-color: #f2f2f2;
+ padding: 0 20px;
+ border: 1px solid #d7d7d7;
+ }
.item-detail {
overflow: hidden;
text-overflow: ellipsis;
|