From dc082351978a1e9f75d7a1471a0ca7ebeac552a5 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期一, 01 六月 2026 11:07:50 +0800
Subject: [PATCH] opo维护

---
 vue.config.js |  140 ++++++++++++++++++++++++----------------------
 1 files changed, 73 insertions(+), 67 deletions(-)

diff --git a/vue.config.js b/vue.config.js
index 5d628d7..cb37af7 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,13 +1,13 @@
-'use strict'
-const path = require('path')
+"use strict";
+const path = require("path");
 
 function resolve(dir) {
-  return path.join(__dirname, dir)
+  return path.join(__dirname, dir);
 }
 
-const name = process.env.VUE_APP_TITLE || '鑻ヤ緷绠$悊绯荤粺' // 缃戦〉鏍囬
+const name = process.env.VUE_APP_TITLE || "闈掗檮闄PO绠$悊骞冲彴"; // 缃戦〉鏍囬
 
-const port = process.env.port || process.env.npm_config_port || 80 // 绔彛
+const port = process.env.port || process.env.npm_config_port || 80; // 绔彛
 
 // vue.config.js 閰嶇疆璇存槑
 //瀹樻柟vue.config.js 鍙傝�冩枃妗� https://cli.vuejs.org/zh/config/#css-loaderoptions
@@ -18,28 +18,37 @@
   // 渚嬪 https://www.ruoyi.vip/銆傚鏋滃簲鐢ㄨ閮ㄧ讲鍦ㄤ竴涓瓙璺緞涓婏紝浣犲氨闇�瑕佺敤杩欎釜閫夐」鎸囧畾杩欎釜瀛愯矾寰勩�備緥濡傦紝濡傛灉浣犵殑搴旂敤琚儴缃插湪 https://www.ruoyi.vip/admin/锛屽垯璁剧疆 baseUrl 涓� /admin/銆�
   publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
   // 鍦╪pm run build 鎴� yarn build 鏃� 锛岀敓鎴愭枃浠剁殑鐩綍鍚嶇О锛堣鍜宐aseUrl鐨勭敓浜х幆澧冭矾寰勪竴鑷达級锛堥粯璁ist锛�
-  outputDir: 'dist',
+  outputDir: "dist",
   // 鐢ㄤ簬鏀剧疆鐢熸垚鐨勯潤鎬佽祫婧� (js銆乧ss銆乮mg銆乫onts) 鐨勶紱锛堥」鐩墦鍖呬箣鍚庯紝闈欐�佽祫婧愪細鏀惧湪杩欎釜鏂囦欢澶逛笅锛�
-  assetsDir: 'static',
+  assetsDir: "static",
   // 鏄惁寮�鍚痚slint淇濆瓨妫�娴嬶紝鏈夋晥鍊硷細ture | false | 'error'
-  lintOnSave: process.env.NODE_ENV === 'development',
+  lintOnSave: process.env.NODE_ENV === "development",
   // 濡傛灉浣犱笉闇�瑕佺敓浜х幆澧冪殑 source map锛屽彲浠ュ皢鍏惰缃负 false 浠ュ姞閫熺敓浜х幆澧冩瀯寤恒��
   productionSourceMap: false,
   // webpack-dev-server 鐩稿叧閰嶇疆
   devServer: {
-    host: '0.0.0.0',
+    host: "0.0.0.0",
     port: port,
     open: true,
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
-      [process.env.VUE_APP_BASE_API]: {        
-        // target:`http://localhost:8080`,
-        // target:`http://116.62.18.175:8080`,
-        target:`http://192.168.2.8:8086`,
+      [process.env.VUE_APP_BASE_API]: {
+        target: `http://www.qdopo.com:9095`,
+        // target:`http://192.168.76.25:9095`,//鎵撳寘鍦板潃
+        // target:`http://192.168.100.10:8080`,
+        // target:`http://192.168.100.137:8080`,
         // target: `https://slb.hospitalstar.com:9093`,
         changeOrigin: true,
         pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API]: ''
+          ["^" + process.env.VUE_APP_BASE_API]: ""
+        }
+      },
+      //褰損df鍜屾暟鎹帴鍙d笉鍦ㄥ悓涓�涓姹傚湴鍧�涓嬫椂,涓簆df棰勮杩藉姞涓�涓唬鐞�
+      "/pdf": {
+        target: "http://192.168.1.4/pdf/data",
+        changOrigin: true,
+        pathRewrite: {
+          "^/pdf": ""
         }
       }
     },
@@ -49,73 +58,70 @@
     name: name,
     resolve: {
       alias: {
-        '@': resolve('src')
-
+        "@": resolve("src")
       }
     }
   },
   chainWebpack(config) {
-    config.plugins.delete('preload') // TODO: need test
-    config.plugins.delete('prefetch') // TODO: need test
+    config.plugins.delete("preload"); // TODO: need test
+    config.plugins.delete("prefetch"); // TODO: need test
 
     // set svg-sprite-loader
     config.module
-      .rule('svg')
-      .exclude.add(resolve('src/assets/icons'))
-      .end()
+      .rule("svg")
+      .exclude.add(resolve("src/assets/icons"))
+      .end();
     config.module
-      .rule('icons')
+      .rule("icons")
       .test(/\.svg$/)
-      .include.add(resolve('src/assets/icons'))
+      .include.add(resolve("src/assets/icons"))
       .end()
-      .use('svg-sprite-loader')
-      .loader('svg-sprite-loader')
+      .use("svg-sprite-loader")
+      .loader("svg-sprite-loader")
       .options({
-        symbolId: 'icon-[name]'
+        symbolId: "icon-[name]"
       })
-      .end()
+      .end();
 
-    config
-      .when(process.env.NODE_ENV !== 'development',
-        config => {
-          config
-            .plugin('ScriptExtHtmlWebpackPlugin')
-            .after('html')
-            .use('script-ext-html-webpack-plugin', [{
-              // `runtime` must same as runtimeChunk name. default is `runtime`
-              inline: /runtime\..*\.js$/
-            }])
-            .end()
-          config
-            .optimization.splitChunks({
-              chunks: 'all',
-              cacheGroups: {
-                libs: {
-                  name: 'chunk-libs',
-                  test: /[\\/]node_modules[\\/]/,
-                  priority: 10,
-                  chunks: 'initial' // only package third parties that are initially dependent
-                },
-                elementUI: {
-                  name: 'chunk-elementUI', // split elementUI into a single package
-                  priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
-                  test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
-                },
-                commons: {
-                  name: 'chunk-commons',
-                  test: resolve('src/components'), // can customize your rules
-                  minChunks: 3, //  minimum common number
-                  priority: 5,
-                  reuseExistingChunk: true
-                }
-              }
-            })
-          config.optimization.runtimeChunk('single'),
+    config.when(process.env.NODE_ENV !== "development", config => {
+      config
+        .plugin("ScriptExtHtmlWebpackPlugin")
+        .after("html")
+        .use("script-ext-html-webpack-plugin", [
           {
-            from: path.resolve(__dirname, './public/robots.txt'), //闃茬埇铏枃浠�
-            to: './' //鍒版牴鐩綍涓�
+            // `runtime` must same as runtimeChunk name. default is `runtime`
+            inline: /runtime\..*\.js$/
+          }
+        ])
+        .end();
+      config.optimization.splitChunks({
+        chunks: "all",
+        cacheGroups: {
+          libs: {
+            name: "chunk-libs",
+            test: /[\\/]node_modules[\\/]/,
+            priority: 10,
+            chunks: "initial" // only package third parties that are initially dependent
+          },
+          elementUI: {
+            name: "chunk-elementUI", // split elementUI into a single package
+            priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
+            test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
+          },
+          commons: {
+            name: "chunk-commons",
+            test: resolve("src/components"), // can customize your rules
+            minChunks: 3, //  minimum common number
+            priority: 5,
+            reuseExistingChunk: true
           }
         }
-      )
+      });
+      config.optimization.runtimeChunk("single"),
+        {
+          from: path.resolve(__dirname, "./public/robots.txt"), //闃茬埇铏枃浠�
+          to: "./" //鍒版牴鐩綍涓�
+        };
+    });
   }
-}
+};

--
Gitblit v1.9.3