站点联调

This commit is contained in:
小小 2025-05-16 15:21:08 +08:00
parent 9b27ff8f2a
commit 7f16eac71e
3 changed files with 66 additions and 22 deletions

View File

@ -37,8 +37,10 @@
</div>
<div style="margin-top:15px;display:flex;justify-content:space-between;">
<label class="divBtnBlue" @click="openBikeInfo">车辆详情</label>
<label class="divBtnBlue" @click="checkecu('openBatteryLock')">电池开仓</label>
<label class="divBtnBlue" @click="changeBatteries">完成换电</label>
<label v-show="data.rightlx=='dd'" class="divBtnBlue" style="margin-left: 10px;" @click="openBikeInfo">开锁</label>
<label v-show="data.rightlx=='dd'" class="divBtnBlue" style="margin-left: 10px;" @click="openBikeInfo">关锁</label>
<label v-show="data.rightlx=='dd'" class="divBtnBlue" style="margin-left: 10px;" @click="openBikeInfo">调度</label>
<label v-show="data.rightlx=='hd'" class="divBtnBlue" style="margin-left: 10px;" @click="changeBattery">换电</label>
</div>
</div>
@ -51,6 +53,7 @@
ref
} from 'vue';
const props = defineProps(["data"]);
//
function openBikeInfo() {
const {
@ -101,7 +104,10 @@
//
function changeBattery() {
showModelMessage("该功能暂未实现!");
const{bikeCode}=props.data;
uni.navigateTo({
url:`/pages/devops/changebatteries/changebatteries?bikeCode=${bikeCode}`
})
}
</script>
@ -110,8 +116,10 @@
background-color: #0084FF;
color: white;
border-radius: 5px;
padding: 5px 15px;
padding: 5px 0px;
font-size: 14px;
width: 100%;
text-align: center;
}
.divRowQC {

View File

@ -1,5 +1,6 @@
<template>
<z-paging ref="paging" v-model="arrData" default-page-no="1" :default-page-size="pageNum" auto-show-back-to-top @query="query">
<z-paging ref="paging" v-model="arrData" default-page-no="1" :default-page-size="pageNum" auto-show-back-to-top
@query="query">
<template #top>
<div style="display:flex;padding: 10px;">
<uni-easyinput v-model="siteName" placeholder="请输入站点名称" suffixIcon="search" @iconClick="search" />
@ -82,7 +83,8 @@
<script setup>
import {
ref,onMounted,
ref,
onMounted,
onUnmounted
} from 'vue';
import {
@ -123,15 +125,44 @@
let selData = null;
let loadType = "";
let siteName = ref(""); //
let pageNum=5;
let pageNum = 5;
function query(pageNo, pageSize) {
const params = {
let params = {
zoneId,
pageNum: pageNo.toString(),
pageSize:pageSize.toString(),
pageSize: pageSize.toString(),
siteName: siteName.value
}
if(searchIndex.value==0){
showModelMessage("该功能暂未实现!");
return;
}
else{
const lx=searchType.value;
switch(searchIndex.value){
case "1":
if(lx=="up"){
params={...params,borrowingSort: 1}
}
else{
params={...params,borrowingSort: 2}
}
break;
case "2":
if(lx=="up"){
params={...params,returnOrder: 1}
}
else{
params={...params,returnOrder: 2}
}
break;
}
}
uni.showLoading({
title:"加载中"
})
callOperateApi("ebikeRegion/pageSite", params, "get").then(res => {
const {
code,
@ -139,7 +170,7 @@
message
} = res;
if (code != 200) {
showModelMessage("加载失败!");
uni.hideLoading();
console.log("ebikeRegion/pageSite错误", message);
paging.value.complete(false);
return;
@ -147,6 +178,7 @@
const {
records
} = data;
const arrNewData = [];
records.map((item, index) => {
const {
@ -156,21 +188,21 @@
allowedParkingNum,
siteAdress,
levelName,
siteTypeName
siteTypeName,
borrowingOrder,
returnOrder
} = item;
const sindex = (pageNo - 1) * pageSize + index;
const newdata = {
id: siteRegionId,
zdlx: (siteTypeName && siteTypeName.length > 0 )? siteTypeName.substring(0, 1) :
"", //
zdlx: (siteTypeName && siteTypeName.length > 0) ? siteTypeName.substring(0, 1) :"", //
zdmc: siteName, //
zdjb: levelName, //
cjsj: createdTime, //
clsl1: 0, //
clsl2: allowedParkingNum, //
zcsl: 0, //
hcsl: 0, //
zcsl: borrowingOrder, //
hcsl: returnOrder, //
cjdd: siteAdress, //
cjr: "创建人", //
pageNum,
@ -179,16 +211,18 @@
arrNewData[index] = newdata;
});
paging.value.complete(arrNewData);
uni.hideLoading();
})
}
function search(e) {
paging.value.reload();
searchIndex.value=null;
searchType.value=null;
}
//
function changerOrder(index) {
showModelMessage("该功能暂未实现!");
if (searchIndex.value == index && searchType.value == "up") {
searchType.value = "down";
@ -196,6 +230,7 @@
searchType.value = "up";
}
searchIndex.value = index;
paging.value.reload();
}
function openMap() {
@ -265,11 +300,11 @@
}
onShow(() => {
zoneId = selAreaStore.value;
if (paging&&paging.value) paging.value.refresh();
if (paging && paging.value) paging.value.refresh();
// loadData(pageNum);
});

View File

@ -1,9 +1,10 @@
const config = {
//apiUrl: "http://192.168.2.151:10010/",
apiUrl: "https://www.cdzhuojing.cn/",
apiUrl: "http://192.168.2.4:10010/",
//apiUrl: "https://www.cdzhuojing.cn/",
cdnPath: "/",
ERR_OK: 200,
sm2PublicKey: "04f5084ee12767d932f293508e30e3b0100185042ec0f061dedaf92b793b93f79fd6179d5e47e25b7aec98e00cf90dd56df1f8191012537187e7bbfd2d1de299fc", //f8209a2ebe6691e41e1f2b667bfe71f0b511716cc0f7c4452502fc12ec3957e4
imgPath:"https://www.cdzhuojing.cn/file/cdn-bucket/maintenance/"
imgPath:"https://www.cdzhuojing.cn/file/cdn-bucket/maintenance/",
filePath:"https://www.cdzhuojing.cn/file"
}
export default config;