Browse Source

feat vh/vw优化首页图片 & 移除HomeFilter rules规则

wangqin
qingzhengli 9 months ago
parent
commit
8c652d6641
  1. 72
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue
  2. 131
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrame/index.vue

72
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue

@ -28,7 +28,7 @@
<script> <script>
import Button from '@screen/components/Buttons/Button.vue'; import Button from '@screen/components/Buttons/Button.vue';
import Form from '@screen/components/FormConfig'; import Form from '@screen/components/FormConfig';
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; import * as PresetFormItems from "@screen/common/PresetFormItems.js";
import { merge, cloneDeep } from "lodash" import { merge, cloneDeep } from "lodash"
import request from "@/utils/request"; import request from "@/utils/request";
@ -42,74 +42,8 @@ export default {
return { return {
activeIcon: null, activeIcon: null,
formList: [ formList: [
merge(cloneDeep(PresetFormItems.station), { PresetFormItems.startStation,
required: false, PresetFormItems.endStation,
label: "起始桩号:",
options: {
options: [
{
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.startStakeMark[1]?.trim())
return false;
else return true;
},
},
],
key: "startStakeMark[0]",
},
{
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.startStakeMark[0]?.trim())
return false;
else return true;
},
},
],
key: "startStakeMark[1]",
},
],
},
}),
merge(cloneDeep(PresetFormItems.station), {
required: false,
label: "结束桩号:",
options: {
options: [
{
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.endStakeMark[1]?.trim())
return false;
else return true;
},
},
],
key: "endStakeMark[0]",
},
{
rules: [
{
message: "请补全桩号",
callback(value, data) {
if (!value?.trim() && data.endStakeMark[0]?.trim())
return false;
else return true;
},
},
],
key: "endStakeMark[1]",
},
],
},
}),
{ {
label: "设备类型:", label: "设备类型:",
key: "deviceType", key: "deviceType",

131
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrame/index.vue

@ -1,22 +1,22 @@
<template> <template>
<div class='HomeFrame'> <div class='HomeFrame'>
<ElPopover trigger="manual" :value="activeIcon === 'Frame'" :visibleArrow="false" placement="left" <ElPopover trigger="manual" :value="activeIcon === 'Frame'" :visibleArrow="false" placement="left"
popper-class="global-input-search-popover"> popper-class="global-input-search-popover">
<Button :class="['btn', { 'btn-active': activeIcon }]" slot="reference" @click.native="handleClick('Frame')"> <Button :class="['btn', { 'btn-active': activeIcon }]" slot="reference" @click.native="handleClick('Frame')">
<img src="@screen/images/home-Frame/Frame.svg"> <img src="@screen/images/home-Frame/Frame.svg">
</Button> </Button>
<div class="body"> <div class="body">
<div class="title"> <div class="title">
图标含义 图标含义
</div> </div>
<!-- <Form labelWidth="90px" column="1" class="form" ref="FormConfigRef" :formList="formList" /> --> <!-- <Form labelWidth="90px" column="1" class="form" ref="FormConfigRef" :formList="formList" /> -->
<img class="image" src="@screen/images/home-Frame/logoMean.jpg"> <img class="image" src="@screen/images/home-Frame/logoMean.jpg">
<div class="footer"> <!-- <div class="footer">
</div> </div> -->
</div> </div>
</ElPopover> </ElPopover>
</div> </div>
</template> </template>
<script> <script>
@ -26,69 +26,70 @@ import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/Pr
import { merge, cloneDeep } from "lodash" import { merge, cloneDeep } from "lodash"
export default { export default {
name: 'HomeFrame', name: 'HomeFrame',
components: { components: {
Button, Button,
Form Form
}, },
data() { data() {
return { return {
activeIcon: null activeIcon: null
} }
}, },
methods: { methods: {
handleClick(type) { handleClick(type) {
this.activeIcon = this.activeIcon === type ? null : type; this.activeIcon = this.activeIcon === type ? null : type;
}, },
filterEnd(data) { filterEnd(data) {
this.activeIcon = null; this.activeIcon = null;
// this.filterData = data; // this.filterData = data;
this.$parent.$refs.RoadAndEventsRef?.setFilterData?.(data); this.$parent.$refs.RoadAndEventsRef?.setFilterData?.(data);
}, },
} }
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
div.el-popper.global-input-search-popover { div.el-popper.global-input-search-popover {
background: rgba(6, 66, 88, 0.8); background: rgba(6, 66, 88, 0.8);
border: 1px solid rgba(42, 217, 253, 0.6); border: 1px solid rgba(42, 217, 253, 0.6);
position: relative; position: relative;
padding-top: 36px; padding-top: 36px;
transform: translateY(24px); transform: translateY(24px);
margin-top: 3vh;
.body { .body {
.title { .title {
background: linear-gradient(90deg, #237E9B 0%, rgba(23, 145, 184, 0) 100%); background: linear-gradient(90deg, #237E9B 0%, rgba(23, 145, 184, 0) 100%);
padding: 3px 9px; padding: 3px 9px;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
} }
} }
} }
</style> </style>
<style lang='scss' scoped> <style lang='scss' scoped>
.image { .image {
width: 1440px; width: 45vw;
height: 900px; height: 65vh;
} }
.HomeFrame { .HomeFrame {
.btn { .btn {
padding: 9px; padding: 9px;
background: linear-gradient(180deg, #152E3C 0%, #163A45 100%); background: linear-gradient(180deg, #152E3C 0%, #163A45 100%);
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
height: unset; height: unset;
border: 1px solid rgba(40, 144, 167, 1); border: 1px solid rgba(40, 144, 167, 1);
} }
.btn-active { .btn-active {
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%); background: linear-gradient(180deg, #005C79 0%, #009BCC 100%);
} }
} }
</style> </style>

Loading…
Cancel
Save