Skip to content

Commit

Permalink
Revert "feature: 审计日志中新增人员全名列&导出列表优化&通过excel导入用户组织支持全量更新 (#836)" (#853)
Browse files Browse the repository at this point in the history
This reverts commit a380f25.
  • Loading branch information
wklken authored Dec 16, 2022
1 parent a380f25 commit 0dcec5c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 34 deletions.
17 changes: 0 additions & 17 deletions src/pages/src/components/catalog/home/ImportUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
<span class="text">{{$t('仅支持xls、xlsx格式文件')}}</span>
<span class="template" @click="downloadTemplate"><i class="icon-user-download"></i>{{$t('下载模板')}}</span>
</p>
<p class="tip-wrapper">
<bk-checkbox
v-model="uploadInfo.isOverwrite">
允许对同名用户覆盖更新
</bk-checkbox>
<i class="tip-icon icon-user--l" v-bk-tooltips="{ width: 310, content: $t('导入覆盖提升') }"></i>
</p>
</div>
</template>

Expand All @@ -76,7 +69,6 @@ export default {
name: '',
size: '',
type: false,
isOverwrite: false,
},
};
},
Expand Down Expand Up @@ -124,7 +116,6 @@ export default {
name: '',
size: '',
type: false,
isOverwrite: false,
};
},
// 上传
Expand Down Expand Up @@ -316,12 +307,4 @@ export default {
cursor: pointer;
}
}

.tip-wrapper {
margin-top: 10px;
.tip-icon {
display: inline-block;
transform: translateY(4px);
}
}
</style>
3 changes: 0 additions & 3 deletions src/pages/src/language/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ export default {
最近三个月: 'Last 3 months',
时间: 'Time',
操作人员: 'The operator',
操作用户: 'The operator',
用户全名: 'Full name',
操作对象: 'Action object',
操作类型: 'Operation type',
用户目录管理无权限访问: '【Categories Management】No access authority',
Expand Down Expand Up @@ -448,5 +446,4 @@ export default {
退出登录: 'Log out',
确认退出登录_: '确认退出登录?',
_需要设置新密码: ', You need to set a new password',
导入覆盖提升: 'After checking, it is allowed to edit the personal information of existing users, and the existing user information will face the risk of being modified, so be cautious.',
};
3 changes: 0 additions & 3 deletions src/pages/src/language/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ export default {
最近三个月: '最近三个月',
时间: '时间',
操作人员: '操作人员',
操作用户: '操作用户',
用户全名: '用户全名',
操作对象: '操作对象',
操作类型: '操作类型',
用户目录管理无权限访问: '【用户目录管理】无权限访问',
Expand Down Expand Up @@ -447,5 +445,4 @@ export default {
退出登录: '退出登录',
确认退出登录_: '确认退出登录?',
_需要设置新密码: ',需要设置新密码',
导入覆盖提升: '勾选后,将允许对已经存在用户的个人信息进行编辑操作,现存用户信息将面临被修改风险,谨慎操作。',
};
2 changes: 1 addition & 1 deletion src/pages/src/store/modules/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
},
// eslint-disable-next-line no-unused-vars
ajaxImportUser(_context, params, _config = {}) {
return http.post(`api/v1/web/categories/${params.id}/operations/sync_or_import/?is_overwrite=${params.isOverwrite}`, params.data);
return http.post(`api/v1/web/categories/${params.id}/operations/sync_or_import/`, params.data);
// const mockUrl = `?mock-file=catalog`
// return http.get(mockUrl, config)
},
Expand Down
8 changes: 2 additions & 6 deletions src/pages/src/views/audit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
v-if="panelActive === 'operate'"
class="king-input-search"
style="width: 400px;"
:placeholder="$t('搜索操作用户、操作对象、操作类型')"
:placeholder="$t('搜索操作人员、操作对象、操作类型')"
:clearable="true"
:left-icon="'bk-icon icon-search'"
@clear="handleClear"
Expand Down Expand Up @@ -71,7 +71,6 @@
<tr v-for="(item, index) in auditList" :key="index">
<template v-if="isOperate">
<td><div class="text-overflow-hidden" v-bk-overflow-tips>{{item.operator}}</div></td>
<td><div class="text-overflow-hidden" v-bk-overflow-tips>{{item.display_name || '--'}}</div></td>
<td><div class="text-overflow-hidden">{{item.datetime | convertIsoTime}}</div></td>
<td><div class="text-overflow-hidden" v-bk-overflow-tips>{{item.client_ip}}</div></td>
<td><div class="text-overflow-hidden">{{item.operation}}</div></td>
Expand All @@ -80,7 +79,6 @@
</template>
<template v-else>
<td><div class="text-overflow-hidden">{{item.username}}</div></td>
<td><div class="text-overflow-hidden">{{item.display_name || '--'}}</div></td>
<td><div class="text-overflow-hidden">{{item.datetime | convertIsoTime}}</div></td>
<td><div class="text-overflow-hidden">{{item.client_ip}}</div></td>
<td><div class="text-overflow-hidden" v-bk-tooltips="errorTips(item)">
Expand Down Expand Up @@ -193,8 +191,7 @@ export default {
],
panelActive: 'operate',
auditHead: [
{ key: 'operater', name: this.$t('操作用户') },
{ key: 'operater', name: this.$t('用户全名') },
{ key: 'operater', name: this.$t('操作人员') },
{ key: 'time', name: this.$t('时间') },
{ key: 'IP', name: this.$t('来源 IP') },
{ key: 'type', name: this.$t('操作类型') },
Expand All @@ -204,7 +201,6 @@ export default {
/** 登录审计表头 */
loginHead: [
{ key: 'user', name: this.$t('登录用户') },
{ key: 'user', name: this.$t('用户全名') },
{ key: 'time', name: this.$t('登录时间') },
{ key: 'IP', name: this.$t('登录来源IP') },
{ key: 'status', name: this.$t('登录状态') },
Expand Down
6 changes: 2 additions & 4 deletions src/pages/src/views/catalog/PageHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,8 @@ export default {
return;
}
const formData = new FormData();
const uploadInfo = this.$refs.importUserRef.uploadInfo;
formData.append('file', uploadInfo.fileInfo);
formData.append('file_name', uploadInfo.name);
formData.append('file', this.$refs.importUserRef.uploadInfo.fileInfo);
formData.append('file_name', this.$refs.importUserRef.uploadInfo.name);
formData.append('department_id', this.$refs.importUserRef.id);

// 如果同时有两个目录正在导入,this.importId 会变化,影响 splice loading,所以必须加个变量
Expand All @@ -381,7 +380,6 @@ export default {
try {
await this.$store.dispatch('catalog/ajaxImportUser', {
id: this.importId,
isOverwrite: uploadInfo.isOverwrite,
data: formData,
});
await this.getDepartments();
Expand Down

0 comments on commit 0dcec5c

Please sign in to comment.