对外API
This commit is contained in:
parent
bd06951627
commit
a5920ee7de
|
@ -31,30 +31,8 @@
|
|||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</form-col>
|
||||
</el-row>
|
||||
<el-row :gutter="12" v-if="!isAdmin">
|
||||
<form-col :span="span" label="所属代理" prop="agentId">
|
||||
<user-input v-model="form.agentId" :text.sync="form.agentName" :query="userQuery"/>
|
||||
</form-col>
|
||||
<form-col :span="span" label="分成比例" prop="point">
|
||||
<el-input v-model="form.point" placeholder="请输入分成比例" type="number">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="提现服务费" prop="withdrawServiceValue">
|
||||
<el-input v-model="form.withdrawServiceValue" placeholder="请输入提现服务费" type="number">
|
||||
<template slot="prepend">
|
||||
<el-select v-model="form.withdrawServiceType" placeholder="请选择提现服务费类型" style="width: 8em">
|
||||
<el-option v-for="dict in dict.type.withdraw_service_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="延迟到账" prop="bonusDelay">
|
||||
<el-input v-model="form.bonusDelay" placeholder="请输入分成延迟到账时长" type="number">
|
||||
<template slot="append">小时</template>
|
||||
</el-input>
|
||||
<form-col :span="span" label="API秘钥" prop="apiSecret">
|
||||
<el-input v-model="form.apiSecret" placeholder="请输入API秘钥" maxlength="32" show-word-limit/>
|
||||
</form-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
@ -67,10 +45,10 @@
|
|||
|
||||
<script>
|
||||
import { addUser, getUser, updateUser } from '@/api/system/user'
|
||||
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||
import UserInput from '@/components/Business/User/UserInput.vue'
|
||||
import FormCol from '@/components/FormCol/index.vue'
|
||||
import { RoleKeys, UserType } from '@/utils/enums'
|
||||
import UserInput from '@/components/Business/User/UserInput.vue'
|
||||
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||
|
||||
export default {
|
||||
name: "UserFormDialog",
|
||||
|
|
|
@ -146,17 +146,10 @@
|
|||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="160"
|
||||
width="200"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope" v-if="scope.row.userId !== '1'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['system:user:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -194,7 +187,6 @@
|
|||
<user-form-dialog
|
||||
:visible.sync="open"
|
||||
:userId="userId"
|
||||
:user-type="userType"
|
||||
@success="getList"
|
||||
ref="userFormDialog"
|
||||
/>
|
||||
|
@ -209,13 +201,13 @@ import {
|
|||
listUser,
|
||||
resetUserPwd
|
||||
} from '@/api/system/user'
|
||||
import FormCol from '@/components/FormCol/index.vue'
|
||||
import { $showColumns } from '@/utils/mixins'
|
||||
import { isEmpty } from '@/utils/index'
|
||||
import UserFormDialog from '@/views/system/user/components/UserFormDialog'
|
||||
import DeptSelect from '@/components/Business/Dept/DeptSelect.vue'
|
||||
import { UserType, WithdrawServiceType } from '@/utils/enums'
|
||||
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||
import DeptSelect from '@/components/Business/Dept/DeptSelect.vue'
|
||||
import FormCol from '@/components/FormCol/index.vue'
|
||||
import { WithdrawServiceType } from '@/utils/enums'
|
||||
import { isEmpty } from '@/utils/index'
|
||||
import { $showColumns } from '@/utils/mixins'
|
||||
import UserFormDialog from '@/views/system/user/components/UserFormDialog'
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
|
@ -270,41 +262,20 @@ export default {
|
|||
},
|
||||
// 列信息
|
||||
columns: [
|
||||
{key: 'userId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'userId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width:"80"},
|
||||
{key: 'nickName', visible: true, label: '姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'userName', visible: true, label: '账号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'roles', visible: true, label: '角色', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'point', visible: true, label: '分成比例', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'withdrawServiceValue', visible: true, label: '提现服务费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'bonusDelay', visible: true, label: '到账延迟', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'balance', visible: true, label: '余额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'isReal', visible: true, label: '实名状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'agentName', visible: true, label: '所属代理', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'deptName', visible: true, label: '归属部门', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
// {key: 'deptName', visible: true, label: '归属部门', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'email', visible: false, label: '邮箱', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'loginIp', visible: true, label: '登录IP', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'loginDate', visible: true, label: '登录时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||
{key: 'loginDate', visible: true, label: '登录时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
userType: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 判断用户类型,若是系统用户,则不显示实名状态、真实姓名、身份证号、分成比例
|
||||
// 若是普通用户,则不显示登录账号
|
||||
this.userType = this.$route.query.userType;
|
||||
if (this.userType == UserType.ADMIN) {
|
||||
this.removeColumn(['isReal', 'realName', 'realIdCard', 'point', 'appName', 'balance', 'withdrawServiceValue', 'bonusDelay']);
|
||||
} else {
|
||||
this.removeColumn(['deptName']);
|
||||
// 非系统管理员,无法查看用户的提现服务费、到账延迟
|
||||
if (!this.isSysAdmin()) {
|
||||
this.removeColumn(['withdrawServiceValue', 'bonusDelay']);
|
||||
}
|
||||
}
|
||||
this.queryParams.userType = this.userType;
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user