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;