Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac592f674f | ||
| d1942ac19e | |||
| 9d5bcd2383 |
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.cdzhuojing.cn/file/static-objects/img-file/'
|
VITE_APP_IMAGE_URL = 'https://www.cx.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/login/login',
|
url: '/pages-fg/login/login',
|
||||||
})
|
})
|
||||||
|
|
||||||
return reject(responseData)
|
return reject(responseData)
|
||||||
|
|||||||
@ -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',
|
||||||
},
|
},
|
||||||
@ -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,9 +62,11 @@ 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. 巡检
|
// 4. 巡检(TUDO:没有对应的图标)
|
||||||
if (hasInspection) {
|
if (hasInspection) {
|
||||||
return getImageFullPath('MAP_ICON_REPAIRE_CAR_IMAGE')
|
return getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5. 都没有订单
|
// 5. 都没有订单
|
||||||
|
|||||||
119
src/pages/loadingPage/loadingPage.vue
Normal file
119
src/pages/loadingPage/loadingPage.vue
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<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>
|
||||||
@ -1,4 +1,5 @@
|
|||||||
<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'
|
||||||
|
|
||||||
@ -18,6 +19,9 @@ const order_list = ref<any>([
|
|||||||
query: {
|
query: {
|
||||||
handelSate: '1',
|
handelSate: '1',
|
||||||
},
|
},
|
||||||
|
bot: {
|
||||||
|
num: 0,
|
||||||
|
},
|
||||||
icon: 'WODEGONGDAN_WEIWANC_IMAGE',
|
icon: 'WODEGONGDAN_WEIWANC_IMAGE',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -90,6 +94,28 @@ 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>
|
||||||
@ -131,6 +157,9 @@ onMounted(() => {
|
|||||||
@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">
|
||||||
@ -249,9 +278,33 @@ onMounted(() => {
|
|||||||
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,10 +38,18 @@ 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 (token && path === 'pages/login/login') {
|
if (path === 'pages/loadingPage/loadingPage') {
|
||||||
loginJump()
|
if (token) {
|
||||||
return
|
uni.switchTab({ url: VITE_HOME_URL })
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages-fg/login/login',
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +87,7 @@ export const useAppStore = defineStore(
|
|||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login',
|
url: '/pages-fg/login/login',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -320,7 +320,7 @@ export function drawPoint({
|
|||||||
success,
|
success,
|
||||||
fail,
|
fail,
|
||||||
}: {
|
}: {
|
||||||
type?: 'none' | 'charge' | 'dispatch' | 'polling' | 'maintain'
|
type?: 'none' | 'charge' | 'dispatch' | 'polling' | 'maintain' | 'other'
|
||||||
// 工具的类型
|
// 工具的类型
|
||||||
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('MAP_ICON_LIXIAN_IMAGE')
|
iconPath = getImageFullPath('CUSTOM_CAR_ICON_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