fix: 修改大屏不能显示bug、修改大屏字体、替换系统logo
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
fyy
2025-07-24 16:09:54 +08:00
parent 85e021b5ac
commit 007bda30bc
13 changed files with 1365 additions and 1176 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -1,5 +1,10 @@
import { defineOverridesPreferences } from '@vben/preferences'; import { defineOverridesPreferences } from '@vben/preferences';
import logo from '../src/assets/logo.png' import logo from '../src/assets/logo.png'
import logoDark from '../src/assets/logoDark.png'
import logoLight from '../src/assets/logoLight.png'
import { preferences, usePreferences } from '@vben/preferences';
const { isDark } = usePreferences();
/** /**
* @description 项目配置文件 * @description 项目配置文件
* 只需要覆盖项目中的一部分配置,不需要的配置不用覆盖,会自动使用默认配置 * 只需要覆盖项目中的一部分配置,不需要的配置不用覆盖,会自动使用默认配置
@@ -64,6 +69,6 @@ export const overridesPreferences = defineOverridesPreferences({
*/ */
logo: { logo: {
enable: true, enable: true,
source: logo, source: isDark ? logoDark : logoLight,
}, },
}); });

View File

@@ -2,9 +2,9 @@ import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table'; import type { VxeGridProps } from '#/adapter/vxe-table';
import { getDictOptions } from '#/utils/dict'; import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render'; import { renderDict } from '#/utils/render';
import {h} from "vue"; import { h } from 'vue';
import {Rate} from "ant-design-vue"; import { Rate } from 'ant-design-vue';
import {rentalOrderList} from "#/api/property/rentalOrder"; import { rentalOrderList } from '#/api/property/rentalOrder';
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
{ {
@@ -32,12 +32,12 @@ export const columns: VxeGridProps['columns'] = [
return (rowIndex + 1).toString(); return (rowIndex + 1).toString();
}, },
}, },
minWidth: '120' minWidth: '120',
}, },
{ {
title: '养护名称', title: '养护名称',
field: 'maintainName', field: 'maintainName',
minWidth: '120' minWidth: '120',
}, },
// { // {
// title: '服务地点', // title: '服务地点',
@@ -52,7 +52,7 @@ export const columns: VxeGridProps['columns'] = [
return renderDict(row.serveType, 'pro_service_type'); return renderDict(row.serveType, 'pro_service_type');
}, },
}, },
minWidth: '120' minWidth: '120',
}, },
{ {
title: '养护周期类型', title: '养护周期类型',
@@ -62,27 +62,27 @@ export const columns: VxeGridProps['columns'] = [
return renderDict(row.periodType, 'wy_time_unit'); return renderDict(row.periodType, 'wy_time_unit');
}, },
}, },
minWidth: '120' minWidth: '120',
}, },
{ {
title: '养护周期频次', title: '养护周期频次',
field: 'periodFrequency', field: 'periodFrequency',
minWidth: '120' minWidth: '120',
}, },
{ {
title: '关联订单', title: '关联订单',
field: 'orderId', field: 'orderId',
minWidth: '120' minWidth: '120',
}, },
{ {
title: '计划执行时间', title: '计划执行时间',
field: 'startTime', field: 'startTime',
minWidth: '120' minWidth: '120',
}, },
{ {
title: '计划完成时间', title: '计划完成时间',
field: 'endTime', field: 'endTime',
minWidth: '120' minWidth: '120',
}, },
{ {
title: '巡检结果', title: '巡检结果',
@@ -92,12 +92,12 @@ export const columns: VxeGridProps['columns'] = [
return renderDict(row.inspectResult, 'pro_inspection_results'); return renderDict(row.inspectResult, 'pro_inspection_results');
}, },
}, },
minWidth: '120' minWidth: '120',
}, },
{ {
title: '处理措施', title: '处理措施',
field: 'measure', field: 'measure',
minWidth: '120' minWidth: '120',
}, },
{ {
title: '客户评分', title: '客户评分',
@@ -110,12 +110,12 @@ export const columns: VxeGridProps['columns'] = [
}); });
}, },
}, },
minWidth: '150' minWidth: '150',
}, },
{ {
title: '客户反馈', title: '客户反馈',
field: 'customerAdvice', field: 'customerAdvice',
minWidth: '120' minWidth: '120',
}, },
{ {
title: '处理状态', title: '处理状态',
@@ -125,7 +125,7 @@ export const columns: VxeGridProps['columns'] = [
return renderDict(row.state, 'pro_processing_status'); return renderDict(row.state, 'pro_processing_status');
}, },
}, },
minWidth: '120' minWidth: '120',
}, },
{ {
field: 'action', field: 'action',
@@ -151,7 +151,7 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'maintainName', fieldName: 'maintainName',
component: 'Input', component: 'Input',
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '服务地点', label: '服务地点',
@@ -159,7 +159,7 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'TreeSelect', component: 'TreeSelect',
defaultValue: undefined, defaultValue: undefined,
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '服务类型', label: '服务类型',
@@ -169,7 +169,7 @@ export const modalSchema: FormSchemaGetter = () => [
options: getDictOptions('pro_service_type'), options: getDictOptions('pro_service_type'),
}, },
rules: 'selectRequired', rules: 'selectRequired',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '养护周期类型', label: '养护周期类型',
@@ -180,14 +180,14 @@ export const modalSchema: FormSchemaGetter = () => [
options: getDictOptions('wy_time_unit'), options: getDictOptions('wy_time_unit'),
}, },
rules: 'selectRequired', rules: 'selectRequired',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '养护周期频次', label: '养护周期频次',
fieldName: 'periodFrequency', fieldName: 'periodFrequency',
component: 'Input', component: 'Input',
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '关联订单', label: '关联订单',
@@ -200,7 +200,7 @@ export const modalSchema: FormSchemaGetter = () => [
valueField: 'id', valueField: 'id',
}, },
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '计划执行时间', label: '计划执行时间',
@@ -212,7 +212,7 @@ export const modalSchema: FormSchemaGetter = () => [
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, },
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '计划完成时间', label: '计划完成时间',
@@ -224,7 +224,7 @@ export const modalSchema: FormSchemaGetter = () => [
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, },
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '巡检结果', label: '巡检结果',
@@ -234,14 +234,14 @@ export const modalSchema: FormSchemaGetter = () => [
options: getDictOptions('pro_inspection_results'), options: getDictOptions('pro_inspection_results'),
}, },
rules: 'selectRequired', rules: 'selectRequired',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '处理措施', label: '处理措施',
fieldName: 'measure', fieldName: 'measure',
component: 'Textarea', component: 'Textarea',
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '客户评分', label: '客户评分',
@@ -251,16 +251,16 @@ export const modalSchema: FormSchemaGetter = () => [
allowHalf: false, allowHalf: false,
count: 5, count: 5,
tooltips: ['1星', '2星', '3星', '4星', '5星'], tooltips: ['1星', '2星', '3星', '4星', '5星'],
defaultValue: 0 defaultValue: 0,
}, },
rules: 'required', rules: 'required',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '客户反馈', label: '客户反馈',
fieldName: 'customerAdvice', fieldName: 'customerAdvice',
component: 'Textarea', component: 'Textarea',
labelWidth:100 labelWidth: 100,
}, },
{ {
label: '处理状态', label: '处理状态',
@@ -270,6 +270,6 @@ export const modalSchema: FormSchemaGetter = () => [
options: getDictOptions('pro_processing_status'), options: getDictOptions('pro_processing_status'),
}, },
rules: 'selectRequired', rules: 'selectRequired',
labelWidth:100 labelWidth: 100,
}, },
]; ];

View File

@@ -42,7 +42,11 @@ const selectedRoom = ref<string>('');
const selectedDate = ref<string>(''); const selectedDate = ref<string>('');
// 一周的日期 // 一周的日期
const weekDates = ref<string[]>([]); interface WeekDate {
date: string;
weekDay: string;
}
const weekDates = ref<WeekDate[]>([]);
// 预约数据 // 预约数据
const bookings = ref<any[]>([]); const bookings = ref<any[]>([]);
@@ -54,16 +58,23 @@ const loading = ref(false);
// 时间段只显示"上午" "下午" // 时间段只显示"上午" "下午"
const timeSlots = ['上午', '下午']; const timeSlots = ['上午', '下午'];
function getWeekDay(dateStr: string): string {
const weekMap = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const day = dayjs(dateStr).day();
return weekMap[dayjs(dateStr).day()]!;
}
// 生成一周日期 // 生成一周日期
function generateWeekDates(): void { function generateWeekDates(): void {
const today = dayjs(); const today = dayjs();
// 获取本周的周一
const startOfWeek = today.startOf('week'); const startOfWeek = today.startOf('week');
const dates = Array.from({ length: 7 }, (_, i) => { const dates: WeekDate[] = Array.from({ length: 7 }, (_, i) => {
return startOfWeek.add(i, 'day').format('YYYY-MM-DD'); const date = startOfWeek.add(i, 'day').format('YYYY-MM-DD');
return {
date,
weekDay: getWeekDay(date)
};
}); });
weekDates.value = dates; weekDates.value = dates;
// 默认选中今天
selectedDate.value = today.format('YYYY-MM-DD'); selectedDate.value = today.format('YYYY-MM-DD');
} }
@@ -107,7 +118,7 @@ async function fetchBookings(): Promise<void> {
const booking = bookings.value.find( const booking = bookings.value.find(
(b) => b.name === room.name && b.slots === slot, (b) => b.name === room.name && b.slots === slot,
); );
table[slot][room.name] = booking || null; table[slot]![room.name] = booking || null;
}); });
}); });
bookingTable.value = table; bookingTable.value = table;
@@ -135,14 +146,14 @@ async function fetchBookings(): Promise<void> {
tbConferenceId: item.meetId, tbConferenceId: item.meetId,
})); }));
const table: Record<string, Record<string, any>> = { 上午: {}, 下午: {} }; const table: Record<string, Record<string, any>> = { 上午: {}, 下午: {} };
weekDates.value.forEach((date) => { weekDates.value.forEach((item) => {
['上午', '下午'].forEach((slot) => { ['上午', '下午'].forEach((slot) => {
const booking = bookings.value.find( const booking = bookings.value.find(
(b) => (b) =>
dayjs(b.scheduledStarttime).format('YYYY-MM-DD') === date && dayjs(b.scheduledStarttime).format('YYYY-MM-DD') === item.date &&
b.slots === slot, b.slots === slot,
); );
table[slot][date] = booking || null; table[slot]![item.date] = booking || null;
}); });
}); });
bookingTable.value = table; bookingTable.value = table;
@@ -271,10 +282,10 @@ const columns = computed<TableColumnType<TableRecord>[]>(() => {
key: room.name, key: room.name,
width: 200, width: 200,
})) }))
: weekDates.value.map((date) => ({ : weekDates.value.map((item) => ({
title: dayjs(date).format('YYYY-MM-DD'), title: item.date,
dataIndex: date, dataIndex: item.date,
key: date, key: item.date,
width: 200, width: 200,
})); }));
return [...baseColumns, ...dynamicColumns]; return [...baseColumns, ...dynamicColumns];
@@ -284,10 +295,12 @@ const tableData = computed<TableRecord[]>(() => {
const slots = ['上午', '下午']; const slots = ['上午', '下午'];
return slots.map((slot) => { return slots.map((slot) => {
const row: any = { slot }; const row: any = { slot };
const cols = let cols: string[] = [];
viewMode.value === 'date' if (viewMode.value === 'date') {
? getFullRoomList().map((room) => room.name) cols = getFullRoomList().map((room) => room.name);
: weekDates.value; } else {
cols = weekDates.value.map(item => item.date);
}
cols.forEach((col) => { cols.forEach((col) => {
row[col] = bookingTable.value[slot]?.[col] || null; row[col] = bookingTable.value[slot]?.[col] || null;
}); });
@@ -328,12 +341,12 @@ onMounted(() => {
</div> </div>
<div v-if="viewMode === 'date'" class="date-buttons"> <div v-if="viewMode === 'date'" class="date-buttons">
<Button <Button
v-for="date in weekDates" v-for="item in weekDates"
:key="date" :key="item.date"
:type="date === selectedDate ? 'primary' : 'default'" :type="item.date === selectedDate ? 'primary' : 'default'"
@click="handleDateChange(date)" @click="handleDateChange(item.date)"
> >
{{ dayjs(date).format('YYYY-MM-DD') }} {{ item.date }} ({{ item.weekDay }})
</Button> </Button>
</div> </div>
<Table <Table
@@ -347,7 +360,7 @@ onMounted(() => {
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex !== 'slot'"> <template v-if="column.dataIndex !== 'slot'">
<div v-if="record[column.dataIndex]" :style="getRandomBgColor()"> <div v-if="typeof column.dataIndex === 'string' && record[column.dataIndex]" :style="getRandomBgColor()">
<div>预约人{{ record[column.dataIndex].personName }}</div> <div>预约人{{ record[column.dataIndex].personName }}</div>
<div>单位{{ record[column.dataIndex].unitName }}</div> <div>单位{{ record[column.dataIndex].unitName }}</div>
</div> </div>

View File

@@ -914,6 +914,12 @@ onBeforeUnmount(() => {
</script> </script>
<style scoped> <style scoped>
@font-face {
font-family: 'ShiShangZhongHeiJianTi';
src: url('../../../assets/fonts/时尚中黑简体.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.mian{ .mian{
height: 100vh; height: 100vh;
background: url("../../../assets/digitalIntelligence/bg.png"); background: url("../../../assets/digitalIntelligence/bg.png");

View File

@@ -843,6 +843,12 @@ onBeforeUnmount(() => {
</script> </script>
<style scoped> <style scoped>
@font-face {
font-family: 'ShiShangZhongHeiJianTi';
src: url('../../../assets/fonts/时尚中黑简体.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.mian{ .mian{
height: 100vh; height: 100vh;
background: url("../../../assets/monitor/bg.png"); background: url("../../../assets/monitor/bg.png");

View File

@@ -88,6 +88,12 @@ const goToHome = () => {
</script> </script>
<style scoped> <style scoped>
@font-face {
font-family: 'ShiShangZhongHeiJianTi';
src: url('../../../assets/fonts/时尚中黑简体.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.navigation-bg { .navigation-bg {
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;

File diff suppressed because it is too large Load Diff

View File

@@ -731,6 +731,12 @@ onBeforeUnmount(() => {
</script> </script>
<style scoped> <style scoped>
@font-face {
font-family: 'ShiShangZhongHeiJianTi';
src: url('../../../assets/fonts/时尚中黑简体.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.mian{ .mian{
height: 100vh; height: 100vh;
background: url("../../../assets/security/bg.png"); background: url("../../../assets/security/bg.png");
@@ -811,6 +817,7 @@ onBeforeUnmount(() => {
font-size: 1.5rem; font-size: 1.5rem;
font-weight: bold; font-weight: bold;
margin: 0 0.2rem; margin: 0 0.2rem;
font-family: ShiShangZhongHeiJianTi;
} }
.header-value.orange { color: #ffb300; } .header-value.orange { color: #ffb300; }

View File

@@ -1,5 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { VbenAvatar } from '../avatar'; import { VbenAvatar } from '../avatar';
import { usePreferences } from '../../../../../../../packages/preferences/src/index';
const { isDark } = usePreferences();
interface Props { interface Props {
/** /**
@@ -51,23 +53,39 @@ withDefaults(defineProps<Props>(), {
<a <a
:class="$attrs.class" :class="$attrs.class"
:href="href" :href="href"
class="flex h-full items-center gap-2 overflow-hidden px-3 text-lg leading-normal transition-all duration-500" class="flex items-center gap-2 overflow-hidden text-lg leading-normal transition-all duration-500"
> >
<VbenAvatar <div style="margin-top: 20px">
<img
src="../../../../../../../apps/web-antd/src/assets/logoLight.png"
alt=""
v-if="isDark"
width="170"
height="49"
/>
<img
src="../../../../../../../apps/web-antd/src/assets/logoDark.png"
alt=""
v-if="!isDark"
width="170"
height="49"
/>
</div>
<!-- <VbenAvatar
v-if="src" v-if="src"
:alt="text" :alt="text"
:src="src" :src="src"
:size="logoSize" :size="logoSize"
:fit="fit" :fit="fit"
class="relative rounded-none bg-transparent" class="relative rounded-none bg-transparent"
/> /> -->
<template v-if="!collapsed"> <!-- <template v-if="!collapsed">
<slot name="text"> <slot name="text">
<span class="text-foreground truncate text-nowrap font-semibold"> <span class="text-foreground truncate text-nowrap font-semibold">
{{ text }} {{ text }}
</span> </span>
</slot> </slot>
</template> </template> -->
</a> </a>
</div> </div>
</template> </template>

View File

@@ -111,7 +111,6 @@ const handleAccountLogin = async () => {
<template> <template>
<div class="login-bg"> <div class="login-bg">
<div class="login-bg_1"> <div class="login-bg_1">
<div class="login-wapter"> <div class="login-wapter">
<div class="login-wapter1">欢迎登录</div> <div class="login-wapter1">欢迎登录</div>