Compare commits
No commits in common. "main" and "dev" have entirely different histories.
2
env/.env
vendored
2
env/.env
vendored
@ -41,4 +41,4 @@ VITE_AMAP_KEY = '1f8f159583f28dfba6eb06deb55e3b56'
|
|||||||
VITE_HOME_URL = '/pages/index/index'
|
VITE_HOME_URL = '/pages/index/index'
|
||||||
|
|
||||||
# 图片上传展示路径
|
# 图片上传展示路径
|
||||||
VITE_APP_IMAGE_URL = 'https://www.cx.cdzhuojing.cn/file/static-objects/img-file/'
|
VITE_APP_IMAGE_URL = 'https://www.cdzhuojing.cn/file/static-objects/img-file/'
|
||||||
@ -39,7 +39,7 @@ export function http<T>(options: CustomRequestOptions) {
|
|||||||
CacheManager.remove('dictData')
|
CacheManager.remove('dictData')
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-fg/login/login',
|
url: '/pages/login/login',
|
||||||
})
|
})
|
||||||
|
|
||||||
return reject(responseData)
|
return reject(responseData)
|
||||||
|
|||||||
@ -75,6 +75,7 @@ async function getEbikeDetailForWork() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLoad((query) => {
|
onLoad((query) => {
|
||||||
|
query.bikeCode = '42548803223'
|
||||||
const { bikeCode } = query
|
const { bikeCode } = query
|
||||||
if (bikeCode) {
|
if (bikeCode) {
|
||||||
bikeId.value = bikeCode
|
bikeId.value = bikeCode
|
||||||
|
|||||||
@ -83,7 +83,7 @@ export const menu_list = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'orderManagement',
|
key: 'orderManagement',
|
||||||
name: '点单改价',
|
name: '工单管理',
|
||||||
type: 'page',
|
type: 'page',
|
||||||
path: '/pages-sub/order-manage/index',
|
path: '/pages-sub/order-manage/index',
|
||||||
customsrc: 'APPICON_ZHANDIANGUANLI_IMAGE',
|
customsrc: 'APPICON_ZHANDIANGUANLI_IMAGE',
|
||||||
|
|||||||
@ -62,11 +62,9 @@ function regionchange(e: any) {
|
|||||||
// 地图点击事件
|
// 地图点击事件
|
||||||
function handleMapTap(e: any) {
|
function handleMapTap(e: any) {
|
||||||
const { latitude, longitude } = e.detail
|
const { latitude, longitude } = e.detail
|
||||||
// console.log(latitude, longitude)
|
|
||||||
|
|
||||||
if (isPointInRegion({ latitude, longitude })) {
|
if (isPointInRegion({ latitude, longitude })) {
|
||||||
drawPoint({
|
drawPoint({
|
||||||
type: 'other',
|
|
||||||
point: {
|
point: {
|
||||||
id: Math.floor(100000 + Math.random() * 900000),
|
id: Math.floor(100000 + Math.random() * 900000),
|
||||||
longitude,
|
longitude,
|
||||||
|
|||||||
@ -81,7 +81,7 @@ function handleSelect(item: any) {
|
|||||||
>
|
>
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{ item.name }}
|
常用应用
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="app_grid">
|
<view class="app_grid">
|
||||||
|
|||||||
@ -249,9 +249,9 @@ export function getIconByOrderStatus(vehicle) {
|
|||||||
return getBatteryIconBySoc(vehicle.soc)
|
return getBatteryIconBySoc(vehicle.soc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. 巡检(TUDO:没有对应的图标)
|
// 4. 巡检
|
||||||
if (hasInspection) {
|
if (hasInspection) {
|
||||||
return getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
|
return getImageFullPath('MAP_ICON_REPAIRE_CAR_IMAGE')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5. 都没有订单
|
// 5. 都没有订单
|
||||||
|
|||||||
@ -1,119 +0,0 @@
|
|||||||
<script lang="ts" setup>
|
|
||||||
definePage({
|
|
||||||
type: 'home',
|
|
||||||
style: {
|
|
||||||
navigationStyle: 'custom',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<view class="container">
|
|
||||||
<view class="loading-box">
|
|
||||||
<view class="animations">
|
|
||||||
<view class="box">
|
|
||||||
<view class="loader">
|
|
||||||
<view class="loader__ball" />
|
|
||||||
<view class="loader__ball" />
|
|
||||||
<view class="loader__ball" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="text">
|
|
||||||
加载中...
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333;
|
|
||||||
|
|
||||||
.loading-box {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.text {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$dotColor: linear-gradient(135deg, #1fa2ff, #12d8fa, #29ffc6);
|
|
||||||
$dotSize: 30rpx;
|
|
||||||
$duration: 2s;
|
|
||||||
.animations {
|
|
||||||
width: 160rpx;
|
|
||||||
height: 160rpx;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.box {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
.loader {
|
|
||||||
animation: rotate $duration linear infinite normal;
|
|
||||||
position: relative;
|
|
||||||
transform-origin: 50% 50%;
|
|
||||||
|
|
||||||
&__ball {
|
|
||||||
height: $dotSize;
|
|
||||||
width: $dotSize;
|
|
||||||
left: -$dotSize * 0.5;
|
|
||||||
position: absolute;
|
|
||||||
top: -$dotSize * 0.5;
|
|
||||||
transform-origin: 50% 50%;
|
|
||||||
|
|
||||||
&:nth-of-type(2) {
|
|
||||||
transform: rotate(120deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-of-type(3) {
|
|
||||||
transform: rotate(240deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
animation: move $duration * 0.5 ease-in-out infinite alternate;
|
|
||||||
background: $dotColor;
|
|
||||||
border-radius: 50%;
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
transform-origin: 50% 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes rotate {
|
|
||||||
from {
|
|
||||||
transform: rotate(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes move {
|
|
||||||
0%,
|
|
||||||
15% {
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
transform: translateY(-150%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -8,7 +8,7 @@ const { VITE_APP_TITLE } = import.meta.env
|
|||||||
|
|
||||||
definePage({
|
definePage({
|
||||||
// 使用 type: "home" 属性设置首页,其他页面不需要设置,默认为page
|
// 使用 type: "home" 属性设置首页,其他页面不需要设置,默认为page
|
||||||
// type: 'home',
|
type: 'home',
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
},
|
},
|
||||||
@ -1,5 +1,4 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { queryMyWorkOrders } from '@/api/work'
|
|
||||||
import { useAppStore } from '@/store'
|
import { useAppStore } from '@/store'
|
||||||
import { getImageFullPath, maskPhone } from '@/utils'
|
import { getImageFullPath, maskPhone } from '@/utils'
|
||||||
|
|
||||||
@ -19,9 +18,6 @@ const order_list = ref<any>([
|
|||||||
query: {
|
query: {
|
||||||
handelSate: '1',
|
handelSate: '1',
|
||||||
},
|
},
|
||||||
bot: {
|
|
||||||
num: 0,
|
|
||||||
},
|
|
||||||
icon: 'WODEGONGDAN_WEIWANC_IMAGE',
|
icon: 'WODEGONGDAN_WEIWANC_IMAGE',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -94,28 +90,6 @@ onMounted(() => {
|
|||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
userInfo.value = appStore.getUserInfo()
|
userInfo.value = appStore.getUserInfo()
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(async () => {
|
|
||||||
try {
|
|
||||||
const res: any = await queryMyWorkOrders({
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 1000000,
|
|
||||||
bikeCode: '',
|
|
||||||
orderType: null,
|
|
||||||
handelSate: 1,
|
|
||||||
})
|
|
||||||
const { records } = res
|
|
||||||
if (records && records.length > 0) {
|
|
||||||
order_list.value[0].bot.num = records.length
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
order_list.value[0].bot.num = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -157,9 +131,6 @@ onShow(async () => {
|
|||||||
@click="handleOrderClick(item)"
|
@click="handleOrderClick(item)"
|
||||||
>
|
>
|
||||||
<view class="icon_bar">
|
<view class="icon_bar">
|
||||||
<view v-if="item.bot && item.bot.num > 0" class="bot">
|
|
||||||
<text class="num">{{ item.bot.num }}</text>
|
|
||||||
</view>
|
|
||||||
<uv-image :src="getImageFullPath(item.icon)" mode="widthFix" width="100%" />
|
<uv-image :src="getImageFullPath(item.icon)" mode="widthFix" width="100%" />
|
||||||
</view>
|
</view>
|
||||||
<view class="label">
|
<view class="label">
|
||||||
@ -278,33 +249,9 @@ onShow(async () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.icon_bar {
|
.icon_bar {
|
||||||
position: relative;
|
|
||||||
width: 92rpx;
|
width: 92rpx;
|
||||||
height: 92rpx;
|
height: 92rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.bot {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
padding: 5rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: rgb(253 5 5);
|
|
||||||
z-index: 2;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.num {
|
|
||||||
font-family: PingFangSC-Medium;
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
letter-spacing: 0;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
|
|||||||
@ -38,18 +38,10 @@ export const useAppStore = defineStore(
|
|||||||
* 自动登录
|
* 自动登录
|
||||||
*/
|
*/
|
||||||
const autoLogin = (path: string) => {
|
const autoLogin = (path: string) => {
|
||||||
console.log(path)
|
|
||||||
|
|
||||||
const token = CacheManager.get('token')
|
const token = CacheManager.get('token')
|
||||||
if (path === 'pages/loadingPage/loadingPage') {
|
if (token && path === 'pages/login/login') {
|
||||||
if (token) {
|
loginJump()
|
||||||
uni.switchTab({ url: VITE_HOME_URL })
|
return
|
||||||
}
|
|
||||||
else {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages-fg/login/login',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +79,7 @@ export const useAppStore = defineStore(
|
|||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages-fg/login/login',
|
url: '/pages/login/login',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -320,7 +320,7 @@ export function drawPoint({
|
|||||||
success,
|
success,
|
||||||
fail,
|
fail,
|
||||||
}: {
|
}: {
|
||||||
type?: 'none' | 'charge' | 'dispatch' | 'polling' | 'maintain' | 'other'
|
type?: 'none' | 'charge' | 'dispatch' | 'polling' | 'maintain'
|
||||||
// 工具的类型
|
// 工具的类型
|
||||||
point: {
|
point: {
|
||||||
id?: number
|
id?: number
|
||||||
@ -478,7 +478,7 @@ export function inspectionPoint(point: any, option: any) {
|
|||||||
let iconPath = getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
|
let iconPath = getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
|
||||||
|
|
||||||
if (!bikeInfo.isUserReporting) { // 每月任务
|
if (!bikeInfo.isUserReporting) { // 每月任务
|
||||||
iconPath = getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
|
iconPath = getImageFullPath('MAP_ICON_LIXIAN_IMAGE')
|
||||||
}
|
}
|
||||||
else if (bikeInfo.isUserReporting) {
|
else if (bikeInfo.isUserReporting) {
|
||||||
iconPath = getImageFullPath('MAP_XUNJIAN_YONGHUSHANGBAO_IMAGE')
|
iconPath = getImageFullPath('MAP_XUNJIAN_YONGHUSHANGBAO_IMAGE')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user