zhaojinyu 8 месяцев назад
Родитель
Сommit
89dd5cdb14
100 измененных файлов с 5186 добавлено и 0 удалено
  1. 14 0
      .editorconfig
  2. 6 0
      .env.development
  3. 6 0
      .env.production
  4. 8 0
      .env.staging
  5. 3 0
      .eslintignore
  6. 207 0
      .eslintrc.js
  7. 16 0
      .gitignore
  8. 0 0
      .stylelintcache
  9. 18 0
      .stylelintignore
  10. 5 0
      .travis.yml
  11. BIN
      __MACOSX/public/._.DS_Store
  12. BIN
      __MACOSX/src/._.DS_Store
  13. BIN
      __MACOSX/src/api/._.DS_Store
  14. BIN
      __MACOSX/src/api/admin/._.DS_Store
  15. BIN
      __MACOSX/src/assets/._.DS_Store
  16. BIN
      __MACOSX/src/assets/img/._.DS_Store
  17. BIN
      __MACOSX/src/components/._.DS_Store
  18. BIN
      __MACOSX/src/components/NewCom/._.DS_Store
  19. BIN
      __MACOSX/src/components/NewCom/._WkFilterHeader
  20. BIN
      __MACOSX/src/components/NewCom/WkCompanyDialogSelect/._.DS_Store
  21. BIN
      __MACOSX/src/components/NewCom/WkFilterHeader/._.DS_Store
  22. BIN
      __MACOSX/src/components/NewCom/WkUserSelect/._.DS_Store
  23. BIN
      __MACOSX/src/router/._.DS_Store
  24. BIN
      __MACOSX/src/router/modules/._.DS_Store
  25. BIN
      __MACOSX/src/store/._.DS_Store
  26. BIN
      __MACOSX/src/store/modules/._.DS_Store
  27. BIN
      __MACOSX/src/styles/._.DS_Store
  28. BIN
      __MACOSX/src/utils/._.DS_Store
  29. BIN
      __MACOSX/src/views/._.DS_Store
  30. BIN
      __MACOSX/src/views/admin/._.DS_Store
  31. BIN
      __MACOSX/src/views/admin/application/._.DS_Store
  32. BIN
      __MACOSX/src/views/admin/crm/._.DS_Store
  33. BIN
      __MACOSX/src/views/admin/employeeDep/._.DS_Store
  34. BIN
      __MACOSX/src/views/admin/employeeDep/components/._.DS_Store
  35. BIN
      __MACOSX/src/views/crm/._.DS_Store
  36. BIN
      __MACOSX/src/views/crm/business/._.DS_Store
  37. BIN
      __MACOSX/src/views/crm/components/._.DS_Store
  38. BIN
      __MACOSX/src/views/crm/components/Activity/._.DS_Store
  39. BIN
      __MACOSX/src/views/crm/message/._.DS_Store
  40. BIN
      __MACOSX/src/views/layout/._.DS_Store
  41. BIN
      __MACOSX/src/views/layout/components/._.DS_Store
  42. BIN
      __MACOSX/src/views/layout/components/Help/._.DS_Store
  43. BIN
      __MACOSX/src/views/login/._.DS_Store
  44. BIN
      __MACOSX/src/views/login/component/._.DS_Store
  45. BIN
      __MACOSX/src/views/login/img/._.DS_Store
  46. BIN
      __MACOSX/src/views/oa/._.DS_Store
  47. BIN
      __MACOSX/src/views/oa/notice/._.DS_Store
  48. BIN
      __MACOSX/src/views/system/._.DS_Store
  49. BIN
      __MACOSX/src/views/user/._.DS_Store
  50. BIN
      __MACOSX/src/views/user/components/._.DS_Store
  51. 14 0
      babel.config.js
  52. 35 0
      build/index.js
  53. 24 0
      jest.config.js
  54. 9 0
      jsconfig.json
  55. 114 0
      package.json
  56. 8 0
      postcss.config.js
  57. BIN
      public/favicon.ico
  58. 18 0
      public/index.html
  59. 0 0
      public/static/.gitkeep
  60. 60 0
      public/static/client.js
  61. 1 0
      public/static/client.min.js
  62. BIN
      public/static/img/bg.png
  63. BIN
      public/static/img/change.png
  64. BIN
      public/static/img/logo-360.png
  65. BIN
      public/static/img/logo-chrome.png
  66. BIN
      public/static/img/logo-firefox.png
  67. BIN
      public/static/img/logo-safari.png
  68. BIN
      public/static/img/logo-sougou.png
  69. 180 0
      public/static/index.css
  70. 77 0
      public/static/index.html
  71. 27 0
      public/static/tinymce/css/tiny-wk-colors.css
  72. 27 0
      public/static/tinymce/css/tiny-wk-word.css
  73. 12 0
      public/static/tinymce/css/tiny-wukong.css
  74. 165 0
      src/App.vue
  75. 135 0
      src/api/admin/accountBook.js
  76. 46 0
      src/api/admin/application.js
  77. 83 0
      src/api/admin/config.js
  78. 778 0
      src/api/admin/crm.js
  79. 258 0
      src/api/admin/employeeDep.js
  80. 134 0
      src/api/admin/file.js
  81. 31 0
      src/api/admin/init.js
  82. 65 0
      src/api/admin/log.js
  83. 28 0
      src/api/admin/messageConfig.js
  84. 55 0
      src/api/admin/oa.js
  85. 108 0
      src/api/admin/other.js
  86. 173 0
      src/api/admin/role.js
  87. 43 0
      src/api/admin/user.js
  88. 25 0
      src/api/adminCompanyManager.js
  89. 23 0
      src/api/authorization.js
  90. 135 0
      src/api/bi/achievement.js
  91. 130 0
      src/api/bi/bi.js
  92. 80 0
      src/api/bi/business.js
  93. 82 0
      src/api/bi/callCenter.js
  94. 386 0
      src/api/bi/customer.js
  95. 48 0
      src/api/bi/customerPortrayal.js
  96. 479 0
      src/api/bi/jxc.js
  97. 80 0
      src/api/bi/oa.js
  98. 60 0
      src/api/bi/product.js
  99. 264 0
      src/api/bi/ranking.js
  100. 403 0
      src/api/common.js

+ 14 - 0
.editorconfig

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

+ 6 - 0
.env.development

@@ -0,0 +1,6 @@
+# just a flag
+ENV = 'development'
+
+# base api
+# 只有 NODE_ENV,BASE_URL 和以 VUE_APP_ 开头的变量将通过
+VUE_APP_BASE_API = '/'

+ 6 - 0
.env.production

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

+ 8 - 0
.env.staging

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

+ 3 - 0
.eslintignore

@@ -0,0 +1,3 @@
+build/*.js
+config/*.js
+src/assets

+ 207 - 0
.eslintrc.js

@@ -0,0 +1,207 @@
+module.exports = {
+  root: true,
+  parserOptions: {
+    parser: 'babel-eslint',
+    sourceType: 'module'
+  },
+  env: {
+    browser: true,
+    node: true,
+    es6: true,
+  },
+  extends: ['plugin:vue/recommended', 'eslint:recommended'],
+  globals: {
+    "BMap": "readonly",
+    "BMAP_STATUS_SUCCESS": "readonly",
+    "fullcalendar": "readonly",
+    "WKConfig": "readonly"
+  },
+
+  // 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/html-closing-bracket-newline": "off",
+    "no-prototype-builtins": "off",
+    "vue/no-v-html": "off",
+    'vue/require-default-prop': 0,
+    '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': [0, 'allow-null'],
+    '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': 2,
+    'no-delete-var': 0,
+    'no-dupe-args': 2,
+    'no-dupe-class-members': 2,
+    'no-dupe-keys': 2,
+    'no-duplicate-case': 2,
+    'no-empty-character-class': 2,
+    'no-empty-pattern': 2,
+    'no-eval': 2,
+    'no-ex-assign': 2,
+    'no-extend-native': 2,
+    'no-extra-bind': 2,
+    'no-extra-boolean-cast': 2,
+    'no-extra-parens': [2, 'functions'],
+    'no-fallthrough': 2,
+    'no-floating-decimal': 2,
+    'no-func-assign': 2,
+    'no-implied-eval': 2,
+    'no-inner-declarations': [2, 'functions'],
+    'no-invalid-regexp': 2,
+    'no-irregular-whitespace': 2,
+    'no-iterator': 2,
+    'no-label-var': 2,
+    'no-labels': [2, {
+      'allowLoop': false,
+      'allowSwitch': false
+    }],
+    'no-lone-blocks': 2,
+    'no-mixed-spaces-and-tabs': 2,
+    'no-multi-spaces': 2,
+    'no-multi-str': 2,
+    'no-multiple-empty-lines': [2, {
+      'max': 1
+    }],
+    'no-native-reassign': 2,
+    'no-negated-in-lhs': 2,
+    'no-new-object': 2,
+    'no-new-require': 2,
+    'no-new-symbol': 2,
+    'no-new-wrappers': 2,
+    'no-obj-calls': 2,
+    'no-octal': 2,
+    'no-octal-escape': 2,
+    'no-path-concat': 2,
+    'no-proto': 2,
+    'no-redeclare': 2,
+    'no-regex-spaces': 2,
+    'no-return-assign': [2, 'except-parens'],
+    'no-self-assign': 2,
+    'no-self-compare': 2,
+    'no-sequences': 2,
+    'no-shadow-restricted-names': 2,
+    'no-spaced-func': 2,
+    'no-sparse-arrays': 2,
+    'no-this-before-super': 2,
+    'no-throw-literal': 2,
+    'no-trailing-spaces': 2,
+    'no-undef': 2,
+    'no-undef-init': 2,
+    'no-unexpected-multiline': 2,
+    'no-unmodified-loop-condition': 2,
+    'no-unneeded-ternary': [2, {
+      'defaultAssignment': false
+    }],
+    'no-unreachable': 2,
+    'no-unsafe-finally': 2,
+    'no-unused-vars': [2, {
+      'vars': 'all',
+      'args': 'none'
+    }],
+    'no-useless-call': 2,
+    'no-useless-computed-key': 2,
+    'no-useless-constructor': 2,
+    'no-useless-escape': 0,
+    'no-whitespace-before-property': 2,
+    'no-with': 2,
+    'one-var': [2, {
+      'initialized': 'never'
+    }],
+    'operator-linebreak': [2, 'after', {
+      'overrides': {
+        '?': 'before',
+        ':': 'before'
+      }
+    }],
+    'padded-blocks': [2, 'never'],
+    'quotes': [2, 'single', {
+      'avoidEscape': true,
+      'allowTemplateLiterals': true
+    }],
+    'semi': [2, 'never'],
+    'semi-spacing': [2, {
+      'before': false,
+      'after': true
+    }],
+    'space-before-blocks': [2, 'always'],
+    'space-before-function-paren': [2, 'never'],
+    'space-in-parens': [2, 'never'],
+    'space-infix-ops': 2,
+    'space-unary-ops': [2, {
+      'words': true,
+      'nonwords': false
+    }],
+    'spaced-comment': [2, 'always', {
+      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
+    }],
+    'template-curly-spacing': [2, 'never'],
+    'use-isnan': 2,
+    'valid-typeof': 2,
+    'wrap-iife': [2, 'any'],
+    'yield-star-spacing': [2, 'both'],
+    'yoda': [2, 'never'],
+    'prefer-const': 2,
+    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
+    'object-curly-spacing': [2, 'always', {
+      objectsInObjects: false
+    }],
+    'array-bracket-spacing': [2, 'never']
+  }
+}

+ 16 - 0
.gitignore

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

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
.stylelintcache


+ 18 - 0
.stylelintignore

@@ -0,0 +1,18 @@
+# .stylelintignore
+# 旧的不需打包的样式库
+*.min.css
+
+# 其他类型文件
+*.js
+*.jpg
+*.woff
+
+# 测试和打包目录
+/test/
+/dist/
+/lib/
+**/iconfonts/
+**/iconfont/
+**/styles/animate.css
+**/styles/xr-theme.css
+

+ 5 - 0
.travis.yml

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

BIN
__MACOSX/public/._.DS_Store


BIN
__MACOSX/src/._.DS_Store


BIN
__MACOSX/src/api/._.DS_Store


BIN
__MACOSX/src/api/admin/._.DS_Store


BIN
__MACOSX/src/assets/._.DS_Store


BIN
__MACOSX/src/assets/img/._.DS_Store


BIN
__MACOSX/src/components/._.DS_Store


BIN
__MACOSX/src/components/NewCom/._.DS_Store


BIN
__MACOSX/src/components/NewCom/._WkFilterHeader


BIN
__MACOSX/src/components/NewCom/WkCompanyDialogSelect/._.DS_Store


BIN
__MACOSX/src/components/NewCom/WkFilterHeader/._.DS_Store


BIN
__MACOSX/src/components/NewCom/WkUserSelect/._.DS_Store


BIN
__MACOSX/src/router/._.DS_Store


BIN
__MACOSX/src/router/modules/._.DS_Store


BIN
__MACOSX/src/store/._.DS_Store


BIN
__MACOSX/src/store/modules/._.DS_Store


BIN
__MACOSX/src/styles/._.DS_Store


BIN
__MACOSX/src/utils/._.DS_Store


BIN
__MACOSX/src/views/._.DS_Store


BIN
__MACOSX/src/views/admin/._.DS_Store


BIN
__MACOSX/src/views/admin/application/._.DS_Store


BIN
__MACOSX/src/views/admin/crm/._.DS_Store


BIN
__MACOSX/src/views/admin/employeeDep/._.DS_Store


BIN
__MACOSX/src/views/admin/employeeDep/components/._.DS_Store


BIN
__MACOSX/src/views/crm/._.DS_Store


BIN
__MACOSX/src/views/crm/business/._.DS_Store


BIN
__MACOSX/src/views/crm/components/._.DS_Store


BIN
__MACOSX/src/views/crm/components/Activity/._.DS_Store


BIN
__MACOSX/src/views/crm/message/._.DS_Store


BIN
__MACOSX/src/views/layout/._.DS_Store


BIN
__MACOSX/src/views/layout/components/._.DS_Store


BIN
__MACOSX/src/views/layout/components/Help/._.DS_Store


BIN
__MACOSX/src/views/login/._.DS_Store


BIN
__MACOSX/src/views/login/component/._.DS_Store


BIN
__MACOSX/src/views/login/img/._.DS_Store


BIN
__MACOSX/src/views/oa/._.DS_Store


BIN
__MACOSX/src/views/oa/notice/._.DS_Store


BIN
__MACOSX/src/views/system/._.DS_Store


BIN
__MACOSX/src/views/user/._.DS_Store


BIN
__MACOSX/src/views/user/components/._.DS_Store


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

+ 114 - 0
package.json

@@ -0,0 +1,114 @@
+{
+  "name": "5kcrm",
+  "version": "12.0.0",
+  "description": "",
+  "author": "5kcrm <service@5kcrm.com>",
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "build": "vue-cli-service build",
+    "build:dev": "vue-cli-service build --mode development",
+    "build:stage": "vue-cli-service build --mode staging",
+    "preview": "node build/index.js --preview",
+    "lint": "eslint --fix --ext .js,.vue src"
+  },
+  "dependencies": {
+    "@chenfengyuan/vue-qrcode": "^1.0.2",
+    "@fullcalendar/core": "^4.3.1",
+    "@fullcalendar/daygrid": "^4.3.0",
+    "@fullcalendar/interaction": "^4.3.0",
+    "@fullcalendar/list": "^4.3.0",
+    "@fullcalendar/timegrid": "^4.3.0",
+    "@fullcalendar/timeline": "^4.3.0",
+    "@fullcalendar/vue": "^4.3.1",
+    "@tinymce/tinymce-vue": "^3.2.0",
+    "axios": "0.18.0",
+    "clipboard": "^2.0.4",
+    "core-js": "^3.6.5",
+    "echarts": "^5.2.0",
+    "el-bigdata-table": "git+https://gitee.com/devi001/el-bigdata-table.git",
+    "element-ui": "git+https://gitee.com/devi001/wk-element.git",
+    "file-saver": "^2.0.1",
+    "id-validator": "^1.3.0",
+    "js-cookie": "2.2.1",
+    "jsencrypt": "3.2.1",
+    "lockr": "^0.8.5",
+    "marked": "^4.0.8",
+    "mathjs": "^10.0.2",
+    "normalize.css": "8.0.1",
+    "nprogress": "0.2.0",
+    "number-precision": "^1.5.0",
+    "numeral": "^2.0.6",
+    "nzh": "^1.0.4",
+    "path-to-regexp": "2.4.0",
+    "pinyin-match": "1.0.9",
+    "print-js": "^1.6.0",
+    "qrcodejs2": "0.0.2",
+    "regenerator-runtime": "^0.13.9",
+    "signature_pad": "3.0.0-beta.4",
+    "throttle-debounce": "^2.1.0",
+    "v-calendar": "2.3.0",
+    "v-viewer": "^1.6.4",
+    "vue": "2.5.17",
+    "vue-bus": "^1.1.0",
+    "vue-calendar-component": "^2.8.2",
+    "vue-cropper": "^0.4.8",
+    "vue-html2pdf": "^1.8.0",
+    "vue-i18n": "^8.7.0",
+    "vue-moment": "^4.1.0",
+    "vue-radial-progress": "^0.3.2",
+    "vue-router": "3.0.1",
+    "vue-virtual-scroller": "^1.0.10",
+    "vue2-animate": "^2.1.2",
+    "vue2-org-tree": "1.3.1",
+    "vuedraggable": "2.24.3",
+    "vuex": "3.0.1",
+    "xlsx": "^0.14.1",
+    "xss": "^1.0.6"
+  },
+  "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-eslint": "^8.2.6",
+    "babel-jest": "23.6.0",
+    "babel-plugin-dynamic-import-node": "2.3.3",
+    "chalk": "2.4.2",
+    "connect": "3.6.6",
+    "eslint": "6.7.2",
+    "eslint-plugin-vue": "6.2.2",
+    "html-webpack-plugin": "3.2.0",
+    "less": "^4.1.2",
+    "less-loader": "^7.3.0",
+    "node-sass": "6.0.1",
+    "postcss": "^8.4.8",
+    "postcss-html": "^1.3.0",
+    "postcss-scss": "^4.0.3",
+    "runjs": "4.3.2",
+    "sass-loader": "10.2.0",
+    "sass-resources-loader": "2.2.4",
+    "script-ext-html-webpack-plugin": "2.1.3",
+    "serve-static": "1.13.2",
+    "stylelint": "^14.5.3",
+    "stylelint-config-recess-order": "^3.0.0",
+    "stylelint-config-standard-scss": "^3.0.0",
+    "stylelint-config-standard-vue": "^1.0.0",
+    "stylelint-order": "^5.0.0",
+    "stylelint-scss": "^4.1.0",
+    "stylelint-webpack-plugin": "^3.1.1",
+    "svg-sprite-loader": "4.1.3",
+    "svgo": "1.2.2",
+    "vue-template-compiler": "2.5.17"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions"
+  ],
+  "engines": {
+    "node": ">=8.9",
+    "npm": ">= 3.0.0"
+  },
+  "license": "MIT"
+}

+ 8 - 0
postcss.config.js

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

BIN
public/favicon.ico


+ 18 - 0
public/index.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= webpackConfig.name %></title>
+    <script src="<%= BASE_URL %>static/client.js"></script>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but <%= webpackConfig.name %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 0 - 0
public/static/.gitkeep


+ 60 - 0
public/static/client.js

@@ -0,0 +1,60 @@
+!(function () {
+  var Sys = {};
+  var ua = navigator.userAgent.toLowerCase();
+
+  var regMap = {
+    msie: '/msie ([\\d.]+)/',
+    firefox: '/firefox\\/([\\d.]+)/',
+    chrome: '/chrome\\/([\\d.]+)/',
+    opera: '/opera.([\\d.]+)/',
+    safari: '/version\\/([\\d.]+).*safari/'
+  };
+
+  var o;
+  if (ua.match(eval(regMap.msie))) {
+    o = ua.match(eval(regMap.msie));
+    Sys = {
+      appName: 'IE',
+      version: o[1]
+    }
+  } else if (ua.match(eval(regMap.firefox))) {
+    o = ua.match(eval(regMap.firefox));
+    Sys = {
+      appName: 'Firefox',
+      version: o[1]
+    }
+  } else if (ua.match(eval(regMap.chrome))) {
+    o = ua.match(eval(regMap.chrome));
+    Sys = {
+      appName: 'Chrome',
+      version: o[1]
+    }
+  } else if (ua.match(eval(regMap.opera))) {
+    o = ua.match(eval(regMap.opera));
+    Sys = {
+      appName: 'Opera',
+      version: o[1]
+    }
+  } else if (ua.match(eval(regMap.safari))) {
+    o = ua.match(eval(regMap.safari));
+    Sys = {
+      appName: 'Safari',
+      version: o[1]
+    }
+  } else if (ua.indexOf('edge')) {
+    Sys = {
+      appName: 'Edge'
+    }
+  } else {
+    if (navigator.appName === 'Microsoft Internet Explorer') {
+      Sys = {
+        appName: 'IE',
+        version: '6.0'
+      }
+    }
+  }
+
+  if (Sys.appName === 'IE' && Number(Sys.version) < 10) {
+    window.location.href = './static/index.html'
+  }
+})();

+ 1 - 0
public/static/client.min.js

@@ -0,0 +1 @@
+!(function(){var Sys={};var ua=navigator.userAgent.toLowerCase();var regMap={msie:"/msie ([\\d.]+)/",firefox:"/firefox\\/([\\d.]+)/",chrome:"/chrome\\/([\\d.]+)/",opera:"/opera.([\\d.]+)/",safari:"/version\\/([\\d.]+).*safari/"};var o;if(ua.match(eval(regMap.msie))){o=ua.match(eval(regMap.msie));Sys={appName:"IE",version:o[1]}}else{if(ua.match(eval(regMap.firefox))){o=ua.match(eval(regMap.firefox));Sys={appName:"Firefox",version:o[1]}}else{if(ua.match(eval(regMap.chrome))){o=ua.match(eval(regMap.chrome));Sys={appName:"Chrome",version:o[1]}}else{if(ua.match(eval(regMap.opera))){o=ua.match(eval(regMap.opera));Sys={appName:"Opera",version:o[1]}}else{if(ua.match(eval(regMap.safari))){o=ua.match(eval(regMap.safari));Sys={appName:"Safari",version:o[1]}}else{if(ua.indexOf("edge")){Sys={appName:"Edge"}}else{if(navigator.appName==="Microsoft Internet Explorer"){Sys={appName:"IE",version:"6.0"}}}}}}}}if(Sys.appName==="IE"&&Number(Sys.version)<11){window.location.href="http://localhost:10000"}})();

BIN
public/static/img/bg.png


BIN
public/static/img/change.png


BIN
public/static/img/logo-360.png


BIN
public/static/img/logo-chrome.png


BIN
public/static/img/logo-firefox.png


BIN
public/static/img/logo-safari.png


BIN
public/static/img/logo-sougou.png


+ 180 - 0
public/static/index.css

@@ -0,0 +1,180 @@
+* {
+  padding: 0;
+  margin: 0;
+}
+
+html,
+body {
+  font-family:
+    "微软雅黑",
+    "Microsoft Yahei",
+    "LiHei Pro",
+    "Hiragino Sans",
+    "GBHelvetica Neue",
+    Helvetica,
+    Arial,
+    "PingFang SC",
+    "WenQuanYi Micro Hei",
+    sans-serif;
+  font-size: 14px;
+  color: #111;
+}
+
+li {
+  list-style: none;
+}
+
+a {
+  padding: 0;
+  margin: 0;
+  color: inherit;
+  vertical-align: baseline;
+  border: 0;
+  outline: 0;
+}
+
+a:link,
+a:hover,
+a:active,
+a:visited {
+  color: inherit;
+  text-decoration: none;
+}
+
+img {
+  border: 0 none;
+}
+
+body {
+  /* transform: scale(0.8); */
+
+  /* transform-origin: center top; */
+}
+
+.wrapper {
+  position: fixed;
+  z-index: 10;
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+  background-color: #f5f7f9;
+}
+
+.wrapper .wrapper-bg {
+  position: absolute;
+  top: 10px;
+  left: 50%;
+  z-index: 0;
+  width: 1184px;
+  margin-left: -592px;
+}
+
+.wrapper .title-wrapper {
+  position: relative;
+  width: 875px;
+  margin: 0 auto;
+  overflow: hidden;
+}
+
+.wrapper .title-wrapper .title {
+  width: 100%;
+  margin-top: 10%;
+  font-size: 34px;
+  font-weight: 400;
+  color: #36383a;
+  text-align: center;
+}
+
+.wrapper .title-wrapper .desc {
+  margin-top: 20px;
+  font-size: 18px;
+  color: #6a6e75;
+  text-align: center;
+}
+
+.wrapper .section {
+  width: 875px;
+  margin: 65px auto 0;
+}
+
+.wrapper .section .title {
+  width: 100%;
+  margin-bottom: 35px;
+  font-size: 22px;
+  line-height: 30px;
+  color: #36383a;
+  text-align: center;
+}
+
+.wrapper .section .container {
+  width: 100%;
+  background-color: white;
+  border: 1px solid #dfe1e6;
+  border-radius: 10px;
+}
+
+.wrapper .section .container .list {
+  width: 100%;
+  height: 130px;
+}
+
+.wrapper .section .container .list .list-item {
+  float: left;
+  width: 291px;
+  height: 90px;
+  margin: 20px auto;
+}
+
+.wrapper .section .container .list .line {
+  float: left;
+  width: 1px;
+  height: 50px;
+  margin: 40px 0;
+  background-color: #e2e5ec;
+}
+
+.wrapper .section .container .list .list-item .list-item-logo {
+  display: block;
+  width: 60px;
+  margin-right: auto;
+  margin-left: auto;
+  cursor: pointer;
+}
+
+.wrapper .section .container .list .list-item .list-item-desc {
+  font-size: 16px;
+  line-height: 30px;
+  color: #36383a;
+  text-align: center;
+  cursor: pointer;
+}
+
+.wrapper .section.express {
+  margin: 0 auto 30px;
+}
+
+.wrapper .section.express .title {
+  margin: 20px auto;
+  font-size: 18px;
+}
+
+.wrapper .section.express .list {
+  border-bottom: 1px solid #e2e5ec;
+}
+
+.wrapper .section.express .list .list-item {
+  width: 437px;
+}
+
+.wrapper .section .container .change {
+  width: 100%;
+  padding: 20px 0;
+  text-align: center;
+  background-color: #f9fbfc;
+  border-bottom-right-radius: 10px;
+  border-bottom-left-radius: 10px;
+}
+
+.wrapper .section .container .pic {
+  width: 708px;
+}

+ 77 - 0
public/static/index.html

@@ -0,0 +1,77 @@
+<!DOCTYPE HTML>
+<html>
+
+<head>
+  <title>温馨提示</title>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+  <meta name="renderer" content="webkit" />
+  <link rel="stylesheet" href="./index.css">
+</head>
+
+<body>
+  <div class="wrapper">
+    <img class="wrapper-bg" src="./img/bg.png" alt="">
+    <div class="title-wrapper">
+      <div class="title">obopom - CRM提醒您</div>
+      <div class="desc">您使用的IE浏览器版本过低,请将您的浏览器升级至IE10以上版本</div>
+    </div>
+
+    <div class="section">
+      <div class="title">我们建议您使用以下浏览器</div>
+      <div class="container">
+        <ul class="list">
+          <li class="list-item">
+            <a href="https://www.google.cn/intl/zh-CN/chrome/" target="_blank">
+              <img class="list-item-logo" src="img/logo-chrome.png" alt="">
+              <div class="list-item-desc">Google Chrome</div>
+            </a>
+          </li>
+          <li class="line"></li>
+          <li class="list-item">
+            <a href="http://www.firefox.com.cn/" target="_blank">
+              <img class="list-item-logo" src="img/logo-firefox.png" alt="">
+              <div class="list-item-desc">Firefox</div>
+            </a>
+          </li>
+          <li class="line"></li>
+          <li class="list-item">
+            <a href="https://www.apple.com/cn/safari/" target="_blank">
+              <img class="list-item-logo" src="img/logo-safari.png" alt="">
+              <div class="list-item-desc">Safari</div>
+            </a>
+          </li>
+        </ul>
+      </div>
+    </div>
+
+    <div class="section express">
+      <div class="title">或其他浏览器极速模式</div>
+      <div class="container">
+        <ul class="list">
+          <li class="list-item">
+            <a href="https://ie.sogou.com/" target="_blank">
+              <img class="list-item-logo" src="img/logo-sougou.png" alt="">
+              <div class="list-item-desc">搜狗极速模式</div>
+            </a>
+          </li>
+          <li class="line"></li>
+          <li class="list-item">
+            <a href="https://www.360.cn/" target="_blank">
+              <img class="list-item-logo" src="img/logo-360.png" alt="">
+              <div class="list-item-desc">360极速模式</div>
+            </a>
+          </li>
+        </ul>
+        <div class="change">
+          <img class="pic" src="./img/change.png" alt="">
+        </div>
+      </div>
+    </div>
+  </div>
+</body>
+
+<script>
+</script>
+
+</html>

+ 27 - 0
public/static/tinymce/css/tiny-wk-colors.css

@@ -0,0 +1,27 @@
+.wk-tiny-color--customer {
+  color: #005af3;
+}
+
+.wk-tiny-color--contacts {
+  color: #1cb24c;
+}
+
+.wk-tiny-color--business {
+  color: #ff852f;
+}
+
+.wk-tiny-color--contract {
+  color: #ff4a43;
+}
+
+.wk-tiny-color--receivables {
+  color: #ffae46;
+}
+
+.wk-tiny-color--product {
+  color: #00d0d4;
+}
+
+.wk-tiny-color--common {
+  color: #2362fb;
+}

+ 27 - 0
public/static/tinymce/css/tiny-wk-word.css

@@ -0,0 +1,27 @@
+html {
+  height: 100%;
+  padding: 30px 0;
+  background: rgb(237, 237, 237);
+}
+
+body {
+  width: 595px;
+  min-height: 100%;
+  padding: 60px;
+  margin: 0 auto;
+  font-family:
+    simsun,
+    serif,
+    -apple-system,
+    BlinkMacSystemFont,
+    "Segoe UI",
+    Roboto,
+    Oxygen,
+    Ubuntu,
+    Cantarell,
+    "Open Sans",
+    "Helvetica Neue",
+    sans-serif;
+  background: white;
+  border: 1px solid rgb(210, 213, 216);
+}

+ 12 - 0
public/static/tinymce/css/tiny-wukong.css

@@ -0,0 +1,12 @@
+#wk-knowledge-content-wukong {
+  margin-block-start: 0;
+  font-size: 30px;
+  font-weight: bold;
+}
+
+.mce-item-table,
+.mce-item-table caption,
+.mce-item-table td,
+.mce-item-table th {
+  border: none !important;
+}

+ 165 - 0
src/App.vue

@@ -0,0 +1,165 @@
+<template>
+  <div id="app">
+    <wk-system-alert v-if="systemAlertShow" />
+    <router-view class="router-view" />
+    <incoming-windows @sendMsg="getInfo" />
+    <call-out-windows
+      :is-show="showOutCall"
+      :model-data="modelData"
+      @close="showCall = false" />
+  </div>
+</template>
+
+<script>
+
+import WkSystemAlert from '@/components/WkSystemAlert'
+
+import { mapGetters } from 'vuex'
+import IncomingWindows from './callCenter/IncomingWindows'
+import CallOutWindows from './callCenter/CallOutWindows'
+import cache from '@/utils/cache'
+// import Lockr from 'lockr'
+
+export default {
+  name: 'App',
+  components: {
+    IncomingWindows,
+    CallOutWindows,
+    WkSystemAlert
+  },
+  mixins: [],
+  data() {
+    return {
+      showCall: false,
+      modelData: {},
+
+      bottomAlertShow: false
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'addRouters',
+      'userInfo',
+      'systemAlertShow',
+      'moduleData'
+    ]),
+    showOutCall() {
+      if (this.$store.state.crm.isCall) {
+        return this.$store.state.crm.showCallOut
+      }
+      return false
+    },
+
+    hideBottomAlert() {
+      // 如果是注册 link 不展示底部弹框
+      return this.$route.name === 'register' || this.$route.name === 'link'
+    }
+  },
+  watch: {
+    $route(to, from) {
+      const { meta, params, name } = to
+      console.log(to)
+      let title = this.WKConfig.companyName
+      if (meta.title) {
+        title += ' - ' + meta.title
+      } else if (params && params.title) {
+        title += ' - ' + params.title
+      }
+      document.title = title
+
+      this.$wkPreviewFile.closeViewer() // 切换页面隐藏图片预览
+    },
+
+    addRouters() {
+    }
+  },
+  mounted() {
+    this.addDocumentVisibilityChange()
+  },
+  methods: {
+    /**
+     * @description: 当前标签再次显现进行的处理逻辑
+     * @param {*}
+     * @return {*}
+     */
+    addDocumentVisibilityChange() {
+      // 网页当前状态判断
+      // hidden,
+      var state, visibilityChange
+      if (typeof document.hidden !== 'undefined') {
+        // hidden = 'hidden'
+        visibilityChange = 'visibilitychange'
+        state = 'visibilityState'
+      } else if (typeof document.mozHidden !== 'undefined') {
+        // hidden = 'mozHidden'
+        visibilityChange = 'mozvisibilitychange'
+        state = 'mozVisibilityState'
+      } else if (typeof document.msHidden !== 'undefined') {
+        // hidden = 'msHidden'
+        visibilityChange = 'msvisibilitychange'
+        state = 'msVisibilityState'
+      } else if (typeof document.webkitHidden !== 'undefined') {
+        // hidden = 'webkitHidden'
+        visibilityChange = 'webkitvisibilitychange'
+        state = 'webkitVisibilityState'
+      }
+      // 添加监听器,在title里显示状态变化
+      document.addEventListener(visibilityChange, () => {
+        if (document[state] == 'visible') {
+          if (cache.updateAxiosHeaders() && this.$route.name === 'login') {
+            window.location.reload()
+          }
+        }
+        this.$bus.emit('document-visibility', document[state])
+      }, false)
+    },
+
+    /**
+     * @description: 获取呼出信息
+     * @param {*} data
+     * @return {*}
+     */
+    getInfo(data) {
+      this.modelData = data
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+#app {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  min-width: 1200px;
+  height: 100%;
+  min-height: 605px;
+
+  .system-alert {
+    position: fixed;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 4;
+    min-height: 48px;
+    line-height: 48px;
+    text-align: center;
+    pointer-events: none;
+    background-color: rgba($color: #0065ff, $alpha: 0.17);
+    border-radius: 0;
+
+    &__content {
+      pointer-events: auto;
+
+      .el-button {
+        margin-left: 8px;
+      }
+
+      .is-primary {
+        color: $--color-primary;
+      }
+    }
+  }
+}
+</style>

+ 135 - 0
src/api/admin/accountBook.js

@@ -0,0 +1,135 @@
+import request from '@/utils/request'
+
+// 查询账套管理列表页数据
+export function queryPageList() {
+  return request({
+    url: 'financeAccountSet/queryPageList',
+    method: 'post'
+  })
+}
+// 查询账单授权员工根据id
+export function getUserByaccountId(data) {
+  return request({
+    url: 'financeAccountSet/getUserByAccountId',
+    method: 'post',
+    data
+  })
+}
+// 查询账单详情根据id
+export function getAccountSetById(data) {
+  return request({
+    url: 'financeAccountSet/getAccountSetById',
+    method: 'post',
+    data
+  })
+}
+// 保存数据
+export function addAccount(data) {
+  return request({
+    url: 'financeAccountSet/addAccount',
+    method: 'post',
+    data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+// 编辑数据保存
+export function updateAccount(data) {
+  return request({
+    url: 'financeAccountSet/updateAccount',
+    method: 'post',
+    data,
+    headers: {
+      'Content-Type': 'application/json'
+    }
+  })
+}
+// 删除账套授权员工
+export function deleteAccountUser(data) {
+  return request({
+    url: 'financeAccountSet/deleteAccountUser',
+    method: 'post',
+    data,
+    headers: {
+      'Content-Type': 'application/json'
+    }
+  })
+}
+
+// 保存账套授权员工
+export function saveAccountAuth(data) {
+  return request({
+    url: 'financeAccountSet/saveAccountAuth',
+    method: 'post',
+    data,
+    headers: {
+      'Content-Type': 'application/json'
+    }
+  })
+}
+// 账套授权角色关联员工
+export function accountUserRole(data) {
+  return request({
+    url: 'adminRole/accountUserRole',
+    method: 'post',
+    data,
+    headers: {
+      'Content-Type': 'application/json'
+    }
+  })
+}
+
+// 创建账套
+export function saveAccountSet(data) {
+  return request({
+    url: 'financeAccountSet/saveAccountSet',
+    method: 'post',
+    data,
+    headers: {
+      'Content-Type': 'application/json'
+    }
+  })
+}
+
+/**
+ * 获取帐套切换列表
+ */
+export function getAccountSetListAPI(data) {
+  return request({
+    url: '/financeAccountSet/getAccountSetList',
+    method: 'post'
+  })
+}
+
+/**
+ * 切换帐套
+ */
+export function switchAccountSetAPI(data) {
+  return request({
+    url: '/financeAccountSet/switchAccountSet',
+    method: 'post',
+    data
+  })
+}
+
+/**
+ * 获取筛选本位币列表
+ */
+export function queryListByAccountId(data) {
+  return request({
+    url: '/financeCurrency/queryListByAccountId',
+    method: 'post',
+    data
+  })
+}
+
+/**
+ * 查询财务管理角色
+ */
+export function getFinanceRoleByTypeAPI(data) {
+  return request({
+    url: `/financeAccountSet/getFinanceRoleByType/${data.type}`,
+    method: 'post'
+  })
+}

+ 46 - 0
src/api/admin/application.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+/**
+ * 应用列表接口
+ * @param {*} data
+ *
+ */
+export function adminConfigsetIndexAPI(data) {
+  return request({
+    url: 'adminConfig/queryModuleSetting',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 应用状态改变
+ * @param {*} data
+ * id 应用ID
+ * status 1开启 0关闭
+ */
+export function adminConfigsetUpdateAPI(data) {
+  return request({
+    url: 'adminConfig/setModuleSetting',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 试用应用
+ * @param {*}
+ */
+export function adminPayTestUseModuleListAPI(data) {
+  return request({
+    url: 'adminPay/testUseModuleList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 83 - 0
src/api/admin/config.js

@@ -0,0 +1,83 @@
+import request from '@/utils/request'
+
+/**
+ * 企业首页
+ * @param {*} data
+ */
+export function adminSystemSaveAPI(data) {
+  return request({
+    url: 'adminConfig/setAdminConfig',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 企业首页
+ * @param {*} data
+ */
+export function adminSystemIndexAPI(data) {
+  return request({
+    url: 'adminConfig/queryAdminConfig',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 呼叫中心是否开启
+ * @param {*} data
+ */
+export function adminSystemCallSetAPI(data) {
+  return request({
+    url: 'adminConfig/queryCallModuleSetting',
+    method: 'post',
+    data: data
+  })
+}
+
+// /**
+//  * 忽略系统消息
+//  * @param {*} data
+//  */
+// export function adminConfigIgnoreCompanyStatusAPI() {
+//   return request({
+//     url: 'adminConfig/ignoreCompanyStatus',
+//     method: 'post'
+//   })
+// }
+
+/**
+ * 查询自定义配置
+ * @param {*} data
+ * CRM下的模块按照 pcCRM + crmType 的规则
+ */
+export const PcCustomKeys = {
+  pcRegisterStatistics: 'pcRegisterStatistics', // 注册页面配置信息
+  pcCRMprefix: 'pcCRM'
+}
+
+export function adminConfigQueryCustomSettingAPI(key) {
+  return request({
+    url: `adminConfig/queryCustomSetting/${key}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 设置自定义配置
+ * @param {*} data
+ */
+export function adminConfigSetCustomSettingAPI(key, data) {
+  return request({
+    url: `adminConfig/setCustomSetting/${key}`,
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 778 - 0
src/api/admin/crm.js

@@ -0,0 +1,778 @@
+import request from '@/utils/request'
+
+// 阶段流程配置
+/**
+ * 保存阶段流程
+ * @param {*} data
+ */
+export function crmFlowSaveAPI(data) {
+  return request({
+    url: 'crmFlow/save',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+/**
+ * 查询阶段流程
+ * @param {*} data
+ */
+export function crmFlowQueryListAPI(data) {
+  return request({
+    url: 'crmFlow/queryList',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+/**
+ * 修改阶段流程状态
+ * @param {*} data
+ */
+export function crmFlowUpdateStatusAPI(data) {
+  return request({
+    url: `crmFlow/updateStatus/${data.flowId}`,
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 查询当前类型下是否存在启用的流程
+ */
+export function crmFlowQueryActiveAPI(data) {
+  return request({
+    url: `/crmFlow/queryActiveFlowName/${data.label}`,
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 阶段流程详情
+ * @param {*} data
+ */
+export function crmFlowFlowInfoAPI(data) {
+  return request({
+    url: `crmFlow/flowInfo/${data.flowId}`,
+    method: 'post',
+    data: data
+  })
+}
+
+export function businessGroupListAPI(data) {
+  return request({
+    url: 'crmBusinessType/queryBusinessTypeList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function businessGroupAddAPI(data) {
+  return request({
+    url: 'crmBusinessType/setBusinessType',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 商机状态组状态修改
+ * @param {*} data
+ */
+export function businessGroupUpdateStatusAPI(data) {
+  return request({
+    url: 'crmBusinessType/updateStatus',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 商机状态组详情
+ * @param {*} data
+ */
+export function businessGroupReadAPI(data) {
+  return request({
+    url: 'crmBusinessType/getBusinessType',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 商机状态组编辑
+ * @param {*} data
+ */
+export function businessGroupUpdateAPI(data) {
+  return request({
+    url: 'crmBusinessType/setBusinessType',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 商机状态组删除
+ * @param {*} data
+ */
+export function businessGroupDeleteAPI(data) {
+  return request({
+    url: 'crmBusinessType/deleteById',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 自定义字段(字段数据)的添加编辑操作
+ * @param {*} data
+ */
+export function customFieldHandleAPI(data) {
+  return request({
+    url: 'crmField/saveField',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 自定义字段(字段数据)的详情
+ * @param {*} data
+ */
+export function customFieldListAPI(data) {
+  return request({
+    url: `crmField/list/${data.label}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 办公审批的自定义字段
+ * @param {*} data
+ */
+export function oaExamineFieldListAPI(data) {
+  return request({
+    url: `oaExamineField/queryField/${data.categoryId}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 办公审批自定义字段保存
+ * @param {*} data
+ */
+export function oaFieldHandleAPI(data) {
+  return request({
+    url: 'oaExamineField/saveField',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 自定义字段(字段数据)的列表更新时间
+ * @param {*} data
+ */
+export function customFieldIndexAPI(data) {
+  return request({
+    url: 'crmField/queryFields',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 产品类别 数据获取
+ * @param {*} data
+ */
+export function productCategoryIndexAPI(data) {
+  return request({
+    url: 'crmProductCategory/queryList',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 产品分类添加
+ * @param {*} data
+ */
+export function productCategorySaveAPI(data) {
+  const url = data.categoryId ? 'update' : 'save'
+  return request({
+    url: 'crmProductCategory/' + url,
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品分类删除
+ * @param {*} data
+ */
+export function productCategoryDeleteAPI(data) {
+  return request({
+    url: `crmProductCategory/deleteById/${data.id}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 客户保护规则
+ * @param {*} data
+ */
+export function crmSettingConfigAPI(data) {
+  return request({
+    url: 'crmCustomer/updateRulesSetting',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 客户保护规则
+ * @param {*} data
+ */
+export function crmSettingConfigDataAPI(data) {
+  return request({
+    url: 'crmCustomer/getRulesSetting',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 部门业绩目标列表
+ * @param {*} data
+ */
+export function crmAchievementIndex(data) {
+  return request({
+    url: 'crmAchievement/queryAchievementList',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 业绩目标编辑接口
+ * @param {*} data
+ */
+export function crmAchievementUpdate(data) {
+  return request({
+    url: 'crmAchievement/setAchievement',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 新增业绩目标
+ * @param {*} data
+ */
+export function crmAchievementAdd(data) {
+  return request({
+    url: 'crmAchievement/addAchievement',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 删除业绩目标
+ * @param {*} data
+ */
+export function crmAchievementDelete(data) {
+  return request({
+    url: 'crmAchievement/deleteAchievement',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 记录类型 数据
+ * @param {*} data
+ */
+export function crmSettingRecordListAPI(data) {
+  return request({
+    url: 'crmActionRecord/queryRecordOptions',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 记录类型 编辑
+ * @param {*} data
+ */
+export function crmSettingRecordEditAPI(data) {
+  return request({
+    url: 'adminConfig/setRecordOptions',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 合同到期提醒 设置
+ * @param {*} data
+ */
+export function crmSettingContractDayAPI(data) {
+  return request({
+    url: 'crmContract/setContractConfig',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 拥有、锁定客户数限制
+ * @param {*} data
+ */
+export function crmSettingCustomerConfigListAPI(data) {
+  return request({
+    url: 'crmCustomer/queryCustomerSetting',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 拥有、锁定客户数限制 - 创建 编辑
+ * @param {*} data
+ */
+export function crmSettingCustomerConfigSetAPI(data) {
+  return request({
+    url: 'crmCustomer/customerSetting',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 拥有、锁定客户数限制 - 删除
+ * @param {*} data
+ */
+export function crmSettingCustomerConfigDelAPI(data) {
+  return request({
+    url: 'crmCustomer/deleteCustomerSetting',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 客户回访查询
+ * @param {*} data
+ */
+export function returnVisitConfigQueryAPI(data) {
+  return request({
+    url: 'crmReturnVisit/queryReturnVisitRemindConfig',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 客户回访设置
+ * @param {*} data
+ */
+export function returnVisitConfigSetAPI(data) {
+  return request({
+    url: 'crmReturnVisit/updateReturnVisitRemindConfig',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 编号查询
+ * @param {*} data
+ */
+export function sysConfigNumberQueryAPI(data) {
+  return request({
+    url: 'crmNumberSetting/queryNumberSetting',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 编号设置
+ * @param {*} data
+ */
+export function sysConfigNumberSetAPI(data) {
+  return request({
+    url: 'crmNumberSetting/setNumberSetting',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/** ****************自定义模板***********************/
+
+/**
+ * 查询 打印模板列表
+ * @param {*} data
+ */
+export function printTemplateListAPI(data) {
+  return request({
+    url: 'crmPrint/queryPrintTemplateList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 查询指定打印模板
+ * templateId
+ * @param {*} data
+ */
+export function printTemplateByIdAPI(data) {
+  return request({
+    url: 'crmPrint/queryPrintTemplateById',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 添加模板 打印模板
+ * templateName 模板名称
+ * type 关联对象
+ * content模板
+ * @param {*} data
+ */
+export function printAddTemplateAPI(data) {
+  return request({
+    url: 'crmPrint/addPrintTemplate',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 编辑模板 打印模板
+ * templateName 模板名称
+ * type 关联对象
+ * content模板
+ * @param {*} data
+ */
+export function printUpdateTemplateAPI(data) {
+  return request({
+    url: 'crmPrint/updatePrintTemplate',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 删除指定打印模板
+ * templateId
+ * @param {*} data
+ */
+export function printDeleteTemplateAPI(data) {
+  return request({
+    url: 'crmPrint/deletePrintTemplate',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 模块对应字段查询
+ * type
+ * @param {*} data
+ */
+export function printQueryFieldsAPI(data) {
+  return request({
+    url: 'crmPrint/queryFields',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 模板校准为内容
+ * type
+ * @param {*} data
+ */
+export function printPrintAPI(data) {
+  return request({
+    url: 'crmPrint/print',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 模板复制
+ * type
+ * @param {*} data
+ */
+export function printCopyTemplateAPI(data) {
+  return request({
+    url: 'crmPrint/copyTemplate',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 保存打印记录
+ * type
+ * @param {*} data
+ */
+export function printSaveRecordAPI(data) {
+  return request({
+    url: 'crmPrint/savePrintRecord',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 查询打印记录
+ * type
+ * @param {*} data
+ */
+export function printQueryPrintRecordAPI(data) {
+  return request({
+    url: 'crmPrint/queryPrintRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 打印记录详情
+ * type
+ * @param {*} data
+ */
+export function printRecordDetailAPI(data) {
+  return request({
+    url: 'crmPrint/queryPrintRecordById',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 打印预览
+ * type
+ * @param {*} data
+ */
+export function printPreviewAPI(data) {
+  return request({
+    url: 'crmPrint/preview',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 市场活动删除表单
+ * type
+ * @param {*} data
+ */
+export function crmMarketingFormDeleteAPI(data) {
+  return request({
+    url: 'crmMarketingForm/delete',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 市场活动分页查询表单列表
+ * type
+ * @param {*} data
+ */
+export function crmMarketingFormPageAPI(data) {
+  return request({
+    url: 'crmMarketingForm/page',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 市场活动查询表单列表
+ * type
+ * @param {*} data
+ */
+export function crmMarketingFormListAPI(data) {
+  return request({
+    url: 'crmMarketingForm/list',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 市场活动添加或修改表单
+ * type
+ * @param {*} data
+ */
+export function crmMarketingFormSaveOrUpdateAPI(data) {
+  return request({
+    url: 'crmMarketingForm/saveOrUpdate',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 市场活动表单修改状态
+ * type
+ * @param {*} data
+ */
+export function crmMarketingFormUpdateStatusAPI(data) {
+  return request({
+    url: 'crmMarketingForm/updateStatus',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 市场活动表单查询新增或编辑字段
+ * @param {*} data
+ */
+export function crmMarketingFieldListAPI(data) {
+  return request({
+    url: `crmMarketingField/queryField/${data.id}`,
+    method: 'post'
+  })
+}
+/**
+ * 市场活动表单查询新增或编辑字段
+ * @param {*} data
+ */
+export function crmMarketingNewFieldListAPI(data) {
+  return request({
+    url: `crmMarketingField/queryNewField/${data.id}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 保存自定义字段
+ * @param {*} data
+ */
+export function crmMarketingFieldHandleAPI(data) {
+  return request({
+    url: 'crmMarketingField/saveField',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 业绩目标导入
+ * @param {*} data
+ *
+ */
+export function biAchievementExcelImportAPI(data) {
+  var param = new FormData()
+  Object.keys(data).forEach(key => {
+    param.append(key, data[key])
+  })
+  return request({
+    url: 'crmAchievement/excelImport',
+    method: 'post',
+    data: param,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  })
+}
+/**
+ * 业绩目标导入模板下载
+ * @param {*} data
+ *
+ */
+export const biAchievementExcelDownloadURL = process.env.VUE_APP_BASE_API + 'crmAchievement/downloadExcel'
+export function biAchievementDownloadExcelAPI(data) {
+  return request({
+    url: 'crmAchievement/downloadExcel',
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 业绩目标查看错误数据接口
+ * @param {*} data
+ */
+export function biAchievementDownExcelAPI(data) {
+  return request({
+    url: 'crmAchievement/downExcel',
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}

+ 258 - 0
src/api/admin/employeeDep.js

@@ -0,0 +1,258 @@
+import request from '@/utils/request'
+
+export function depDeleteAPI(data) {
+  return request({
+    url: 'adminDept/deleteDept/' + data.id,
+    method: 'post'
+  })
+}
+
+export function depEditAPI(data) {
+  return request({
+    url: 'adminDept/setDept',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function depSaveAPI(data) {
+  return request({
+    url: 'adminDept/addDept',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function userEditAPI(params) {
+  return request({
+    url: 'adminUser/setUser',
+    method: 'post',
+    data: params,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function userAddAPI(params) {
+  return request({
+    url: 'adminUser/addUser',
+    method: 'post',
+    data: params,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+// 角色列表
+export function roleListAPI(data) {
+  return request({
+    url: 'adminRole/getAllRoleList',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询系统默认角色
+export function adminRoleQueryDefaultAPI() {
+  return request({
+    url: 'adminRole/queryDefaultRole',
+    method: 'post'
+  })
+}
+
+// 部分角色列表
+export function adminRoleGetRoleListAPI(data) {
+  return request({
+    url: 'adminRole/getRoleList',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 查询配置的角色范围
+ * @param {*} data
+ * @returns
+ */
+export function adminRoleQueryAuthRoleAPI(roleId) {
+  return request({
+    url: `adminRole/queryAuthRole/${roleId}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 更新配置的角色范围
+ * @param {*} data
+ * @returns
+ */
+export function adminRoleUpdateAuthRoleAPI(roleId, data) {
+  return request({
+    url: `adminRole/updateAuthRole/${roleId}`,
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 批量修改密码接口
+ * @param {*} data
+ * password
+ * id 用户数组
+ */
+export function adminUsersUpdatePwdAPI(data) {
+  return request({
+    url: 'adminUser/resetPassword',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 编辑登录名
+ * @param {*} data
+ * username
+ * password
+ * id
+ */
+export function adminUsersUsernameEditAPI(data) {
+  return request({
+    url: 'adminUser/usernameEdit',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 编辑登录名
+ * @param {*} data
+ * username
+ * password
+ * id
+ * 可修改管理员
+ */
+export function adminUsersManagerUsernameEditAPI(data) {
+  return request({
+    url: 'adminUser/usernameEditByManager',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 用户状态修改
+ * @param {*} data
+ */
+export function usersEditStatusAPI(data) {
+  return request({
+    url: 'adminUser/setUserStatus',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 用户导入模板
+ * @param {*} data
+ */
+export const userImportTemplateURL = 'https://www.72crm.com/npm/static/user_import.xlsx'
+export function userImportTemplateAPI(data) {
+  return request({
+    url: 'adminUser/downloadExcel',
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 用户导入
+ * @param {*} data
+ */
+export function userExcelImportAPI(data) {
+  var param = new FormData()
+  Object.keys(data).forEach(key => {
+    param.append(key, data[key])
+  })
+  return request({
+    url: 'adminUser/excelImport',
+    method: 'post',
+    data: param,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    },
+    timeout: 60000
+  })
+}
+
+/**
+ * 下载用户导入错误数据
+ * @param {*} data
+ *
+ */
+export function userErrorExcelDownAPI(data) {
+  return request({
+    url: 'adminUser/downExcel',
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 呼叫中心状态是否启用
+ * @param {*} data
+ */
+export function crmCallAuthorizeAPI(data) {
+  return request({
+    url: 'crmCall/authorize',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 重置部门
+ * @param {*} data
+ */
+export function adminUserSetUserDeptPI(data) {
+  return request({
+    url: 'adminUser/setUserDept',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 员工数量
+ * @param {*} data
+ */
+export function adminUserCountNumOfUserAPI() {
+  return request({
+    url: 'adminUser/countNumOfUser',
+    method: 'post'
+  })
+}

+ 134 - 0
src/api/admin/file.js

@@ -0,0 +1,134 @@
+/*
+ * @Description: 悟空软件
+ * @Author: 悟空
+ * @Date: 2020-06-03 09:10:23
+ * @LastEditTime: 2020-07-01 10:23:57
+ * @LastEditors: yang
+ */
+import request from '@/utils/request'
+
+/**
+ * 通过批次ID删除文件
+ */
+export function adminFileDeleteByBatchIdAPI(data) {
+  return request({
+    url: 'adminFile/deleteByBatchId',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 通过ID删除文件
+ */
+export function adminFileDeleteByIdAPI(id) {
+  return request({
+    url: `adminFile/deleteById/${id}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 下载文件接口
+ */
+export function adminFileDownAPI(id) {
+  return request({
+    url: `adminFile/down/${id}`,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 通过adminFile/down/${id}下载文件接口
+ * 后期使用 暂用 downloadFileAPI
+ */
+export function adminFileDownByUrlAPI(url) {
+  return request({
+    url: url,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 通过ID查询文件
+ */
+export function adminFileQueryByIdAPI(id) {
+  return request({
+    url: `adminFile/queryById/${id}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 通过批次ID查询文件列表
+ */
+export function adminFileQueryFileListAPI(id) {
+  return request({
+    url: `adminFile/queryFileList/${id}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 通过批次ID查询单个文件
+ */
+export function adminFileQueryOneByBatchIdAPI(id) {
+  return request({
+    url: `adminFile/queryOneByBatchId/${id}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 修改附件名称
+ * @param {*} data
+ */
+export function adminFileRenameFileAPI(data) {
+  return request({
+    url: 'adminFile/renameFileById',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 上传文件
+ */
+export function adminFileUploadAPI(data) {
+  var param = new FormData()
+  Object.keys(data).forEach(key => {
+    param.append(key, data[key])
+  })
+  return request({
+    url: 'adminFile/upload',
+    method: 'post',
+    data: param,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  })
+}
+
+/**
+ * 新附件预览
+ */
+export function adminFilePreviewAPI(data) {
+  const fileUrl = data.fileUrl
+  delete data.fileUrl
+  data.htmlName = 'obopom - CRM'
+  data.htmlTitle = 'obopom - CRM'
+  return request({
+    baseURL: '/api-file/',
+    url: `composite/httpfile?${fileUrl}`,
+    method: 'post',
+    data
+  })
+}

+ 31 - 0
src/api/admin/init.js

@@ -0,0 +1,31 @@
+import request from '@/utils/request'
+
+/**
+ * 验证密码
+ * @param {*} data
+ */
+export function adminConfigVerifyPasswordAPI(data) {
+  return request({
+    url: 'adminConfig/verifyPassword',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 模块初始化
+ * @param {*} data
+ */
+export function adminConfigModuleInitDataAPI(data) {
+  return request({
+    url: 'adminConfig/moduleInitData',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}

+ 65 - 0
src/api/admin/log.js

@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+
+/**
+ * 查询系统登录日志列表页接口
+ * @param {*} data
+ */
+export function queryLoginLogListAPI(data) {
+  return request({
+    url: 'adminSysLog/queryLoginLogPageList',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 系统登录日志导出
+ * @param {*} data
+ */
+export function loginLogExportAPI(data) {
+  return request({
+    url: 'adminSysLog/exportLoginLog',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    timeout: 60000
+  })
+}
+
+/**
+ * 查看系统操作日志接口
+ * @param {*} data
+ */
+export function querySystemLogListAPI(data) {
+  return request({
+    url: 'adminSysLog/querySysLogPageList',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 系统操作日志导出
+ * @param {*} data
+ */
+export function systemLogExportAPI(data) {
+  return request({
+    url: 'adminSysLog/exportSysLog',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    timeout: 60000
+  })
+}

+ 28 - 0
src/api/admin/messageConfig.js

@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+/**
+ * 查询列表
+ * type 类型 1:crm 3:进销存
+ * @param {*} data
+ */
+export function adminMessageConfigQueryAPI(type) {
+  return request({
+    url: `adminMessageConfig/queryList/${type}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 修改配置
+ * @param {*} data
+ */
+export function adminMessageConfigUpdateAPI(data) {
+  return request({
+    url: 'adminMessageConfig/updateConfig',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 55 - 0
src/api/admin/oa.js

@@ -0,0 +1,55 @@
+import request from '@/utils/request'
+
+/**
+ * 审批类型列表
+ * @param {*} data
+ */
+export function oaExamineCategoryListAPI(data) {
+  return request({
+    url: 'oaExamineCategory/queryExamineCategoryList',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 审批类型的创建
+ * @param {*} data
+ */
+export function oaExamineCategorySaveAPI(data) {
+  return request({
+    url: 'oaExamineCategory/setExamineCategory',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 审批删除
+ * @param {*} data
+ */
+export function oaExamineCategoryDeleteAPI(data) {
+  return request({
+    url: 'oaExamineCategory/deleteExamineCategory',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 审批状态(启用、停用)
+ * @param {*} data
+ */
+export function oaExamineCategoryEnablesAPI(data) {
+  return request({
+    url: 'oaExamineCategory/updateStatus',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 108 - 0
src/api/admin/other.js

@@ -0,0 +1,108 @@
+import request from '@/utils/request'
+
+/**
+ * 设置日志欢迎语 oaCalendar/addOrUpdate
+ * @param {*} data
+ */
+export function sysSetLogWelcomeAPI(data) {
+  return request({
+    url: 'adminConfig/setLogWelcomeSpeech',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 设置日志欢迎语
+ * @param {*} data
+ */
+export function sysGetLogWelcomeListAPI(data) {
+  return request({
+    url: 'adminConfig/getLogWelcomeSpeechList',
+    method: 'post',
+    data: data
+  })
+}
+
+// /**
+//  * 根据id删除日志欢迎语
+//  * @param {*} data
+//  */
+// export function sysDeleteConfigByIdAPI(data) {
+//   return request({
+//     url: 'sysConfig/deleteConfigById',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+/**
+ * 添加/修改日程类型
+ * @param {*} data
+ */
+export function calendarAddOrUpdateAPI(data) {
+  return request({
+    url: 'oaCalendar/addOrUpdate',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 查询日程类型
+ * @param {*} data
+ */
+export function calendarQueryTypeListAPI(data) {
+  return request({
+    url: 'oaCalendar/queryTypeList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 删除日程类型
+ * @param {*} typeId
+ */
+export function calendarDeleteAPI(typeId) {
+  return request({
+    url: `oaCalendar/delete/${typeId}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 查询日志规则接口
+ * @param {*} data
+ */
+export function oaLogRuleQueryAPI(data) {
+  return request({
+    url: 'oaLog/queryOaLogRuleList',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 设置日志规则接口
+ * @param {*} data
+ */
+export function oaLogRuleSetAPI(data) {
+  return request({
+    url: 'oaLog/setOaLogRule',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data
+  })
+}

+ 173 - 0
src/api/admin/role.js

@@ -0,0 +1,173 @@
+import request from '@/utils/request'
+
+// export function roleListFun(data) {
+//   return request({
+//     url: 'adminRole/getAllRoleList',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+// export function rulesList(data) {
+//   return request({
+//     url: 'adminMenu/getAllMenuList',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+export function roleAddAPI(data) {
+  return request({
+    url: 'adminRole/add',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function roleDeleteAPI(data) {
+  return request({
+    url: 'adminRole/delete',
+    method: 'post',
+    data: data
+  })
+}
+
+export function roleUpdateAPI(data) {
+  return request({
+    url: 'adminRole/update',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function updateRoleMenuAPI(data) {
+  return request({
+    url: 'adminRole/updateRoleMenu',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 角色复制
+ * @param {*} data
+ */
+export function roleCopyAPI(data) {
+  return request({
+    url: 'adminRole/copy',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 复制员工角色
+ * @param {*} data
+ */
+export function adminRoleRelatedDeptUserAPI(data) {
+  return request({
+    url: 'adminRole/relatedDeptUser',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 添加编辑员工
+ * @param {*} data
+ */
+export function adminRoleRelatedUserAPI(data) {
+  return request({
+    url: 'adminRole/relatedUser',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}
+
+/**
+ * 删除员工
+ * @param {*} data
+ */
+export function unbindingUserAPI(data) {
+  return request({
+    url: 'adminRole/unbindingUser',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 角色分类列表
+ * @param {*} data
+ */
+export function adminGroupsTypeListAPI(data) {
+  return request({
+    url: 'adminRole/getRoleTypeList',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 参数 roleType   根据角色类型查询角色列表
+ * @param {*} roleType
+ */
+export function systemRoleByTypeAPI(roleType) {
+  return request({
+    url: `adminRole/getRoleByType/${roleType}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 规则
+ * @param {*} roleType
+ */
+export function systemRuleByTypeAPI(roleType) {
+  return request({
+    url: `adminMenu/getMenuListByType/${roleType}`,
+    method: 'post'
+  })
+}
+
+/**
+ * 查询字段授权设置
+ * @param {*} data
+ */
+export function systemRoleGetFieldAPI(data) {
+  return request({
+    url: 'crmField/queryRoleField',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 模块设置字段授权
+ * @param {*} data
+ */
+export function systemRoleSetFieldAPI(data) {
+  return request({
+    url: 'crmField/saveRoleField',
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: data
+  })
+}

+ 43 - 0
src/api/admin/user.js

@@ -0,0 +1,43 @@
+/**
+ * Created by yxk at 2020/6/5
+ */
+import request from '@/utils/request'
+
+/**
+ * 从人力资源添加员工
+ */
+export function hrmAddUserAPI(data) {
+  return request({
+    url: 'adminUser/hrmAddUser',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 查询部门用户列表
+ */
+export function adminUserQueryDeptUserByHrmAPI(data) {
+  return request({
+    url: 'adminUser/queryDeptUserListByHrm',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 查询部门员工列表
+ * @param {*} data
+ */
+export function adminUserQueryByDeptAPI(deptId) {
+  return request({
+    url: `adminUser/queryDeptUserList/${deptId}`,
+    method: 'post'
+  })
+}

+ 25 - 0
src/api/adminCompanyManager.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+/**
+ * 域名配置
+ * @param {*} data
+ */
+export function adminCompanyManagerSetDomainAPI(data) {
+  return request({
+    url: 'adminCompanyManager/setCompanyDoMain',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 根据域名查询logo和名称
+ * @param {*} data
+ */
+export function adminCompanyManagerQueryLogoAPI(data) {
+  return request({
+    url: 'adminCompanyManager/queryCompanyLogoByDomain',
+    method: 'post',
+    data: data
+  })
+}

+ 23 - 0
src/api/authorization.js

@@ -0,0 +1,23 @@
+import request from '@/utils/request'
+
+/**
+ * 登录二维码
+ * @param {*} data
+ */
+export function authorizationLoginQrCodeAPI() {
+  return request({
+    url: 'authorization/getLoginQrCode',
+    method: 'post'
+  })
+}
+
+/**
+ * 查询扫描结果
+ * @param {*} data
+ */
+export function authorizationLoginQrInfoAPI(token) {
+  return request({
+    url: `authorization/getLoginQrInfo/${token}`,
+    method: 'post'
+  })
+}

+ 135 - 0
src/api/bi/achievement.js

@@ -0,0 +1,135 @@
+import request from '@/utils/request'
+
+/**
+ * 合同数量分析/金额分析/回款金额分析
+ * count:合同数量分析;money:金额分析;back:回款金额分析
+ */
+export function biAchievementAnalysisAPI(data) {
+  const type = data.tableType
+  if (!type) return Promise.reject()
+  delete data.tableType
+  const url = {
+    count: 'biEmployee/contractNumStats',
+    money: 'biEmployee/contractMoneyStats',
+    back: 'biEmployee/receivablesMoneyStats'
+  }[type]
+  if (!url) return Promise.reject()
+  return request({
+    url,
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biAchievementAnalysisExportAPI(data) {
+  const type = data.tableType
+  if (!type) return Promise.reject()
+  delete data.tableType
+  const url = {
+    count: 'biEmployee/contractNumStatsExport',
+    money: 'biEmployee/contractMoneyStatsExport',
+    back: 'biEmployee/receivablesMoneyStatsExport'
+  }[type]
+  if (!url) return Promise.reject()
+  return request({
+    url,
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 合同汇总表
+ * @param {*} data
+ */
+export function biAchievementSummaryAPI(data) {
+  return request({
+    url: 'biEmployee/totalContract',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biAchievementSummaryExportAPI(data) {
+  return request({
+    url: 'biEmployee/totalContractExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 发票统计分析
+ * @param {*} data
+ */
+export function biAchievementInvoiceAPI(data) {
+  return request({
+    url: 'biEmployee/invoiceStats',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 发票统计分析导出
+ * @param {*} data
+ */
+export function biAchievementInvoiceExportAPI(data) {
+  return request({
+    url: 'biEmployee/invoiceStatsExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 发票详情列表
+ * @param {*} data
+ */
+export function biInvoiceDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchInvoicePageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 回款详情列表
+ * @param {*} data
+ */
+export function biReceivablesDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchReceivablesPageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+

+ 130 - 0
src/api/bi/bi.js

@@ -0,0 +1,130 @@
+import request from '@/utils/request'
+
+/**
+ * 业绩目标完成情况
+ * @param {*} data
+ */
+export function biAchievementStatisticsAPI(data) {
+  return request({
+    url: 'biAchievement/taskCompleteStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biAchievementStatisticsExportAPI(data) {
+  return request({
+    url: 'biAchievement/taskCompleteStatisticsExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品销售情况统计
+ * @param {*} data
+ */
+export function biProductStatisticsAPI(data) {
+  return request({
+    url: 'biProduct/productStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biProductStatisticsExportAPI(data) {
+  return request({
+    url: 'biProduct/productStatisticsExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售漏斗
+ * @param {*} data
+ */
+export function biBusinessFunnelAPI(data) {
+  return request({
+    url: 'biFunnel/sellFunnel',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 回访合同总数
+ * @param {*} data
+ */
+export function biContractSatisfactionTableAPI(data) {
+  return request({
+    url: 'crmBiSearch/employeesSatisfactionTable',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 回访合同总数
+ * @param {*} data
+ */
+export function biProductSatisfactionTableAPI(data) {
+  return request({
+    url: 'crmBiSearch/productSatisfactionTable',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 合同详情列表
+ * @param {*} data
+ */
+export function biContractDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchContractPageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 回访合同数详情列表
+ * @param {*} data
+ */
+export function biVisitContractDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/employeesSatisfactionTable',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 80 - 0
src/api/bi/business.js

@@ -0,0 +1,80 @@
+import request from '@/utils/request'
+
+/**
+ * 新增商机数与金额趋势分析
+ * @param {*} data
+ * year 年
+ * status 1销售(目标)2回款(目标)
+ * user_id 员工ID
+ * structure_id 部门ID
+ */
+export function biBusinessTrendAPI(data) {
+  return request({
+    url: 'biFunnel/addBusinessAnalyze',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 新增商机数与金额趋势分析 详情列表
+ * @param {*} data
+ */
+export function biBusinessTrendListAPI(data) {
+  return request({
+    url: 'biFunnel/sellFunnelList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 赢单机会转化率趋势分析
+ * @param {*} data
+ */
+export function biBusinessWinAPI(data) {
+  return request({
+    url: 'biFunnel/win',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 商机详情列表
+ * @param {*} data
+ */
+export function biBusinessDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchBusinessPageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 商机赢单、详情列表
+ * @param {*} data
+ */
+export function biBusinessWinOrFailDetailListAPI(data) {
+  return request({
+    url: 'crmInstrument/queryContendBusinessList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 82 - 0
src/api/bi/callCenter.js

@@ -0,0 +1,82 @@
+import request from '@/utils/request'
+
+/**
+ * 通话记录列表
+ * type
+ * structure_id: 部门id
+ * user_id 员工ID
+ * 分页
+ */
+export function crmCallIndexAPI(data) {
+  return request({
+    url: 'biCustomer/queryCallList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 通话记录统计分析
+ * type
+ * structure_id: 部门id
+ * user_id 员工ID
+ * 分页
+ */
+export function crmCallAnalysisAPI(data) {
+  return request({
+    url: 'biCustomer/queryCallAnalysis',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 下载
+ */
+export function crmCallDownloadAPI(data) {
+  return request({
+    url: 'crmCall/download',
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 搜索呼入电话
+ */
+export function crmCallInNumberSearchAPI(data) {
+  return request({
+    url: 'crmCall/searchPhone',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 查询客户模块电话号码
+ */
+export function crmCallQueryPhoneNumberAPI(data) {
+  return request({
+    url: 'crmCall/queryPhoneNumber',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 录音转文字
+ */
+// export function crmCallAudioToStrAPI(data) {
+//   return request({
+//     url: 'crmCall/queryPhoneNumber',
+//     method: 'post',
+//     data: data
+//   })
+// }

+ 386 - 0
src/api/bi/customer.js

@@ -0,0 +1,386 @@
+import request from '@/utils/request'
+
+/**
+ * 员工客户总量分析
+ */
+export function biCustomerTotalAPI(data) {
+  return request({
+    url: 'biCustomer/totalCustomerStats',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerTotalListAPI(data) {
+  return request({
+    url: 'biCustomer/totalCustomerTable',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerTotalListExportAPI(data) {
+  return request({
+    url: 'biCustomer/totalCustomerTableExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 员工客户跟进次数分析
+ * @param {*} data
+ */
+export function biCustomerRecordTimesAPI(data) {
+  return request({
+    url: 'biCustomer/customerRecordStats',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 员工客户跟进次数分析 具体员工列表
+ * @param {*} data
+ */
+export function biCustomerRecordListAPI(data) {
+  return request({
+    url: 'biCustomer/customerRecordInfo',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerRecordListExportAPI(data) {
+  return request({
+    url: 'biCustomer/customerRecordInfoExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 员工跟进方式分析
+ * @param {*} data
+ */
+export function biCustomerRecordModeAPI(data) {
+  return request({
+    url: 'biCustomer/customerRecodCategoryStats',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerRecordModeExportAPI(data) {
+  return request({
+    url: 'biCustomer/customerRecodCategoryStatsExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 客户转化率分析具体数据
+ * @param {*} data
+ */
+export function biCustomerConversionInfoAPI(data) {
+  return request({
+    url: 'biCustomer/customerConversionInfo',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 客户转化率分析
+ * @param {*} data
+ */
+export function biCustomerConversionAPI(data) {
+  return request({
+    url: 'biCustomer/customerConversionStats',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 公海客户分析
+ * @param {*} data
+ */
+export function biCustomerPoolAPI(data) {
+  return request({
+    url: 'biCustomer/poolStats',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 公海客户分析
+ * @param {*} data
+ */
+export function biCustomerPoolListAPI(data) {
+  return request({
+    url: 'biCustomer/poolTable',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerPoolListExportAPI(data) {
+  return request({
+    url: 'biCustomer/poolTableExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 员工客户成交周期
+ * @param {*} data
+ */
+export function biCustomerUserCycleAPI(data) {
+  return request({
+    url: 'biCustomer/employeeCycle',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerUserCycleExportAPI(data) {
+  return request({
+    url: 'biCustomer/employeeCycleInfoExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function employeeCycleInfoAPI(data) {
+  return request({
+    url: 'biCustomer/employeeCycleInfo',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 地区成交周期
+ * @param {*} data
+ */
+export function biCustomerAddressCycleAPI(data) {
+  return request({
+    url: 'biCustomer/districtCycle',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerAddressCycleExportAPI(data) {
+  return request({
+    url: 'biCustomer/districtCycleExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品成交周期
+ * @param {*} data
+ */
+export function biCustomerProductCycleAPI(data) {
+  return request({
+    url: 'biCustomer/productCycle',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerProductCycleExportAPI(data) {
+  return request({
+    url: 'biCustomer/productCycleExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 员工客户满意度分析
+ * @param {*} data
+ */
+export function biCustomerSatisfactionTableAPI(data) {
+  return request({
+    url: 'biCustomer/customerSatisfactionTable',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerSatisfactionTableExportAPI(data) {
+  return request({
+    url: 'biCustomer/customerSatisfactionExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 员工客户满意度分析
+ * @param {*} data
+ */
+export function biCustomerProductSatisfactionTableAPI(data) {
+  return request({
+    url: 'biCustomer/productSatisfactionTable',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biCustomerProductSatisfactionExportAPI(data) {
+  return request({
+    url: 'biCustomer/productSatisfactionExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 进入公海数
+ */
+export function crmCustomerEntryToSeasAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchPoolCustomer',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+/**
+ * 客户详情列表
+ * @param {*} data
+ * @returns
+ */
+export function biCustomerDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchCustomerPageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+/**
+ * 公海详情列表
+ * @param {*} data
+ * @returns
+ */
+export function biPoolDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchPoolCustomerPageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 跟进客户数
+ * @param {*} data
+ * @returns
+ */
+export function biCustomerFollowListAPI(data) {
+  return request({
+    url: 'crmBiSearch/queryCustomerRecordList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+

+ 48 - 0
src/api/bi/customerPortrayal.js

@@ -0,0 +1,48 @@
+import request from '@/utils/request'
+
+/**
+ * 城市分布分析
+ */
+export function biAchievementAnalysisAPI(data) {
+  return request({
+    url: 'biRanking/addressAnalyse',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biAchievementPortraitAPI(data) {
+  const type = data.type_analyse
+  if (type === 'industry') {
+    return request({
+      url: 'biRanking/portrait',
+      method: 'post',
+      data: data,
+      headers: {
+        'Content-Type': 'application/json;charset=UTF-8'
+      }
+    })
+  } else if (type === 'level') {
+    return request({
+      url: 'biRanking/portraitLevel',
+      method: 'post',
+      data: data,
+      headers: {
+        'Content-Type': 'application/json;charset=UTF-8'
+      }
+    })
+  } else if (type === 'source') {
+    return request({
+      url: 'biRanking/portraitSource',
+      method: 'post',
+      data: data,
+      headers: {
+        'Content-Type': 'application/json;charset=UTF-8'
+      }
+    })
+  }
+}
+

+ 479 - 0
src/api/bi/jxc.js

@@ -0,0 +1,479 @@
+/**
+ * Create by yxk at 2020/7/9 0009
+ */
+
+import request from '@/utils/request'
+
+/**
+ * 采购汇总统计
+ * @param {*} data
+ */
+export function jxcPurchasingStatisticsAPI(data) {
+  return request({
+    url: 'jxcPurchaseStatistics/purchasingStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 采购订单数列表
+ * @param {*} data
+ */
+export function jxcPurchaseStatisticsListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'time') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcPurchaseStatistics/queryPurchasingStatisticsList/${data.time}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 采购退货数列表
+ * @param {*} data
+ */
+export function jxcPurchaseStatisticsRetreatListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'time') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcPurchaseStatistics/queryRetreatStatisticsList/${data.time}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 采购供应商列表
+ * @param {*} data
+ */
+export function jxcPurchaseStatisticsSupplierListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'time') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcPurchaseStatistics/querySupplierPurchasingStatisticsList/${data.time}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 退货供应商列表
+ * @param {*} data
+ */
+export function jxcPurchaseStatisticsSupplierRetreattListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'time') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcPurchaseStatistics/querySupplierRetreatStatisticsList/${data.time}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品采购分析
+ * @param {*} data
+ */
+export function jxcProductPurchaseStatisticsAPI(data) {
+  return request({
+    url: 'jxcProductPurchaseStatistics/productPurchaseStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 采购分析统计(头部部分)
+ * @param {*} data
+ */
+export function jxcProductPurchaseStatisticsHeadAPI(data) {
+  return request({
+    url: 'jxcProductPurchaseStatistics/purchaseHeadStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 供应商采购分析(头部部分)
+ * @param {*} data
+ */
+export function jxcSupplierPurchaseStatisticsHeadAPI(data) {
+  return request({
+    url: 'jxcSupplierPurchaseStatistics/purchaseHeadStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 采购订单列表
+ * @param {*} data
+ */
+export function jxcProductPurchaseStatisticsListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'batchId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcProductPurchaseStatistics/queryPurchaseStatisticsList/${data.batchId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 采购退货列表
+ * @param {*} data
+ */
+export function jxcProductPurchaseStatisticsRetreatAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'batchId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcProductPurchaseStatistics/queryRetreatStatistics/${data.batchId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 供应商采购分析
+ * @param {*} data
+ */
+export function jxcSupplierPurchaseStatisticsAPI(data) {
+  return request({
+    url: 'jxcSupplierPurchaseStatistics/supplierPurchaseStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 供应商采购分析 采购订单列表
+ * @param {*} data
+ */
+export function jxcSupplierPurchaseStatisticsListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'supplierId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcSupplierPurchaseStatistics/queryPurchaseStatisticsList/${data.supplierId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 供应商采购分析 采购退货列表
+ * @param {*} data
+ */
+export function jxcSupplierPurchaseStatisticsRetreatAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'supplierId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcSupplierPurchaseStatistics/queryRetreatStatistics/${data.supplierId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售汇总分析
+ * @param {*} data
+ */
+export function jxcSaleStatisticsAPI(data) {
+  return request({
+    url: 'jxcSaleStatistics/saleStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售汇总分析 销售订单列表
+ * @param {*} data
+ */
+export function jxcSaleStatisticsListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'time') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcSaleStatistics/querySaleStatisticsList/${data.time}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售汇总分析 销售退货订单列表
+ * @param {*} data
+ */
+export function jxcSaleStatisticsRetreatListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'time') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcSaleStatistics/querySaleReturnStatisticsList/${data.time}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售分析 产品采购分析
+ * @param {*} data
+ */
+export function jxcProductSaleStatisticsAPI(data) {
+  return request({
+    url: 'jxcProductSaleStatistics/productSaleStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售分析 采购分析统计(头部部分)
+ * @param {*} data
+ */
+export function jxcProductSaleStatisticsHeadAPI(data) {
+  return request({
+    url: 'jxcProductSaleStatistics/saleHeadStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 客户销售分析(头部部分)
+ * @param {*} data
+ */
+export function jxcCustomerSaleStatisticsHeadAPI(data) {
+  return request({
+    url: 'jxcCustomerSaleStatistics/saleHeadStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售分析 订单销售列表
+ * @param {*} data
+ */
+export function jxcProductSaleStatisticsListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'batchId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcProductSaleStatistics/querySaleStatisticsList/${data.batchId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售分析 订单退货列表
+ * @param {*} data
+ */
+export function jxcProductSaleStatisticsRetreatAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'batchId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcProductSaleStatistics/querySaleReturnStatistics/${data.batchId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售分析 客户销售分析
+ * @param {*} data
+ */
+export function jxcCustomerSaleStatisticsAPI(data) {
+  return request({
+    url: 'jxcCustomerSaleStatistics/customerSaleStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售分析 销售订单列表
+ * @param {*} data
+ */
+export function jxcCustomerSaleStatisticsListAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'customerId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcCustomerSaleStatistics/querySaleStatisticsList/${data.customerId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 销售分析 退货订单列表
+ * @param {*} data
+ */
+export function jxcCustomerSaleStatisticsRetreatAPI(data) {
+  const result = {}
+  Object.keys(data).forEach(key => {
+    if (key != 'customerId') {
+      result[key] = data[key]
+    }
+  })
+  return request({
+    url: `jxcCustomerSaleStatistics/querySaleReturnStatistics/${data.customerId}`,
+    method: 'post',
+    data: result,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品分析
+ * @param {*} data
+ */
+export function jxcProductStatisticsAPI(data) {
+  return request({
+    url: 'jxcProductStatistics/productStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 采购分析统计(头部部分)
+ * @param {*} data
+ */
+export function jxcProductStatisticsHeadAPI(data) {
+  return request({
+    url: 'jxcProductStatistics/productHeadStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 80 - 0
src/api/bi/oa.js

@@ -0,0 +1,80 @@
+import request from '@/utils/request'
+
+/**
+ * 日志统计
+ * @param {*} data
+ */
+export function biLogStatisticsAPI(data) {
+  return request({
+    url: 'biWork/logStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 日志统计导出
+ * @param {*} data
+ */
+export function biLogExcelExportAPI(data) {
+  return request({
+    url: 'biWork/logStatisticsExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    timeout: 600000,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 审批统计
+ * @param {*} data
+ */
+export function biExamineStatisticsAPI(data) {
+  return request({
+    url: 'biWork/examineStatistics',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+* 审批统计详情列表
+* @param {*} data
+*/
+export function biExamineIndexAPI(data) {
+  return request({
+    url: 'biWork/examineInfo',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 审批统计导出
+ * @param {*} data
+ */
+export function biExamineExcelExportAPI(data) {
+  return request({
+    url: 'biWork/examineStatisticsExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    timeout: 600000,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 60 - 0
src/api/bi/product.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+/**
+ * 产品分类销量分析
+ */
+export function biProductCategoryAPI(data) {
+  return request({
+    url: 'biProduct/contractProductRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品分类销量分析 --详情
+ */
+export function biProductCategoryListAPI(data) {
+  return request({
+    url: 'biCustomer/queryProductTypeList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品详情列表
+ * @param {*} data
+ */
+export function biProductDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchProductPageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品成交周期客户数
+ * @param {*} data
+ */
+export function biProductCircleDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/queryProductSucceedCustomerList ',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+

+ 264 - 0
src/api/bi/ranking.js

@@ -0,0 +1,264 @@
+import request from '@/utils/request'
+
+/**
+ * 合同金额
+ * @param {*} data
+ * year 年
+ * status 1销售(目标)2回款(目标)
+ * user_id 员工ID
+ * structure_id 部门ID
+ */
+export function biRankingContractAPI(data) {
+  return request({
+    url: 'biRanking/contractRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingContractExportAPI(data) {
+  return request({
+    url: 'biRanking/contractRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 回款金额排行
+ * @param {*} data
+ */
+export function biRankingReceivablesAPI(data) {
+  return request({
+    url: 'biRanking/receivablesRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingReceivablesExportAPI(data) {
+  return request({
+    url: 'biRanking/receivablesRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 签约合同排行
+ * @param {*} data
+ */
+export function biRankingSigningAPI(data) {
+  return request({
+    url: 'biRanking/contractCountRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingSigningExportAPI(data) {
+  return request({
+    url: 'biRanking/contractCountRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 产品销量排行
+ * @param {*} data
+ */
+export function biRankingProductAPI(data) {
+  return request({
+    url: 'biRanking/productCountRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingProductExportAPI(data) {
+  return request({
+    url: 'biRanking/productCountRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 新增客户数排行
+ * @param {*} data
+ */
+export function biRankingAddCustomerAPI(data) {
+  return request({
+    url: 'biRanking/customerCountRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingAddCustomerExportAPI(data) {
+  return request({
+    url: 'biRanking/customerCountRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 新增联系人数排行
+ * @param {*} data
+ */
+export function biRankingAddContactsAPI(data) {
+  return request({
+    url: 'biRanking/contactsCountRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingAddContactsExportAPI(data) {
+  return request({
+    url: 'biRanking/contactsCountRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 跟进次数排行
+ * @param {*} data
+ */
+export function biRankingRecordNunAPI(data) {
+  return request({
+    url: 'biRanking/recordCountRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingRecordNunExportAPI(data) {
+  return request({
+    url: 'biRanking/recordCountRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 跟进客户数排行
+ * @param {*} data
+ */
+export function biRankingRecordCustomerAPI(data) {
+  return request({
+    url: 'biRanking/customerRecordCountRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingRecordCustomerExportAPI(data) {
+  return request({
+    url: 'biRanking/customerRecordCountRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 出差次数排行
+ * @param {*} data
+ */
+export function biRankingExamineAPI(data) {
+  return request({
+    url: 'biRanking/travelCountRanKing',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+export function biRankingExamineExportAPI(data) {
+  return request({
+    url: 'biRanking/travelCountRanKingExport',
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 联系人详情列表
+ * @param {*} data
+ */
+export function biContactDetailListAPI(data) {
+  return request({
+    url: 'crmBiSearch/searchContactsPageList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+

+ 403 - 0
src/api/common.js

@@ -0,0 +1,403 @@
+import request from '@/utils/request'
+
+/**
+ * 员工
+ * @param {*} data
+ */
+export function userListAPI(data) {
+  return request({
+    url: 'adminUser/queryUserList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 邀请成员
+ * @param {*} data
+ */
+export function queryPageByStatus(data) {
+  return request({
+    url: 'adminUserApply/queryPageByStatus',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 通过邀请成员
+ * @param {*} data
+ */
+export function checkUserApply(data) {
+  return request({
+    url: 'adminUserApply/checkUserApply',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+/**
+ * 拒绝邀请成员
+ * @param {*} data
+ */
+export function deleteUserApply(data) {
+  return request({
+    url: 'adminUserApply/deleteUserApply',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 部门
+ * @param {*} data
+ */
+export function depListAPI(data) {
+  return request({
+    url: 'adminDept/queryDeptTree',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 获取权限范围内部门接口
+ * @param {*} data
+ */
+export function adminStructuresSubIndexAPI(data) {
+  return request({
+    url: 'adminDept/queryDeptByAuth',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 获取权限范围内部门接口
+ * @param {*} data
+ */
+export function getUserByDeptIdAPI(data) {
+  return request({
+    url: 'adminUser/queryUserByDeptId',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 通过部门id查询部门下的全部员工
+ * @param {*} data
+ */
+export function queryListByDeptIdsAPI(data) {
+  return request({
+    url: 'adminUser/queryListByDeptIds',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 附件
+ * @param {*} data
+ */
+export const crmFileSaveUrl = process.env.VUE_APP_BASE_API + 'adminFile/upload'
+
+export function crmFileSaveAPI(data, config = {}) {
+  var param = new FormData()
+  Object.keys(data).forEach(key => {
+    param.append(key, data[key])
+  })
+  return request({
+    url: 'adminFile/upload',
+    method: 'post',
+    data: param,
+    ...config,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  })
+}
+
+export function crmFileSingleSaveAPI(data, config = {}) {
+  var param = new FormData()
+  Object.keys(data).forEach(key => {
+    param.append(key, data[key])
+  })
+  return request({
+    url: 'adminFile/uploadBySingle',
+    method: 'post',
+    data: param,
+    ...config,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  })
+}
+
+/**
+ * 公共web文件上传
+ * @param data
+ */
+export function webFileSaveAPI(data) {
+  var param = new FormData()
+  Object.keys(data).forEach(key => {
+    param.append(key, data[key])
+    param.append('isPublic', '1')
+  })
+  return request({
+    url: 'adminFile/upload',
+    method: 'post',
+    data: param,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  })
+}
+
+/**
+ * 唯一图
+ * @param {*} data
+ */
+export function crmFileSaveByBatchIdAPI(data) {
+  var param = new FormData()
+  Object.keys(data).forEach(key => {
+    param.append(key, data[key])
+  })
+  return request({
+    url: 'adminFile/upload',
+    method: 'post',
+    data: param,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  })
+}
+
+/** 暂时客户管理里面也有 */
+/**
+ * 附件删除接口
+ * @param {*} data
+ */
+export function crmFileDeleteAPI(data) {
+  return request({
+    url: `adminFile/deleteById/${data.id}`,
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 根据批次ID删除文件
+ * @param {*} data
+ */
+export function crmFileRemoveByBatchIdAPI(data) {
+  return request({
+    url: 'adminFile/deleteByBatchId',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 附件重命名
+ * @param {*} data
+ */
+export function crmFileUpdateAPI(data) {
+  return request({
+    url: 'adminFile/renameFileById',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 通过path 下载
+ * @param {*} data
+ */
+export function crmFileDownByPathAPI(data) {
+  return request({
+    url: 'crmPrint/down',
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 权限数据返回
+ * @param {*} data
+ */
+export function adminIndexAuthListAPI(data) {
+  return request({
+    url: 'adminRole/auth',
+    method: 'post',
+    data: data
+  })
+}
+/**
+ * 财务权限数据返回
+ * @param {*} data
+ */
+export function adminFinanceAuthListAPI(data) {
+  return request({
+    url: 'financeAccountUser/financeAuth',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 系统消息列表
+ * label 1 任务 2 日志 3 oa审批 4公告 5 日程 6 客户管理
+ * isRead 0 未读 1 已读
+ * @param {*} data
+ */
+export function systemMessageListAPI(data) {
+  return request({
+    url: 'adminMessage/queryList',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * 未读消息数
+ * @param {*} data
+ */
+export function systemMessageUnreadCountAPI(data) {
+  return request({
+    url: 'adminMessage/queryUnreadCount',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 读消息
+ * @param {*} data
+ */
+export function systemMessageReadAPI(data) {
+  return request({
+    url: 'adminMessage/readMessage',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 读全部消息
+ * @param {*} data
+ */
+export function systemMessageReadAllAPI(data) {
+  return request({
+    url: 'adminMessage/readAllMessage',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 用户信息
+ * @param {*} data
+ */
+export function systemUserInfoAPI(data) {
+  return request({
+    url: 'adminUser/queryUserInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 系统消息按类别删除
+ * @param {*} data
+ */
+export function systemMessageClearAPI(data) {
+  return request({
+    url: 'adminMessage/clear',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 系统消息删除
+ * @param {*} data
+ */
+export function systemMessageDeleteByIdAPI(id) {
+  return request({
+    url: `adminMessage/deleteById/${id}`,
+    method: 'post'
+  })
+}
+
+export function downloadFileAPI(url) {
+  return request({
+    url: url,
+    method: 'post',
+    data: {},
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 已读更新通知
+ * @param {*} data
+ */
+export function readUpdateNoticeAPI(data) {
+  return request({
+    url: 'adminUser/readNotice',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 查询当前用户名下的用户数量
+ * @param {*} data
+ */
+export function adminUserQueryUserNumInfoAPI(data) {
+  return request({
+    url: 'adminUser/queryUserNumInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+/**
+ * 查询完整组织架构信息
+ * @param {*} data
+ */
+export function adminUserQueryOrgInfoAPI(data) {
+  return request({
+    url: 'adminUser/queryOrganizationInfo',
+    method: 'post',
+    data: data
+  })
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов