大屏天气列表

This commit is contained in:
Teo
2025-05-13 18:29:12 +08:00
parent 055a87d2c2
commit c92f2091d9
27 changed files with 130 additions and 29 deletions

View File

@ -1,6 +1,16 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { QualityVO, Query, ConstructionUserVO, MachineryrVO, MaterialsVO, projectNewsVO, safetyInspectionVO, projectNewsDetailVO } from './type';
import {
QualityVO,
Query,
ConstructionUserVO,
MachineryrVO,
MaterialsVO,
projectNewsVO,
safetyInspectionVO,
projectNewsDetailVO,
weatherVO
} from './type';
/**
* 查询大屏质量信息
* @param query
@ -97,3 +107,16 @@ export const getMaterialsList = (query?: Query): AxiosPromise<MaterialsVO[]> =>
params: query
});
};
/**
* 查询项目天气
* @param query
* @returns {*}
*/
export const getweatherList = (id?: string): AxiosPromise<weatherVO[]> => {
return request({
url: '/project/project/weather/' + id,
method: 'get'
});
};

View File

@ -73,3 +73,16 @@ export interface safetyInspectionlist {
name: string;
meetingDate: string;
}
export interface weatherVO {
date: string;
week: string;
tempMax: string;
tempMin: string;
dayStatus: string;
dayIcon: string;
nightStatus: string;
nightIcon: string;
sunRise: string;
sunSet: string;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

BIN
src/assets/images/fog.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/images/haze.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
src/assets/images/sunny.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -554,7 +554,7 @@ onUnmounted(() => {
#orderMain {
width: 100%;
padding-right: vw(14);
height: vh(300);
height: vh(335);
}
.title {
> div > img {

View File

@ -14,6 +14,10 @@ const createEarth = () => {
roll: 0.0
}
});
let layer = new YJ.Obj.ArcgisWXImagery(sdk, {
show: true,
layer_index: 1
});
YJ.Global.CesiumContainer(sdk, {
compass: false // 罗盘
});

View File

@ -12,7 +12,7 @@
import { ref, onMounted, onUnmounted, computed } from 'vue';
const props = defineProps<{
items: string[];
items: any[];
interval?: number;
height?: number;
}>();
@ -92,7 +92,7 @@ onUnmounted(() => {
@import '../css/gis.scss'; // 引入 vh 单位
.marquee-container {
height: vh(50); /* 控制容器高度为视口高度的 10% */
width: vw(287);
min-width: vw(287);
overflow: hidden;
position: relative;
}

View File

@ -3,22 +3,29 @@
<div class="header flex items-center justify-between">
<div class="productionday flex items-center">
<img src="@/assets/images/projectLogo.png" alt="" />
<img src="@/assets/images/projectday.png" alt="" />
1,235
<img src="@/assets/images/days.png" alt="" />
<div class="flex items-center">
<!-- <img src="@/assets/images/projectday.png" alt="" /> -->
<div class="days">安全生产天数</div>
<div class="num">1,235</div>
<div class="unit"></div>
<!-- <img src="@/assets/images/days.png" alt="" /> -->
</div>
</div>
<div class="title">XXX智慧工地管理平台</div>
<div class="calendar flex items-center">
<WeatherListScroll :items="['3', '3', '3']" class="weatherList" :interval="3500">
<WeatherListScroll :items="weatherData" class="weatherList" :interval="3500" v-if="weatherData.length">
<template #default="{ item, index }">
<div class="flex items-center">
<div class="Weather text-white flex items-center">
<img src="@/assets/images/Weather.png" alt="" />
<div><span class="textBlack">多云</span><span class="robotocondensed"> 9°/18°</span></div>
<img :src="`../../../src/assets/images/${item.nightIcon}.png`" alt="" />
<div>
<div class="textBlack">{{ item.dayStatus + ' ' }}&nbsp;</div>
<div class="robotocondensed">{{ item.tempMin }}°/{{ item.tempMax }}°</div>
</div>
</div>
<div class="weeks">
<span class="textBlack">周一(</span>
<span class="robotocondensed">2024.3.11</span>
<span class="textBlack">{{ item.week }}&nbsp;(</span>
<span class="robotocondensed">{{ item.date }}</span>
<span class="textBlack">)</span>
</div>
</div>
@ -49,18 +56,36 @@
<script lang="ts" setup>
import router from '@/router';
//底部轮播
import Carousel from './component/carousel.vue';
//左侧
import LeftMain from './component/leftMain.vue';
//地图
import Map from './component/map.vue';
//右侧
import RightMain from './component/rightMain.vue';
//天气
import WeatherListScroll from './component/weatherListScroll.vue';
import { getweatherList } from '@/api/gis';
import { useUserStoreHook } from '@/store/modules/user';
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);
const weatherData = ref([]);
const goHome = () => {
let routeUrl = router.resolve({
path: '/index'
});
window.open(routeUrl.href, 'index');
};
const getweatherData = async () => {
const res = await getweatherList(currentProject.value.id);
weatherData.value = res.data;
};
onMounted(() => {
getweatherData();
});
</script>
<style lang="scss" scoped>
@ -118,7 +143,14 @@ const goHome = () => {
padding-top: vh(14);
font-size: vw(16);
.Weather {
margin-right: vw(30);
margin-right: vw(20);
> div {
min-width: vw(88);
display: flex;
align-items: center;
flex-wrap: nowrap;
max-width: vw(174);
}
img {
width: vw(50);
}
@ -136,9 +168,6 @@ const goHome = () => {
}
.title {
color: rgba(255, 255, 255, 1);
font-family: 'DOUYUFont';
font-size: vw(32);
position: absolute;
top: 0;
left: 0;
@ -148,20 +177,46 @@ const goHome = () => {
width: vw(579);
height: vh(92.58);
line-height: vh(92.58);
letter-spacing: 5px;
text-align: center;
font-family: 'DOUYUFont';
color: rgba(255, 255, 255, 1);
font-size: vw(32);
}
.productionday {
height: vh(48);
> img:first-child {
img:first-child {
margin-right: vw(8);
}
font-family: 'Roboto Condensed';
font-size: vw(28);
font-weight: 700;
color: rgba(255, 255, 255, 1);
text-shadow: 0px 1.24px 6.21px rgba(25, 179, 250, 1);
> div {
height: vh(39);
div {
height: 100%;
line-height: vh(48);
vertical-align: bottom;
}
.unit {
font-family: '思源黑体';
text-shadow: 0px 1.24px 6.21px rgba(25, 179, 250, 1);
font-size: vw(14);
color: rgba(255, 255, 255, 1);
}
.num {
font-family: 'Roboto';
font-size: vw(28);
font-weight: 700;
width: vw(73);
color: rgba(255, 255, 255, 1);
text-shadow: 0px 1.24px 6.21px rgba(25, 179, 250, 1);
padding-bottom: vh(40);
margin-right: vw(5);
}
.days {
font-family: '思源黑体';
font-size: vw(16);
color: rgba(255, 255, 255, 1);
}
}
}
.goHome {
@ -196,5 +251,8 @@ const goHome = () => {
line-height: vw(23.17);
color: rgba(230, 247, 255, 1);
font-family: '思源黑体';
width: auto;
max-width: vw(174);
white-space: nowrap;
}
</style>

View File

@ -16,7 +16,7 @@
:z-index="9999"
:preview-src-list="imgList(scope.row.pictureList)"
preview-teleported
:src="scope.row.pictureList[0].url"
:src="scope.row.pictureList ? scope.row.pictureList[0].url : ''"
class="w20"
/>
</template>
@ -98,11 +98,9 @@
import { MachineryDetailForm, MachineryDetailQuery, MachineryDetailVO } from '@/api/machinery/machineryDetail/types';
import { delMachineryDetail, getMachineryDetail, listMachineryDetail, updateMachineryDetail } from '@/api/machinery/machineryDetail';
import { ref } from 'vue';
import { Picture } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { machinery_entry_exit_type, sys_normal_disable } = toRefs<any>(proxy?.useDict('machinery_entry_exit_type', 'sys_normal_disable'));
interface Props {
machineryId: string | number;
}
@ -149,7 +147,12 @@ const data = reactive<PageData<MachineryDetailForm, MachineryDetailQuery>>({
const { queryParams, form, rules } = toRefs(data);
const imgList = computed(() => (list) => {
const newList = list.map((item) => item.url);
let newList;
if (list) {
newList = list.map((item) => item.url);
} else {
newList = [''];
}
return newList;
});
@ -197,7 +200,7 @@ const submitForm = () => {
const closeDialog = () => {
dialogRef.value = false;
};
onMounted(() => {
onMounted(async () => {
getList();
});
</script>