mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 10:00:11 +08:00
update 平台配置页面
This commit is contained in:
41
jsowell-ui/src/api/thirdParty/notification.js
vendored
Normal file
41
jsowell-ui/src/api/thirdParty/notification.js
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function notificationStationInfo(data) {
|
||||
return request({
|
||||
url: '/thirdparty/notification/notificationStationInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function notificationStationStatus(data) {
|
||||
return request({
|
||||
url: '/thirdparty/notification/notificationStationStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function notificationConnectorChargeStatus(data) {
|
||||
return request({
|
||||
url: '/thirdparty/notification/notificationConnectorChargeStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function notificationChargeOrderInfo(data) {
|
||||
return request({
|
||||
url: '/thirdparty/notification/notificationChargeOrderInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function notificationStationFee(data) {
|
||||
return request({
|
||||
url: '/thirdparty/notification/notificationStationFee',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
9
jsowell-ui/src/api/thirdParty/secret.js
vendored
9
jsowell-ui/src/api/thirdParty/secret.js
vendored
@@ -42,3 +42,12 @@ export function delSecret(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据第三方平台类型查询对接第三方平台的站点列表
|
||||
export function selectStationList(data) {
|
||||
return request({
|
||||
url: '/thirdparty/secret/selectStationList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,55 +1,58 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="168px"
|
||||
@submit.native.prevent>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="168px"
|
||||
@submit.native.prevent>
|
||||
<el-form-item label="所属运营商" prop="merchantId" label-width="120">
|
||||
<el-select v-model="queryParams.merchantId" filterable clearable placeholder="请选择运营商"
|
||||
@change="changeSelectStation(queryParams.merchantId)">
|
||||
@change="changeSelectStation(queryParams.merchantId)">
|
||||
<el-option v-for="item in merchantList" :key="item.merchantName" :label="item.merchantName"
|
||||
:value="item.id" />
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="站点" prop="stationId">
|
||||
<el-select v-model="queryParams.stationId" placeholder="请选择站点" clearable filterable style="width: 140px">
|
||||
<el-select v-model="queryParams.stationId" placeholder="请选择站点" clearable filterable
|
||||
style="width: 140px">
|
||||
<el-option v-for="(station, index) in stationList" :key="index" :label="station.stationName"
|
||||
:value="station.id" />
|
||||
:value="station.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单编号" prop="orderCode">
|
||||
<el-input v-model="queryParams.orderCode" placeholder="请输入订单编号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable style="width: 140px">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable
|
||||
style="width: 140px">
|
||||
<el-option v-for="item1 in dict.type.order_status" :key="item1.value" :label="item1.label"
|
||||
:value="item1.value" />
|
||||
:value="item1.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手机号码" prop="mobileNumber">
|
||||
<el-input v-model="queryParams.mobileNumber" placeholder="请输入手机号码" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<div v-if="buttonBoolean">
|
||||
<el-form-item label="交易流水号" prop="transactionCode" label-width="120">
|
||||
<el-input v-model="queryParams.transactionCode" placeholder="请输入交易流水号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="充电桩编号" prop="pileSn">
|
||||
<el-input v-model="queryParams.pileSn" placeholder="请输入充电桩编号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker v-model="createTimeRange" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']" type="daterange" range-separator="-"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" :clearable="true" />
|
||||
:default-time="['00:00:00', '23:59:59']" type="daterange" range-separator="-"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" :clearable="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算时间">
|
||||
<el-date-picker v-model="settleTimeRange" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']" type="daterange" range-separator="-"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" :clearable="true" />
|
||||
:default-time="['00:00:00', '23:59:59']" type="daterange" range-separator="-"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" :clearable="true"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-button @click="showOrHide()" style="
|
||||
@@ -75,13 +78,14 @@
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['order:order:export']">导出
|
||||
v-hasPermi="['order:order:export']">导出
|
||||
</el-button>
|
||||
<div>
|
||||
<ul>
|
||||
<li v-for="totalDate in totalDateList">
|
||||
{{ totalDate.dateDescription }}期间,总用电量{{ totalDate.sumUsedElectricity }}度,总消费金额{{
|
||||
totalDate.sumOrderAmount }}元,总结算金额{{ totalDate.sumSettleAmount }}元
|
||||
totalDate.sumOrderAmount
|
||||
}}元,总结算金额{{ totalDate.sumSettleAmount }}元
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -97,9 +101,9 @@
|
||||
</el-row>
|
||||
<el-skeleton style="width: 100%" :loading="loading" animated :count="3">
|
||||
<template slot="template">
|
||||
<el-skeleton-item variant="text" style="width: 100%; height: 100%" />
|
||||
<el-skeleton-item variant="text" style="width: 100%; height: 100%"/>
|
||||
<div style="padding: 14px">
|
||||
<el-skeleton-item variant="h3" style="width: 50%" />
|
||||
<el-skeleton-item variant="h3" style="width: 50%"/>
|
||||
<div style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -107,15 +111,15 @@
|
||||
margin-top: 16px;
|
||||
height: 16px;
|
||||
">
|
||||
<el-skeleton-item variant="text" style="margin-right: 16px" />
|
||||
<el-skeleton-item variant="text" style="width: 30%" />
|
||||
<el-skeleton-item variant="text" style="margin-right: 16px"/>
|
||||
<el-skeleton-item variant="text" style="width: 30%"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template>
|
||||
<template v-if="orderList.length !== 0">
|
||||
<div class="cardview-box" v-for="(item, orderIndex) in orderList" :key="orderIndex"
|
||||
@change="handleSelectionChange">
|
||||
@change="handleSelectionChange">
|
||||
<div class="cardview-static">
|
||||
<div>
|
||||
<router-link :to="'/order/index/orderDetail/' + item.orderCode" class="link-type">
|
||||
@@ -150,8 +154,9 @@
|
||||
<el-descriptions-item label="结束充电时间">{{ item.chargeEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="item.startMode == 4 && item.thirdPartyType != null"
|
||||
label="启动方式">{{
|
||||
item.thirdPartyType }}
|
||||
label="启动方式">{{
|
||||
item.thirdPartyType
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-else label="启动方式">{{ startMode(item.startMode) }}
|
||||
</el-descriptions-item>
|
||||
@@ -160,7 +165,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList"/>
|
||||
</template>
|
||||
<el-empty description="暂无数据" v-else></el-empty>
|
||||
</template>
|
||||
@@ -178,13 +183,13 @@ import {
|
||||
totalData,
|
||||
} from "@/api/order/order";
|
||||
import Template from "@/views/billing/template";
|
||||
import { getStationListByMerchantId, getStationSelectList, listStation } from "@/api/pile/station";
|
||||
import { getDay } from "@/utils/common";
|
||||
import { getMerchantList } from "@/api/pile/merchant";
|
||||
import {getStationListByMerchantId, getStationSelectList, listStation} from "@/api/pile/station";
|
||||
import {getDay} from "@/utils/common";
|
||||
import {getMerchantList} from "@/api/pile/merchant";
|
||||
|
||||
export default {
|
||||
name: "Order",
|
||||
components: { Template },
|
||||
components: {Template},
|
||||
|
||||
dicts: ["order_status", "start_mode", "pay_mode", "pay_status"],
|
||||
data() {
|
||||
@@ -501,7 +506,7 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 订单详情序号 */
|
||||
rowOrderDetailIndex({ row, rowIndex }) {
|
||||
rowOrderDetailIndex({row, rowIndex}) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 订单详情添加按钮操作 */
|
||||
|
||||
129
jsowell-ui/src/views/thirdparty/secret/detail.vue
vendored
129
jsowell-ui/src/views/thirdparty/secret/detail.vue
vendored
@@ -81,7 +81,80 @@
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="同步数据" name="notification">
|
||||
<template v-if="stationList.length > 0">
|
||||
<el-row :gutter="20">
|
||||
<div v-for="s in stationList" :key="s" class="text item">
|
||||
<el-col :span="8">
|
||||
<el-card class="box-card" style="margin-right: 50px;" shadow="hover">
|
||||
<el-descriptions title="站点">
|
||||
<el-descriptions-item label="站点id">{{ s.stationId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="站点名称">{{ s.stationName }}</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<el-button @click="clickDrawer(s.stationId, s.stationName)" type="primary" style="margin-left: 16px;">
|
||||
打开通知菜单
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-empty description="暂无数据" v-else></el-empty>
|
||||
|
||||
<el-drawer
|
||||
:title="drawerTitle"
|
||||
:visible.sync="drawer"
|
||||
:direction="direction">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="grid-content bg-purple-dark">
|
||||
<span>推送充电站信息变化</span>
|
||||
<el-form ref="form" :model="form" label-width="20%">
|
||||
<el-form-item label="活动名称">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">推送</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="grid-content bg-purple-dark">
|
||||
<span>推送设备状态</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="grid-content bg-purple-dark">
|
||||
<span>推送设备充电中状态</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="grid-content bg-purple-dark">
|
||||
<span>推送充电订单信息</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="grid-content bg-purple-dark">
|
||||
<span>推送站点费率</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-drawer>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
@@ -91,12 +164,13 @@
|
||||
<script>
|
||||
|
||||
|
||||
import {addSecret, getSecret, updateSecret} from "@/api/thirdParty/secret";
|
||||
import {addSecret, getSecret, selectStationList, updateSecret} from "@/api/thirdParty/secret";
|
||||
import {generateRandomID, isEmptyString} from "@/utils/common";
|
||||
import Template from "@/views/billing/template";
|
||||
|
||||
export default {
|
||||
dicts: ["third_party_type"],
|
||||
components: {},
|
||||
components: {Template},
|
||||
data() {
|
||||
return {
|
||||
activeName: "secret",
|
||||
@@ -105,14 +179,45 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
rules: {},
|
||||
stationList: [],
|
||||
platformType: null,
|
||||
drawer: false,
|
||||
direction: 'rtl',
|
||||
drawerTitle: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.updateTitle();
|
||||
this.querySecretDetail();
|
||||
},
|
||||
methods: {
|
||||
// 提交
|
||||
onSubmit() {
|
||||
|
||||
},
|
||||
clickDrawer(stationId, stationName) {
|
||||
console.log("站点id:", stationId);
|
||||
this.drawerTitle = "同步【" + stationName + "】站点的数据到【" + this.platformName + "】";
|
||||
this.drawer = true;
|
||||
},
|
||||
// Drawer :before-close="handleClose"
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
// 查询站点列表
|
||||
queryStationList() {
|
||||
const param = {
|
||||
platformType: this.platformType
|
||||
};
|
||||
selectStationList(param).then(response => {
|
||||
this.stationList = response.data;
|
||||
console.log(this.stationList);
|
||||
});
|
||||
},
|
||||
// 生成密钥
|
||||
clickGenerateSecret() {
|
||||
// 是否有值,默认false
|
||||
@@ -145,14 +250,20 @@ export default {
|
||||
this.form.ourSigSecret = generateRandomID(16);
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
// this.initializeData(tab.name);
|
||||
// console.log("handleClick", tab, event);
|
||||
this.initializeData(tab.name);
|
||||
},
|
||||
initializeData(name) {
|
||||
if (name === "secret") {
|
||||
this.querySecretDetail();
|
||||
} else if (name === "notification") {
|
||||
this.queryStationList();
|
||||
}
|
||||
},
|
||||
querySecretDetail() {
|
||||
getSecret(this.id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
// this.title = "修改对接三方平台配置";
|
||||
this.platformType = response.data.platformType;
|
||||
});
|
||||
},
|
||||
// 更新页面title显示
|
||||
@@ -183,7 +294,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.initializeData(this.activeName);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user