yys 1 dzień temu
rodzic
commit
0804cd1d80
6 zmienionych plików z 37 dodań i 432 usunięć
  1. 1 27
      .env.development
  2. 1 27
      .env.production
  3. 11 193
      .eslintrc.js
  4. 2 10
      babel.config.js
  5. 9 91
      package.json
  6. 13 84
      vue.config.js

+ 1 - 27
.env.development

@@ -1,27 +1 @@
-#该文本用于打包测试平台
-# 页面标题
-VUE_APP_TITLE =云联融智SAAS管理系统
-# 首页菜单标题
-VUE_APP_TITLE_INDEX =云联融智SAAS
-# 公司名称
-VUE_APP_COMPANY_NAME =云联融智科技有限公司
-# ICP备案号
-VUE_APP_ICP_RECORD =
-# ICP网站访问地址
-VUE_APP_ICP_URL =https://beian.miit.gov.cn
-# 网站LOG
-VUE_APP_LOG_URL =@/assets/logo/ylrz.png
-
-# 开发环境配置
-ENV = 'production'
-
-# FS管理系统/开发环境
-VUE_APP_BASE_API = '/prod-api'
-
-# 路由懒加载
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
-
-# 患者信息
-VUE_APP_PATIENT_INFO = '客户信息'
-# 添加病人
-VUE_APP_ADD_PATIENT = '添加信息'
+VUE_APP_BASE_API = '/api'

+ 1 - 27
.env.production

@@ -1,27 +1 @@
-#该文本用于打包测试平台
-# 页面标题
-VUE_APP_TITLE =云联融智SAAS管理系统
-# 首页菜单标题
-VUE_APP_TITLE_INDEX =云联融智SAAS
-# 公司名称
-VUE_APP_COMPANY_NAME =云联融智科技有限公司
-# ICP备案号
-VUE_APP_ICP_RECORD =
-# ICP网站访问地址
-VUE_APP_ICP_URL =https://beian.miit.gov.cn
-# 网站LOG
-VUE_APP_LOG_URL =@/assets/logo/ylrz.png
-
-# 开发环境配置
-ENV = 'production'
-
-# FS管理系统/开发环境
-VUE_APP_BASE_API = '/prod-api'
-
-# 路由懒加载
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
-
-# 患者信息
-VUE_APP_PATIENT_INFO = '客户信息'
-# 添加病人
-VUE_APP_ADD_PATIENT = '添加信息'
+VUE_APP_BASE_API = '/api'

+ 11 - 193
.eslintrc.js

@@ -1,199 +1,17 @@
-// ESlint 检查配置
 module.exports = {
   root: true,
-  parserOptions: {
-    parser: 'babel-eslint',
-    sourceType: 'module'
-  },
   env: {
-    browser: true,
-    node: true,
-    es6: true,
+    node: true
+  },
+  extends: [
+    'plugin:vue/essential',
+    'eslint:recommended'
+  ],
+  parserOptions: {
+    parser: 'babel-eslint'
   },
-  extends: ['plugin:vue/recommended', 'eslint:recommended'],
-
-  // add your custom rules here
-  //it is base on https://github.com/vuejs/eslint-config-vue
   rules: {
-    "vue/max-attributes-per-line": [2, {
-      "singleline": 10,
-      "multiline": {
-        "max": 1,
-        "allowFirstLine": false
-      }
-    }],
-    "vue/singleline-html-element-content-newline": "off",
-    "vue/multiline-html-element-content-newline":"off",
-    "vue/name-property-casing": ["error", "PascalCase"],
-    "vue/no-v-html": "off",
-    'accessor-pairs': 2,
-    'arrow-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
-    'block-spacing': [2, 'always'],
-    'brace-style': [2, '1tbs', {
-      'allowSingleLine': true
-    }],
-    'camelcase': [0, {
-      'properties': 'always'
-    }],
-    'comma-dangle': [2, 'never'],
-    'comma-spacing': [2, {
-      'before': false,
-      'after': true
-    }],
-    'comma-style': [2, 'last'],
-    'constructor-super': 2,
-    'curly': [2, 'multi-line'],
-    'dot-location': [2, 'property'],
-    'eol-last': 2,
-    'eqeqeq': ["error", "always", {"null": "ignore"}],
-    'generator-star-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
-    'handle-callback-err': [2, '^(err|error)$'],
-    'indent': [2, 2, {
-      'SwitchCase': 1
-    }],
-    'jsx-quotes': [2, 'prefer-single'],
-    'key-spacing': [2, {
-      'beforeColon': false,
-      'afterColon': true
-    }],
-    'keyword-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
-    'new-cap': [2, {
-      'newIsCap': true,
-      'capIsNew': false
-    }],
-    'new-parens': 2,
-    'no-array-constructor': 2,
-    'no-caller': 2,
-    'no-console': 'off',
-    'no-class-assign': 2,
-    'no-cond-assign': 2,
-    'no-const-assign': 2,
-    'no-control-regex': 0,
-    'no-delete-var': 2,
-    'no-dupe-args': 2,
-    'no-dupe-class-members': 2,
-    'no-dupe-keys': 2,
-    'no-duplicate-case': 2,
-    'no-empty-character-class': 2,
-    'no-empty-pattern': 2,
-    'no-eval': 2,
-    'no-ex-assign': 2,
-    'no-extend-native': 2,
-    'no-extra-bind': 2,
-    'no-extra-boolean-cast': 2,
-    'no-extra-parens': [2, 'functions'],
-    'no-fallthrough': 2,
-    'no-floating-decimal': 2,
-    'no-func-assign': 2,
-    'no-implied-eval': 2,
-    'no-inner-declarations': [2, 'functions'],
-    'no-invalid-regexp': 2,
-    'no-irregular-whitespace': 2,
-    'no-iterator': 2,
-    'no-label-var': 2,
-    'no-labels': [2, {
-      'allowLoop': false,
-      'allowSwitch': false
-    }],
-    'no-lone-blocks': 2,
-    'no-mixed-spaces-and-tabs': 2,
-    'no-multi-spaces': 2,
-    'no-multi-str': 2,
-    'no-multiple-empty-lines': [2, {
-      'max': 1
-    }],
-    'no-native-reassign': 2,
-    'no-negated-in-lhs': 2,
-    'no-new-object': 2,
-    'no-new-require': 2,
-    'no-new-symbol': 2,
-    'no-new-wrappers': 2,
-    'no-obj-calls': 2,
-    'no-octal': 2,
-    'no-octal-escape': 2,
-    'no-path-concat': 2,
-    'no-proto': 2,
-    'no-redeclare': 2,
-    'no-regex-spaces': 2,
-    'no-return-assign': [2, 'except-parens'],
-    'no-self-assign': 2,
-    'no-self-compare': 2,
-    'no-sequences': 2,
-    'no-shadow-restricted-names': 2,
-    'no-spaced-func': 2,
-    'no-sparse-arrays': 2,
-    'no-this-before-super': 2,
-    'no-throw-literal': 2,
-    'no-trailing-spaces': 2,
-    'no-undef': 2,
-    'no-undef-init': 2,
-    'no-unexpected-multiline': 2,
-    'no-unmodified-loop-condition': 2,
-    'no-unneeded-ternary': [2, {
-      'defaultAssignment': false
-    }],
-    'no-unreachable': 2,
-    'no-unsafe-finally': 2,
-    'no-unused-vars': [2, {
-      'vars': 'all',
-      'args': 'none'
-    }],
-    'no-useless-call': 2,
-    'no-useless-computed-key': 2,
-    'no-useless-constructor': 2,
-    'no-useless-escape': 0,
-    'no-whitespace-before-property': 2,
-    'no-with': 2,
-    'one-var': [2, {
-      'initialized': 'never'
-    }],
-    'operator-linebreak': [2, 'after', {
-      'overrides': {
-        '?': 'before',
-        ':': 'before'
-      }
-    }],
-    'padded-blocks': [2, 'never'],
-    'quotes': [2, 'single', {
-      'avoidEscape': true,
-      'allowTemplateLiterals': true
-    }],
-    'semi': [2, 'never'],
-    'semi-spacing': [2, {
-      'before': false,
-      'after': true
-    }],
-    'space-before-blocks': [2, 'always'],
-    'space-before-function-paren': [2, 'never'],
-    'space-in-parens': [2, 'never'],
-    'space-infix-ops': 2,
-    'space-unary-ops': [2, {
-      'words': true,
-      'nonwords': false
-    }],
-    'spaced-comment': [2, 'always', {
-      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
-    }],
-    'template-curly-spacing': [2, 'never'],
-    'use-isnan': 2,
-    'valid-typeof': 2,
-    'wrap-iife': [2, 'any'],
-    'yield-star-spacing': [2, 'both'],
-    'yoda': [2, 'never'],
-    'prefer-const': 2,
-    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
-    'object-curly-spacing': [2, 'always', {
-      objectsInObjects: false
-    }],
-    'array-bracket-spacing': [2, 'never']
+    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
   }
-}
+}

+ 2 - 10
babel.config.js

@@ -1,13 +1,5 @@
 module.exports = {
   presets: [
-    // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
     '@vue/cli-plugin-babel/preset'
-  ],
-  'env': {
-    'development': {
-      // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
-      // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
-      'plugins': ['dynamic-import-node']
-    }
-  }
-}
+  ]
+}

+ 9 - 91
package.json

@@ -1,61 +1,13 @@
 {
-  "name": "FS",
-  "version": "1.1.0",
-  "description": "FS管理系统",
-  "author": "YZX",
+  "name": "FS-Agent",
+  "version": "1.0.0",
+  "description": "代理端管理系统",
+  "author": "FS",
   "license": "MIT",
   "scripts": {
     "dev": "vue-cli-service serve",
-    "build:prod": "vue-cli-service build",
-    "build:prod-ylrz": "vue-cli-service build --mode prod-ylrz",
+    "build:prod": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
     "build:prod-test": "vue-cli-service build --mode prod-test",
-    "build:prod-hzyy": "vue-cli-service build --mode prod-hzyy",
-    "build:prod-jzzx": "vue-cli-service build --mode prod-jzzx",
-    "build:prod-hcl": "vue-cli-service build --mode prod-hcl",
-    "build:prod-myhk": "vue-cli-service build --mode prod-myhk",
-    "build:prod-nmgyt": "vue-cli-service build --mode prod-nmgyt",
-    "build:prod-cqtyt": "vue-cli-service build --mode prod-cqtyt",
-    "build:prod-heyantang": "vue-cli-service build --mode prod-heyantang",
-    "build:prod-bly": "vue-cli-service build --mode prod-bly",
-    "build:prod-fzbt": "vue-cli-service build --mode prod-fzbt",
-    "build:prod-sxjz": "vue-cli-service build --mode prod-sxjz",
-    "build:prod-xfk": "vue-cli-service build --mode prod-xfk",
-    "build:prod-jnmy": "vue-cli-service build --mode prod-jnmy",
-    "build:prod-knt": "vue-cli-service build --mode prod-knt",
-    "build:prod-knt2": "vue-cli-service build --mode prod-knt2",
-    "build:prod-hdt": "vue-cli-service build --mode prod-hdt",
-    "build:prod-yzt": "vue-cli-service build --mode prod-yzt",
-    "build:prod-sft": "vue-cli-service build --mode prod-sft",
-    "build:prod-zsjk": "vue-cli-service build --mode prod-zsjk",
-    "build:prod-lmjy": "vue-cli-service build --mode prod-lmjy",
-    "build:prod-bnkc": "vue-cli-service build --mode prod-bnkc",
-    "build:prod-whhm": "vue-cli-service build --mode prod-whhm",
-    "build:prod-drk": "vue-cli-service build --mode prod-drk",
-    "build:prod-qdtst": "vue-cli-service build --mode prod-qdtst",
-    "build:prod-jkj": "vue-cli-service build --mode prod-jkj",
-    "build:prod-kyt": "vue-cli-service build --mode prod-kyt",
-    "build:stage": "vue-cli-service build --mode staging",
-    "build:prod-cqxzt": "vue-cli-service build --mode prod-cqxzt",
-    "build:prod-bjyjb": "vue-cli-service build --mode prod-bjyjb",
-    "build:prod-bjczwh": "vue-cli-service build --mode prod-bjczwh",
-    "build:prod-jnlzjk": "vue-cli-service build --mode prod-jnlzjk",
-    "build:prod-fby": "vue-cli-service build --mode prod-fby",
-    "build:prod-zkzh": "vue-cli-service build --mode prod-zkzh",
-    "build:prod-syysy": "vue-cli-service build --mode prod-syysy",
-    "build:prod-hyt": "vue-cli-service build --mode prod-hyt",
-    "build:prod-hst": "vue-cli-service build --mode prod-hst",
-    "build:prod-czt": "vue-cli-service build --mode prod-czt",
-    "build:prod-hat": "vue-cli-service build --mode prod-hat",
-    "build:prod-sczy": "vue-cli-service build --mode prod-sczy",
-    "build:prod-ddgy": "vue-cli-service build --mode prod-ddgy",
-    "build:prod-yxj": "vue-cli-service build --mode prod-yxj",
-    "build:prod-bjzm": "vue-cli-service build --mode prod-bjzm",
-    "build:prod-gzzdy": "vue-cli-service build --mode prod-gzzdy",
-    "build:prod-cfryt": "vue-cli-service build --mode prod-cfryt",
-    "build:prod-hsyy": "vue-cli-service build --mode prod-hsyy",
-    "build:prod-jnsyj": "vue-cli-service build --mode prod-jnsyj",
-    "build:prod-shdn": "vue-cli-service build --mode prod-shdn",
-    "build:prod-xcsw": "vue-cli-service build --mode prod-xcsw",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src"
   },
@@ -75,53 +27,19 @@
     "admin",
     "dashboard",
     "element-ui",
-    "boilerplate",
-    "admin-template",
-    "management-system"
+    "agent"
   ],
   "dependencies": {
-    "@amap/amap-jsapi-loader": "^1.0.1",
-    "@huaweicloud/huaweicloud-sdk-core": "^3.1.105",
-    "@huaweicloud/huaweicloud-sdk-vod": "^3.1.105",
-    "@riophae/vue-treeselect": "0.4.0",
     "axios": "0.21.0",
-    "chart.js": "^2.9.4",
-    "clipboard": "2.0.6",
     "core-js": "3.8.1",
-    "cos-js-sdk-v5": "^1.8.3",
     "dayjs": "^1.11.13",
     "echarts": "^4.9.0",
     "element-ui": "2.15.5",
-    "esdk-obs-browserjs": "^3.24.3",
-    "file-saver": "2.0.4",
-    "fuse.js": "6.4.3",
-    "highlight.js": "9.18.5",
-    "hls.js": "^1.6.14",
-    "image-conversion": "^2.1.1",
-    "js-beautify": "1.13.0",
     "js-cookie": "2.2.1",
-    "js-yaml": "^4.1.1",
-    "jsencrypt": "3.0.0-rc.1",
-    "monaco-editor": "^0.55.1",
     "nprogress": "0.2.0",
-    "qrcodejs2": "0.0.2",
-    "quill": "1.3.7",
-    "screenfull": "5.0.2",
-    "sortablejs": "1.10.2",
-    "tt-uploader": "^1.5.5",
-    "vod-js-sdk-v6": "^1.7.0",
     "vue": "2.6.12",
-    "vue-baidu-map": "^0.21.22",
-    "vue-count-to": "1.0.13",
-    "vue-cropper": "0.5.5",
-    "vue-jsonp": "^2.0.0",
-    "vue-meta": "^2.4.0",
-    "vue-mobile-calendar": "^3.3.0",
-    "vue-monaco": "^1.2.2",
     "vue-router": "3.4.9",
-    "vuedraggable": "^2.24.3",
-    "vuex": "3.6.0",
-    "wangeditor": "^4.7.5"
+    "vuex": "3.6.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "4.4.6",
@@ -133,7 +51,7 @@
     "eslint": "7.15.0",
     "eslint-plugin-vue": "7.2.0",
     "lint-staged": "10.5.3",
-    "node-sass": "4.14.1",
+    "sass": "^1.32.0",
     "runjs": "4.4.2",
     "sass-loader": "8.0.2",
     "script-ext-html-webpack-plugin": "2.1.5",
@@ -150,4 +68,4 @@
     "> 1%",
     "last 2 versions"
   ]
-}
+}

+ 13 - 84
vue.config.js

@@ -1,52 +1,26 @@
-'use strict'
 const path = require('path')
+const defaultSettings = require('./src/settings.js')
 
 function resolve(dir) {
   return path.join(__dirname, dir)
 }
 
-const name = process.env.VUE_APP_TITLE || '互联网医院管理系统' // 网页标题
+const name = defaultSettings.title || '代理端管理系统'
 
-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
-// 这里只列一部分,具体配置参考文档
 module.exports = {
-  // 部署生产环境和开发环境下的URL。
-  // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
-  // 例如 https://www.test.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.test.vip/admin/,则设置 baseUrl 为 /admin/。
-  publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
-  // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
+  transpileDependencies: [/@aws-sdk/, /@smithy/],
+  publicPath: '/',
   outputDir: 'dist',
-  // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
   assetsDir: 'static',
-  // 是否开启eslint保存检测,有效值:ture | false | 'error'
   lintOnSave: process.env.NODE_ENV === 'development',
-  // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
   productionSourceMap: false,
-  // webpack-dev-server 相关配置
   devServer: {
-    host: '0.0.0.0',
-    port: port,
-    open: true,
-    disableHostCheck: true,
+    port: 82,
     proxy: {
-      // 为 watch 模块单独设置的代理
-      '/watch-api': {
-        target: 'http://localhost:8004', // 另一个目标服务器
-        changeOrigin: true,
-        pathRewrite: {
-          '^/watch-api': '' // 将 /watch-api 替换为空
-        }
-      },
-      // detail: https://cli.vuejs.org/config/#devserver-proxy
-      [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8004`,
+      '/api': {
+        target: 'http://localhost:8004',
         changeOrigin: true,
-        pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API]: ''
-        }
+        pathRewrite: { '^/api': '' }
       }
     }
   },
@@ -59,18 +33,16 @@ module.exports = {
     }
   },
   chainWebpack(config) {
-    config.plugins.delete('preload') // TODO: need test
-    config.plugins.delete('prefetch') // TODO: need test
-
-    // set svg-sprite-loader
+    config.plugins.delete('preload')
+    config.plugins.delete('prefetch')
     config.module
       .rule('svg')
-      .exclude.add(resolve('src/assets/icons'))
+      .exclude.add(resolve('src/icons'))
       .end()
     config.module
       .rule('icons')
       .test(/\.svg$/)
-      .include.add(resolve('src/assets/icons'))
+      .include.add(resolve('src/icons'))
       .end()
       .use('svg-sprite-loader')
       .loader('svg-sprite-loader')
@@ -78,48 +50,5 @@ module.exports = {
         symbolId: 'icon-[name]'
       })
       .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'),
-          {
-             from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
-             to: './' //到根目录下
-          }
-        }
-      )
   }
-}
+}