123
This commit is contained in:
@@ -56,3 +56,11 @@ export function exportDkCustomer(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function loginOut(id) {
|
||||
return request({
|
||||
url: '/dk/dkCustomer/loginOut',
|
||||
method: 'post',
|
||||
data: {id:id}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -76,3 +76,11 @@ export function authTenantList() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getTenantCurrent() {
|
||||
return request({
|
||||
url: '/auth/tenant/get',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -19,6 +19,15 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户编号" prop="userCode">
|
||||
<el-input
|
||||
v-model="queryParams.userCode"
|
||||
placeholder="请输入用户编号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -26,24 +35,13 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:loading="exportLoading"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['dk:dkCustomer:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dkCustomerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="手机" align="center" prop="phoneNumber"/>
|
||||
<el-table-column label="用户名称" align="center" prop="nickName"/>
|
||||
<el-table-column label="用户编号" align="center" prop="userCode"/>
|
||||
<el-table-column label="真实名称" align="center" prop="realName"/>
|
||||
<el-table-column label="是否实名" align="center" prop="realNameAuth">
|
||||
<template v-slot="scope">
|
||||
@@ -93,29 +91,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后登陆IP" align="center" prop="lastLoginIp"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdateAccount(scope.row)"
|
||||
>修改余额
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@click="handleInfo(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-key"
|
||||
@click="handleUpdatePwd(scope.row)"
|
||||
>重置密码
|
||||
</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleUpdatePwd" icon="el-icon-key">重置密码</el-dropdown-item>
|
||||
<el-dropdown-item command="handleLogoOut" icon="el-icon-close"><span style="color: red">强制APP下线</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -133,12 +129,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listDkCustomer,
|
||||
updateDkCustomer,
|
||||
exportDkCustomer, resetCustomerPwd
|
||||
} from '@/api/dk/dkCustomer'
|
||||
import { yesOrNoList, stopStatusList } from '@/constant/statusMap'
|
||||
import { listDkCustomer, loginOut, resetCustomerPwd, updateDkCustomer } from '@/api/dk/dkCustomer'
|
||||
import { stopStatusList, yesOrNoList } from '@/constant/statusMap'
|
||||
import InfoDialog from './info'
|
||||
import UpdateAmountDialog from './update-amount'
|
||||
import { updateAllowSignature } from '@/api/dk/dkCustomerInfo'
|
||||
@@ -173,6 +165,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userCode: undefined,
|
||||
phoneNumber: undefined,
|
||||
nickName: undefined
|
||||
}
|
||||
@@ -258,6 +251,22 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleLogoOut(row){
|
||||
this.$confirm('是否要强制T该用户下线?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
return loginOut(row.id);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.msgSuccess("操作成功");
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
@@ -274,22 +283,18 @@ export default {
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams
|
||||
this.$confirm('是否确认导出所有客户数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.exportLoading = true
|
||||
return exportDkCustomer(queryParams)
|
||||
}).then(response => {
|
||||
this.download(response.msg)
|
||||
this.exportLoading = false
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
handleCommand(command, row) {
|
||||
switch (command) {
|
||||
case "handleUpdatePwd":
|
||||
this.handleUpdatePwd(row);
|
||||
break;
|
||||
case "handleLogoOut":
|
||||
this.handleLogoOut(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@@ -233,7 +233,9 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" >
|
||||
<template slot="prepend">{{form.prefix+'-'}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -346,6 +348,7 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
|
||||
import { getToken } from "@/utils/auth";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { getTenantCurrent } from '@/api/login'
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
@@ -562,7 +565,14 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
getUser().then(response => {
|
||||
getTenantCurrent().then(res => {
|
||||
if(!res.data){
|
||||
this.$modal.msgWarning("未检测到平台");
|
||||
return;
|
||||
}
|
||||
this.form.prefix = res.data.prefix
|
||||
return getUser()
|
||||
}).then(response => {
|
||||
this.postOptions = response.data.posts;
|
||||
this.roleOptions = response.data.roles;
|
||||
this.open = true;
|
||||
|
||||
Reference in New Issue
Block a user