Browse Source

替换logo

yangdr 5 months ago
parent
commit
a70e179bd1
4 changed files with 105 additions and 104 deletions
  1. BIN
      src/images/logo.png
  2. BIN
      src/images/logo_.png
  3. 45 44
      webpack.config.js
  4. 60 60
      webpack.configCopy.jsx

BIN
src/images/logo.png


BIN
src/images/logo_.png


+ 45 - 44
webpack.config.js

@@ -9,11 +9,12 @@ const webpack = require('webpack');
 const glob = require('glob');
 const proxyHost = "http://192.168.2.236:5858";
 // const proxyHost = "http://192.168.2.241:5858";
+// const proxyHost = "http://173.18.12.194:1488";
 // const proxyHost = "http://192.168.4.222:5858";
 // const proxyHost = "http://192.168.3.117:5858";//铁钢
 // const proxyHost = "http://192.168.3.113:5858";//王峰
 
-let entries = {vendor:'lodash'},plugines = [];
+let entries = { vendor: 'lodash' }, plugines = [];
 function getentries() {
   let entryFiles = glob.sync('./src/js/**/*.js')
   let htmls = glob.sync('./src/html/**/*.html');
@@ -110,52 +111,52 @@ module.exports = {
   module: {
     noParse: /WdatePicker/,
     rules: [{
-        test: /.js$/,
-        enforce: 'post',
-        loader: 'es3ify-loader'
-      },
-      {
-        test: /\.m?js$/,
-        exclude: /(node_modules|bower_components)/,
-        use: {
-          loader: 'babel-loader',
-          options: {
-            presets: ['@babel/preset-env']
-          }
+      test: /.js$/,
+      enforce: 'post',
+      loader: 'es3ify-loader'
+    },
+    {
+      test: /\.m?js$/,
+      exclude: /(node_modules|bower_components)/,
+      use: {
+        loader: 'babel-loader',
+        options: {
+          presets: ['@babel/preset-env']
         }
+      }
+    },
+    {
+      test: /\.css$/,
+      use: [{
+        loader: MiniCssExtractPlugin.loader
       },
-      {
-        test: /\.css$/,
-        use: [{
-            loader: MiniCssExtractPlugin.loader
-          },
-          'css-loader'
-        ]
-      },
-      {
-        test: /\.less$/,
-        use: [{
-            loader: MiniCssExtractPlugin.loader
-          },
-          'css-loader', 'less-loader'
-        ]
+        'css-loader'
+      ]
+    },
+    {
+      test: /\.less$/,
+      use: [{
+        loader: MiniCssExtractPlugin.loader
       },
-      {
-        test: /\.(png|gif|jpg|jpeg|svg|eot|ttf|woff|woff2)$/,
-        use: [{
-          loader: 'url-loader',
-          options: {
-            limit: 10240,
-            esModule: false,
-            name: '[name]_[hash:6].[ext]',
-            outputPath: 'images/'
-          }
-        }],
-        exclude: /node_modules/
-      }, {
-        test: /.html$/,
-        use: 'html-withimg-loader'
-      }
+        'css-loader', 'less-loader'
+      ]
+    },
+    {
+      test: /\.(png|gif|jpg|jpeg|svg|eot|ttf|woff|woff2)$/,
+      use: [{
+        loader: 'url-loader',
+        options: {
+          limit: 10240,
+          esModule: false,
+          name: '[name]_[hash:6].[ext]',
+          outputPath: 'images/'
+        }
+      }],
+      exclude: /node_modules/
+    }, {
+      test: /.html$/,
+      use: 'html-withimg-loader'
+    }
     ]
   },
   // devtool: 'cheap-module-eval-source-map', //开发环境cheap-module-eval-source-map   //生产环境cheap-module-source-map

+ 60 - 60
webpack.configCopy.jsx

@@ -14,16 +14,16 @@ const proxyHost = "http://192.168.2.236:5858";
 module.exports = {
   entry: {
     index: path.resolve(__dirname, 'src/js', 'index.js'),
-    qcScore:path.resolve(__dirname, 'src/js', 'qcScore.js'),
-    login:path.resolve(__dirname, 'src/js', 'login.js'),
-    console:path.resolve(__dirname, 'src/js', 'console.js'),
-    deptConsole:path.resolve(__dirname, 'src/js', 'deptConsole.js'),
+    qcScore: path.resolve(__dirname, 'src/js', 'qcScore.js'),
+    login: path.resolve(__dirname, 'src/js', 'login.js'),
+    console: path.resolve(__dirname, 'src/js', 'console.js'),
+    deptConsole: path.resolve(__dirname, 'src/js', 'deptConsole.js'),
     moduleManager: path.resolve(__dirname, 'src/js', 'moduleManager.js'),
     itemManager: path.resolve(__dirname, 'src/js', 'itemManager.js'),
     qcList: path.resolve(__dirname, 'src/js', 'qcList.js'),
-    qcListDocteam:path.resolve(__dirname, 'src/js', 'qcListDocteam.js'),
-    qcListDept:path.resolve(__dirname, 'src/js', 'qcListDept.js'),
-    qcListPerson:path.resolve(__dirname, 'src/js', 'qcListPerson.js'),
+    qcListDocteam: path.resolve(__dirname, 'src/js', 'qcListDocteam.js'),
+    qcListDept: path.resolve(__dirname, 'src/js', 'qcListDept.js'),
+    qcListPerson: path.resolve(__dirname, 'src/js', 'qcListPerson.js'),
     userManager: path.resolve(__dirname, 'src/js', 'userManager.js'),
     roleManager: path.resolve(__dirname, 'src/js', 'roleManager.js'),
     tiaomu: path.resolve(__dirname, 'src/js', 'tiaomu.js'),
@@ -45,25 +45,25 @@ module.exports = {
     tiaomuControl: path.resolve(__dirname, 'src/js', 'tiaomuControl.js'),
     assertType: path.resolve(__dirname, 'src/js', 'assertType.js'),
     assertTypeDetail: path.resolve(__dirname, 'src/js', 'assertTypeDetail.js'),
-    singleVeto:path.resolve(__dirname, 'src/js', 'singleVeto.js'),
-    itemDefectDetail:path.resolve(__dirname, 'src/js', 'itemDefectDetail.js'),
-    keyItemFlawControl:path.resolve(__dirname, 'src/js', 'keyItemFlawControl.js'),
-    qcListCopy:path.resolve(__dirname, 'src/js', 'qcListCopy.js'),
+    singleVeto: path.resolve(__dirname, 'src/js', 'singleVeto.js'),
+    itemDefectDetail: path.resolve(__dirname, 'src/js', 'itemDefectDetail.js'),
+    keyItemFlawControl: path.resolve(__dirname, 'src/js', 'keyItemFlawControl.js'),
+    qcListCopy: path.resolve(__dirname, 'src/js', 'qcListCopy.js'),
     qcListCopyUnqualified: path.resolve(__dirname, 'src/js', 'qcListCopyUnqualified.js'),
-    qcListOutHospital:path.resolve(__dirname, 'src/js', 'qcListOutHospital.js'),
-    checkControl:path.resolve(__dirname, 'src/js', 'checkControl.js'),
-    advice:path.resolve(__dirname, 'src/js', 'advice.js'),
-    uncorrectedCasesStatistics:path.resolve(__dirname, 'src/js', 'uncorrectedCasesStatistics.js'),
-    uncorrectedCopy:path.resolve(__dirname, 'src/js', 'uncorrectedCopy.js'),
-    uccDetail:path.resolve(__dirname, 'src/js', 'uccDetail.js'),
-    readmission:path.resolve(__dirname, 'src/js', 'readmission.js'),
-    pacs:path.resolve(__dirname, 'src/js', 'pacs.js'),
-    pacsDetail:path.resolve(__dirname, 'src/js', 'pacsDetail.js'),
-    assist:path.resolve(__dirname, 'src/js', 'assist.js'),
-    error:path.resolve(__dirname, 'src/js', 'error.js'),
-    nursing:path.resolve(__dirname, 'src/js', 'nursing.js'),
-    test:path.resolve(__dirname, 'src/js/dept', 'test.js'),
-    partDetailControlDept:path.resolve(__dirname, 'src/js/dept', 'partDetailControlDept.js'),
+    qcListOutHospital: path.resolve(__dirname, 'src/js', 'qcListOutHospital.js'),
+    checkControl: path.resolve(__dirname, 'src/js', 'checkControl.js'),
+    advice: path.resolve(__dirname, 'src/js', 'advice.js'),
+    uncorrectedCasesStatistics: path.resolve(__dirname, 'src/js', 'uncorrectedCasesStatistics.js'),
+    uncorrectedCopy: path.resolve(__dirname, 'src/js', 'uncorrectedCopy.js'),
+    uccDetail: path.resolve(__dirname, 'src/js', 'uccDetail.js'),
+    readmission: path.resolve(__dirname, 'src/js', 'readmission.js'),
+    pacs: path.resolve(__dirname, 'src/js', 'pacs.js'),
+    pacsDetail: path.resolve(__dirname, 'src/js', 'pacsDetail.js'),
+    assist: path.resolve(__dirname, 'src/js', 'assist.js'),
+    error: path.resolve(__dirname, 'src/js', 'error.js'),
+    nursing: path.resolve(__dirname, 'src/js', 'nursing.js'),
+    test: path.resolve(__dirname, 'src/js/dept', 'test.js'),
+    partDetailControlDept: path.resolve(__dirname, 'src/js/dept', 'partDetailControlDept.js'),
     vendor: 'lodash',  //多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -80,7 +80,7 @@ module.exports = {
       title: 'test',
       template: path.resolve(__dirname, 'src/html/dept', 'test.html'),
       filename: 'test.html',
-      chunks: ['test', 'vendor', 'common','src/resouce/dot.js'],
+      chunks: ['test', 'vendor', 'common', 'src/resouce/dot.js'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -93,7 +93,7 @@ module.exports = {
       title: 'index',
       template: path.resolve(__dirname, 'src/html', 'index.html'),
       filename: 'index.html',
-      chunks: ['index', 'vendor', 'common','scrollBar','src/resouce/dot.js'],
+      chunks: ['index', 'vendor', 'common', 'scrollBar', 'src/resouce/dot.js'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -119,7 +119,7 @@ module.exports = {
       title: 'nursing',
       template: path.resolve(__dirname, 'src/html', 'nursing.html'),
       filename: 'nursing.html',
-      chunks: ['nursing', 'vendor', 'common','scrollBar'],
+      chunks: ['nursing', 'vendor', 'common', 'scrollBar'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -145,7 +145,7 @@ module.exports = {
       title: 'console.html',
       template: path.resolve(__dirname, 'src/html', 'console.html'),
       filename: 'console.html',
-      chunks: ['console', 'vendor', 'common','scrollBar'],
+      chunks: ['console', 'vendor', 'common', 'scrollBar'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -158,7 +158,7 @@ module.exports = {
       title: 'uncorrectedCopy.html',
       template: path.resolve(__dirname, 'src/html', 'uncorrectedCopy.html'),
       filename: 'uncorrectedCopy.html',
-      chunks: ['uncorrectedCopy', 'vendor', 'common','scrollBar'],
+      chunks: ['uncorrectedCopy', 'vendor', 'common', 'scrollBar'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -171,7 +171,7 @@ module.exports = {
       title: 'pacs.html',
       template: path.resolve(__dirname, 'src/html', 'pacs.html'),
       filename: 'pacs.html',
-      chunks: ['pacs', 'vendor', 'common','scrollBar'],
+      chunks: ['pacs', 'vendor', 'common', 'scrollBar'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -184,7 +184,7 @@ module.exports = {
       title: 'pacsDetail.html',
       template: path.resolve(__dirname, 'src/html', 'pacsDetail.html'),
       filename: 'pacsDetail.html',
-      chunks: ['pacsDetail', 'vendor', 'common','scrollBar'],
+      chunks: ['pacsDetail', 'vendor', 'common', 'scrollBar'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -197,7 +197,7 @@ module.exports = {
       title: 'assist.html',
       template: path.resolve(__dirname, 'src/html', 'assist.html'),
       filename: 'assist.html',
-      chunks: ['assist', 'vendor', 'common','scrollBar'],
+      chunks: ['assist', 'vendor', 'common', 'scrollBar'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -626,7 +626,7 @@ module.exports = {
       title: 'qcScore.html',
       template: path.resolve(__dirname, 'src/html', 'qcScore.html'),
       filename: 'qcScore.html',
-      chunks: [ 'qcScore','vendor', 'common'],
+      chunks: ['qcScore', 'vendor', 'common'],
       hash: true, //防止缓存
       inject: true,
       minify: {
@@ -754,9 +754,9 @@ module.exports = {
     }),
     new CopyWebpackPlugin([
       {
-        from:'src/resource',
-        to:path.resolve(__dirname,'dist','resource'),
-        flatten:true,   //false会拷贝原始文件夹路径
+        from: 'src/resource',
+        to: path.resolve(__dirname, 'dist', 'resource'),
+        flatten: true,   //false会拷贝原始文件夹路径
       }
     ]),
     new MiniCssExtractPlugin({
@@ -780,7 +780,7 @@ module.exports = {
             except: ['e']
           },
           output: {
-              beautify: true
+            beautify: true
           },
           sourceMap: false
         }
@@ -799,14 +799,14 @@ module.exports = {
       }
     }
   },
-      
+
   module: {
     noParse: /WdatePicker/,
     rules: [
       {
-          test: /.js$/,
-          enforce: 'post', 
-          loader: 'es3ify-loader'
+        test: /.js$/,
+        enforce: 'post',
+        loader: 'es3ify-loader'
       },
       {
         test: /\.m?js$/,
@@ -814,41 +814,41 @@ module.exports = {
         use: {
           loader: 'babel-loader',
           options: {
-            presets:['@babel/preset-env']
+            presets: ['@babel/preset-env']
           }
         }
       },
       {
         test: /\.css$/,
         use: [{
-            loader: MiniCssExtractPlugin.loader
-          },
+          loader: MiniCssExtractPlugin.loader
+        },
           'css-loader'
         ]
       },
       {
         test: /\.less$/,
         use: [{
-            loader: MiniCssExtractPlugin.loader
-          },
+          loader: MiniCssExtractPlugin.loader
+        },
           'css-loader', 'less-loader'
         ]
       },
       {
-        test:/\.(png|gif|jpg|jpeg|svg|eot|ttf|woff|woff2)$/,
-        use:[{
-          loader:'url-loader',
-          options:{
-            limit:10240,
-            esModule:false,
-            name:'[name]_[hash:6].[ext]',
-            outputPath:'images/'
+        test: /\.(png|gif|jpg|jpeg|svg|eot|ttf|woff|woff2)$/,
+        use: [{
+          loader: 'url-loader',
+          options: {
+            limit: 10240,
+            esModule: false,
+            name: '[name]_[hash:6].[ext]',
+            outputPath: 'images/'
           }
         }],
-        exclude:/node_modules/
-      },{
-        test:/.html$/,
-        use:'html-withimg-loader'
+        exclude: /node_modules/
+      }, {
+        test: /.html$/,
+        use: 'html-withimg-loader'
       }
     ]
   },
@@ -860,6 +860,6 @@ module.exports = {
       '/': proxyHost
     },
     hot: true,
-    openPage:'login.html'
+    openPage: 'login.html'
   }
 }