运营区详情

This commit is contained in:
磷叶 2025-04-27 18:08:50 +08:00
parent 38091d2cf0
commit 8a1613834b
11 changed files with 88 additions and 24 deletions

View File

@ -121,6 +121,12 @@ export const constantRoutes = [
component: () => import('@/views/system/user/view/view.vue'), component: () => import('@/views/system/user/view/view.vue'),
name: 'UserView', name: 'UserView',
meta: { title: '用户详情' } meta: { title: '用户详情' }
},
{
path: 'area/:id?',
component: () => import('@/views/bst/area/view/view.vue'),
name: 'AreaView',
meta: { title: '运营区详情' }
} }
] ]
}, },

View File

@ -76,7 +76,11 @@
<dict-tag :options="dict.type.agreement_content_type" :value="row.contentType" size="mini" style="margin-left:4px"/> <dict-tag :options="dict.type.agreement_content_type" :value="row.contentType" size="mini" style="margin-left:4px"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="运营区" align="center" prop="areaName"/> <el-table-column label="运营区" align="center" prop="areaName">
<template slot-scope="d">
<area-link :id="d.row.areaId" :text="d.row.areaName"/>
</template>
</el-table-column>
<el-table-column label="简介" align="center" prop="brief"/> <el-table-column label="简介" align="center" prop="brief"/>
<el-table-column label="创建时间" align="center" prop="createTime"/> <el-table-column label="创建时间" align="center" prop="createTime"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -192,6 +196,7 @@ import Editor from "@/components/Editor/index.vue";
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue"; import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
import UserLink from "@/components/Business/User/UserLink.vue"; import UserLink from "@/components/Business/User/UserLink.vue";
import {isSysAdmin} from "@/utils/permission"; import {isSysAdmin} from "@/utils/permission";
import AreaLink from '@/components/Business/Area/AreaLink.vue'
// //
const defaultSort = { const defaultSort = {
@ -203,7 +208,13 @@ export default {
name: "Agreement", name: "Agreement",
mixins: [$showColumns], mixins: [$showColumns],
dicts: ['agreement_type', 'agreement_content_type'], dicts: ['agreement_type', 'agreement_content_type'],
components: {FormCol, Editor, AreaRemoteSelect, UserLink}, components: {FormCol, Editor, AreaRemoteSelect, UserLink, AreaLink},
props: {
query: {
type: Object,
default: () => ({})
},
},
data() { data() {
return { return {
span: 24, span: 24,
@ -326,6 +337,7 @@ export default {
}, },
}, },
created() { created() {
Object.assign(this.queryParams, this.query);
this.getList(); this.getList();
}, },
methods: { methods: {

View File

@ -131,6 +131,13 @@
</template> </template>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
v-has-permi="['bst:area:query']"
>详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -269,6 +276,9 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleView(row) {
this.$router.push({ path: `/view/area/${row.id}` });
},
handleCustomerService(row) { handleCustomerService(row) {
this.row = row; this.row = row;
this.visibleCustomerService = true; this.visibleCustomerService = true;

View File

@ -12,7 +12,7 @@
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable @change="handleQuery"> <el-select v-model="queryParams.type" placeholder="请选择类型" clearable @change="handleQuery">
<template v-for="dict in dict.type.area_join_type"> <template v-for="dict in dict.type.area_join_type">
<el-option <el-option
v-if="types.includes(dict.value)" v-if="queryParams.types.includes(dict.value)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -109,6 +109,9 @@
<template v-else-if="column.key === 'createName'"> <template v-else-if="column.key === 'createName'">
<user-link :id="d.row.createId" :text="d.row.createName" /> <user-link :id="d.row.createId" :text="d.row.createName" />
</template> </template>
<template v-else-if="column.key === 'areaName'">
<area-link :id="d.row.areaId" :text="d.row.areaName" />
</template>
<template v-else> <template v-else>
{{d.row[column.key]}} {{d.row[column.key]}}
</template> </template>
@ -149,7 +152,7 @@
:id="editId" :id="editId"
:init-data="initData" :init-data="initData"
@success="getList" @success="getList"
:types="types" :types="queryParams.types"
/> />
</div> </div>
</template> </template>
@ -160,7 +163,8 @@ import { $showColumns } from '@/utils/mixins';
import AreaJoinEditDialog from './components/AreaJoinEditDialog'; import AreaJoinEditDialog from './components/AreaJoinEditDialog';
import UserLink from '@/components/Business/User/UserLink.vue'; import UserLink from '@/components/Business/User/UserLink.vue';
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue'; import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue';
import { isEmpty } from '@/utils';
import AreaLink from '@/components/Business/Area/AreaLink.vue';
// //
const defaultSort = { const defaultSort = {
prop: "createTime", prop: "createTime",
@ -171,7 +175,13 @@ export default {
name: "AreaJoin", name: "AreaJoin",
mixins: [$showColumns], mixins: [$showColumns],
dicts: ['area_join_type', 'area_join_permission'], dicts: ['area_join_type', 'area_join_permission'],
components: { AreaJoinEditDialog, UserLink, AreaRemoteSelect }, components: { AreaJoinEditDialog, UserLink, AreaRemoteSelect, AreaLink },
props: {
query: {
type: Object,
default: null
},
},
data() { data() {
return { return {
// //
@ -218,14 +228,18 @@ export default {
areaId: null, areaId: null,
userId: null, userId: null,
remark: null, remark: null,
createId: null createId: null,
types: []
}, },
types: [], //
}; };
}, },
created() { created() {
this.types = this.$route.query?.types?.split(',') || []; this.types = this.$route.query?.types?.split(',') || [];
if (!isEmpty(this.propTypes)) {
this.types = this.propTypes;
}
this.queryParams.types = this.types; this.queryParams.types = this.types;
Object.assign(this.queryParams, this.query);
this.getList(); this.getList();
}, },
methods: { methods: {

View File

@ -198,6 +198,12 @@ export default {
mixins: [$showColumns], mixins: [$showColumns],
dicts: ['area_sub_type', 'area_sub_status'], dicts: ['area_sub_type', 'area_sub_status'],
components: {FormCol, AreaMap, AreaSubEditDialog}, components: {FormCol, AreaMap, AreaSubEditDialog},
props: {
areaId: {
type: String,
default: null
}
},
data() { data() {
return { return {
AreaSubStatus, AreaSubStatus,
@ -271,7 +277,11 @@ export default {
}; };
}, },
created() { created() {
if (this.areaId) {
this.queryParams.areaId = this.areaId;
} else {
this.queryParams.areaId = this.$route.params.areaId; this.queryParams.areaId = this.$route.params.areaId;
}
this.getArea(); this.getArea();
this.getList(); this.getList();
}, },

View File

@ -88,6 +88,9 @@
<template v-if="column.key === 'id'"> <template v-if="column.key === 'id'">
{{d.row[column.key]}} {{d.row[column.key]}}
</template> </template>
<template v-else-if="column.key === 'areaName'">
<area-link :id="d.row.areaId" :text="d.row.areaName"/>
</template>
<template v-else-if="column.key==='isEnabled'"> <template v-else-if="column.key==='isEnabled'">
<dict-tag <dict-tag
:options="dict.type.customer_service_status" :options="dict.type.customer_service_status"
@ -147,6 +150,7 @@ import { $showColumns } from '@/utils/mixins';
import FormCol from "@/components/FormCol/index.vue"; import FormCol from "@/components/FormCol/index.vue";
import CustomerServiceEditDialog from "@/views/bst/customerService/components/CustomerServiceEditDialog.vue"; import CustomerServiceEditDialog from "@/views/bst/customerService/components/CustomerServiceEditDialog.vue";
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue"; import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
import AreaLink from "@/components/Business/Area/AreaLink.vue";
// //
const defaultSort = { const defaultSort = {
@ -157,7 +161,7 @@ const defaultSort = {
export default { export default {
name: "CustomerService", name: "CustomerService",
mixins: [$showColumns], mixins: [$showColumns],
components: {AreaRemoteSelect, CustomerServiceEditDialog, FormCol}, components: {AreaRemoteSelect, CustomerServiceEditDialog, FormCol, AreaLink},
dicts:['customer_service_status'], dicts:['customer_service_status'],
props: { props: {
query: { query: {

View File

@ -226,7 +226,8 @@
<template v-else-if="column.key === 'mchName'"> <template v-else-if="column.key === 'mchName'">
<i class="el-icon-office-building"/> <i class="el-icon-office-building"/>
<user-link :id="d.row.mchId" :text="d.row.mchName" size="mini"/><br/> <user-link :id="d.row.mchId" :text="d.row.mchName" size="mini"/><br/>
<i class="el-icon-location"/>{{d.row.areaName | dv}} <i class="el-icon-location"/>
<area-link :id="d.row.areaId" :text="d.row.areaName" size="mini"/>
</template> </template>
<template v-else-if="column.key === 'lockStatus'"> <template v-else-if="column.key === 'lockStatus'">
<el-tooltip content="开锁:共享模块有开锁的信号输出;电门开:车子处于开锁可骑行状态" placement="top"> <el-tooltip content="开锁:共享模块有开锁的信号输出;电门开:车子处于开锁可骑行状态" placement="top">
@ -244,9 +245,9 @@
{{d.row.remainEndurance | dv}} KM {{d.row.remainEndurance | dv}} KM
</template> </template>
<template v-else-if="column.key === 'vehicleNum'"> <template v-else-if="column.key === 'vehicleNum'">
<i class="el-icon-bicycle"/>
{{d.row.vehicleNum | dv}}<br/>
<i class="el-icon-tickets"/> <i class="el-icon-tickets"/>
{{d.row.vehicleNum | dv}}<br/>
<i class="el-icon-bicycle"/>
{{d.row.modelName | dv}} {{d.row.modelName | dv}}
</template> </template>
<template v-else-if="column.key === 'music'"> <template v-else-if="column.key === 'music'">
@ -412,6 +413,7 @@ import DeviceSn from '@/views/bst/device/components/DeviceSn.vue';
import UserLink from '@/components/Business/User/UserLink.vue'; import UserLink from '@/components/Business/User/UserLink.vue';
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'; import DeviceLink from '@/components/Business/Device/DeviceLink.vue';
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue'; import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue';
import AreaLink from '@/components/Business/Area/AreaLink.vue';
// //
const defaultSort = { const defaultSort = {
@ -423,7 +425,7 @@ export default {
name: "Device", name: "Device",
mixins: [$showColumns, $device], mixins: [$showColumns, $device],
dicts: ['device_status', 'device_lock_status', 'device_iot_status', 'device_online_status', 'device_quality', 'device_music'], dicts: ['device_status', 'device_lock_status', 'device_iot_status', 'device_online_status', 'device_quality', 'device_music'],
components: {FormCol, DeviceEditDialog, BooleanTag, DeviceTransferDialog, DeviceSn, UserLink, DeviceLink, AreaRemoteSelect}, components: {FormCol, DeviceEditDialog, BooleanTag, DeviceTransferDialog, DeviceSn, UserLink, DeviceLink, AreaRemoteSelect, AreaLink},
props: { props: {
query: { query: {
type: Object, type: Object,

View File

@ -59,10 +59,10 @@ export default {
}, },
// 退 // 退
canRefundAmount() { canRefundAmount() {
let payAmount = this.detail.payAmount || 0; let payedAmount = this.detail.payedAmount || 0;
let payRefunded = this.detail.payRefunded || 0; let payRefunded = this.detail.payRefunded || 0;
let payRefunding = this.detail.payRefunding || 0; let payRefunding = this.detail.payRefunding || 0;
return payAmount - payRefunded - payRefunding; return payedAmount - payRefunded - payRefunding;
} }
}, },
methods: { methods: {

View File

@ -212,7 +212,8 @@
<user-link :id="d.row.userId" :text="d.row.userPhone" size="mini"/> <user-link :id="d.row.userId" :text="d.row.userPhone" size="mini"/>
</div> </div>
<div v-if="d.row.areaName != null"> <div v-if="d.row.areaName != null">
<i class="el-icon-location"/>{{d.row.areaName | dv}} <i class="el-icon-location"/>
<area-link :id="d.row.areaId" :text="d.row.areaName" size="mini"/>
</div> </div>
</template> </template>
<template v-else> <template v-else>
@ -283,6 +284,7 @@ import { toDescriptionFromSecond } from '@/utils/date';
import UserLink from '@/components/Business/User/UserLink.vue'; import UserLink from '@/components/Business/User/UserLink.vue';
import DeviceLink from '@/components/Business/Device/DeviceLink.vue' import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
import OrderLink from '@/components/Business/Order/OrderLink.vue' import OrderLink from '@/components/Business/Order/OrderLink.vue'
import AreaLink from '@/components/Business/Area/AreaLink.vue';
// //
const defaultSort = { const defaultSort = {
@ -294,7 +296,7 @@ export default {
name: "Order", name: "Order",
mixins: [$showColumns], mixins: [$showColumns],
dicts: ['order_status', 'suit_type', 'order_return_type', 'order_return_mode', 'suit_rental_unit', 'suit_riding_rule'], dicts: ['order_status', 'suit_type', 'order_return_type', 'order_return_mode', 'suit_rental_unit', 'suit_riding_rule'],
components: {FormCol, OrderRefundDialog, OrderVerifyDialog, UserLink, DeviceLink, OrderLink}, components: {FormCol, OrderRefundDialog, OrderVerifyDialog, UserLink, DeviceLink, OrderLink, AreaLink},
props: { props: {
query: { query: {
type: Object, type: Object,

View File

@ -145,8 +145,10 @@
<el-tag :key="index" v-if="!isEmpty(role.roleName)" size="small" style="margin-right: 4px;">{{role.roleName}}</el-tag> <el-tag :key="index" v-if="!isEmpty(role.roleName)" size="small" style="margin-right: 4px;">{{role.roleName}}</el-tag>
</template> </template>
</template> </template>
<template v-else-if="['nickName', 'userName', 'email'].includes(column.key)"> <template v-else-if="['nickName'].includes(column.key)">
<user-link :id="d.row.userId" :text="d.row[column.key]" /> <avatar :src="d.row.avatar" :size="24" :name="d.row.nickName" :char-index="-1" style="margin-right:4px"/>
<user-link :id="d.row.userId" :text="d.row.nickName" /><br/>
<user-link :id="d.row.userId" :text="d.row.userName" />
</template> </template>
<template v-else-if="column.key === 'agentName'"> <template v-else-if="column.key === 'agentName'">
<user-link :id="d.row.agentId" :text="d.row.agentName" /> <user-link :id="d.row.agentId" :text="d.row.agentName" />
@ -239,6 +241,7 @@ import BooleanTag from '@/components/BooleanTag/index.vue'
import UserLink from '@/components/Business/User/UserLink.vue' import UserLink from '@/components/Business/User/UserLink.vue'
import RoleSelect from '@/components/Business/Role/RoleSelect.vue' import RoleSelect from '@/components/Business/Role/RoleSelect.vue'
import UserShowPasswordDialog from '@/views/system/user/components/UserShowPasswordDialog.vue' import UserShowPasswordDialog from '@/views/system/user/components/UserShowPasswordDialog.vue'
import Avatar from '@/components/Avatar/index.vue'
// //
const defaultSort = { const defaultSort = {
@ -250,7 +253,7 @@ export default {
name: "User", name: "User",
mixins: [$showColumns], mixins: [$showColumns],
dicts: ['user_status', 'sys_user_sex', 'user_employ_status', 'withdraw_service_type'], dicts: ['user_status', 'sys_user_sex', 'user_employ_status', 'withdraw_service_type'],
components: {UserFormDialog, FormCol, DeptSelect, BooleanTag, UserLink, RoleSelect, UserShowPasswordDialog}, components: {UserFormDialog, FormCol, DeptSelect, BooleanTag, UserLink, RoleSelect, UserShowPasswordDialog, Avatar},
data() { data() {
return { return {
WithdrawServiceType, WithdrawServiceType,
@ -300,8 +303,7 @@ export default {
// //
columns: [ columns: [
{key: 'userId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'userId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'nickName', visible: true, label: '姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'nickName', visible: true, label: '姓名', minWidth: null, sortable: true, overflow: false, align: 'left', width: "150"},
{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: '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: '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: 'withdrawServiceValue', visible: true, label: '提现服务费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},

View File

@ -15,7 +15,6 @@
<line-field label="角色"> <line-field label="角色">
{{ detail.roles.map(role => role.roleName).join(',') }} {{ detail.roles.map(role => role.roleName).join(',') }}
</line-field> </line-field>
<line-field label="手机号" :value="detail.phonenumber" />
<line-field label="登录账号" :value="detail.userName" /> <line-field label="登录账号" :value="detail.userName" />
<line-field label="分成比例"> <line-field label="分成比例">
{{ detail.point | fix2 | dv }} % {{ detail.point | fix2 | dv }} %
@ -61,6 +60,9 @@
<el-tab-pane label="运营区" lazy v-if="checkPermi(['bst:area:list'])"> <el-tab-pane label="运营区" lazy v-if="checkPermi(['bst:area:list'])">
<area-index :query="{userId: detail.userId}" /> <area-index :query="{userId: detail.userId}" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="消费订单" lazy v-if="checkPermi(['bst:order:list'])">
<order :query="{userId: detail.userId}" />
</el-tab-pane>
<el-tab-pane label="收入订单" lazy v-if="checkPermi(['bst:order:list'])"> <el-tab-pane label="收入订单" lazy v-if="checkPermi(['bst:order:list'])">
<order :query="{bonusUserId: detail.userId}" /> <order :query="{bonusUserId: detail.userId}" />
</el-tab-pane> </el-tab-pane>