调整
This commit is contained in:
parent
f402635178
commit
88a638c7e2
44
src/api/system/commandLog.js
Normal file
44
src/api/system/commandLog.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询命令日志列表
|
||||
export function listCommandLog(query) {
|
||||
return request({
|
||||
url: '/system/commandLog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询命令日志详细
|
||||
export function getCommandLog(id) {
|
||||
return request({
|
||||
url: '/system/commandLog/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增命令日志
|
||||
export function addCommandLog(data) {
|
||||
return request({
|
||||
url: '/system/commandLog',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改命令日志
|
||||
export function updateCommandLog(data) {
|
||||
return request({
|
||||
url: '/system/commandLog',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除命令日志
|
||||
export function delCommandLog(id) {
|
||||
return request({
|
||||
url: '/system/commandLog/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -84,6 +84,14 @@ export function deduction(data) {
|
|||
return request({
|
||||
url: '/appVerify/order/deduction',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 押金退款
|
||||
export function handleRefund(orderId) {
|
||||
return request({
|
||||
url: '/system/order/depositRefund/'+orderId,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
|
|
@ -142,25 +142,31 @@ export default {
|
|||
})
|
||||
}
|
||||
},
|
||||
addMarker(lng, lat, title,status,onlineStatus) {
|
||||
addMarker: function(lng, lat, title, status, onlineStatus) {
|
||||
//创建一个 Marker 实例:
|
||||
console.log("title==========="+title)
|
||||
console.log('title===========' + title)
|
||||
let icon = this.formarStatus(status, onlineStatus)
|
||||
console.log('icon===========' + icon)
|
||||
let marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(lng, lat), //经纬度对象
|
||||
icon: this.formarStatus(status,onlineStatus),
|
||||
icon: new AMap.Icon({
|
||||
image: icon,
|
||||
size: new AMap.Size(25, 30), // 设置图标的宽高
|
||||
imageSize: new AMap.Size(25, 30) // 设置图标的实际显示尺寸
|
||||
}),
|
||||
title: title,
|
||||
offset: new AMap.Pixel(-20, -40)
|
||||
});
|
||||
offset: new AMap.Pixel(-12.5, -35)
|
||||
})
|
||||
//将创建的点标记添加到已有的地图实例:
|
||||
this.map.add(marker);
|
||||
this.markers.push(marker);
|
||||
this.map.add(marker)
|
||||
this.markers.push(marker)
|
||||
|
||||
// 创建一个 Text 实例来显示标题
|
||||
let text = new AMap.Text({
|
||||
text: title,
|
||||
anchor: 'center', // 设置文本的锚点
|
||||
position: new AMap.LngLat(lng, lat), // 经纬度对象
|
||||
offset: new AMap.Pixel(0, -55),
|
||||
offset: new AMap.Pixel(0, -50),
|
||||
style: {
|
||||
'background-color': '#1890ff', // 背景颜色为蓝色
|
||||
'border': 'none', // 边框颜色与背景一致
|
||||
|
@ -169,36 +175,34 @@ export default {
|
|||
'font-size': '14px', // 字体大小
|
||||
'padding': '5px 10px' // 内边距,调整文本框的大小
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// 将文本标签添加到地图实例
|
||||
this.map.add(text);
|
||||
this.map.add(text)
|
||||
},
|
||||
formarStatus(status,onlineStatus){
|
||||
function formarStatus(status,onlineStatus) {
|
||||
if(onlineStatus == "0"){
|
||||
if(status == "3"){
|
||||
return globalConfig.icon.redyellow;
|
||||
}else if(status == "4"){
|
||||
return globalConfig.icon.orangered;
|
||||
}
|
||||
return globalConfig.icon.red;
|
||||
}else{
|
||||
if(status == "0"){
|
||||
return globalConfig.icon.gray;
|
||||
}else if(status == "1"){
|
||||
return globalConfig.icon.blue;
|
||||
}else if(status == "2"){
|
||||
return globalConfig.icon.green;
|
||||
}else if(status == "3"){
|
||||
return globalConfig.icon.yellow;
|
||||
}else if(status == "4"){
|
||||
return globalConfig.icon.orange;
|
||||
}else if(status == "8"){
|
||||
return globalConfig.icon.gray;
|
||||
}else if(status == "9"){
|
||||
return globalConfig.icon.gray;
|
||||
}
|
||||
if(onlineStatus == "0"){
|
||||
if(status == "3"){
|
||||
return globalConfig.icon.redyellow;
|
||||
}else if(status == "4"){
|
||||
return globalConfig.icon.orangered;
|
||||
}
|
||||
return globalConfig.icon.red;
|
||||
}else{
|
||||
if(status == "0"){
|
||||
return globalConfig.icon.gray;
|
||||
}else if(status == "1"){
|
||||
return globalConfig.icon.blue;
|
||||
}else if(status == "2"){
|
||||
return globalConfig.icon.green;
|
||||
}else if(status == "3"){
|
||||
return globalConfig.icon.yellow;
|
||||
}else if(status == "4"){
|
||||
return globalConfig.icon.orange;
|
||||
}else if(status == "8"){
|
||||
return globalConfig.icon.gray;
|
||||
}else if(status == "9"){
|
||||
return globalConfig.icon.gray;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,17 +1,30 @@
|
|||
<template>
|
||||
<div class="app-container home">
|
||||
<div v-if="userName != 'admin' " >
|
||||
<span>可用余额: </span><span style="color: red;font-weight: 700">{{balance}}</span> 元
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getBalance } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
name: "Index",
|
||||
data() {
|
||||
return {
|
||||
// 版本号
|
||||
version: "3.8.7"
|
||||
version: "3.8.7",
|
||||
balance: null,
|
||||
userName: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.userName = this.$store.state.user.name;
|
||||
getBalance().then(response => {
|
||||
this.balance = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goTarget(href) {
|
||||
window.open(href, "_blank");
|
||||
|
|
|
@ -308,6 +308,14 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否开启押金抵扣" label-width="120">
|
||||
<el-radio-group v-model="form.isDepositDeduction" style="width: 60%">
|
||||
<el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"
|
||||
:label="dict.value">{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
|
294
src/views/system/commandLog/index.vue
Normal file
294
src/views/system/commandLog/index.vue
Normal file
|
@ -0,0 +1,294 @@
|
|||
<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="command">
|
||||
<el-input
|
||||
v-model="queryParams.command"
|
||||
placeholder="请输入命令"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="MAC" prop="mac">
|
||||
<el-input
|
||||
v-model="queryParams.mac"
|
||||
placeholder="请输入mac"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="SN" prop="sn">
|
||||
<el-input
|
||||
v-model="queryParams.sn"
|
||||
placeholder="请输入sn"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-input
|
||||
v-model="queryParams.type"
|
||||
placeholder="请输入类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</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-hasPermi="['system:commandLog:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:commandLog:edit']"
|
||||
>修改</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-hasPermi="['system:commandLog:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:commandLog:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="commandLogList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="请求url" align="center" prop="url" />
|
||||
<el-table-column label="命令" align="center" prop="command" />
|
||||
<el-table-column label="类型" align="center" prop="type" />
|
||||
<el-table-column label="mac" align="center" prop="mac" />
|
||||
<el-table-column label="sn" align="center" prop="sn" />
|
||||
<el-table-column label="响应" align="center" prop="result" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <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-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:commandLog:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:commandLog:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改命令日志对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="请求url" prop="url">
|
||||
<el-input v-model="form.url" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="命令" prop="command">
|
||||
<el-input v-model="form.command" placeholder="请输入命令" />
|
||||
</el-form-item>
|
||||
<el-form-item label="mac" prop="mac">
|
||||
<el-input v-model="form.mac" placeholder="请输入mac" />
|
||||
</el-form-item>
|
||||
<el-form-item label="响应" prop="result">
|
||||
<el-input v-model="form.result" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</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>
|
||||
|
||||
<script>
|
||||
import { listCommandLog, getCommandLog, delCommandLog, addCommandLog, updateCommandLog } from "@/api/system/commandLog";
|
||||
|
||||
export default {
|
||||
name: "CommandLog",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 命令日志表格数据
|
||||
commandLogList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
url: null,
|
||||
command: null,
|
||||
mac: null,
|
||||
result: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询命令日志列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCommandLog(this.queryParams).then(response => {
|
||||
this.commandLogList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
url: null,
|
||||
command: null,
|
||||
mac: null,
|
||||
result: 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
|
||||
getCommandLog(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) {
|
||||
updateCommandLog(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCommandLog(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 delCommandLog(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/commandLog/export', {
|
||||
...this.queryParams
|
||||
}, `commandLog_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -169,7 +169,7 @@
|
|||
<el-switch v-model="form.isProfitSharing" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.isProfitSharing == true">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="平台服务费(%)" label-width="90" prop="platformServiceFee">
|
||||
<el-input style="width: 65%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
||||
</el-form-item>
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.as_device_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -113,7 +113,7 @@
|
|||
:disabled="multiple"
|
||||
@click="oneClickOnline"
|
||||
v-hasPermi="['system:device:edit']"
|
||||
>一键上线</el-button>
|
||||
>一键解禁</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -124,7 +124,7 @@
|
|||
:disabled="multiple"
|
||||
@click="oneClickOffline"
|
||||
v-hasPermi="['system:device:edit']"
|
||||
>一键下线</el-button>
|
||||
>一键禁用</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -139,19 +139,21 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="运营商" align="center" prop="deptName" v-if="userName == 'admin'"/>
|
||||
<el-table-column label="设备mac" align="center" prop="mac" />
|
||||
<el-table-column label="SN" align="center" prop="sn" />
|
||||
<el-table-column label="运营区" align="center" prop="areaName" width="60"/>
|
||||
<el-table-column label="mac" align="center" prop="mac" width="70"/>
|
||||
<el-table-column label="SN" align="center" prop="sn" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||
<el-table-column label="车辆型号" align="center" prop="model" />
|
||||
<el-table-column label="车牌号" align="center" prop="vehicleNum" />
|
||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||
<el-table-column label="车牌号" align="center" prop="vehicleNum" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||
<el-table-column label="定位" align="center" prop="location" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="电压(V)" align="center" prop="voltage" />
|
||||
<el-table-column label="信号强度" align="center" prop="signalStrength" />
|
||||
<el-table-column label="版本" align="center" prop="version" />
|
||||
<el-table-column label="剩余电量(%)" align="center" prop="remainingPower" />
|
||||
<el-table-column label="版本" align="center" prop="version" width="70" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||
<el-table-column label="信号" align="center" prop="signalStrength" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||
<el-table-column label="卫星" align="center" prop="satellites" width="70" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||
<el-table-column label="质量" align="center" prop="quality" width="60"/>
|
||||
<el-table-column label="电压" align="center" prop="voltage" width="60" :formatter="formatVoltage"/>
|
||||
<el-table-column label="电量" align="center" prop="remainingPower" width="70" sortable="custom" :sort-orders="['descending', 'ascending']" :formatter="formatPower"/>
|
||||
<el-table-column label="车辆状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.as_device_status" :value="scope.row.status"/>
|
||||
|
@ -180,12 +182,12 @@
|
|||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="90">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" width="160" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
@ -207,7 +209,7 @@
|
|||
icon="el-icon-edit"
|
||||
@click="handleListing(scope.row)"
|
||||
v-hasPermi="['system:fault:edit']"
|
||||
>{{ scope.row.status === '0' ? '上线' : '下线' }}</el-button>
|
||||
>{{ scope.row.status === '0' ? '出仓' : '回仓' }}</el-button>
|
||||
<el-button v-if="scope.row.status!= '3'"
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -228,7 +230,7 @@
|
|||
icon="el-icon-edit"
|
||||
@click="handleOnline(scope.row)"
|
||||
v-hasPermi="['system:device:online']"
|
||||
>{{ scope.row.status === '8' ? '上线' : '下线' }}</el-button>
|
||||
>{{ scope.row.status === '8' ? '解禁' : '禁用' }}</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -275,7 +277,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆型号" prop="modelId" >
|
||||
<el-select v-model="form.modelId" placeholder="请选择车辆型号">
|
||||
<el-select v-model="form.modelId" clearable placeholder="请选择车辆型号">
|
||||
<el-option
|
||||
v-for="item in modelOptions"
|
||||
:key="item.modelId"
|
||||
|
@ -426,7 +428,7 @@ import ReplacementRecord from "@/views/system/device/components/replacementRecor
|
|||
import PlaceSearchDialog from '@/components/Map/location/PlaceSearchDialog';
|
||||
import { parseTime } from '../../../utils/ruoyi';
|
||||
import LocationMap from '@/components/Map/location/LocationMap.vue';
|
||||
import { listModel} from "@/api/system/model";
|
||||
import { getModel, listModel } from '@/api/system/model'
|
||||
import QrCode from "@/components/QrCode/index.vue";
|
||||
import { listArea } from '@/api/system/area'
|
||||
import { listDept } from '@/api/system/dept'
|
||||
|
@ -459,10 +461,13 @@ export default {
|
|||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
statusOptions: [],
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 默认排序
|
||||
defaultSort: {prop: 'sn', order: 'ascending'},
|
||||
// 设备表格数据
|
||||
deviceList: [],
|
||||
// 弹出层标题
|
||||
|
@ -494,9 +499,9 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
modelId: [
|
||||
{ required: true, message: "型号不能为空", trigger: "blur" }
|
||||
],
|
||||
// modelId: [
|
||||
// { required: true, message: "型号不能为空", trigger: "blur" }
|
||||
// ],
|
||||
sn: [
|
||||
{ required: true, message: "SN不能为空", trigger: "blur" }
|
||||
],
|
||||
|
@ -508,19 +513,70 @@ export default {
|
|||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.getDicts("as_device_status").then(response => {
|
||||
// console.log("response.data------",response.data)
|
||||
let options = response.data;
|
||||
let mergedObj = { dictValue: '34', dictLabel: '使用中' };
|
||||
options = options.filter(option => {
|
||||
return option.dictValue !== '3' && option.dictValue !== '4';
|
||||
});
|
||||
options.splice(4, 0, mergedObj);
|
||||
this.statusOptions = options;
|
||||
// console.log("statusOptions------",this.statusOptions)
|
||||
});
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
console.log("------"+this.activeIndex)
|
||||
// console.log("------"+this.activeIndex)
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
listModel(this.queryParams).then(response => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
listArea(this.queryParams).then(response => {
|
||||
this.areaOptions = response.rows;
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
'form.modelId': function(newVal) {
|
||||
if (newVal) {
|
||||
this.fetchData(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 当选择车型时调用 */
|
||||
fetchData(modelId) {
|
||||
// console.log("根据车型id查询运营商"+modelId)
|
||||
getModel(modelId).then(response => {
|
||||
this.areaOptions = response.data.areaList;
|
||||
let areaOptions = response.data.areaList;
|
||||
areaOptions.length > 0 ? this.form.areaId = areaOptions[0].areaId : this.form.areaId = null;
|
||||
});
|
||||
},
|
||||
/** 排序触发事件 */
|
||||
handleSortChange(column, prop, order) {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
this.getList();
|
||||
},
|
||||
formatVoltage(row){
|
||||
if(row == undefined || row.voltage == null){
|
||||
return "";
|
||||
}
|
||||
return row.voltage + 'V';
|
||||
},
|
||||
formatPower(row){
|
||||
if(row == undefined || row.remainingPower == null){
|
||||
return "";
|
||||
}
|
||||
return row.remainingPower + '%';
|
||||
},
|
||||
oneClickOnline(row){
|
||||
const deviceIds = row.deviceId || this.ids;
|
||||
this.$modal.confirm('确认一键上线?').then(function() {
|
||||
this.$modal.confirm('确认一键解禁?').then(function() {
|
||||
return oneClickOnline(deviceIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
|
@ -529,7 +585,7 @@ export default {
|
|||
},
|
||||
oneClickOffline(row){
|
||||
const deviceIds = row.deviceId || this.ids;
|
||||
this.$modal.confirm('确认一键下线?').then(function() {
|
||||
this.$modal.confirm('确认一键禁用?').then(function() {
|
||||
return oneClickOffline(deviceIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
|
@ -584,12 +640,6 @@ export default {
|
|||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
listModel(this.queryParams).then(response => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
listArea(this.queryParams).then(response => {
|
||||
this.areaOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
@ -664,10 +714,10 @@ export default {
|
|||
const deviceId = row.deviceId || this.ids
|
||||
getDevice(deviceId).then(response => {
|
||||
let form1 = response.data;
|
||||
let text = form1.status === '0'? '上线': '下线';
|
||||
let text = form1.status === '0'? '出仓': '回仓';
|
||||
form1.status = form1.status === '0'? '1': '0';
|
||||
if(form1.areaId == null){
|
||||
this.$modal.msgError("未绑定运营区,无法上线!")
|
||||
this.$modal.msgError("未绑定运营区,无法出仓!")
|
||||
}else{
|
||||
this.$modal.confirm('是否确认'+text+'设备MAC为"' + form1.mac + '"的设备吗?').then(function() {
|
||||
return updateDevice(form1);
|
||||
|
@ -684,10 +734,10 @@ export default {
|
|||
const deviceId = row.deviceId || this.ids
|
||||
getDevice(deviceId).then(response => {
|
||||
let form1 = response.data;
|
||||
let text = form1.status === '8'? '上线': '下线';
|
||||
let text = form1.status === '8'? '解禁': '禁用';
|
||||
form1.status = form1.status === '8'? '1': '8';
|
||||
if(form1.areaId == null){
|
||||
this.$modal.msgError("未绑定运营区,无法上线!")
|
||||
this.$modal.msgError("未绑定运营区,无法解禁!")
|
||||
}else{
|
||||
this.$modal.confirm('是否确认'+text+'设备MAC为"' + form1.mac + '"的设备吗?').then(function() {
|
||||
return updateDevice(form1);
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<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="areaId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.areaId"-->
|
||||
<!-- placeholder="请输入区域"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
|
||||
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.areaId"
|
||||
:label="item.areaName"
|
||||
:value="item.areaId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联订单号" label-width="90" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
|
@ -99,9 +101,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>
|
||||
<el-table-column label="手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
||||
<el-table-column label="平台服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
||||
<el-table-column label="运营商分账" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
||||
<el-table-column label="运营商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
|
||||
<el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>
|
||||
<!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>-->
|
||||
<el-table-column label="支付方式" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_pay_type" :value="scope.row.payType"/>
|
||||
|
@ -185,6 +188,7 @@
|
|||
|
||||
<script>
|
||||
import { listFlow, getFlow, delFlow, addFlow, updateFlow } from "@/api/system/flow";
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
|
||||
export default {
|
||||
name: "Flow",
|
||||
|
@ -201,6 +205,9 @@ export default {
|
|||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
areaOptions: [],
|
||||
// 选中数组
|
||||
userName: undefined,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 总条数
|
||||
|
@ -235,12 +242,21 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getAreaList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询字典类型列表 */
|
||||
getAreaList() {
|
||||
getAreaOptionselect().then(response => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
},
|
||||
formatAmount(row, column) {
|
||||
const key = column.property;
|
||||
return parseFloat(row[key]).toFixed(2);
|
||||
return parseFloat(row[key] || 0).toFixed(2);
|
||||
},
|
||||
/** 查询资金流水列表 */
|
||||
getList() {
|
||||
|
|
|
@ -35,6 +35,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="vehicleNum">
|
||||
<el-input
|
||||
v-model="queryParams.vehicleNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
|
@ -103,11 +111,11 @@
|
|||
<dict-tag :options="dict.type.et_pay_type" :value="scope.row.payType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_order_type" :value="scope.row.type"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="类型" align="center" prop="type">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.et_order_type" :value="scope.row.type"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="金额(元)" align="center" prop="totalFee" width="70"/>
|
||||
<el-table-column label="备注" align="center" prop="mark" />
|
||||
<el-table-column label="订单时长" align="center" prop="duration" :formatter="formatDuration"/>
|
||||
|
@ -133,6 +141,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == 1 || scope.row.status == 3"
|
||||
v-show="scope.row.isDepositDeduction == '1'"
|
||||
icon="el-icon-edit"
|
||||
@click="deduction(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
|
@ -328,7 +337,7 @@
|
|||
deduction
|
||||
} from '@/api/system/order'
|
||||
import TrajectoryMap from '@/components/Map/TrajectoryMap'
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
import { getArea, optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
|
||||
export default {
|
||||
name: "Order",
|
||||
|
@ -354,6 +363,7 @@ export default {
|
|||
total: 0,
|
||||
// 订单表格数据
|
||||
orderList: [],
|
||||
area: null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title2: "",
|
||||
|
@ -462,14 +472,29 @@ export default {
|
|||
});
|
||||
},
|
||||
// 押金抵扣
|
||||
deduction(row){
|
||||
this.$modal.confirm('是否确认用押金抵扣?').then(function() {
|
||||
return deduction({orderNo:row.orderNo});
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
deduction: function(row) {
|
||||
getArea(row.areaId).then(response => {
|
||||
let area = response.data
|
||||
let deposit = parseFloat(area.deposit);
|
||||
if(row.totalFee > deposit ){//订单金额大于押金
|
||||
this.$modal.confirm('订单金额【'+row.totalFee+'】大于押金【'+deposit+'】,是否确认押金抵扣,并结束订单?').then(function() {
|
||||
return deduction({ orderNo: row.orderNo })
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
}else{
|
||||
this.$modal.confirm('是否确认用押金抵扣?').then(function() {
|
||||
return deduction({ orderNo: row.orderNo })
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
refund(row){
|
||||
// console.log('changePrice')
|
||||
|
|
|
@ -55,6 +55,18 @@
|
|||
<dict-tag :options="dict.type.et_recharge_status" :value="scope.row.rechargeStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.rechargeType == '2'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleRefund(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
@ -78,7 +90,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { rechargeList, getOrder, delOrder, addOrder, updateOrder } from "@/api/system/order";
|
||||
import { rechargeList, getOrder, delOrder, addOrder, updateOrder, handleRefund, deduction } from '@/api/system/order'
|
||||
|
||||
export default {
|
||||
name: "Order",
|
||||
|
@ -142,6 +154,15 @@ export default {
|
|||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleRefund(row){
|
||||
this.$modal.confirm('是否确认押金退款?').then(function() {
|
||||
return handleRefund(row.orderNo)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('退款成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
<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="areaId" v-if="userName == 'admin'">
|
||||
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.areaId"
|
||||
:label="item.areaName"
|
||||
:value="item.areaId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款单号" prop="refundNo">
|
||||
<el-input
|
||||
v-model="queryParams.refundNo"
|
||||
|
@ -63,6 +73,7 @@
|
|||
|
||||
<el-table v-loading="loading" :data="refundList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="区域" align="center" prop="areaName" />
|
||||
<el-table-column label="退款单号" align="center" prop="refundNo" />
|
||||
<el-table-column label="关联订单" align="center" prop="orderNo" />
|
||||
<el-table-column label="用户" align="center" prop="userName" />
|
||||
|
@ -98,6 +109,7 @@
|
|||
|
||||
<script>
|
||||
import { listRefund, getRefund, delRefund, addRefund, updateRefund } from "@/api/system/refund";
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
|
||||
export default {
|
||||
name: "Refund",
|
||||
|
@ -105,6 +117,7 @@ export default {
|
|||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
userName: undefined,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
|
@ -117,6 +130,7 @@ export default {
|
|||
total: 0,
|
||||
// 退款订单表格数据
|
||||
refundList: [],
|
||||
areaOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
|
@ -145,9 +159,18 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getAreaList();
|
||||
},
|
||||
methods: {
|
||||
/** 查运营区列表 */
|
||||
getAreaList() {
|
||||
getAreaOptionselect().then(response => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 查询退款订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" prop="applicant" />
|
||||
<el-table-column label="微信openid" align="center" prop="wxopenid" />
|
||||
<el-table-column label="驳回原因" align="center" prop="rejectReason" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
|
@ -121,8 +122,8 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="提现金额:元" prop="amount">
|
||||
<el-input style="width: 70%" v-model="form.amount" placeholder="请输入提现金额" />
|
||||
<el-form-item label="提现金额:" prop="amount">
|
||||
<el-input style="width: 40%" v-model="form.amount" placeholder="请输入提现金额" /> 元
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -179,6 +180,12 @@
|
|||
<dict-tag :options="dict.type.et_withdraw_status" :value="form3.status"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="驳回原因" prop="rejectReason">
|
||||
<el-input v-model="form3.rejectReason" type="textarea" placeholder="请输入驳回原因"
|
||||
:autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -194,7 +201,7 @@
|
|||
import { listWithdraw, getWithdraw, delWithdraw, addWithdraw, updateWithdraw } from "@/api/system/withdraw";
|
||||
import { getBalance, listDept } from '@/api/system/dept'
|
||||
import { fastSearch } from '@/api/user/user'
|
||||
import { bandAppUser } from '@/api/system/user'
|
||||
import { bandAppUser, getUser } from '@/api/system/user'
|
||||
import { getInfo } from '@/api/login'
|
||||
|
||||
|
||||
|
@ -254,12 +261,12 @@ export default {
|
|||
rules: {
|
||||
amount: [
|
||||
{ required: true, message: "提现金额不能为空", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: '满电续航必须为正整数', trigger: 'blur' },
|
||||
{ pattern: /^\d+$/, message: '提现金额必须为正整数', trigger: 'blur' },
|
||||
// 不能超过 balance 值
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value > this.form.balance) {
|
||||
callback(new Error('提现金额不能超过余额'));
|
||||
if (value > this.balance) {
|
||||
callback(new Error('提现金额不能超过可用余额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
|
@ -277,10 +284,11 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
console.log("当前用户信息:",this.$store.state.user.id)
|
||||
this.userName = this.$store.state.user.name;
|
||||
getInfo().then(response => {
|
||||
this.user = response.user;
|
||||
let userId = this.$store.state.user.id;
|
||||
getUser(userId).then(response => {
|
||||
this.user = response.data;
|
||||
});
|
||||
this.getList();
|
||||
if(this.userName === 'admin'){
|
||||
|
@ -314,6 +322,11 @@ export default {
|
|||
},
|
||||
/** 拒绝 */
|
||||
reject(){
|
||||
// console.log("-===========",this.form3.rejectReason)
|
||||
if(this.form3.rejectReason == undefined || this.form3.rejectReason == ''){
|
||||
this.$modal.msgError("驳回原因不能为空");
|
||||
return
|
||||
}
|
||||
this.$refs["form3"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form3.id != null) {
|
||||
|
@ -441,11 +454,11 @@ export default {
|
|||
let form2 = this.form2
|
||||
this.$refs['form2'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$modal.confirm('绑定微信用户操作需要重新登录,是否确认绑定?').then(function() {
|
||||
this.$modal.confirm('是否确认绑定?').then(function() {
|
||||
return bandAppUser({appUserId:form2.phonenumber})
|
||||
}).then(() => {
|
||||
console.log(2222222222)
|
||||
this.getList()
|
||||
// 刷新页面
|
||||
location.reload()
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user