xiaodai2017 2 years ago
commit
5b71d9dfc0
100 changed files with 1706 additions and 0 deletions
  1. 14 0
      .editorconfig
  2. 7 0
      .env.development
  3. 7 0
      .env.process
  4. 7 0
      .env.production
  5. 7 0
      .env.staging
  6. 4 0
      .eslintignore
  7. 198 0
      .eslintrc.js
  8. 16 0
      .gitignore
  9. 5 0
      .travis.yml
  10. 21 0
      LICENSE
  11. 14 0
      babel.config.js
  12. 35 0
      build/index.js
  13. BIN
      dist/favicon.ico
  14. 24 0
      dist/index.html
  15. BIN
      dist/static/C端订单导入模板.xlsx
  16. 1 0
      dist/static/axios@0.21.0.min.js
  17. BIN
      dist/static/axios@0.21.0.min.js.gz
  18. 0 0
      dist/static/css/app.a029dab5.css
  19. BIN
      dist/static/css/app.a029dab5.css.gz
  20. 0 0
      dist/static/css/chunk-0b024dde.751a4de5.css
  21. 0 0
      dist/static/css/chunk-0bb2547c.f0d117da.css
  22. 0 0
      dist/static/css/chunk-121c28d0.d39d70a9.css
  23. 0 0
      dist/static/css/chunk-15caf0ce.90844b8e.css
  24. 1 0
      dist/static/css/chunk-1d0a69b6.665540ec.css
  25. 1 0
      dist/static/css/chunk-44401bcc.c8bf352b.css
  26. 1 0
      dist/static/css/chunk-4ff11544.11a605cd.css
  27. 1 0
      dist/static/css/chunk-6e922e31.5517e0bb.css
  28. 1 0
      dist/static/css/chunk-a4a85b14.69905cae.css
  29. 0 0
      dist/static/css/chunk-b7f101b0.ba5246e0.css
  30. 0 0
      dist/static/css/chunk-ee636058.1c4ea3cf.css
  31. 1 0
      dist/static/css/chunk-elementUI.6e808e7d.css
  32. 0 0
      dist/static/css/chunk-f8cc0b40.00e45803.css
  33. BIN
      dist/static/css/chunk-f8cc0b40.00e45803.css.gz
  34. 0 0
      dist/static/css/chunk-libs.40f5be4d.css
  35. BIN
      dist/static/css/chunk-libs.40f5be4d.css.gz
  36. 0 0
      dist/static/dingtalk.open.2.10.3.js
  37. BIN
      dist/static/dingtalk.open.2.10.3.js.gz
  38. BIN
      dist/static/fonts/element-icons.535877f5.woff
  39. BIN
      dist/static/fonts/element-icons.732389de.ttf
  40. BIN
      dist/static/img/1.41566374.jpeg
  41. BIN
      dist/static/img/401.089007e7.gif
  42. BIN
      dist/static/img/404.a57b6f31.png
  43. BIN
      dist/static/img/404_cloud.0f4bc32b.png
  44. BIN
      dist/static/img/avatar.ecba1844.gif
  45. BIN
      dist/static/img/developing.750f7ed1.jpg
  46. BIN
      dist/static/img/loading.190c78aa.gif
  47. BIN
      dist/static/img/loginbg.51c61d67.png
  48. BIN
      dist/static/img/loginlan.1ecbd4ab.png
  49. BIN
      dist/static/img/logo.66bee2dc.gif
  50. BIN
      dist/static/img/pageBg.f9f9dcd5.png
  51. BIN
      dist/static/img/search-not.29ce7ea9.png
  52. BIN
      dist/static/img/welcome.748a4df4.gif
  53. 0 0
      dist/static/js/app.460eee0e.js
  54. BIN
      dist/static/js/app.460eee0e.js.gz
  55. 0 0
      dist/static/js/chunk-0b024dde.cb88f646.js
  56. 0 0
      dist/static/js/chunk-0bb2547c.6ff696ae.js
  57. BIN
      dist/static/js/chunk-0bb2547c.6ff696ae.js.gz
  58. 0 0
      dist/static/js/chunk-121c28d0.7f151aae.js
  59. BIN
      dist/static/js/chunk-121c28d0.7f151aae.js.gz
  60. 1 0
      dist/static/js/chunk-15caf0ce.2c49ba5e.js
  61. 0 0
      dist/static/js/chunk-1d0a69b6.9fc4502a.js
  62. 0 0
      dist/static/js/chunk-44401bcc.6ab00a64.js
  63. 1 0
      dist/static/js/chunk-4ff11544.0229aec7.js
  64. 0 0
      dist/static/js/chunk-6e922e31.0f05eb7b.js
  65. 0 0
      dist/static/js/chunk-a4a85b14.4d54de77.js
  66. 0 0
      dist/static/js/chunk-b7f101b0.98c88d2e.js
  67. 0 0
      dist/static/js/chunk-ee636058.6f58c036.js
  68. 0 0
      dist/static/js/chunk-elementUI.f0821104.js
  69. BIN
      dist/static/js/chunk-elementUI.f0821104.js.gz
  70. 0 0
      dist/static/js/chunk-f8cc0b40.69164517.js
  71. BIN
      dist/static/js/chunk-f8cc0b40.69164517.js.gz
  72. 0 0
      dist/static/js/chunk-libs.69437a25.js
  73. BIN
      dist/static/js/chunk-libs.69437a25.js.gz
  74. BIN
      dist/static/loading.gif
  75. 0 0
      dist/static/reset.min.css
  76. 10 0
      dist/static/vue-router.min.js
  77. BIN
      dist/static/vue-router.min.js.gz
  78. 5 0
      dist/static/vue.min.js
  79. BIN
      dist/static/vue.min.js.gz
  80. BIN
      dist/static/收货地址模板.xlsx
  81. 24 0
      jest.config.js
  82. 9 0
      jsconfig.json
  83. 112 0
      package.json
  84. 8 0
      postcss.config.js
  85. BIN
      public/favicon.ico
  86. 63 0
      public/index.html
  87. BIN
      public/static/C端订单导入模板.xlsx
  88. 1 0
      public/static/axios@0.21.0.min.js
  89. 0 0
      public/static/dingtalk.open.2.10.3.js
  90. BIN
      public/static/loading.gif
  91. 0 0
      public/static/reset.min.css
  92. 10 0
      public/static/vue-router.min.js
  93. 5 0
      public/static/vue.min.js
  94. BIN
      public/static/收货地址模板.xlsx
  95. 93 0
      scripts/generateComponent.js
  96. 123 0
      scripts/generatePage.js
  97. 93 0
      scripts/generateView.js
  98. 364 0
      scripts/page/addEditPage.js
  99. 395 0
      scripts/page/indexPage.js
  100. 23 0
      scripts/page/modelPage.js

+ 14 - 0
.editorconfig

@@ -0,0 +1,14 @@
+# http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+insert_final_newline = false
+trim_trailing_whitespace = false

+ 7 - 0
.env.development

@@ -0,0 +1,7 @@
+NODE_ENV = development
+
+# just a flag
+ENV = 'development'
+
+# base api
+VUE_APP_BASE_API = '/dev-api'

+ 7 - 0
.env.process

@@ -0,0 +1,7 @@
+NODE_ENV = development
+
+# just a flag
+ENV = 'process'
+
+# base api
+VUE_APP_BASE_API = '/dev-api'

+ 7 - 0
.env.production

@@ -0,0 +1,7 @@
+NODE_ENV = production
+
+# just a flag
+ENV = 'production'
+
+# base api
+VUE_APP_BASE_API = '/prod-api'

+ 7 - 0
.env.staging

@@ -0,0 +1,7 @@
+NODE_ENV = staging
+
+# just a flag
+ENV = 'staging'
+
+# base api
+VUE_APP_BASE_API = '/stage-api'

+ 4 - 0
.eslintignore

@@ -0,0 +1,4 @@
+build/*.js
+src/assets
+public
+dist

+ 198 - 0
.eslintrc.js

@@ -0,0 +1,198 @@
+module.exports = {
+  root: true,
+  parserOptions: {
+    parser: 'babel-eslint',
+    sourceType: 'module'
+  },
+  env: {
+    browser: true,
+    node: true,
+    es6: true,
+  },
+  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']
+  }
+}

+ 16 - 0
.gitignore

@@ -0,0 +1,16 @@
+.DS_Store
+node_modules/
+# dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+package-lock.json
+tests/**/coverage/
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln

+ 5 - 0
.travis.yml

@@ -0,0 +1,5 @@
+language: node_js
+node_js: 10
+script: npm run test
+notifications:
+  email: false

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017-present PanJiaChen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 14 - 0
babel.config.js

@@ -0,0 +1,14 @@
+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.
+      // https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
+      'plugins': ['dynamic-import-node']
+    }
+  }
+}

+ 35 - 0
build/index.js

@@ -0,0 +1,35 @@
+const { run } = require('runjs')
+const chalk = require('chalk')
+const config = require('../vue.config.js')
+const rawArgv = process.argv.slice(2)
+const args = rawArgv.join(' ')
+
+if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
+  const report = rawArgv.includes('--report')
+
+  run(`vue-cli-service build ${args}`)
+
+  const port = 9526
+  const publicPath = config.publicPath
+
+  var connect = require('connect')
+  var serveStatic = require('serve-static')
+  const app = connect()
+
+  app.use(
+    publicPath,
+    serveStatic('./dist', {
+      index: ['index.html', '/']
+    })
+  )
+
+  app.listen(port, function () {
+    console.log(chalk.green(`> Preview at  http://localhost:${port}${publicPath}`))
+    if (report) {
+      console.log(chalk.green(`> Report at  http://localhost:${port}${publicPath}report.html`))
+    }
+
+  })
+} else {
+  run(`vue-cli-service build ${args}`)
+}

BIN
dist/favicon.ico


File diff suppressed because it is too large
+ 24 - 0
dist/index.html


BIN
dist/static/C端订单导入模板.xlsx


File diff suppressed because it is too large
+ 1 - 0
dist/static/axios@0.21.0.min.js


BIN
dist/static/axios@0.21.0.min.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.a029dab5.css


BIN
dist/static/css/app.a029dab5.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-0b024dde.751a4de5.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-0bb2547c.f0d117da.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-121c28d0.d39d70a9.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-15caf0ce.90844b8e.css


+ 1 - 0
dist/static/css/chunk-1d0a69b6.665540ec.css

@@ -0,0 +1 @@
+.change{padding:0 18% 0 0;background:#f2f2f2;min-height:100%;height:100%;overflow:hidden;position:absolute;z-index:2}.change,.change .title{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.change .title{border-width:0;height:140px;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:400;font-style:normal;font-size:22px;text-align:left;padding:0;padding:60px 0 0 100px}.change-mobile{background:#f2f2f2}@supports (-webkit-mask:none) and (not (cater-color:#fff)){.change-mobile .el-input input{color:#fff}}.change-mobile .el-input input{color:#000}.change-mobile .el-form-item{border:1px solid hsla(0,0%,100%,.1);color:#454545}.change-mobile[data-v-aae05b16]{min-height:100%;width:100%;height:100%;background-color:#f2f2f2;overflow:hidden;position:absolute;z-index:2;background:#fff}.change-mobile .login-form[data-v-aae05b16]{position:relative;width:415px;max-width:100%;height:100%;padding:50px 35px 150px 35px;margin:0 auto;overflow:hidden}.change-mobile .login-form .el-form-item__label[data-v-aae05b16]{height:49px;line-height:49px}.change-mobile .login-form .el-form-item__content[data-v-aae05b16]:after,.change-mobile .login-form .el-form-item__content[data-v-aae05b16]:before{content:"";display:block;clear:both}.change-mobile .tips[data-v-aae05b16]{font-size:14px;color:#fff;margin-bottom:10px}.change-mobile .tips span[data-v-aae05b16]:first-of-type{margin-right:16px}.change-mobile .svg-container[data-v-aae05b16]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.change-mobile .show-pwd[data-v-aae05b16]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.change-mobile .thirdparty-button[data-v-aae05b16]{position:absolute;right:0;bottom:6px}@media only screen and (max-width:470px){.change-mobile .thirdparty-button[data-v-aae05b16]{display:none}}

+ 1 - 0
dist/static/css/chunk-44401bcc.c8bf352b.css

@@ -0,0 +1 @@
+.dashboard-container[data-v-a5f9fb52]{padding:0 0 0 0;position:relative;width:100%;min-height:calc(100vh - 53px);display:block;overflow:hidden}.dashboard-container .bg-img[data-v-a5f9fb52]{width:100%;position:absolute;display:block;min-height:100%;height:100%}.dashboard-container .duihua[data-v-a5f9fb52]{position:absolute;top:1%;right:12%;z-index:2;width:290px}.dashboard-container .duihua img.bg[data-v-a5f9fb52]{display:block;width:100%}.dashboard-container .duihua div.neirong[data-v-a5f9fb52]{display:block;position:absolute;top:0;left:0;height:100%;min-height:100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;padding:60px 0 0 20px}.dashboard-container .duihua div.neirong img[data-v-a5f9fb52]{display:inline-block}.dashboard-container .wudi[data-v-a5f9fb52]{position:absolute;right:0;bottom:0;color:#fff;z-index:3}.emptyGif[data-v-a5f9fb52]{display:block;width:100%;margin:0 auto}.dashboard-editor-container[data-v-a5f9fb52]{position:relative;min-height:100%;width:100%;text-align:center}.dashboard-editor-container .info-container[data-v-a5f9fb52]{display:block;width:60%;text-align:center;margin:0 auto;padding:10vh 0 0 0}.dashboard-editor-container .info-container .welcome-title[data-v-a5f9fb52]{vertical-align:top;padding:0;margin:0 0 0 18px;color:#97a8be;display:inline-block;height:130px;line-height:130px;font-size:45px}.dashboard-editor-container img[data-v-a5f9fb52]{display:block;-webkit-box-flex:1;-ms-flex:1;flex:1}

+ 1 - 0
dist/static/css/chunk-4ff11544.11a605cd.css

@@ -0,0 +1 @@
+.dingLoading[data-v-17af7bec]{text-align:center;width:100%}.dingLoading img[data-v-17af7bec]{display:inline-block;width:152px;margin:0 auto;padding-top:100px}

+ 1 - 0
dist/static/css/chunk-6e922e31.5517e0bb.css

@@ -0,0 +1 @@
+.my-messagge-page{text-align:center;background:#f2f2f2;min-height:100%;width:100%;height:100%;overflow:hidden;position:absolute;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}.my-messagge-page .change{padding:0 8% 0 0}.my-messagge-page .change .title{border-width:0;height:170px;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:400;font-style:normal;font-size:22px;text-align:left;padding:0;padding:60px 0 0 100px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.my-messagge-page .change-main{width:370px;margin:0 auto;text-align:left}.my-messagge-page .infor{padding:0 0 40px 0}.my-messagge-page .infor .tr{text-align:right;padding:0 15px 0 0}@supports (-webkit-mask:none) and (not (cater-color:#fff)){.my-messagge .el-input input{color:#fff}}.my-messagge[data-v-5c51b68e]{min-height:100%;width:100%;height:100%;background-color:#f2f2f2;overflow:hidden;position:absolute;z-index:2;background:#fff}.my-messagge .login-form[data-v-5c51b68e]{position:relative;width:415px;max-width:100%;height:100%;padding:50px 35px 150px 35px;margin:0 auto;overflow:hidden}.my-messagge .login-form .el-form-item__label[data-v-5c51b68e]{height:49px;line-height:49px}.my-messagge .tips[data-v-5c51b68e]{font-size:14px;color:#fff;margin-bottom:10px}.my-messagge .tips span[data-v-5c51b68e]:first-of-type{margin-right:16px}.my-messagge .svg-container[data-v-5c51b68e]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.my-messagge .show-pwd[data-v-5c51b68e]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.my-messagge .thirdparty-button[data-v-5c51b68e]{position:absolute;right:0;bottom:6px}@media only screen and (max-width:470px){.my-messagge .thirdparty-button[data-v-5c51b68e]{display:none}}

+ 1 - 0
dist/static/css/chunk-a4a85b14.69905cae.css

@@ -0,0 +1 @@
+.change-password{background:#f2f2f2;min-height:100%;width:100%;height:100%;overflow:hidden;position:absolute;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}.change-password .change{padding:0 18% 0 0}.change-password .change .title{border-width:0;height:140px;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:400;font-style:normal;font-size:22px;text-align:left;padding:0;padding:60px 0 0 100px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.change-password[data-v-3e496fef]{min-height:100%;width:100%;height:100%;overflow:hidden;position:absolute;z-index:2}.change-password .login-form[data-v-3e496fef]{position:relative;width:415px;max-width:100%;height:100%;padding:50px 35px 150px 35px;margin:0 auto;overflow:hidden}.change-password .login-form .el-form-item__label[data-v-3e496fef]{height:49px;line-height:49px}

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-b7f101b0.ba5246e0.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-ee636058.1c4ea3cf.css


+ 1 - 0
dist/static/css/chunk-elementUI.6e808e7d.css

@@ -0,0 +1 @@
+@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px){.hidden-sm-and-up{display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.hidden-sm-only{display:none!important}}@media only screen and (max-width:991px){.hidden-sm-and-down{display:none!important}}@media only screen and (min-width:992px){.hidden-md-and-up{display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.hidden-md-only{display:none!important}}@media only screen and (max-width:1199px){.hidden-md-and-down{display:none!important}}@media only screen and (min-width:1200px){.hidden-lg-and-up{display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.hidden-lg-only{display:none!important}}@media only screen and (max-width:1919px){.hidden-lg-and-down{display:none!important}}@media only screen and (min-width:1920px){.hidden-xl-only{display:none!important}}

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-f8cc0b40.00e45803.css


BIN
dist/static/css/chunk-f8cc0b40.00e45803.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-libs.40f5be4d.css


BIN
dist/static/css/chunk-libs.40f5be4d.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/dingtalk.open.2.10.3.js


BIN
dist/static/dingtalk.open.2.10.3.js.gz


BIN
dist/static/fonts/element-icons.535877f5.woff


BIN
dist/static/fonts/element-icons.732389de.ttf


BIN
dist/static/img/1.41566374.jpeg


BIN
dist/static/img/401.089007e7.gif


BIN
dist/static/img/404.a57b6f31.png


BIN
dist/static/img/404_cloud.0f4bc32b.png


BIN
dist/static/img/avatar.ecba1844.gif


BIN
dist/static/img/developing.750f7ed1.jpg


BIN
dist/static/img/loading.190c78aa.gif


BIN
dist/static/img/loginbg.51c61d67.png


BIN
dist/static/img/loginlan.1ecbd4ab.png


BIN
dist/static/img/logo.66bee2dc.gif


BIN
dist/static/img/pageBg.f9f9dcd5.png


BIN
dist/static/img/search-not.29ce7ea9.png


BIN
dist/static/img/welcome.748a4df4.gif


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.460eee0e.js


BIN
dist/static/js/app.460eee0e.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-0b024dde.cb88f646.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-0bb2547c.6ff696ae.js


BIN
dist/static/js/chunk-0bb2547c.6ff696ae.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-121c28d0.7f151aae.js


BIN
dist/static/js/chunk-121c28d0.7f151aae.js.gz


+ 1 - 0
dist/static/js/chunk-15caf0ce.2c49ba5e.js

@@ -0,0 +1 @@
+(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-15caf0ce"],{"1db4":function(t,s,i){"use strict";i.r(s);var c=[function(){var t=this.$createElement;t=this._self._c||t;return t("div",{staticClass:"pic-404"},[t("img",{staticClass:"pic-404__parent",attrs:{src:i("a36b"),alt:"404"}}),t("img",{staticClass:"pic-404__child left",attrs:{src:i("26fc"),alt:"404"}}),t("img",{staticClass:"pic-404__child mid",attrs:{src:i("26fc"),alt:"404"}}),t("img",{staticClass:"pic-404__child right",attrs:{src:i("26fc"),alt:"404"}})])}],a={name:"Page404",computed:{message:function(){return"访问的页面不存在..."}},methods:{goto:function(){window.vm.$router.push({path:"/welcome/dashboard"})}}},e=(i("e894"),i("2877"));e=Object(e.a)(a,(function(){var t=this,s=t.$createElement;s=t._self._c||s;return s("div",{staticClass:"wscn-http404-container"},[s("div",{staticClass:"wscn-http404"},[t._m(0),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__oops"},[t._v("哎呀!")]),s("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),s("div",{staticClass:"bullshit__info"},[t._v(" 请检查您输入的网址是否正确,或单击下面的按钮返回主页. ")]),s("el-button",{attrs:{type:"primary",round:""},on:{click:function(s){return t.goto()}}},[t._v("回到首页")])],1)])])}),c,!1,null,"82eac96e",null);s.default=e.exports},"26fc":function(t,s,i){t.exports=i.p+"static/img/404_cloud.0f4bc32b.png"},"44e6":function(t,s,i){},a36b:function(t,s,i){t.exports=i.p+"static/img/404.a57b6f31.png"},e894:function(t,s,i){"use strict";i("44e6")}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-1d0a69b6.9fc4502a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-44401bcc.6ab00a64.js


+ 1 - 0
dist/static/js/chunk-4ff11544.0229aec7.js

@@ -0,0 +1 @@
+(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4ff11544"],{"04c0":function(t,n,e){"use strict";e("efa6")},"7e10":function(t,n,e){"use strict";e.r(n);var a=[function(){var t=this.$createElement;t=this._self._c||t;return t("div",{staticClass:"dingLoading"},[t("img",{attrs:{src:e("f8b2"),alt:""}})])}],c={name:"loadingPage",data:function(){return{}},mounted:function(){}},i=(e("04c0"),e("2877"));i=Object(i.a)(c,(function(){var t=this;t.$createElement;return t._self._c,t._m(0)}),a,!1,null,"17af7bec",null);n.default=i.exports},efa6:function(t,n,e){},f8b2:function(t,n,e){t.exports=e.p+"static/img/loading.190c78aa.gif"}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6e922e31.0f05eb7b.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-a4a85b14.4d54de77.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-b7f101b0.98c88d2e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-ee636058.6f58c036.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-elementUI.f0821104.js


BIN
dist/static/js/chunk-elementUI.f0821104.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-f8cc0b40.69164517.js


BIN
dist/static/js/chunk-f8cc0b40.69164517.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-libs.69437a25.js


BIN
dist/static/js/chunk-libs.69437a25.js.gz


BIN
dist/static/loading.gif


File diff suppressed because it is too large
+ 0 - 0
dist/static/reset.min.css


File diff suppressed because it is too large
+ 10 - 0
dist/static/vue-router.min.js


BIN
dist/static/vue-router.min.js.gz


File diff suppressed because it is too large
+ 5 - 0
dist/static/vue.min.js


BIN
dist/static/vue.min.js.gz


BIN
dist/static/收货地址模板.xlsx


+ 24 - 0
jest.config.js

@@ -0,0 +1,24 @@
+module.exports = {
+  moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
+  transform: {
+    '^.+\\.vue$': 'vue-jest',
+    '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
+      'jest-transform-stub',
+    '^.+\\.jsx?$': 'babel-jest'
+  },
+  moduleNameMapper: {
+    '^@/(.*)$': '<rootDir>/src/$1'
+  },
+  snapshotSerializers: ['jest-serializer-vue'],
+  testMatch: [
+    '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
+  ],
+  collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
+  coverageDirectory: '<rootDir>/tests/unit/coverage',
+  // 'collectCoverage': true,
+  'coverageReporters': [
+    'lcov',
+    'text-summary'
+  ],
+  testURL: 'http://localhost/'
+}

+ 9 - 0
jsconfig.json

@@ -0,0 +1,9 @@
+{
+  "compilerOptions": {
+    "baseUrl": "./",
+    "paths": {
+        "@/*": ["src/*"]
+    }
+  },
+  "exclude": ["node_modules", "dist"]
+}

+ 112 - 0
package.json

@@ -0,0 +1,112 @@
+{
+  "name": "order-ui-pc",
+  "version": "4.4.0",
+  "description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
+  "author": "daiyanrong <836647807@qq.com>",
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "lint": "eslint --ext .js,.vue src",
+    "build:prod": "vue-cli-service build --mode production",
+    "build:stage": "vue-cli-service build --mode staging",
+    "build:dev": "vue-cli-service build --mode development",
+    "build:process": "vue-cli-service build --mode process",
+    "preview": "node build/index.js --preview",
+    "new": "plop",
+    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
+    "test:unit": "jest --clearCache && vue-cli-service test:unit",
+    "test:ci": "npm run lint && npm run test:unit",
+    "format": "prettier --write \"src/**/*.js\" \"src/**/*.less\" \"src/**/*.scss\" \"src/**/*.vue\"",
+    "new:comp": "node ./scripts/generateComponent",
+    "new:view": "node ./scripts/generateView",
+    "new:page": "node ./scripts/generatePage"
+  },
+  "dependencies": {
+    "@jiaminghi/data-view": "^2.7.3",
+    "@types/echarts": "^4.4.3",
+    "echarts": "^4.6.0",
+    "vue-awesome": "^4.0.2",
+    "babel-eslint": "^7.2.3",
+    "babel-polyfill": "^6.26.0",
+    "clipboard": "2.0.4",
+    "codemirror": "5.45.0",
+    "compression-webpack-plugin": "^6.1.1",
+    "core-js": "3.6.5",
+    "crypto-js": "^4.0.0",
+    "dayjs": "^1.10.4",
+    "driver.js": "0.9.5",
+    "dropzone": "5.5.1",
+    "element-ui": "^2.13.2",
+    "file-saver": "2.0.1",
+    "fuse.js": "3.4.4",
+    "js-cookie": "2.2.0",
+    "jsonlint": "1.6.3",
+    "jszip": "3.2.1",
+    "mockjs": "^1.1.0",
+    "node-sass": "^4.14.1",
+    "normalize.css": "7.0.0",
+    "nprogress": "0.2.0",
+    "path-to-regexp": "2.4.0",
+    "sass-loader": "^8.0.2",
+    "screenfull": "4.2.0",
+    "script-loader": "0.7.2",
+    "sortablejs": "1.8.4",
+    "uglifyjs-webpack-plugin": "^2.2.0",
+    "v-viewer": "^1.6.3",
+    "vue-count-to": "^1.0.13",
+    "vue-pdf": "^4.3.0",
+    "vue-puzzle-verification": "^1.0.2",
+    "vue-quill-editor": "^3.0.6",
+    "vue-splitpane": "1.0.4",
+    "vuedraggable": "2.20.0",
+    "vuex": "^3.1.0",
+    "xlsx": "0.14.1"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "4.4.4",
+    "@vue/cli-plugin-eslint": "4.4.4",
+    "@vue/cli-plugin-unit-jest": "4.4.4",
+    "@vue/cli-service": "4.4.4",
+    "@vue/test-utils": "1.0.0-beta.29",
+    "autoprefixer": "9.5.1",
+    "babel-jest": "23.6.0",
+    "babel-plugin-dynamic-import-node": "2.3.3",
+    "chalk": "2.4.2",
+    "chokidar": "2.1.5",
+    "connect": "3.6.6",
+    "eslint": "6.7.2",
+    "eslint-plugin-vue": "6.2.2",
+    "html-webpack-plugin": "3.2.0",
+    "lint-staged": "8.1.5",
+    "plop": "2.3.0",
+    "runjs": "4.3.2",
+    "script-ext-html-webpack-plugin": "2.1.3",
+    "serve-static": "1.13.2",
+    "svg-sprite-loader": "4.1.3",
+    "svgo": "1.2.0",
+    "vue-template-compiler": "^2.6.14"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions"
+  ],
+  "engines": {
+    "node": ">=8.9",
+    "npm": ">= 3.0.0"
+  },
+  "keywords": [
+    "vue",
+    "admin",
+    "dashboard",
+    "element-ui",
+    "boilerplate",
+    "admin-template",
+    "management-system"
+  ],
+  "license": "MIT",
+  "lint-staged": {
+    "src/**/*.{js,vue}": [
+      "eslint --fix",
+      "git add"
+    ]
+  }
+}

+ 8 - 0
postcss.config.js

@@ -0,0 +1,8 @@
+// https://github.com/michael-ciniawsky/postcss-load-config
+
+module.exports = {
+  'plugins': {
+    // to edit target browsers: use "browserslist" field in package.json
+    'autoprefixer': {}
+  }
+}

BIN
public/favicon.ico


+ 63 - 0
public/index.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+  <meta name="renderer" content="webkit">
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+  <!--钉钉监控-->
+  <meta name="wpk-bid" content="dta_1_1184953963">
+  <script>
+    !(function (c, i, e, b) {
+      var h = i.createElement("script");
+      var f = i.getElementsByTagName("script")[0];
+      h.type = "text/javascript";
+      h.crossorigin = true;
+      h.onload = function () {
+        c[b] || (c[b] = new c.wpkReporter({ bid: "dta_1_1184953963" }));
+        c[b].installAll()
+      };
+      f.parentNode.insertBefore(h, f);
+      h.src = e
+    })(window, document, "https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js", "__wpk");
+  </script>
+  <!--钉钉监控end-->
+  <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
+  <title>采销平台</title>
+  <style>
+    [v-cloak] {
+      display: none;
+    }
+  </style>
+  <script src="./static/vue.min.js" rel="preload" as="script"></script>
+  <script src="./static/vue-router.min.js" rel="preload" as="script"></script>
+  <script src="./static/axios@0.21.0.min.js" rel="preload" as="script"></script>
+  <script src="./static/dingtalk.open.2.10.3.js" rel="preload" as="script"></script>
+  <meta name="wpk-bid" content="dta_1_1184953963">
+  <script>
+    !(function (c, i, e, b) {
+      var h = i.createElement("script");
+      var f = i.getElementsByTagName("script")[0];
+      h.type = "text/javascript";
+      h.crossorigin = true;
+      h.onload = function () {
+        c[b] || (c[b] = new c.wpkReporter({ bid: "dta_1_1184953963" }));
+        c[b].installAll()
+      };
+      f.parentNode.insertBefore(h, f);
+      h.src = e
+    })(window, document, "https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js", "__wpk");
+  </script>
+</head>
+
+<body>
+  <div id="app">
+    <div style="width: 152px;margin: 0 auto;padding-top: 100px;">
+      <img style="width: 100%;" src="./static/loading.gif" alt="">
+      <!-- <p style="width: 100%;text-align: center;color: #606266;">努力加载中...</p> -->
+    </div>
+  </div>
+</body>
+
+</html>

BIN
public/static/C端订单导入模板.xlsx


File diff suppressed because it is too large
+ 1 - 0
public/static/axios@0.21.0.min.js


File diff suppressed because it is too large
+ 0 - 0
public/static/dingtalk.open.2.10.3.js


BIN
public/static/loading.gif


File diff suppressed because it is too large
+ 0 - 0
public/static/reset.min.css


File diff suppressed because it is too large
+ 10 - 0
public/static/vue-router.min.js


File diff suppressed because it is too large
+ 5 - 0
public/static/vue.min.js


BIN
public/static/收货地址模板.xlsx


+ 93 - 0
scripts/generateComponent.js

@@ -0,0 +1,93 @@
+// generateComponent.js 文件,放置生成组件的代码
+const chalk = require("chalk");
+const path = require("path");
+const fs = require("fs");
+const resolve = (...file) => path.resolve(__dirname, ...file);
+// const log = message => console.log(chalk.green(`${message}`));
+// const successLog = message => console.log(chalk.blue(`${message}`));
+const log = message => console.log(chalk.yellow(`${message}`));
+const successLog = message => console.log(chalk.green(`${message}`));
+const errorLog = error => console.log(chalk.red(`${error}`));
+const { vueTemplate, entryTemplate } = require("./template");
+
+const generateFile = (path, data) => {
+  if (fs.existsSync(path)) {
+    errorLog(`${path}文件已存在`);
+    return;
+  }
+  return new Promise((resolve, reject) => {
+    fs.writeFile(path, data, "utf8", err => {
+      if (err) {
+        errorLog(err.message);
+        reject(err);
+      } else {
+        resolve(true);
+      }
+    });
+  });
+};
+log("请输入要生成的组件名称、如需生成全局组件,请加 global/ 前缀");
+let componentName = "";
+process.stdin.on("data", async chunk => {
+  const inputName = String(chunk)
+    .trim()
+    .toString();
+  // 组件目录路径
+  const componentDirectory = resolve("../src/components", inputName);
+
+  // vue组件路径
+  const componentVueName = resolve(componentDirectory, "main.vue");
+  // 入口文件路径
+  const entryComponentName = resolve(componentDirectory, "index.js");
+
+  const hasComponentDirectory = fs.existsSync(componentDirectory);
+  if (hasComponentDirectory) {
+    errorLog(`${inputName}组件目录已存在,请重新输入`);
+    return;
+  } else {
+    log(`正在生成 component 目录 ${componentDirectory}`);
+    await dotExistDirectoryCreate(componentDirectory);
+    // fs.mkdirSync(componentDirectory);
+  }
+  try {
+    if (inputName.includes("/")) {
+      const inputArr = inputName.split("/");
+      componentName = inputArr[inputArr.length - 1];
+    } else {
+      componentName = inputName;
+    }
+    log(`正在生成 vue 文件 ${componentVueName}`);
+    await generateFile(componentVueName, vueTemplate(componentName));
+    log(`正在生成 entry 文件 ${entryComponentName}`);
+    await generateFile(entryComponentName, entryTemplate);
+    successLog("生成成功");
+  } catch (e) {
+    errorLog(e.message);
+  }
+
+  process.stdin.emit("end");
+});
+process.stdin.on("end", () => {
+  log("exit");
+  process.exit();
+});
+function dotExistDirectoryCreate(directory) {
+  return new Promise(resolve => {
+    mkdirs(directory, function() {
+      resolve(true);
+    });
+  });
+}
+
+// 递归创建目录
+function mkdirs(directory, callback) {
+  var exists = fs.existsSync(directory);
+  if (exists) {
+    callback();
+  } else {
+    mkdirs(path.dirname(directory), function() {
+      fs.mkdirSync(directory);
+      callback();
+    });
+  }
+}

+ 123 - 0
scripts/generatePage.js

@@ -0,0 +1,123 @@
+// generatePage.js 文件,放置生成组件的代码
+const chalk = require("chalk");
+const path = require("path");
+const fs = require("fs");
+const resolve = (...file) => path.resolve(__dirname, ...file);
+const log = message => console.log(chalk.yellow(`${message}`));
+const successLog = message => console.log(chalk.green(`${message}`));
+const errorLog = error => console.log(chalk.red(`${error}`));
+const {
+  indexPage,
+  addEditPage,
+  servicePage,
+  // modelPage
+} = require("./template");
+
+const generateFile = (path, data) => {
+  if (fs.existsSync(path)) {
+    errorLog(`${path}文件已存在`);
+    return;
+  }
+  return new Promise((resolve, reject) => {
+    fs.writeFile(path, data, "utf8", err => {
+      if (err) {
+        errorLog(err.message);
+        reject(err);
+      } else {
+        resolve(true);
+      }
+    });
+  });
+};
+log("请输入要生成的页面名称:");
+let componentName = "";
+process.stdin.on("data", async chunk => {
+  const inputName = String(chunk)
+    .trim()
+    .toString();
+  // 页面组件目录路径
+  const componentDirectory = resolve("../src/views", inputName);
+  // apis-service 目录路径
+  const apisServiceDirectory = resolve("../src/apis/service", inputName);
+  // // apis-model 目录路径
+  // const apisModelDirectory = resolve("../src/apis/model", inputName);
+  // vue组件路径--首页--列表页
+  const listTablePath = resolve(componentDirectory, "index.vue");
+  // vue组件路径--添加修改详情
+  const addEditPath = resolve(componentDirectory, "addEdit.vue");
+  // service文件路径
+  const servicePath = resolve(apisServiceDirectory, "index.js");
+  // // model文件路径
+  // const moldePath = resolve(apisModelDirectory, "index.js");
+  // views页面文件目录
+  const hasComponentDirectory = fs.existsSync(componentDirectory);
+  if (hasComponentDirectory) {
+    errorLog(`${inputName}组件目录已存在,请重新输入`);
+    return;
+  } else {
+    log(`正在生成 component 目录 ${componentDirectory}`);
+    await dotExistDirectoryCreate(componentDirectory);
+  }
+  // service文件目录
+  const hasService = fs.existsSync(apisServiceDirectory);
+  if (hasService) {
+    errorLog(`${inputName}service目录已存在,请重新输入`);
+    return;
+  } else {
+    log(`正在生成 apis/service 目录 ${apisServiceDirectory}`);
+    await dotExistDirectoryCreate(apisServiceDirectory);
+  }
+  // model 文件目录
+  // const hasModel = fs.existsSync(apisModelDirectory);
+  // if (hasModel) {
+  //   errorLog(`${inputName}组件目录已存在,请重新输入`);
+  //   return;
+  // } else {
+  //   log(`正在生成 apis/model 目录 ${apisModelDirectory}`);
+  //   await dotExistDirectoryCreate(apisModelDirectory);
+  // }
+  try {
+    if (inputName.includes("/")) {
+      const inputArr = inputName.split("/");
+      componentName = inputArr[inputArr.length - 1];
+    } else {
+      componentName = inputName;
+    }
+    log(`正在生成 views-列表 文件 ${listTablePath}`);
+    await generateFile(listTablePath, indexPage(inputName, componentName));
+    log(`正在生成 views-添加修改详情 文件 ${addEditPath}`);
+    await generateFile(addEditPath, addEditPage(inputName, componentName));
+    log(`正在生成 apis-service 文件 ${servicePath}`);
+    await generateFile(servicePath, servicePage);
+    // log(`正在生成 apis-model 文件 ${moldePath}`);
+    // await generateFile(moldePath, modelPage(componentName));
+    successLog("生成成功");
+  } catch (e) {
+    errorLog(e.message);
+  }
+  process.stdin.emit("end");
+});
+process.stdin.on("end", () => {
+  log("exit");
+  process.exit();
+});
+function dotExistDirectoryCreate(directory) {
+  return new Promise(resolve => {
+    mkdirs(directory, function () {
+      resolve(true);
+    });
+  });
+}
+
+// 递归创建目录
+function mkdirs(directory, callback) {
+  var exists = fs.existsSync(directory);
+  if (exists) {
+    callback();
+  } else {
+    mkdirs(path.dirname(directory), function () {
+      fs.mkdirSync(directory);
+      callback();
+    });
+  }
+}

+ 93 - 0
scripts/generateView.js

@@ -0,0 +1,93 @@
+// generateView.js 文件,放置生成页面组件的代码
+const chalk = require("chalk");
+const path = require("path");
+const fs = require("fs");
+const resolve = (...file) => path.resolve(__dirname, ...file);
+const log = message => console.log(chalk.green(`${message}`));
+const successLog = message => console.log(chalk.blue(`${message}`));
+const errorLog = error => console.log(chalk.red(`${error}`));
+const { vueTemplate } = require("./template");
+
+const generateFile = (path, data) => {
+  if (fs.existsSync(path)) {
+    errorLog(`${path}文件已存在`);
+    return;
+  }
+  return new Promise((resolve, reject) => {
+    fs.writeFile(path, data, "utf8", err => {
+      if (err) {
+        errorLog(err.message);
+        reject(err);
+      } else {
+        resolve(true);
+      }
+    });
+  });
+};
+log("请输入要生成的页面组件名称、会生成在 views/目录下");
+let componentName = "";
+process.stdin.on("data", async chunk => {
+  const inputName = String(chunk)
+    .trim()
+    .toString();
+  /**
+   * Vue页面组件路径
+   */
+  let componentVueName = resolve("../src/views", inputName);
+  // 如果不是以 .vue 结尾的话,自动加上
+  if (!componentVueName.endsWith(".vue")) {
+    componentVueName += ".vue";
+  }
+  /**
+   * vue组件目录路径
+   */
+  const componentDirectory = path.dirname(componentVueName);
+
+  const hasComponentExists = fs.existsSync(componentVueName);
+  if (hasComponentExists) {
+    errorLog(`${inputName}页面组件已存在,请重新输入`);
+    return;
+  } else {
+    log(`正在生成 component 目录 ${componentDirectory}`);
+    await dotExistDirectoryCreate(componentDirectory);
+  }
+  try {
+    if (inputName.includes("/")) {
+      const inputArr = inputName.split("/");
+      componentName = inputArr[inputArr.length - 1];
+    } else {
+      componentName = inputName;
+    }
+    log(`正在生成 vue 文件 ${componentVueName}`);
+    await generateFile(componentVueName, vueTemplate(componentName));
+    successLog("生成成功");
+  } catch (e) {
+    errorLog(e.message);
+  }
+
+  process.stdin.emit("end");
+});
+process.stdin.on("end", () => {
+  log("exit");
+  process.exit();
+});
+function dotExistDirectoryCreate(directory) {
+  return new Promise(resolve => {
+    mkdirs(directory, function() {
+      resolve(true);
+    });
+  });
+}
+
+// 递归创建目录
+function mkdirs(directory, callback) {
+  var exists = fs.existsSync(directory);
+  if (exists) {
+    callback();
+  } else {
+    mkdirs(path.dirname(directory), function() {
+      fs.mkdirSync(directory);
+      callback();
+    });
+  }
+}

+ 364 - 0
scripts/page/addEditPage.js

@@ -0,0 +1,364 @@
+module.exports = function(inputName,compoenntName) {
+  return `<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="1040px"
+    @close="showModelThis=false"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    v-loading="loading"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+  >
+    <el-card>
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            ref="ruleForm"
+            label-width="110px"
+            class="demo-ruleForm"
+          >
+            <el-form-item
+              label="登录名"
+              prop="loginName"
+              v-if="id === 'add' || isDetail"
+            >
+              <el-input
+                v-model="ruleForm.loginName"
+                :disabled="isDetail"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="姓名" prop="fullName">
+              <el-input
+                v-model="ruleForm.fullName"
+                :disabled="isDetail"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="手机号" prop="tel">
+              <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input>
+            </el-form-item>
+            <el-form-item label="密码" prop="password" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="密码"
+                :maxlength="20"
+                v-model="ruleForm.password"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="再次输入密码"
+                :maxlength="20"
+                v-model="ruleForm.password2"
+              ></el-input>
+            </el-form-item>
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="text-align: right;">
+          <el-button type="primary" @click="submitForm" v-if="!isDetail"
+            >保 存
+          </el-button>
+          <el-button @click="showModelThis = false">{{ isDetail ? "关 闭" : "取 消" }}</el-button>
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+   </template>
+   <script>
+   import asyncRequest from "@/apis${inputName}";
+   import resToken from "@/mixins/resToken";
+   import {
+    isnumber,
+    isMobile,
+    validEmail,
+    isAlphanumeric,
+    isChinese,
+    isEmoticon,
+    validAlphabets,
+  } from "@/utils/validate";
+   export default {
+    name: '${compoenntName}',
+    props: ["showModel", "id", "isDetail","sitem"],
+    mixins: [resToken],
+    data() {
+      const validateusername = (rule, value, callback) => {
+        if (value === "") {
+          callback(new Error("账号不能为空!"));
+        } else {
+          if (value.length < 6 || value.length > 18) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else {
+            if (isnumber(value)) {
+              callback(new Error("账号规则为6~18位数字与字母组合!"));
+            } else if (validAlphabets(value)) {
+              callback(new Error("账号规则为6~18位数字与字母组合!"));
+            } else if (!isAlphanumeric(value)) {
+              callback(new Error("账号规则为6~18位数字与字母组合!"));
+            } else {
+              callback();
+            }
+          }
+        }
+      };
+      const validatename = (rule, value, callback) => {
+        if (value === "") {
+          callback(new Error("真实姓名不能为空!"));
+        } else {
+          if (value.length < 2 || value.length > 12) {
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else {
+            if (!isChinese(value)) {
+              console.log(9999);
+              callback(new Error("真实姓名规则为2~12位汉字!"));
+            } else if (isEmoticon(value)) {
+              console.log(2345);
+              callback(new Error("真实姓名规则为2~12位汉字!"));
+            } else {
+              callback();
+            }
+          }
+        }
+      };
+      const validatemobile = (rule, value, callback) => {
+        if (value === "") {
+          callback(new Error("手机号不能为空!"));
+        } else {
+          if (!isMobile(value)) {
+            callback(new Error("手机号格式不正确!"));
+          } else {
+            callback();
+          }
+        }
+      };
+  
+      const validateEmail = (rule, value, callback) => {
+        if (value === "") {
+          callback();
+        } else {
+          if (!validEmail(value)) {
+            callback(new Error("邮箱格式不正确!"));
+          } else {
+            callback();
+          }
+        }
+      };
+      return {
+        loading: false,
+        title: "添加账号",
+        showModelThis: this.showModel,
+        ruleForm: {
+          username: "", // 账号
+          name: "", // 真实姓名
+          mobile: "",
+          email: "",
+          role_id: "",
+          status: "1",
+          item: [],
+        },
+        rulesThis: this.rules,
+        rules: {
+          name: [
+            {
+              required: true,
+              validator: validatename,
+              trigger: "blur",
+            },
+          ],
+          username: [
+            {
+              required: true,
+              validator: validateusername,
+              trigger: "blur",
+            },
+          ],
+          mobile: [
+            {
+              required: true,
+              validator: validatemobile,
+              trigger: "blur",
+            },
+          ],
+          email: [
+            {
+              required: false,
+              validator: validateEmail,
+              trigger: "blur",
+            },
+          ],
+          role_id: [
+            {
+              required: true,
+              message: "请选择角色",
+              trigger: "change",
+            },
+          ],
+          item: [
+            {
+              type: "array",
+              required: true,
+              message: "请选择所在部门",
+              trigger: "change",
+            },
+          ],
+          status: [
+            {
+              required: true,
+              message: "请选择状态",
+              trigger: "change",
+            },
+          ],
+        }
+      };
+    },
+    watch: {
+      showModel: function(val) {
+        this.showModelThis = val;
+        if (val) {
+          this.initForm();
+        }
+      },
+      showModelThis(val) {
+        if (!val) {
+          this.$emit("cancel");
+        }
+      }
+    },
+    methods: {
+      async initForm() {
+        this.loading = true;
+        // await this.getRole();
+        if (this.id === "add") {
+          this.title = "添加账号";
+          this.rulesThis = this.rules;
+          await this.resetForm();
+        } else {
+          if (this.isDetail) {
+            this.title = "账号详情";
+            this.rulesThis = {};
+          } else {
+            this.title = "修改账号";
+            this.rulesThis = this.rules;
+          }
+          await this.resetForm(this.sitem);
+          // await this.initData()
+        }
+        this.loading = false;
+      },
+      // async getRole() {
+      //   const model = {
+      //     status: "", // 状态
+      //     level: "", // 姓名
+      //     role_name: "",
+      //   };
+      //   const res = await asyncRequest.getRole(model);
+      //   if (res && res.code === 0 && res.data) {
+      //     this.roleList = res.data;
+      //     this.roleList.map((v1) => {
+      //       v1.id += "";
+      //       v1.status += "";
+      //       return v1;
+      //     });
+      //   }
+      // },
+      async initData() {
+        const res = await asyncRequest.detail({ id: this.id });
+      if (res && res.code === 0 && res.data) {
+        this.ruleForm = res.data;
+        this.ruleForm.role_id = this.ruleForm.role;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      },
+      async resetForm(sitem) {
+        // 重置
+        await this.$nextTick(() => {
+          if (this.$refs.ruleForm) {
+            this.$refs.ruleForm.resetFields();
+            this.$refs.ruleForm.clearValidate();
+            const { username, nickname, mobile, email, roleid, status, item } =
+              sitem;
+            this.ruleForm = {
+              username: username || "", // 账号
+              name: nickname || "", // 真实姓名
+              mobile: mobile || "",
+              email: email || "",
+              role_id: roleid || "",
+              status: status || "",
+              item: item || [],
+            };
+            if (this.id === "add" || this.isDetail) {
+              this.rules.username[0].required = false;
+            }
+          }
+        });
+      },
+    
+      async submitForm() {
+        await this.$refs.ruleForm.validate(async (valid) => {
+          if (valid) {
+            if (this.loading) {
+              return;
+            }
+            this.loading = true;
+            const { username, name, mobile, email, role_id, status } = JSON.parse(
+              JSON.stringify(this.ruleForm)
+            );
+            const model = {
+              id: this.id,
+              username: username || "", // 账号
+              nickname: name || "", // 真实姓名
+              mobile: mobile || "",
+              email: email || "",
+              role: role_id || "",
+              status: status || "",
+            };
+            let res = {};
+            if (this.id === "add") {
+              delete model["id"];
+              res = await asyncRequest.add(model);
+            } else {
+              res = await asyncRequest.update(model);
+            }
+            this.loading = false;
+            if (res && res.code === 0) {
+              const title = this.id === "add" ? "添加成功" : "修改成功";
+              this.$notify.success({
+                title,
+                message: "",
+              });
+              this.showModelThis = false;
+              // 刷新
+              this.$emit("refresh");
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
+          } else {
+            console.log("error submit!!");
+            return false;
+          }
+        });
+      },
+    },
+ 
+  };
+  </script>
+
+   <style lang="scss" scoped>
+   .${compoenntName} {
+    
+   }
+   </style>
+   `;
+};

+ 395 - 0
scripts/page/indexPage.js

@@ -0,0 +1,395 @@
+module.exports = function (inputName, compoenntName) {
+  return `<template>
+    <div class="${compoenntName} pagePadding">
+  
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 0 80px">
+            <el-col :span="24">
+              <el-col :span="4" style="width: 120px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.status"
+                  filterable
+                  clearable
+                  placeholder="账号状态"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in statusList"
+                    :key="'status' + item.code"
+                    :label="item.name"
+                    :value="item.code"
+                  />
+                </el-select>
+              </el-col>
+              <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                <el-input
+                  :size="searchSize"
+                  v-model="parmValue.name"
+                  :maxlength="40"
+                  placeholder="业务员姓名"
+                />
+              </el-col>
+              <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                <el-input
+                  :size="searchSize"
+                  v-model="parmValue.username"
+                  :maxlength="40"
+                  placeholder="手机号"
+                />
+              </el-col>
+              <el-col :span="4" style="width: 54px">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  class="fr"
+                  icon="el-icon-search"
+                  @click="searchList"
+              /></el-col>
+              <el-col
+                :span="4"
+                style="width: 66px"
+              >
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+              <el-col
+                :span="3"
+                style="width: 66px; float: right"
+              >
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.status == '0' ? 'warning' : ''"
+          v-text="
+            (statusOptions.find((i)=> i.id == scope.row.status) || {})
+              .label || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #operation="{ scope }">
+        <el-tooltip
+          effect="dark"
+          content="重置密码"
+          placement="top"
+        >
+          <i
+            class="el-icon-refresh-left tb-icon"
+            @click="openPasswordModal(scope.row.id, false)"
+          ></i>
+        </el-tooltip>
+
+        <el-tooltip
+           
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <i
+            class="el-icon-view tb-icon"
+            @click="openModal(scope.row.id, true, scope.row)"
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+           
+          effect="dark"
+          content="修改"
+          placement="top"
+        >
+          <i
+            class="el-icon-edit tb-icon"
+            @click="openModal(scope.row.id, false, scope.row)"
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+        
+        v-if="scope.row.status === '1'
+          effect="dark"
+          content="禁用"
+          placement="top"
+        >
+          <i
+            class="el-icon-video-pause tb-icon"
+            @click="statusConfirm(scope.row.id, scope.row.status)"
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="scope.row.status === '0'
+          "
+           
+          effect="dark"
+          content="启用"
+          placement="top"
+        >
+          <i
+            class="el-icon-video-play tb-icon"
+            @click="statusConfirm(scope.row.id, scope.row.status)"
+          ></i>
+        </el-tooltip>
+      </template>
+    </ex-table>
+    <add-edit
+      :id="modelId"
+      :sitem="sitem"
+      :show-model="showModel"
+      :is-detail="isDetail"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    />
+  </div>
+  <div v-else>
+    <no-auth></no-auth>
+  </div>
+    </div>
+   </template>
+   <script>
+    import mixinPage from "@/mixins/elPaginationHandle";
+    import resToken from "@/mixins/resToken";
+    import {statusList} from "@/assets/js/statusList";
+    import asyncRequest from "@/apis${inputName}";
+    import addEdit from "./addEdit";
+    import { mapGetters } from "vuex";
+   
+   export default {
+    name: '${compoenntName}',
+    mixins: [mixinPage, resToken],
+    components: {
+      addEdit,
+    },
+    computed: {
+      ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    },
+    data() {
+      return {
+        sitem: null,
+        // 状态
+        statusOptions: [
+          { id: "0", label: "禁用" },
+          { id: "1", label: "启用" },
+        ],
+        statusList: statusList,
+        loading: true,
+        showModel: false,
+        isDetail: false,
+        modelId: 0,
+        parmValue: {
+          name: "", // 业务员名字
+          username: "", // 账号
+          status: "", //
+          page: 1, // 页码
+          size: 15, // 每页显示条数
+        },
+        tableData: [],
+        passwordModel: false,
+        passwordModelId: 0,
+        isPasswordDetail: false,
+        // 表格 - 数据
+        tableData: [],
+        // 表格 - 参数
+        table: {
+          stripe: true,
+          border: true,
+          _defaultHeader_: ["setcol"],
+        },
+        // 表格 - 分页
+        pageInfo: {
+          size: 15,
+          curr: 1,
+          total: 0,
+        },
+        // 表格 - 列参数
+        columns: [
+          {
+            prop: "nickname",
+            label: "真实姓名",
+          },
+          {
+            prop: "role_name",
+            label: "角色名称",
+          },
+          {
+            prop: "mobile",
+            label: "联系电话",
+          },
+          {
+            prop: "email",
+            label: "邮箱",
+          },
+          {
+            prop: "status",
+            label: "状态",
+            _slot_: "status",
+            width: "80px",
+          },
+          {
+            prop: "addtime",
+            label: "创建时间",
+            sortable: true,
+          },
+          {
+            prop: "",
+            label: "操作",
+            fixed: "right",
+            _noset_: true,
+            _slot_: "operation",
+          },
+        ],
+      };
+    },
+    mounted() {
+      this.searchList();
+    },
+  
+    methods: {
+      restSearch() {
+        this.parmValue = {
+          name: "", // 业务员名字
+          username: "", // 账号
+          status: "", //
+          page: 1, // 页码
+          size: 15, // 每页显示条数
+        };
+        // 表格 - 分页
+        this.pageInfo = {
+          size: 15,
+          curr: 1,
+          total: 0,
+        };
+        this.searchList();
+      },
+      
+      openModal(id, isDetail, sitem) {
+        this.showModel = true;
+        this.modelId = id;
+        this.isDetail = isDetail;
+        this.sitem = sitem;
+      },
+      async deleteById(id, status) {
+        await this.$confirm("确定要删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            const model = {
+              id: id,
+              status: status === "1" ? "0" : "1",
+            };
+            const res = await asyncRequest.status(model);
+            if (res && res.code === 0) {
+              this.$notify.success({
+                title: "删除成功",
+                message: "",
+              });
+              this.searchList();
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
+          })
+          .catch(() => {
+            console.log("取消");
+          });
+      },
+      async searchList() {
+        this.loading = true;
+        const res = await asyncRequest.list(this.parmValue);
+        if (res && res.code === 0 && res.data) {
+          this.tableData = res.data.list;
+          this.pageInfo.total = Number(res.data.count);
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.tableData = [];
+          this.pageInfo.total = 0;
+        }
+        this.loading = false;
+      },
+
+      async statusConfirm(id, status) {
+        let str= status === "1" ? "禁用" : "启用"
+        await this.$confirm('确定要改为'+str+'?',{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            this.loading = true;
+            const model = {
+              id: id,
+              status: status === "1" ? "0" : "1",
+            };
+            const res = await asyncRequest.status(model);
+            if (res && res.code === 0) {
+              this.loading = false;
+              this.$notify.success({
+                title: "状态修改成功!",
+                message: "",
+              });
+              await this.searchList();
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
+          })
+          .catch(() => {
+            console.log("取消");
+          });
+      },
+    }
+   }
+   </script>
+   <style lang="scss" scoped>
+   .${compoenntName} {
+    
+   }
+   </style>
+   `;
+};

+ 23 - 0
scripts/page/modelPage.js

@@ -0,0 +1,23 @@
+module.exports = function(compoenntName) {
+  return `import asyncService from "@/apis${compoenntName}/index";
+
+    const asyncFn = async (name, data) => {
+      let res = await asyncService[name](data);
+      return res;
+    };
+    export default {
+      // 添加
+      add: async data => await asyncFn("add", data),
+      // 删除
+      delete: async data => await asyncFn("delete", data),
+      // 分页查询
+      list: async data => await asyncFn("list", data),
+      // 详情
+      detail: async data => await asyncFn("detail", data),
+      // 更新
+      update: async data => await asyncFn("update", data),
+      //修改状态
+      status: async data => await asyncFn("accountstatus", data),
+    };
+     `;
+};

Some files were not shown because too many files changed in this diff