wuyunfeng 4 yıl önce
işleme
81311ddc34
100 değiştirilmiş dosya ile 22001 ekleme ve 0 silme
  1. 10 0
      Dockerfile
  2. 21 0
      LICENSE
  3. 228 0
      README.es.md
  4. 224 0
      README.ja.md
  5. 228 0
      README.md
  6. 251 0
      README.zh-CN.md
  7. 14 0
      babel.config.js
  8. 35 0
      build/index.js
  9. BIN
      dist/favicon.ico
  10. 1 0
      dist/index.html
  11. 1 0
      dist/static/css/app.848c2287.css
  12. 1 0
      dist/static/css/chunk-06faafad.c4469a3f.css
  13. 1 0
      dist/static/css/chunk-30ca8599.b1dd7a76.css
  14. 1 0
      dist/static/css/chunk-33c220b5.5e69ac7c.css
  15. 1 0
      dist/static/css/chunk-3e9c6b25.5f95877f.css
  16. 1 0
      dist/static/css/chunk-3fc04dc7.646ba2db.css
  17. 1 0
      dist/static/css/chunk-4decaba3.95168f18.css
  18. 1 0
      dist/static/css/chunk-536dc705.05e6c10a.css
  19. 1 0
      dist/static/css/chunk-537d7593.b22894e7.css
  20. 1 0
      dist/static/css/chunk-5c92bfb9.03dafb85.css
  21. 1 0
      dist/static/css/chunk-665577f1.e3b1b772.css
  22. 1 0
      dist/static/css/chunk-7c5298e1.516f9bb1.css
  23. 1 0
      dist/static/css/chunk-95ac90b6.3a7928f9.css
  24. 1 0
      dist/static/css/chunk-c4207b36.31192868.css
  25. 1 0
      dist/static/css/chunk-d5ed0cd6.5cbe9b13.css
  26. 1 0
      dist/static/css/chunk-libs.854468b4.css
  27. BIN
      dist/static/fonts/element-icons.535877f5.woff
  28. BIN
      dist/static/fonts/element-icons.732389de.ttf
  29. BIN
      dist/static/img/401.089007e7.gif
  30. BIN
      dist/static/img/404.a57b6f31.png
  31. BIN
      dist/static/img/404_cloud.0f4bc32b.png
  32. BIN
      dist/static/img/avatar.7aebfb9d.jpeg
  33. BIN
      dist/static/img/loginBg.238668d2.jpg
  34. BIN
      dist/static/img/logo.394d6e7c.png
  35. 1 0
      dist/static/js/app.af067b6f.js
  36. 1 0
      dist/static/js/chunk-06faafad.2aab81cd.js
  37. 6 0
      dist/static/js/chunk-107fdb58.bb729d73.js
  38. 1 0
      dist/static/js/chunk-1d9ec8ab.c4d651da.js
  39. 1 0
      dist/static/js/chunk-2d0bdbb6.352c6034.js
  40. 1 0
      dist/static/js/chunk-2d0c8694.a3443a88.js
  41. 1 0
      dist/static/js/chunk-2d0c8d8c.348cef43.js
  42. 1 0
      dist/static/js/chunk-2d2105d3.d4ca2bd4.js
  43. 1 0
      dist/static/js/chunk-2d230fe7.042d38d1.js
  44. 1 0
      dist/static/js/chunk-30ca8599.35aae577.js
  45. 1 0
      dist/static/js/chunk-33c220b5.07f68482.js
  46. 1 0
      dist/static/js/chunk-3e9c6b25.ae9262c2.js
  47. 1 0
      dist/static/js/chunk-3fc04dc7.2aa1b151.js
  48. 1 0
      dist/static/js/chunk-4decaba3.10847f33.js
  49. 1 0
      dist/static/js/chunk-536dc705.b9f9f39d.js
  50. 1 0
      dist/static/js/chunk-537d7593.5b70e487.js
  51. 1 0
      dist/static/js/chunk-5c92bfb9.7e52b7ae.js
  52. 1 0
      dist/static/js/chunk-5f4cdadc.aa7f35e8.js
  53. 1 0
      dist/static/js/chunk-665577f1.dd5b3358.js
  54. 1 0
      dist/static/js/chunk-7c5298e1.db0cc428.js
  55. 1 0
      dist/static/js/chunk-95ac90b6.33943a7d.js
  56. 1 0
      dist/static/js/chunk-c4207b36.3aa5951e.js
  57. 1 0
      dist/static/js/chunk-d5ed0cd6.d2eb0448.js
  58. 1 0
      dist/static/js/chunk-elementUI.d21c1ac9.js
  59. 457 0
      dist/static/js/chunk-libs.f11dcb7f.js
  60. 24 0
      jest.config.js
  61. 9 0
      jsconfig.json
  62. 116 0
      mock/article.js
  63. 60 0
      mock/index.js
  64. 81 0
      mock/mock-server.js
  65. 51 0
      mock/remote-search.js
  66. 98 0
      mock/role/index.js
  67. 530 0
      mock/role/routes.js
  68. 84 0
      mock/user.js
  69. 48 0
      mock/utils.js
  70. 51 0
      nginx.conf
  71. 18180 0
      package-lock.json
  72. 102 0
      package.json
  73. 26 0
      plop-templates/component/index.hbs
  74. 55 0
      plop-templates/component/prompt.js
  75. 16 0
      plop-templates/store/index.hbs
  76. 62 0
      plop-templates/store/prompt.js
  77. 2 0
      plop-templates/utils.js
  78. 26 0
      plop-templates/view/index.hbs
  79. 55 0
      plop-templates/view/prompt.js
  80. 9 0
      plopfile.js
  81. 5 0
      postcss.config.js
  82. BIN
      public/favicon.ico
  83. 15 0
      public/index.html
  84. 11 0
      src/App.vue
  85. 41 0
      src/api/article.js
  86. 10 0
      src/api/calling-board.js
  87. 65 0
      src/api/calling-broadcast.js
  88. 156 0
      src/api/calling-device.js
  89. 19 0
      src/api/calling-deviceRegisterParams.js
  90. 29 0
      src/api/calling-list.js
  91. 55 0
      src/api/calling-message.js
  92. 39 0
      src/api/calling-ncConfig.js
  93. 37 0
      src/api/calling-ncError.js
  94. 56 0
      src/api/calling-notice.js
  95. 47 0
      src/api/calling-nurse.js
  96. 74 0
      src/api/calling-part.js
  97. 53 0
      src/api/calling-patient.js
  98. 25 0
      src/api/calling-speech.js
  99. 65 0
      src/api/calling-staff.js
  100. 0 0
      src/api/calling-userInfo.js

+ 10 - 0
Dockerfile

@@ -0,0 +1,10 @@
+FROM nginx:alpine
+MAINTAINER wuyunfeng
+
+RUN mkdir -p /app/
+COPY ./dist /app/
+COPY ./nginx.conf /etc/nginx/nginx.conf
+
+EXPOSE 443 80
+
+CMD sh -c "exec nginx -g 'daemon off;'"

+ 21 - 0
LICENSE

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 228 - 0
README.es.md


Dosya farkı çok büyük olduğundan ihmal edildi
+ 224 - 0
README.ja.md


Dosya farkı çok büyük olduğundan ihmal edildi
+ 228 - 0
README.md


Dosya farkı çok büyük olduğundan ihmal edildi
+ 251 - 0
README.zh-CN.md


+ 14 - 0
babel.config.js

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

+ 35 - 0
build/index.js

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

BIN
dist/favicon.ico


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/index.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/css/app.848c2287.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/css/chunk-06faafad.c4469a3f.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/css/chunk-30ca8599.b1dd7a76.css


+ 1 - 0
dist/static/css/chunk-33c220b5.5e69ac7c.css

@@ -0,0 +1 @@
+fieldset[data-v-c1a826a4]{border-style:solid;border-color:#dcdfe6;border-width:1px}.margin-top-sm[data-v-c1a826a4]{margin-top:20px}

+ 1 - 0
dist/static/css/chunk-3e9c6b25.5f95877f.css

@@ -0,0 +1 @@
+.el-drawer.rtl{overflow:scroll}

+ 1 - 0
dist/static/css/chunk-3fc04dc7.646ba2db.css

@@ -0,0 +1 @@
+[data-v-92eb0d7e] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-92eb0d7e]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-92eb0d7e]{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar[data-v-92eb0d7e]{width:178px;height:178px;display:block}.green-text[data-v-92eb0d7e]{color:green}.red-text[data-v-92eb0d7e]{color:red}

+ 1 - 0
dist/static/css/chunk-4decaba3.95168f18.css

@@ -0,0 +1 @@
+fieldset[data-v-023c7e3b]{border-style:solid;border-color:#dcdfe6;border-width:1px}.margin-top-sm[data-v-023c7e3b]{margin-top:20px}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/css/chunk-536dc705.05e6c10a.css


+ 1 - 0
dist/static/css/chunk-537d7593.b22894e7.css

@@ -0,0 +1 @@
+[data-v-34ab69ba] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-34ab69ba]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-34ab69ba]{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar[data-v-34ab69ba]{width:178px;height:178px;display:block}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/css/chunk-5c92bfb9.03dafb85.css


+ 1 - 0
dist/static/css/chunk-665577f1.e3b1b772.css

@@ -0,0 +1 @@
+[data-v-70c39c2b] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-70c39c2b]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-70c39c2b]{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar[data-v-70c39c2b]{width:178px;height:178px;display:block}

+ 1 - 0
dist/static/css/chunk-7c5298e1.516f9bb1.css

@@ -0,0 +1 @@
+fieldset[data-v-c2106f28]{border-style:solid;border-color:#dcdfe6;border-width:1px}.margin-top-sm[data-v-c2106f28]{margin-top:20px}fieldset[data-v-8812c67a]{border-style:solid;border-color:#dcdfe6;border-width:1px}.margin-top-sm[data-v-8812c67a]{margin-top:20px}

+ 1 - 0
dist/static/css/chunk-95ac90b6.3a7928f9.css

@@ -0,0 +1 @@
+[data-v-7f6faf30] .colorBtn{width:80px!important;height:40px!important}[data-v-7f6faf30] .m-colorPicker .box.open{z-index:1000!important}

+ 1 - 0
dist/static/css/chunk-c4207b36.31192868.css

@@ -0,0 +1 @@
+[data-v-5dbb8868] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-5dbb8868]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-5dbb8868]{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar[data-v-5dbb8868]{width:178px;height:178px;display:block}.green-text[data-v-5dbb8868]{color:green}.red-text[data-v-5dbb8868]{color:red}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/css/chunk-d5ed0cd6.5cbe9b13.css


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/css/chunk-libs.854468b4.css


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


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


BIN
dist/static/img/401.089007e7.gif


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


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


BIN
dist/static/img/avatar.7aebfb9d.jpeg


BIN
dist/static/img/loginBg.238668d2.jpg


BIN
dist/static/img/logo.394d6e7c.png


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/app.af067b6f.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-06faafad.2aab81cd.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 6 - 0
dist/static/js/chunk-107fdb58.bb729d73.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-1d9ec8ab.c4d651da.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-2d0bdbb6.352c6034.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-2d0c8694.a3443a88.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-2d0c8d8c.348cef43.js


+ 1 - 0
dist/static/js/chunk-2d2105d3.d4ca2bd4.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d2105d3"],{b829:function(n,e,o){"use strict";o.r(e);o("fb6a"),o("ac1f"),o("841c");var c,a,t={name:"AuthRedirect",created:function(){var n=window.location.search.slice(1);window.localStorage&&(window.localStorage.setItem("x-admin-oauth-code",n),window.close())},render:function(n){return n()}},d=t,i=o("2877"),l=Object(i["a"])(d,c,a,!1,null,null,null);e["default"]=l.exports}}]);

+ 1 - 0
dist/static/js/chunk-2d230fe7.042d38d1.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d230fe7"],{ef3c:function(e,r,n){"use strict";n.r(r);n("ac1f"),n("5319");var t,u,a={created:function(){var e=this.$route,r=e.params,n=e.query,t=r.path;this.$router.replace({path:"/"+t,query:n})},render:function(e){return e()}},c=a,o=n("2877"),p=Object(o["a"])(c,t,u,!1,null,null,null);r["default"]=p.exports}}]);

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-30ca8599.35aae577.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-33c220b5.07f68482.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-3e9c6b25.ae9262c2.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-3fc04dc7.2aa1b151.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-4decaba3.10847f33.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-536dc705.b9f9f39d.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-537d7593.5b70e487.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-5c92bfb9.7e52b7ae.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-5f4cdadc.aa7f35e8.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-665577f1.dd5b3358.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-7c5298e1.db0cc428.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-95ac90b6.33943a7d.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-c4207b36.3aa5951e.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-d5ed0cd6.d2eb0448.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
dist/static/js/chunk-elementUI.d21c1ac9.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 457 - 0
dist/static/js/chunk-libs.f11dcb7f.js


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

+ 116 - 0
mock/article.js

@@ -0,0 +1,116 @@
+const Mock = require('mockjs')
+
+const List = []
+const count = 100
+
+const baseContent = '<p>I am testing data, I am testing data.</p><p><img src="https://wpimg.wallstcn.com/4c69009c-0fd4-4153-b112-6cb53d1cf943"></p>'
+const image_uri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3'
+
+for (let i = 0; i < count; i++) {
+  List.push(Mock.mock({
+    id: '@increment',
+    timestamp: +Mock.Random.date('T'),
+    author: '@first',
+    reviewer: '@first',
+    title: '@title(5, 10)',
+    content_short: 'mock data',
+    content: baseContent,
+    forecast: '@float(0, 100, 2, 2)',
+    importance: '@integer(1, 3)',
+    'type|1': ['CN', 'US', 'JP', 'EU'],
+    'status|1': ['published', 'draft'],
+    display_time: '@datetime',
+    comment_disabled: true,
+    pageviews: '@integer(300, 5000)',
+    image_uri,
+    platforms: ['a-platform']
+  }))
+}
+
+module.exports = [
+  {
+    url: '/vue-element-admin/article/list',
+    type: 'get',
+    response: config => {
+      const { importance, type, title, page = 1, limit = 20, sort } = config.query
+
+      let mockList = List.filter(item => {
+        if (importance && item.importance !== +importance) return false
+        if (type && item.type !== type) return false
+        if (title && item.title.indexOf(title) < 0) return false
+        return true
+      })
+
+      if (sort === '-id') {
+        mockList = mockList.reverse()
+      }
+
+      const pageList = mockList.filter((item, index) => index < limit * page && index >= limit * (page - 1))
+
+      return {
+        code: 20000,
+        data: {
+          total: mockList.length,
+          items: pageList
+        }
+      }
+    }
+  },
+
+  {
+    url: '/vue-element-admin/article/detail',
+    type: 'get',
+    response: config => {
+      const { id } = config.query
+      for (const article of List) {
+        if (article.id === +id) {
+          return {
+            code: 20000,
+            data: article
+          }
+        }
+      }
+    }
+  },
+
+  {
+    url: '/vue-element-admin/article/pv',
+    type: 'get',
+    response: _ => {
+      return {
+        code: 20000,
+        data: {
+          pvData: [
+            { key: 'PC', pv: 1024 },
+            { key: 'mobile', pv: 1024 },
+            { key: 'ios', pv: 1024 },
+            { key: 'android', pv: 1024 }
+          ]
+        }
+      }
+    }
+  },
+
+  {
+    url: '/vue-element-admin/article/create',
+    type: 'post',
+    response: _ => {
+      return {
+        code: 20000,
+        data: 'success'
+      }
+    }
+  },
+
+  {
+    url: '/vue-element-admin/article/update',
+    type: 'post',
+    response: _ => {
+      return {
+        code: 20000,
+        data: 'success'
+      }
+    }
+  }
+]
+

+ 60 - 0
mock/index.js

@@ -0,0 +1,60 @@
+const Mock = require('mockjs')
+const { param2Obj } = require('./utils')
+
+const user = require('./user')
+const role = require('./role')
+const article = require('./article')
+const search = require('./remote-search')
+
+const mocks = [
+  ...user,
+  ...role,
+  ...article,
+  ...search
+]
+
+// for front mock
+// please use it cautiously, it will redefine XMLHttpRequest,
+// which will cause many of your third-party libraries to be invalidated(like progress event).
+function mockXHR() {
+  // mock patch
+  // https://github.com/nuysoft/Mock/issues/300
+  Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
+  Mock.XHR.prototype.send = function() {
+    if (this.custom.xhr) {
+      this.custom.xhr.withCredentials = this.withCredentials || false
+
+      if (this.responseType) {
+        this.custom.xhr.responseType = this.responseType
+      }
+    }
+    this.proxy_send(...arguments)
+  }
+
+  function XHR2ExpressReqWrap(respond) {
+    return function(options) {
+      let result = null
+      if (respond instanceof Function) {
+        const { body, type, url } = options
+        // https://expressjs.com/en/4x/api.html#req
+        result = respond({
+          method: type,
+          body: JSON.parse(body),
+          query: param2Obj(url)
+        })
+      } else {
+        result = respond
+      }
+      return Mock.mock(result)
+    }
+  }
+
+  for (const i of mocks) {
+    Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
+  }
+}
+
+module.exports = {
+  mocks,
+  mockXHR
+}

+ 81 - 0
mock/mock-server.js

@@ -0,0 +1,81 @@
+const chokidar = require('chokidar')
+const bodyParser = require('body-parser')
+const chalk = require('chalk')
+const path = require('path')
+const Mock = require('mockjs')
+
+const mockDir = path.join(process.cwd(), 'mock')
+
+function registerRoutes(app) {
+  let mockLastIndex
+  const { mocks } = require('./index.js')
+  const mocksForServer = mocks.map(route => {
+    return responseFake(route.url, route.type, route.response)
+  })
+  for (const mock of mocksForServer) {
+    app[mock.type](mock.url, mock.response)
+    mockLastIndex = app._router.stack.length
+  }
+  const mockRoutesLength = Object.keys(mocksForServer).length
+  return {
+    mockRoutesLength: mockRoutesLength,
+    mockStartIndex: mockLastIndex - mockRoutesLength
+  }
+}
+
+function unregisterRoutes() {
+  Object.keys(require.cache).forEach(i => {
+    if (i.includes(mockDir)) {
+      delete require.cache[require.resolve(i)]
+    }
+  })
+}
+
+// for mock server
+const responseFake = (url, type, respond) => {
+  return {
+    url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
+    type: type || 'get',
+    response(req, res) {
+      console.log('request invoke:' + req.path)
+      res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
+    }
+  }
+}
+
+module.exports = app => {
+  // parse app.body
+  // https://expressjs.com/en/4x/api.html#req.body
+  app.use(bodyParser.json())
+  app.use(bodyParser.urlencoded({
+    extended: true
+  }))
+
+  const mockRoutes = registerRoutes(app)
+  var mockRoutesLength = mockRoutes.mockRoutesLength
+  var mockStartIndex = mockRoutes.mockStartIndex
+
+  // watch files, hot reload mock server
+  chokidar.watch(mockDir, {
+    ignored: /mock-server/,
+    ignoreInitial: true
+  }).on('all', (event, path) => {
+    if (event === 'change' || event === 'add') {
+      try {
+        // remove mock routes stack
+        app._router.stack.splice(mockStartIndex, mockRoutesLength)
+
+        // clear routes cache
+        unregisterRoutes()
+
+        const mockRoutes = registerRoutes(app)
+        mockRoutesLength = mockRoutes.mockRoutesLength
+        mockStartIndex = mockRoutes.mockStartIndex
+
+        console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed  ${path}`))
+      } catch (error) {
+        console.log(chalk.redBright(error))
+      }
+    }
+  })
+}

+ 51 - 0
mock/remote-search.js

@@ -0,0 +1,51 @@
+const Mock = require('mockjs')
+
+const NameList = []
+const count = 100
+
+for (let i = 0; i < count; i++) {
+  NameList.push(Mock.mock({
+    name: '@first'
+  }))
+}
+NameList.push({ name: 'mock-Pan' })
+
+module.exports = [
+  // username search
+  {
+    url: '/vue-element-admin/search/user',
+    type: 'get',
+    response: config => {
+      const { name } = config.query
+      const mockNameList = NameList.filter(item => {
+        const lowerCaseName = item.name.toLowerCase()
+        return !(name && lowerCaseName.indexOf(name.toLowerCase()) < 0)
+      })
+      return {
+        code: 20000,
+        data: { items: mockNameList }
+      }
+    }
+  },
+
+  // transaction list
+  {
+    url: '/vue-element-admin/transaction/list',
+    type: 'get',
+    response: _ => {
+      return {
+        code: 20000,
+        data: {
+          total: 20,
+          'items|20': [{
+            order_no: '@guid()',
+            timestamp: +Mock.Random.date('T'),
+            username: '@name()',
+            price: '@float(1000, 15000, 0, 2)',
+            'status|1': ['success', 'pending']
+          }]
+        }
+      }
+    }
+  }
+]

+ 98 - 0
mock/role/index.js

@@ -0,0 +1,98 @@
+const Mock = require('mockjs')
+const { deepClone } = require('../utils')
+const { asyncRoutes, constantRoutes } = require('./routes.js')
+
+const routes = deepClone([...constantRoutes, ...asyncRoutes])
+
+const roles = [
+  {
+    key: 'admin',
+    name: 'admin',
+    description: 'Super Administrator. Have access to view all pages.',
+    routes: routes
+  },
+  {
+    key: 'editor',
+    name: 'editor',
+    description: 'Normal Editor. Can see all pages except permission page',
+    routes: routes.filter(i => i.path !== '/permission')// just a mock
+  },
+  {
+    key: 'visitor',
+    name: 'visitor',
+    description: 'Just a visitor. Can only see the home page and the document page',
+    routes: [{
+      path: '',
+      redirect: 'dashboard',
+      children: [
+        {
+          path: 'dashboard',
+          name: 'Dashboard',
+          meta: { title: 'dashboard', icon: 'dashboard' }
+        }
+      ]
+    }]
+  }
+]
+
+module.exports = [
+  // mock get all routes form server
+  {
+    url: '/vue-element-admin/routes',
+    type: 'get',
+    response: _ => {
+      return {
+        code: 20000,
+        data: routes
+      }
+    }
+  },
+
+  // mock get all roles form server
+  {
+    url: '/vue-element-admin/roles',
+    type: 'get',
+    response: _ => {
+      return {
+        code: 20000,
+        data: roles
+      }
+    }
+  },
+
+  // add role
+  {
+    url: '/vue-element-admin/role',
+    type: 'post',
+    response: {
+      code: 20000,
+      data: {
+        key: Mock.mock('@integer(300, 5000)')
+      }
+    }
+  },
+
+  // update role
+  {
+    url: '/vue-element-admin/role/[A-Za-z0-9]',
+    type: 'put',
+    response: {
+      code: 20000,
+      data: {
+        status: 'success'
+      }
+    }
+  },
+
+  // delete role
+  {
+    url: '/vue-element-admin/role/[A-Za-z0-9]',
+    type: 'delete',
+    response: {
+      code: 20000,
+      data: {
+        status: 'success'
+      }
+    }
+  }
+]

+ 530 - 0
mock/role/routes.js

@@ -0,0 +1,530 @@
+// Just a mock data
+
+const constantRoutes = [
+  {
+    path: '/redirect',
+    component: 'layout/Layout',
+    hidden: true,
+    children: [
+      {
+        path: '/redirect/:path*',
+        component: 'views/redirect/index'
+      }
+    ]
+  },
+  {
+    path: '/login',
+    component: 'views/login/index',
+    hidden: true
+  },
+  {
+    path: '/auth-redirect',
+    component: 'views/login/auth-redirect',
+    hidden: true
+  },
+  {
+    path: '/404',
+    component: 'views/error-page/404',
+    hidden: true
+  },
+  {
+    path: '/401',
+    component: 'views/error-page/401',
+    hidden: true
+  },
+  {
+    path: '',
+    component: 'layout/Layout',
+    redirect: 'dashboard',
+    children: [
+      {
+        path: 'dashboard',
+        component: 'views/dashboard/index',
+        name: 'Dashboard',
+        meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
+      }
+    ]
+  },
+  {
+    path: '/documentation',
+    component: 'layout/Layout',
+    children: [
+      {
+        path: 'index',
+        component: 'views/documentation/index',
+        name: 'Documentation',
+        meta: { title: 'Documentation', icon: 'documentation', affix: true }
+      }
+    ]
+  },
+  {
+    path: '/guide',
+    component: 'layout/Layout',
+    redirect: '/guide/index',
+    children: [
+      {
+        path: 'index',
+        component: 'views/guide/index',
+        name: 'Guide',
+        meta: { title: 'Guide', icon: 'guide', noCache: true }
+      }
+    ]
+  }
+]
+
+const asyncRoutes = [
+  {
+    path: '/permission',
+    component: 'layout/Layout',
+    redirect: '/permission/index',
+    alwaysShow: true,
+    meta: {
+      title: 'Permission',
+      icon: 'lock',
+      roles: ['admin', 'editor']
+    },
+    children: [
+      {
+        path: 'page',
+        component: 'views/permission/page',
+        name: 'PagePermission',
+        meta: {
+          title: 'Page Permission',
+          roles: ['admin']
+        }
+      },
+      {
+        path: 'directive',
+        component: 'views/permission/directive',
+        name: 'DirectivePermission',
+        meta: {
+          title: 'Directive Permission'
+        }
+      },
+      {
+        path: 'role',
+        component: 'views/permission/role',
+        name: 'RolePermission',
+        meta: {
+          title: 'Role Permission',
+          roles: ['admin']
+        }
+      }
+    ]
+  },
+
+  {
+    path: '/icon',
+    component: 'layout/Layout',
+    children: [
+      {
+        path: 'index',
+        component: 'views/icons/index',
+        name: 'Icons',
+        meta: { title: 'Icons', icon: 'icon', noCache: true }
+      }
+    ]
+  },
+
+  {
+    path: '/components',
+    component: 'layout/Layout',
+    redirect: 'noRedirect',
+    name: 'ComponentDemo',
+    meta: {
+      title: 'Components',
+      icon: 'component'
+    },
+    children: [
+      {
+        path: 'tinymce',
+        component: 'views/components-demo/tinymce',
+        name: 'TinymceDemo',
+        meta: { title: 'Tinymce' }
+      },
+      {
+        path: 'markdown',
+        component: 'views/components-demo/markdown',
+        name: 'MarkdownDemo',
+        meta: { title: 'Markdown' }
+      },
+      {
+        path: 'json-editor',
+        component: 'views/components-demo/json-editor',
+        name: 'JsonEditorDemo',
+        meta: { title: 'Json Editor' }
+      },
+      {
+        path: 'split-pane',
+        component: 'views/components-demo/split-pane',
+        name: 'SplitpaneDemo',
+        meta: { title: 'SplitPane' }
+      },
+      {
+        path: 'avatar-upload',
+        component: 'views/components-demo/avatar-upload',
+        name: 'AvatarUploadDemo',
+        meta: { title: 'Avatar Upload' }
+      },
+      {
+        path: 'dropzone',
+        component: 'views/components-demo/dropzone',
+        name: 'DropzoneDemo',
+        meta: { title: 'Dropzone' }
+      },
+      {
+        path: 'sticky',
+        component: 'views/components-demo/sticky',
+        name: 'StickyDemo',
+        meta: { title: 'Sticky' }
+      },
+      {
+        path: 'count-to',
+        component: 'views/components-demo/count-to',
+        name: 'CountToDemo',
+        meta: { title: 'Count To' }
+      },
+      {
+        path: 'mixin',
+        component: 'views/components-demo/mixin',
+        name: 'ComponentMixinDemo',
+        meta: { title: 'componentMixin' }
+      },
+      {
+        path: 'back-to-top',
+        component: 'views/components-demo/back-to-top',
+        name: 'BackToTopDemo',
+        meta: { title: 'Back To Top' }
+      },
+      {
+        path: 'drag-dialog',
+        component: 'views/components-demo/drag-dialog',
+        name: 'DragDialogDemo',
+        meta: { title: 'Drag Dialog' }
+      },
+      {
+        path: 'drag-select',
+        component: 'views/components-demo/drag-select',
+        name: 'DragSelectDemo',
+        meta: { title: 'Drag Select' }
+      },
+      {
+        path: 'dnd-list',
+        component: 'views/components-demo/dnd-list',
+        name: 'DndListDemo',
+        meta: { title: 'Dnd List' }
+      },
+      {
+        path: 'drag-kanban',
+        component: 'views/components-demo/drag-kanban',
+        name: 'DragKanbanDemo',
+        meta: { title: 'Drag Kanban' }
+      }
+    ]
+  },
+  {
+    path: '/charts',
+    component: 'layout/Layout',
+    redirect: 'noRedirect',
+    name: 'Charts',
+    meta: {
+      title: 'Charts',
+      icon: 'chart'
+    },
+    children: [
+      {
+        path: 'keyboard',
+        component: 'views/charts/keyboard',
+        name: 'KeyboardChart',
+        meta: { title: 'Keyboard Chart', noCache: true }
+      },
+      {
+        path: 'line',
+        component: 'views/charts/line',
+        name: 'LineChart',
+        meta: { title: 'Line Chart', noCache: true }
+      },
+      {
+        path: 'mixchart',
+        component: 'views/charts/mixChart',
+        name: 'MixChart',
+        meta: { title: 'Mix Chart', noCache: true }
+      }
+    ]
+  },
+  {
+    path: '/nested',
+    component: 'layout/Layout',
+    redirect: '/nested/menu1/menu1-1',
+    name: 'Nested',
+    meta: {
+      title: 'Nested',
+      icon: 'nested'
+    },
+    children: [
+      {
+        path: 'menu1',
+        component: 'views/nested/menu1/index',
+        name: 'Menu1',
+        meta: { title: 'Menu1' },
+        redirect: '/nested/menu1/menu1-1',
+        children: [
+          {
+            path: 'menu1-1',
+            component: 'views/nested/menu1/menu1-1',
+            name: 'Menu1-1',
+            meta: { title: 'Menu1-1' }
+          },
+          {
+            path: 'menu1-2',
+            component: 'views/nested/menu1/menu1-2',
+            name: 'Menu1-2',
+            redirect: '/nested/menu1/menu1-2/menu1-2-1',
+            meta: { title: 'Menu1-2' },
+            children: [
+              {
+                path: 'menu1-2-1',
+                component: 'views/nested/menu1/menu1-2/menu1-2-1',
+                name: 'Menu1-2-1',
+                meta: { title: 'Menu1-2-1' }
+              },
+              {
+                path: 'menu1-2-2',
+                component: 'views/nested/menu1/menu1-2/menu1-2-2',
+                name: 'Menu1-2-2',
+                meta: { title: 'Menu1-2-2' }
+              }
+            ]
+          },
+          {
+            path: 'menu1-3',
+            component: 'views/nested/menu1/menu1-3',
+            name: 'Menu1-3',
+            meta: { title: 'Menu1-3' }
+          }
+        ]
+      },
+      {
+        path: 'menu2',
+        name: 'Menu2',
+        component: 'views/nested/menu2/index',
+        meta: { title: 'Menu2' }
+      }
+    ]
+  },
+
+  {
+    path: '/example',
+    component: 'layout/Layout',
+    redirect: '/example/list',
+    name: 'Example',
+    meta: {
+      title: 'Example',
+      icon: 'example'
+    },
+    children: [
+      {
+        path: 'create',
+        component: 'views/example/create',
+        name: 'CreateArticle',
+        meta: { title: 'Create Article', icon: 'edit' }
+      },
+      {
+        path: 'edit/:id(\\d+)',
+        component: 'views/example/edit',
+        name: 'EditArticle',
+        meta: { title: 'Edit Article', noCache: true },
+        hidden: true
+      },
+      {
+        path: 'list',
+        component: 'views/example/list',
+        name: 'ArticleList',
+        meta: { title: 'Article List', icon: 'list' }
+      }
+    ]
+  },
+
+  {
+    path: '/tab',
+    component: 'layout/Layout',
+    children: [
+      {
+        path: 'index',
+        component: 'views/tab/index',
+        name: 'Tab',
+        meta: { title: 'Tab', icon: 'tab' }
+      }
+    ]
+  },
+
+  {
+    path: '/error',
+    component: 'layout/Layout',
+    redirect: 'noRedirect',
+    name: 'ErrorPages',
+    meta: {
+      title: 'Error Pages',
+      icon: '404'
+    },
+    children: [
+      {
+        path: '401',
+        component: 'views/error-page/401',
+        name: 'Page401',
+        meta: { title: 'Page 401', noCache: true }
+      },
+      {
+        path: '404',
+        component: 'views/error-page/404',
+        name: 'Page404',
+        meta: { title: 'Page 404', noCache: true }
+      }
+    ]
+  },
+
+  {
+    path: '/error-log',
+    component: 'layout/Layout',
+    redirect: 'noRedirect',
+    children: [
+      {
+        path: 'log',
+        component: 'views/error-log/index',
+        name: 'ErrorLog',
+        meta: { title: 'Error Log', icon: 'bug' }
+      }
+    ]
+  },
+
+  {
+    path: '/excel',
+    component: 'layout/Layout',
+    redirect: '/excel/export-excel',
+    name: 'Excel',
+    meta: {
+      title: 'Excel',
+      icon: 'excel'
+    },
+    children: [
+      {
+        path: 'export-excel',
+        component: 'views/excel/export-excel',
+        name: 'ExportExcel',
+        meta: { title: 'Export Excel' }
+      },
+      {
+        path: 'export-selected-excel',
+        component: 'views/excel/select-excel',
+        name: 'SelectExcel',
+        meta: { title: 'Select Excel' }
+      },
+      {
+        path: 'export-merge-header',
+        component: 'views/excel/merge-header',
+        name: 'MergeHeader',
+        meta: { title: 'Merge Header' }
+      },
+      {
+        path: 'upload-excel',
+        component: 'views/excel/upload-excel',
+        name: 'UploadExcel',
+        meta: { title: 'Upload Excel' }
+      }
+    ]
+  },
+
+  {
+    path: '/zip',
+    component: 'layout/Layout',
+    redirect: '/zip/download',
+    alwaysShow: true,
+    meta: { title: 'Zip', icon: 'zip' },
+    children: [
+      {
+        path: 'download',
+        component: 'views/zip/index',
+        name: 'ExportZip',
+        meta: { title: 'Export Zip' }
+      }
+    ]
+  },
+
+  {
+    path: '/pdf',
+    component: 'layout/Layout',
+    redirect: '/pdf/index',
+    children: [
+      {
+        path: 'index',
+        component: 'views/pdf/index',
+        name: 'PDF',
+        meta: { title: 'PDF', icon: 'pdf' }
+      }
+    ]
+  },
+  {
+    path: '/pdf/download',
+    component: 'views/pdf/download',
+    hidden: true
+  },
+
+  {
+    path: '/theme',
+    component: 'layout/Layout',
+    redirect: 'noRedirect',
+    children: [
+      {
+        path: 'index',
+        component: 'views/theme/index',
+        name: 'Theme',
+        meta: { title: 'Theme', icon: 'theme' }
+      }
+    ]
+  },
+
+  {
+    path: '/clipboard',
+    component: 'layout/Layout',
+    redirect: 'noRedirect',
+    children: [
+      {
+        path: 'index',
+        component: 'views/clipboard/index',
+        name: 'ClipboardDemo',
+        meta: { title: 'Clipboard Demo', icon: 'clipboard' }
+      }
+    ]
+  },
+
+  {
+    path: '/i18n',
+    component: 'layout/Layout',
+    children: [
+      {
+        path: 'index',
+        component: 'views/i18n-demo/index',
+        name: 'I18n',
+        meta: { title: 'I18n', icon: 'international' }
+      }
+    ]
+  },
+
+  {
+    path: 'external-link',
+    component: 'layout/Layout',
+    children: [
+      {
+        path: 'https://github.com/PanJiaChen/vue-element-admin',
+        meta: { title: 'External Link', icon: 'link' }
+      }
+    ]
+  },
+
+  { path: '*', redirect: '/404', hidden: true }
+]
+
+module.exports = {
+  constantRoutes,
+  asyncRoutes
+}

+ 84 - 0
mock/user.js

@@ -0,0 +1,84 @@
+
+const tokens = {
+  admin: {
+    token: 'admin-token'
+  },
+  editor: {
+    token: 'editor-token'
+  }
+}
+
+const users = {
+  'admin-token': {
+    roles: ['admin'],
+    introduction: 'I am a super administrator',
+    avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
+    name: 'Super Admin'
+  },
+  'editor-token': {
+    roles: ['editor'],
+    introduction: 'I am an editor',
+    avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
+    name: 'Normal Editor'
+  }
+}
+
+module.exports = [
+  // user login
+  {
+    url: '/vue-element-admin/user/login',
+    type: 'post',
+    response: config => {
+      const { username } = config.body
+      const token = tokens[username]
+
+      // mock error
+      if (!token) {
+        return {
+          code: 60204,
+          message: 'Account and password are incorrect.'
+        }
+      }
+
+      return {
+        code: 20000,
+        data: token
+      }
+    }
+  },
+
+  // get user info
+  {
+    url: '/vue-element-admin/user/info\.*',
+    type: 'get',
+    response: config => {
+      const { token } = config.query
+      const info = users[token]
+
+      // mock error
+      if (!info) {
+        return {
+          code: 50008,
+          message: 'Login failed, unable to get user details.'
+        }
+      }
+
+      return {
+        code: 20000,
+        data: info
+      }
+    }
+  },
+
+  // user logout
+  {
+    url: '/vue-element-admin/user/logout',
+    type: 'post',
+    response: _ => {
+      return {
+        code: 20000,
+        data: 'success'
+      }
+    }
+  }
+]

+ 48 - 0
mock/utils.js

@@ -0,0 +1,48 @@
+/**
+ * @param {string} url
+ * @returns {Object}
+ */
+function param2Obj(url) {
+  const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
+  if (!search) {
+    return {}
+  }
+  const obj = {}
+  const searchArr = search.split('&')
+  searchArr.forEach(v => {
+    const index = v.indexOf('=')
+    if (index !== -1) {
+      const name = v.substring(0, index)
+      const val = v.substring(index + 1, v.length)
+      obj[name] = val
+    }
+  })
+  return obj
+}
+
+/**
+ * This is just a simple version of deep copy
+ * Has a lot of edge cases bug
+ * If you want to use a perfect deep copy, use lodash's _.cloneDeep
+ * @param {Object} source
+ * @returns {Object}
+ */
+function deepClone(source) {
+  if (!source && typeof source !== 'object') {
+    throw new Error('error arguments', 'deepClone')
+  }
+  const targetObj = source.constructor === Array ? [] : {}
+  Object.keys(source).forEach(keys => {
+    if (source[keys] && typeof source[keys] === 'object') {
+      targetObj[keys] = deepClone(source[keys])
+    } else {
+      targetObj[keys] = source[keys]
+    }
+  })
+  return targetObj
+}
+
+module.exports = {
+  param2Obj,
+  deepClone
+}

+ 51 - 0
nginx.conf

@@ -0,0 +1,51 @@
+#这个文件给docker用的
+#user  nobody;
+worker_processes  1;
+
+#error_log  logs/error.log;
+#error_log  logs/error.log  notice;
+#error_log  logs/error.log  info;
+
+#pid        logs/nginx.pid;
+
+
+events {
+    worker_connections  1024;
+}
+
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+
+    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+    #                  '$status $body_bytes_sent "$http_referer" '
+    #                  '"$http_user_agent" "$http_x_forwarded_for"';
+
+    #access_log  logs/access.log  main;
+
+    sendfile        on;
+    #tcp_nopush     on;
+
+    #keepalive_timeout  0;
+    keepalive_timeout  65;
+    client_max_body_size 10m;
+    gzip on;
+    gzip_min_length  5k;
+    gzip_buffers     4 16k;
+    gzip_http_version 1.0;
+    gzip_comp_level 4;
+    gzip_types       text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
+    gzip_vary on;
+
+    server {
+        listen       80;
+        server_name  localhost;
+
+        location / {
+            root /app;
+            try_files $uri $uri/ /index.html $uri/ =404;
+            index  index.html index.htm;
+        }
+    }
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 18180 - 0
package-lock.json


+ 102 - 0
package.json

@@ -0,0 +1,102 @@
+{
+  "name": "wdkl",
+  "version": "4.4.0",
+  "description": "维鼎康联",
+  "author": "Pan <panfree23@gmail.com>",
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "lint": "eslint --ext .js,.vue src",
+    "build:prod": "vue-cli-service build",
+    "build:stage": "vue-cli-service build --mode staging",
+    "preview": "node build/index.js --preview",
+    "new": "plop",
+    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
+    "test:unit": "jest --clearCache && vue-cli-service test:unit",
+    "test:ci": "npm run lint && npm run test:unit"
+  },
+  "dependencies": {
+    "ag-grid-community": "^25.0.0",
+    "ag-grid-vue": "^25.0.0",
+    "axios": "0.18.1",
+    "clipboard": "2.0.4",
+    "codemirror": "5.45.0",
+    "core-js": "3.6.5",
+    "driver.js": "0.9.5",
+    "dropzone": "5.5.1",
+    "echarts": "4.2.1",
+    "element-ui": "2.13.2",
+    "file-saver": "2.0.1",
+    "fuse.js": "3.4.4",
+    "js-cookie": "2.2.0",
+    "jsonlint": "1.6.3",
+    "jszip": "3.2.1",
+    "normalize.css": "7.0.0",
+    "nprogress": "0.2.0",
+    "particles.js": "2.0.0",
+    "path-to-regexp": "2.4.0",
+    "pinyin": "^2.9.1",
+    "screenfull": "4.2.0",
+    "script-loader": "0.7.2",
+    "sortablejs": "1.8.4",
+    "tui-editor": "1.3.3",
+    "vcolorpicker": "^1.0.3",
+    "vue": "2.6.10",
+    "vue-class-component": "^7.2.6",
+    "vue-count-to": "1.0.13",
+    "vue-property-decorator": "^9.1.2",
+    "vue-router": "3.0.2",
+    "vue-splitpane": "1.0.4",
+    "vuedraggable": "2.20.0",
+    "vuex": "3.1.0",
+    "xlsx": "0.14.1"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "4.4.4",
+    "@vue/cli-plugin-eslint": "4.4.4",
+    "@vue/cli-plugin-unit-jest": "4.4.4",
+    "@vue/cli-service": "4.4.4",
+    "@vue/test-utils": "1.0.0-beta.29",
+    "autoprefixer": "9.5.1",
+    "babel-eslint": "10.1.0",
+    "babel-jest": "23.6.0",
+    "babel-plugin-dynamic-import-node": "2.3.3",
+    "chalk": "2.4.2",
+    "chokidar": "2.1.5",
+    "connect": "3.6.6",
+    "eslint": "6.7.2",
+    "eslint-plugin-vue": "^7.1.0",
+    "html-webpack-plugin": "3.2.0",
+    "husky": "1.3.1",
+    "lint-staged": "8.1.5",
+    "mockjs": "1.0.1-beta3",
+    "plop": "2.3.0",
+    "runjs": "4.3.2",
+    "sass": "1.26.2",
+    "sass-loader": "8.0.2",
+    "script-ext-html-webpack-plugin": "2.1.3",
+    "serve-static": "1.13.2",
+    "svg-sprite-loader": "4.1.3",
+    "svgo": "1.2.0",
+    "vue-template-compiler": "2.6.10"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions"
+  ],
+  "bugs": {
+    "url": "https://github.com/PanJiaChen/vue-element-admin/issues"
+  },
+  "engines": {
+    "node": ">=8.9",
+    "npm": ">= 3.0.0"
+  },
+  "keywords": [
+    "vue",
+    "admin",
+    "dashboard",
+    "element-ui",
+    "boilerplate",
+    "admin-template",
+    "management-system"
+  ]
+}

+ 26 - 0
plop-templates/component/index.hbs

@@ -0,0 +1,26 @@
+{{#if template}}
+<template>
+  <div />
+</template>
+{{/if}}
+
+{{#if script}}
+<script>
+export default {
+  name: '{{ properCase name }}',
+  props: {},
+  data() {
+    return {}
+  },
+  created() {},
+  mounted() {},
+  methods: {}
+}
+</script>
+{{/if}}
+
+{{#if style}}
+<style lang="scss" scoped>
+
+</style>
+{{/if}}

+ 55 - 0
plop-templates/component/prompt.js

@@ -0,0 +1,55 @@
+const { notEmpty } = require('../utils.js')
+
+module.exports = {
+  description: 'generate vue component',
+  prompts: [{
+    type: 'input',
+    name: 'name',
+    message: 'component name please',
+    validate: notEmpty('name')
+  },
+  {
+    type: 'checkbox',
+    name: 'blocks',
+    message: 'Blocks:',
+    choices: [{
+      name: '<template>',
+      value: 'template',
+      checked: true
+    },
+    {
+      name: '<script>',
+      value: 'script',
+      checked: true
+    },
+    {
+      name: 'style',
+      value: 'style',
+      checked: true
+    }
+    ],
+    validate(value) {
+      if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
+        return 'Components require at least a <script> or <template> tag.'
+      }
+      return true
+    }
+  }
+  ],
+  actions: data => {
+    const name = '{{properCase name}}'
+    const actions = [{
+      type: 'add',
+      path: `src/components/${name}/index.vue`,
+      templateFile: 'plop-templates/component/index.hbs',
+      data: {
+        name: name,
+        template: data.blocks.includes('template'),
+        script: data.blocks.includes('script'),
+        style: data.blocks.includes('style')
+      }
+    }]
+
+    return actions
+  }
+}

+ 16 - 0
plop-templates/store/index.hbs

@@ -0,0 +1,16 @@
+{{#if state}}
+const state = {}
+{{/if}}
+
+{{#if mutations}}
+const mutations = {}
+{{/if}}
+
+{{#if actions}}
+const actions = {}
+{{/if}}
+
+export default {
+  namespaced: true,
+  {{options}}
+}

+ 62 - 0
plop-templates/store/prompt.js

@@ -0,0 +1,62 @@
+const { notEmpty } = require('../utils.js')
+
+module.exports = {
+  description: 'generate store',
+  prompts: [{
+    type: 'input',
+    name: 'name',
+    message: 'store name please',
+    validate: notEmpty('name')
+  },
+  {
+    type: 'checkbox',
+    name: 'blocks',
+    message: 'Blocks:',
+    choices: [{
+      name: 'state',
+      value: 'state',
+      checked: true
+    },
+    {
+      name: 'mutations',
+      value: 'mutations',
+      checked: true
+    },
+    {
+      name: 'actions',
+      value: 'actions',
+      checked: true
+    }
+    ],
+    validate(value) {
+      if (!value.includes('state') || !value.includes('mutations')) {
+        return 'store require at least state and mutations'
+      }
+      return true
+    }
+  }
+  ],
+  actions(data) {
+    const name = '{{name}}'
+    const { blocks } = data
+    const options = ['state', 'mutations']
+    const joinFlag = `,
+  `
+    if (blocks.length === 3) {
+      options.push('actions')
+    }
+
+    const actions = [{
+      type: 'add',
+      path: `src/store/modules/${name}.js`,
+      templateFile: 'plop-templates/store/index.hbs',
+      data: {
+        options: options.join(joinFlag),
+        state: blocks.includes('state'),
+        mutations: blocks.includes('mutations'),
+        actions: blocks.includes('actions')
+      }
+    }]
+    return actions
+  }
+}

+ 2 - 0
plop-templates/utils.js

@@ -0,0 +1,2 @@
+exports.notEmpty = name => v =>
+  !v || v.trim() === '' ? `${name} is required` : true

+ 26 - 0
plop-templates/view/index.hbs

@@ -0,0 +1,26 @@
+{{#if template}}
+<template>
+  <div />
+</template>
+{{/if}}
+
+{{#if script}}
+<script>
+export default {
+  name: '{{ properCase name }}',
+  props: {},
+  data() {
+    return {}
+  },
+  created() {},
+  mounted() {},
+  methods: {}
+}
+</script>
+{{/if}}
+
+{{#if style}}
+<style lang="scss" scoped>
+
+</style>
+{{/if}}

+ 55 - 0
plop-templates/view/prompt.js

@@ -0,0 +1,55 @@
+const { notEmpty } = require('../utils.js')
+
+module.exports = {
+  description: 'generate a view',
+  prompts: [{
+    type: 'input',
+    name: 'name',
+    message: 'view name please',
+    validate: notEmpty('name')
+  },
+  {
+    type: 'checkbox',
+    name: 'blocks',
+    message: 'Blocks:',
+    choices: [{
+      name: '<template>',
+      value: 'template',
+      checked: true
+    },
+    {
+      name: '<script>',
+      value: 'script',
+      checked: true
+    },
+    {
+      name: 'style',
+      value: 'style',
+      checked: true
+    }
+    ],
+    validate(value) {
+      if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
+        return 'View require at least a <script> or <template> tag.'
+      }
+      return true
+    }
+  }
+  ],
+  actions: data => {
+    const name = '{{name}}'
+    const actions = [{
+      type: 'add',
+      path: `src/views/${name}/index.vue`,
+      templateFile: 'plop-templates/view/index.hbs',
+      data: {
+        name: name,
+        template: data.blocks.includes('template'),
+        script: data.blocks.includes('script'),
+        style: data.blocks.includes('style')
+      }
+    }]
+
+    return actions
+  }
+}

+ 9 - 0
plopfile.js

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

+ 5 - 0
postcss.config.js

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

BIN
public/favicon.ico


+ 15 - 0
public/index.html

@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= webpackConfig.name %></title>
+  </head>
+  <body>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 11 - 0
src/App.vue

@@ -0,0 +1,11 @@
+<template>
+  <div id="app">
+    <router-view />
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'App'
+}
+</script>

+ 41 - 0
src/api/article.js

@@ -0,0 +1,41 @@
+import request from '@/utils/request'
+
+export function fetchList(query) {
+  return request({
+    url: '/vue-element-admin/article/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function fetchArticle(id) {
+  return request({
+    url: '/vue-element-admin/article/detail',
+    method: 'get',
+    params: { id }
+  })
+}
+
+export function fetchPv(pv) {
+  return request({
+    url: '/vue-element-admin/article/pv',
+    method: 'get',
+    params: { pv }
+  })
+}
+
+export function createArticle(data) {
+  return request({
+    url: '/vue-element-admin/article/create',
+    method: 'post',
+    data
+  })
+}
+
+export function updateArticle(data) {
+  return request({
+    url: '/vue-element-admin/article/update',
+    method: 'post',
+    data
+  })
+}

+ 10 - 0
src/api/calling-board.js

@@ -0,0 +1,10 @@
+//"get_board_titles?part_id=" + _this.partId,
+import request from '@/utils/request'
+
+export function getBoardTitles(partid) {
+    return request({
+        url: `/InfoBoard/get_board_titles?part_id=${partid}`,
+        method: 'get',
+        loading: false
+    })
+}

+ 65 - 0
src/api/calling-broadcast.js

@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+/** 查询某科室下的指定区域广播信息 */
+export function getBoardCast(partid, zoneIndex) {
+  return request({
+    url: `/mgr/zoneinfo/${partid}/${zoneIndex}`,
+    method: 'get',
+    loading: false
+  })
+}
+/**  更新指定科室的指定区域广播信息 */
+export function updateBroadCast(partid, zoneIndex, params) {
+  return request({
+    url: `/mgr/zoneinfo/${partid}/${zoneIndex}`,
+    method: 'put',
+    loading: false,
+    data: params
+  })
+}
+
+/** 查询某个科室的广播音频文件列表 */
+export function getZoneFileList(partid) {
+  return request({
+    url: `/mgr/zoneinfofilelist/${partid}`,
+    method: 'get',
+    loading: false
+  })
+}
+/** 删除某科室下的音频文件 */
+export function deleteZoneFile(partid, params) {
+  return request({
+    url: `/mgr/zoneinfo/delete/${partid}`,
+    method: 'post',
+    loading: false,
+    data: params
+  })
+}
+
+/** 获取音频文件虚拟目录 */
+export function getZoneVirtualDir() {
+  return request({
+    url: '/mgr/zoneinfovirtualdir',
+    method: 'get',
+    loading: false
+  })
+}
+
+/** 广播音频 */
+export function broadCast(params) {
+  return request({
+    url: '/mgr/broadcast',
+    method: 'post',
+    loading: false,
+    data: params
+  })
+}
+
+/** 设置或获取广播音量 */
+export function broadVol(params) {
+  return request({
+    url: '/WDHS-I/callingMainNurse_BroadcastVol',
+    method: 'post',
+    loading: false,
+    data: params
+  })
+}

+ 156 - 0
src/api/calling-device.js

@@ -0,0 +1,156 @@
+/**
+ * 设备信息接口请求
+ * @param params
+ * @returns {Promise<any>}
+ */
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/device/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+/** 新增设备 */
+export function add(params) {
+  return request({
+    url: '/mgr/device',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 新增虚拟设备 */
+export function addVirtualDevice(params) {
+  return request({
+    url: '/mgr/virtualdevice',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 删除设备 */
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/device/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+/** 更新设备 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/device/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 查询单个设备 */
+export function get(id, params) {
+  return request({
+    url: `/mgr/device/${id}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}
+
+/** 查询某类设备 */
+export function getDeviceByType(partid, type) {
+  return request({
+    url: `/mgr/device/${partid}/${type}`,
+    method: 'get',
+    loading: false
+  })
+}
+/** 查询某个主机下的某类设备 */
+export function getSubDevices(hostid, type) {
+  return request({
+    url: `/mgr/subdevice/${hostid}/${type}`,
+    method: 'get',
+    loading: false
+  })
+}
+/** 获取DHCP服务器下一个可分配地址 */
+export function getNextIP() {
+  return request({
+    url: '/mgr/device/getnextip',
+    method: 'get',
+    loading: false
+  })
+}
+
+/** 获取APP版本更新信息 */
+export function getAPPVersion(params) {
+  return request({
+    url: '/mgr/getappversion',
+    method: 'get',
+    loading: false,
+    params
+  })
+}
+/** 设置APP版本更新信息 **/
+export function setAPPVersion(params) {
+  return request({
+    url: '/mgr/setappversion',
+    method: 'post',
+    loading: false,
+    data: params
+  })
+}
+
+export function getBoardPage(params) {
+  return request({
+    url: '/InfoBoard/board_list',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+export function saveBoard(params) {
+  return request({
+    url: '/InfoBoard/save_board',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 写入分机测试数据 */
+export function addTestData() {
+  return request({
+    url: '/mgr/testdata',
+    method: 'POST',
+    loading: true
+  })
+}
+
+/** 擦除分机测试数据 */
+export function deleteTestData() {
+  return request({
+    url: '/mgr/testdata',
+    method: 'DELETE',
+    loading: true
+  })
+}
+
+/** 更新设备排序,按房号,床号,排序,护士主机可按顺序显示 */
+export function updateDeviceIndex() {
+  return request({
+    url: '/mgr/updatedeviceindex',
+    method: 'POST',
+    loading: true
+  })
+}
+

+ 19 - 0
src/api/calling-deviceRegisterParams.js

@@ -0,0 +1,19 @@
+
+import request from '@/utils/request'
+/** 查询设置 */
+export function get() {
+  return request({
+    url: '/deviceregisterparams',
+    method: 'get',
+    loading: false
+  })
+}
+
+/** 更新参数设置 */
+export function update(params) {
+  return request({
+    url: 'deviceregisterparams',
+    method: 'put',
+    data: params
+  })
+}

+ 29 - 0
src/api/calling-list.js

@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/calllist/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/calllist/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+export function clearRecord() {
+  return request({
+    url: `/mgr/calllist`,
+    method: 'DELETE',
+    loading: true
+  })
+}
+

+ 55 - 0
src/api/calling-message.js

@@ -0,0 +1,55 @@
+/**
+ * 留言接口请求
+ * @param params
+ * @returns {Promise<any>}
+ */
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/message/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+/** 新增留言 */
+export function add(params) {
+  return request({
+    url: '/mgr/message',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 删除留言 */
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/message/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+/** 更新留言 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/message/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 查询单个留言 */
+export function get(id, params) {
+  return request({
+    url: `/mgr/message/${id}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}

+ 39 - 0
src/api/calling-ncConfig.js

@@ -0,0 +1,39 @@
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/ncConfig/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/ncConfig/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+/** 新增 */
+export function add(params) {
+  return request({
+    url: '/mgr/ncConfig',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 修改 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/ncConfig/${id}`,
+    method: 'put',
+    data: params
+  })
+}

+ 37 - 0
src/api/calling-ncError.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/ncError/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/ncError/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+export function getModel(id) {
+  return request({
+    url: `/mgr/ncError/${id}`,
+    method: 'GET',
+    loading: true,
+    data: id
+  })
+}
+
+export function clearError() {
+  return request({
+    url: '/mgr/ncError',
+    method: 'DELETE',
+    loading: true
+  })
+}

+ 56 - 0
src/api/calling-notice.js

@@ -0,0 +1,56 @@
+/**
+ * 通知接口请求
+ * @param params
+ * @returns {Promise<any>}
+ */
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/notice/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+/** 新增通知 */
+export function add(params) {
+  return request({
+    url: '/mgr/notice',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 删除通知 */
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/notice/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+/** 更新通知 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/notice/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 查询单个通知 */
+export function get(id, params) {
+  return request({
+    url: `/mgr/notice/${id}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}
+

+ 47 - 0
src/api/calling-nurse.js

@@ -0,0 +1,47 @@
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/nurse/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/nurse/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+/** 新增 */
+export function add(params) {
+  return request({
+    url: '/mgr/nurse',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 修改 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/nurse/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 获取指定护理参数配置项 */
+export function getNurseConfigs(partid, configId) {
+  return request({
+    url: `/mgr/nurselist/${partid}/${configId}`,
+    method: 'get'
+  })
+}

+ 74 - 0
src/api/calling-part.js

@@ -0,0 +1,74 @@
+/**
+ * 科室信息接口请求
+ * @param params
+ * @returns {Promise<any>}
+ */
+import request from '@/utils/request'
+
+export function getList(params) {
+  return request({
+    url: '/mgr/partinfo/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+/** 新增科室 */
+export function add(params) {
+  return request({
+    url: '/mgr/partinfo',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 删除科室 */
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/partinfo/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+/** 更新科室 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/partinfo/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 查询单个科室 */
+export function get(id, params) {
+  return request({
+    url: `/mgr/partinfo/${id}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}
+/** 获取科室的床位信息 */
+export function getBedInfos(id, params) {
+  return request({
+    url: `/mgr/getbeddata/${id}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}
+
+/** 获取授权期限 */
+export function getExpire() {
+  return request({
+    url: '/LC/expire',
+    method: 'get',
+    loading: false
+  })
+}

+ 53 - 0
src/api/calling-patient.js

@@ -0,0 +1,53 @@
+/**
+ * 病人信息接口请求
+ * @param params
+ * @returns {Promise<any>}
+ */
+import request from '@/utils/request'
+/** 新增病人 */
+export function add(params) {
+  return request({
+    url: '/mgr/patient',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 病人出院 */
+export function remove(patientId, bedId) {
+  return request({
+    url: `/mgr/patient/${patientId}/${bedId}`,
+    method: 'DELETE',
+    loading: true
+  })
+}
+
+/** 更新病人 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/patient/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 查询单个病人 */
+export function get(id, params) {
+  return request({
+    url: `/mgr/patient/${id}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}
+
+/** 更换床位 */
+export function changeBed(params) {
+  return request({
+    url: '/mgr/patientchangebed',
+    method: 'post',
+    loading: false,
+    data: params
+  })
+}

+ 25 - 0
src/api/calling-speech.js

@@ -0,0 +1,25 @@
+/**
+ * 科室语音配置接口请求
+ * @param params
+ * @returns {Promise<any>}
+ */
+import request from '@/utils/request'
+
+/** 更新科室语音配置 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/speechcfg/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 查询科室语音配置 */
+export function get(partid, params) {
+  return request({
+    url: `/mgr/speechcfg/${partid}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}

+ 65 - 0
src/api/calling-staff.js

@@ -0,0 +1,65 @@
+/**
+ * 职工信息接口请求
+ * @param params
+ * @returns {Promise<any>}
+ */
+import request from '@/utils/request'
+export function getList(params) {
+  return request({
+    url: '/mgr/staff/page',
+    method: 'POST',
+    loading: true,
+    data: params,
+    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+  })
+}
+
+/** 新增职工 */
+export function add(params) {
+  return request({
+    url: '/mgr/staff',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}
+
+/** 删除职工 */
+export function remove(params) {
+  const ids = params.toString()
+  return request({
+    url: `/mgr/staff/${ids}`,
+    method: 'DELETE',
+    loading: true,
+    data: params
+  })
+}
+
+/** 更新职工 */
+export function update(id, params) {
+  return request({
+    url: `/mgr/staff/${id}`,
+    method: 'put',
+    data: params
+  })
+}
+
+/** 查询单个职工 */
+export function get(id, params) {
+  return request({
+    url: `/mgr/staff/${id}`,
+    method: 'get',
+    loading: false,
+    params
+  })
+}
+
+/** 查询某类职工 */
+export function getStaffByType(partId, staffType) {
+  return request({
+    url: `/mgr/staff/${partId}/${staffType}`,
+    method: 'get',
+    loading: false
+  })
+}
+

+ 0 - 0
src/api/calling-userInfo.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor