web
13 小时以前 855deb4dfb6458a1eed217363625b13d58143f58
fix:修改图片地址,路由懒加载
已修改3个文件
28 ■■■■■ 文件已修改
src/router/index.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/facility/monitorList/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/flow/home/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -7,11 +7,6 @@
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createWebHashHistory, createRouter } from 'vue-router'
/* Layout */
import Layout from '@/layout'
import Screen from '@/screen'
import Flow from '@/screen/flow.vue'
import Temp from '@/screen/temp.vue'
/**
 * Note: 路由配置项
@@ -56,13 +51,13 @@
  },
  {
    path: '/screen',
    component: Screen,
    component: () => import('@/screen/index.vue'),
    hidden: true
  },
  {
    path: '',  //单独添加得后台路由,需要一层layout
    hidden: true,
    component: Layout,
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: '/userCenter',
@@ -78,7 +73,7 @@
const FlowScreenRouter = [
  {
    path: '/flow',
    component: Flow,
    component: () => import('@/screen/flow.vue'),
    redirect: '/flow/home',
    children: [
      {
@@ -113,7 +108,7 @@
const TempScreenRouter = [
  {
    path: '/temp',
    component: Temp,
    component: () => import('@/screen/temp.vue'),
    redirect: '/temp/home',
    children: [
      {
src/views/facility/monitorList/index.vue
@@ -238,7 +238,7 @@
            </el-col>
        </el-row>
        <!--表格及分页-->
        <el-table v-loading="loading" :data="tableData">
        <el-table v-loading="loading" :data="tableData" class="table">
            <el-table-column
                v-for="(item, key, index) of tableHeader"
                :prop="key.toString()"
@@ -248,7 +248,7 @@
            >
                <template #default="scope">
                    <div v-if="key === 'imageUrl'">
                        <img :src="imgBaseUrl + scope.row.headImg" class="table-headImg" alt="" />
                        <img :src="imgBaseUrl + scope.row.imageUrl" class="table-headImg" alt="" />
                    </div>
                    <div v-else-if="key === 'pointType'">
                        {{ scope.row.pointType === 1 ? '水温监测点' : '生态流量监测点' }}
@@ -327,4 +327,10 @@
        flex-grow: 1;
    }
}
.table{
    .table-headImg{
        height: 50px;
        margin: 0 auto;
    }
}
</style>
src/views/screen/flow/home/index.vue
@@ -6,7 +6,7 @@
                <div class="point-address" @click="handleShow(index)"></div>
                <div class="point-message" v-show="item.showMsg">
                    <div class="msg-box">
                        <div class="video-box" :style="{backgroundImage: `url(${item.imageRul})`}" @click="jumpMonitor(item.id)">
                        <div class="video-box" :style="{backgroundImage: `url(${imgBaseUrl + item.imageRul})`}" @click="jumpMonitor(item.id)">
                            <el-icon><VideoPlay /></el-icon>
                        </div>
                        <div class="info-box">
@@ -46,6 +46,7 @@
import {getHomePonit} from '@/api/screen/home/index.js'
import {useRouter} from "vue-router";
const router = useRouter();
const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL;
// 标点配置
const config = [
@@ -143,6 +144,8 @@
                    line-height: 138px;
                    text-align: center;
                    font-size: 38px;
                    background-repeat: no-repeat;
                    background-size: cover;
                }
                .info-box{
                    height: 100%;