mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-17 21:59:52 +08:00
后管站点管理页面新增查询地锁列表二维码
This commit is contained in:
@@ -9,6 +9,8 @@ import com.jsowell.common.exception.BusinessException;
|
|||||||
import com.jsowell.common.response.RestApiResponse;
|
import com.jsowell.common.response.RestApiResponse;
|
||||||
import com.jsowell.common.util.file.AliyunOssUploadUtils;
|
import com.jsowell.common.util.file.AliyunOssUploadUtils;
|
||||||
import com.jsowell.common.util.file.FileUtils;
|
import com.jsowell.common.util.file.FileUtils;
|
||||||
|
import com.jsowell.pile.service.IPileBasicInfoService;
|
||||||
|
import com.jsowell.pile.vo.uniapp.GroundLockInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.PileConnectorVO;
|
import com.jsowell.pile.vo.uniapp.PileConnectorVO;
|
||||||
import com.jsowell.service.PileService;
|
import com.jsowell.service.PileService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@Anonymous
|
@Anonymous
|
||||||
@@ -26,6 +29,9 @@ public class JumpController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PileService pileService;
|
private PileService pileService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPileBasicInfoService pileBasicInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询充电桩详情
|
* 查询充电桩详情
|
||||||
* http://localhost:8080/app-xcx-h5/pile/pileDetail/{pileSn}
|
* http://localhost:8080/app-xcx-h5/pile/pileDetail/{pileSn}
|
||||||
@@ -94,4 +100,24 @@ public class JumpController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取地锁列表信息
|
||||||
|
* http://localhost:8080/app-xcx-h5/getGroundLockInfo/{stationId}
|
||||||
|
* @param stationId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getGroundLockInfo/{stationId}")
|
||||||
|
public RestApiResponse<?> getGroundLockInfo(@PathVariable("stationId") String stationId) {
|
||||||
|
logger.info("获取地锁列表信息 params:{}", stationId);
|
||||||
|
RestApiResponse<?> response = null;
|
||||||
|
try {
|
||||||
|
List<GroundLockInfoVO> list = pileBasicInfoService.getGroundLockInfo(stationId);
|
||||||
|
response = new RestApiResponse<>(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("获取地锁列表信息 error, ", e);
|
||||||
|
response = new RestApiResponse<>(e);
|
||||||
|
}
|
||||||
|
logger.info("获取地锁列表信息 result:{}", response);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ public class PileController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IPileConnectorInfoService pileConnectorInfoService;
|
private IPileConnectorInfoService pileConnectorInfoService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IPileBasicInfoService pileBasicInfoService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPileBillingTemplateService pileBillingTemplateService;
|
private IPileBillingTemplateService pileBillingTemplateService;
|
||||||
|
|
||||||
@@ -152,24 +149,4 @@ public class PileController extends BaseController {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取地锁列表信息
|
|
||||||
* @param stationId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/getGroundLockInfo/{stationId}")
|
|
||||||
public RestApiResponse<?> getGroundLockInfo(@PathVariable("stationId") String stationId) {
|
|
||||||
logger.info("获取地锁列表信息 params:{}", stationId);
|
|
||||||
RestApiResponse<?> response = null;
|
|
||||||
try {
|
|
||||||
List<GroundLockInfoVO> list = pileBasicInfoService.getGroundLockInfo(stationId);
|
|
||||||
response = new RestApiResponse<>(list);
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("获取地锁列表信息 error, ", e);
|
|
||||||
response = new RestApiResponse<>(e);
|
|
||||||
}
|
|
||||||
logger.info("获取地锁列表信息 result:{}", response);
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,161 +1,193 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane label="订单" name="order">
|
<el-tab-pane label="订单" name="order">
|
||||||
<stationOrderList ref="order" :stationId="stationId"/>
|
<stationOrderList ref="order" :stationId="stationId"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="设备" name="pile">
|
<el-tab-pane label="设备" name="pile">
|
||||||
<pileList ref="pile" :stationId="stationId"/>
|
<pileList ref="pile" :stationId="stationId"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="充电接口" name="connector">
|
<el-tab-pane label="充电接口" name="connector">
|
||||||
<connectorList ref="connector" :stationId="stationId"/>
|
<connectorList ref="connector" :stationId="stationId"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="基本资料" name="stationInfo">
|
<el-tab-pane label="基本资料" name="stationInfo">
|
||||||
<div class="over">
|
<div class="over">
|
||||||
<div id="map_wrap">
|
<div id="map_wrap">
|
||||||
<MapContainer ref="map" :stationLat="stationLat" :stationLng="stationLng"/>
|
<MapContainer ref="map" :stationLat="stationLat" :stationLng="stationLng"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<site-info ref="stationInfo"/>
|
<site-info ref="stationInfo"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<!--<el-tab-pane label="账单" ></el-tab-pane>-->
|
<!--<el-tab-pane label="账单" ></el-tab-pane>-->
|
||||||
|
|
||||||
<el-tab-pane label="计费模块" name="billing">
|
<el-tab-pane label="计费模块" name="billing">
|
||||||
<!-- billing 文件到时引入 -->
|
<!-- billing 文件到时引入 -->
|
||||||
<billing ref="billing" :stationId="stationId"/>
|
<billing ref="billing" :stationId="stationId"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<!-- <el-tab-pane label="客户管理" name="member">-->
|
<!-- <el-tab-pane label="客户管理" name="member">-->
|
||||||
<!-- 角色管理-->
|
<!-- 角色管理-->
|
||||||
<!-- </el-tab-pane>-->
|
<!-- </el-tab-pane>-->
|
||||||
|
|
||||||
<el-tab-pane label="运营管理" name="operation">
|
<el-tab-pane label="运营管理" name="operation">
|
||||||
<el-card style="margin-bottom:10px">
|
<el-card style="margin-bottom:10px">
|
||||||
<h2>二维码配置</h2>
|
<h2>二维码配置</h2>
|
||||||
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="当前配置二维码规则:">
|
<el-form-item label="当前配置二维码规则:">
|
||||||
<el-input v-model="stationDetail.qrcodePrefix" maxlength="100px" :disabled="true"/>
|
<el-input v-model="stationDetail.qrcodePrefix" maxlength="100px" :disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="el-icon-setting" size="big" @click="handleCreate"
|
||||||
|
v-has-permi="['pile:station:edit']">配置参数
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<h2>互联互通配置</h2>
|
||||||
|
<el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi="['pile:station:edit']">编辑参数
|
||||||
|
</el-button>
|
||||||
|
<el-form ref="stationSettingForm" :model="stationSettingInfo" label-position="right"
|
||||||
|
label-width="200px"
|
||||||
|
style="margin-top:10px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="对接平台名称:" prop="type">
|
||||||
|
<el-select
|
||||||
|
v-model="stationSettingInfo.type"
|
||||||
|
placeholder="请选择对接平台名称"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 220px"
|
||||||
|
:disabled="disableFlag"
|
||||||
|
@change="getSettingParams"
|
||||||
|
>
|
||||||
|
<!-- <el-option label="上海联联平台" value="1" />-->
|
||||||
|
<!-- <el-option label="abc" value="2" />-->
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.third_party_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-input placeholder="请输入" v-model="stationSettingInfo.type" :disabled="disableFlag"/>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="对接平台url地址:" prop="urlAddress">
|
||||||
|
<el-input placeholder="请输入" v-model="stationSettingInfo.urlAddress"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="运营商ID(OperatorID):" prop="operatorId">
|
||||||
|
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorId"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="运营商密钥(OperatorSecret):" prop="operatorSecret">
|
||||||
|
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorSecret"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="消息Data密钥(DataSecret):" prop="dataSecret">
|
||||||
|
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecret"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="签名密钥(SigSecret):" prop="signSecret">
|
||||||
|
<el-input placeholder="请输入" v-model="stationSettingInfo.signSecret"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="消息Data密钥初始化向量(DataSecretIV):" prop="dataSecretIv">
|
||||||
|
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecretIv"
|
||||||
|
:disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<!-- <el-button size="big" @click="submitConfigForm" v-has-permi="['pile:station:edit']">提交</el-button>-->
|
||||||
|
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">
|
||||||
|
推送站点信息
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi = "['pile:station:edit']" >编辑参数</el-button>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-bottom:10px">
|
||||||
|
<h2>地锁二维码</h2>
|
||||||
|
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="查询地锁列表二维码:"/>
|
||||||
|
<div>
|
||||||
|
<vue-qr
|
||||||
|
ref="Qrcode"
|
||||||
|
:text="queryGroundLockQrCode"
|
||||||
|
qid="lockListQrCode"
|
||||||
|
:width="150"
|
||||||
|
style="margin-left: 190px; margin-top: -10px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<el-tab-pane label="站点白名单" name="whitelist">
|
||||||
|
<whitelist ref="whitelist" :stationId="stationId"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<el-tab-pane label="订单日报" name="orderReport">
|
||||||
|
<order-report ref="orderReport"></order-report>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible">
|
||||||
|
<el-form ref="form" :model="form" @submit.native.prevent>
|
||||||
|
<el-form-item label="二维码前缀:" prop="prefix" label-width="100px">
|
||||||
|
<el-input v-model="form.prefix" placeholder="请输入二维码前缀" style="width: 300px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-form>
|
||||||
<el-col :span="12">
|
<div slot="footer" class="dialog-footer" align="center">
|
||||||
<el-form-item>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button icon="el-icon-setting" size="big" @click="handleCreate"
|
<el-button @click="cancel">取 消</el-button>
|
||||||
v-has-permi="['pile:station:edit']">配置参数
|
</div>
|
||||||
</el-button>
|
</el-dialog>
|
||||||
</el-form-item>
|
</div>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<el-card>
|
|
||||||
<h2>互联互通配置</h2>
|
|
||||||
<el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi="['pile:station:edit']">编辑参数
|
|
||||||
</el-button>
|
|
||||||
<el-form ref="stationSettingForm" :model="stationSettingInfo" label-position="right" label-width="200px"
|
|
||||||
style="margin-top:10px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="对接平台名称:" prop="type">
|
|
||||||
<el-select
|
|
||||||
v-model="stationSettingInfo.type"
|
|
||||||
placeholder="请选择对接平台名称"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
style="width: 220px"
|
|
||||||
:disabled="disableFlag"
|
|
||||||
@change="getSettingParams"
|
|
||||||
>
|
|
||||||
<!-- <el-option label="上海联联平台" value="1" />-->
|
|
||||||
<!-- <el-option label="abc" value="2" />-->
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.third_party_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<!-- <el-input placeholder="请输入" v-model="stationSettingInfo.type" :disabled="disableFlag"/>-->
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="对接平台url地址:" prop="urlAddress">
|
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.urlAddress" :disabled="true"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="运营商ID(OperatorID):" prop="operatorId">
|
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorId" :disabled="true"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="运营商密钥(OperatorSecret):" prop="operatorSecret">
|
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.operatorSecret" :disabled="true"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="消息Data密钥(DataSecret):" prop="dataSecret">
|
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecret" :disabled="true"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="签名密钥(SigSecret):" prop="signSecret">
|
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.signSecret" :disabled="true"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="消息Data密钥初始化向量(DataSecretIV):" prop="dataSecretIv">
|
|
||||||
<el-input placeholder="请输入" v-model="stationSettingInfo.dataSecretIv" :disabled="true"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item>
|
|
||||||
<!-- <el-button size="big" @click="submitConfigForm" v-has-permi="['pile:station:edit']">提交</el-button>-->
|
|
||||||
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">推送站点信息</el-button>
|
|
||||||
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi = "['pile:station:edit']" >编辑参数</el-button>-->
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
</el-tab-pane>
|
|
||||||
|
|
||||||
<el-tab-pane label="站点白名单" name="whitelist">
|
|
||||||
<whitelist ref="whitelist" :stationId="stationId"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
|
|
||||||
<el-tab-pane label="订单日报" name="orderReport">
|
|
||||||
<order-report ref="orderReport"></order-report>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
|
|
||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible">
|
|
||||||
<el-form ref="form" :model="form" @submit.native.prevent>
|
|
||||||
<el-form-item label="二维码前缀:" prop="prefix" label-width="100px">
|
|
||||||
<el-input v-model="form.prefix" placeholder="请输入二维码前缀" style="width: 300px"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer" align="center">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import VueQr from "vue-qr";
|
||||||
import Billing from "./components/billing.vue";
|
import Billing from "./components/billing.vue";
|
||||||
import SiteInfo from "./components/SiteInfo.vue";
|
import SiteInfo from "./components/SiteInfo.vue";
|
||||||
import connectorList from "./connectorList.vue";
|
import connectorList from "./connectorList.vue";
|
||||||
@@ -164,203 +196,206 @@ import MapContainer from "../../../components/MapContainer/MapContainer.vue";
|
|||||||
import stationOrderList from "@/views/pile/station/stationOrderList";
|
import stationOrderList from "@/views/pile/station/stationOrderList";
|
||||||
import stationWhiteList from "@/views/pile/station/stationWhiteList";
|
import stationWhiteList from "@/views/pile/station/stationWhiteList";
|
||||||
import {
|
import {
|
||||||
getStationInfo,
|
getStationInfo,
|
||||||
updateStationQRCodePrefix,
|
updateStationQRCodePrefix,
|
||||||
getSettingByStationId,
|
getSettingByStationId,
|
||||||
updateSettingByStationId,
|
updateSettingByStationId,
|
||||||
pushStationInfo,
|
pushStationInfo,
|
||||||
getSettingInfo,
|
getSettingInfo,
|
||||||
} from "@/api/pile/station";
|
} from "@/api/pile/station";
|
||||||
import Whitelist from "@/views/pile/station/stationWhiteList";
|
import Whitelist from "@/views/pile/station/stationWhiteList";
|
||||||
import OrderReport from './orderReport.vue';
|
import OrderReport from './orderReport.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
dicts: ["third_party_type"],
|
dicts: ["third_party_type"],
|
||||||
components: {
|
components: {
|
||||||
Whitelist,
|
VueQr,
|
||||||
SiteInfo,
|
Whitelist,
|
||||||
pileList,
|
SiteInfo,
|
||||||
connectorList,
|
pileList,
|
||||||
Billing,
|
connectorList,
|
||||||
MapContainer,
|
Billing,
|
||||||
stationOrderList,
|
MapContainer,
|
||||||
stationWhiteList,
|
stationOrderList,
|
||||||
OrderReport
|
stationWhiteList,
|
||||||
},
|
OrderReport
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
activeName: 'pile',
|
|
||||||
form: {
|
|
||||||
prefix: '',
|
|
||||||
},
|
|
||||||
dialogTitle: '',
|
|
||||||
qrcodePrefix: '',
|
|
||||||
dialogFormVisible: false,
|
|
||||||
stationId: this.$route.params.id,
|
|
||||||
stationName: this.$route.params.stationName,
|
|
||||||
stationDetail: {},
|
|
||||||
stationLat: null,
|
|
||||||
stationLng: null,
|
|
||||||
stationSettingInfo: {},
|
|
||||||
disableFlag: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// console.log(this.stationId, "充电桩详情 create");
|
|
||||||
// const stationId = this.stationId;
|
|
||||||
const stationName = this.stationName;
|
|
||||||
const title = "【" + stationName + "】站点详情";
|
|
||||||
const route = Object.assign({}, this.$route, {title: `${title}`})
|
|
||||||
this.$store.dispatch('tagsView/updateVisitedView', route);
|
|
||||||
this.queryStationInfo();
|
|
||||||
this.getStationSettingInfo();
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.initializeData(this.activeName);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleClick(tab, event) {
|
|
||||||
// console.log(tab, event);
|
|
||||||
this.initializeData(tab.name);
|
|
||||||
},
|
},
|
||||||
// 执行对应页面的查询数据方法
|
data() {
|
||||||
initializeData(name) {
|
return {
|
||||||
console.log("执行对应页面的查询数据方法", name)
|
activeName: 'pile',
|
||||||
if (name === "pile") {
|
form: {
|
||||||
this.$refs.pile.getPileList();
|
prefix: '',
|
||||||
} else if (name === "connector") {
|
},
|
||||||
this.$refs.connector.getList();
|
queryGroundLockQrCode: '',
|
||||||
} else if (name === "billing") {
|
dialogTitle: '',
|
||||||
this.$refs.billing.getStationBillingTemplateList();
|
qrcodePrefix: '',
|
||||||
} else if (name === "stationInfo") {
|
dialogFormVisible: false,
|
||||||
this.$refs.map.initMap();
|
stationId: this.$route.params.id,
|
||||||
this.$refs.stationInfo.queryStationInfo();
|
stationName: this.$route.params.stationName,
|
||||||
} else if (name === "order") {
|
stationDetail: {},
|
||||||
this.$refs.order.dataLoading();
|
stationLat: null,
|
||||||
} else if (name === 'orderReport'){
|
stationLng: null,
|
||||||
this.$refs.orderReport.getList();
|
stationSettingInfo: {},
|
||||||
}
|
disableFlag: true,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
queryStationInfo() {
|
created() {
|
||||||
console.log("stationId", this.stationId);
|
// console.log(this.stationId, "充电桩详情 create");
|
||||||
getStationInfo(this.stationId).then((res) => {
|
// const stationId = this.stationId;
|
||||||
// console.log(res);
|
this.queryGroundLockQrCode = 'https://api.jsowellcloud.com/app-xcx-h5/getGroundLockInfo/' + this.stationId;
|
||||||
this.stationDetail = res.data;
|
const stationName = this.stationName;
|
||||||
this.stationLat = res.data.stationLat
|
const title = "【" + stationName + "】站点详情";
|
||||||
this.stationLng = res.data.stationLng
|
const route = Object.assign({}, this.$route, {title: `${title}`})
|
||||||
console.log(this.stationLat, this.stationLng, "父组件里面的经纬度")
|
this.$store.dispatch('tagsView/updateVisitedView', route);
|
||||||
});
|
this.queryStationInfo();
|
||||||
console.log("queryStationInfo==", this.stationDetail);
|
this.getStationSettingInfo();
|
||||||
},
|
},
|
||||||
// 查询站点互联互通配置信息
|
mounted() {
|
||||||
getStationSettingInfo() {
|
this.initializeData(this.activeName);
|
||||||
getSettingByStationId(this.stationId).then((res) => {
|
|
||||||
console.log("stationId:", this.stationId)
|
|
||||||
console.log("getSettingByStationId==", res.data === undefined)
|
|
||||||
if (res.data === undefined) {
|
|
||||||
this.stationSettingInfo.thirdPartyType = "0";
|
|
||||||
}else {
|
|
||||||
this.stationSettingInfo = res.data;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 根据对接平台类型查询配置信息
|
|
||||||
getSettingParams() {
|
|
||||||
const param = {
|
|
||||||
// stationId: this.stationId,
|
|
||||||
thirdPartyType: this.stationSettingInfo.type,
|
|
||||||
}
|
|
||||||
console.log("param", param);
|
|
||||||
getSettingInfo(param).then((res) => {
|
|
||||||
console.log("getSettingInfo", res)
|
|
||||||
if (res.data === undefined) {
|
|
||||||
this.stationSettingInfo = [];
|
|
||||||
}else {
|
|
||||||
this.stationSettingInfo = res.data;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick(tab, event) {
|
||||||
|
// console.log(tab, event);
|
||||||
|
this.initializeData(tab.name);
|
||||||
|
},
|
||||||
|
// 执行对应页面的查询数据方法
|
||||||
|
initializeData(name) {
|
||||||
|
console.log("执行对应页面的查询数据方法", name)
|
||||||
|
if (name === "pile") {
|
||||||
|
this.$refs.pile.getPileList();
|
||||||
|
} else if (name === "connector") {
|
||||||
|
this.$refs.connector.getList();
|
||||||
|
} else if (name === "billing") {
|
||||||
|
this.$refs.billing.getStationBillingTemplateList();
|
||||||
|
} else if (name === "stationInfo") {
|
||||||
|
this.$refs.map.initMap();
|
||||||
|
this.$refs.stationInfo.queryStationInfo();
|
||||||
|
} else if (name === "order") {
|
||||||
|
this.$refs.order.dataLoading();
|
||||||
|
} else if (name === 'orderReport') {
|
||||||
|
this.$refs.orderReport.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
queryStationInfo() {
|
||||||
|
console.log("stationId", this.stationId);
|
||||||
|
getStationInfo(this.stationId).then((res) => {
|
||||||
|
// console.log(res);
|
||||||
|
this.stationDetail = res.data;
|
||||||
|
this.stationLat = res.data.stationLat
|
||||||
|
this.stationLng = res.data.stationLng
|
||||||
|
console.log(this.stationLat, this.stationLng, "父组件里面的经纬度")
|
||||||
|
});
|
||||||
|
console.log("queryStationInfo==", this.stationDetail);
|
||||||
|
},
|
||||||
|
// 查询站点互联互通配置信息
|
||||||
|
getStationSettingInfo() {
|
||||||
|
getSettingByStationId(this.stationId).then((res) => {
|
||||||
|
console.log("stationId:", this.stationId)
|
||||||
|
console.log("getSettingByStationId==", res.data === undefined)
|
||||||
|
if (res.data === undefined) {
|
||||||
|
this.stationSettingInfo.thirdPartyType = "0";
|
||||||
|
} else {
|
||||||
|
this.stationSettingInfo = res.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 根据对接平台类型查询配置信息
|
||||||
|
getSettingParams() {
|
||||||
|
const param = {
|
||||||
|
// stationId: this.stationId,
|
||||||
|
thirdPartyType: this.stationSettingInfo.type,
|
||||||
|
}
|
||||||
|
console.log("param", param);
|
||||||
|
getSettingInfo(param).then((res) => {
|
||||||
|
console.log("getSettingInfo", res)
|
||||||
|
if (res.data === undefined) {
|
||||||
|
this.stationSettingInfo = [];
|
||||||
|
} else {
|
||||||
|
this.stationSettingInfo = res.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 开放编辑按钮
|
// 开放编辑按钮
|
||||||
openEdit() {
|
openEdit() {
|
||||||
this.disableFlag = this.disableFlag === false;
|
this.disableFlag = this.disableFlag === false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提交配置设置
|
// 提交配置设置
|
||||||
submitConfigForm() {
|
submitConfigForm() {
|
||||||
const param = {
|
const param = {
|
||||||
stationId: this.stationId,
|
stationId: this.stationId,
|
||||||
urlAddress: this.stationSettingInfo.urlAddress,
|
urlAddress: this.stationSettingInfo.urlAddress,
|
||||||
operatorId: this.stationSettingInfo.operatorId,
|
operatorId: this.stationSettingInfo.operatorId,
|
||||||
operatorSecret: this.stationSettingInfo.operatorSecret,
|
operatorSecret: this.stationSettingInfo.operatorSecret,
|
||||||
dataSecret: this.stationSettingInfo.dataSecret,
|
dataSecret: this.stationSettingInfo.dataSecret,
|
||||||
signSecret: this.stationSettingInfo.signSecret,
|
signSecret: this.stationSettingInfo.signSecret,
|
||||||
dataSecretIv: this.stationSettingInfo.dataSecretIv,
|
dataSecretIv: this.stationSettingInfo.dataSecretIv,
|
||||||
}
|
}
|
||||||
console.log("param:", param);
|
console.log("param:", param);
|
||||||
this.$refs.stationSettingForm.validate((valid) => {
|
this.$refs.stationSettingForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateSettingByStationId(param).then((response) => {
|
updateSettingByStationId(param).then((response) => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
this.disableFlag = true;
|
this.disableFlag = true;
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 推送站点
|
// 推送站点
|
||||||
pushStation() {
|
pushStation() {
|
||||||
const param = {
|
const param = {
|
||||||
stationId: this.stationId,
|
stationId: this.stationId,
|
||||||
thirdPartyType: this.stationSettingInfo.type,
|
thirdPartyType: this.stationSettingInfo.type,
|
||||||
}
|
}
|
||||||
pushStationInfo(param).then((response) => {
|
pushStationInfo(param).then((response) => {
|
||||||
console.log("response", response)
|
console.log("response", response)
|
||||||
this.$modal.msg(response.obj)
|
this.$modal.msg(response.obj)
|
||||||
this.disableFlag = true;
|
this.disableFlag = true;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 配置参数按钮
|
// 配置参数按钮
|
||||||
handleCreate() {
|
handleCreate() {
|
||||||
this.dialogTitle = '配置参数';
|
this.dialogTitle = '配置参数';
|
||||||
this.form = {
|
this.form = {
|
||||||
prefix: '',
|
prefix: '',
|
||||||
};
|
};
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
},
|
},
|
||||||
// 配置参数提交按钮
|
// 配置参数提交按钮
|
||||||
submitForm(form) {
|
submitForm(form) {
|
||||||
const param = {
|
const param = {
|
||||||
stationId: this.stationId,
|
stationId: this.stationId,
|
||||||
qrcodePrefix: this.form.prefix
|
qrcodePrefix: this.form.prefix
|
||||||
}
|
}
|
||||||
console.log("form:", this.form);
|
console.log("form:", this.form);
|
||||||
console.log("param:", param);
|
console.log("param:", param);
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateStationQRCodePrefix(param).then((response) => {
|
updateStationQRCodePrefix(param).then((response) => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
})
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.dialogFormVisible = false
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
#container {
|
#container {
|
||||||
width: 800px;
|
width: 800px;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
// margin-left: 50%; transform: translate(-50%,0);
|
// margin-left: 50%; transform: translate(-50%,0);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user