更新
This commit is contained in:
parent
d6c6669492
commit
bc7f985141
|
@ -63,7 +63,8 @@
|
|||
"vue-meta": "2.4.0",
|
||||
"vue-router": "3.4.9",
|
||||
"vuedraggable": "2.24.3",
|
||||
"vuex": "3.6.0"
|
||||
"vuex": "3.6.0",
|
||||
"weixin-js-sdk": "^1.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.6",
|
||||
|
|
|
@ -62,3 +62,12 @@ export function refundOrder(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 订单还车审核
|
||||
export function verifyOrder(data) {
|
||||
return request({
|
||||
url: '/bst/order/verify',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
44
src/api/bst/orderDevice.js
Normal file
44
src/api/bst/orderDevice.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询订单设备列表
|
||||
export function listOrderDevice(query) {
|
||||
return request({
|
||||
url: '/bst/orderDevice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询订单设备详细
|
||||
export function getOrderDevice(id) {
|
||||
return request({
|
||||
url: '/bst/orderDevice/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增订单设备
|
||||
export function addOrderDevice(data) {
|
||||
return request({
|
||||
url: '/bst/orderDevice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改订单设备
|
||||
export function updateOrderDevice(data) {
|
||||
return request({
|
||||
url: '/bst/orderDevice',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除订单设备
|
||||
export function delOrderDevice(id) {
|
||||
return request({
|
||||
url: '/bst/orderDevice/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
import router from './router'
|
||||
import store from './store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { isRelogin } from '@/utils/request'
|
||||
import { Message } from 'element-ui'
|
||||
import NProgress from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { isRelogin } from '@/utils/request'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/login', '/register']
|
||||
const whiteList = ['/login', '/register', '/liveness']
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start()
|
||||
|
|
|
@ -73,6 +73,13 @@ export const constantRoutes = [
|
|||
},
|
||||
]
|
||||
},
|
||||
/**
|
||||
* 人脸识别
|
||||
*/
|
||||
{
|
||||
path: '/liveness',
|
||||
component: () => import('@/views/mobile/liveness/index')
|
||||
},
|
||||
/**
|
||||
* 编辑页
|
||||
*/
|
||||
|
@ -102,6 +109,18 @@ export const constantRoutes = [
|
|||
component: () => import('@/views/bst/order/view/view.vue'),
|
||||
name: 'OrderView',
|
||||
meta: { title: '订单详情' }
|
||||
},
|
||||
{
|
||||
path: 'device/:id?',
|
||||
component: () => import('@/views/bst/device/view/view.vue'),
|
||||
name: 'DeviceView',
|
||||
meta: { title: '设备详情' }
|
||||
},
|
||||
{
|
||||
path: 'user/:userId?',
|
||||
component: () => import('@/views/system/user/view/view.vue'),
|
||||
name: 'UserView',
|
||||
meta: { title: '用户详情' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -168,4 +168,27 @@ export const OrderStatus = {
|
|||
}
|
||||
}
|
||||
|
||||
// 支付业务类型
|
||||
export const PayBstType = {
|
||||
ORDER: "1", // 订单
|
||||
}
|
||||
|
||||
// 分成业务类型
|
||||
export const BonusBstType = {
|
||||
ORDER: "1", // 订单
|
||||
}
|
||||
|
||||
// 分成到账类型
|
||||
export const BonusArrivalType = {
|
||||
PLATFORM: "PLATFORM", // 平台
|
||||
AGENT: "AGENT", // 代理商
|
||||
MCH: "MCH", // 运营商
|
||||
JOIN: "JOIN", // 加盟商
|
||||
PARTNER: "PARTNER", // 合伙人
|
||||
|
||||
// 用户列表
|
||||
userList() {
|
||||
return [this.AGENT, this.MCH, this.JOIN, this.PARTNER];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,6 +140,12 @@ export default {
|
|||
mixins: [$showColumns],
|
||||
dicts: ['bonus_status', 'bonus_arrival_type', 'bonus_bst_type'],
|
||||
components: {FormCol, BooleanTag},
|
||||
props: {
|
||||
query: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 金额颜色
|
||||
|
@ -211,6 +217,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
Object.assign(this.queryParams, this.query);
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -212,14 +212,16 @@
|
|||
{{d.row.areaName | dv}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'lockStatus'">
|
||||
<dict-tag :options="dict.type.device_lock_status" :value="d.row[column.key]" size="mini"/>
|
||||
<el-tooltip content="电门是设备当前状态,锁是逻辑状态。当二者不一致时,将会尝试矫正电门状态。" placement="top">
|
||||
<div>
|
||||
<dict-tag :options="dict.type.device_lock_status" :value="d.row.lockStatus" size="mini"/><br/>
|
||||
<dict-tag :options="dict.type.device_quality" :value="d.row.quality" size="mini"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'iotStatus'">
|
||||
<dict-tag :options="dict.type.device_iot_status" :value="d.row[column.key]" size="mini"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'quality'">
|
||||
<dict-tag :options="dict.type.device_quality" :value="d.row[column.key]" size="mini"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'remainingPower'">
|
||||
{{d.row.remainingPower | fix2 | dv}} % <br/>
|
||||
{{d.row.remainEndurance | dv}} KM
|
||||
|
@ -242,6 +244,13 @@
|
|||
</template>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-has-permi="['bst:device:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -386,8 +395,7 @@ export default {
|
|||
{key: 'mchName', visible: true, label: '归属', minWidth: null, sortable: true, overflow: false, align: 'left', width: null},
|
||||
{key: 'signalStrength', visible: true, label: '信号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'satellites', visible: true, label: '卫星', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'quality', visible: true, label: '电门', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'lockStatus', visible: true, label: '锁', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'lockStatus', visible: true, label: '锁状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'voltage', visible: true, label: '电压', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'remainingPower', visible: true, label: '续航', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'isSound', visible: true, label: '声音', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
|
@ -681,6 +689,10 @@ export default {
|
|||
this.editId = null;
|
||||
this.open = true;
|
||||
},
|
||||
/** 详情按钮操作 */
|
||||
handleView(row) {
|
||||
this.$router.push(`/view/device/${row.id}`);
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.editId = row.id || this.ids;
|
||||
|
|
306
src/views/bst/device/view/view.vue
Normal file
306
src/views/bst/device/view/view.vue
Normal file
|
@ -0,0 +1,306 @@
|
|||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="18">
|
||||
<el-card class="card-box">
|
||||
<div class="button-group">
|
||||
<el-button type="primary" plain icon="el-icon-unlock" size="mini" @click="handleUnlock" v-if="canUnlock(detail)">开锁</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-lock" size="mini" @click="handleLock" v-if="canLock(detail)">锁车</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-bell" size="mini" @click="handleRing">响铃</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-refresh" size="mini" @click="handleReboot">重启</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-unlock" size="mini" @click="handleUnlockSeat">开坐垫锁</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-refresh" size="mini" @click="handleRefresh">刷新</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleOut" v-if="DeviceStatus.canOut().includes(detail.status)">出仓</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleIn" v-if="DeviceStatus.canIn().includes(detail.status)">入仓</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-close" size="mini" @click="handleDisable" v-if="DeviceStatus.canDisable().includes(detail.status)">禁用</el-button>
|
||||
<el-button type="success" plain icon="el-icon-check" size="mini" @click="handleEnable" v-if="DeviceStatus.canEnable().includes(detail.status)">启用</el-button>
|
||||
</div>
|
||||
<collapse-panel :value="true" title="基础信息">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="SN">{{ detail.sn | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="MAC">{{ detail.mac | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="车牌">{{ detail.vehicleNum | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<dict-tag :options="dict.type.device_status" :value="detail.status" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="锁状态">
|
||||
<dict-tag :options="dict.type.device_lock_status" :value="detail.lockStatus" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电门">
|
||||
<dict-tag :options="dict.type.device_quality" :value="detail.quality" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="在线状态">
|
||||
<dict-tag :options="dict.type.device_online_status" :value="detail.onlineStatus" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="车辆">
|
||||
<dict-tag :options="dict.type.device_iot_status" :value="detail.iotStatus" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="声音">
|
||||
<boolean-tag :value="detail.isSound" size="small" true-text="有声" false-text="静音"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ detail.createTime | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="最后上线时间">{{ detail.lastOnlineTime | dv }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
|
||||
<collapse-panel :value="true" title="位置信息">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="定位">{{ detail.longitude | dv }}, {{ detail.latitude | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="最后定位时间">{{ detail.lastLocationTime | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="信号强度">{{ detail.signalStrength | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="卫星数量">{{ detail.satellites | dv }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
|
||||
<collapse-panel :value="true" title="续航信息">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="剩余电量">{{ detail.remainingPower | fix2 | dv }} %</el-descriptions-item>
|
||||
<el-descriptions-item label="当前电压">{{ detail.voltage | fix2 | dv }} V</el-descriptions-item>
|
||||
<el-descriptions-item label="剩余续航">{{ detail.remainEndurance | fix2 | dv }} KM</el-descriptions-item>
|
||||
<el-descriptions-item label="满电电压">{{ detail.modelFullVoltage | fix2 | dv }} V</el-descriptions-item>
|
||||
<el-descriptions-item label="亏电电压">{{ detail.modelLowVoltage | fix2 | dv }} V</el-descriptions-item>
|
||||
<el-descriptions-item label="满电续航">{{ detail.modelFullEndurance | dv }} KM</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<collapse-panel :value="true" title="运营信息">
|
||||
<el-descriptions :column="1">
|
||||
<el-descriptions-item label="运营区">{{ detail.areaName | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="运营商">{{ detail.mchName | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="车型名称">{{ detail.modelName | dv }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
|
||||
<collapse-panel :value="true" title="当前订单" v-if="detail.orderNo">
|
||||
<el-descriptions :column="1">
|
||||
<el-descriptions-item label="订单编号">{{ detail.orderNo | dv }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单状态">
|
||||
<dict-tag :options="dict.type.order_status" :value="detail.orderStatus" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="订单设备状态">
|
||||
<dict-tag :options="dict.type.order_device_status" :value="detail.orderDeviceStatus" size="small"/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</collapse-panel>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card class="box-card" v-if="detail.id">
|
||||
<el-tabs lazy>
|
||||
<el-tab-pane label="设备轨迹">
|
||||
<!-- TODO: 设备轨迹展示 -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单使用记录">
|
||||
<order-device :query="{ deviceId: id }" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDevice } from '@/api/bst/device';
|
||||
import { unlockDevice, lockDevice, ringDevice, rebootDevice, unlockSeatDevice, refreshDevice } from "@/api/bst/deviceIot";
|
||||
import { outDevice, inDevice, disableDevice, enableDevice } from "@/api/bst/device";
|
||||
import CollapsePanel from '@/components/CollapsePanel/index.vue';
|
||||
import BooleanTag from '@/components/BooleanTag/index.vue';
|
||||
import { DeviceStatus } from '@/utils/enums';
|
||||
import { $device } from '@/views/bst/device/mixins';
|
||||
import OrderDevice from '@/views/bst/orderDevice/index.vue';
|
||||
|
||||
export default {
|
||||
name: 'DeviceView',
|
||||
mixins: [$device],
|
||||
dicts: ['device_status', 'device_lock_status', 'device_online_status', 'device_quality', 'device_iot_status', 'order_status', 'order_device_status'],
|
||||
components: {
|
||||
CollapsePanel,
|
||||
BooleanTag,
|
||||
OrderDevice
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
detail: {},
|
||||
loading: false,
|
||||
DeviceStatus
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getDetail();
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.loading = true;
|
||||
getDevice(this.id).then(res => {
|
||||
this.detail = res.data;
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 管理员开锁
|
||||
handleUnlock() {
|
||||
this.$confirm('是否确认操作设备【' + this.detail.sn + '】开锁?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
unlockDevice({ id: this.detail.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已开锁");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 管理员锁车
|
||||
handleLock() {
|
||||
this.$confirm('是否确认操作设备【' + this.detail.sn + '】锁车?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
lockDevice({ id: this.detail.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已锁车");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 管理员响铃寻车
|
||||
handleRing() {
|
||||
this.$confirm('是否确认操作设备【' + this.detail.sn + '】响铃寻车?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
ringDevice({ id: this.detail.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已响铃");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 管理员重启
|
||||
handleReboot() {
|
||||
this.$confirm('是否确认操作设备【' + this.detail.sn + '】重启?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
rebootDevice({ id: this.detail.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已重启");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 管理员开坐垫锁
|
||||
handleUnlockSeat() {
|
||||
this.$confirm('是否确认操作设备【' + this.detail.sn + '】开坐垫锁?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
unlockSeatDevice({ id: this.detail.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,坐垫锁已开");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 管理员刷新
|
||||
handleRefresh() {
|
||||
this.$confirm('是否确认刷新设备【' + this.detail.sn + '】?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
refreshDevice({ id: this.detail.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已刷新");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 出仓
|
||||
handleOut() {
|
||||
this.$confirm('是否确认出仓设备【' + this.detail.sn + '】?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
outDevice([this.detail.id]).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已出仓");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 入仓
|
||||
handleIn() {
|
||||
this.$confirm('是否确认入仓设备【' + this.detail.sn + '】?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
inDevice([this.detail.id]).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已入仓");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 禁用
|
||||
handleDisable() {
|
||||
this.$confirm('是否确认禁用设备【' + this.detail.sn + '】?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
disableDevice([this.detail.id]).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已禁用");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 启用
|
||||
handleEnable() {
|
||||
this.$confirm('是否确认启用设备【' + this.detail.sn + '】?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
enableDevice([this.detail.id]).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功,设备已启用");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.button-group {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
|
@ -81,13 +81,6 @@
|
|||
</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-has-permi="['bst:fault:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -106,20 +99,13 @@
|
|||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 查看故障详情 -->
|
||||
<FaultEditDialog>
|
||||
|
||||
</FaultEditDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listFault, getFault, delFault, addFault, updateFault } from "@/api/bst/fault";
|
||||
import { listFault} from "@/api/bst/fault";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import LocationLog from "@/views/bst/locationLog/index.vue";
|
||||
import LocationLogViewDialog from "@/views/bst/locationLog/components/LocationLogViewDialog.vue";
|
||||
import FaultEditDialog from "@/views/bst/fault/components/FaultEditDialog.vue";
|
||||
|
||||
// 默认排序字段
|
||||
|
@ -138,14 +124,15 @@ export default {
|
|||
span: 24,
|
||||
// 字段列表
|
||||
columns: [
|
||||
//{key: 'id', visible: true, label: '故障申诉id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
{key: 'userName', visible: true, label: '用户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'vehicleCode', visible: true, label: '车辆编码', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'picture', visible: true, label: '图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'orderId', visible: true, label: '订单编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'faultSite', visible: true, label: '故障部位', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'faultDetail', visible: true, label: '故障详情', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'appealStatus', visible: true, label: '申诉状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'appealStatus', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'vehicleCode', visible: true, label: 'SN', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'orderId', 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},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<el-row :gutter="16">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="18">
|
||||
<el-card>
|
||||
<collapse-panel :value="true" title="基础信息">
|
||||
|
@ -107,19 +107,41 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card class="box-card" v-if="detail.id" style="margin-top: 10px;">
|
||||
<el-tabs lazy>
|
||||
<el-tab-pane label="车辆轨迹">
|
||||
// TODO
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="收益信息">
|
||||
<bonus :query="{bstId: detail.id, bstType: BonusBstType.ORDER}" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单车辆">
|
||||
<order-device :query="{orderId: detail.id}" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="支付信息">
|
||||
<pay :query="{bstId: detail.id, bstType: PayBstType.ORDER}"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrder } from '@/api/bst/order'
|
||||
import CollapsePanel from '@/components/CollapsePanel/index.vue'
|
||||
import {SuitRidingRule} from '@/utils/enums'
|
||||
import {SuitRidingRule, PayBstType, BonusBstType} from '@/utils/enums'
|
||||
import OrderDevice from '@/views/bst/orderDevice/index.vue'
|
||||
import Pay from '@/views/bst/pay/index.vue'
|
||||
import Bonus from '@/views/bst/bonus/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'OrderView',
|
||||
dicts: ['order_status', 'device_lock_status', 'suit_type', 'suit_rental_unit', 'suit_riding_rule', 'order_return_mode', 'order_return_type'],
|
||||
components: {
|
||||
CollapsePanel
|
||||
CollapsePanel,
|
||||
OrderDevice,
|
||||
Pay,
|
||||
Bonus
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -127,6 +149,8 @@ export default {
|
|||
detail: {},
|
||||
loading: false,
|
||||
SuitRidingRule,
|
||||
PayBstType,
|
||||
BonusBstType
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
353
src/views/bst/orderDevice/index.vue
Normal file
353
src/views/bst/orderDevice/index.vue
Normal file
|
@ -0,0 +1,353 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="SN" prop="deviceSn">
|
||||
<el-input
|
||||
v-model="queryParams.deviceSn"
|
||||
placeholder="请输入设备SN"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="MAC" prop="deviceMac">
|
||||
<el-input
|
||||
v-model="queryParams.deviceMac"
|
||||
placeholder="请输入设备MAC"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="deviceVehicleNum">
|
||||
<el-input
|
||||
v-model="queryParams.deviceVehicleNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆归属" prop="deviceMchName">
|
||||
<el-input
|
||||
v-model="queryParams.deviceMchName"
|
||||
placeholder="请输入车辆归属"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单用户" prop="orderUserName">
|
||||
<el-input
|
||||
v-model="queryParams.orderUserName"
|
||||
placeholder="请输入订单用户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_device_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="换车原因" prop="reason">
|
||||
<el-select v-model="queryParams.reason" placeholder="请选择换车原因" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_device_reason"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-has-permi="['bst:orderDevice:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="orderDeviceList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<template v-for="column of showColumns">
|
||||
<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 === 'id'">
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'type'">
|
||||
<dict-tag :options="dict.type.order_device_type" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'reason'">
|
||||
<dict-tag :options="dict.type.order_device_reason" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'status'">
|
||||
<dict-tag :options="dict.type.order_device_status" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'finishPicture'">
|
||||
<image-preview :src="d.row[column.key]" :width="50" :height="50"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOrderDevice, getOrderDevice, delOrderDevice, addOrderDevice, updateOrderDevice } from "@/api/bst/orderDevice";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
prop: "id",
|
||||
order: "descending"
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "OrderDevice",
|
||||
mixins: [$showColumns],
|
||||
dicts: ['order_device_type', 'order_device_reason', 'order_device_status' ],
|
||||
components: {FormCol},
|
||||
props: {
|
||||
query: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
{key: 'deviceSn', visible: true, label: 'SN', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'deviceMac', visible: true, label: 'MAC', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'deviceVehicleNum', 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: 'type', visible: true, label: '类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'reason', visible: true, label: '换车原因', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'orderNo', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
||||
{key: 'startTime', visible: true, label: '开始时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
||||
{key: 'endTime', visible: true, label: '结束时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
||||
{key: 'deviceMchName', visible: true, label: '车辆归属', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'orderUserName', visible: true, label: '订单用户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'finishPicture', visible: true, label: '还车图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单设备表格数据
|
||||
orderDeviceList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultSort,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order,
|
||||
id: null,
|
||||
orderId: null,
|
||||
deviceId: null,
|
||||
type: null,
|
||||
reason: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
orderId: [
|
||||
{ required: true, message: "订单ID不能为空", trigger: "blur" }
|
||||
],
|
||||
deviceId: [
|
||||
{ required: true, message: "设备ID不能为空", trigger: "blur" }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "类型不能为空", trigger: "change" }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: "开始时间不能为空", trigger: "blur" }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: "结束时间不能为空", trigger: "blur" }
|
||||
],
|
||||
reason: [
|
||||
{ required: true, message: "换车原因不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
Object.assign(this.queryParams, this.query);
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
onSortChange(column) {
|
||||
if (column.order == null) {
|
||||
this.queryParams.orderByColumn = defaultSort.prop;
|
||||
this.queryParams.isAsc = defaultSort.order;
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询订单设备列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOrderDevice(this.queryParams).then(response => {
|
||||
this.orderDeviceList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
orderId: null,
|
||||
deviceId: null,
|
||||
type: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
reason: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加订单设备";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getOrderDevice(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改订单设备";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateOrderDevice(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addOrderDevice(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除订单设备编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delOrderDevice(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('bst/orderDevice/export', {
|
||||
...this.queryParams
|
||||
}, `orderDevice_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -163,6 +163,12 @@ export default {
|
|||
mixins: [$showColumns],
|
||||
dicts: ['pay_status', 'pay_bst_type'],
|
||||
components: {FormCol},
|
||||
props: {
|
||||
query: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
|
@ -270,6 +276,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
Object.assign(this.queryParams, this.query);
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -17,22 +17,6 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人脸图像" prop="picture">
|
||||
<el-input
|
||||
v-model="queryParams.picture"
|
||||
placeholder="请输入人脸图像"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="对比分数" prop="score">
|
||||
<el-input
|
||||
v-model="queryParams.score"
|
||||
placeholder="请输入对比分数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
|
@ -48,27 +32,6 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-has-permi="['bst:realName:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-has-permi="['bst:realName:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
|
@ -100,6 +63,12 @@
|
|||
<template v-if="column.key === 'id'">
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'picture'">
|
||||
<image-preview :src="d.row[column.key]" :width="50" :height="50" />
|
||||
</template>
|
||||
<template v-else-if="column.key === 'status'">
|
||||
<dict-tag :options="dict.type.real_name_status" :value="d.row[column.key]" />
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
|
@ -134,32 +103,6 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改实名认证信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<form-col :span="span" label="用户姓名" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户姓名" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="身份证" prop="idCard">
|
||||
<el-input v-model="form.idCard" placeholder="请输入身份证" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="人脸图像" prop="picture">
|
||||
<el-input v-model="form.picture" placeholder="请输入人脸图像" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="对比分数" prop="score">
|
||||
<el-input v-model="form.score" placeholder="请输入对比分数" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="手机号" prop="mobile">
|
||||
<el-input v-model="form.mobile" placeholder="请输入手机号" />
|
||||
</form-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -178,18 +121,20 @@ export default {
|
|||
name: "RealName",
|
||||
mixins: [$showColumns],
|
||||
components: {FormCol},
|
||||
dicts: ['real_name_status'],
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'id', visible: true, label: '实名认证id', 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: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
{key: 'userName', visible: true, label: '姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'idCard', visible: true, label: '身份证', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'picture', visible: true, label: '人脸图像', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'score', visible: true, label: '对比分数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'mobile', visible: true, label: '手机号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'status', visible: true, label: '实名认证状态:0-未实名 1-已实名', 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: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
|
|
65
src/views/mobile/liveness/index.vue
Normal file
65
src/views/mobile/liveness/index.vue
Normal file
|
@ -0,0 +1,65 @@
|
|||
<template>
|
||||
<div class="mobile-container">
|
||||
<el-result :title="title" :subTitle="subTitle" icon="error">
|
||||
<template slot="icon" v-if="success">
|
||||
<i class="el-icon-loading" style="font-size: 48px"/>
|
||||
</template>
|
||||
<template slot="extra">
|
||||
<el-button type="text" size="medium" @click="redirectToWx" >没有反应?点我跳转</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import wx from 'weixin-js-sdk'
|
||||
import { tansParams } from '@/utils/ruoyi'
|
||||
|
||||
export default {
|
||||
name: 'Liveness',
|
||||
data() {
|
||||
return {
|
||||
success: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
subTitle() {
|
||||
if (this.success) {
|
||||
return "正在获取结果中,请稍后"
|
||||
} else {
|
||||
return "认证失败,请重新认证"
|
||||
}
|
||||
},
|
||||
title() {
|
||||
if (this.success) {
|
||||
return "跳转中"
|
||||
} else {
|
||||
return "认证失败"
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.success = this.$route.query.success === 'true';
|
||||
this.redirectToWx();
|
||||
},
|
||||
methods: {
|
||||
redirectToWx() {
|
||||
wx.miniProgram.getEnv( (envRes) => {
|
||||
if (envRes.miniprogram) {
|
||||
wx.miniProgram.redirectTo({
|
||||
url: `/page_fenbao/renlianzhongzhuan`
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.mobile-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding-top: 20vh;
|
||||
}
|
||||
</style>
|
91
src/views/system/user/view/components/UserStatistics.vue
Normal file
91
src/views/system/user/view/components/UserStatistics.vue
Normal file
|
@ -0,0 +1,91 @@
|
|||
<template>
|
||||
<div class="statistics-wrapper" v-loading="loading">
|
||||
<statistics-card
|
||||
style="flex: 1"
|
||||
:value="0"
|
||||
label="设备总数"
|
||||
icon="el-icon-s-order"
|
||||
start-color="#409EFF"
|
||||
end-color="#53a8ff"
|
||||
/>
|
||||
<statistics-card
|
||||
style="flex: 1"
|
||||
:value="0"
|
||||
label="订单数"
|
||||
icon="el-icon-check"
|
||||
start-color="#67C23A"
|
||||
end-color="#85ce61"
|
||||
/>
|
||||
<statistics-card
|
||||
style="flex: 1"
|
||||
:value="0"
|
||||
label="订单金额"
|
||||
icon="el-icon-check"
|
||||
start-color="#67C23A"
|
||||
end-color="#85ce61"
|
||||
/>
|
||||
<statistics-card
|
||||
style="flex: 1"
|
||||
:value="0"
|
||||
label="分成金额"
|
||||
icon="el-icon-check"
|
||||
start-color="#67C23A"
|
||||
end-color="#85ce61"
|
||||
/>
|
||||
<statistics-card
|
||||
style="flex: 1"
|
||||
:value="0"
|
||||
label="账户余额"
|
||||
icon="el-icon-check"
|
||||
start-color="#67C23A"
|
||||
end-color="#85ce61"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StatisticsCard from '@/components/StatisticsCard'
|
||||
|
||||
export default {
|
||||
name: 'UserStatistics',
|
||||
components: {
|
||||
StatisticsCard
|
||||
},
|
||||
props: {
|
||||
userId: {
|
||||
type: String,
|
||||
default: null,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBrief()
|
||||
},
|
||||
methods: {
|
||||
getBrief() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics-wrapper{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
.statistics-title {
|
||||
margin-bottom: 8px;
|
||||
div {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
</style>
|
184
src/views/system/user/view/view.vue
Normal file
184
src/views/system/user/view/view.vue
Normal file
|
@ -0,0 +1,184 @@
|
|||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<el-row :gutter="12">
|
||||
<!-- 左侧个人信息 -->
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="6" class="mb-12">
|
||||
<el-card class="user-info-card card-box" shadow="hover">
|
||||
<div slot="header" class="card-header">
|
||||
<span>个人信息</span>
|
||||
</div>
|
||||
<div class="avatar-box">
|
||||
<avatar :src="detail.avatar" :size="64" :name="detail.nickName" :char-index="-1"/>
|
||||
<div class="name">{{ detail.nickName | dv}}</div>
|
||||
</div>
|
||||
<div>
|
||||
<line-field label="角色">
|
||||
{{ detail.roles.map(role => role.roleName).join(',') }}
|
||||
</line-field>
|
||||
<line-field label="手机号" :value="detail.phonenumber" />
|
||||
<line-field label="登录账号" :value="detail.userName" />
|
||||
<line-field label="分成比例">
|
||||
{{ detail.point | fix2 | dv }} %
|
||||
</line-field>
|
||||
<line-field label="实名认证">
|
||||
<boolean-tag :value="detail.isReal" size="small"/>
|
||||
</line-field>
|
||||
<line-field label="所属代理" :value="detail.agentName" />
|
||||
<line-field label="最后登录IP" :value="detail.loginIp" />
|
||||
<line-field label="最后登录时间" :value="detail.loginDate" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧统计信息 -->
|
||||
<el-col :xs="24" :sm="24" :md="16" :lg="18">
|
||||
<!-- 统计数据 -->
|
||||
<user-statistics class="mb-12" v-if="detail.userId" :user-id="detail.userId" />
|
||||
|
||||
<!-- 数据曲线图 -->
|
||||
<el-card class="card-box" shadow="hover">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="分成统计">
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card class="card-box" style="margin-top: 12px;" shadow="hover" v-if="detail.userId">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="分成记录">
|
||||
<bonus :query="{arrivalId: detail.userId, arrivalTypes: BonusArrivalType.userList()}" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUser } from '@/api/system/user'
|
||||
import LineField from '@/components/LineField'
|
||||
import Avatar from '@/components/Avatar'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import UserStatistics from '@/views/system/user/view/components/UserStatistics'
|
||||
import CollapsePanel from '@/components/CollapsePanel'
|
||||
import BooleanTag from '@/components/BooleanTag'
|
||||
import Bonus from '@/views/bst/bonus/index.vue'
|
||||
import { BonusArrivalType } from '@/utils/enums'
|
||||
|
||||
export default {
|
||||
name: 'UserView',
|
||||
components: {
|
||||
LineField,
|
||||
UserStatistics,
|
||||
CollapsePanel,
|
||||
Avatar,
|
||||
BooleanTag,
|
||||
Bonus
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
BonusArrivalType,
|
||||
detail: {
|
||||
roles: []
|
||||
},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
checkPermi,
|
||||
/**
|
||||
* 获取用户详细信息
|
||||
*/
|
||||
getDetail() {
|
||||
this.loading = true
|
||||
getUser(this.$route.params.userId).then(res => {
|
||||
this.detail = res.data
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
padding: 12px;
|
||||
|
||||
.user-info-card {
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.mb-12 {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.login-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 13px;
|
||||
|
||||
span {
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-descriptions-item__label) {
|
||||
color: #606266;
|
||||
width: auto;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
:deep(.el-descriptions-item__content) {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
:deep(.el-card__body) {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
:deep(.el-descriptions-item) {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
:deep(.el-tag--small) {
|
||||
height: 22px;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.avatar-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 12px;
|
||||
.name {
|
||||
font-size: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
color: #303133;
|
||||
}
|
||||
}
|
||||
|
||||
// 移动端适配
|
||||
@media screen and (max-width: 767px) {
|
||||
.app-container {
|
||||
padding: 8px;
|
||||
|
||||
.mb-12 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
:deep(.el-card__body) {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user