瀏覽代碼

config修复

ming 3 年之前
父節點
當前提交
19c3ac7dfe

+ 2 - 0
src/layout/index.vue

@@ -130,6 +130,7 @@ export default {
 <style lang="less">
 .vab-layout-wrap {
   height: 100%;
+
   .vab-sider {
     background-color: #fff;
     position: fixed;
@@ -149,6 +150,7 @@ export default {
   }
   .vab-layout {
     height: 100%;
+    overflow: auto;
     padding-left: 220px;
     transition: all 0.2s;
     background-color: #f0f3f4;

+ 6 - 2
src/layout/vab-tabs/index.vue

@@ -232,9 +232,13 @@ export default {
       }
     }
   }
+  // .el-breadcrumb {
+  //   height: @vab-breadcrumb-height;
+  //   line-height: @vab-breadcrumb-height;
+  // }
   .el-breadcrumb {
-    height: @vab-breadcrumb-height;
-    line-height: @vab-breadcrumb-height;
+    height:36px;
+    line-height:36px;
   }
 }
 </style>

+ 2 - 2
src/views/powerQuality/asseReport/scoreReport.vue

@@ -36,7 +36,7 @@
     <!-- 筛选end -->
 
     <el-row :gutter="20" >
-      <el-col :md="24" :lg="7">
+      <el-col :md="24" :lg="7" >
         <div class="grid-content bg-purple">
           <div class="blanceChartTit">
             <span>评分</span>
@@ -58,7 +58,7 @@
           </div>
         </div>
       </el-col>
-      <el-col :md="24" :lg="14">
+      <el-col :md="24" :lg="17">
         <!-- 表格start -->
         <el-table
           :data="tableData"

+ 1 - 1
src/views/powerQuality/asseReport/scoreReportComponent/pieChart.vue

@@ -111,7 +111,7 @@ export default defineComponent({
             name: '标题',
             type: 'pie',
             center: ['50%', '50%'],
-            radius: ['40%', '60%'],
+            radius: ['37%', '55%'],
 
             clockwise: false, //饼图的扇区是否是顺时针排布
             avoidLabelOverlap: false,

+ 1 - 1
src/views/powerQuality/asseReport/scoreReportComponent/radarChart.vue

@@ -42,7 +42,7 @@ export default defineComponent({
           containLabel: true,
         },
         radar: {
-          radius: '70%',
+          radius: '60%',
           center: ['50%', '55%'],
           splitNumber: 5,
           nameGap: '15',

+ 6 - 2
src/views/siteManage/index.vue

@@ -73,10 +73,11 @@
           <watch-dog
             v-on:success="success(res)"
             :avtiveName="activeName"
+            @func="getMsgFormSon"
           ></watch-dog>
         </el-tab-pane>
         <el-tab-pane label="变量列表" name="third">
-          <variable-list></variable-list>
+          <variable-list :activeName="activeName"></variable-list>
         </el-tab-pane>
         <el-tab-pane label="摄像头" name="five">
           <camera></camera>
@@ -143,7 +144,7 @@ export default {
       deleteShow: false,
       showDialog: false,
       treeLevel: 0,
-      activeName: 'second',
+      activeName: 'first',
       filterText: '',
       data: [
         {
@@ -234,6 +235,9 @@ export default {
   },
 
   methods: {
+    getMsgFormSon() {
+      this.activeName = 'third';
+    },
     mouseenter(data) {
       // console.log("移入");
       // console.log(data);

+ 3 - 7
src/views/siteManage/watchDog/index.vue

@@ -101,12 +101,7 @@ import Clone from "./clone";
 
 export default {
   name: "WatchDog",
-  props: {
-    activeName: {
-      type: String,
-    },
-  },
-
+  props: ['activeName'],
   components: { DialogComponent, Clone },
 
   data() {
@@ -193,8 +188,9 @@ export default {
   methods: {
     // 表头样式设置
     goVariableList() {
-      // this.$emit('success','third');
+       this.$emit('func')
     },
+   
     headClass() {
       return "background:#FAFAFA;";
     },

+ 148 - 152
vue.config.js

@@ -4,18 +4,18 @@
  */
 const path = require('path')
 const {
-  /* baseURL, */
-  publicPath,
-  assetsDir,
-  outputDir,
-  lintOnSave,
-  transpileDependencies,
-  title,
-  abbreviation,
-  devPort,
-  providePlugin,
-  build7z,
-  donation,
+    /* baseURL, */
+    publicPath,
+    assetsDir,
+    outputDir,
+    lintOnSave,
+    transpileDependencies,
+    title,
+    abbreviation,
+    devPort,
+    providePlugin,
+    build7z,
+    donation,
 } = require('./src/config')
 const { webpackBarName, webpackBanner, donationConsole } = require('vab-config')
 
@@ -33,161 +33,157 @@ process.env.VUE_APP_UPDATE_TIME = time
 process.env.VUE_APP_VERSION = version
 
 const resolve = (dir) => {
-  return path.join(__dirname, dir)
+    return path.join(__dirname, dir)
 }
 
 const mockServer = () => {
-  if (process.env.NODE_ENV === 'development') {
-    return require('./mock/mockServer.js')
-  } else {
-    return ''
-  }
+    if (process.env.NODE_ENV === 'development') {
+        return require('./mock/mockServer.js')
+    } else {
+        return ''
+    }
 }
 
 module.exports = {
-  publicPath,
-  assetsDir,
-  outputDir,
-  lintOnSave,
-  transpileDependencies,
-  css: {
-    loaderOptions: {
-      sass: {
-        data: `
+    publicPath,
+    assetsDir,
+    outputDir,
+    lintOnSave,
+    transpileDependencies,
+    css: {
+        loaderOptions: {
+            sass: {
+                data: `
         @import "@/assets/css/index.scss";
         @import "@/assets/css/global.scss";
         `
-      }
-    }
-  },
-  devServer: {
-    hot: true,
-    port: devPort,
-    open: true,
-    noInfo: false,
-    overlay: {
-      warnings: true,
-      errors: true,
+            }
+        }
     },
-    // 注释掉的地方是前端配置代理访问后端的示例
-    // proxy: {
-    //   [baseURL]: {
-    //     target: `http://你的后端接口地址`,
-    //     ws: true,
-    //     changeOrigin: true,
-    //     pathRewrite: {
-    //       ["^/" + baseURL]: "",
-    //     },
-    //   },
-    // },
-    after: mockServer(),
-  },
-  configureWebpack() {
-    return {
-      resolve: {
-        alias: {
-          '@': resolve('src'),
-          '*': resolve(''),
+    devServer: {
+        hot: true,
+        port: devPort,
+        open: true,
+        noInfo: false,
+        overlay: {
+            warnings: true,
+            errors: true,
         },
-      },
-      plugins: [
-        new Webpack.ProvidePlugin(providePlugin),
-        new WebpackBar({
-          name: webpackBarName,
-        }),
-      ],
-    }
-  },
-  chainWebpack(config) {
-    config.resolve.symlinks(true)
-    config.module
-      .rule('svg')
-      .exclude.add(resolve('src/icons'))
-      .end()
-    config.module
-      .rule('icons')
-      .test(/\.svg$/)
-      .include.add(resolve('src/icons'))
-      .end()
-      .use('svg-sprite-loader')
-      .loader('svg-sprite-loader')
-      .options({
-        symbolId: 'icon-[name]'
-      })
-      .end()
+        // 注释掉的地方是前端配置代理访问后端的示例
+        // proxy: {
+        //   [baseURL]: {
+        //     target: `http://你的后端接口地址`,
+        //     ws: true,
+        //     changeOrigin: true,
+        //     pathRewrite: {
+        //       ["^/" + baseURL]: "",
+        //     },
+        //   },
+        // },
+        after: mockServer(),
+    },
+    configureWebpack() {
+        return {
+            resolve: {
+                alias: {
+                    '@': resolve('src'),
+                    '*': resolve(''),
+                },
+            },
+            plugins: [
+                new Webpack.ProvidePlugin(providePlugin),
+                new WebpackBar({
+                    name: webpackBarName,
+                }),
+            ],
+        }
+    },
+    chainWebpack(config) {
+        config.resolve.symlinks(true)
+        config.module
+            .rule('svg')
+            .exclude.add(resolve('src/icons'))
+            .end()
+        config.module
+            .rule('icons')
+            .test(/\.svg$/)
+            .include.add(resolve('src/icons'))
+            .end()
+            .use('svg-sprite-loader')
+            .loader('svg-sprite-loader')
+            .options({
+                symbolId: 'icon-[name]'
+            })
+            .end()
 
-    config.when(process.env.NODE_ENV === 'development', (config) => {
-      config.devtool('source-map')
-    })
+        config.when(process.env.NODE_ENV === 'development', (config) => {
+            config.devtool('source-map')
+        })
 
-    config.when(process.env.NODE_ENV !== 'development', (config) => {
-      config.performance.set('hints', false)
-      config.devtool('none')
-      config.optimization.splitChunks({
-        chunks: 'all',
-        cacheGroups: {
-          libs: {
-            name: 'vue-admin-beautiful-libs',
-            test: /[\\/]node_modules[\\/]/,
-            priority: 10,
-            chunks: 'initial',
-          },
-        },
-      })
-      config
-        .plugin('banner')
-        .use(Webpack.BannerPlugin, [`${webpackBanner}${time}`])
-        .end()
-      config.module
-        .rule('images')
-        .use('image-webpack-loader')
-        .loader('image-webpack-loader')
-        .options({
-          bypassOnDebug: true,
+        config.when(process.env.NODE_ENV !== 'development', (config) => {
+            config.performance.set('hints', false)
+            config.devtool('none')
+            config.optimization.splitChunks({
+                chunks: 'all',
+                cacheGroups: {
+                    libs: {
+                        name: 'vue-admin-beautiful-libs',
+                        test: /[\\/]node_modules[\\/]/,
+                        priority: 10,
+                        chunks: 'initial',
+                    },
+                },
+            })
+            config
+                .plugin('banner')
+                .use(Webpack.BannerPlugin, [`${webpackBanner}${time}`])
+                .end()
+            config.module
+                .rule('images')
+                .use('image-webpack-loader')
+                .loader('image-webpack-loader')
+                .options({
+                    bypassOnDebug: true,
+                })
+                .end()
         })
-        .end()
-    })
 
-    if (build7z) {
-      config.when(process.env.NODE_ENV === 'production', (config) => {
-        config
-          .plugin('fileManager')
-          .use(FileManagerPlugin, [
-            {
-              onEnd: {
-                delete: [`./${outputDir}/video`, `./${outputDir}/data`],
-                archive: [
-                  {
-                    source: `./${outputDir}`,
-                    destination: `./${outputDir}/${abbreviation}_${outputDir}_${date}.7z`,
-                  },
-                ],
-              },
+        if (build7z) {
+            config.when(process.env.NODE_ENV === 'production', (config) => {
+                config
+                    .plugin('fileManager')
+                    .use(FileManagerPlugin, [{
+                        onEnd: {
+                            delete: [`./${outputDir}/video`, `./${outputDir}/data`],
+                            archive: [{
+                                source: `./${outputDir}`,
+                                destination: `./${outputDir}/${abbreviation}_${outputDir}_${date}.7z`,
+                            }, ],
+                        },
+                    }, ])
+                    .end()
+            })
+        }
+    },
+    runtimeCompiler: true,
+    productionSourceMap: false,
+    css: {
+        requireModuleExtension: true,
+        sourceMap: true,
+        loaderOptions: {
+            less: {
+                lessOptions: {
+                    javascriptEnabled: true,
+                    modifyVars: {
+                        'vab-color-blue': '#1890ff',
+                        'vab-margin': '20px',
+                        'vab-padding': '20px',
+                        'vab-header-height': '54px',
+                        'vab-breadcrumb-height': '37px',
+                        'vab-public-height': 'calc(100vh - 130px)',
+                    },
+                },
             },
-          ])
-          .end()
-      })
-    }
-  },
-  runtimeCompiler: true,
-  productionSourceMap: false,
-  css: {
-    requireModuleExtension: true,
-    sourceMap: true,
-    loaderOptions: {
-      less: {
-        lessOptions: {
-          javascriptEnabled: true,
-          modifyVars: {
-            'vab-color-blue': '#1890ff',
-            'vab-margin': '20px',
-            'vab-padding': '20px',
-            'vab-header-height': '54px',
-            'vab-breadcrumb-height': '37px',
-            'vab-public-height': 'calc(100vh - 130px)',
-          },
         },
-      },
     },
-  },
-}
+}