mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
个人桩解绑
This commit is contained in:
@@ -129,3 +129,12 @@ export function generatePileSecret() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 解绑个人桩
|
||||
export function userUnbindPile(data) {
|
||||
return request({
|
||||
url: '/pile/basic/userUnbindPile',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -185,8 +185,10 @@
|
||||
<el-table-column property="orderCode" label="订单编号" align="center" />
|
||||
<el-table-column property="settleAmount" label="结算金额(元)" align="center" />
|
||||
<el-table-column property="" label="分润类型" align="center" />
|
||||
<el-table-column property="" label="分润比例" align="center" />
|
||||
<el-table-column property="" label="分润金额(元)" align="center" />
|
||||
<el-table-column property="" label="电费分润比例" align="center" />
|
||||
<el-table-column property="" label="电费分润金额(元)" align="center" />
|
||||
<el-table-column property="" label="服务费分润比例" align="center" />
|
||||
<el-table-column property="" label="服务费分润金额(元)" align="center" />
|
||||
</el-table>
|
||||
<pagination v-show="orderTotal > 0" :total="orderTotal" :page.sync="getOrderParams.pageNum" :limit.sync="getOrderParams.pageSize" @pagination="getOrderList" />
|
||||
</el-dialog>
|
||||
|
||||
@@ -102,8 +102,9 @@
|
||||
<div class="advContent" v-if="personalPileInfoList"
|
||||
v-for="personalPileInfo in personalPileInfoList">
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<div slot="header" class="clearUnbinding">
|
||||
<span>个人桩信息</span>
|
||||
<p @click="unbinding">解绑</p>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div style="margin: 10px 0">
|
||||
@@ -157,7 +158,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column width="118px" align="center" prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex; align-items: center;justify-content: center;" v-if="scope.row.status === 255">
|
||||
<div style="display: flex; align-items: center;justify-content: center;"
|
||||
v-if="scope.row.status === 255">
|
||||
<el-tooltip class="item" effect="dark"
|
||||
:content="'故障原因:' + scope.row.faultReason" placement="top">
|
||||
<dict-tag :options="dict.type.connector_status"
|
||||
@@ -243,6 +245,7 @@ import {
|
||||
listBasic,
|
||||
updateBasic,
|
||||
updatePileName, updateThirdPartySnRelation,
|
||||
userUnbindPile
|
||||
} from "@/api/pile/basic";
|
||||
import { queryConnectorListByParams } from "@/api/pile/connector";
|
||||
// 二维码组件
|
||||
@@ -494,6 +497,36 @@ export default {
|
||||
this.total = response.data.total;
|
||||
});
|
||||
},
|
||||
// 解绑
|
||||
unbinding() {
|
||||
console.log('解绑', this.pileDetail.pileSn);
|
||||
let from = {
|
||||
pileSn: this.pileDetail.pileSn
|
||||
}
|
||||
// 弹出确认框
|
||||
this.$confirm('确定要解绑该设备吗?此操作不可逆,请谨慎操作。', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
userUnbindPile(from)
|
||||
.then((response) => {
|
||||
console.log("response", response);
|
||||
if (response.resCode === '00100000') {
|
||||
this.$modal.msgSuccess("解绑成功");
|
||||
this.getMemberInfoBySn();
|
||||
} else {
|
||||
this.$modal.msgError(response.msg);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("错误日志", error);
|
||||
this.$modal.msgError("解绑失败,请重试");
|
||||
});
|
||||
}).catch(() => {
|
||||
console.log("用户取消了解绑操作");
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
pileSn(newValue, oldValue) {
|
||||
@@ -510,6 +543,7 @@ export default {
|
||||
.advContent {
|
||||
background: #fff;
|
||||
border-radius: 5px 5px 0px 0px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.sideNav {
|
||||
@@ -544,4 +578,16 @@ export default {
|
||||
::v-deep input[type="number"] {
|
||||
-moz-appearance: textfield !important;
|
||||
}
|
||||
|
||||
.clearUnbinding {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
p {
|
||||
color: #46a6ff;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user