111
This commit is contained in:
parent
f400b8dc52
commit
6d5c289044
|
@ -217,6 +217,34 @@ export const dynamicRoutes = [
|
|||
meta: { title: '店铺详情', activeMenu: '/system/store' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/equipment',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:equipment:query'],
|
||||
children: [
|
||||
{
|
||||
path: 'detail/:equipmentId(\\d+)',
|
||||
component: () => import('@/views/system/equipment/equipment_detail'),
|
||||
name: 'EquipmentDetail',
|
||||
meta: { title: '设施详情', activeMenu: '/system/equipment' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:user:query'],
|
||||
children: [
|
||||
{
|
||||
path: 'detail/:userId(\\d+)',
|
||||
component: () => import('@/views/user/user/detail'),
|
||||
name: 'UserDetail',
|
||||
meta: { title: '用户详情', activeMenu: '/user/user' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@
|
|||
<div slot="header" class="card-header">
|
||||
<span>设备信息</span>
|
||||
<div class="action-buttons">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
@click="toggleEdit"
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
@click="toggleEdit"
|
||||
v-if="!isEditing">
|
||||
修改
|
||||
</el-button>
|
||||
<template v-else>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
@click="handleSave">
|
||||
保存
|
||||
</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-close"
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-close"
|
||||
@click="handleCancel">
|
||||
取消
|
||||
</el-button>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<el-input v-model="editForm.model" size="small" class="edit-input" disabled></el-input>
|
||||
</template>
|
||||
<el-tag v-else size="small" type="primary">{{ deviceData.model || '--' }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="info-item">
|
||||
|
@ -171,7 +171,7 @@
|
|||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
<el-card class="info-card" shadow="always">
|
||||
<div slot="header" class="card-header">
|
||||
<span>物联网信息</span>
|
||||
|
@ -318,8 +318,7 @@
|
|||
</el-tab-pane>
|
||||
<el-tab-pane label="订单列表" name="orders">订单列表内容</el-tab-pane>
|
||||
<el-tab-pane label="命令日志" name="logs">命令日志内容</el-tab-pane>
|
||||
<el-tab-pane label="抄表记录" name="readings">抄表记录内容</el-tab-pane>
|
||||
<el-tab-pane label="绑定/解绑记录" name="bindings">绑定/解绑记录内容</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -560,7 +559,7 @@ export default {
|
|||
|
||||
.el-button {
|
||||
margin-left: 0;
|
||||
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
@ -643,7 +642,7 @@ export default {
|
|||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
p {
|
||||
margin-top: 10px;
|
||||
color: #606266;
|
||||
|
@ -676,7 +675,7 @@ export default {
|
|||
th, td {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
|
||||
.cell {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
@ -713,7 +712,7 @@ export default {
|
|||
.el-button {
|
||||
padding: 7px 15px;
|
||||
font-size: 12px;
|
||||
|
||||
|
||||
&--mini {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
@ -723,7 +722,7 @@ export default {
|
|||
// 表单项间距
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
@ -738,7 +737,7 @@ export default {
|
|||
.el-tag {
|
||||
margin-right: 8px;
|
||||
margin-bottom: 5px;
|
||||
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
@ -754,7 +753,7 @@ export default {
|
|||
.loading {
|
||||
position: relative;
|
||||
min-height: 200px;
|
||||
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
|
@ -766,4 +765,4 @@ export default {
|
|||
z-index: 1000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -71,14 +71,14 @@
|
|||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed label="MAC-2" prop="mac2" width="150" align="center">
|
||||
<el-table-column label="MAC-2" prop="mac2" width="150" align="center">
|
||||
<template slot-scope="d">
|
||||
<router-link :to="'/system/deviceDetail/index/' + d.row.deviceId" class="link-type">
|
||||
<span>{{ d.row.mac2 }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed label="SN" prop="sn" width="150" align="center">
|
||||
<el-table-column label="SN" prop="sn" width="150" align="center">
|
||||
<template slot-scope="d">
|
||||
<router-link :to="'/system/deviceDetail/index/' + d.row.deviceId" class="link-type">
|
||||
<span>{{ d.row.sn }}</span>
|
||||
|
@ -92,8 +92,17 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="column of showColumns">
|
||||
<el-table-column :key="column.key" :label="column.label" :prop="column.key" :align="column.align"
|
||||
:width="column.width" :sort-orders="orderSorts" :sortable="column.sortable" class="no-wrap-column">
|
||||
<el-table-column
|
||||
:key="column.key"
|
||||
:label="column.label"
|
||||
:prop="column.key"
|
||||
:align="column.align"
|
||||
:min-width="column.minWidth"
|
||||
:sort-orders="orderSorts"
|
||||
:sortable="column.sortable"
|
||||
:show-overflow-tooltip="column.overflow"
|
||||
:width="column.width"
|
||||
>
|
||||
<template slot-scope="d">
|
||||
<template v-if="column.key === 'status'">
|
||||
<dict-tag :options="dict.type.as_device_status" :value="d.row[column.key]" />
|
||||
|
@ -119,7 +128,26 @@
|
|||
<el-tag size="small">{{ d.row[column.key] }}</el-tag>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'userName'">
|
||||
<span class="no-wrap">商户:{{ d.row.userName }}</span>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="handleUserDetail(d.row.userId)"
|
||||
>
|
||||
<span class="no-wrap">商户:{{ d.row.userName }}</span>
|
||||
</el-link>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'placementStatus'">
|
||||
<template v-if="d.row.placementStatus === '2'">
|
||||
<span>未投放</span>
|
||||
</template>
|
||||
<template v-else-if="d.row.placementStatus === '1' && d.row.equ">
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="handleEquipmentDetail(d.row.equ.equipmentId)"
|
||||
>
|
||||
{{ formatEquipmentInfo(d.row.equ) }}
|
||||
</el-link>
|
||||
</template>
|
||||
<template v-else>-</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="no-wrap">{{ d.row[column.key] }}</span>
|
||||
|
@ -127,35 +155,36 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="300"
|
||||
align="center"
|
||||
class-name="operation-column">
|
||||
<template slot-scope="scope">
|
||||
<div class="operation-buttons">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
|
||||
v-hasPermi="['system:fault:query']">详情</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:device:edit']">修改</el-button>
|
||||
<el-button v-if="scope.row.status != '3'" size="mini" type="text" icon="el-icon-unlock"
|
||||
@click="handleUnlocking(scope.row)" v-hasPermi="['system:device:unlocking']">打开</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-lock" @click="handleLock(scope.row)"
|
||||
v-hasPermi="['system:device:unlocking']">关闭</el-button>
|
||||
<el-button v-if="scope.row.status != '0'" size="mini" type="text" icon="el-icon-check"
|
||||
@click="handleOnline(scope.row)" v-hasPermi="['system:device:online']">
|
||||
{{ scope.row.status === '8' ? '解禁' : '禁用' }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="reboot(scope.row)"
|
||||
v-hasPermi="['system:device:reboot']">重启</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" @click="refresh(scope.row)"
|
||||
v-hasPermi="['system:device:refresh']">更新</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:device:remove']">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['system:device:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:device:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:device:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
|
@ -369,6 +398,7 @@ export default {
|
|||
columns: [
|
||||
{ key: 'deviceName', visible: true, label: '设备名称', width: '180', sortable: true, align: 'center' },
|
||||
{ key: 'model', visible: true, label: '设备型号', width: '150', sortable: true, align: 'center' },
|
||||
{ key: 'placementStatus', visible: true, label: '投放状态', width: '150', sortable: true, align: 'center' },
|
||||
{ key: 'version', visible: true, label: '版本', width: '150', sortable: true, align: 'center' },
|
||||
{ key: 'status', visible: true, label: '状态', width: '120', sortable: true, align: 'center' },
|
||||
{ key: 'powerStatus', visible: true, label: '开关状态', width: '120', sortable: true, align: 'center' },
|
||||
|
@ -647,10 +677,11 @@ export default {
|
|||
this.title = "添加设备";
|
||||
},
|
||||
handleView(row) {
|
||||
this.open2 = true;
|
||||
this.form = row;
|
||||
this.showPlaceSearchMap = true;
|
||||
this.key++;
|
||||
if (row.deviceId) {
|
||||
this.$router.push({
|
||||
path: `/system/deviceDetail/index/${row.deviceId}`
|
||||
});
|
||||
}
|
||||
},
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
|
@ -729,7 +760,21 @@ export default {
|
|||
this.download('system/device/export', {
|
||||
...this.queryParams
|
||||
}, `device_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
},
|
||||
handleEquipmentDetail(equipmentId) {
|
||||
this.$router.push(`/system/equipment/detail/${equipmentId}`);
|
||||
},
|
||||
/** 格式化设施信息 */
|
||||
formatEquipmentInfo(equipment) {
|
||||
if (!equipment) return '-';
|
||||
return `${equipment.storeName || ''}-${equipment.name || ''}`;
|
||||
},
|
||||
/** 查看用户详情按钮操作 */
|
||||
handleUserDetail(userId) {
|
||||
if (userId) {
|
||||
this.$router.push(`/user/detail/${userId}`);
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -771,7 +816,7 @@ export default {
|
|||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
.el-button {
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
|
@ -810,4 +855,4 @@ export default {
|
|||
.el-dialog__header {
|
||||
padding: 10px 20px !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
120
src/views/system/equipment/equipment_detail.vue
Normal file
120
src/views/system/equipment/equipment_detail.vue
Normal file
|
@ -0,0 +1,120 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 基本信息卡片 -->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>基本信息</span>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="info-item">
|
||||
<span class="label">设施ID:</span>
|
||||
<span>{{ equipmentData.equipmentId }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">设施名称:</span>
|
||||
<span>{{ equipmentData.name }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">设施类型:</span>
|
||||
<dict-tag :options="dict.type.ss_equipment_type" :value="equipmentData.type"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="info-item">
|
||||
<span class="label">所属店铺:</span>
|
||||
<span>{{ equipmentData.storeName }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">所属房间:</span>
|
||||
<span>{{ equipmentData.roomName }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">状态:</span>
|
||||
<dict-tag :options="dict.type.ss_equipment_status" :value="equipmentData.status"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="info-item">
|
||||
<span class="label">创建时间:</span>
|
||||
<span>{{ parseTime(equipmentData.createTime) }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">更新时间:</span>
|
||||
<span>{{ parseTime(equipmentData.updateTime) }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<!-- 设备信息卡片 -->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>设备信息</span>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="info-item">
|
||||
<span class="label">设备ID:</span>
|
||||
<span>{{ equipmentData.deviceId }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">MAC地址:</span>
|
||||
<span>{{ equipmentData.device ? equipmentData.device.mac : '-' }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="info-item">
|
||||
<span class="label">SN:</span>
|
||||
<span>{{ equipmentData.device ? equipmentData.device.sn : '-' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">设备状态:</span>
|
||||
<dict-tag :options="dict.type.ss_device_status" :value="equipmentData.device ? equipmentData.device.status : ''"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEquipment } from "@/api/system/equipment";
|
||||
|
||||
export default {
|
||||
name: "EquipmentDetail",
|
||||
dicts: ['ss_equipment_type', 'ss_equipment_status', 'ss_device_status'],
|
||||
data() {
|
||||
return {
|
||||
equipmentData: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const equipmentId = this.$route.params.equipmentId;
|
||||
this.getEquipmentData(equipmentId);
|
||||
},
|
||||
methods: {
|
||||
getEquipmentData(equipmentId) {
|
||||
getEquipment(equipmentId).then(response => {
|
||||
this.equipmentData = response.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
.box-card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.info-item {
|
||||
margin-bottom: 15px;
|
||||
.label {
|
||||
color: #606266;
|
||||
margin-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -201,6 +201,13 @@
|
|||
</template>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['system:equipment:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -534,7 +541,15 @@ export default {
|
|||
handleAddressClick(lng, lat) {
|
||||
if (!lng || !lat) return;
|
||||
window.open(`https://uri.amap.com/marker?position=${lng},${lat}&callnative=1`);
|
||||
}
|
||||
},
|
||||
/** 查看详情按钮操作 */
|
||||
handleView(row) {
|
||||
if (row.equipmentId) {
|
||||
this.$router.push({
|
||||
path: `/system/equipment/detail/${row.equipmentId}`
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 过滤设施类型选项
|
||||
|
|
180
src/views/user/user/detail.vue
Normal file
180
src/views/user/user/detail.vue
Normal file
|
@ -0,0 +1,180 @@
|
|||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<template>
|
||||
<el-row :gutter="12">
|
||||
<el-col :lg="10" :md="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<template #header>
|
||||
<el-row type="flex" style="justify-content: space-between">
|
||||
<div>用户详情</div>
|
||||
<div>
|
||||
<el-button type="text" icon="el-icon-setting" size="small" style="padding: 5px 0 0;" @click="showConfigDialog = true">用户配置</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<div class="user-detail">
|
||||
<div class="user-header">
|
||||
<el-avatar :size="64" :src="detail.avatar"></el-avatar>
|
||||
<el-row type="flex" class="name-box">
|
||||
<span class="user-name">11</span>
|
||||
<dict-tag :value="detail.type" :options="dict.type.sm_user_type"/>
|
||||
</el-row>
|
||||
<div class="phone-number">{{detail.phonenumber}}</div>
|
||||
</div>
|
||||
|
||||
<!-- <el-row type="flex" style="margin-top: 16px;">-->
|
||||
<!-- <el-statistic title="店铺数" :value="detail.storeCount" :precision="0" suffix="家"/>-->
|
||||
<!-- <el-statistic title="设备数" :value="detail.deviceCount" :precision="0" suffix="台"/>-->
|
||||
<!-- <el-statistic title="账户余额" :value="detail.balance" :precision="2" suffix="元"/>-->
|
||||
<!-- <el-statistic title="总收入" :value="detail.totalIncome" :precision="2" suffix="元"/>-->
|
||||
<!-- <el-statistic title="未入账" :value="detail.waitBonusAmount" :precision="2" suffix="元"/>-->
|
||||
<!-- <el-statistic title="总提现" :value="detail.withDrawlAmount" :precision="2" suffix="元"/>-->
|
||||
<!-- <el-statistic title="总消费" :value="detail.rechargeAmount" :precision="2" suffix="元"/>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<div class="user-description">
|
||||
<el-descriptions :column="3">
|
||||
<el-descriptions-item label="充值服务费">
|
||||
{{detail.realServiceRate | money | defaultValue}} %
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="代理服务费">
|
||||
{{detail.agentServiceRate | money | defaultValue}} %
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="提现服务费">
|
||||
<template v-if="detail.withdrawServiceRate == null || detail.withdrawServiceType == null">跟随渠道</template>
|
||||
<template v-else>
|
||||
<dict-tag :options="dict.type.withdraw_service_type" :value="detail.withdrawServiceType" size="mini"/>
|
||||
{{detail.withdrawServiceRate}} {{serviceUnit(detail.withdrawServiceType)}}
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="实名认证">-->
|
||||
<!-- <boolean-tag :value="detail.isReal" size="small"/>-->
|
||||
<!-- <el-link-->
|
||||
<!-- v-if="detail.isReal"-->
|
||||
<!-- style="margin-left: 4px;"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- size="small"-->
|
||||
<!-- icon="el-icon-link"-->
|
||||
<!-- @click="handleResetRealName"-->
|
||||
<!-- >解除实名</el-link>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="姓名">
|
||||
{{detail.realName | dv}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证">
|
||||
{{detail.realIdCard | dv}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实名手机">
|
||||
{{detail.realPhone | dv}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :span="2">{{detail.remark | dv}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="14" :md="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<el-row type="flex">
|
||||
<el-tabs style="width: 100%">
|
||||
<el-tab-pane label="日报表" lazy>
|
||||
<user-daily-recharge-report v-if="detail.userId != null" :query="{arrivalId: detail.userId}"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="月报表" lazy>
|
||||
<user-recharge-report :mch-id="detail.userId"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<!-- <el-empty v-else description="用户不存在"/>-->
|
||||
|
||||
<!-- <!–用户设置–>-->
|
||||
<!-- <user-config-dialog :show.sync="showConfigDialog" :user-id="detail.userId" @success="getDetail"/>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUser } from '@/api/system/user'
|
||||
import Device from '@/views/system/device/index.vue'
|
||||
// import Withdraw from '@/views/system/withdraw/index.vue'
|
||||
// import UserDailyRechargeReport from '@/views/system/smUser/components/UserDailyRechargeReport.vue'
|
||||
// import UserRechargeReport from '@/views/system/smUser/components/userRechargeReport.vue'
|
||||
// import UserConfigDialog from '@/views/system/smUser/components/UserConfigDialog.vue'
|
||||
// import { BonusArrivalType, SmUserType } from '@/utils/constants'
|
||||
import { $serviceType, $view } from '@/utils/mixins'
|
||||
|
||||
export default {
|
||||
name: 'UserDetail',
|
||||
mixins: [$view, $serviceType],
|
||||
dicts: ['sm_user_type', 'service_type', 'withdraw_service_type'],
|
||||
components: {
|
||||
Device
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detail: {},
|
||||
loading: false,
|
||||
showConfigDialog: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
serviceUnit() {
|
||||
return (type) => {
|
||||
return type === '2' ? '元' : '%';
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDetail();
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.loading = true;
|
||||
getUser(this.$route.params.userId).then(response => {
|
||||
this.detail = response.data;
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container .box-card:nth-child(n + 1) {
|
||||
margin-top: 1em;
|
||||
}
|
||||
.user-name {
|
||||
font-size: 18px;
|
||||
line-height: 30px;
|
||||
vertical-align: center;
|
||||
}
|
||||
.phone-number {
|
||||
font-size: 18px;
|
||||
line-height: 30px;
|
||||
color: #9B9B9B;
|
||||
}
|
||||
.user-header {
|
||||
text-align: center;
|
||||
margin: 0 2em;
|
||||
}
|
||||
.user-header .name-box {
|
||||
margin: 0 auto;
|
||||
width: fit-content;
|
||||
}
|
||||
.user-detail {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: fit-content;
|
||||
flex-direction: column;
|
||||
}
|
||||
.user-detail .user-description {
|
||||
flex: 1;
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
|
@ -37,17 +37,6 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</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>
|
||||
|
@ -89,16 +78,6 @@
|
|||
<dict-tag :options="dict.type.ss_user_type" :value="scope.row.userType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后登录时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.loginDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" key="status">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
|
@ -109,6 +88,38 @@
|
|||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="余额" align="center" prop="balance">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.balance ? '¥' + scope.row.balance : '¥0.00' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提现金额" align="center" prop="withdrawAmount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.withdrawAmount ? '¥' + scope.row.withdrawAmount : '¥0.00' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="店铺数" align="center" prop="storeCount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.storeCount || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否管理员" align="center" prop="isAdmin">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" :type="scope.row.isAdmin === 1 ? 'success' : 'info'">
|
||||
{{ scope.row.isAdmin === 1 ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后登录时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.loginDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
|
@ -122,7 +133,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleSee(scope.row)"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['system:smUser:detail']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
|
@ -459,6 +470,11 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
handleView(row){
|
||||
if (row.userId) {
|
||||
this.$router.push(`/user/detail/${row.userId}`);
|
||||
}
|
||||
},
|
||||
handleUpdateRisk(row) {
|
||||
this.row = row;
|
||||
this.showConfigDialog = true;
|
||||
|
@ -669,7 +685,6 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.operation-btns {
|
||||
display: flex;
|
||||
|
@ -699,3 +714,4 @@ export default {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user