|
|
@@ -55,6 +55,15 @@
|
|
|
>
|
|
|
修改
|
|
|
</el-link>
|
|
|
+ <el-link
|
|
|
+ v-if="row.loginName"
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-unlock"
|
|
|
+ @click="toUnBind(row)"
|
|
|
+ >
|
|
|
+ 解绑
|
|
|
+ </el-link>
|
|
|
<el-popconfirm
|
|
|
class="ele-action"
|
|
|
title="确定要删除此用户吗?"
|
|
|
@@ -82,7 +91,7 @@
|
|
|
<script>
|
|
|
import OrgUserSearch from './org-user-search.vue';
|
|
|
import OrgUserEdit from './org-user-edit.vue';
|
|
|
- import { getUserPage , removePersonnel } from '@/api/system/organization';
|
|
|
+ import { getUserPage , removePersonnel , unbindLoginName } from '@/api/system/organization';
|
|
|
|
|
|
export default {
|
|
|
components: { OrgUserSearch, OrgUserEdit },
|
|
|
@@ -161,8 +170,8 @@
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
label: '操作',
|
|
|
- width: 130,
|
|
|
- align: 'center',
|
|
|
+ width: 200,
|
|
|
+ align: 'left',
|
|
|
resizable: false,
|
|
|
slot: 'action',
|
|
|
showOverflowTooltip: true
|
|
|
@@ -202,6 +211,20 @@
|
|
|
this.current = row;
|
|
|
this.showEdit = true;
|
|
|
},
|
|
|
+
|
|
|
+ // 解除绑定
|
|
|
+ toUnBind(row){
|
|
|
+ const loading = this.$loading({ lock: true });
|
|
|
+ unbindLoginName(row.id).then(res=>{
|
|
|
+ loading.close();
|
|
|
+ this.$message.success('解绑成功');
|
|
|
+ this.reload();
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ loading.close();
|
|
|
+ this.$message.error(e.message);
|
|
|
+ });
|
|
|
+ },
|
|
|
/* 删除 */
|
|
|
remove(row) {
|
|
|
const loading = this.$loading({ lock: true });
|