fix:修改bug

This commit is contained in:
5g0Wp7Zy 2025-08-20 10:49:57 +08:00
parent 556ea2f59c
commit 471129b6a0
7 changed files with 185 additions and 123 deletions

View File

@ -47,4 +47,3 @@ export default {
@import "./colorui/icon.css";
@import "./common/uni-main.scss";
</style>

View File

@ -1,134 +1,186 @@
<template>
<div>
<div class="divRowQC">
<lable class="lbNoQC">{{data.bikeCode}}</lable>
<label v-for="(item,index) in data.arrTag" :key="index" :class="getTagClass(item.type)">
{{item.title}}
</label>
</div>
<div class="divRowQC" style="color:#adb3b3;font-size: 14px;">
电量刷新时间{{data.time}}
</div>
<div class="divRowQC" style="display:flex;justify-content: space-between;font-size: 14px;">
<label>
<label :style="{color:data.color}">
<uni-icons custom-prefix="iconfont" :type="data.icon" :color="data.color" :size="iconsize" />
{{data.soc}}%
</label>
<lable style="color: #00C57C;margin-left: 10px;">
(
<label>
<uni-icons custom-prefix="iconfont" type="icon-ebikecheliangguanli" color="#00C57C" />
</label>
<label>{{data.distance}}</label>
)
</lable>
</label>
<div style="background-color:#E2F8FF;border-radius:15px;padding: 3px 15px;">
<label>
<uni-icons custom-prefix="iconfont" type="icon-ebikeyinlianglabashengyin" color="#0084FF"
size="16" />
</label>
<label style="color: #0084FF;" @click="checkecu()">寻车铃</label>
</div>
</div>
<div style="margin-top:15px;display:flex;justify-content:space-between;">
<label class="divBtnBlue" @click="openBikeInfo">车辆详情</label>
<label v-show="data.rightlx=='dd'" class="divBtnBlue" style="margin-left: 10px;" @click="checkecu('unlock')">开锁</label>
<label v-show="data.rightlx=='dd'" class="divBtnBlue" style="margin-left: 10px;" @click="checkecu('lock')">关锁</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>
<div>
<div class="divRowQC">
<lable class="lbNoQC">{{ data.bikeCode }}</lable>
<label
v-for="(item, index) in data.arrTag"
:key="index"
:class="getTagClass(item.type)"
>
{{ item.title }}
</label>
</div>
<div class="divRowQC" style="color: #adb3b3; font-size: 14px">
电量刷新时间{{ data.time }}
</div>
<div
class="divRowQC"
style="display: flex; justify-content: space-between; font-size: 14px"
>
<label>
<label :style="{ color: data.color }">
<uni-icons
custom-prefix="iconfont"
:type="data.icon"
:color="data.color"
:size="iconsize"
/>
{{ data.soc }}%
</label>
<lable style="color: #00c57c; margin-left: 10px">
(
<label>
<uni-icons
custom-prefix="iconfont"
type="icon-ebikecheliangguanli"
color="#00C57C"
/>
</label>
<label>{{ data.distance }}</label>
)
</lable>
</label>
<div
style="
background-color: #e2f8ff;
border-radius: 15px;
padding: 3px 15px;
"
>
<label>
<uni-icons
custom-prefix="iconfont"
type="icon-ebikeyinlianglabashengyin"
color="#0084FF"
size="16"
/>
</label>
<label style="color: #0084ff" @click="checkecu()">寻车铃</label>
</div>
</div>
<div
style="margin-top: 15px; display: flex; justify-content: space-between"
>
<label class="divBtnBlue" @click="openBikeInfo">车辆详情</label>
<label
v-show="data.rightlx == 'dd'"
class="divBtnBlue"
style="margin-left: 10px"
@click="checkecu('unlock')"
>开锁</label
>
<label
v-show="data.rightlx == 'dd'"
class="divBtnBlue"
style="margin-left: 10px"
@click="checkecu('lock')"
>关锁</label
>
<label
v-show="data.rightlx == 'dd'"
class="divBtnBlue"
style="margin-left: 10px"
@click="openDispatch"
>调度</label
>
<label
v-show="data.rightlx == 'hd'"
class="divBtnBlue"
style="margin-left: 10px"
@click="changeBattery"
>换电</label
>
</div>
</div>
</template>
<script setup>
import {checkEcuBells} from "@/utils/commonApi";
import { checkEcuBells } from "@/utils/commonApi";
const props = defineProps(["data"]);
//
function openBikeInfo() {
const {
bikeId,
ecuId,
ecuSn
} = props.data;
const url = `/pages/devops/ebikeinfo/ebikeinfo?bikeId=${bikeId}&ecuId=${ecuId}&ecuSn=${ecuSn}`;
uni.navigateTo({
url: url
})
}
function getTagClass(type) {
let tagclass = "lbTag";
switch (type) {
case "red":
tagclass += " lbTagRed";
break;
case "green":
tagclass += " lbTagGreen";
break;
}
return tagclass;
}
//
function checkecu () {
checkEcuBells(props.data)
}
//
function changeBattery() {
const{bikeCode}=props.data;
uni.navigateTo({
url:`/pages/devops/changebatteries/changebatteries?bikeCode=${bikeCode}`
})
}
//
function openDispatch() {
const { bikeCode } = props.data;
console.log(props.data);
const url = `/pages/warehouse/carDispatchByMine/carDispatchByMine?bikeCode=${bikeCode}`;
uni.navigateTo({
url: url,
});
}
//
function openBikeInfo() {
const { bikeId, ecuId, ecuSn } = props.data;
const url = `/pages/devops/ebikeinfo/ebikeinfo?bikeId=${bikeId}&ecuId=${ecuId}&ecuSn=${ecuSn}`;
uni.navigateTo({
url: url,
});
}
function getTagClass(type) {
let tagclass = "lbTag";
switch (type) {
case "red":
tagclass += " lbTagRed";
break;
case "green":
tagclass += " lbTagGreen";
break;
}
return tagclass;
}
//
function checkecu() {
checkEcuBells(props.data);
}
//
function changeBattery() {
const { bikeCode } = props.data;
uni.navigateTo({
url: `/pages/devops/changebatteries/changebatteries?bikeCode=${bikeCode}`,
});
}
</script>
<style scoped>
.divBtnBlue {
background-color: #0084FF;
color: white;
border-radius: 5px;
padding: 5px 0px;
font-size: 14px;
width: 100%;
text-align: center;
}
.divBtnBlue {
background-color: #0084ff;
color: white;
border-radius: 5px;
padding: 5px 0px;
font-size: 14px;
width: 100%;
text-align: center;
}
.divRowQC {
line-height: 25px;
}
.divRowQC {
line-height: 25px;
}
.lbNoQC {
font-size: 14px;
color: #000;
margin-left: 3px;
font-weight: 600;
}
.lbNoQC {
font-size: 14px;
color: #000;
margin-left: 3px;
font-weight: 600;
}
.lbTag {
padding: 3px 10px;
font-size: 12px;
border-radius: 15px;
margin-left: 5px;
.lbTag {
padding: 3px 10px;
font-size: 12px;
border-radius: 15px;
margin-left: 5px;
}
}
.lbTagGreen {
color: #1dd950;
background-color: #e8f9e6;
}
.lbTagGreen {
color: #1DD950;
background-color: #E8F9E6;
}
.lbTagRed {
color: #F98F93;
background-color: #FFECED;
}
</style>
.lbTagRed {
color: #f98f93;
background-color: #ffeced;
}
</style>

View File

@ -426,6 +426,7 @@ const selRight = ref({
...arrRight.value[0],
});
const statusHeight = ref(0); //
const isTouchDisable = ref(false); //
const mapRef = ref("mapRef");
let mapContext = null;

View File

@ -81,8 +81,13 @@ const navButtonGroup = reactive([
},
]);
onLoad(() => {
onLoad((options) => {
scanCodeStore.clearCode();
if (options.bikeCode) {
scanCodeStore.addCode(options.bikeCode);
setCarList();
}
});
onShow(() => {

View File

@ -4,7 +4,7 @@
v-model="listdata"
@query="loadMoreData"
:default-page-no="1"
:default-page-size="5"
:default-page-size="10"
:auto-show-back-to-top="true"
:paging-style="{
'background-color': ' #f3f4f6',
@ -345,7 +345,7 @@ const submit = (ref) => {
const handleLeaveWarehouse = () => {
isSubmit.value = true; //
const params = {
bikeCode: customFormData.value.deviceValues, //
bikeCode: stringToArray(customFormData.value.deviceValues, ""), //
status: statusZT.value,
reginId: "",
};

View File

@ -162,9 +162,11 @@ const delChangeImg = (res) => {
};
const selectImg = (data) => {
const file = data.tempFiles[0];
console.log(file, "selectImg data");
api
.fileUpload(file)
.then((res) => {
console.log(res, "fileUpload");
if (res.code == 200) {
fileLists.value.push(res.data);
} else {
@ -291,6 +293,8 @@ const navButtonClick = (res) => {
});
return;
}
console.log("fileLists.value:", fileLists.value);
if (!fileLists.value.length) {
uni.showToast({
title: "请上传投放的照片",

View File

@ -9,3 +9,4 @@ const config = {
filePath: "https://www.cdzhuojing.cn/file"
}
export default config;