浏览代码

首次提交

戴艳蓉 3 年之前
当前提交
866908b23e
共有 100 个文件被更改,包括 3316 次插入0 次删除
  1. 14 0
      .editorconfig
  2. 5 0
      .env.development
  3. 6 0
      .env.production
  4. 8 0
      .env.staging
  5. 4 0
      .eslintignore
  6. 198 0
      .eslintrc.js
  7. 23 0
      .gitignore
  8. 5 0
      .travis.yml
  9. 22 0
      README.md
  10. 14 0
      babel.config.js
  11. 35 0
      build/index.js
  12. 24 0
      jest.config.js
  13. 9 0
      jsconfig.json
  14. 108 0
      package.json
  15. 9 0
      plopfile.js
  16. 5 0
      postcss.config.js
  17. 25 0
      public/index.html
  18. 1 0
      public/static/axios@0.21.0.min.js
  19. 0 0
      public/static/element-ui@2.14.1.css
  20. 0 0
      public/static/element-ui@2.14.1.min.js
  21. 0 0
      public/static/reset.min.css
  22. 5 0
      public/static/vue-router.min.js
  23. 5 0
      public/static/vue.min.js
  24. 5 0
      public/static/vuex.min.js
  25. 93 0
      scripts/generateComponent.js
  26. 123 0
      scripts/generatePage.js
  27. 93 0
      scripts/generateView.js
  28. 275 0
      scripts/page/addEditPage.js
  29. 300 0
      scripts/page/indexPage.js
  30. 23 0
      scripts/page/modelPage.js
  31. 18 0
      scripts/page/servicePage.js
  32. 27 0
      scripts/template.js
  33. 34 0
      src/App.vue
  34. 93 0
      src/apis/axios.js
  35. 93 0
      src/apis/service/axios.js
  36. 25 0
      src/apis/service/client/business/index.js
  37. 35 0
      src/apis/service/client/company/index.js
  38. 21 0
      src/apis/service/goodStore/brand/index.js
  39. 30 0
      src/apis/service/goodStore/goods/index.js
  40. 30 0
      src/apis/service/goodStore/sort/index.js
  41. 23 0
      src/apis/service/goodStore/specs/index.js
  42. 21 0
      src/apis/service/interest/account/index.js
  43. 13 0
      src/apis/service/interest/action/index.js
  44. 26 0
      src/apis/service/interest/dataShare/index.js
  45. 20 0
      src/apis/service/interest/group/index.js
  46. 22 0
      src/apis/service/interest/role/index.js
  47. 22 0
      src/apis/service/system/menu/index.js
  48. 15 0
      src/apis/service/system/oplog/index.js
  49. 11 0
      src/apis/service/system/parameter/index.js
  50. 15 0
      src/apis/service/system/talent/index.js
  51. 7 0
      src/apis/service/system/updates/index.js
  52. 19 0
      src/apis/service/user/index.js
  53. 4 0
      src/apis/url-config.js
  54. 97 0
      src/apis/user/axios.js
  55. 29 0
      src/apis/user/index.js
  56. 二进制
      src/assets/401_images/401.gif
  57. 二进制
      src/assets/404_images/404.png
  58. 二进制
      src/assets/404_images/404_cloud.png
  59. 49 0
      src/assets/css/btn.scss
  60. 220 0
      src/assets/css/common.scss
  61. 38 0
      src/assets/css/index.scss
  62. 71 0
      src/assets/css/mixin.scss
  63. 24 0
      src/assets/css/scrollbar.less
  64. 43 0
      src/assets/css/scss/base.scss
  65. 二进制
      src/assets/css/scss/fonts/element-icons.woff
  66. 3 0
      src/assets/css/scss/iconFont.css
  67. 337 0
      src/assets/css/scss/index-ic.css
  68. 8 0
      src/assets/css/scss/index.scss
  69. 45 0
      src/assets/css/scss/mixin.scss
  70. 4 0
      src/assets/css/scss/pxtorem.scss
  71. 二进制
      src/assets/custom-theme/fonts/element-icons.ttf
  72. 二进制
      src/assets/custom-theme/fonts/element-icons.woff
  73. 0 0
      src/assets/custom-theme/index.css
  74. 25 0
      src/assets/icon-font/iconfont.css
  75. 二进制
      src/assets/icon-font/iconfont.eot
  76. 66 0
      src/assets/icon-font/iconfont.js
  77. 32 0
      src/assets/icon-font/iconfont.svg
  78. 二进制
      src/assets/icon-font/iconfont.ttf
  79. 二进制
      src/assets/icon-font/iconfont.woff
  80. 二进制
      src/assets/icon-font/iconfont.woff2
  81. 二进制
      src/assets/img/avatar.gif
  82. 二进制
      src/assets/img/bg.jpg
  83. 二进制
      src/assets/img/logo.gif
  84. 二进制
      src/assets/img/logo.png
  85. 二进制
      src/assets/img/logo1.png
  86. 二进制
      src/assets/img/welcome.gif
  87. 29 0
      src/assets/js/btnList.js
  88. 5 0
      src/assets/js/cexStatusList.js
  89. 5 0
      src/assets/js/roleLevel.js
  90. 5 0
      src/assets/js/statusList.js
  91. 二进制
      src/assets/sheji/developing.jpg
  92. 二进制
      src/assets/sheji/loginbg.png
  93. 二进制
      src/assets/sheji/loginlan.png
  94. 二进制
      src/assets/sheji/logo.png
  95. 二进制
      src/assets/sheji/user.png
  96. 二进制
      src/assets/sheji/welcome.png
  97. 二进制
      src/assets/sheji/wenzi.png
  98. 二进制
      src/assets/sprite.png
  99. 29 0
      src/assets/utils/filter.js
  100. 91 0
      src/assets/utils/interceptors.js

+ 14 - 0
.editorconfig

@@ -0,0 +1,14 @@
+# https://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

+ 5 - 0
.env.development

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

+ 6 - 0
.env.production

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

+ 8 - 0
.env.staging

@@ -0,0 +1,8 @@
+NODE_ENV = production
+
+# 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']
+  }
+}

+ 23 - 0
.gitignore

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

+ 5 - 0
.travis.yml

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

+ 22 - 0
README.md

@@ -0,0 +1,22 @@
+
+
+# install dependency
+npm install
+
+# develop
+npm run dev
+```
+
+This will automatically open http://localhost:8080
+
+## Build
+
+```bash
+# build for test environment
+npm run build:stage
+
+# build for production environment
+npm run build:prod
+```
+
+

+ 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}`)
+}

+ 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"]
+}

+ 108 - 0
package.json

@@ -0,0 +1,108 @@
+{
+  "name": "pin-inside-console-ui",
+  "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",
+    "build:stage": "vue-cli-service build --mode staging",
+    "build:dev": "vue-cli-service build --mode development",
+    "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": {
+    "axios": "0.18.1",
+    "babel-eslint": "^7.2.3",
+    "babel-polyfill": "^6.26.0",
+    "clipboard": "2.0.4",
+    "codemirror": "5.45.0",
+    "core-js": "3.6.5",
+    "crypto-js": "^4.0.0",
+    "dayjs": "^1.10.4",
+    "driver.js": "0.9.5",
+    "dropzone": "5.5.1",
+    "echarts": "4.2.1",
+    "file-saver": "2.0.1",
+    "fuse.js": "3.4.4",
+    "js-cookie": "2.2.0",
+    "jsonlint": "1.6.3",
+    "jszip": "3.2.1",
+    "normalize.css": "7.0.0",
+    "nprogress": "0.2.0",
+    "path-to-regexp": "2.4.0",
+    "screenfull": "4.2.0",
+    "script-loader": "0.7.2",
+    "sortablejs": "1.8.4",
+    "tui-editor": "1.3.3",
+    "uglifyjs-webpack-plugin": "^2.2.0",
+    "vue": "2.6.10",
+    "vue-count-to": "1.0.13",
+    "vue-puzzle-verification": "^1.0.2",
+    "vue-quill-editor": "^3.0.6",
+    "vue-router": "3.0.2",
+    "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",
+    "mockjs": "1.0.1-beta3",
+    "plop": "2.3.0",
+    "runjs": "4.3.2",
+    "sass": "1.26.2",
+    "sass-loader": "^8.0.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.10"
+  },
+  "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"
+    ]
+  }
+}

+ 9 - 0
plopfile.js

@@ -0,0 +1,9 @@
+const viewGenerator = require('./plop-templates/view/prompt')
+const componentGenerator = require('./plop-templates/component/prompt')
+const storeGenerator = require('./plop-templates/store/prompt.js')
+
+module.exports = function(plop) {
+  plop.setGenerator('view', viewGenerator)
+  plop.setGenerator('component', componentGenerator)
+  plop.setGenerator('store', storeGenerator)
+}

+ 5 - 0
postcss.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  plugins: {
+    autoprefixer: {}
+  }
+}

文件差异内容过多而无法显示
+ 25 - 0
public/index.html


文件差异内容过多而无法显示
+ 1 - 0
public/static/axios@0.21.0.min.js


文件差异内容过多而无法显示
+ 0 - 0
public/static/element-ui@2.14.1.css


文件差异内容过多而无法显示
+ 0 - 0
public/static/element-ui@2.14.1.min.js


文件差异内容过多而无法显示
+ 0 - 0
public/static/reset.min.css


文件差异内容过多而无法显示
+ 5 - 0
public/static/vue-router.min.js


文件差异内容过多而无法显示
+ 5 - 0
public/static/vue.min.js


文件差异内容过多而无法显示
+ 5 - 0
public/static/vuex.min.js


+ 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(componentName));
+    log(`正在生成 views-添加修改详情 文件 ${addEditPath}`);
+    await generateFile(addEditPath, addEditPage(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();
+    });
+  }
+}

+ 275 - 0
scripts/page/addEditPage.js

@@ -0,0 +1,275 @@
+module.exports = function(compoenntName) {
+  return `<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="1040px"
+    @close="closeModel"
+    :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/service/${compoenntName}";
+
+   export default {
+    name: '${compoenntName}',
+    props: ["showModel", "id", "isDetail"],
+    data() {
+      let validatePass = (rule, value, callback) => {
+        if (value === "" || value === undefined) {
+          callback(new Error("请输入新密码"));
+        } else {
+          if (value.length < 6 || value.length > 15) {
+            callback(new Error("必须是6到15位,支持数字、字母、符号组合"));
+          } else {
+            if (this.ruleForm.password2 !== "") {
+              this.$refs.ruleForm.validateField("password2");
+            }
+            callback();
+          }
+        }
+      };
+      let validatePass2 = (rule, value, callback) => {
+        if (value === "" || value === undefined) {
+          callback(new Error("请再次输入密码"));
+        } else if (value !== this.ruleForm.password) {
+          callback(new Error("两次输入密码不一致!"));
+        } else {
+          if (value.length < 6 || value.length > 15) {
+            callback(new Error("必须是6到15位,支持数字、字母、符号组合"));
+          } else {
+            callback();
+          }
+        }
+      };
+      return {
+        loading: false,
+        title: "添加管理人员",
+        showModelThis: this.showModel,
+        ruleForm: {
+          tel: "",
+          fullName: "",
+          loginName: "",
+          passport: ""
+          // isAdmin: 0
+        },
+        rulesThis: this.rules,
+        rules: {
+          loginName: [
+            {
+              required: true,
+              message: "请输入登录名",
+              trigger: "blur"
+            },
+            {
+              min: 2,
+              max: 30,
+              message: "长度在 2 到 30 个字符",
+              trigger: "blur"
+            }
+          ],
+          fullName: [
+            {
+              required: true,
+              message: "请输入姓名",
+              trigger: "blur"
+            },
+            {
+              min: 2,
+              max: 30,
+              message: "长度在 2 到 30 个字符",
+              trigger: "blur"
+            }
+          ],
+          password: [
+            {
+              required: true,
+              validator: validatePass,
+              trigger: "blur"
+            }
+          ],
+          password2: [
+            {
+              required: true,
+              validator: validatePass2,
+              trigger: "blur"
+            }
+          ],
+          tel: [
+            {
+              required: true,
+              message: "请输入手机号码",
+              trigger: "blur"
+            },
+            {
+              validator: this.$rulesPhone,
+              trigger: "blur"
+            }
+          ]
+        }
+      };
+    },
+    methods: {
+      closeModel() {
+        console.log("closeModel!!");
+      },
+      async initForm() {
+        if (this.id === "add") {
+          this.title = "添加管理人员";
+          // this.ruleForm.isAdmin = 0;
+          this.loading = false;
+          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();
+          await this.initData();
+        }
+      },
+      async initData() {
+        this.loading = true;
+        let res = await asyncRequest.detail({id:this.id});
+        this.loading = false;
+        if (res.code === 0) {
+          this.ruleForm = res.data;
+        }
+      },
+      async resetForm() {
+        // 重置
+        await this.$nextTick(() => {
+          if (this.$refs.ruleForm) {
+            this.$refs.ruleForm.resetFields();
+            this.$refs.ruleForm.clearValidate();
+            this.ruleForm = {
+              tel: "",
+              fullName: "",
+              loginName: "",
+              passport: ""
+              // isAdmin: 0
+            };
+          }
+        });
+      },
+      async submitForm() {
+        await this.$refs.ruleForm.validate(async valid => {
+          if (valid) {
+            this.loading = true;
+            let obj = JSON.parse(JSON.stringify(this.ruleForm));
+            let res = {};
+            if (this.id === "add") {
+              obj.passport = obj.password;
+              res = await asyncRequest.add(obj);
+            } else {
+              res = await asyncRequest.update(obj);
+            }
+            this.loading = false;
+            if (res.code === 0) {
+              let title = this.id === "add" ? "添加成功" : "修改成功";
+              this.$notify.success({
+                title,
+                message: ""
+              });
+              this.showModelThis = false;
+              // 刷新
+              this.$emit("refresh");
+            }
+          } else {
+            console.log("error submit!!");
+            return false;
+          }
+        });
+      }
+    },
+    watch: {
+      showModel: function(val) {
+        this.showModelThis = val;
+        if (val) {
+          this.initForm();
+        }
+      },
+      showModelThis(val) {
+        if (!val) {
+          this.$emit("cancel");
+        }
+      }
+    }
+  };
+  </script>
+
+   <style lang="scss" scoped>
+   .${compoenntName} {
+    
+   }
+   </style>
+   `;
+};

+ 300 - 0
scripts/page/indexPage.js

@@ -0,0 +1,300 @@
+module.exports = function (compoenntName) {
+  return `<template>
+    <div class="${compoenntName} pagePadding">
+      <el-row :gutter="10">
+        <el-col :span="24" style="padding:  0 0 18px 0">
+          <el-col :span="3">
+            <el-input
+            :size="searchSize"
+              v-model="parmValue.loginName"
+              :maxlength="40"
+              placeholder="账户"
+            ></el-input>
+          </el-col>
+          <el-col :span="3">
+            <el-input
+            :size="searchSize"
+              v-model="parmValue.fullName"
+              :maxlength="40"
+              placeholder="姓名"
+            ></el-input>
+          </el-col>
+          <el-col :span="3" style="width: 152px;">
+            <el-button
+              type="primary"
+              :size="searchSize"
+              @click="searchList"
+              icon="el-icon-search"
+            ></el-button>
+            <el-button type="warning" :size="searchSize" @click="restSearch">
+              重置
+            </el-button>
+          </el-col>
+          <el-col :span="3" style="width: 195px;float:right;">
+            <el-button
+              type="primary"
+              :size="searchSize"
+              style="float:right;margin-left:5px;"
+              @click="searchList"
+            >
+              刷新
+            </el-button>
+            <el-button
+              type="success"
+              :size="searchSize"
+              style="float:right;"
+              @click="openModal('add', false)"
+            >
+              添加
+            </el-button>
+          </el-col>
+        </el-col>
+      </el-row>
+      <el-table
+        :data="tableData"
+        stripe
+        v-loading="loading"
+        border
+        :size="size"
+        style="width: 100%;"
+      >
+        <el-table-column
+          prop="loginName"
+          label="账户"
+          show-overflow-tooltip
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="fullName"
+          label="姓名"
+          show-overflow-tooltip
+          align="center"
+        ></el-table-column>
+        <!-- <el-table-column
+          prop="userId"
+          label="所属用户"
+          show-overflow-tooltip
+          align="center"
+        ></el-table-column> -->
+        <el-table-column
+          prop="tel"
+          label="手机号"
+          show-overflow-tooltip
+          align="center"
+        ></el-table-column>
+        <el-table-column label="用户类型" show-overflow-tooltip align="center">
+          <template slot-scope="scope">
+            <el-tag type="success"   :size="tablebtnSize" v-if="scope.row.type === 1">运营人员</el-tag>
+            <el-tag type="warning"   :size="tablebtnSize" v-else>物业人员</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="状态" show-overflow-tooltip align="center">
+        <template slot-scope="scope">
+          <el-tooltip
+            class="item"
+            effect="dark"
+            :content="scope.row.status === '1' ? '改为禁用' : '改为启用'"
+            placement="top"
+          >
+            <el-tag
+              :size="tablebtnSize"
+              v-if="scope.row.status === '1'"
+              type="success"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+              >启用</el-tag
+            >
+            <el-tag
+              v-else
+              :size="tablebtnSize"
+              type="warning"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+              >禁用</el-tag
+            >
+          </el-tooltip>
+        </template>
+      </el-table-column>
+        <el-table-column
+          prop="createTime"
+          label="创建时间"
+          show-overflow-tooltip
+          align="center"
+        ></el-table-column>
+        <el-table-column label="是否超管" show-overflow-tooltip align="center">
+          <template slot-scope="scope">
+            <el-tag type="warning"   :size="tablebtnSize" v-if="scope.row.isAdmin === 0">否</el-tag>
+            <el-tag type="success"   :size="tablebtnSize" v-else>是</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" label="操作" align="center" width="250">
+          <template slot-scope="scope">
+            <el-button
+              type="success"
+              :size="tablebtnSize"
+              @click="openModal(scope.row.id, false)"
+            >
+              修改
+            </el-button>
+            <el-button
+              type="danger"
+              :size="tablebtnSize"
+              :disabled="scope.row.isAdmin === 1"
+              @click="deleteById(scope.row.id)"
+            >
+              删除
+            </el-button>
+            <el-button
+              type="warning"
+              :size="tablebtnSize"
+              @click="openModal(scope.row.id, true)"
+            >
+              详情
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div
+        class="Pagination"
+        style="text-align: right;margin-top: 10px;"
+        v-show="count > 0"
+      >
+      <el-pagination
+      :size="searchSize"
+       @size-change="handleSizeChange"
+       @current-change="handlePageChange"
+       :current-page="parmValue.page"
+       :page-sizes="[10, 15, 20, 30, 40]"
+       :page-size="parmValue.size"
+       layout="total, sizes, prev, pager, next, jumper"
+       :total="count"
+     ></el-pagination>
+      </div>
+      <add-edit
+        :showModel="showModel"
+        :id="modelId"
+        :isDetail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      ></add-edit>
+    </div>
+   </template>
+   <script>
+    import mixinPage from "@/mixins/elPaginationHandle";
+    import asyncRequest from "@/apis/service/${compoenntName}";
+    import addEdit from "./addEdit";
+    import { mapGetters } from "vuex";
+   export default {
+    name: '${compoenntName}',
+    computed: {
+      ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    },
+    data() {
+      return {
+        loading: true,
+        showModel: false,
+        isDetail: false,
+        modelId: 0,
+        parmValue: {
+          loginName: "", // 账户
+          fullName: "", // 姓名
+          type: 2, // 用户类型(1运营人员 2物业人员)
+          page: 1, // 页码
+          size: 10 // 每页显示条数
+        },
+        count: 0, // 总条数
+        tableData: []
+      };
+    },
+    mixins: [mixinPage],
+    mounted() {
+      this.searchList();
+    },
+    components: {
+      addEdit
+    },
+    methods: {
+      restSearch() {
+        this.parmValue = {
+          loginName: "", // 账户
+          fullName: "", // 姓名
+          type: 2, // 用户类型(1运营人员 2物业人员)
+          page: 1, // 页码
+          size: 10 // 每页显示条数
+        };
+        this.searchList();
+      },
+      openModal(id, isDetail) {
+        this.showModel = true;
+        this.modelId = id;
+        this.isDetail = isDetail;
+      },
+      async deleteById(id) {
+        await this.$confirm("确定要删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(async () => {
+            let res = await asyncRequest.delete({ id });
+            if (res.code === 0) {
+              this.$notify.success({
+                title: "删除成功",
+                message: ""
+              });
+              this.searchList();
+            }
+          })
+          .catch(() => {
+            console.log("取消");
+          });
+      },
+      async searchList() {
+        this.loading = true;
+        let res = await asyncRequest.list(this.parmValue);
+        if (res.code === 0 && res.data) {
+          this.tableData = res.data.list;
+          this.count = Number(res.data.count);
+        } else {
+          this.tableData = [];
+          this.count = 0;
+        }
+        this.loading = false;
+      },
+      async statusConfirm(id, status) {
+        console.log(id, status);
+        await this.$confirm(`确定要改为${ status === "1" ? "禁用" : "启用" } ?`, {
+          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.code === 0) {
+              this.loading = false;
+              this.$notify.success({
+                title: "状态修改成功!",
+                message: "",
+              });
+              await this.searchList();
+            } else {
+              this.loading = false;
+            }
+          })
+          .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/service/${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),
+    };
+     `;
+};

+ 18 - 0
scripts/page/servicePage.js

@@ -0,0 +1,18 @@
+module.exports = `// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "add", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "list", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "detail", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "update", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + "accountstatus", data, "post", params),
+};
+   `;

+ 27 - 0
scripts/template.js

@@ -0,0 +1,27 @@
+// template.js 文件,放置组件模板的代码
+module.exports = {
+  indexPage: require("./page/indexPage"),
+  addEditPage: require("./page/addEditPage"),
+  servicePage: require("./page/servicePage"),
+  // modelPage: require("./page/modelPage"),
+  vueTemplate: compoenntName => {
+    return `<template>
+    <div class="${compoenntName}">
+    ${compoenntName}组件
+    </div>
+   </template>
+   <script>
+   export default {
+    name: '${compoenntName}'
+   }
+   </script>
+   <style lang="scss" scoped>
+   .${compoenntName} {
+    
+   }
+   </style>
+   `;
+  },
+  entryTemplate: `import Main from './main.vue'
+   export default Main`
+};

+ 34 - 0
src/App.vue

@@ -0,0 +1,34 @@
+<template>
+  <div id="app" v-cloak>
+    <router-view />
+  </div>
+</template>
+
+<script>
+export default {
+  name: "App",
+  async created() {
+    // 获取登录信息
+    if (!(this.$route.path === "/" || this.$route.path === "login")) {
+      this.$store
+        .dispatch("user/getMenuList", this)
+        .then(async (res) => {
+          if (res === "noToken") {
+            await this.$store.dispatch("user/logout");
+            this.$router.push(`/login`);
+          } else if (res === "success") {
+            console.log("success");
+          } else {
+            
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    }
+  },
+};
+</script>
+<style lang="scss">
+@import "./assets/css/index.scss";
+</style>

+ 93 - 0
src/apis/axios.js

@@ -0,0 +1,93 @@
+// import axios from 'axios'
+import Router from '@/router/index'
+import urlConfig from '@/apis/url-config'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+const header = {
+  // "X-Requested-With": "XMLHttpRequest",
+  // "X-Frame-Options": "DENY", // 告诉浏览器不要(DENY)把这个网页放在iFrame内,通常的目的就是要帮助用户对抗点击劫持。
+  // "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
+}
+window.ajaxTimeout = 20000
+export default async(
+  url = '',
+  data = {},
+  type = 'GET',
+  params = {},
+  headers = header,
+  onUploadProgress
+) => {
+  type = type.toLowerCase()
+  const obj = {
+    method: type,
+    baseURL: '',
+    url: urlConfig.baseURL + url,
+    data,
+    params,
+    // // `onUploadProgress` 允许为上传处理进度事件
+    // onUploadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // // `onDownloadProgress` 允许为下载处理进度事件
+    // onDownloadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // `cancelToken` 指定用于取消请求的 cancel token
+    // (查看后面的 Cancellation 这节了解更多)
+    // cancelToken: new CancelToken(function (cancel) {
+    // }),
+    // processData: true, // 告诉axios不要去处理发送的数据(重要参数)
+    timeout: window.ajaxTimeout,
+    headers,
+    onUploadProgress
+  }
+  if (onUploadProgress && typeof onUploadProgress === 'function') {
+    obj.onUploadProgress = onUploadProgress
+  }
+  // return await axios(obj)
+  //   .then(response => {
+  //     return response;
+  //   })
+  //   .catch(res => {
+  //     return res;
+  //   });
+  // 请求拦截器
+  axios.interceptors.request.use(
+    config => {
+      if (!config.data.token) {
+        config.data.token = getToken()
+      }
+      return config
+    },
+    error => {
+      Toast.clear()
+      // 错误抛到业务代码
+      return Promise.reject(new Error('服务器异常,请联系管理员!'))
+    }
+  )
+  // 添加响应拦截器
+  axios.interceptors.response.use(
+    response => {
+      if (response.status === 200) {
+        const code = response.data.code
+        if (code == 101 || code == 102) {
+          removeToken()
+          // Router.replace({ name: `login` });
+          // Router.push({ path: "/login" });
+        }
+      }
+      return response
+    },
+    error => {
+      return Promise.reject(error.response.data)
+    }
+  )
+  return new Promise((resolve, reject) => {
+    axios(obj)
+      .then(response => {
+        resolve(response.data)
+      })
+      .catch(res => {
+        reject(res)
+      })
+  })
+}

+ 93 - 0
src/apis/service/axios.js

@@ -0,0 +1,93 @@
+// import axios from 'axios'
+import Router from '@/router/index'
+import urlConfig from '@/apis/url-config'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+const header = {
+  // "X-Requested-With": "XMLHttpRequest",
+  // "X-Frame-Options": "DENY", // 告诉浏览器不要(DENY)把这个网页放在iFrame内,通常的目的就是要帮助用户对抗点击劫持。
+  // "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
+}
+window.ajaxTimeout = 20000
+export default async(
+  url = '',
+  data = {},
+  type = 'GET',
+  params = {},
+  headers = header,
+  onUploadProgress
+) => {
+  type = type.toLowerCase()
+  const obj = {
+    method: type,
+    baseURL: '',
+    url: urlConfig.baseURL + url,
+    data,
+    params,
+    // // `onUploadProgress` 允许为上传处理进度事件
+    // onUploadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // // `onDownloadProgress` 允许为下载处理进度事件
+    // onDownloadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // `cancelToken` 指定用于取消请求的 cancel token
+    // (查看后面的 Cancellation 这节了解更多)
+    // cancelToken: new CancelToken(function (cancel) {
+    // }),
+    // processData: true, // 告诉axios不要去处理发送的数据(重要参数)
+    timeout: window.ajaxTimeout,
+    headers,
+    onUploadProgress
+  }
+  if (onUploadProgress && typeof onUploadProgress === 'function') {
+    obj.onUploadProgress = onUploadProgress
+  }
+  // return await axios(obj)
+  //   .then(response => {
+  //     return response;
+  //   })
+  //   .catch(res => {
+  //     return res;
+  //   });
+  // 请求拦截器
+  axios.interceptors.request.use(
+    config => {
+      if (!config.data.token) {
+        config.data.token = getToken()
+      }
+      return config
+    },
+    error => {
+      Toast.clear()
+      // 错误抛到业务代码
+      return Promise.reject(new Error('服务器异常,请联系管理员!'))
+    }
+  )
+  // 添加响应拦截器
+  axios.interceptors.response.use(
+    response => {
+      if (response.status === 200) {
+        const code = response.data.code
+        if (code == 404 || code == 405 || code == 10011) {
+          removeToken()
+          Router.replace({ name: `login` })
+          // Router.push({ path: "/login" });
+        }
+      }
+      return response
+    },
+    error => {
+      return Promise.reject(error.response.data)
+    }
+  )
+  return new Promise((resolve, reject) => {
+    axios(obj)
+      .then(response => {
+        resolve(response.data)
+      })
+      .catch(res => {
+        reject(res)
+      })
+  })
+}

+ 25 - 0
src/apis/service/client/business/index.js

@@ -0,0 +1,25 @@
+// 企业客户/供应商账号相关
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "customeradd", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "gooddel", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "customerlist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "customerinfo", data, "post", params),
+  // 更改
+  update: (data, params) => http(api + "customersave", data, "post", params),
+  // 更新状态
+  status: (data, params) => http(api + "customerstatus", data, "post", params),
+  // 提交审核申请
+  again: (data, params) => http(api + 'customeragain', data, 'post', params),
+  // 审核人提交审核结果
+  exam: (data, params) => http(api + 'customerexam', data, 'post', params),
+  // 获取全部企业
+  companyall: (data, params) => http(api + "companyall", data, "post", params),
+
+
+};

+ 35 - 0
src/apis/service/client/company/index.js

@@ -0,0 +1,35 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "companyadd", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "companylist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "companyinfo", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "companysave", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + 'companystatus', data, 'post', params),
+  // 提交审核申请
+  again: (data, params) => http(api + 'companyagain', data, 'post', params),
+  // 审核人提交审核结果
+  exam: (data, params) => http(api + 'companyexam', data, 'post', params),
+  // 企业财务信息
+  bank: (data, params) => http(api + 'companybank', data, 'post', params),
+  // 企业财务录入
+  attrAdd: (data, params) => http(api + 'companyattradd', data, 'post', params),
+  // 省级列表
+  pList: (data, params) => http('api/getprovince', data, 'post', params),
+  // 市级列表
+  cList: (data, params) => http('api/getcity', data, 'post', params),
+  // 县区列表
+  aList: (data, params) => http('api/getarea', data, 'post', params),
+  // 银行卡验证
+  getbank: (data, params) => http('api/getbank', data, 'post', params),
+  
+
+};

+ 21 - 0
src/apis/service/goodStore/brand/index.js

@@ -0,0 +1,21 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "brandadd", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "brandlist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "brandinfo", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "brandsave", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + 'brandstatus', data, 'post', params),
+  // 提交审核申请
+  again: (data, params) => http(api + 'brandagain', data, 'post', params),
+  // 审核人提交审核结果
+  exam: (data, params) => http(api + 'brandexam', data, 'post', params),
+};

+ 30 - 0
src/apis/service/goodStore/goods/index.js

@@ -0,0 +1,30 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "goodadd", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "gooddel", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "goodlist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "goodinfo", data, "post", params),
+  // 更改
+  update: (data, params) => http(api + "goodsave", data, "post", params),
+  // 更新状态
+  status: (data, params) => http(api + "goodstatus", data, "post", params),
+  // 复制
+  copy: (data, params) => http(api + "goodcopy", data, "post", params),
+  // 获取全部分类
+  catAll: (data, params) => http(api + "catAll", data, "post", params),
+  // 获取全部品牌
+  brandAll: (data, params) => http(api + "brandall", data, "post", params),
+  // 获取全部供应商账号
+  supplierAll: (data, params) => http(api + "supplierall", data, "post", params),
+  // 商品种类ID换取规格值
+  specByCat: (data, params) => http(api + "SpecByCat", data, "post", params),
+  // 规格属性值新建
+  specinfoadd: (data, params) => http(api + "specinfoadd", data, "post", params),
+
+};

+ 30 - 0
src/apis/service/goodStore/sort/index.js

@@ -0,0 +1,30 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "catadd", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "goodcat", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "catinfo", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "catsave", data, "post", params),
+  // 审核
+  check: (data, params) => http(api + "catexam", data, "post", params),
+  // 获取全部规格
+  specAll: (data, params) => http(api + "specall", data, "post", params),
+  // 获取全部分类
+  catAll: (data, params) => http(api + "catAll", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + 'catstatus', data, 'post', params),
+  // 提交审核申请
+  again: (data, params) => http(api + 'catagain', data, 'post', params),
+  // 审核人提交审核结果
+  exam: (data, params) => http(api + 'catexam', data, 'post', params),
+  // 分类利率设置
+  catarateadd: (data, params) => http(api + 'catarateadd', data, 'post', params),
+
+};

+ 23 - 0
src/apis/service/goodStore/specs/index.js

@@ -0,0 +1,23 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "specadd", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "speclist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "specinfo", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "specsave", data, "post", params),
+  // 审核
+  check: (data, params) => http(api + "specex", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + 'specstatus', data, 'post', params),
+  // 提交审核申请
+  again: (data, params) => http(api + 'specagain', data, 'post', params),
+  // 审核人提交审核结果
+  exam: (data, params) => http(api + 'specex', data, 'post', params),
+};

+ 21 - 0
src/apis/service/interest/account/index.js

@@ -0,0 +1,21 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 添加
+  add: (data, params) => http(api + 'accountadd', data, 'post', params),
+  // 删除
+  delete: (data, params) => http(api + 'delete', data, 'post', params),
+  // 分页查询
+  list: (data, params) => http(api + 'accountlist', data, 'post', params),
+  // 详情
+  detail: (data, params) => http(api + 'accountinfo', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'accountedit', data, 'post', params),
+  // 修改密码
+  setpwd: (data, params) => http(api + 'accountsetpwd', data, 'post', params),
+  // 修改状态
+  status: (data, params) => http(api + 'accountstatus', data, 'post', params),
+  // 拉取角色列表
+  getRole: (data, params) => http(api + 'roleall', data, 'post', params)
+}

+ 13 - 0
src/apis/service/interest/action/index.js

@@ -0,0 +1,13 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 详情
+  detail: (data, params) => http(api + 'roleinfo', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'rolesave', data, 'post', params),
+  // 拉取角色列表
+  getRole: (data, params) => http(api + 'roleall', data, 'post', params),
+  // 功能权限列表
+  actionList: (data, params) => http(api + 'actionlist', data, 'post', params)
+}

+ 26 - 0
src/apis/service/interest/dataShare/index.js

@@ -0,0 +1,26 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 添加
+  add: (data, params) => http(api + 'shareadd', data, 'post', params),
+  // 删除
+  delete: (data, params) => http(api + 'delete', data, 'post', params),
+  // 分页查询
+  list: (data, params) => http(api + 'sharelist', data, 'post', params),
+  // 详情
+  detail: (data, params) => http(api + 'shareinfo', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'sharesave', data, 'post', params),
+  // 修改状态
+  status: (data, params) => http(api + 'sharestatus', data, 'post', params),
+  // 获取全部账户列表
+  accountall: (data, params) => http(api + 'accountall', data, 'post', params),
+  // 获取全部账户列表
+  accountall: (data, params) => http(api + 'accountall', data, 'post', params),
+  // 获取全部用户组
+  groupall: (data, params) => http(api + 'groupall', data, 'post', params),
+  // 功能权限列表
+  actionList: (data, params) => http(api + 'actionlist', data, 'post', params)
+
+}

+ 20 - 0
src/apis/service/interest/group/index.js

@@ -0,0 +1,20 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 添加
+  add: (data, params) => http(api + 'groupadd', data, 'post', params),
+  // 删除
+  delete: (data, params) => http(api + 'delete', data, 'post', params),
+  // 分页查询
+  list: (data, params) => http(api + 'grouplist', data, 'post', params),
+  // 详情
+  detail: (data, params) => http(api + 'groupinfo', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'groupsave', data, 'post', params),
+  // 修改状态
+  status: (data, params) => http(api + 'groupstatus', data, 'post', params),
+  // 获取全部账户列表
+  accountall: (data, params) => http(api + 'accountall', data, 'post', params)
+
+}

+ 22 - 0
src/apis/service/interest/role/index.js

@@ -0,0 +1,22 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 添加
+  add: (data, params) => http(api + 'roleadd', data, 'post', params),
+  // 删除
+  delete: (data, params) => http(api + 'rolestatus', data, 'post', params),
+  // 查询列表
+  list: (data, params) => http(api + 'rolelist', data, 'post', params),
+  // 详情
+  detail: (data, params) => http(api + 'roleinfo', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'rolesave', data, 'post', params),
+
+  // 修改状态
+  status: (data, params) => http(api + 'rolestatus', data, 'post', params),
+  // // 数据权限列表
+  // dataList: (data, params) => http(api + "actiondata", data, "post", params),
+  // 功能权限列表
+  actionList: (data, params) => http(api + 'actionlist', data, 'post', params)
+}

+ 22 - 0
src/apis/service/system/menu/index.js

@@ -0,0 +1,22 @@
+// 系统权限-菜单管理-贾增超
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 分页查询
+  list: (data, params) => http(api + 'menulist', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'menusave', data, 'post', params),
+  // 菜单状态
+  menustatus: (data, params) => http(api + 'menustatus', data, 'post', params),
+
+  // 按钮
+  // 列表
+  actionList: (data, params) => http(api + 'menuaction', data, 'post', params),
+  // 添加
+  actionadd: (data, params) => http(api + 'actionadd', data, 'post', params),
+  // 更新
+  actionedit: (data, params) => http(api + 'actionedit', data, 'post', params),
+  // 状态
+  actionstatus: (data, params) =>
+    http(api + 'actionstatus', data, 'post', params)
+}

+ 15 - 0
src/apis/service/system/oplog/index.js

@@ -0,0 +1,15 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // // 添加
+  // add: (data, params) => http(api + "add", data, "post", params),
+  // // 删除
+  // delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + 'syslog', data, 'post', params)
+  // // 详情
+  // detail: (data, params) => http(api + "detail", data, "post", params),
+  // // 更新
+  // update: (data, params) => http(api + "update", data, "post", params)
+}

+ 11 - 0
src/apis/service/system/parameter/index.js

@@ -0,0 +1,11 @@
+// 业务参数
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 详情
+  detail: (data, params) => http(api + 'system', data, 'post', params),
+  // 列表
+  list: (data, params) => http(api + 'system', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'setconf', data, 'post', params)
+}

+ 15 - 0
src/apis/service/system/talent/index.js

@@ -0,0 +1,15 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = '/apis/ditpcs/company/sysManager/'
+export default {
+  // 添加
+  add: (data, params) => http(api + 'add', data, 'post', params),
+  // 删除
+  delete: (data, params) => http(api + 'delete', data, 'post', params),
+  // 分页查询
+  list: (data, params) => http(api + 'list', data, 'post', params),
+  // 详情
+  detail: (data, params) => http(api + 'detail', data, 'post', params),
+  // 更新
+  update: (data, params) => http(api + 'update', data, 'post', params)
+}

+ 7 - 0
src/apis/service/system/updates/index.js

@@ -0,0 +1,7 @@
+// 版本日志
+import http from '@/apis/axios'
+const api = 'admin/'
+export default {
+  // 分页查询
+  list: (data, params) => http(api + 'version', data, 'post', params)
+}

+ 19 - 0
src/apis/service/user/index.js

@@ -0,0 +1,19 @@
+import http from '@/apis/axios'
+
+export default {
+  // 获取验证码
+  verfiy: (data, params) => http(`admin/verfiy`, data, 'post', params),
+  // 密码重置
+  resetpwd: (data, params) => http(`admin/resetpwd`, data, 'post', params),
+  // 手机号更换
+  resetmobile: (data, params) =>
+    http(`admin/resetmobile`, data, 'post', params),
+  // 密码修改
+  setpwd: (data, params) => http(`admin/setpwd`, data, 'post', params),
+  // 获取导航列表
+  list: (data, params) => http(`admin/menu`, data, 'post', params),
+  // 获取个人信息
+  detail: (data, params) => http(`admin/userinfo`, data, 'post', params),
+  // 获取最新版本号
+  version: (data, params) => http(`admin/versioninfo`, data, 'post', params),
+}

+ 4 - 0
src/apis/url-config.js

@@ -0,0 +1,4 @@
+import { api } from '@/config'
+export default {
+  baseURL: api.baseApi
+}

+ 97 - 0
src/apis/user/axios.js

@@ -0,0 +1,97 @@
+// import axios from 'axios'
+import Router from '@/router/index'
+import urlConfig from '@/apis/url-config'
+import { getToken, setToken, removeToken } from '@/utils/auth'
+const header = {
+  // "X-Requested-With": "XMLHttpRequest",
+  // "X-Frame-Options": "DENY", // 告诉浏览器不要(DENY)把这个网页放在iFrame内,通常的目的就是要帮助用户对抗点击劫持。
+  // "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
+}
+window.ajaxTimeout = 20000
+export default async(
+  url = '',
+  data = {},
+  type = 'GET',
+  params = {},
+  headers = header,
+  onUploadProgress
+) => {
+  type = url.method.toLowerCase()
+  // console.log(url)
+  const obj = {
+    method: type,
+    baseURL: '',
+    url: urlConfig.baseURL + url.url,
+    data: url.data,
+    params,
+    // // `onUploadProgress` 允许为上传处理进度事件
+    // onUploadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // // `onDownloadProgress` 允许为下载处理进度事件
+    // onDownloadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // `cancelToken` 指定用于取消请求的 cancel token
+    // (查看后面的 Cancellation 这节了解更多)
+    // cancelToken: new CancelToken(function (cancel) {
+    // }),
+    // processData: true, // 告诉axios不要去处理发送的数据(重要参数)
+    timeout: window.ajaxTimeout,
+    headers,
+    onUploadProgress
+  }
+  if (onUploadProgress && typeof onUploadProgress === 'function') {
+    obj.onUploadProgress = onUploadProgress
+  }
+  // return await axios(obj)
+  //   .then(response => {
+  //     return response;
+  //   })
+  //   .catch(res => {
+  //     return res;
+  //   });
+  // 请求拦截器
+  axios.interceptors.request.use(
+    config => {
+      if (!config.data.token) {
+        config.data.token = getToken()
+      }
+      return config
+    },
+    error => {
+      Toast.clear()
+      // 错误抛到业务代码
+      return Promise.reject(new Error('服务器异常,请联系管理员!'))
+    }
+  )
+  // 添加响应拦截器
+  axios.interceptors.response.use(
+    response => {
+      if (response.status === 200) {
+        const code = response.data.code
+        if (code == 404 || code == 405 || code == 10011) {
+          removeToken()
+          // localStorage.removeItem("token");
+          // localStorage.removeItem("is_perfect");
+          // localStorage.removeItem("my_phone");
+          Router.replace({ name: `login` })
+          // Router.push({ path: "/login" });
+        }
+      }
+      return response
+    },
+    error => {
+      return Promise.reject(error.response.data)
+    }
+  )
+  return new Promise((resolve, reject) => {
+    axios(obj)
+      .then(response => {
+        resolve(response.data)
+      })
+      .catch(res => {
+        reject(res)
+      })
+  })
+}

+ 29 - 0
src/apis/user/index.js

@@ -0,0 +1,29 @@
+import http from '@/apis/user/axios'
+
+// 登录
+export function login(data) {
+  return http({
+    url: `admin/login`,
+    method: 'post',
+    data
+  })
+}
+// 获取个人信息
+export function userinfo(data) {
+  return http({
+    url: `admin/userinfo`,
+    method: 'post',
+    data
+  })
+}
+// 获取导航列表
+export function menuList(data) {
+  return http({
+    url: `admin/menu`,
+    method: 'post',
+    data
+  })
+}
+
+
+

二进制
src/assets/401_images/401.gif


二进制
src/assets/404_images/404.png


二进制
src/assets/404_images/404_cloud.png


+ 49 - 0
src/assets/css/btn.scss

@@ -0,0 +1,49 @@
+// 点击超链接 闪烁效果
+.text-white {
+  cursor: pointer;
+}
+.text-white:active {
+  color: #000;
+  cursor: pointer;
+  opacity: 0.8; // 这里重要,就是通过这个透明度来设置
+}
+// 点击按钮白光闪过
+.btn-white {
+  cursor: pointer;
+}
+.btn-white:active {
+  color: #fff;
+  border-radius: 5px;
+  cursor: pointer;
+  // background: #000;
+  opacity: 0.5; // 这里重要,就是通过这个透明度来设置
+}
+// 水波纹特效
+.btn-ripple {
+  position: relative;
+  cursor: pointer;
+  overflow: hidden;
+}
+
+.btn-ripple:after {
+  content: "";
+  background: rgba(255, 255, 255, 0.3);
+  display: block;
+  position: absolute;
+  border-radius: 50%;
+  padding-top: 240%;
+  padding-left: 240%;
+  margin-top: -160%;
+  margin-left: -50%;
+  opacity: 0;
+  transition: all 0.8s;
+}
+
+.btn-ripple:active:after {
+  padding-top: 0;
+  padding-left: 0;
+  margin-top: 0;
+  margin-left: 0;
+  opacity: 1;
+  transition: 0s;
+}

+ 220 - 0
src/assets/css/common.scss

@@ -0,0 +1,220 @@
+body,
+div,
+span,
+header,
+footer,
+nav,
+section,
+aside,
+article,
+ul,
+dl,
+dt,
+dd,
+li,
+a,
+p,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+i,
+b,
+textarea,
+button,
+input,
+select,
+figure,
+figcaption {
+  padding: 0;
+  margin: 0;
+  list-style: none;
+  font-style: normal;
+  text-decoration: none;
+  border: none;
+  font-weight: 500;
+  font-family: "Microsoft Yahei", sans-serif;
+  -webkit-tap-highlight-color: transparent;
+  -webkit-font-smoothing: antialiased;
+
+  &:focus {
+    outline: none;
+  }
+}
+
+ul,
+li {
+  margin: 0;
+  padding: 0;
+  list-style: none;
+}
+ul {
+  list-style-type: none;
+  width: auto;
+  margin: 0 auto;
+}
+li {
+  display: block;
+}
+
+input[type="button"],
+input[type="submit"],
+input[type="search"],
+input[type="reset"] {
+  -webkit-appearance: none;
+}
+
+textarea {
+  -webkit-appearance: none;
+}
+
+html,
+body {
+  height: 100%;
+  width: 100%;
+  background-color: #fff;
+}
+
+.fillcontain {
+  height: 100%;
+  width: 100%;
+}
+
+.clear:after {
+  content: "";
+  display: block;
+  clear: both;
+}
+
+.clear {
+  zoom: 1;
+}
+
+.back_img {
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+
+.margin {
+  margin: 0 auto;
+}
+
+.left {
+  float: left;
+}
+
+.right {
+  float: right;
+}
+
+.hide {
+  display: none;
+}
+
+.show {
+  display: block;
+}
+
+.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.pointer {
+  cursor: pointer;
+}
+
+input::-webkit-input-placeholder,
+textarea::-webkit-input-placeholder {
+  color: #666;
+  font-size: 16px;
+}
+
+input:-moz-placeholder,
+textarea:-moz-placeholder {
+  color: #666;
+  font-size: 16px;
+}
+
+input::-moz-placeholder,
+textarea::-moz-placeholder {
+  color: #666;
+  font-size: 16px;
+}
+
+input:-ms-input-placeholder,
+textarea:-ms-input-placeholder {
+  color: #666;
+  font-size: 16px;
+}
+
+/**图片抖动**/
+.shake {
+  cursor: pointer;
+
+  &:hover {
+    img {
+      animation: tada 0.6s 0.2s ease both;
+    }
+  }
+}
+.shake-flipInY {
+  cursor: pointer;
+
+  &:hover {
+    img {
+      animation: flipInY 0.6s 0.2s ease both;
+    }
+  }
+}
+
+@keyframes tada {
+  0% {
+    transform: scale(1);
+  }
+
+  10%,
+  20% {
+    transform: scale(0.9) rotate(-3deg);
+  }
+
+  30%,
+  50%,
+  70%,
+  90% {
+    transform: scale(1.1) rotate(3deg);
+  }
+
+  40%,
+  60%,
+  80% {
+    transform: scale(1.1) rotate(-3deg);
+  }
+
+  100% {
+    transform: scale(1) rotate(0);
+  }
+}
+
+@keyframes flipInY {
+  0% {
+    transform: perspective(400px) rotateY(90deg);
+    opacity: 0;
+  }
+
+  40% {
+    transform: perspective(400px) rotateY(-10deg);
+  }
+
+  70% {
+    transform: perspective(400px) rotateY(10deg);
+  }
+
+  100% {
+    transform: perspective(400px) rotateY(0deg);
+    opacity: 1;
+  }
+}

+ 38 - 0
src/assets/css/index.scss

@@ -0,0 +1,38 @@
+@import "./common.scss";
+@import "./btn.scss";
+// // @import "./scrollbar.scss";
+// @import "./scss/index-ic.css";
+// @import "./scss/iconFont.css";
+
+#app {
+  height: 100%;
+  width: 100%;
+  background-color: #fff;
+}
+.box-home {
+  width: 1196px;
+  margin: 0 auto;
+}
+.scale-big {
+  &:hover {
+    transition: all 0.3s ease-in-out;
+    transform: scale(1.05);
+  }
+}
+.scale-big-img {
+  &:hover {
+    img {
+      transition: all 0.6s ease-in-out;
+      transform: scale(1.05);
+    }
+  }
+}
+
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  -webkit-appearance: none;
+  margin: 0;
+}

+ 71 - 0
src/assets/css/mixin.scss

@@ -0,0 +1,71 @@
+$blue: #3190e8;
+$bc: #e4e4e4;
+$fc: #fff;
+
+// 背景图片地址和大小
+@mixin bis($url) {
+  background-image: url($url);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+
+//定位全屏
+@mixin allcover {
+  position: absolute;
+  top: 0;
+  right: 0;
+}
+
+//transform上下左右居中
+@mixin ctt {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+}
+//定位上下左右居中
+@mixin ctp($width, $height) {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  margin-top: -$height / 2;
+  margin-left: -$width / 2;
+}
+
+//定位上下居中
+@mixin tb {
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+}
+
+//定位左右居中
+@mixin lr {
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+}
+
+//宽高
+@mixin wh($width, $height) {
+  width: $width;
+  height: $height;
+}
+
+//字体大小、行高、字体
+@mixin ft($size, $line-height) {
+  font-size: $size;
+  line-height: $line-height;
+}
+
+//字体大小,颜色
+@mixin sc($size, $color) {
+  font-size: $size;
+  color: $color;
+}
+
+//flex 布局和 子元素 对其方式
+@mixin fj($type: space-between) {
+  display: flex;
+  justify-content: $type;
+}

+ 24 - 0
src/assets/css/scrollbar.less

@@ -0,0 +1,24 @@
+/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
+// ::-webkit-scrollbar {
+//   // width: 10px;
+//   // height: 10px;
+//   width: 0px;
+//   height: 0px;
+//   background-color: #f5f5f5;
+// }
+
+// /*定义滚动条轨道 内阴影+圆角*/
+// ::-webkit-scrollbar-track {
+//   -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0);
+//   // border-radius: 10px;
+//   border-radius: 0px;
+//   background-color: #f5f5f5;
+// }
+
+// /*定义滑块 内阴影+圆角*/
+// ::-webkit-scrollbar-thumb {
+//   // border-radius: 10px;
+//   border-radius: 0px;
+//   -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+//   background-color: #5555553b;
+// }

+ 43 - 0
src/assets/css/scss/base.scss

@@ -0,0 +1,43 @@
+body,
+html {
+  line-height: 1;
+  font-weight: 200;
+  font-family: "PingFang SC", "STHeitiSC-Light", "Helvetica-Light", arial,
+    sans-serif;
+}
+
+.clearfix {
+  display: inline-block;
+
+  &::after {
+    display: block;
+    content: ".";
+    height: 0;
+    line-height: 0;
+    clear: both;
+    visibility: hidden;
+  }
+}
+$media: screen;
+$feature-webkit: -webkit-min-device-pixel-ratio; //设备像素比
+$feature: min-device-pixel-ratio; //设备像素比
+$value15: 1.5;
+$value2: 2; // 为了实现手机上的1像素做准备
+// 实现不同缩放比手机上,做正确的缩放根据Y轴
+// 根据设备的最小DPI去指定缩放的比例scaleY(0.7)或者0.5倍,这样就能实现真正的一像素
+@media #{$media} and ($feature-webkit: $value15),($feature: $value15) {
+  .border-1px {
+    &::after {
+      -webkit-transform: scaleY(0.7);
+      transform: scaleY(0.7);
+    }
+  }
+}
+@media #{$media} and ($feature-webkit: $value2),($feature: $value2) {
+  .border-1px {
+    &::after {
+      -webkit-transform: scaleY(0.5);
+      transform: scaleY(0.5);
+    }
+  }
+}

二进制
src/assets/css/scss/fonts/element-icons.woff


文件差异内容过多而无法显示
+ 3 - 0
src/assets/css/scss/iconFont.css


+ 337 - 0
src/assets/css/scss/index-ic.css

@@ -0,0 +1,337 @@
+@charset "UTF-8";
+@font-face {
+	font-family: element-icons;
+	src: url(./fonts/element-icons.woff) format("woff");
+	font-weight: 400;
+	font-style: normal
+}
+
+[class*=" el-icon-"],
+[class^=el-icon-] {
+	font-family: element-icons!important;
+	speak: none;
+	font-style: normal;
+	font-weight: 400;
+	font-variant: normal;
+	text-transform: none;
+	line-height: 1;
+	vertical-align: baseline;
+	display: inline-block;
+	-webkit-font-smoothing: antialiased;
+	-moz-osx-font-smoothing: grayscale
+}
+
+.el-icon-info:before {
+	content: "\e61a"
+}
+
+.el-icon-error:before {
+	content: "\e62c"
+}
+
+.el-icon-success:before {
+	content: "\e62d"
+}
+
+.el-icon-warning:before {
+	content: "\e62e"
+}
+
+.el-icon-question:before {
+	content: "\e634"
+}
+
+.el-icon-back:before {
+	content: "\e606"
+}
+
+.el-icon-arrow-left:before {
+	content: "\e600"
+}
+
+.el-icon-arrow-down:before {
+	content: "\e603"
+}
+
+.el-icon-arrow-right:before {
+	content: "\e604"
+}
+
+.el-icon-arrow-up:before {
+	content: "\e605"
+}
+
+.el-icon-caret-left:before {
+	content: "\e60a"
+}
+
+.el-icon-caret-bottom:before {
+	content: "\e60b"
+}
+
+.el-icon-caret-top:before {
+	content: "\e60c"
+}
+
+.el-icon-caret-right:before {
+	content: "\e60e"
+}
+
+.el-icon-d-arrow-left:before {
+	content: "\e610"
+}
+
+.el-icon-d-arrow-right:before {
+	content: "\e613"
+}
+
+.el-icon-minus:before {
+	content: "\e621"
+}
+
+.el-icon-plus:before {
+	content: "\e62b"
+}
+
+.el-icon-remove:before {
+	content: "\e635"
+}
+
+.el-icon-circle-plus:before {
+	content: "\e601"
+}
+
+.el-icon-remove-outline:before {
+	content: "\e63c"
+}
+
+.el-icon-circle-plus-outline:before {
+	content: "\e602"
+}
+
+.el-icon-close:before {
+	content: "\e60f"
+}
+
+.el-icon-check:before {
+	content: "\e611"
+}
+
+.el-icon-circle-close:before {
+	content: "\e607"
+}
+
+.el-icon-circle-check:before {
+	content: "\e639"
+}
+
+.el-icon-circle-close-outline:before {
+	content: "\e609"
+}
+
+.el-icon-circle-check-outline:before {
+	content: "\e63e"
+}
+
+.el-icon-zoom-out:before {
+	content: "\e645"
+}
+
+.el-icon-zoom-in:before {
+	content: "\e641"
+}
+
+.el-icon-d-caret:before {
+	content: "\e615"
+}
+
+.el-icon-sort:before {
+	content: "\e640"
+}
+
+.el-icon-sort-down:before {
+	content: "\e630"
+}
+
+.el-icon-sort-up:before {
+	content: "\e631"
+}
+
+.el-icon-tickets:before {
+	content: "\e63f"
+}
+
+.el-icon-document:before {
+	content: "\e614"
+}
+
+.el-icon-goods:before {
+	content: "\e618"
+}
+
+.el-icon-sold-out:before {
+	content: "\e63b"
+}
+
+.el-icon-news:before {
+	content: "\e625"
+}
+
+.el-icon-message:before {
+	content: "\e61b"
+}
+
+.el-icon-date:before {
+	content: "\e608"
+}
+
+.el-icon-printer:before {
+	content: "\e62f"
+}
+
+.el-icon-time:before {
+	content: "\e642"
+}
+
+.el-icon-bell:before {
+	content: "\e622"
+}
+
+.el-icon-mobile-phone:before {
+	content: "\e624"
+}
+
+.el-icon-service:before {
+	content: "\e63a"
+}
+
+.el-icon-view:before {
+	content: "\e643"
+}
+
+.el-icon-menu:before {
+	content: "\e620"
+}
+
+.el-icon-more:before {
+	content: "\e646"
+}
+
+.el-icon-more-outline:before {
+	content: "\e626"
+}
+
+.el-icon-star-on:before {
+	content: "\e637"
+}
+
+.el-icon-star-off:before {
+	content: "\e63d"
+}
+
+.el-icon-location:before {
+	content: "\e61d"
+}
+
+.el-icon-location-outline:before {
+	content: "\e61f"
+}
+
+.el-icon-phone:before {
+	content: "\e627"
+}
+
+.el-icon-phone-outline:before {
+	content: "\e628"
+}
+
+.el-icon-picture:before {
+	content: "\e629"
+}
+
+.el-icon-picture-outline:before {
+	content: "\e62a"
+}
+
+.el-icon-delete:before {
+	content: "\e612"
+}
+
+.el-icon-search:before {
+	content: "\e619"
+}
+
+.el-icon-edit:before {
+	content: "\e61c"
+}
+
+.el-icon-edit-outline:before {
+	content: "\e616"
+}
+
+.el-icon-rank:before {
+	content: "\e632"
+}
+
+.el-icon-refresh:before {
+	content: "\e633"
+}
+
+.el-icon-share:before {
+	content: "\e636"
+}
+
+.el-icon-setting:before {
+	content: "\e638"
+}
+
+.el-icon-upload:before {
+	content: "\e60d"
+}
+
+.el-icon-upload2:before {
+	content: "\e644"
+}
+
+.el-icon-download:before {
+	content: "\e617"
+}
+
+.el-icon-loading:before {
+	content: "\e61e"
+}
+
+.el-icon-loading {
+	-webkit-animation: rotating 2s linear infinite;
+	animation: rotating 2s linear infinite
+}
+
+.el-icon--right {
+	margin-left: 5px
+}
+
+.el-icon--left {
+	margin-right: 5px
+}
+
+@-webkit-keyframes rotating {
+	0% {
+		-webkit-transform: rotateZ(0);
+		transform: rotateZ(0)
+	}
+	100% {
+		-webkit-transform: rotateZ(360deg);
+		transform: rotateZ(360deg)
+	}
+}
+
+@keyframes rotating {
+	0% {
+		-webkit-transform: rotateZ(0);
+		transform: rotateZ(0)
+	}
+	100% {
+		-webkit-transform: rotateZ(360deg);
+		transform: rotateZ(360deg)
+	}
+}

+ 8 - 0
src/assets/css/scss/index.scss

@@ -0,0 +1,8 @@
+@import "./base.scss";
+@import "./mixin.scss";
+html,
+body,
+.app {
+  width: 100%;
+  height: 100%;
+}

+ 45 - 0
src/assets/css/scss/mixin.scss

@@ -0,0 +1,45 @@
+// 为了实现手机上的1像素下边框
+// 如果是上边框可以是before,或者把bottom直接改成top
+@mixin border-1px($color) {
+  position: relative;
+
+  &:after {
+    display: block;
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    border-top: 1px solid $color;
+    content: " ";
+  }
+}
+$feature-webkit: -webkit-min-device-pixel-ratio; //设备像素比
+$feature: min-device-pixel-ratio; //设备像素比
+$value3: 3;
+@mixin bg-image($url) {
+  background-image: url($url+"@2x.png");
+  @media ($feature: $value3), ($feature-webkit: $value3) {
+    background-image: url($url+"@3x.png");
+  }
+}
+@mixin three-line($color: #000) {
+  margin-top: 15px;
+  border-top: 2px solid $color;
+  width: 5.3%;
+  height: 16px;
+  position: relative;
+  &:before {
+    position: absolute;
+    top: -8px;
+    content: " ";
+    border-top: 2px solid $color;
+    width: 80%;
+  }
+  &:after {
+    position: absolute;
+    top: 5px;
+    content: " ";
+    border-top: 2px solid $color;
+    width: 60%;
+  }
+}

+ 4 - 0
src/assets/css/scss/pxtorem.scss

@@ -0,0 +1,4 @@
+$baseFontSize: 100px !default;
+@function pxtorem($px) {
+  @return $px/$baseFontSize * 1rem;
+}

二进制
src/assets/custom-theme/fonts/element-icons.ttf


二进制
src/assets/custom-theme/fonts/element-icons.woff


文件差异内容过多而无法显示
+ 0 - 0
src/assets/custom-theme/index.css


+ 25 - 0
src/assets/icon-font/iconfont.css

@@ -0,0 +1,25 @@
+@font-face {font-family: "iconfont";
+  src: url('iconfont.eot?t=1565160368550'); /* IE9 */
+  src: url('iconfont.eot?t=1565160368550#iefix') format('embedded-opentype'), /* IE6-IE8 */
+  url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAANUAAsAAAAAByQAAAMIAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCfAqCFIIkATYCJAMMCwgABCAFhG0HOhtkBsi+QDw2JxWVhBKVFukepjkT9iz2vr6/fAq8RxAPz4+9O/e9O9WkGj15Fk3LQ/NCJ41QaVASVSzTSJ7E2p//a/4CvASvALwTjbaVddq9o71hlfDegDawAW//1zQFGqAwEaokh6yK8jD/9/c4lxuw3PPkdI3ZegseIJGz/1WKn5AESUiaSApHHzJ2/2uCAT/S0Iz7q0i8eCKrBLgEQJauMPX/uZzeKPH5KSuXuSYd9aI4DiigvbFNViAJeovsrkAs8jyBdmME8ODibgRNyZwWiIdGO9DM+KXkU61Cc8XaFI9p0loe6Q3gNvh+fKdFk6KpMuceX5/7cPTJ/Tfy4spDEIxnBb+JihVAEueV9kOVKL4Ca1dZq6YAKXljibz/PCFRiGZmcSdYIInCJw6Toid+iM6+oYJmd5A8BW4pefDQFKWzc2SkXpr+P1LN9+L/JeF4UsZPUGWa/nUPMypPfme7Do2j785+zvL4Z37s1l/wcAEwhNPJqPMcHgerCdZ/wbrLlYRrg2tSMZ45fpHJLQ7humLaL9WW9r64yBa+7D3UcBOs/3jDHKz7+MTzgPkExVfzZnHa3qveHHJTfVjsFjh5X99QxlP8cdhYHOyY+Fmy4BUXoLG2ngiSbe2xv/AbW/8ptNb3/tiQ4MN+w2saBeoEoFUBLHjnAmBTaiLTUFPhO3zDUa2nvAqYK7g0MN39vv3VQzeXDK2GEihajELVagZN8go06bAKzVptQ7tlzuYOAyoqItuwZIgg9LpC0e05VL1eaJI/0GTYD5r1RgXaXcb2nh3mwiydMjlCPrpPaLwkVrZJlsLSAekidDgtCigT4tyEsCcp+dQlxcRjLMjvdV9EoeIkwgt0GYVhgiknc/KkPRNJdzpyXPWmtpdEsGQfIw5BfMj3BGU8iZjyOoulwucHiFYIObiBUGWfICxnekcqiQJAL+UxiHAt11Td0/pqhIJiLBFBNrKS0IonUKl61BzxiLa0RzS1QyatYqi8Pb8yer5d0M7co0aJGqn5TuHErmnksyD2aGIA') format('woff2'),
+  url('iconfont.woff?t=1565160368550') format('woff'),
+  url('iconfont.ttf?t=1565160368550') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
+  url('iconfont.svg?t=1565160368550#iconfont') format('svg'); /* iOS 4.1- */
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-guanbi:before {
+  content: "\f01f1";
+}
+
+.icon-shuaxin:before {
+  content: "\e609";
+}
+

二进制
src/assets/icon-font/iconfont.eot


+ 66 - 0
src/assets/icon-font/iconfont.js

@@ -0,0 +1,66 @@
+!(function(a) {
+  var e,
+    n =
+      '<svg><symbol id="icon-guanbi" viewBox="0 0 1024 1024"><path d="M872.802928 755.99406 872.864326 755.99406 872.864326 755.624646Z"  ></path><path d="M927.846568 511.997953c0-229.315756-186.567139-415.839917-415.838893-415.839917-229.329059 0-415.85322 186.524161-415.85322 415.839917 0 229.300406 186.524161 415.84094 415.85322 415.84094C741.278405 927.838893 927.846568 741.29836 927.846568 511.997953M512.007675 868.171955c-196.375529 0-356.172979-159.827125-356.172979-356.174002 0-196.374506 159.797449-356.157629 356.172979-356.157629 196.34483 0 356.144326 159.783123 356.144326 356.157629C868.152001 708.34483 708.352505 868.171955 512.007675 868.171955"  ></path><path d="M682.378947 642.227993 553.797453 513.264806 682.261267 386.229528c11.661597-11.514241 11.749602-30.332842 0.234337-41.995463-11.514241-11.676947-30.362518-11.765975-42.026162-0.222057L511.888971 471.195665 385.223107 344.130711c-11.602246-11.603269-30.393217-11.661597-42.025139-0.059352-11.603269 11.618619-11.603269 30.407544-0.059352 42.011836l126.518508 126.887922L342.137823 639.104863c-11.662621 11.543917-11.780301 30.305213-0.23536 41.96988 5.830799 5.89015 13.429871 8.833179 21.086248 8.833179 7.53972 0 15.136745-2.8847 20.910239-8.569166l127.695311-126.311801L640.293433 684.195827c5.802146 5.8001 13.428847 8.717546 21.056572 8.717546 7.599072 0 15.165398-2.917446 20.968567-8.659217C693.922864 672.681586 693.950494 653.889591 682.378947 642.227993"  ></path></symbol><symbol id="icon-shuaxin" viewBox="0 0 1024 1024"><path d="M858.4 505.1c-28.7 0-20.1 21.9-20.1 48.8 0 152.6-164.3 308.6-326.9 308.6-162.7 0-326.9-156.1-326.9-308.6 0-152.6 164.3-308.6 326.9-308.6h0.1v81.4l208.2-130.2-208.2-98.3v81.4h-0.1c-220.1 0-399.1 167.9-399.1 374.3 0 206.5 179.1 374.4 399.1 374.4 220.1 0 399.1-167.9 399.1-374.4 0-26.9-23.3-48.8-52.1-48.8z"  ></path></symbol></svg>',
+    t = (e = document.getElementsByTagName("script"))[
+      e.length - 1
+    ].getAttribute("data-injectcss");
+  if (t && !a.__iconfont__svg__cssinject__) {
+    a.__iconfont__svg__cssinject__ = !0;
+    try {
+      document.write(
+        "<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>"
+      );
+    } catch (e) {
+      console && console.log(e);
+    }
+  }
+  !(function(e) {
+    if (document.addEventListener)
+      if (~["complete", "loaded", "interactive"].indexOf(document.readyState))
+        setTimeout(e, 0);
+      else {
+        var t = function() {
+          document.removeEventListener("DOMContentLoaded", t, !1), e();
+        };
+        document.addEventListener("DOMContentLoaded", t, !1);
+      }
+    else
+      document.attachEvent &&
+        ((o = e),
+        (i = a.document),
+        (c = !1),
+        (d = function() {
+          try {
+            i.documentElement.doScroll("left");
+          } catch (e) {
+            return void setTimeout(d, 50);
+          }
+          n();
+        })(),
+        (i.onreadystatechange = function() {
+          "complete" == i.readyState && ((i.onreadystatechange = null), n());
+        }));
+    function n() {
+      c || ((c = !0), o());
+    }
+    var o, i, c, d;
+  })(function() {
+    var e, t;
+    ((e = document.createElement("div")).innerHTML = n),
+      (n = null),
+      (t = e.getElementsByTagName("svg")[0]) &&
+        (t.setAttribute("aria-hidden", "true"),
+        (t.style.position = "absolute"),
+        (t.style.width = 0),
+        (t.style.height = 0),
+        (t.style.overflow = "hidden"),
+        (function(e, t) {
+          t.firstChild
+            ? (function(e, t) {
+                t.parentNode.insertBefore(e, t);
+              })(e, t.firstChild)
+            : t.appendChild(e);
+        })(t, document.body));
+  });
+})(window);

+ 32 - 0
src/assets/icon-font/iconfont.svg

@@ -0,0 +1,32 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<!--
+2013-9-30: Created.
+-->
+<svg>
+<metadata>
+Created by iconfont
+</metadata>
+<defs>
+
+<font id="iconfont" horiz-adv-x="1024" >
+  <font-face
+    font-family="iconfont"
+    font-weight="500"
+    font-stretch="normal"
+    units-per-em="1024"
+    ascent="896"
+    descent="-128"
+  />
+    <missing-glyph />
+    
+    <glyph glyph-name="guanbi" unicode="&#983537;" d="M872.802928 140.00594 872.864326 140.00594 872.864326 140.375354ZM927.846568 384.002047c0 229.315756-186.567139 415.839917-415.838893 415.839917-229.329059 0-415.85322-186.524161-415.85322-415.839917 0-229.300406 186.524161-415.84094 415.85322-415.84094C741.278405-31.838893 927.846568 154.70164 927.846568 384.002047M512.007675 27.828045c-196.375529 0-356.172979 159.827125-356.172979 356.174002 0 196.374506 159.797449 356.157629 356.172979 356.157629 196.34483 0 356.144326-159.783123 356.144326-356.157629C868.152001 187.65517 708.352505 27.828045 512.007675 27.828045M682.378947 253.772007 553.797453 382.735194 682.261267 509.770472c11.661597 11.514241 11.749602 30.332842 0.234337 41.995463-11.514241 11.676947-30.362518 11.765975-42.026162 0.222057L511.888971 424.804335 385.223107 551.869289c-11.602246 11.603269-30.393217 11.661597-42.025139 0.059352-11.603269-11.618619-11.603269-30.407544-0.059352-42.011836l126.518508-126.887922L342.137823 256.895137c-11.662621-11.543917-11.780301-30.305213-0.23536-41.96988 5.830799-5.89015 13.429871-8.833179 21.086248-8.833179 7.53972 0 15.136745 2.8847 20.910239 8.569166l127.695311 126.311801L640.293433 211.804173c5.802146-5.8001 13.428847-8.717546 21.056572-8.717546 7.599072 0 15.165398 2.917446 20.968567 8.659217C693.922864 223.318414 693.950494 242.110409 682.378947 253.772007"  horiz-adv-x="1024" />
+
+    
+    <glyph glyph-name="shuaxin" unicode="&#58889;" d="M858.4 390.9c-28.7 0-20.1-21.9-20.1-48.8 0-152.6-164.3-308.6-326.9-308.6-162.7 0-326.9 156.1-326.9 308.6 0 152.6 164.3 308.6 326.9 308.6h0.1v-81.4l208.2 130.2-208.2 98.3v-81.4h-0.1c-220.1 0-399.1-167.9-399.1-374.3 0-206.5 179.1-374.4 399.1-374.4 220.1 0 399.1 167.9 399.1 374.4 0 26.9-23.3 48.8-52.1 48.8z"  horiz-adv-x="1024" />
+
+    
+
+
+  </font>
+</defs></svg>

二进制
src/assets/icon-font/iconfont.ttf


二进制
src/assets/icon-font/iconfont.woff


二进制
src/assets/icon-font/iconfont.woff2


二进制
src/assets/img/avatar.gif


二进制
src/assets/img/bg.jpg


二进制
src/assets/img/logo.gif


二进制
src/assets/img/logo.png


二进制
src/assets/img/logo1.png


二进制
src/assets/img/welcome.gif


+ 29 - 0
src/assets/js/btnList.js

@@ -0,0 +1,29 @@
+const btnList = [
+  { code: "001", name: "列表" },
+  { code: "002", name: "刷新" },
+  { code: "003", name: "添加" },
+  { code: "004", name: "启/禁用" },
+  { code: "005", name: "修改" },
+  { code: "006", name: "删除" },
+  { code: "007", name: "详情" },
+  { code: "008", name: "提交" },
+  { code: "009", name: "提交审核" },
+  { code: "010", name: "审核审批" },
+  { code: "011", name: "价格" },
+  { code: "012", name: "复制" },
+  { code: "013", name: "竞标发布" },
+  { code: "014", name: "停止竞标" },
+  { code: "015", name: "发布" },
+  { code: "016", name: "取消发布" },
+  { code: "017", name: "提交新毛利" },
+  { code: "018", name: "上架" },
+  { code: "019", name: "下架" },
+  { code: "020", name: "重置密码" },
+  { code: "021", name: "设为管理员" },
+  { code: "022", name: "取消管理员" },
+  { code: "023", name: "模板下载" },
+  { code: "024", name: "重置" },
+  { code: "025", name: "财务" },
+  { code: "026", name: "上/下架" },
+];
+export default btnList;

+ 5 - 0
src/assets/js/cexStatusList.js

@@ -0,0 +1,5 @@
+const status = [
+  { name: "通过", code: "1" },
+  { name: "未通过", code: "2" },
+];
+export default status;

+ 5 - 0
src/assets/js/roleLevel.js

@@ -0,0 +1,5 @@
+const role = [
+  { name: "管理员", code: "1" },
+  { name: "非管理员", code: "2" },
+];
+export default role;

+ 5 - 0
src/assets/js/statusList.js

@@ -0,0 +1,5 @@
+const status = [
+  { name: "启用", code: "1" },
+  { name: "禁用", code: "0" },
+];
+export default status;

二进制
src/assets/sheji/developing.jpg


二进制
src/assets/sheji/loginbg.png


二进制
src/assets/sheji/loginlan.png


二进制
src/assets/sheji/logo.png


二进制
src/assets/sheji/user.png


二进制
src/assets/sheji/welcome.png


二进制
src/assets/sheji/wenzi.png


二进制
src/assets/sprite.png


+ 29 - 0
src/assets/utils/filter.js

@@ -0,0 +1,29 @@
+import * as dayjs from "dayjs";
+
+Vue.filter("NumberFormat", function(value) {
+  if (!value) {
+    return "0";
+  }
+  let intPartFormat = value.toString().replace(/(\d)(?=(?:\d{3})+$)/g, "$1,"); //将整数部分逢三一断
+  return intPartFormat;
+});
+
+Vue.filter("dayjs", function(dataStr, pattern = "YYYY-MM-DD HH:mm:ss") {
+  return dayjs(dataStr).format(pattern);
+});
+
+Vue.filter("moment", function(dataStr, pattern = "YYYY-MM-DD HH:mm:ss") {
+  return dayjs(dataStr).format(pattern);
+});
+
+/** 字符串超长截取省略号显示 */
+Vue.filter("ellipsis", function(value, vlength = 25) {
+  if (!value) {
+    return "";
+  }
+  // console.log("vlength: " + vlength);
+  if (value.length > vlength) {
+    return value.slice(0, vlength) + "...";
+  }
+  return value;
+});

+ 91 - 0
src/assets/utils/interceptors.js

@@ -0,0 +1,91 @@
+// 添加请求拦截器
+axios.interceptors.request.use(
+  function(config) {
+    // 在发送请求之前做些什么
+    //  let token = window.vm.$getStorage("token"); // 令牌
+    //  let tid = window.vm.$getStorage("tid"); // 租户id
+    //  let envName = window.vm.$getStorage("envName"); // 环境变量
+    //  let currentOrgId = window.vm.$getStorage("currentOrgId"); // 区域id
+    //  let data = { token, tid, envName, currentOrgId };
+    //  if (!config.data || JSON.stringify(config.data) === "{}") {
+    //    config.data = data;
+    //  } else if (!config.data.hasOwnProperty("currentOrgId")) {
+    //    Object.assign(config.data, data);
+    //  }
+    // config.headers.appId = window.vm.$encrypt(
+    //   "520f066da8e7c4736abb20afdd29289a",
+    //   "TFEUyxO9PDJlyyg7"
+    // );
+    // // 加密
+    // config.headers.Authentication = window.vm.$encrypt(
+    //   "520f066da8e7c4736abb20afdd29289a#nU-#q1PwD!1573801531190",
+    //   "TFEUyxO9PDJlyyg7"
+    // );
+    // 解密
+    // config.headers.Authentication = window.vm.$decrypt(this.parmValue, "TFEUyxO9PDJlyyg7");
+    // console.log(config);
+    return config;
+  },
+  function(error) {
+    // 对请求错误做些什么
+    return Promise.reject(error);
+  }
+);
+// // 在main.js设置全局的请求次数,请求的间隙
+// axios.defaults.retry = 4;
+// axios.defaults.retryDelay = 1000;
+// 添加响应拦截器
+axios.interceptors.response.use(
+  function(response) {
+    if (response.config.url.substr(0, 18) === "/api/ditpcs-debug/") {
+      return response.data;
+    }
+    // if (response.config.url.indexOf('/admin/loveUserProject/exportProject') > -1) {
+    //     return response;
+    // }
+    if (response.status === 200) {
+      if (
+        response.data.code !== 0 &&
+        response.data.code !== 2 &&
+        response.data.code !== 3 &&
+        response.data.code !== 12 &&
+        response.request.responseURL.indexOf(
+          "smartpart/admin/workerWeekly/export"
+        ) == -1
+      ) {
+        window.vm.$notify.error({
+          title: response.data.message,
+          message: ""
+        });
+      }
+      // code=2,代表token失效
+      if (response.data.code === 2) {
+        console.log("interceptors-delCookie-ctoken");
+        window.vm.$delCookie("ctoken");
+        window.vm.$router.push("login");
+        // window.vm.$router.push("nopermission");
+      }
+      // code=3,代表 用户无访问权限
+      if (response.data.code === 3) {
+        window.vm.$router.push("manage");
+      }
+      // code=12,代表 前端通用弹窗提示码
+      if (response.data.code === 12) {
+        window.vm.$store.commit("isShowModelFun", true);
+        window.vm.$store.commit("dataModelFun", response.data.data);
+      }
+    }
+    return response.data;
+  },
+  function(error) {
+    // 对响应错误做点什么
+    // console.log(error);
+    // if (error.response.status === 500) {
+    //   window.vm.$notify.error({
+    //     title: "请检查您的网络",
+    //     message: "稍后重试"
+    //   });
+    // }
+    return Promise.reject(error);
+  }
+);

部分文件因为文件数量过多而无法显示