Commit 387ebb07 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 全局高度样式调整

parent 3e37f9b6
...@@ -5,11 +5,16 @@ ...@@ -5,11 +5,16 @@
<script setup> <script setup>
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme' import { handleThemeStyle } from '@/utils/theme'
const screenHeight = ref(window.innerHeight-145);
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
// 初始化主题样式 // 初始化主题样式
handleThemeStyle(useSettingsStore().theme) handleThemeStyle(useSettingsStore().theme)
window.addEventListener('resize', handleResize);
}) })
}) })
function handleResize() {
screenHeight.value = window.innerHeight-145;
}
provide('globalScreenHeight', screenHeight);
</script> </script>
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<el-breadcrumb class="app-breadcrumb" separator="/"> <el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path"> <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span> <span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect" >{{ item.meta.title }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a> <a v-else @click.prevent="handleLink(item)" style="color: #fff;">{{ item.meta.title }}</a>
</el-breadcrumb-item> </el-breadcrumb-item>
</transition-group> </transition-group>
</el-breadcrumb> </el-breadcrumb>
...@@ -52,14 +52,17 @@ getBreadcrumb(); ...@@ -52,14 +52,17 @@ getBreadcrumb();
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.el-breadcrumb__separator{
color: #fff;
}
.app-breadcrumb.el-breadcrumb { .app-breadcrumb.el-breadcrumb {
display: inline-block; display: inline-block;
font-size: 14px; font-size: 14px;
line-height: 50px; line-height: 50px;
margin-left: 8px; margin-left: 8px;
color: #fff;
.no-redirect { .no-redirect {
color: #97a8be; color: #fff;
cursor: text; cursor: text;
} }
} }
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
<svg <svg
:class="{'is-active':isActive}" :class="{'is-active':isActive}"
class="hamburger" class="hamburger"
style="color: #fff;"
viewBox="0 0 1024 1024" viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="64" width="64"
height="64" height="64"
> >
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" /> <path id="mySvg" d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
</svg> </svg>
</div> </div>
</template> </template>
...@@ -25,6 +26,13 @@ const emit = defineEmits() ...@@ -25,6 +26,13 @@ const emit = defineEmits()
const toggleClick = () => { const toggleClick = () => {
emit('toggleClick'); emit('toggleClick');
} }
onMounted(() => {
const element = document.getElementById('mySvg');
element.style.fill = '#fff';
})
</script> </script>
<style scoped> <style scoped>
......
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" /> <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip> --> </el-tooltip> -->
<el-tooltip content="文档地址" effect="dark" placement="bottom"> <!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" /> <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip> -->
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom"> <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" /> <size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip> -->
</template> </template>
<div class="avatar-container"> <div class="avatar-container">
<el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click"> <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
......
...@@ -57,19 +57,19 @@ export const constantRoutes = [ ...@@ -57,19 +57,19 @@ export const constantRoutes = [
component: () => import('@/views/error/401'), component: () => import('@/views/error/401'),
hidden: true hidden: true
}, },
{ // {
path: '', // path: '',
component: Layout, // component: Layout,
redirect: '/index', // redirect: '/index',
children: [ // children: [
{ // {
path: '/index', // path: '/index',
component: () => import('@/views/index'), // component: () => import('@/views/index'),
name: 'Index', // name: 'Index',
meta: { title: '工作台', icon: 'dashboard', affix: true } // meta: { title: '工作台', icon: 'dashboard', affix: true }
} // }
] // ]
}, // },
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<TabTitle :text="nowText" /> <TabTitle :text="nowText" />
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :xs="24" :sm="24" :md="24" :lg="24"> <el-col :xs="24" :sm="24" :md="24" :lg="24">
<el-scrollbar height="730px"> <el-scrollbar :height="globalScreenHeight+'px'">
<el-card class="right-list"> <el-card class="right-list">
<template v-slot:header> <template v-slot:header>
<el-form :model="queryParams" ref="queryRef" :inline="true" > <el-form :model="queryParams" ref="queryRef" :inline="true" >
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
import alarmDetial from './components/form.vue' import alarmDetial from './components/form.vue'
import { ArrowDown } from '@element-plus/icons-vue' import { ArrowDown } from '@element-plus/icons-vue'
import { Search } from '@element-plus/icons-vue' import { Search } from '@element-plus/icons-vue'
const globalScreenHeight = inject('globalScreenHeight');
const router = useRouter(); const router = useRouter();
const alarmDetialRef = ref(null) const alarmDetialRef = ref(null)
const nowText=ref('告警管理') const nowText=ref('告警管理')
......
<template> <template>
<div>
<el-dialog <el-dialog
v-model="open" v-model="open"
:title="title" :title="title"
...@@ -457,6 +458,8 @@ ...@@ -457,6 +458,8 @@
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
</div>
</template> </template>
<script setup> <script setup>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<TabTitle :text="nowText" /> <TabTitle :text="nowText" />
<el-card class="left-list"> <el-card class="left-list" :style="{height:globalScreenHeight+'px'}">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="算法名称" prop="algorithmName"> <el-form-item label="算法名称" prop="algorithmName">
<el-input <el-input
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
<algForm ref="algFormRef" @getList="getList"/> <algForm ref="algFormRef" @getList1="getList"/>
</div> </div>
</template> </template>
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { algorithm_scen, sys_job_status } = proxy.useDict("algorithm_scen", "sys_job_status"); const { algorithm_scen, sys_job_status } = proxy.useDict("algorithm_scen", "sys_job_status");
const globalScreenHeight = inject('globalScreenHeight');
const algFormRef = ref(null) const algFormRef = ref(null)
const nowText = ref("算法管理"); const nowText = ref("算法管理");
const algList = ref([]); const algList = ref([]);
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
{{form.cardCopywriting}} {{form.cardCopywriting}}
</p> </p>
</div> </div>
<div style="width: 400px;height: 225px;" > <div style="width: 400px;height: 225px;overflow: hidden;" >
<video v-if="videoLoading" controls ref="videoEle" class="drawImg"> <video v-if="videoLoading" controls ref="videoEle" class="drawImg" width="100%" style="border-radius: 10px;">
<source :src="backVideo" type="video/mp4" /> <source :src="backVideo" type="video/mp4" />
</video> </video>
</div> </div>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :xs="0" :sm="2" :md="3" :lg="4"> <el-col :xs="0" :sm="2" :md="3" :lg="4">
<el-card class="left-list"> <el-card class="left-list" style="height: 100%;">
<el-menu <el-menu
default-active="2" default-active="2"
class="el-menu-vertical-demo" class="el-menu-vertical-demo"
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :xs="24" :sm="20" :md="20" :lg="20"> <el-col :xs="24" :sm="20" :md="20" :lg="20">
<el-scrollbar height="710px"> <el-scrollbar :height="globalScreenHeight+'px'">
<el-card class="right-list"> <el-card class="right-list">
<template v-slot:header> <template v-slot:header>
<div class="cleartitle" style="justify-content: flex-start"> <div class="cleartitle" style="justify-content: flex-start">
...@@ -146,53 +146,13 @@ ...@@ -146,53 +146,13 @@
const { algorithm_scen, sys_job_status } = proxy.useDict("algorithm_scen", "sys_job_status"); const { algorithm_scen, sys_job_status } = proxy.useDict("algorithm_scen", "sys_job_status");
import { ArrowDown } from '@element-plus/icons-vue' import { ArrowDown } from '@element-plus/icons-vue'
import { Search } from '@element-plus/icons-vue' import { Search } from '@element-plus/icons-vue'
const globalScreenHeight = inject('globalScreenHeight');
const router = useRouter(); const router = useRouter();
const algorithmDownRef = ref(null) const algorithmDownRef = ref(null)
const nowText=ref('算法管理') const nowText=ref('算法管理')
const nowTopTitle=ref('算法管理') const nowTopTitle=ref('算法管理')
const ids = ref([]); const ids = ref([]);
const algorithmList=reactive([ const algorithmList=reactive([])
{
name:"我的算法",
value:1
},
{
name:"最新算法",
value:2
},
{
name:"基础算法",
value:3
},
{
name:"智慧煤矿",
value:4
},
{
name:"智慧能源",
value:5
},
{
name:"智慧校园",
value:6
},
{
name:"智慧港口",
value:7
},
{
name:"智慧煤矿",
value:8
},
{
name:"智慧能源",
value:9
},
{
name:"智慧校园",
value:10
},
])
const algList = ref([]); const algList = ref([]);
const data = reactive({ const data = reactive({
form: {}, form: {},
...@@ -211,7 +171,6 @@ ...@@ -211,7 +171,6 @@
}); });
const { queryParams, form, rules } = toRefs(data); const { queryParams, form, rules } = toRefs(data);
/** 查询算法列表 */ /** 查询算法列表 */
function getList() { function getList() {
// loading.value = true; // loading.value = true;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<TabTitle :text="nowText" /> <TabTitle :text="nowText" />
<el-card class="left-list"> <el-card class="left-list" :style="{height:globalScreenHeight+'px'}">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="设备名称" prop="deviceName"> <el-form-item label="设备名称" prop="deviceName">
<el-input <el-input
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { sys_job_group, sys_job_status } = proxy.useDict("sys_job_group", "sys_job_status"); const { sys_job_group, sys_job_status } = proxy.useDict("sys_job_group", "sys_job_status");
const globalScreenHeight = inject('globalScreenHeight');
const nowText = ref("设备管理"); const nowText = ref("设备管理");
const deviceList = ref([]); const deviceList = ref([]);
const open = ref(false); const open = ref(false);
......
...@@ -125,7 +125,7 @@ function handleLogin() { ...@@ -125,7 +125,7 @@ function handleLogin() {
} }
return acc; return acc;
}, {}); }, {});
router.push({ path: redirect.value || "/", query: otherQueryParams }); router.push({ path: redirect.value || "/deviceControl", query: otherQueryParams });
}).catch(() => { }).catch(() => {
loading.value = false; loading.value = false;
// 重新获取验证码 // 重新获取验证码
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :xs="24" :sm="16" :md="16" :lg="20"> <el-col :xs="24" :sm="16" :md="16" :lg="20">
<el-scrollbar height="700px"> <el-scrollbar :height="globalScreenHeight+'px'">
<el-card class="right-list"> <el-card class="right-list">
<template v-slot:header> <template v-slot:header>
<div class="cleartitle" style="justify-content: flex-start"> <div class="cleartitle" style="justify-content: flex-start">
...@@ -295,6 +295,7 @@ import { onMounted, reactive, ref, unref, watch, watchEffect } from "vue"; ...@@ -295,6 +295,7 @@ import { onMounted, reactive, ref, unref, watch, watchEffect } from "vue";
import request from "@/utils/request"; import request from "@/utils/request";
import { useIndex } from "./hooks"; import { useIndex } from "./hooks";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const globalScreenHeight = inject('globalScreenHeight');
const drawPointRef = ref(null); const drawPointRef = ref(null);
const nowText = ref("点位管理"); const nowText = ref("点位管理");
const deptName = ref(""); const deptName = ref("");
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<TabTitle :text="nowText" /> <TabTitle :text="nowText" />
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :xs="0" :sm="2" :md="3" :lg="4"> <el-col :xs="0" :sm="2" :md="3" :lg="4">
<el-card class="left-list"> <el-card class="left-list" :style="{height:globalScreenHeight+'px'}">
<div class="head-container"> <div class="head-container">
<el-input <el-input
v-model="deptName" v-model="deptName"
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :xs="24" :sm="16" :md="16" :lg="14"> <el-col :xs="24" :sm="16" :md="16" :lg="14">
<el-scrollbar height="700px"> <el-card class="right-list" :style="{height:globalScreenHeight+'px'}">
<el-card class="right-list">
<template v-slot:header> <template v-slot:header>
<div class="cleartitle" style="justify-content: flex-start"> <div class="cleartitle" style="justify-content: flex-start">
<img src="@/assets/images/logo_video.png" width="25px" alt /> <img src="@/assets/images/logo_video.png" width="25px" alt />
...@@ -60,10 +59,9 @@ ...@@ -60,10 +59,9 @@
</el-card> </el-card>
</div> </div>
</el-card> </el-card>
</el-scrollbar>
</el-col> </el-col>
<el-col :xs="0" :sm="2" :md="3" :lg="6"> <el-col :xs="0" :sm="2" :md="3" :lg="6">
<el-scrollbar height="700px"> <el-scrollbar :height="globalScreenHeight+'px'">
<el-card class="danger-list"> <el-card class="danger-list">
<template v-slot:header> <template v-slot:header>
<div class="cleartitle" style="justify-content: flex-start"> <div class="cleartitle" style="justify-content: flex-start">
...@@ -106,6 +104,7 @@ import { listAiRegionManage } from "@/api/videoControl/videoPreview"; ...@@ -106,6 +104,7 @@ import { listAiRegionManage } from "@/api/videoControl/videoPreview";
import { listAlarm } from "@/api/alarmControl/index.js"; import { listAlarm } from "@/api/alarmControl/index.js";
import { onMounted, reactive, ref, } from "vue"; import { onMounted, reactive, ref, } from "vue";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const globalScreenHeight = inject('globalScreenHeight');
const algFormRef = ref(null); const algFormRef = ref(null);
const nowText = ref("视频预览"); const nowText = ref("视频预览");
const deptTreeRef = ref(null); const deptTreeRef = ref(null);
......
...@@ -31,8 +31,8 @@ export default defineConfig(({ mode, command }) => { ...@@ -31,8 +31,8 @@ export default defineConfig(({ mode, command }) => {
proxy: { proxy: {
// https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy
'/dev-api': { '/dev-api': {
// target: 'http://192.168.4.206:80/ai', target: 'http://192.168.3.82/ai',
target:'http://192.168.14.43:8111/ai', // target:'http://192.168.14.43:8111/ai',
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '') rewrite: (p) => p.replace(/^\/dev-api/, '')
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment