Browse Source

new project commit

csx 4 years ago
commit
c209f63ed7
100 changed files with 25887 additions and 0 deletions
  1. 82 0
      build/build-cdn.js
  2. 41 0
      build/build.js
  3. 3 0
      build/cdn.json
  4. 54 0
      build/check-versions.js
  5. BIN
      build/logo.png
  6. 130 0
      build/utils.js
  7. 22 0
      build/vue-loader.conf.js
  8. 121 0
      build/webpack.base.conf.js
  9. 95 0
      build/webpack.dev.conf.js
  10. 151 0
      build/webpack.prod-cdn.conf.js
  11. 149 0
      build/webpack.prod.conf.js
  12. 14 0
      config/dev.env.js
  13. 76 0
      config/index.js
  14. 9 0
      config/prod.env.js
  15. 7 0
      config/test.env.js
  16. 15 0
      index.html
  17. 16742 0
      package-lock.json
  18. 118 0
      package.json
  19. 38 0
      src/App.vue
  20. 23 0
      src/api/admin_user.js
  21. 135 0
      src/api/advice.js
  22. 25 0
      src/api/check.js
  23. 254 0
      src/api/dialysis.js
  24. 14 0
      src/api/doctor.js
  25. 13 0
      src/api/login.js
  26. 27 0
      src/api/monitor.js
  27. 73 0
      src/api/patient.js
  28. 8 0
      src/api/qiniu.js
  29. 8 0
      src/api/stock.js
  30. BIN
      src/assets/login/data.jpg
  31. BIN
      src/assets/login/logo.png
  32. BIN
      src/assets/login/newImg.png
  33. BIN
      src/assets/login/newLogo.png
  34. BIN
      src/assets/login/no_network.jpg
  35. BIN
      src/assets/login/no_network.png
  36. BIN
      src/assets/login/nodata.jpg
  37. BIN
      src/assets/my/11.png
  38. BIN
      src/assets/my/12.png
  39. BIN
      src/assets/my/13.png
  40. BIN
      src/assets/my/14.png
  41. BIN
      src/assets/my/15.png
  42. BIN
      src/assets/my/16.png
  43. BIN
      src/assets/my/avatar.png
  44. BIN
      src/assets/my/exit.png
  45. BIN
      src/assets/my/ico_gywm.png
  46. BIN
      src/assets/my/ico_rgsz.png
  47. BIN
      src/assets/my/ico_rjgx.png
  48. BIN
      src/assets/my/ico_sybz.png
  49. BIN
      src/assets/my/ico_xtsz.png
  50. BIN
      src/assets/my/ico_xxtz.png
  51. BIN
      src/assets/my/modification.png
  52. BIN
      src/assets/my/myBanner.png
  53. BIN
      src/assets/my/name.png
  54. BIN
      src/assets/my/privacy.png
  55. BIN
      src/assets/my/user.png
  56. BIN
      src/assets/product/ico_1.png
  57. BIN
      src/assets/product/ico_2.png
  58. BIN
      src/assets/product/logo.png
  59. BIN
      src/assets/product/test.jpg
  60. BIN
      src/assets/record/1.png
  61. BIN
      src/assets/record/10.png
  62. BIN
      src/assets/record/11.png
  63. BIN
      src/assets/record/12.png
  64. BIN
      src/assets/record/13.png
  65. BIN
      src/assets/record/14.png
  66. BIN
      src/assets/record/15.png
  67. BIN
      src/assets/record/16.png
  68. BIN
      src/assets/record/2.png
  69. BIN
      src/assets/record/3.png
  70. BIN
      src/assets/record/4.png
  71. BIN
      src/assets/record/5.png
  72. BIN
      src/assets/record/6.png
  73. BIN
      src/assets/record/7.png
  74. BIN
      src/assets/record/8.png
  75. BIN
      src/assets/record/9.png
  76. 59 0
      src/assets/styles/iconfont - 副本.css
  77. 63 0
      src/assets/styles/iconfont.css
  78. 180 0
      src/assets/styles/iconfont/demo_unicode.html
  79. 51 0
      src/assets/styles/iconfont/iconfont.css
  80. BIN
      src/assets/styles/iconfont/iconfont.eot
  81. 32 0
      src/assets/styles/iconfont/iconfont.svg
  82. BIN
      src/assets/styles/iconfont/iconfont.ttf
  83. BIN
      src/assets/styles/iconfont/iconfont.woff
  84. 45 0
      src/main.js
  85. 194 0
      src/pages/advice/AdvicePage.vue
  86. 652 0
      src/pages/advice/DialysisAdviceTable.vue
  87. 526 0
      src/pages/advice/NormalAdviceTable.vue
  88. 89 0
      src/pages/advice/index.vue
  89. 428 0
      src/pages/home/login.vue
  90. 27 0
      src/pages/layout/ContentArea.vue
  91. 123 0
      src/pages/layout/RecordPage.vue
  92. 172 0
      src/pages/layout/SideBar.vue
  93. 29 0
      src/pages/layout/layout.vue
  94. 259 0
      src/pages/main/DetailsPage.vue
  95. 614 0
      src/pages/main/DialysisArea.vue
  96. 488 0
      src/pages/main/PatientBox.vue
  97. 2463 0
      src/pages/main/Print.vue
  98. 586 0
      src/pages/main/PrintIndex.vue
  99. 360 0
      src/pages/main/RecordPage.vue
  100. 0 0
      src/pages/main/WaitingArea.vue

+ 82 - 0
build/build-cdn.js View File

@@ -0,0 +1,82 @@
1
+'use strict'
2
+require('./check-versions')()
3
+
4
+process.env.NODE_ENV = 'production'
5
+
6
+const ora = require('ora')
7
+const rm = require('rimraf')
8
+const path = require('path')
9
+const chalk = require('chalk')
10
+const webpack = require('webpack')
11
+const config = require('../config')
12
+const webpackConfig = require('./webpack.prod-cdn.conf')
13
+const writeJson = require('write-json')
14
+const QiniuPlugin = require('qiniu-webpack-plugin')
15
+// const utils = require('./utils')
16
+
17
+const spinner = ora('building for production...')
18
+spinner.start()
19
+
20
+const cdn_ver = require('./cdn.json').version
21
+
22
+const addVer = (ver) => {
23
+  const ar = ver.split('.')
24
+  ar[2] = parseInt(ar[2]) + 1
25
+  return ar.join('.')
26
+}
27
+
28
+const verNow = addVer(cdn_ver)
29
+
30
+webpackConfig.plugins.push(new QiniuPlugin({
31
+  ACCESS_KEY: 'E5sYahBxp7RfMECLXhCUZJD3U_BTKYGsPDS4NLFd',
32
+  SECRET_KEY: 'mlO3FEmRX-S_9XPCf9WrkvzgnpZ8IlmHeiVrIDQF',
33
+  bucket: 'vue',
34
+  path: `pad/${verNow}/`
35
+}))
36
+
37
+webpackConfig.output.publicPath = `//kuyi.shengws.com/pad/${verNow}/`
38
+// webpackConfig.output.filename = utils.assetsPath('js/[name].js')
39
+// webpackConfig.output.chunkFilename = utils.assetsPath('js/[id].js')
40
+
41
+// console.log(webpackConfig.plugins)
42
+// console.log(typeof webpackConfig.plugins)
43
+// console.log(Object.keys(webpackConfig.plugins))
44
+// webpackConfig.plugins.filter((el)=>{
45
+//   console.log(el)
46
+// })
47
+// return
48
+
49
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
50
+  if (err) throw err
51
+  console.log('run build')
52
+  webpack(webpackConfig, (err, stats) => {
53
+    spinner.stop()
54
+    if (err) throw err
55
+    process.stdout.write(stats.toString({
56
+      colors: true,
57
+      modules: false,
58
+      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
59
+      chunks: false,
60
+      chunkModules: false
61
+    }) + '\n\n')
62
+
63
+    if (stats.hasErrors()) {
64
+      console.log(chalk.red('  Build failed with errors.\n'))
65
+      process.exit(1)
66
+    }
67
+    console.log('verNow,', verNow)
68
+
69
+    writeJson.promise(path.join(__dirname, './cdn.json'), {
70
+      version: verNow
71
+    }).then(function() {
72
+      // do stuff
73
+      console.log('write cdn.json ok')
74
+    })
75
+
76
+    console.log(chalk.cyan('  Build complete.\n'))
77
+    console.log(chalk.yellow(
78
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
79
+      '  Opening index.html over file:// won\'t work.\n'
80
+    ))
81
+  })
82
+})

+ 41 - 0
build/build.js View File

@@ -0,0 +1,41 @@
1
+'use strict'
2
+require('./check-versions')()
3
+
4
+process.env.NODE_ENV = 'production'
5
+
6
+const ora = require('ora')
7
+const rm = require('rimraf')
8
+const path = require('path')
9
+const chalk = require('chalk')
10
+const webpack = require('webpack')
11
+const config = require('../config')
12
+const webpackConfig = require('./webpack.prod.conf')
13
+
14
+const spinner = ora('building for production...')
15
+spinner.start()
16
+
17
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18
+  if (err) throw err
19
+  webpack(webpackConfig, (err, stats) => {
20
+    spinner.stop()
21
+    if (err) throw err
22
+    process.stdout.write(stats.toString({
23
+      colors: true,
24
+      modules: false,
25
+      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26
+      chunks: false,
27
+      chunkModules: false
28
+    }) + '\n\n')
29
+
30
+    if (stats.hasErrors()) {
31
+      console.log(chalk.red('  Build failed with errors.\n'))
32
+      process.exit(1)
33
+    }
34
+
35
+    console.log(chalk.cyan('  Build complete.\n'))
36
+    console.log(chalk.yellow(
37
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
38
+      '  Opening index.html over file:// won\'t work.\n'
39
+    ))
40
+  })
41
+})

+ 3 - 0
build/cdn.json View File

@@ -0,0 +1,3 @@
1
+{
2
+  "version": "1.1.501"
3
+}

+ 54 - 0
build/check-versions.js View File

@@ -0,0 +1,54 @@
1
+'use strict'
2
+const chalk = require('chalk')
3
+const semver = require('semver')
4
+const packageConfig = require('../package.json')
5
+const shell = require('shelljs')
6
+
7
+function exec (cmd) {
8
+  return require('child_process').execSync(cmd).toString().trim()
9
+}
10
+
11
+const versionRequirements = [
12
+  {
13
+    name: 'node',
14
+    currentVersion: semver.clean(process.version),
15
+    versionRequirement: packageConfig.engines.node
16
+  }
17
+]
18
+
19
+if (shell.which('npm')) {
20
+  versionRequirements.push({
21
+    name: 'npm',
22
+    currentVersion: exec('npm --version'),
23
+    versionRequirement: packageConfig.engines.npm
24
+  })
25
+}
26
+
27
+module.exports = function () {
28
+  const warnings = []
29
+
30
+  for (let i = 0; i < versionRequirements.length; i++) {
31
+    const mod = versionRequirements[i]
32
+
33
+    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
34
+      warnings.push(mod.name + ': ' +
35
+        chalk.red(mod.currentVersion) + ' should be ' +
36
+        chalk.green(mod.versionRequirement)
37
+      )
38
+    }
39
+  }
40
+
41
+  if (warnings.length) {
42
+    console.log('')
43
+    console.log(chalk.yellow('To use this template, you must update following to modules:'))
44
+    console.log()
45
+
46
+    for (let i = 0; i < warnings.length; i++) {
47
+      const warning = warnings[i]
48
+      console.log('  ' + warning)
49
+    }
50
+
51
+    console.log()
52
+    process.exit(1)
53
+  }
54
+}

BIN
build/logo.png View File


+ 130 - 0
build/utils.js View File

@@ -0,0 +1,130 @@
1
+'use strict'
2
+const path = require('path')
3
+const config = require('../config')
4
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
5
+const packageConfig = require('../package.json')
6
+
7
+exports.assetsPath = function (_path) {
8
+  const assetsSubDirectory = process.env.NODE_ENV === 'production'
9
+    ? config.build.assetsSubDirectory
10
+    : config.dev.assetsSubDirectory
11
+
12
+  return path.posix.join(assetsSubDirectory, _path)
13
+}
14
+
15
+exports.cssLoaders = function (options) {
16
+  options = options || {}
17
+
18
+  const cssLoader = {
19
+    loader: 'css-loader',
20
+    options: {
21
+      sourceMap: options.sourceMap
22
+    }
23
+  }
24
+
25
+  const postcssLoader = {
26
+    loader: 'postcss-loader',
27
+    options: {
28
+      sourceMap: options.sourceMap
29
+    }
30
+  }
31
+
32
+  // generate loader string to be used with extract text plugin
33
+  function generateLoaders (loader, loaderOptions) {
34
+    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
35
+
36
+    if (loader) {
37
+      loaders.push({
38
+        loader: loader + '-loader',
39
+        options: Object.assign({}, loaderOptions, {
40
+          sourceMap: options.sourceMap
41
+        })
42
+      })
43
+    }
44
+
45
+    // Extract CSS when that option is specified
46
+    // (which is the case during production build)
47
+    if (options.extract) {
48
+      return ExtractTextPlugin.extract({
49
+        use: loaders,
50
+        fallback: 'vue-style-loader',
51
+        publicPath:'../../',
52
+      })
53
+    } else {
54
+      return ['vue-style-loader'].concat(loaders)
55
+    }
56
+  }
57
+
58
+  // 全局文件引入 当然只想编译一个文件的话可以省去这个函数
59
+function resolveResource(name) {
60
+  return path.resolve(__dirname, '../src/styles/' + name);
61
+}
62
+function generateSassResourceLoader() {
63
+  var loaders = [
64
+    cssLoader,
65
+    'sass-loader',
66
+    {
67
+      loader: 'sass-resources-loader',
68
+      options: {
69
+        // 多个文件时用数组的形式传入,单个文件时可以直接使用 path.resolve(__dirname, '../static/style/common.scss'
70
+        resources: [resolveResource('variables.scss')]
71
+      }
72
+    }
73
+    ];
74
+    if (options.extract) {
75
+      return ExtractTextPlugin.extract({
76
+        use: loaders,
77
+        fallback: 'vue-style-loader'
78
+      })
79
+    } else {
80
+      return ['vue-style-loader'].concat(loaders)
81
+    }
82
+  }
83
+
84
+  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
85
+  return {
86
+    css: generateLoaders(),
87
+    postcss: generateLoaders(),
88
+    less: generateLoaders('less'),
89
+    // sass: generateLoaders('sass', { indentedSyntax: true }),
90
+    // scss: generateLoaders('sass'),
91
+    sass: generateSassResourceLoader(),
92
+    scss: generateSassResourceLoader(),
93
+    stylus: generateLoaders('stylus'),
94
+    styl: generateLoaders('stylus')
95
+  }
96
+}
97
+
98
+// Generate loaders for standalone style files (outside of .vue)
99
+exports.styleLoaders = function (options) {
100
+  const output = []
101
+  const loaders = exports.cssLoaders(options)
102
+
103
+  for (const extension in loaders) {
104
+    const loader = loaders[extension]
105
+    output.push({
106
+      test: new RegExp('\\.' + extension + '$'),
107
+      use: loader
108
+    })
109
+  }
110
+
111
+  return output
112
+}
113
+
114
+exports.createNotifierCallback = () => {
115
+  const notifier = require('node-notifier')
116
+
117
+  return (severity, errors) => {
118
+    if (severity !== 'error') return
119
+
120
+    const error = errors[0]
121
+    const filename = error.file && error.file.split('!').pop()
122
+
123
+    notifier.notify({
124
+      title: packageConfig.name,
125
+      message: severity + ': ' + error.name,
126
+      subtitle: filename || '',
127
+      icon: path.join(__dirname, 'logo.png')
128
+    })
129
+  }
130
+}

+ 22 - 0
build/vue-loader.conf.js View File

@@ -0,0 +1,22 @@
1
+'use strict'
2
+const utils = require('./utils')
3
+const config = require('../config')
4
+const isProduction = process.env.NODE_ENV === 'production'
5
+const sourceMapEnabled = isProduction
6
+  ? config.build.productionSourceMap
7
+  : config.dev.cssSourceMap
8
+
9
+module.exports = {
10
+  loaders: utils.cssLoaders({
11
+    sourceMap: sourceMapEnabled,
12
+    extract: isProduction
13
+  }),
14
+  cssSourceMap: sourceMapEnabled,
15
+  cacheBusting: config.dev.cacheBusting,
16
+  transformToRequire: {
17
+    video: ['src', 'poster'],
18
+    source: 'src',
19
+    img: 'src',
20
+    image: 'xlink:href'
21
+  }
22
+}

+ 121 - 0
build/webpack.base.conf.js View File

@@ -0,0 +1,121 @@
1
+'use strict'
2
+const path = require('path')
3
+const utils = require('./utils')
4
+const config = require('../config')
5
+const vueLoaderConfig = require('./vue-loader.conf')
6
+
7
+
8
+function resolve (dir) {
9
+  return path.join(__dirname, '..', dir)
10
+}
11
+
12
+const createLintingRule = () => ({
13
+  test: /\.(js|vue)$/,
14
+  loader: 'eslint-loader',
15
+  enforce: 'pre',
16
+  include: [resolve('src'), resolve('test')],
17
+  options: {
18
+    formatter: require('eslint-friendly-formatter'),
19
+    emitWarning: !config.dev.showEslintErrorsInOverlay
20
+  }
21
+})
22
+
23
+let webpackConfig = {
24
+  context: path.resolve(__dirname, '../'),
25
+  entry: {
26
+    app: './src/main.js'
27
+  },
28
+  output: {
29
+    path: config.build.assetsRoot,
30
+    filename: '[name].js',
31
+    publicPath: process.env.NODE_ENV === 'production'
32
+      ? config.build.assetsPublicPath
33
+      : config.dev.assetsPublicPath
34
+  },
35
+  resolve: {
36
+    extensions: ['.js', '.vue', '.json'],
37
+    alias: {
38
+      'vue$': 'vue/dist/vue.esm.js',
39
+      '@': resolve('src'),
40
+      'jquery':'jquery',
41
+    }
42
+  },
43
+  module: {
44
+    rules: [
45
+      // ...(config.dev.useEslint ? [createLintingRule()] : []),
46
+      {
47
+        test: /\.vue$/,
48
+        loader: 'vue-loader',
49
+        options: vueLoaderConfig
50
+      },
51
+      {
52
+        test: /\.js$/,
53
+        loader: 'babel-loader',
54
+        include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
55
+      },
56
+      {
57
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
58
+        loader: 'url-loader',
59
+        options: {
60
+          limit: 10000,
61
+          name: utils.assetsPath('img/[name].[hash:7].[ext]')
62
+        }
63
+      },
64
+      {
65
+        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
66
+        loader: 'url-loader',
67
+        options: {
68
+          limit: 10000,
69
+          name: utils.assetsPath('media/[name].[hash:7].[ext]')
70
+        }
71
+      },
72
+      {
73
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
74
+        loader: 'url-loader',
75
+        options: {
76
+          limit: 10000,
77
+          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
78
+        }
79
+      },
80
+      {
81
+        test: /\.sass$/,
82
+        loaders: ['style', 'css', 'sass']
83
+      }
84
+    ]
85
+  },
86
+  node: {
87
+    // prevent webpack from injecting useless setImmediate polyfill because Vue
88
+    // source contains it (although only uses it if it's native).
89
+    setImmediate: false,
90
+    // prevent webpack from injecting mocks to Node native modules
91
+    // that does not make sense for the client
92
+    dgram: 'empty',
93
+    fs: 'empty',
94
+    net: 'empty',
95
+    tls: 'empty',
96
+    child_process: 'empty'
97
+  }
98
+}
99
+module.exports = webpackConfig
100
+
101
+// var vueLoaderConfig = require('./vue-loader.conf')
102
+const vuxLoader = require('vux-loader')
103
+
104
+// module.exports = vuxLoader.merge(webpackConfig, {
105
+//   plugins: ['vux-ui']
106
+// })
107
+
108
+module.exports = vuxLoader.merge(webpackConfig, {
109
+  plugins: [
110
+    {
111
+      name: 'vux-ui'
112
+    },
113
+    {
114
+      name: 'duplicate-style'
115
+    },
116
+    {
117
+      name: 'less-theme', 
118
+      path: 'src/styles/vux.less'
119
+    }
120
+  ]
121
+})

+ 95 - 0
build/webpack.dev.conf.js View File

@@ -0,0 +1,95 @@
1
+'use strict'
2
+const utils = require('./utils')
3
+const webpack = require('webpack')
4
+const config = require('../config')
5
+const merge = require('webpack-merge')
6
+const path = require('path')
7
+const baseWebpackConfig = require('./webpack.base.conf')
8
+const CopyWebpackPlugin = require('copy-webpack-plugin')
9
+const HtmlWebpackPlugin = require('html-webpack-plugin')
10
+const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
11
+const portfinder = require('portfinder')
12
+
13
+const HOST = process.env.HOST
14
+const PORT = process.env.PORT && Number(process.env.PORT)
15
+
16
+const devWebpackConfig = merge(baseWebpackConfig, {
17
+  module: {
18
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
19
+  },
20
+  // cheap-module-eval-source-map is faster for development
21
+  devtool: config.dev.devtool,
22
+
23
+  // these devServer options should be customized in /config/index.js
24
+  devServer: {
25
+    clientLogLevel: 'warning',
26
+    historyApiFallback: {
27
+      rewrites: [
28
+        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
29
+      ],
30
+    },
31
+    hot: true,
32
+    contentBase: false, // since we use CopyWebpackPlugin.
33
+    compress: true,
34
+    host: HOST || config.dev.host,
35
+    port: PORT || config.dev.port,
36
+    open: config.dev.autoOpenBrowser,
37
+    overlay: config.dev.errorOverlay
38
+      ? { warnings: false, errors: true }
39
+      : false,
40
+    publicPath: config.dev.assetsPublicPath,
41
+    proxy: config.dev.proxyTable,
42
+    quiet: true, // necessary for FriendlyErrorsPlugin
43
+    watchOptions: {
44
+      poll: config.dev.poll,
45
+    }
46
+  },
47
+  plugins: [
48
+    new webpack.DefinePlugin({
49
+      'process.env': require('../config/dev.env')
50
+    }),
51
+    new webpack.HotModuleReplacementPlugin(),
52
+    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
53
+    new webpack.NoEmitOnErrorsPlugin(),
54
+    // https://github.com/ampedandwired/html-webpack-plugin
55
+    new HtmlWebpackPlugin({
56
+      filename: 'index.html',
57
+      template: 'index.html',
58
+      inject: true
59
+    }),
60
+    // copy custom static assets
61
+    new CopyWebpackPlugin([
62
+      {
63
+        from: path.resolve(__dirname, '../static'),
64
+        to: config.dev.assetsSubDirectory,
65
+        ignore: ['.*']
66
+      }
67
+    ])
68
+  ]
69
+})
70
+
71
+module.exports = new Promise((resolve, reject) => {
72
+  portfinder.basePort = process.env.PORT || config.dev.port
73
+  portfinder.getPort((err, port) => {
74
+    if (err) {
75
+      reject(err)
76
+    } else {
77
+      // publish the new Port, necessary for e2e tests
78
+      process.env.PORT = port
79
+      // add port to devServer config
80
+      devWebpackConfig.devServer.port = port
81
+
82
+      // Add FriendlyErrorsPlugin
83
+      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
84
+        compilationSuccessInfo: {
85
+          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
86
+        },
87
+        onErrors: config.dev.notifyOnErrors
88
+        ? utils.createNotifierCallback()
89
+        : undefined
90
+      }))
91
+
92
+      resolve(devWebpackConfig)
93
+    }
94
+  })
95
+})

+ 151 - 0
build/webpack.prod-cdn.conf.js View File

@@ -0,0 +1,151 @@
1
+'use strict'
2
+const path = require('path')
3
+const utils = require('./utils')
4
+const webpack = require('webpack')
5
+const config = require('../config')
6
+const merge = require('webpack-merge')
7
+const baseWebpackConfig = require('./webpack.base.conf')
8
+const CopyWebpackPlugin = require('copy-webpack-plugin')
9
+const HtmlWebpackPlugin = require('html-webpack-plugin')
10
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
11
+const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13
+
14
+const env = require('../config/prod.env')
15
+
16
+const webpackConfig = merge(baseWebpackConfig, {
17
+  module: {
18
+    rules: utils.styleLoaders({
19
+      sourceMap: config.build.productionSourceMap,
20
+      extract: true,
21
+      usePostCSS: true
22
+    })
23
+  },
24
+  devtool: config.build.productionSourceMap ? config.build.devtool : false,
25
+  output: {
26
+    path: config.build.assetsRoot,
27
+    filename: utils.assetsPath('js/[name].[chunkhash:6].js'), // .[chunkhash:6]
28
+    chunkFilename: utils.assetsPath('js/[id].[chunkhash:6].js') //.[chunkhash:6]
29
+  },
30
+  plugins: [
31
+    new webpack.DefinePlugin({
32
+      'process.env': env
33
+    }),
34
+    new UglifyJsPlugin({
35
+      uglifyOptions: {
36
+        compress: {
37
+          warnings: false
38
+        }
39
+      },
40
+      sourceMap: config.build.productionSourceMap,
41
+      parallel: true
42
+    }),
43
+    // extract css into its own file
44
+    new ExtractTextPlugin({
45
+      filename: utils.assetsPath('css/[name].[contenthash:6].css'), //
46
+      // Setting the following option to `false` will not extract CSS from codesplit chunks.
47
+      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
48
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
49
+      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
50
+      allChunks: true,
51
+    }),
52
+    // Compress extracted CSS. We are using this plugin so that possible
53
+    // duplicated CSS from different components can be deduped.
54
+    new OptimizeCSSPlugin({
55
+      cssProcessorOptions: config.build.productionSourceMap
56
+        ? { safe: true, map: { inline: false } }
57
+        : { safe: true }
58
+    }),
59
+    // generate dist index.html with correct asset hash for caching.
60
+    // you can customize output by editing /index.html
61
+    // see https://github.com/ampedandwired/html-webpack-plugin
62
+    new HtmlWebpackPlugin({
63
+      filename: config.build.index,
64
+      template: 'index.html',
65
+      inject: true,
66
+      minify: {
67
+        removeComments: true,
68
+        collapseWhitespace: true,
69
+        removeAttributeQuotes: true
70
+        // more options:
71
+        // https://github.com/kangax/html-minifier#options-quick-reference
72
+      },
73
+      // 公共文件必须在自己引用的js文件之前引用 by vinceHuang
74
+      // chunks:['mainfest','vender','app'],
75
+      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
76
+      // chunksSortMode: 'dependency'
77
+    }),
78
+    // keep module.id stable when vendor modules does not change
79
+    // new webpack.HashedModuleIdsPlugin(),
80
+    // enable scope hoisting
81
+    // new webpack.optimize.ModuleConcatenationPlugin(),
82
+    // split vendor js into its own file
83
+    // new webpack.optimize.CommonsChunkPlugin({
84
+    //   name: 'vendor',
85
+    //   minChunks (module) {
86
+    //     // any required modules inside node_modules are extracted to vendor
87
+    //     return (
88
+    //       module.resource &&
89
+    //       /\.js$/.test(module.resource) &&
90
+    //       module.resource.indexOf(
91
+    //         path.join(__dirname, '../node_modules')
92
+    //       ) === 0
93
+    //     )
94
+    //   }
95
+    // }),
96
+    // extract webpack runtime and module manifest to its own file in order to
97
+    // prevent vendor hash from being updated whenever app bundle is updated
98
+    // new webpack.optimize.CommonsChunkPlugin({
99
+    //   name: 'manifest',
100
+    //   minChunks: Infinity
101
+    // }),
102
+    // This instance extracts shared chunks from code splitted chunks and bundles them
103
+    // in a separate chunk, similar to the vendor chunk
104
+    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
105
+    // new webpack.optimize.CommonsChunkPlugin({
106
+    //   name: 'app',
107
+    //   async: 'vendor-async',
108
+    //   children: true,
109
+    //   minChunks: 3
110
+    // }),
111
+
112
+    // copy custom static assets
113
+    new CopyWebpackPlugin([
114
+      {
115
+        from: path.resolve(__dirname, '../static'),
116
+        to: config.build.assetsSubDirectory,
117
+        ignore: ['.*']
118
+      }
119
+    ])
120
+  ]
121
+})
122
+
123
+if (config.build.productionGzip) {
124
+  const CompressionWebpackPlugin = require('compression-webpack-plugin')
125
+
126
+  webpackConfig.plugins.push(
127
+    new CompressionWebpackPlugin({
128
+      asset: '[path].gz[query]',
129
+      algorithm: 'gzip',
130
+      test: new RegExp(
131
+        '\\.(' +
132
+        config.build.productionGzipExtensions.join('|') +
133
+        ')$'
134
+      ),
135
+      threshold: 10240,
136
+      minRatio: 0.8
137
+    })
138
+  )
139
+}
140
+
141
+if (config.build.bundleAnalyzerReport) {
142
+  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
143
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
144
+}
145
+
146
+webpackConfig.plugins = webpackConfig.plugins || [];
147
+
148
+webpackConfig.devtool = "source-map"
149
+
150
+
151
+module.exports = webpackConfig

+ 149 - 0
build/webpack.prod.conf.js View File

@@ -0,0 +1,149 @@
1
+'use strict'
2
+const path = require('path')
3
+const utils = require('./utils')
4
+const webpack = require('webpack')
5
+const config = require('../config')
6
+const merge = require('webpack-merge')
7
+const baseWebpackConfig = require('./webpack.base.conf')
8
+const CopyWebpackPlugin = require('copy-webpack-plugin')
9
+const HtmlWebpackPlugin = require('html-webpack-plugin')
10
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
11
+const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13
+
14
+const env = process.env.NODE_ENV === 'testing'
15
+  ? require('../config/test.env')
16
+  : require('../config/prod.env')
17
+
18
+const webpackConfig = merge(baseWebpackConfig, {
19
+  module: {
20
+    rules: utils.styleLoaders({
21
+      sourceMap: config.build.productionSourceMap,
22
+      extract: true,
23
+      usePostCSS: true
24
+    })
25
+  },
26
+  devtool: config.build.productionSourceMap ? config.build.devtool : false,
27
+  output: {
28
+    path: config.build.assetsRoot,
29
+    filename: utils.assetsPath('js/[name].[chunkhash].js'),
30
+    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
31
+  },
32
+  plugins: [
33
+    // http://vuejs.github.io/vue-loader/en/workflow/production.html
34
+    new webpack.DefinePlugin({
35
+      'process.env': env
36
+    }),
37
+    new UglifyJsPlugin({
38
+      uglifyOptions: {
39
+        compress: {
40
+          warnings: false
41
+        }
42
+      },
43
+      sourceMap: config.build.productionSourceMap,
44
+      parallel: true
45
+    }),
46
+    // extract css into its own file
47
+    new ExtractTextPlugin({
48
+      filename: utils.assetsPath('css/[name].[contenthash].css'),
49
+      // Setting the following option to `false` will not extract CSS from codesplit chunks.
50
+      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
51
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
52
+      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
53
+      allChunks: true,
54
+    }),
55
+    // Compress extracted CSS. We are using this plugin so that possible
56
+    // duplicated CSS from different components can be deduped.
57
+    new OptimizeCSSPlugin({
58
+      cssProcessorOptions: config.build.productionSourceMap
59
+        ? { safe: true, map: { inline: false } }
60
+        : { safe: true }
61
+    }),
62
+    // generate dist index.html with correct asset hash for caching.
63
+    // you can customize output by editing /index.html
64
+    // see https://github.com/ampedandwired/html-webpack-plugin
65
+    new HtmlWebpackPlugin({
66
+      filename: process.env.NODE_ENV === 'testing'
67
+        ? 'index.html'
68
+        : config.build.index,
69
+      template: 'index.html',
70
+      inject: true,
71
+      minify: {
72
+        removeComments: true,
73
+        collapseWhitespace: true,
74
+        removeAttributeQuotes: true
75
+        // more options:
76
+        // https://github.com/kangax/html-minifier#options-quick-reference
77
+      },
78
+      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
79
+      chunksSortMode: 'dependency'
80
+    }),
81
+    // keep module.id stable when vendor modules does not change
82
+    new webpack.HashedModuleIdsPlugin(),
83
+    // enable scope hoisting
84
+    new webpack.optimize.ModuleConcatenationPlugin(),
85
+    // split vendor js into its own file
86
+    new webpack.optimize.CommonsChunkPlugin({
87
+      name: 'vendor',
88
+      minChunks (module) {
89
+        // any required modules inside node_modules are extracted to vendor
90
+        return (
91
+          module.resource &&
92
+          /\.js$/.test(module.resource) &&
93
+          module.resource.indexOf(
94
+            path.join(__dirname, '../node_modules')
95
+          ) === 0
96
+        )
97
+      }
98
+    }),
99
+    // extract webpack runtime and module manifest to its own file in order to
100
+    // prevent vendor hash from being updated whenever app bundle is updated
101
+    new webpack.optimize.CommonsChunkPlugin({
102
+      name: 'manifest',
103
+      minChunks: Infinity
104
+    }),
105
+    // This instance extracts shared chunks from code splitted chunks and bundles them
106
+    // in a separate chunk, similar to the vendor chunk
107
+    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
108
+    new webpack.optimize.CommonsChunkPlugin({
109
+      name: 'app',
110
+      async: 'vendor-async',
111
+      children: true,
112
+      minChunks: 3
113
+    }),
114
+
115
+    // copy custom static assets
116
+    new CopyWebpackPlugin([
117
+      {
118
+        from: path.resolve(__dirname, '../static'),
119
+        to: config.build.assetsSubDirectory,
120
+        ignore: ['.*']
121
+      }
122
+    ])
123
+  ]
124
+})
125
+
126
+if (config.build.productionGzip) {
127
+  const CompressionWebpackPlugin = require('compression-webpack-plugin')
128
+
129
+  webpackConfig.plugins.push(
130
+    new CompressionWebpackPlugin({
131
+      asset: '[path].gz[query]',
132
+      algorithm: 'gzip',
133
+      test: new RegExp(
134
+        '\\.(' +
135
+        config.build.productionGzipExtensions.join('|') +
136
+        ')$'
137
+      ),
138
+      threshold: 10240,
139
+      minRatio: 0.8
140
+    })
141
+  )
142
+}
143
+
144
+if (config.build.bundleAnalyzerReport) {
145
+  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
146
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
147
+}
148
+
149
+module.exports = webpackConfig

+ 14 - 0
config/dev.env.js View File

@@ -0,0 +1,14 @@
1
+'use strict'
2
+const merge = require('webpack-merge')
3
+const prodEnv = require('./prod.env')
4
+
5
+module.exports = merge(prodEnv, {
6
+  NODE_ENV: '"development"',
7
+  // BASE_API: '"https://api.xt.kuyicloud.com"'
8
+
9
+  BASE_API: '"http://api.xt.test.sgjyun.com"'
10
+   //http://api.xt.test.sgjyun.com http://localhost:9529
11
+   // BASE_API: '"http://api.xt.test.sgjyun.com"'
12
+  // BASE_API: '"https://api.xt.kuyicloud.com"'
13
+
14
+})

+ 76 - 0
config/index.js View File

@@ -0,0 +1,76 @@
1
+'use strict'
2
+// Template version: 1.3.1
3
+// see http://vuejs-templates.github.io/webpack for documentation.
4
+
5
+const path = require('path')
6
+
7
+module.exports = {
8
+  dev: {
9
+
10
+    // Paths
11
+    assetsSubDirectory: 'static',
12
+    assetsPublicPath: '/',
13
+    proxyTable: {},
14
+
15
+    // Various Dev Server settings
16
+    host: 'localhost', // can be overwritten by process.env.HOST
17
+    port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18
+    autoOpenBrowser: false,
19
+    errorOverlay: true,
20
+    notifyOnErrors: true,
21
+    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22
+
23
+    // Use Eslint Loader?
24
+    // If true, your code will be linted during bundling and
25
+    // linting errors and warnings will be shown in the console.
26
+    useEslint: true,
27
+    // If true, eslint errors and warnings will also be shown in the error overlay
28
+    // in the browser.
29
+    showEslintErrorsInOverlay: false,
30
+
31
+    /**
32
+     * Source Maps
33
+     */
34
+
35
+    // https://webpack.js.org/configuration/devtool/#development
36
+    devtool: 'cheap-module-eval-source-map',
37
+
38
+    // If you have problems debugging vue-files in devtools,
39
+    // set this to false - it *may* help
40
+    // https://vue-loader.vuejs.org/en/options.html#cachebusting
41
+    cacheBusting: true,
42
+
43
+    cssSourceMap: true
44
+  },
45
+
46
+  build: {
47
+    // Template for index.html
48
+    index: path.resolve(__dirname, '../dist/index.html'),
49
+
50
+    // Paths
51
+    assetsRoot: path.resolve(__dirname, '../dist'),
52
+    assetsSubDirectory: 'static',
53
+    assetsPublicPath: './',
54
+
55
+    /**
56
+     * Source Maps
57
+     */
58
+
59
+    productionSourceMap: false,
60
+    // https://webpack.js.org/configuration/devtool/#production
61
+    devtool: '#source-map',
62
+
63
+    // Gzip off by default as many popular static hosts such as
64
+    // Surge or Netlify already gzip all static assets for you.
65
+    // Before setting to `true`, make sure to:
66
+    // npm install --save-dev compression-webpack-plugin
67
+    productionGzip: false,
68
+    productionGzipExtensions: ['js', 'css'],
69
+
70
+    // Run the build command with an extra argument to
71
+    // View the bundle analyzer report after build finishes:
72
+    // `npm run build --report`
73
+    // Set to `true` or `false` to always turn it on or off
74
+    bundleAnalyzerReport: process.env.npm_config_report
75
+  }
76
+}

+ 9 - 0
config/prod.env.js View File

@@ -0,0 +1,9 @@
1
+"use strict";
2
+module.exports = {
3
+  NODE_ENV: '"production"',
4
+  BASE_API: '"https://api.xt.kuyicloud.com"'
5
+
6
+   // BASE_API: '"http://api.xt.test.sgjyun.com"'
7
+  // http://api.xt.test.sgjyun.com
8
+  // '"http://api.xt.kuyicloud.com"', //'"http://api.xt.kuyicloud.com"','"http://api.xt.test.sgjyun.com"'
9
+};

+ 7 - 0
config/test.env.js View File

@@ -0,0 +1,7 @@
1
+'use strict'
2
+const merge = require('webpack-merge')
3
+const devEnv = require('./dev.env')
4
+
5
+module.exports = merge(devEnv, {
6
+  NODE_ENV: '"testing"'
7
+})

+ 15 - 0
index.html View File

@@ -0,0 +1,15 @@
1
+<!DOCTYPE html>
2
+<html>
3
+  <head>
4
+    <meta charset="utf-8" />
5
+    <meta
6
+      name="viewport"
7
+      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
8
+    />
9
+    <title>酷医云移动端</title>
10
+  </head>
11
+  <body>
12
+    <div id="app"></div>
13
+    <!-- built files will be auto injected -->
14
+  </body>
15
+</html>

File diff suppressed because it is too large
+ 16742 - 0
package-lock.json


+ 118 - 0
package.json View File

@@ -0,0 +1,118 @@
1
+{
2
+  "name": "yes",
3
+  "version": "1.0.0",
4
+  "description": "A Vue.js project",
5
+  "author": "superman",
6
+  "private": true,
7
+  "scripts": {
8
+    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9
+    "start": "npm run dev",
10
+    "unit": "jest --config test/unit/jest.conf.js --coverage",
11
+    "e2e": "node test/e2e/runner.js",
12
+    "test": "npm run unit && npm run e2e",
13
+    "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
14
+    "build": "cross-env NODE_ENV=production env_config=prod node build/build.js && npm run fixfont && npm run fiximg",
15
+    "build-cdn": "node build/build-cdn.js",
16
+    "fixfont": "xcopy %cd%\\dist\\static\\fonts %cd%\\dist\\static\\css\\static\\fonts /s /y /d /e /i",
17
+    "fiximg": "xcopy %cd%\\dist\\static\\img %cd%\\dist\\static\\css\\static\\img /s /y /d /e /i"
18
+  },
19
+  "dependencies": {
20
+    "@types/better-scroll": "^1.12.1",
21
+    "axios": "^0.19.0",
22
+    "better-scroll": "^1.15.2",
23
+    "cropperjs": "^1.4.3",
24
+    "element-ui": "^2.9.1",
25
+    "lib-flexible": "^0.3.2",
26
+    "mint-ui": "^2.2.13",
27
+    "print-js": "^1.0.54",
28
+    "vant": "^1.6.8",
29
+    "vue": "^2.5.2",
30
+    "vue-cropper": "^0.4.9",
31
+    "vue-cropperjs": "^3.0.0",
32
+    "vue-pickers": "^1.1.5",
33
+    "vue-router": "^3.0.1",
34
+    "vuex": "^3.0.1",
35
+    "vux": "^2.9.4"
36
+  },
37
+  "devDependencies": {
38
+    "autoprefixer": "^7.1.2",
39
+    "babel-core": "^6.22.1",
40
+    "babel-eslint": "^8.2.1",
41
+    "babel-helper-vue-jsx-merge-props": "^2.0.3",
42
+    "babel-jest": "^21.0.2",
43
+    "babel-loader": "^7.1.1",
44
+    "babel-plugin-dynamic-import-node": "^1.2.0",
45
+    "babel-plugin-import": "^1.9.1",
46
+    "babel-plugin-syntax-jsx": "^6.18.0",
47
+    "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
48
+    "babel-plugin-transform-runtime": "^6.22.0",
49
+    "babel-plugin-transform-vue-jsx": "^3.5.0",
50
+    "babel-preset-env": "^1.3.2",
51
+    "babel-preset-stage-2": "^6.22.0",
52
+    "babel-register": "^6.22.0",
53
+    "chalk": "^2.0.1",
54
+    "chromedriver": "^2.46.0",
55
+    "copy-webpack-plugin": "^4.0.1",
56
+    "cropper": "^4.0.0",
57
+    "cross-env": "^5.2.0",
58
+    "cross-spawn": "^5.0.1",
59
+    "css-loader": "^0.28.0",
60
+    "eslint": "^4.15.0",
61
+    "eslint-config-standard": "^10.2.1",
62
+    "eslint-friendly-formatter": "^3.0.0",
63
+    "eslint-loader": "^1.7.1",
64
+    "eslint-plugin-import": "^2.7.0",
65
+    "eslint-plugin-node": "^5.2.0",
66
+    "eslint-plugin-promise": "^3.4.0",
67
+    "eslint-plugin-standard": "^3.0.1",
68
+    "eslint-plugin-vue": "^4.0.0",
69
+    "extract-text-webpack-plugin": "^3.0.0",
70
+    "file-loader": "^1.1.4",
71
+    "friendly-errors-webpack-plugin": "^1.6.1",
72
+    "html-webpack-plugin": "^2.30.1",
73
+    "jest": "^22.0.4",
74
+    "jest-serializer-vue": "^0.3.0",
75
+    "jquery": "^3.4.0",
76
+    "less": "^3.8.1",
77
+    "less-loader": "^4.1.0",
78
+    "nightwatch": "^0.9.12",
79
+    "node-notifier": "^5.1.2",
80
+    "node-sass": "^4.12.0",
81
+    "optimize-css-assets-webpack-plugin": "^3.2.0",
82
+    "ora": "^1.2.0",
83
+    "portfinder": "^1.0.13",
84
+    "postcss-import": "^11.0.0",
85
+    "postcss-loader": "^2.0.8",
86
+    "postcss-url": "^7.2.1",
87
+    "rimraf": "^2.6.0",
88
+    "sass-loader": "^7.1.0",
89
+    "sass-resources-loader": "^1.3.3",
90
+    "selenium-server": "^3.0.1",
91
+    "semver": "^5.3.0",
92
+    "shelljs": "^0.7.6",
93
+    "style-loader": "^0.23.1",
94
+    "uglifyjs-webpack-plugin": "^1.1.1",
95
+    "url-loader": "^0.5.8",
96
+    "vue-jest": "^1.0.2",
97
+    "vue-loader": "^13.3.0",
98
+    "vue-style-loader": "^3.0.1",
99
+    "vue-template-compiler": "^2.5.2",
100
+    "vux-loader": "^1.2.9",
101
+    "webpack": "^3.12.0",
102
+    "webpack-bundle-analyzer": "^2.9.0",
103
+    "webpack-dev-server": "^2.9.1",
104
+    "webpack-merge": "^4.1.0",
105
+    "yaml-loader": "^0.5.0",
106
+    "write-json": "^3.0.1",
107
+    "qiniu-webpack-plugin": "^0.4.2"
108
+  },
109
+  "engines": {
110
+    "node": ">= 6.0.0",
111
+    "npm": ">= 3.0.0"
112
+  },
113
+  "browserslist": [
114
+    "> 1%",
115
+    "last 2 versions",
116
+    "not ie <= 8"
117
+  ]
118
+}

+ 38 - 0
src/App.vue View File

@@ -0,0 +1,38 @@
1
+<template>
2
+  <div id="app">
3
+    <!-- <img src="./assets/logo.png"> -->
4
+    <router-view v-if="isRouterAlive" />
5
+  </div>
6
+</template>
7
+
8
+<script>
9
+export default {
10
+  name: "App",
11
+  provide() {
12
+    return {
13
+      reload: this.reload
14
+    };
15
+  },
16
+  data() {
17
+    return {
18
+      isRouterAlive: true
19
+    };
20
+  },
21
+  methods: {
22
+    reload() {
23
+      this.isRouterAlive = false;
24
+      this.$nextTick(function() {
25
+        this.isRouterAlive = true;
26
+      });
27
+    }
28
+  },
29
+  watch: {
30
+    $route: function(to, from) {
31
+      document.body.scrollTop = 0;
32
+      document.documentElement.scrollTop = 0;
33
+    }
34
+  }
35
+};
36
+</script>
37
+
38
+<style></style>

+ 23 - 0
src/api/admin_user.js View File

@@ -0,0 +1,23 @@
1
+import request from '@/utils/request'
2
+
3
+export function GetElectronicSignature(){
4
+    return request({
5
+        url:'/m/api/getelectronicsignature',
6
+        method:'get',
7
+    })
8
+}
9
+
10
+export function SaveElectronicSignature(es){
11
+    return request({
12
+        url:'/m/api/savelectronicsignature',
13
+        method:'post',
14
+        data:es,
15
+    })
16
+}
17
+
18
+export function GetMyInfo(){
19
+    return request({
20
+        url:'/m/api/my',
21
+        method:'get',
22
+    })
23
+}

+ 135 - 0
src/api/advice.js View File

@@ -0,0 +1,135 @@
1
+import request from '@/utils/request'
2
+
3
+export function getAdviceConfig () {
4
+  return request({
5
+    url: '/m/api/getadviceconfigs',
6
+    method: 'get'
7
+  })
8
+}
9
+
10
+export function CreateDoctorAdvice (id, advice) {
11
+  console.log('id', id)
12
+  return request({
13
+    url: '/m/api/advice/create?id=' + id,
14
+    method: 'post',
15
+    data: advice
16
+  })
17
+}
18
+export function EditDoctorAdvice (id, advice) {
19
+  return request({
20
+    url: '/m/api/advice/edit?id=' + id,
21
+    method: 'put',
22
+    data: advice
23
+  })
24
+}
25
+
26
+export function StopDoctorAdvice (id, advice) {
27
+  return request({
28
+    url: '/m/api/advice/stop?id=' + id,
29
+    method: 'Post',
30
+    data: advice
31
+  })
32
+}
33
+
34
+export function ExecDoctorAdvice (params) {
35
+  return request({
36
+    url: '/m/api/advice/exec',
37
+    method: 'Post',
38
+    params: params
39
+  })
40
+}
41
+
42
+export function CheckDoctorAdvice (params) {
43
+  return request({
44
+    url: '/m/api/advice/check',
45
+    method: 'Post',
46
+    params: params
47
+  })
48
+}
49
+
50
+export function DeleteDoctorAdvice (id) {
51
+  return request({
52
+    url: '/m/api/advice/delete?id=' + id,
53
+    method: 'Delete'
54
+  })
55
+}
56
+
57
+export function DeleteDoctorAdviceNew (group_no, advice_id) {
58
+  return request({
59
+    url: '/m/api/newadvice/delete',
60
+    method: 'Delete',
61
+    params: {
62
+      groupno: group_no,
63
+      advice_id: advice_id
64
+    }
65
+  })
66
+}
67
+
68
+export function getSchedualDoctors (params) {
69
+  return request({
70
+    url: '/m/api/schedule/advices',
71
+    method: 'get',
72
+    params: params
73
+  })
74
+}
75
+
76
+export function batchCreateAdvices (patient_id, group_no, data) {
77
+  return request({
78
+    url: '/m/api/advice/creategroup',
79
+    method: 'post',
80
+    params: {
81
+      id: patient_id,
82
+      group_no: group_no
83
+    },
84
+    data: data
85
+  })
86
+}
87
+
88
+export function modifyAdviceGroupStartTime (group_no, start_time_str) {
89
+  return request({
90
+    url: '/m/api/advice/group/modify_starttime',
91
+    method: 'post',
92
+    params: {
93
+      group_no: group_no,
94
+      start_time: start_time_str
95
+    }
96
+  })
97
+}
98
+
99
+export function ExecSingleDoctorAdvice (params) {
100
+  return request({
101
+    url: '/m/api/advice/exec/single',
102
+    method: 'Post',
103
+    params: params
104
+  })
105
+}
106
+
107
+export function DeleteSubDoctorAdvice (params) {
108
+  return request({
109
+    url: '/m/api/delete/subadvice?advice_id=' + params,
110
+    method: 'Delete'
111
+  })
112
+}
113
+
114
+// export function ModifyExecDoctorAdvice(params){
115
+//   return request({
116
+//     url:'/m/api/delete/subadvice?advice_id='+params,
117
+//     method:'Delete',
118
+//   })
119
+// }
120
+
121
+export function ModifyExecDoctorAdvice (params) {
122
+  return request({
123
+    url: '/m/api/advice/exec/modify',
124
+    method: 'Post',
125
+    params: params
126
+  })
127
+}
128
+
129
+export function GetRemindLongAdvice (params) {
130
+  return request({
131
+    url: '/m/api/dialysis/advice_remind',
132
+    method: 'Get',
133
+    params: params
134
+  })
135
+}

+ 25 - 0
src/api/check.js View File

@@ -0,0 +1,25 @@
1
+import request from '@/utils/request'
2
+
3
+
4
+
5
+export function GetInspection(params){
6
+  return request({
7
+    url:'/m/api/inspection/reference',
8
+    method:'get',
9
+    params:params
10
+  })
11
+}
12
+
13
+
14
+
15
+export function GetInspectionItemValue(params){
16
+  return request({
17
+    url:'/m/api/inspection/list',
18
+    method:'get',
19
+    params:params
20
+  })
21
+}
22
+
23
+
24
+
25
+

+ 254 - 0
src/api/dialysis.js View File

@@ -0,0 +1,254 @@
1
+import request from '@/utils/request'
2
+
3
+export function getDialysisScheduals(params) {
4
+  return request({
5
+    url: '/m/api/scheduals',
6
+    method: 'get',
7
+    params: params
8
+  })
9
+}
10
+
11
+export function getWaitingScheduals(params) {
12
+  return request({
13
+    url: '/m/api/waiting_scheduals',
14
+    method: 'get',
15
+    params: params
16
+  })
17
+}
18
+
19
+export function getDialysisRecord(params) {
20
+  return request({
21
+    url: '/m/api/dialysis/record',
22
+    method: 'get',
23
+    params: params
24
+  })
25
+}
26
+
27
+export function dialysisGlobalConfig() {
28
+  return request({
29
+    url: '/m/api/dialysisglobalconfig',
30
+    method: 'get'
31
+  })
32
+}
33
+
34
+export function commitTreatmentSummary(params) {
35
+  return request({
36
+    url: '/m/api/dialysis/treatmentSummary',
37
+    method: 'post',
38
+    params: params
39
+
40
+  })
41
+}
42
+
43
+export function commitDoubleCheck(params) {
44
+  return request({
45
+    url: '/m/api/dialysis/doublecheck',
46
+    method: 'post',
47
+    params: params
48
+
49
+  })
50
+}
51
+
52
+export function commitAcceptsAssessment(params) {
53
+  return request({
54
+    url: '/m/api/dialysis/acceptsAssessment',
55
+    method: 'post',
56
+    params: params
57
+
58
+  })
59
+}
60
+
61
+export function finish(params) {
62
+  return request({
63
+    url: '/m/api/dialysis/finish',
64
+    method: 'post',
65
+    params: params
66
+  })
67
+}
68
+
69
+export function commitDialysisPrescription(params) {
70
+  console.log(params)
71
+  return request({
72
+    url: '/m/api/dialysis/dialysisPrescription',
73
+    method: 'post',
74
+    params: params
75
+  })
76
+}
77
+
78
+export function commitAssessmentAfterDislysis(params) {
79
+  return request({
80
+    url: '/m/api/dialysis/assessmentAfterDislysis',
81
+    method: 'post',
82
+    params: params
83
+  })
84
+}
85
+
86
+export function addMonitorRecord(params) {
87
+  return request({
88
+    url: '/m/api/monitor/add',
89
+    method: 'post',
90
+    params: params
91
+  })
92
+}
93
+
94
+export function editMonitorRecord(params) {
95
+  console.log('params', params)
96
+  return request({
97
+    url: '/m/api/monitor/edit',
98
+    method: 'post',
99
+    params: params
100
+  })
101
+}
102
+
103
+export function deleteMonitorRecord(params) {
104
+  return request({
105
+    url: '/m/api/monitor/delete',
106
+    method: 'post',
107
+    params: params
108
+  })
109
+}
110
+
111
+export function GetAllZone(params) {
112
+  return request({
113
+    url: '/m/api/dialysis/allzone',
114
+    method: 'get',
115
+    params: params
116
+  })
117
+}
118
+
119
+export function getSchedualPatient(params) {
120
+  return request({
121
+    url: '/m/api/dialysis/patients',
122
+    method: 'get',
123
+    params: params
124
+  })
125
+}
126
+
127
+export function postSolution(params) {
128
+  return request({
129
+    url: '/m/api/solution',
130
+    method: 'post',
131
+    params: params
132
+  })
133
+}
134
+
135
+export function startDialysis(params) {
136
+  return request({
137
+    url: '/m/api/dialysis/start',
138
+    method: 'post',
139
+    params: params
140
+  })
141
+}
142
+
143
+export function getLastAccepts(params) {
144
+  return request({
145
+    url: '/m/api/accepts/get',
146
+    method: 'get',
147
+    params: params
148
+  })
149
+}
150
+
151
+export function getPrintDialysisRecord(params) {
152
+  return request({
153
+    url: '/m/api/print/dialysisorder',
154
+    method: 'Get',
155
+    params: params
156
+  })
157
+}
158
+
159
+export function getUrgentScheduleInitData(params) {
160
+  return request({
161
+    url: '/m/api/schedule/urgentinit',
162
+    method: 'Get',
163
+    params: params
164
+  })
165
+}
166
+
167
+export function postUrgentSchedule(params) {
168
+  return request({
169
+    url: '/m/api/schedule/urgentadd',
170
+    method: 'post',
171
+    params: params
172
+  })
173
+}
174
+
175
+export function postSign(params) {
176
+  return request({
177
+    url: '/m/api/dialysis/sign',
178
+    method: 'Post',
179
+    params: params
180
+
181
+  })
182
+}
183
+
184
+export function GetMonitor(params) {
185
+  return request({
186
+    url: '/m/api/monitor/get',
187
+    method: 'get',
188
+    params: params
189
+  })
190
+}
191
+
192
+export function GetMonitorToday(params) {
193
+  return request({
194
+    url: '/m/api/monitor/gettodaylast',
195
+    method: 'get',
196
+    params: params
197
+  })
198
+}
199
+
200
+export function PostSearch(keyword) {
201
+  return request({
202
+    url: '/m/api/patients/search?keyword=' + keyword,
203
+    method: 'post'
204
+
205
+  })
206
+}
207
+
208
+export function PostModifyStartDialysis(params) {
209
+  return request({
210
+    url: '/m/api/startOrder/edit',
211
+    method: 'post',
212
+    params: params
213
+  })
214
+}
215
+
216
+export function PostModifyEndDialysis(params) {
217
+  return request({
218
+    url: '/m/api/finishOrder/edit',
219
+    method: 'post',
220
+    params: params
221
+  })
222
+}
223
+
224
+export function CreateGroupAdvice(id, groupno, advices) {
225
+  return request({
226
+    url: '/m/api/advice_remind/create?id=' + id + '&groupno=' + groupno,
227
+    method: 'post',
228
+    data: advices
229
+  })
230
+}
231
+
232
+export function CreateDryWeight(params) {
233
+  return request({
234
+    url: '/m/api/dryweight/commit',
235
+    method: 'post',
236
+    params: params
237
+  })
238
+}
239
+
240
+export function GetSolution(params) {
241
+  return request({
242
+    url: '/m/api/solution/get',
243
+    method: 'get',
244
+    params: params
245
+  })
246
+}
247
+
248
+export function GetSchedualNumber(params) {
249
+  return request({
250
+    url: '/m/api/schedule/get',
251
+    method: 'get',
252
+    params: params
253
+  })
254
+}

+ 14 - 0
src/api/doctor.js View File

@@ -0,0 +1,14 @@
1
+import request from '@/utils/request'
2
+
3
+export function fetchAllDoctorAndNurse(){
4
+  return request({
5
+    url:'/m/api/alldoctors',
6
+    method:'get',
7
+  })
8
+}
9
+export function fetchAllAdminUsers(){
10
+  return request({
11
+    url:'/m/api/admin/users',
12
+    method:'get',
13
+  })
14
+}

+ 13 - 0
src/api/login.js View File

@@ -0,0 +1,13 @@
1
+import request from "@/utils/request"
2
+
3
+export function loginByPwd(mobile, password) {
4
+    const params = {
5
+        mobile: mobile,
6
+        password: password,
7
+    }
8
+    return request({
9
+        url: "/m/api/login/pwd",
10
+        method: "post",
11
+        params: params,
12
+    })
13
+}

+ 27 - 0
src/api/monitor.js View File

@@ -0,0 +1,27 @@
1
+import request from '@/utils/request'
2
+
3
+export function getMonitorList(params){
4
+  return request({
5
+    url:'/m/api/monitor',
6
+    method:'get',
7
+    params:params
8
+
9
+  })
10
+}
11
+
12
+export function getPatientMonitors(params) {
13
+  return request({
14
+    url: '/m/api/monitor/patient',
15
+    method: 'get',
16
+    params: params,
17
+  })
18
+}
19
+
20
+
21
+export function GetAllZone(params){
22
+  return request({
23
+    url:'/m/api/dialysis/allzone',
24
+    method:'get',
25
+    params:params
26
+  })
27
+}

+ 73 - 0
src/api/patient.js View File

@@ -0,0 +1,73 @@
1
+import request from "@/utils/request"
2
+
3
+
4
+export function createPatientDialysisSolution(id,solution){
5
+    return request({
6
+        url:'/m/api/solution/create?patient='+id,
7
+        method:'post',
8
+        data:solution,
9
+    })
10
+}
11
+export function EditDialysisSolution(id,solution){
12
+    return request({
13
+        url:'/m/api/solution/edit?id='+id,
14
+        method:'post',
15
+        data:solution,
16
+    })
17
+}
18
+
19
+export function EditAssessmentBeforeDislysis(id,assessment_date,before){
20
+    return request({
21
+        url:'/m/api/assessmentbefore/commit?patient='+id+"&assessment_date="+assessment_date,
22
+        method:'post',
23
+        data:before,
24
+    })
25
+}
26
+export function GetPatientInfoWithDiseases(id){
27
+    return request({
28
+        url:'/m/api/patient/info?patient='+id,
29
+        method:'Get',
30
+    })
31
+}
32
+
33
+
34
+export function getAllEducationList(params){
35
+    return request({
36
+      url:'/m/api/patient/education',
37
+      method:'get',
38
+      params:params,
39
+    })
40
+  }
41
+
42
+  export function getSchedualList(params){
43
+    return request({
44
+      url:'/m/api/patients/schedules',
45
+      method:'get',
46
+      params:params,
47
+    })
48
+  }
49
+
50
+
51
+export function getRecordList(params){
52
+  return request({
53
+    url:'/m/api/patients/record',
54
+    method:'get',
55
+    params:params,
56
+  })
57
+}
58
+
59
+
60
+export function GetPatientDialysisSolutionList(params) {
61
+    return request({
62
+        url:'/m/api/patients/solutions',
63
+        method:'get',
64
+        params:params,
65
+    })
66
+}
67
+export function GetDoctorAdvices(params) {
68
+    return request({
69
+        url:'/m/api/patients/doctoradvices',
70
+        method:'get',
71
+        params:params,
72
+    })
73
+}

+ 8 - 0
src/api/qiniu.js View File

@@ -0,0 +1,8 @@
1
+import request from '@/utils/request'
2
+
3
+export function getToken(){
4
+    return request({
5
+        url:'/m/api/qiniu/uptoken',
6
+        method:'get',
7
+    })
8
+}

+ 8 - 0
src/api/stock.js View File

@@ -0,0 +1,8 @@
1
+import request from '@/utils/request'
2
+
3
+export function getWarehouseGoodInfo(type_id){
4
+  return request({
5
+    url:'/m/api/warehouse/query?type_id='+type_id,
6
+    method:'get',
7
+  })
8
+}

BIN
src/assets/login/data.jpg View File


BIN
src/assets/login/logo.png View File


BIN
src/assets/login/newImg.png View File


BIN
src/assets/login/newLogo.png View File


BIN
src/assets/login/no_network.jpg View File


BIN
src/assets/login/no_network.png View File


BIN
src/assets/login/nodata.jpg View File


BIN
src/assets/my/11.png View File


BIN
src/assets/my/12.png View File


BIN
src/assets/my/13.png View File


BIN
src/assets/my/14.png View File


BIN
src/assets/my/15.png View File


BIN
src/assets/my/16.png View File


BIN
src/assets/my/avatar.png View File


BIN
src/assets/my/exit.png View File


BIN
src/assets/my/ico_gywm.png View File


BIN
src/assets/my/ico_rgsz.png View File


BIN
src/assets/my/ico_rjgx.png View File


BIN
src/assets/my/ico_sybz.png View File


BIN
src/assets/my/ico_xtsz.png View File


BIN
src/assets/my/ico_xxtz.png View File


BIN
src/assets/my/modification.png View File


BIN
src/assets/my/myBanner.png View File


BIN
src/assets/my/name.png View File


BIN
src/assets/my/privacy.png View File


BIN
src/assets/my/user.png View File


BIN
src/assets/product/ico_1.png View File


BIN
src/assets/product/ico_2.png View File


BIN
src/assets/product/logo.png View File


BIN
src/assets/product/test.jpg View File


BIN
src/assets/record/1.png View File


BIN
src/assets/record/10.png View File


BIN
src/assets/record/11.png View File


BIN
src/assets/record/12.png View File


BIN
src/assets/record/13.png View File


BIN
src/assets/record/14.png View File


BIN
src/assets/record/15.png View File


BIN
src/assets/record/16.png View File


BIN
src/assets/record/2.png View File


BIN
src/assets/record/3.png View File


BIN
src/assets/record/4.png View File


BIN
src/assets/record/5.png View File


BIN
src/assets/record/6.png View File


BIN
src/assets/record/7.png View File


BIN
src/assets/record/8.png View File


BIN
src/assets/record/9.png View File


+ 59 - 0
src/assets/styles/iconfont - 副本.css View File

@@ -0,0 +1,59 @@
1
+
2
+@font-face {font-family: "iconfont";
3
+  src: url('./iconfont/iconfont.eot?t=1539257906607'); /* IE9*/
4
+  src: url('./iconfont/iconfont.eot?t=1539257906607#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+  url('data:application/x-font-woff;charset=utf-8;base64,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') format('woff'),
6
+  url('./iconfont/iconfont.ttf?t=1539257906607') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+  url('./iconfont/iconfont.svg?t=1539257906607#iconfont') format('svg'); /* iOS 4.1- */
8
+}
9
+
10
+.iconfont {
11
+  font-family:"iconfont" !important;
12
+  font-size:16px;
13
+  font-style:normal;
14
+  -webkit-font-smoothing: antialiased;
15
+  -moz-osx-font-smoothing: grayscale;
16
+}
17
+
18
+.icon-icon_tingzhi:before { content: "\e64c"; }
19
+
20
+.icon-activity:before { content: "\e6de"; }
21
+
22
+.icon-add:before { content: "\e6df"; }
23
+
24
+.icon-brush:before { content: "\e6e5"; }
25
+
26
+.icon-brush_fill:before { content: "\e6e6"; }
27
+
28
+.icon-close:before { content: "\e6e9"; }
29
+
30
+.icon-document:before { content: "\e6f3"; }
31
+
32
+.icon-document_fill:before { content: "\e6f4"; }
33
+
34
+.icon-dynamic_fill:before { content: "\e6f5"; }
35
+
36
+.icon-dynamic:before { content: "\e6f6"; }
37
+
38
+.icon-editor:before { content: "\e6f7"; }
39
+
40
+.icon-empty:before { content: "\e6f8"; }
41
+
42
+.icon-enter:before { content: "\e6f9"; }
43
+
44
+.icon-people_fill:before { content: "\e715"; }
45
+
46
+.icon-people:before { content: "\e716"; }
47
+
48
+.icon-return:before { content: "\e720"; }
49
+
50
+.icon-right:before { content: "\e721"; }
51
+
52
+.icon-search:before { content: "\e741"; }
53
+
54
+.icon-packup:before { content: "\e749"; }
55
+
56
+.icon-unfold:before { content: "\e74a"; }
57
+
58
+.icon-add1:before { content: "\e604"; }
59
+

+ 63 - 0
src/assets/styles/iconfont.css View File

@@ -0,0 +1,63 @@
1
+
2
+@font-face {font-family: "iconfont";
3
+  src: url('./iconfont/iconfont.eot?t=1539762088773'); /* IE9*/
4
+  src: url('./iconfont/iconfont.eot?t=1539762088773#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+  url('data:application/x-font-woff;charset=utf-8;base64,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') format('woff'),
6
+  url('./iconfont/iconfont.ttf?t=1539762088773') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+  url('./iconfont/iconfont.svg?t=1539762088773#iconfont') format('svg'); /* iOS 4.1- */
8
+}
9
+
10
+.iconfont {
11
+  font-family:"iconfont" !important;
12
+  font-size:16px;
13
+  font-style:normal;
14
+  -webkit-font-smoothing: antialiased;
15
+  -moz-osx-font-smoothing: grayscale;
16
+}
17
+
18
+.icon-lock:before { content: "\e6c0"; }
19
+
20
+.icon-my:before { content: "\e78b"; }
21
+
22
+.icon-icon_tingzhi:before { content: "\e64c"; }
23
+
24
+.icon-activity:before { content: "\e6de"; }
25
+
26
+.icon-add:before { content: "\e6df"; }
27
+
28
+.icon-brush:before { content: "\e6e5"; }
29
+
30
+.icon-brush_fill:before { content: "\e6e6"; }
31
+
32
+.icon-close:before { content: "\e6e9"; }
33
+
34
+.icon-document:before { content: "\e6f3"; }
35
+
36
+.icon-document_fill:before { content: "\e6f4"; }
37
+
38
+.icon-dynamic_fill:before { content: "\e6f5"; }
39
+
40
+.icon-dynamic:before { content: "\e6f6"; }
41
+
42
+.icon-editor:before { content: "\e6f7"; }
43
+
44
+.icon-empty:before { content: "\e6f8"; }
45
+
46
+.icon-enter:before { content: "\e6f9"; }
47
+
48
+.icon-people_fill:before { content: "\e715"; }
49
+
50
+.icon-people:before { content: "\e716"; }
51
+
52
+.icon-return:before { content: "\e720"; }
53
+
54
+.icon-right:before { content: "\e721"; }
55
+
56
+.icon-search:before { content: "\e741"; }
57
+
58
+.icon-packup:before { content: "\e749"; }
59
+
60
+.icon-unfold:before { content: "\e74a"; }
61
+
62
+.icon-add1:before { content: "\e604"; }
63
+

+ 180 - 0
src/assets/styles/iconfont/demo_unicode.html View File

@@ -0,0 +1,180 @@
1
+
2
+<!DOCTYPE html>
3
+<html>
4
+<head>
5
+    <meta charset="utf-8"/>
6
+    <title>IconFont</title>
7
+    <link rel="stylesheet" href="demo.css">
8
+
9
+    <style type="text/css">
10
+
11
+        @font-face {font-family: "iconfont";
12
+          src: url('iconfont.eot'); /* IE9*/
13
+          src: url('iconfont.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
14
+          url('iconfont.woff') format('woff'), /* chrome, firefox */
15
+          url('iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
16
+          url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
17
+        }
18
+
19
+        .iconfont {
20
+          font-family:"iconfont" !important;
21
+          font-size:16px;
22
+          font-style:normal;
23
+          -webkit-font-smoothing: antialiased;
24
+          -webkit-text-stroke-width: 0.2px;
25
+          -moz-osx-font-smoothing: grayscale;
26
+        }
27
+
28
+    </style>
29
+</head>
30
+<body>
31
+    <div class="main markdown">
32
+        <h1>IconFont 图标</h1>
33
+        <ul class="icon_lists clear">
34
+            
35
+                <li>
36
+                <i class="icon iconfont">&#xe6c0;</i>
37
+                    <div class="name">lock</div>
38
+                    <div class="code">&amp;#xe6c0;</div>
39
+                </li>
40
+            
41
+                <li>
42
+                <i class="icon iconfont">&#xe736;</i>
43
+                    <div class="name">people</div>
44
+                    <div class="code">&amp;#xe736;</div>
45
+                </li>
46
+            
47
+                <li>
48
+                <i class="icon iconfont">&#xe7d3;</i>
49
+                    <div class="name">查看 眼睛 实时分析</div>
50
+                    <div class="code">&amp;#xe7d3;</div>
51
+                </li>
52
+            
53
+                <li>
54
+                <i class="icon iconfont">&#xe7b7;</i>
55
+                    <div class="name">关闭</div>
56
+                    <div class="code">&amp;#xe7b7;</div>
57
+                </li>
58
+            
59
+                <li>
60
+                <i class="icon iconfont">&#xe6e5;</i>
61
+                    <div class="name">brush_fill</div>
62
+                    <div class="code">&amp;#xe6e5;</div>
63
+                </li>
64
+            
65
+                <li>
66
+                <i class="icon iconfont">&#xe6f3;</i>
67
+                    <div class="name">document_fill</div>
68
+                    <div class="code">&amp;#xe6f3;</div>
69
+                </li>
70
+            
71
+                <li>
72
+                <i class="icon iconfont">&#xe6f4;</i>
73
+                    <div class="name">dynamic_fill</div>
74
+                    <div class="code">&amp;#xe6f4;</div>
75
+                </li>
76
+            
77
+                <li>
78
+                <i class="icon iconfont">&#xe6f8;</i>
79
+                    <div class="name">enter</div>
80
+                    <div class="code">&amp;#xe6f8;</div>
81
+                </li>
82
+            
83
+                <li>
84
+                <i class="icon iconfont">&#xe715;</i>
85
+                    <div class="name">people_fill</div>
86
+                    <div class="code">&amp;#xe715;</div>
87
+                </li>
88
+            
89
+                <li>
90
+                <i class="icon iconfont">&#xe720;</i>
91
+                    <div class="name">return</div>
92
+                    <div class="code">&amp;#xe720;</div>
93
+                </li>
94
+            
95
+                <li>
96
+                <i class="icon iconfont">&#xe749;</i>
97
+                    <div class="name">packup</div>
98
+                    <div class="code">&amp;#xe749;</div>
99
+                </li>
100
+            
101
+                <li>
102
+                <i class="icon iconfont">&#xe74a;</i>
103
+                    <div class="name">unfold</div>
104
+                    <div class="code">&amp;#xe74a;</div>
105
+                </li>
106
+            
107
+                <li>
108
+                <i class="icon iconfont">&#xe600;</i>
109
+                    <div class="name">验证码</div>
110
+                    <div class="code">&amp;#xe600;</div>
111
+                </li>
112
+            
113
+                <li>
114
+                <i class="icon iconfont">&#xe64d;</i>
115
+                    <div class="name">搜索</div>
116
+                    <div class="code">&amp;#xe64d;</div>
117
+                </li>
118
+            
119
+                <li>
120
+                <i class="icon iconfont">&#xe617;</i>
121
+                    <div class="name">眼睛-闭</div>
122
+                    <div class="code">&amp;#xe617;</div>
123
+                </li>
124
+            
125
+                <li>
126
+                <i class="icon iconfont">&#xe6f5;</i>
127
+                    <div class="name">手机</div>
128
+                    <div class="code">&amp;#xe6f5;</div>
129
+                </li>
130
+            
131
+                <li>
132
+                <i class="icon iconfont">&#xe60c;</i>
133
+                    <div class="name">向下三角形</div>
134
+                    <div class="code">&amp;#xe60c;</div>
135
+                </li>
136
+            
137
+        </ul>
138
+        <h2 id="unicode-">unicode引用</h2>
139
+        <hr>
140
+
141
+        <p>unicode是字体在网页端最原始的应用方式,特点是:</p>
142
+        <ul>
143
+        <li>兼容性最好,支持ie6+,及所有现代浏览器。</li>
144
+        <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
145
+        <li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
146
+        </ul>
147
+        <blockquote>
148
+        <p>注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式</p>
149
+        </blockquote>
150
+        <p>unicode使用步骤如下:</p>
151
+        <h3 id="-font-face">第一步:拷贝项目下面生成的font-face</h3>
152
+        <pre><code class="lang-js hljs javascript">@font-face {
153
+  font-family: <span class="hljs-string">'iconfont'</span>;
154
+  src: url(<span class="hljs-string">'iconfont.eot'</span>);
155
+  src: url(<span class="hljs-string">'iconfont.eot?#iefix'</span>) format(<span class="hljs-string">'embedded-opentype'</span>),
156
+  url(<span class="hljs-string">'iconfont.woff'</span>) format(<span class="hljs-string">'woff'</span>),
157
+  url(<span class="hljs-string">'iconfont.ttf'</span>) format(<span class="hljs-string">'truetype'</span>),
158
+  url(<span class="hljs-string">'iconfont.svg#iconfont'</span>) format(<span class="hljs-string">'svg'</span>);
159
+}
160
+</code></pre>
161
+        <h3 id="-iconfont-">第二步:定义使用iconfont的样式</h3>
162
+        <pre><code class="lang-js hljs javascript">.iconfont{
163
+  font-family:<span class="hljs-string">"iconfont"</span> !important;
164
+  font-size:<span class="hljs-number">16</span>px;font-style:normal;
165
+  -webkit-font-smoothing: antialiased;
166
+  -webkit-text-stroke-width: <span class="hljs-number">0.2</span>px;
167
+  -moz-osx-font-smoothing: grayscale;
168
+}
169
+</code></pre>
170
+        <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
171
+        <pre><code class="lang-js hljs javascript">&lt;i <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"iconfont"</span>&gt;&amp;#x33;<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span></span></code></pre>
172
+
173
+        <blockquote>
174
+        <p>"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。</p>
175
+        </blockquote>
176
+    </div>
177
+
178
+
179
+</body>
180
+</html>

+ 51 - 0
src/assets/styles/iconfont/iconfont.css View File

@@ -0,0 +1,51 @@
1
+
2
+@font-face {font-family: "iconfont";
3
+  src: url('iconfont.eot?t=1537270796441'); /* IE9*/
4
+  src: url('iconfont.eot?t=1537270796441#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+  url('data:application/x-font-woff;charset=utf-8;base64,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') format('woff'),
6
+  url('iconfont.ttf?t=1537270796441') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+  url('iconfont.svg?t=1537270796441#iconfont') format('svg'); /* iOS 4.1- */
8
+}
9
+
10
+.iconfont {
11
+  font-family:"iconfont" !important;
12
+  font-size:16px;
13
+  font-style:normal;
14
+  -webkit-font-smoothing: antialiased;
15
+  -moz-osx-font-smoothing: grayscale;
16
+}
17
+
18
+.icon-lock:before { content: "\e6c0"; }
19
+
20
+.icon-people:before { content: "\e736"; }
21
+
22
+.icon-chakanyanjingshishifenxi:before { content: "\e7d3"; }
23
+
24
+.icon-guanbi:before { content: "\e7b7"; }
25
+
26
+.icon-brush_fill:before { content: "\e6e5"; }
27
+
28
+.icon-document_fill:before { content: "\e6f3"; }
29
+
30
+.icon-dynamic_fill:before { content: "\e6f4"; }
31
+
32
+.icon-enter:before { content: "\e6f8"; }
33
+
34
+.icon-people_fill:before { content: "\e715"; }
35
+
36
+.icon-return:before { content: "\e720"; }
37
+
38
+.icon-packup:before { content: "\e749"; }
39
+
40
+.icon-unfold:before { content: "\e74a"; }
41
+
42
+.icon-yanzhengma:before { content: "\e600"; }
43
+
44
+.icon-sousuo:before { content: "\e64d"; }
45
+
46
+.icon-yanjing-bi:before { content: "\e617"; }
47
+
48
+.icon-shouji:before { content: "\e6f5"; }
49
+
50
+.icon-xiaotuziCduan_:before { content: "\e60c"; }
51
+

BIN
src/assets/styles/iconfont/iconfont.eot View File


+ 32 - 0
src/assets/styles/iconfont/iconfont.svg View File

@@ -0,0 +1,32 @@
1
+<?xml version="1.0" standalone="no"?>
2
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+<!--
4
+2013-9-30: Created.
5
+-->
6
+<svg>
7
+<metadata>
8
+Created by iconfont
9
+</metadata>
10
+<defs>
11
+
12
+<font id="iconfont" horiz-adv-x="1024" >
13
+  <font-face
14
+    font-family="iconfont"
15
+    font-weight="500"
16
+    font-stretch="normal"
17
+    units-per-em="1024"
18
+    ascent="896"
19
+    descent="-128"
20
+  />
21
+    <missing-glyph />
22
+    
23
+    <glyph glyph-name="mima" unicode="&#58939;" d="M832 544H192c-35.3 0-64-28.7-64-64v-512c0-35.3 28.7-64 64-64h640c35.3 0 64 28.7 64 64V480c0 35.3-28.7 64-64 64z m0-512c0-35.3-28.7-64-64-64H256c-35.3 0-64 28.7-64 64V416c0 35.3 28.7 64 64 64h512c35.3 0 64-28.7 64-64v-384zM512 800c141.4 0 256-114.6 256-256h64c0 176.7-143.3 320-320 320S192 720.7 192 544h64c0 141.4 114.6 256 256 256z m0-448c-35.3 0-64-28.7-64-64v-64c0-35.3 28.7-64 64-64s64 28.7 64 64v64c0 35.3-28.7 64-64 64z"  horiz-adv-x="1024" />
24
+
25
+    
26
+    <glyph glyph-name="gerenzhongxinwoderenwubiaozhuntouxianxing" unicode="&#58927;" d="M382.35 396.089a227.556 227.556 0 1 0 250.027-6.087C794.112 334.137 910.222 180.622 910.222 0a28.444 28.444 0 0 0-56.889 0c0 196.38-159.175 355.556-355.555 355.556S142.222 196.38 142.222 0a28.444 28.444 0 0 0-56.889 0c0 187.733 125.412 346.169 297.017 396.089zM512 412.444a170.667 170.667 0 1 1 0 341.334 170.667 170.667 0 0 1 0-341.334z"  horiz-adv-x="1024" />
27
+
28
+    
29
+
30
+
31
+  </font>
32
+</defs></svg>

BIN
src/assets/styles/iconfont/iconfont.ttf View File


BIN
src/assets/styles/iconfont/iconfont.woff View File


+ 45 - 0
src/main.js View File

@@ -0,0 +1,45 @@
1
+// The Vue build version to load with the `import` command
2
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
+import Vue from "vue";
4
+import App from "./App";
5
+import router from "./router";
6
+import MintUI from "mint-ui";
7
+import store from "./store";
8
+import "mint-ui/lib/style.css";
9
+import "./assets/styles/iconfont.css";
10
+import "./permission";
11
+
12
+import "@/styles/reset.scss";
13
+import "@/styles/variables.scss";
14
+import "@/styles/style.scss";
15
+
16
+import Vant from "vant";
17
+import "vant/lib/index.css";
18
+import "vant/lib/icon/local.css";
19
+// import '@/styles/vant-css/index.css'
20
+import "@/styles/media.scss";
21
+import ElementUI from "element-ui";
22
+import "element-ui/lib/theme-chalk/index.css";
23
+// import "@/lib/flexible.js";
24
+
25
+// main.js
26
+// import 'lib-flexible'
27
+
28
+// import { AlertPlugin, ToastPlugin } from 'vux'
29
+
30
+// Vue.use(AlertPlugin)
31
+// Vue.use(ToastPlugin)
32
+
33
+Vue.use(MintUI);
34
+Vue.use(Vant);
35
+Vue.use(ElementUI);
36
+Vue.config.productionTip = false;
37
+
38
+/* eslint-disable no-new */
39
+new Vue({
40
+  el: "#app",
41
+  router,
42
+  store,
43
+  components: { App },
44
+  template: "<App/>"
45
+});

+ 194 - 0
src/pages/advice/AdvicePage.vue View File

@@ -0,0 +1,194 @@
1
+<template>
2
+  <div>
3
+    <van-row class="top_row" style="display:none">
4
+      <!-- <van-col :span="9">
5
+        <div style="visibility: hidden">
6
+          <span class="title"></span>
7
+        </div>
8
+      </van-col>
9
+      <van-col :span="14">
10
+        <div class="department">
11
+          <ul>
12
+            <li
13
+              v-for="(item,i) in ['透析临嘱','普通医嘱']"
14
+              :key="i"
15
+              :class="index == i? 'active':'' "
16
+              @click="ClickTab(i)"
17
+            >{{item}}</li>
18
+          </ul>
19
+        </div>
20
+      </van-col>
21
+
22
+      <van-col :span="4">
23
+        <router-link to="/add_urgent_schedule"></router-link>
24
+        <div class="search" style="visibility: hidden">
25
+          <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
26
+            <i class="iconfont" slot="left-icon">&#xe741;</i>
27
+            <van-button
28
+              slot="button"
29
+              size="small"
30
+              type="info"
31
+              style="border: none;"
32
+              @click="searchWithKeyword"
33
+            >搜索</van-button>
34
+          </van-field>
35
+        </div>
36
+      </van-col>-->
37
+      <div class="newSearch">
38
+        <el-input
39
+          prefix-icon="el-icon-search"
40
+          v-model="search_input"
41
+          ref="search_field"
42
+          placeholder="透析号/姓名"
43
+        ></el-input>
44
+        <p class="searchBtn" @click="searchWithKeyword(1)">搜索</p>
45
+      </div>
46
+    </van-row>
47
+
48
+    <div class="area">
49
+      <DialysisAdviceTable v-show="index == 0"></DialysisAdviceTable>
50
+      <NormalAdviceTable v-show="index == 1"></NormalAdviceTable>
51
+    </div>
52
+  </div>
53
+</template>
54
+
55
+<script>
56
+import DialysisAdviceTable from "./DialysisAdviceTable";
57
+import NormalAdviceTable from "./NormalAdviceTable";
58
+export default {
59
+  name: "RecordPage",
60
+  data() {
61
+    return {
62
+      index: 0,
63
+      search_input: "",
64
+      search_keyword: ""
65
+    };
66
+  },
67
+  components: {
68
+    NormalAdviceTable,
69
+    DialysisAdviceTable
70
+  },
71
+  methods: {
72
+    ClickTab: function(tabIndex) {
73
+      this.index = tabIndex;
74
+    },
75
+    searchWithKeyword: function() {
76
+      this.$refs.search_field.blur();
77
+      this.search_keyword = this.search_input;
78
+    },
79
+    clearKeyword: function() {
80
+      this.search_input = "";
81
+      this.search_keyword = "";
82
+    }
83
+  }
84
+};
85
+</script>
86
+
87
+<style style="stylesheet/scss" lang="scss" scoped>
88
+.top_row {
89
+  font-size: 0.3rem;
90
+  padding: 0.3rem 0.3rem;
91
+  // border-bottom: 1px #e5e5e5 solid;
92
+  display: flex;
93
+  align-items: center;
94
+  background: #258ffc;
95
+}
96
+.title {
97
+  font-size: 0.34rem;
98
+  font-weight: 600;
99
+  color: $title-color;
100
+}
101
+.department {
102
+  text-align: center;
103
+  ul {
104
+    li {
105
+      float: left;
106
+      font-size: 0.36rem;
107
+      margin: 0 0.2rem;
108
+      height: 0.64rem;
109
+      line-height: 0.64rem;
110
+      padding: 0 0.3rem;
111
+      color: $title-color;
112
+
113
+      &.active {
114
+        background: $main-color;
115
+        color: #fff;
116
+        border-radius: 30px;
117
+      }
118
+    }
119
+  }
120
+}
121
+.search {
122
+  color: #a8b3ba;
123
+  width: 4.2rem;
124
+  float: right;
125
+
126
+  .iconfont {
127
+    color: #a8b3ba;
128
+    font-size: 0.36rem;
129
+  }
130
+  .field {
131
+    background-color: #ebf1f7;
132
+    height: 0.6rem;
133
+    line-height: 0.6rem;
134
+    padding: 0 0 0 10px;
135
+    border-radius: 30px;
136
+  }
137
+}
138
+.add_schedule_btn {
139
+  margin-left: 10px;
140
+  float: right;
141
+  background-color: #ff7978;
142
+  border: none;
143
+  @media only screen and (max-width: 812px) {
144
+    min-width: 60px !important;
145
+  }
146
+}
147
+</style>
148
+
149
+<style lang="scss">
150
+.newSearch {
151
+  height: 1rem;
152
+  width: 100%;
153
+  background: #fff;
154
+  border-radius: 30px;
155
+  .searchBtn {
156
+    width: 14%;
157
+    float: right;
158
+    height: 1rem;
159
+    line-height: 1rem;
160
+    text-align: center;
161
+    font-size: 0.45rem;
162
+    color: #258ffc;
163
+    vertical-align: middle;
164
+  }
165
+  .el-input {
166
+    height: 100%;
167
+    width: 85% !important;
168
+    float: left;
169
+  }
170
+  .el-input__inner {
171
+    height: 100%;
172
+    line-height: 1rem;
173
+    width: 100%;
174
+    border-radius: 30px;
175
+    border: none;
176
+    font-size: 0.45rem;
177
+    vertical-align: middle;
178
+    @media only screen and (min-width: 768px) {
179
+      padding-left: 0.9rem;
180
+    }
181
+  }
182
+  .el-input__icon {
183
+    line-height: 1rem;
184
+    font-size: 0.45rem;
185
+    margin-top: 0.02rem;
186
+    padding-left: 0.1rem;
187
+  }
188
+  .el-input__prefix {
189
+    @media only screen and (min-width: 768px) {
190
+      left: 10px;
191
+    }
192
+  }
193
+}
194
+</style>

+ 652 - 0
src/pages/advice/DialysisAdviceTable.vue View File

@@ -0,0 +1,652 @@
1
+<template>
2
+  <div class="mainBox">
3
+    <div class="choice">
4
+      <ul>
5
+        <el-popover
6
+          placement="bottom"
7
+          trigger="click"
8
+          v-model="show_patient_type_selector"
9
+        >
10
+          <li slot="reference">
11
+            {{ patient_types[patient_selected].text }}
12
+            <span class="iconfont">&#xe74a;</span>
13
+          </li>
14
+          <div class="popover-demo-content">
15
+            <ul>
16
+              <li
17
+                v-for="type in patient_types"
18
+                :key="type.value"
19
+                @click="handlePaitentType(type.value)"
20
+                :class="advice_type_selected == type.value ? 'tick' : ''"
21
+              >
22
+                {{ type.text }}
23
+              </li>
24
+            </ul>
25
+          </div>
26
+        </el-popover>
27
+
28
+        <el-popover
29
+          placement="bottom"
30
+          trigger="click"
31
+          v-model="show_zone_selector"
32
+        >
33
+          <li slot="reference">
34
+            {{ zones[zone_selected].text }}
35
+            <span class="iconfont">&#xe74a;</span>
36
+          </li>
37
+          <div class="popover-demo-content">
38
+            <ul>
39
+              <li
40
+                v-for="(zone, index) in zones"
41
+                :key="zone.value"
42
+                @click="handleZoneChange(index)"
43
+                :class="zone_selected == index ? 'tick' : ''"
44
+              >
45
+                {{ zone.text }}
46
+              </li>
47
+            </ul>
48
+          </div>
49
+        </el-popover>
50
+        <el-popover
51
+          placement="bottom"
52
+          trigger="click"
53
+          v-model="show_sch_type_selector"
54
+        >
55
+          <li slot="reference">
56
+            {{ schedule_types[schedule_type_selected].text }}
57
+            <span class="iconfont">&#xe74a;</span>
58
+          </li>
59
+          <div class="popover-demo-content">
60
+            <ul>
61
+              <li
62
+                v-for="scheduleType in schedule_types"
63
+                :key="scheduleType.value"
64
+                @click="handletimeType(scheduleType.value)"
65
+                :class="
66
+                  schedule_type_selected == scheduleType.value ? 'tick' : ''
67
+                "
68
+              >
69
+                {{ scheduleType.text }}
70
+              </li>
71
+            </ul>
72
+          </div>
73
+        </el-popover>
74
+        <!--<el-popover placement="bottom" trigger="click" v-model="show_advice_type_selector">-->
75
+        <!--<li slot="reference">{{advice_types[advice_type_selected].text}}<span class="iconfont">&#xe74a;</span></li>-->
76
+        <!--<div class="popover-demo-content">-->
77
+        <!--<ul>-->
78
+        <!--<li v-for="type in advice_types" :key="type.value" @click="handleAdviceType(type.value)" :class="advice_type_selected == type.value ? 'tick' : ''" >{{type.text}}</li>-->
79
+        <!--</ul>-->
80
+        <!--</div>-->
81
+        <!--</el-popover>-->
82
+
83
+        <li @click="openPicker()">
84
+          {{ selected_date_str }}
85
+          <span class="iconfont">&#xe74a;</span>
86
+        </li>
87
+      </ul>
88
+    </div>
89
+
90
+    <div
91
+      style="width:100%;overflow:hildden;overflow-x:auto;"
92
+      class="DialysisAdvice"
93
+    >
94
+      <div class="blueBorder"></div>
95
+
96
+      <table class="table">
97
+        <tr>
98
+          <th width="60px">姓名</th>
99
+          <th width="40px">透析号</th>
100
+          <th width="50px">类型</th>
101
+          <th width="110px">开始时间</th>
102
+          <th width="140px">医嘱内容</th>
103
+          <th width="100px">执行时间</th>
104
+          <th width="80px">执行护士</th>
105
+          <th width="80px">校对护士</th>
106
+          <th width="110px">校对时间</th>
107
+          <th width="60px">开嘱医生</th>
108
+          <th width="110px">开嘱时间</th>
109
+        </tr>
110
+        <template v-for="(schedules, zone_name, index) in filtedScheduals">
111
+          <tr :key="index">
112
+            <td>{{ zone_name }}</td>
113
+            <td></td>
114
+            <td></td>
115
+            <td></td>
116
+            <td></td>
117
+            <td></td>
118
+            <td></td>
119
+            <td></td>
120
+            <td></td>
121
+            <td></td>
122
+            <td></td>
123
+          </tr>
124
+          <template v-for="schedule in schedules">
125
+            <template v-for="(group, group_index) in schedule.new_advice">
126
+              <tr
127
+                v-for="(advice, advice_index) in group.advices"
128
+                @click="clickfunction(schedule)"
129
+              >
130
+                <td
131
+                  v-if="advice_index == 0"
132
+                  :rowspan="group.advices.length"
133
+                  style="color:#409eff;"
134
+                >
135
+                  {{ advice.parent_id == 0 ? schedule.patient.name : "" }}
136
+                </td>
137
+                <td v-if="advice_index == 0" :rowspan="group.advices.length">
138
+                  {{
139
+                    advice.parent_id == 0 ? schedule.patient.dialysis_no : ""
140
+                  }}
141
+                </td>
142
+                <td v-if="advice_index == 0" :rowspan="group.advices.length">
143
+                  {{ getAdaviceType(advice.advice_type, advice.parent_id) }}
144
+                </td>
145
+                <td v-if="advice_index == 0" :rowspan="group.advices.length">
146
+                  {{
147
+                    advice.parent_id == 0
148
+                      ? parseTime(advice.start_time, "{m}-{d} {h}:{i}")
149
+                      : ""
150
+                  }}
151
+                </td>
152
+                <td
153
+                  :class="
154
+                    advice.parent_id == 0
155
+                      ? 'advice_content'
156
+                      : 'subadvice_content'
157
+                  "
158
+                >
159
+                  <span>{{ advice.advice_name }}</span>
160
+                  <span
161
+                    >{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span
162
+                  >
163
+                  <span v-if="advice.prescribing_number">
164
+                    {{ advice.prescribing_number
165
+                    }}{{ advice.prescribing_number_unit }}
166
+                  </span>
167
+                  <span v-if="advice.single_dose">
168
+                    单次用量 {{ advice.single_dose
169
+                    }}{{ advice.single_dose_unit }}
170
+                  </span>
171
+                  <span>{{ advice.delivery_way }}</span>
172
+                  <span>{{ advice.execution_frequency }}</span>
173
+                  <span v-if="advice.parent_id == 0 && advice.remark.length > 0"
174
+                    >({{ advice.remark }})</span
175
+                  >
176
+                </td>
177
+                <td>
178
+                  {{ parseTime(advice.execution_time, "{m}-{d} {h}:{i}") }}
179
+                </td>
180
+                <td>{{ getName(advice.execution_staff) }}</td>
181
+                <td>{{ getName(advice.checker) }}</td>
182
+                <td>{{ parseTime(advice.check_time, "{m}-{d} {h}:{i}") }}</td>
183
+                <td>{{ getName(advice.advice_doctor) }}</td>
184
+                <td>{{ parseTime(advice.created_time, "{m}-{d} {h}:{i}") }}</td>
185
+              </tr>
186
+            </template>
187
+          </template>
188
+        </template>
189
+      </table>
190
+
191
+      <div class="NoData" v-show="zones.length <= 1">
192
+        <img
193
+          style="margin-top: 50px; margin-bottom: 50px"
194
+          src="@/assets/login/data.jpg"
195
+          alt
196
+        />
197
+      </div>
198
+      <!-- <el-table :data="date" border style="width: 100%">
199
+        <el-table-column fixed prop="date" label="姓名" width="100" align="center">
200
+            <template slot-scope="scope">
201
+               {{ scope.row.advice_name }}
202
+            </template>
203
+        </el-table-column>
204
+        <el-table-column prop="name" label="透析号" width="100" align="center"></el-table-column>
205
+        <el-table-column prop="province" label="期效" width="100" align="center"></el-table-column>
206
+        <el-table-column prop="city" label="开始时间" width="100" align="center"></el-table-column>
207
+        <el-table-column prop="address" label="医嘱内容" width="200" align="center"></el-table-column>
208
+        <el-table-column prop="zip" label="执行时间" width="100" align="center"></el-table-column>
209
+        <el-table-column prop="zip" label="执行护士" width="150" align="center"></el-table-column>
210
+        <el-table-column prop="zip" label="校对护士" width="200" align="center"></el-table-column>
211
+        <el-table-column prop="zip" label="校对时间" width="200" align="center"></el-table-column>
212
+        <el-table-column prop="zip" label="开嘱医生" width="200" align="center"></el-table-column>
213
+        <el-table-column prop="zip" label="开嘱时间" width="200" align="center"></el-table-column>
214
+      </el-table>-->
215
+    </div>
216
+
217
+    <mt-datetime-picker
218
+      v-model="selected_date"
219
+      type="date"
220
+      ref="picker"
221
+      year-format="{value} "
222
+      month-format="{value} "
223
+      date-format="{value} "
224
+      @confirm="requestSchedualDoctors"
225
+    ></mt-datetime-picker>
226
+  </div>
227
+</template>
228
+
229
+<script>
230
+import SideBar from "@/pages/layout/SideBar";
231
+import { parseTime } from "@/utils";
232
+import { getSchedualDoctors } from "@/api/advice";
233
+
234
+export default {
235
+  name: "DialysisAdviceTable",
236
+  components: {
237
+    SideBar
238
+  },
239
+  data() {
240
+    return {
241
+      selected_date: new Date(),
242
+      admin_user: [],
243
+
244
+      show_sch_type_selector: false,
245
+      schedule_type_selected: 0,
246
+      schedule_types: [
247
+        { value: 0, text: "全部班次" },
248
+        { value: 1, text: "上午" },
249
+        { value: 2, text: "下午" },
250
+        { value: 3, text: "晚上" }
251
+      ],
252
+
253
+      show_zone_selector: false,
254
+      zone_selected: 0,
255
+      show_patient_type_selector: false,
256
+      zones: [{ value: 0, text: "全部分区", select: true }],
257
+
258
+      show_advice_type_selector: false,
259
+      advice_type_selected: 0,
260
+      advice_types: [
261
+        { value: 0, text: "全部医嘱" },
262
+        { value: 1, text: "长期医嘱" },
263
+        { value: 3, text: "临时医嘱" }
264
+      ],
265
+
266
+      patient_types: [
267
+        { value: 0, text: "全部病人" },
268
+        { value: 1, text: "我的病人" },
269
+        { value: 2, text: "未执行病人" }
270
+      ],
271
+      patient_selected: 0,
272
+
273
+      scheduleMap: {}
274
+    };
275
+  },
276
+  computed: {
277
+    selected_date_str: function() {
278
+      return parseTime(this.selected_date, "{y}-{m}-{d}");
279
+    },
280
+    filtedScheduals: function() {
281
+      var scheduleMap = new Object();
282
+      if (this.zone_selected == 0) {
283
+        for (const key in this.scheduleMap) {
284
+          scheduleMap[key] = this.scheduleMap[key];
285
+        }
286
+      } else {
287
+        var zone_name = this.zones[this.zone_selected].text;
288
+        scheduleMap[zone_name] = this.scheduleMap[zone_name];
289
+      }
290
+
291
+      if (this.schedule_type_selected != 0) {
292
+        var _scheduleMap = {};
293
+        for (const key in scheduleMap) {
294
+          var origin_schedules = scheduleMap[key];
295
+          var schedules = [];
296
+          for (let index = 0; index < origin_schedules.length; index++) {
297
+            const schedule = origin_schedules[index];
298
+            if (schedule.schedule_type == this.schedule_type_selected) {
299
+              schedules.push(schedule);
300
+            }
301
+          }
302
+          if (schedules.length > 0) {
303
+            _scheduleMap[key] = schedules;
304
+          }
305
+        }
306
+
307
+        scheduleMap = _scheduleMap;
308
+      }
309
+      for (var key in scheduleMap) {
310
+        let mapArr = scheduleMap[key];
311
+        for (let i = 0; i < mapArr.length; i++) {
312
+          mapArr[i]["new_advice"] = [];
313
+        }
314
+      }
315
+
316
+      for (var key in scheduleMap) {
317
+        let mapArr = scheduleMap[key];
318
+        for (let i = 0; i < mapArr.length; i++) {
319
+          var maps = mapArr[i];
320
+          var resp_advices = maps.doctor_advice;
321
+          if (resp_advices.length > 0) {
322
+            var newGroupObject = function() {
323
+              return Object.assign(
324
+                {},
325
+                {
326
+                  group_no: 0,
327
+                  advices: []
328
+                }
329
+              );
330
+            };
331
+            var initGroupBlock = function(group, advice) {
332
+              group.group_no = advice.groupno;
333
+            };
334
+
335
+            var advice_groups = [];
336
+            var group = newGroupObject();
337
+            for (let index = 0; index < resp_advices.length; index++) {
338
+              const advice = resp_advices[index];
339
+              if (advice.groupno == 0) {
340
+                // 老版本的医嘱
341
+                if (advice.parent_id > 0) {
342
+                  if (advice_groups.length > 0) {
343
+                    var parent_group = advice_groups[advice_groups.length - 1];
344
+                    if (parent_group.advices.length > 0) {
345
+                      if (parent_group.advices[0].id == advice.parent_id) {
346
+                        parent_group.advices.push(advice);
347
+                      }
348
+                    }
349
+                  }
350
+                  continue;
351
+                } else {
352
+                  if (group.group_no > 0) {
353
+                    advice_groups.push(group);
354
+                    group = newGroupObject();
355
+                  }
356
+
357
+                  initGroupBlock(group, advice);
358
+                  group.advices.push(advice);
359
+                  advice_groups.push(group);
360
+                  group = newGroupObject();
361
+                  continue;
362
+                }
363
+              } else {
364
+                if (group.group_no > 0 && group.group_no != advice.groupno) {
365
+                  advice_groups.push(group);
366
+                  group = newGroupObject();
367
+                }
368
+                if (group.group_no == 0) {
369
+                  initGroupBlock(group, advice);
370
+                }
371
+                if (group.group_no == advice.groupno) {
372
+                  group.advices.push(advice);
373
+                }
374
+              }
375
+            }
376
+            if (group.group_no > 0) {
377
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
378
+              advice_groups.push(group);
379
+            }
380
+            advice_groups = advice_groups;
381
+          } else {
382
+            advice_groups = [];
383
+          }
384
+          maps.new_advice = advice_groups;
385
+        }
386
+      }
387
+
388
+      console.log(scheduleMap);
389
+
390
+      return scheduleMap;
391
+    }
392
+  },
393
+  created() {
394
+    this.requestSchedualDoctors();
395
+  },
396
+  methods: {
397
+    // getNumber: function (advice,schedule) {
398
+    //   console.log(advice)
399
+    //   if (advice.parent_id == 0 ) {
400
+    //     if(advice.dialysis_order && advice.dialysis_order.device_number && advice.dialysis_order.device_number.number.length > 0){
401
+    //       return advice.dialysis_order.device_number.number
402
+    //     }else{
403
+    //       return schedule.device_number.number
404
+    //     }
405
+    //   }
406
+    //
407
+    // },
408
+    clickfunction: function(val) {
409
+      // console.log(val);
410
+      this.$router.push({
411
+        path: "/details",
412
+        query: {
413
+          patient_id: val.patient.id,
414
+          date: this.selected_date.getTime() / 1000,
415
+          patient_name: val.patient.name
416
+        }
417
+      });
418
+    },
419
+    handlePaitentType: function(index) {
420
+      this.patient_selected = index;
421
+      this.show_patient_type_selector = false;
422
+      this.requestSchedualDoctors();
423
+    },
424
+    openPicker() {
425
+      this.$refs.picker.open();
426
+    },
427
+    getAdaviceType(type, parent_id) {
428
+      if (parent_id == 0) {
429
+        if (type == 1) {
430
+          return "长嘱";
431
+        } else if (type == 2) {
432
+          return "临嘱";
433
+        } else if (type == 3) {
434
+          return "临嘱";
435
+        }
436
+      }
437
+    },
438
+    getName(val) {
439
+      console.log(this.admin_user);
440
+
441
+      for (let i = 0; i < this.admin_user.length; i++) {
442
+        if (this.admin_user[i].id == val) {
443
+          return this.admin_user[i].name;
444
+        }
445
+      }
446
+    },
447
+    handletimeType: function(index) {
448
+      this.schedule_type_selected = index;
449
+      this.show_sch_type_selector = false;
450
+    },
451
+    handleAdviceType: function(index) {
452
+      this.advice_type_selected = index;
453
+      this.show_advice_type_selector = false;
454
+      this.requestSchedualDoctors();
455
+    },
456
+    handleZoneChange: function(index) {
457
+      this.zone_selected = index;
458
+      this.show_zone_selector = false;
459
+    },
460
+    parseTime: function(time, layout) {
461
+      // console.log(time);
462
+      if (time == 0) {
463
+        return "";
464
+      }
465
+      return parseTime(time, layout);
466
+    },
467
+    requestSchedualDoctors() {
468
+      getSchedualDoctors({
469
+        date: this.selected_date_str,
470
+        patient_type: this.patient_selected,
471
+        advice_type: 2
472
+      }).then(rs => {
473
+        var resp = rs.data;
474
+        if (resp.state == 1) {
475
+          this.admin_user = resp.data.adminUser;
476
+          var schedules = resp.data.scheduals;
477
+          var zoneMap = {};
478
+          var scheduleMap = {};
479
+          for (let index = 0; index < schedules.length; index++) {
480
+            const schedule = schedules[index];
481
+            if (schedule.doctor_advice.length == 0) {
482
+              continue;
483
+            }
484
+            if (scheduleMap[schedule.device_number.zone.name] == null) {
485
+              scheduleMap[schedule.device_number.zone.name] = [];
486
+            }
487
+            scheduleMap[schedule.device_number.zone.name].push(schedule);
488
+            if (zoneMap[schedule.device_number.zone.name] == null) {
489
+              zoneMap[schedule.device_number.zone.name] =
490
+                schedule.device_number.zone;
491
+            }
492
+          }
493
+
494
+          var zones = [];
495
+          zones.push({ value: 0, text: "全部分区" });
496
+          for (var zoneName in zoneMap) {
497
+            zones.push({ value: zoneMap[zoneName].id, text: zoneName });
498
+          }
499
+
500
+          zones = zones.sort(function(a, b) {
501
+            return a.value > b.value;
502
+          });
503
+          this.zones = zones;
504
+
505
+          this.scheduleMap = scheduleMap;
506
+        } else {
507
+          this.$toast({
508
+            message: resp.msg
509
+          });
510
+        }
511
+      });
512
+    },
513
+    adviceDesc(advice) {}
514
+  }
515
+};
516
+</script>
517
+
518
+<style style="stylesheet/scss" lang="scss" scoped>
519
+.top {
520
+  .hospital {
521
+    width: 2rem;
522
+  }
523
+  .TopTitle {
524
+    font-size: 0.36rem;
525
+    color: $title-color;
526
+    font-weight: normal;
527
+  }
528
+  padding: 0.3rem 0.3rem;
529
+  @include display-flex;
530
+  @include align-items-center;
531
+  @include text-align;
532
+  @include justify-content-between;
533
+  border-bottom: 1px #e5e5e5 solid;
534
+  .title {
535
+    font-size: 0.3rem;
536
+    font-weight: bold;
537
+    color: $pgh-color;
538
+  }
539
+  .iconfont {
540
+    font-size: 0.4rem;
541
+    color: #a8b3ba;
542
+  }
543
+}
544
+.search {
545
+  background: #ebf1f7;
546
+  border-radius: 30px;
547
+  padding: 0 0.3rem;
548
+  height: 0.6rem;
549
+  line-height: 0.6rem;
550
+  color: #a8b3ba;
551
+
552
+  .iconfont {
553
+    color: #a8b3ba;
554
+    font-size: 0.28rem;
555
+  }
556
+  .searchInput {
557
+    font-size: 0.28rem;
558
+    border: none;
559
+    outline: none;
560
+    background: #ebf1f7;
561
+  }
562
+}
563
+.choice {
564
+  border-bottom: 1px #e5e5e5 solid;
565
+  position: fixed;
566
+  top: 0;
567
+  right: 0;
568
+  z-index: 66;
569
+  left: 0;
570
+  background: #258ffc;
571
+  // @media only screen and (max-width: 415px) {
572
+  //   top: 38px !important;
573
+  // }
574
+  // @media only screen and (min-width: 376px) and (max-width: 812px) {
575
+  //   top: 38px !important;
576
+  // }
577
+  // @media only screen and (min-width: 768px) {
578
+  //   top: 80px !important;
579
+  // }
580
+  ul {
581
+    @include display-flex;
582
+    @include align-items-center;
583
+    @include text-align;
584
+    @include justify-content-between;
585
+    width: 90%;
586
+    margin: 0 auto;
587
+    font-size: 0.32rem;
588
+    // color: $pgh-color;
589
+    color: #fff;
590
+    li {
591
+      @include display-flex;
592
+      @include align-items-center;
593
+      @include text-align;
594
+      @include justify-content-between;
595
+      padding: 0.3rem 0;
596
+      font-size: 0.45rem;
597
+      .iconfont {
598
+        margin: 0 0.1rem;
599
+        color: #fff;
600
+      }
601
+      .line {
602
+        background: #a8b3ba;
603
+        width: 0.2rem;
604
+        height: 1px;
605
+        margin: 0 0.2rem;
606
+        display: inline-block;
607
+      }
608
+    }
609
+  }
610
+}
611
+.DialysisAdvice {
612
+  padding-top: 36px;
613
+  // background: #fff;
614
+  min-height: calc(100vh - 2px);
615
+  // @media only screen and (max-width: 812px) {
616
+  //   padding-top: 70px !important;
617
+  // }
618
+  @media only screen and (min-width: 768px) {
619
+    padding-top: 60px !important;
620
+  }
621
+  @media only screen and (min-width: 415px) and (max-width: 767px) {
622
+    padding-top: 46px;
623
+  }
624
+  // @media only screen and (min-width: 813px) and (max-width: 1024px) {
625
+  //   padding-top: 118px !important;
626
+  // }
627
+}
628
+
629
+.advice_content {
630
+  text-align: left;
631
+  padding-left: 5px;
632
+  padding-right: 5px;
633
+  // background: #eff6fc;
634
+}
635
+.subadvice_content {
636
+  text-align: left;
637
+  padding-left: 25px;
638
+  padding-right: 5px;
639
+  // background: #fafcfe;
640
+}
641
+</style>
642
+<style lang="scss">
643
+// .el-table {
644
+//   margin-top: 64px;
645
+// }
646
+.el-table td {
647
+  padding: 0;
648
+}
649
+.el-table th {
650
+  padding: 6px 0;
651
+}
652
+</style>

+ 526 - 0
src/pages/advice/NormalAdviceTable.vue View File

@@ -0,0 +1,526 @@
1
+<template>
2
+  <div class="mainBox">
3
+    <div class="choice">
4
+      <ul>
5
+        <el-popover
6
+          placement="bottom"
7
+          trigger="click"
8
+          v-model="show_patient_type_selector"
9
+        >
10
+          <li slot="reference">
11
+            {{ patient_types[patient_selected].text }}
12
+            <span class="iconfont">&#xe74a;</span>
13
+          </li>
14
+          <div class="popover-demo-content">
15
+            <ul>
16
+              <li
17
+                v-for="type in patient_types"
18
+                :key="type.value"
19
+                @click="handlePaitentType(type.value)"
20
+                :class="advice_type_selected == type.value ? 'tick' : ''"
21
+              >
22
+                {{ type.text }}
23
+              </li>
24
+            </ul>
25
+          </div>
26
+        </el-popover>
27
+
28
+        <el-popover
29
+          placement="bottom"
30
+          trigger="click"
31
+          v-model="show_zone_selector"
32
+        >
33
+          <li slot="reference">
34
+            {{ zones[zone_selected].text }}
35
+            <span class="iconfont">&#xe74a;</span>
36
+          </li>
37
+          <div class="popover-demo-content">
38
+            <ul>
39
+              <li
40
+                v-for="(zone, index) in zones"
41
+                :key="zone.value"
42
+                @click="handleZoneChange(index)"
43
+                :class="zone_selected == index ? 'tick' : ''"
44
+              >
45
+                {{ zone.text }}
46
+              </li>
47
+            </ul>
48
+          </div>
49
+        </el-popover>
50
+        <el-popover
51
+          placement="bottom"
52
+          trigger="click"
53
+          v-model="show_sch_type_selector"
54
+        >
55
+          <li slot="reference">
56
+            {{ schedule_types[schedule_type_selected].text }}
57
+            <span class="iconfont">&#xe74a;</span>
58
+          </li>
59
+          <div class="popover-demo-content">
60
+            <ul>
61
+              <li
62
+                v-for="scheduleType in schedule_types"
63
+                :key="scheduleType.value"
64
+                @click="handletimeType(scheduleType.value)"
65
+                :class="
66
+                  schedule_type_selected == scheduleType.value ? 'tick' : ''
67
+                "
68
+              >
69
+                {{ scheduleType.text }}
70
+              </li>
71
+            </ul>
72
+          </div>
73
+        </el-popover>
74
+        <!--<el-popover placement="bottom" trigger="click" v-model="show_advice_type_selector">-->
75
+        <!--<li slot="reference">{{advice_types[advice_type_selected].text}}<span class="iconfont">&#xe74a;</span></li>-->
76
+        <!--<div class="popover-demo-content">-->
77
+        <!--<ul>-->
78
+        <!--<li v-for="type in advice_types" :key="type.value" @click="handleAdviceType(type.value)" :class="advice_type_selected == type.value ? 'tick' : ''" >{{type.text}}</li>-->
79
+        <!--</ul>-->
80
+        <!--</div>-->
81
+        <!--</el-popover>-->
82
+
83
+        <li @click="openPicker()">
84
+          {{ selected_date_str }}
85
+          <span class="iconfont">&#xe74a;</span>
86
+        </li>
87
+      </ul>
88
+    </div>
89
+
90
+    <div
91
+      style="width:100%;overflow:hildden;overflow-x:auto;"
92
+      class="NormalAdvice"
93
+    >
94
+      <div class="blueBorder"></div>
95
+      <table class="table">
96
+        <tr>
97
+          <!--<th width="50px">机号</th>-->
98
+          <th width="50px">姓名</th>
99
+          <th width="50px">透析号</th>
100
+          <th width="50px">期效</th>
101
+          <th width="100px">开始时间</th>
102
+          <th width="200px">医嘱内容</th>
103
+          <th width="50px">执行时间</th>
104
+          <th width="50px">执行护士</th>
105
+          <th width="50px">校对护士</th>
106
+          <th width="100px">校对时间</th>
107
+          <th width="50px">开嘱医生</th>
108
+          <th width="100px">开嘱时间</th>
109
+        </tr>
110
+        <template v-for="(schedules, zone_name, index) in filtedScheduals">
111
+          <tr :key="index">
112
+            <td>{{ zone_name }}</td>
113
+            <!--<td></td>-->
114
+            <td></td>
115
+            <td></td>
116
+            <td></td>
117
+            <td></td>
118
+            <td></td>
119
+            <td></td>
120
+            <td></td>
121
+            <td></td>
122
+            <td></td>
123
+            <td></td>
124
+          </tr>
125
+          <template v-for="schedule in schedules">
126
+            <tr
127
+              v-for="(advice, advice_index) in schedule.doctor_advice"
128
+              :key="advice.id + '_' + advice_index + '_' + index"
129
+              @click="clickfunction(schedule)"
130
+            >
131
+              <!--<td>{{ advice.parent_id == 0 && advice.dialysis_order&&advice.dialysis_order.device_number&& advice.dialysis_order.device_number.number.length > 0 ? advice.dialysis_order.device_number.number : schedule.device_number.number }}</td>-->
132
+              <!--<td>{{getNumber(advice)}}</td>-->
133
+              <td>{{ advice.parent_id == 0 ? schedule.patient.name : "" }}</td>
134
+              <td>
135
+                {{ advice.parent_id == 0 ? schedule.patient.dialysis_no : "" }}
136
+              </td>
137
+              <td>
138
+                {{ getAdaviceType(advice.advice_type, advice.parent_id) }}
139
+              </td>
140
+              <td>
141
+                {{
142
+                  advice.parent_id == 0
143
+                    ? parseTime(advice.start_time, "{m}-{d} {h}:{i}")
144
+                    : ""
145
+                }}
146
+              </td>
147
+              <td>
148
+                <span>{{ advice.advice_name }}</span>
149
+                <span>{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span>
150
+
151
+                <span v-if="advice.prescribing_number">
152
+                  {{ advice.prescribing_number
153
+                  }}{{ advice.prescribing_number_unit }}
154
+                </span>
155
+                <span v-if="advice.single_dose">
156
+                  单次用量 {{ advice.single_dose }}{{ advice.single_dose_unit }}
157
+                </span>
158
+                <span>{{ advice.delivery_way }}</span>
159
+                <span>{{ advice.execution_frequency }}</span>
160
+              </td>
161
+              <td>
162
+                {{
163
+                  advice.parent_id == 0
164
+                    ? parseTime(advice.execution_time, "{m}-{d} {h}:{i}")
165
+                    : ""
166
+                }}
167
+              </td>
168
+              <td>
169
+                {{
170
+                  advice.parent_id == 0 ? getName(advice.execution_staff) : ""
171
+                }}
172
+              </td>
173
+              <td>
174
+                {{ advice.parent_id == 0 ? getName(advice.checker) : "" }}
175
+              </td>
176
+              <td>
177
+                {{
178
+                  advice.parent_id == 0
179
+                    ? parseTime(advice.check_time, "{m}-{d} {h}:{i}")
180
+                    : ""
181
+                }}
182
+              </td>
183
+              <td>
184
+                {{ advice.parent_id == 0 ? getName(advice.advice_doctor) : "" }}
185
+              </td>
186
+              <td>
187
+                {{
188
+                  advice.parent_id == 0
189
+                    ? parseTime(advice.created_time, "{m}-{d} {h}:{i}")
190
+                    : ""
191
+                }}
192
+              </td>
193
+            </tr>
194
+          </template>
195
+        </template>
196
+      </table>
197
+
198
+      <div class="NoData" v-show="zones.length <= 1">
199
+        <img
200
+          style="margin-top: 50px; margin-bottom: 50px"
201
+          src="@/assets/login/data.jpg"
202
+          alt
203
+        />
204
+      </div>
205
+    </div>
206
+    <!--<div class="NoData" v-show="zones.length <= 1"><img src="@/assets/login/data.jpg" alt=""></div>-->
207
+
208
+    <mt-datetime-picker
209
+      v-model="selected_date"
210
+      type="date"
211
+      ref="picker"
212
+      year-format="{value} "
213
+      month-format="{value} "
214
+      date-format="{value} "
215
+      @confirm="requestSchedualDoctors"
216
+    ></mt-datetime-picker>
217
+  </div>
218
+</template>
219
+
220
+<script>
221
+import SideBar from "@/pages/layout/SideBar";
222
+import { parseTime } from "@/utils";
223
+import { getSchedualDoctors } from "@/api/advice";
224
+export default {
225
+  name: "DialysisAdviceTable",
226
+  components: {
227
+    SideBar
228
+  },
229
+  data() {
230
+    return {
231
+      selected_date: new Date(),
232
+      admin_user: [],
233
+
234
+      show_sch_type_selector: false,
235
+      schedule_type_selected: 0,
236
+      schedule_types: [
237
+        { value: 0, text: "全部班次" },
238
+        { value: 1, text: "上午" },
239
+        { value: 2, text: "下午" },
240
+        { value: 3, text: "晚上" }
241
+      ],
242
+
243
+      show_zone_selector: false,
244
+      zone_selected: 0,
245
+      show_patient_type_selector: false,
246
+      zones: [{ value: 0, text: "全部分区", select: true }],
247
+
248
+      show_advice_type_selector: false,
249
+      advice_type_selected: 0,
250
+      advice_types: [
251
+        { value: 0, text: "全部医嘱" },
252
+        { value: 1, text: "长期医嘱" },
253
+        { value: 3, text: "临时医嘱" }
254
+      ],
255
+
256
+      patient_types: [
257
+        { value: 0, text: "全部病人" },
258
+        { value: 1, text: "我的病人" },
259
+        { value: 2, text: "未执行病人" }
260
+      ],
261
+      patient_selected: 0,
262
+
263
+      scheduleMap: {}
264
+    };
265
+  },
266
+  computed: {
267
+    selected_date_str: function() {
268
+      return parseTime(this.selected_date, "{y}-{m}-{d}");
269
+    },
270
+    filtedScheduals: function() {
271
+      var scheduleMap = new Object();
272
+      if (this.zone_selected == 0) {
273
+        for (const key in this.scheduleMap) {
274
+          scheduleMap[key] = this.scheduleMap[key];
275
+        }
276
+      } else {
277
+        var zone_name = this.zones[this.zone_selected].text;
278
+        scheduleMap[zone_name] = this.scheduleMap[zone_name];
279
+      }
280
+
281
+      if (this.schedule_type_selected != 0) {
282
+        var _scheduleMap = {};
283
+        for (const key in scheduleMap) {
284
+          var origin_schedules = scheduleMap[key];
285
+          var schedules = [];
286
+          for (let index = 0; index < origin_schedules.length; index++) {
287
+            const schedule = origin_schedules[index];
288
+            if (schedule.schedule_type == this.schedule_type_selected) {
289
+              schedules.push(schedule);
290
+            }
291
+          }
292
+          if (schedules.length > 0) {
293
+            _scheduleMap[key] = schedules;
294
+          }
295
+        }
296
+
297
+        scheduleMap = _scheduleMap;
298
+      }
299
+      return scheduleMap;
300
+    }
301
+  },
302
+  created() {
303
+    this.requestSchedualDoctors();
304
+  },
305
+  methods: {
306
+    getNumber: function(advice) {
307
+      if (
308
+        advice.parent_id == 0 &&
309
+        advice.dialysis_order &&
310
+        advice.dialysis_order.device_number &&
311
+        advice.dialysis_order.device_number.number.length > 0
312
+      ) {
313
+        console.log("111111");
314
+      } else {
315
+        console.log("222222");
316
+      }
317
+    },
318
+    clickfunction: function(val) {
319
+      // console.log(val);
320
+      this.$router.push({
321
+        path: "/details",
322
+        query: {
323
+          patient_id: val.patient.id,
324
+          date: this.selected_date.getTime() / 1000,
325
+          patient_name: val.patient.name
326
+        }
327
+      });
328
+    },
329
+    handlePaitentType: function(index) {
330
+      this.patient_selected = index;
331
+      this.show_patient_type_selector = false;
332
+      this.requestSchedualDoctors();
333
+    },
334
+    openPicker() {
335
+      this.$refs.picker.open();
336
+    },
337
+    getAdaviceType(type, parent_id) {
338
+      if (parent_id == 0) {
339
+        if (type == 1) {
340
+          return "长嘱";
341
+        } else if (type == 2) {
342
+          return "临嘱";
343
+        } else if (type == 3) {
344
+          return "临嘱";
345
+        }
346
+      }
347
+    },
348
+    getName(val) {
349
+      for (let i = 0; i < this.admin_user.length; i++) {
350
+        if (this.admin_user[i].id == val) {
351
+          return this.admin_user[i].name;
352
+        }
353
+      }
354
+    },
355
+    handletimeType: function(index) {
356
+      this.schedule_type_selected = index;
357
+      this.show_sch_type_selector = false;
358
+    },
359
+    handleAdviceType: function(index) {
360
+      this.advice_type_selected = index;
361
+      this.show_advice_type_selector = false;
362
+      this.requestSchedualDoctors();
363
+    },
364
+    handleZoneChange: function(index) {
365
+      this.zone_selected = index;
366
+      this.show_zone_selector = false;
367
+    },
368
+    parseTime: function(time, layout) {
369
+      if (time == 0) {
370
+        return "";
371
+      }
372
+      return parseTime(time, layout);
373
+    },
374
+    requestSchedualDoctors() {
375
+      getSchedualDoctors({
376
+        date: this.selected_date_str,
377
+        patient_type: this.patient_selected,
378
+        advice_type: this.advice_type_selected
379
+      }).then(rs => {
380
+        var resp = rs.data;
381
+        if (resp.state == 1) {
382
+          this.admin_user = resp.data.adminUser;
383
+          var schedules = resp.data.scheduals;
384
+          var zoneMap = {};
385
+          var scheduleMap = {};
386
+          for (let index = 0; index < schedules.length; index++) {
387
+            const schedule = schedules[index];
388
+            if (schedule.doctor_advice.length == 0) {
389
+              continue;
390
+            }
391
+            if (scheduleMap[schedule.device_number.zone.name] == null) {
392
+              scheduleMap[schedule.device_number.zone.name] = [];
393
+            }
394
+            scheduleMap[schedule.device_number.zone.name].push(schedule);
395
+            if (zoneMap[schedule.device_number.zone.name] == null) {
396
+              zoneMap[schedule.device_number.zone.name] =
397
+                schedule.device_number.zone;
398
+            }
399
+          }
400
+
401
+          var zones = [];
402
+          zones.push({ value: 0, text: "全部分区" });
403
+          for (var zoneName in zoneMap) {
404
+            zones.push({ value: zoneMap[zoneName].id, text: zoneName });
405
+          }
406
+
407
+          zones = zones.sort(function(a, b) {
408
+            return a.value > b.value;
409
+          });
410
+          this.zones = zones;
411
+
412
+          this.scheduleMap = scheduleMap;
413
+        } else {
414
+          this.$toast({
415
+            message: resp.msg
416
+          });
417
+        }
418
+      });
419
+    },
420
+    adviceDesc(advice) {}
421
+  }
422
+};
423
+</script>
424
+
425
+<style style="stylesheet/scss" lang="scss" scoped>
426
+.top {
427
+  .hospital {
428
+    width: 2rem;
429
+  }
430
+  .TopTitle {
431
+    font-size: 0.36rem;
432
+    color: $title-color;
433
+    font-weight: normal;
434
+  }
435
+  padding: 0.3rem 0.3rem;
436
+  @include display-flex;
437
+  @include align-items-center;
438
+  @include text-align;
439
+  @include justify-content-between;
440
+  border-bottom: 1px #e5e5e5 solid;
441
+  .title {
442
+    font-size: 0.3rem;
443
+    font-weight: bold;
444
+    color: $pgh-color;
445
+  }
446
+  .iconfont {
447
+    font-size: 0.4rem;
448
+    color: #a8b3ba;
449
+  }
450
+}
451
+.search {
452
+  background: #ebf1f7;
453
+  border-radius: 30px;
454
+  padding: 0 0.3rem;
455
+  height: 0.6rem;
456
+  line-height: 0.6rem;
457
+  color: #a8b3ba;
458
+
459
+  .iconfont {
460
+    color: #a8b3ba;
461
+    font-size: 0.28rem;
462
+  }
463
+  .searchInput {
464
+    font-size: 0.28rem;
465
+    border: none;
466
+    outline: none;
467
+    background: #ebf1f7;
468
+  }
469
+}
470
+.choice {
471
+  border-bottom: 1px #e5e5e5 solid;
472
+  position: fixed;
473
+  top: 63px;
474
+  right: 0;
475
+  z-index: 66;
476
+  left: 0;
477
+  background: #fff;
478
+  @media only screen and (max-width: 376px) {
479
+    top: 38px !important;
480
+  }
481
+  @media only screen and (min-width: 376px) and (max-width: 812px) {
482
+    top: 38px !important;
483
+  }
484
+  ul {
485
+    @include display-flex;
486
+    @include align-items-center;
487
+    @include text-align;
488
+    @include justify-content-between;
489
+    width: 90%;
490
+    margin: 0 auto;
491
+    font-size: 0.32rem;
492
+    color: $pgh-color;
493
+    li {
494
+      @include display-flex;
495
+      @include align-items-center;
496
+      @include text-align;
497
+      @include justify-content-between;
498
+      padding: 0.3rem 0;
499
+      font-size: 0.32rem;
500
+      .iconfont {
501
+        margin: 0 0.1rem;
502
+      }
503
+      .line {
504
+        background: #a8b3ba;
505
+        width: 0.2rem;
506
+        height: 1px;
507
+        margin: 0 0.2rem;
508
+        display: inline-block;
509
+      }
510
+    }
511
+  }
512
+}
513
+.table {
514
+}
515
+.NormalAdvice {
516
+  padding-top: 115px;
517
+  background: #fff;
518
+  min-height: calc(100vh - 2px);
519
+  @media only screen and (max-width: 812px) {
520
+    padding-top: 70px !important;
521
+  }
522
+  @media only screen and (min-width: 813px) and (max-width: 1024px) {
523
+    padding-top: 115px !important;
524
+  }
525
+}
526
+</style>

+ 89 - 0
src/pages/advice/index.vue View File

@@ -0,0 +1,89 @@
1
+<template>
2
+  <div class="mainBox">
3
+    <div class="mainContent">
4
+      <AdvicePage></AdvicePage>
5
+    </div>
6
+    <side-bar :active_index="2"></side-bar>
7
+  </div>
8
+</template>
9
+
10
+<script>
11
+import SideBar from "@/pages/layout/SideBar";
12
+import AdvicePage from "./AdvicePage";
13
+export default {
14
+  name: "index",
15
+  components: {
16
+    AdvicePage,
17
+    SideBar
18
+  }
19
+};
20
+</script>
21
+
22
+<style style="stylesheet/scss" lang="scss" scoped>
23
+html,
24
+body {
25
+  height: 100%;
26
+}
27
+.mainBox {
28
+  overflow: hidden;
29
+  height: 100%;
30
+  font-size: 0.3rem;
31
+  display: flex;
32
+  flex-direction: column;
33
+  > :first-child {
34
+    flex: 1;
35
+    overflow: auto;
36
+  }
37
+  .sideColumn {
38
+    .column {
39
+      .head {
40
+        @include display-flex;
41
+        @include align-items-center;
42
+        @include flex-direction;
43
+        @include text-align;
44
+        @include justify-content-center;
45
+        margin: 0.5rem 0 0.5rem 0;
46
+        img {
47
+          width: 100%;
48
+          height: 100%;
49
+          border-radius: 0.5rem;
50
+          width: 0.7rem;
51
+          height: 0.7rem;
52
+        }
53
+      }
54
+      .sidebar {
55
+        @include display-flex;
56
+        @include align-items-center;
57
+        @include flex-direction;
58
+        @include text-align;
59
+        padding: 0;
60
+        li {
61
+          padding: 0 0 0.8rem 0;
62
+          a {
63
+            color: #a8b3ba;
64
+            display: inline-block;
65
+            padding: 0;
66
+            margin: 0;
67
+            p {
68
+              font-size: 0.24rem;
69
+              margin-top: 0.2rem;
70
+            }
71
+            .iconfont {
72
+              font-size: 0.5rem;
73
+              display: inline-block;
74
+            }
75
+          }
76
+          &.active {
77
+            a {
78
+              color: #409eff;
79
+            }
80
+          }
81
+        }
82
+      }
83
+    }
84
+  }
85
+}
86
+.mainContent {
87
+  // margin: 0 0 0 1.58rem;
88
+}
89
+</style>

+ 428 - 0
src/pages/home/login.vue View File

@@ -0,0 +1,428 @@
1
+<template>
2
+  <div class="container">
3
+    <div class="newLogin">
4
+      <div class="login">
5
+        <div>
6
+          <img src="../../assets/login/newImg.png" alt style="width: 100%;" />
7
+        </div>
8
+        <div class="logo">
9
+          <img src="../../assets/login/newLogo.png" alt />
10
+        </div>
11
+        <div class="reg">
12
+          <div class="form">
13
+            <ul>
14
+              <li>
15
+                <span class="iconfont">&#xe78b;</span>
16
+                <input placeholder="请输入手机号" type="tel" class="tel" v-model="form.mobile" />
17
+              </li>
18
+              <li>
19
+                <span class="iconfont">&#xe6c0;</span>
20
+                <input placeholder="请输入密码" type="password" class="tel" v-model="form.pwd" />
21
+              </li>
22
+            </ul>
23
+          </div>
24
+          <!-- <router-link to="/product"> -->
25
+          <div class="remember">
26
+            <el-checkbox v-model="checked">记住密码</el-checkbox>
27
+          </div>
28
+          <!-- <button
29
+            class="loginBtn"
30
+            @click="loginAction"
31
+            :class="loginDisable ? 'disableLoginBtn' : ''"
32
+            :disabled="loginDisable"
33
+          >
34
+            登录
35
+          </button>-->
36
+          <button
37
+            class="loginBtn"
38
+            @click="submitForm"
39
+            :class="loginDisable ? 'disableLoginBtn' : ''"
40
+            :disabled="loginDisable"
41
+          >登录</button>
42
+
43
+          <!-- <router-link to="/forgetPassword">
44
+            <div class="newForget">忘记密码</div>
45
+          </router-link>-->
46
+          <!-- </router-link> -->
47
+          <!-- <div class="forget">
48
+          <a href="">免密码登录</a>
49
+          <a href="">忘记密码?</a>
50
+          </div>-->
51
+        </div>
52
+        <div class="agree">
53
+          <el-checkbox v-model="agreement">我已阅读并同意</el-checkbox>
54
+          <span class="agreeText" @click="agree()">《隐私服务协议》</span>
55
+          <span class="agreeText" @click="agree1()">《用户协议》</span>
56
+        </div>
57
+      </div>
58
+    </div>
59
+  </div>
60
+</template>
61
+
62
+<script>
63
+import { loginByPwd } from "@/api/login";
64
+import { hex_md5 } from "@/utils/md5";
65
+import { getLoginInfoCache, cacheLoginInfo } from "@/utils/admin_info_cache";
66
+import { Toast } from "vant";
67
+
68
+export default {
69
+  name: "Home",
70
+  data() {
71
+    return {
72
+      form: {
73
+        mobile: "",
74
+        pwd: ""
75
+      },
76
+      checked: false,
77
+      agreement: true
78
+    };
79
+  },
80
+  computed: {
81
+    loginDisable() {
82
+      // return false
83
+      return this.form.mobile.length == 0 || this.form.pwd.length == 0;
84
+    }
85
+  },
86
+  created() {
87
+    var loginInfo = getLoginInfoCache();
88
+    this.form.mobile = loginInfo.mobile;
89
+    this.form.pwd = loginInfo.password;
90
+  },
91
+  mounted() {
92
+    this.getCookie();
93
+  },
94
+  methods: {
95
+    loginAction: function() {
96
+      loginByPwd(this.form.mobile, hex_md5(this.form.pwd)).then(rs => {
97
+        var resp = rs.data;
98
+
99
+        if (resp.state == 1) {
100
+          cacheLoginInfo(this.form.mobile, this.form.pwd);
101
+          console.log(resp);
102
+
103
+          var user = resp.data.user;
104
+          var org = resp.data.org;
105
+          var subscibe = resp.data.subscibe;
106
+          var config_list = resp.data.config_list;
107
+          var template_info = resp.data.template_info;
108
+          var filed_list = resp.data.filed_list;
109
+          console.log(resp.data.filed_list);
110
+          console.log(filed_list);
111
+
112
+          this.$store.dispatch("InitUserInfo", {
113
+            user: user,
114
+            org: org,
115
+            subscibe: subscibe,
116
+            template_info: template_info,
117
+            filed_list: filed_list
118
+          });
119
+          this.$store.dispatch("SetConfigList", config_list);
120
+
121
+          // this.$router.push({path: "/product"})
122
+          this.$router.push({ path: "/main" });
123
+        } else {
124
+          this.$toast({
125
+            message: resp.msg
126
+          });
127
+        }
128
+      });
129
+    },
130
+    to: function() {
131
+      this.$router.push({ path: "/privacy" });
132
+    },
133
+    submitForm() {
134
+      const self = this;
135
+      //判断复选框是否被勾选 勾选则调用配置cookie方法
136
+      if (self.checked == true) {
137
+        console.log("checked == true");
138
+        //传入账号名,密码,和保存天数3个参数
139
+        self.setCookie(self.form.mobile, self.form.pwd, 7);
140
+      } else {
141
+        console.log("清空Cookie");
142
+        //清空Cookie
143
+        self.clearCookie();
144
+      }
145
+
146
+      //与后端请求代码,本功能不需要与后台交互所以省略
147
+
148
+      loginByPwd(this.form.mobile, hex_md5(this.form.pwd)).then(rs => {
149
+        var resp = rs.data;
150
+        if (this.agreement != true) {
151
+          Toast("请同意隐私服务协议");
152
+        }
153
+
154
+        if (resp.state == 1 && this.agreement == true) {
155
+          cacheLoginInfo(this.form.mobile, this.form.pwd);
156
+          console.log(resp);
157
+
158
+          var user = resp.data.user;
159
+          var org = resp.data.org;
160
+          var subscibe = resp.data.subscibe;
161
+          var config_list = resp.data.config_list;
162
+          var template_info = resp.data.template_info;
163
+          var filed_list = resp.data.filed_list;
164
+          console.log(resp.data.filed_list);
165
+          console.log(filed_list);
166
+
167
+          this.$store.dispatch("InitUserInfo", {
168
+            user: user,
169
+            org: org,
170
+            subscibe: subscibe,
171
+            template_info: template_info,
172
+            filed_list: filed_list
173
+          });
174
+          this.$store.dispatch("SetConfigList", config_list);
175
+
176
+          // this.$router.push({path: "/product"})
177
+          this.$router.push({ path: "/main" });
178
+        } else {
179
+          this.$toast({
180
+            message: resp.msg
181
+          });
182
+        }
183
+      });
184
+      console.log("登陆成功");
185
+    },
186
+    //设置cookie
187
+    setCookie(c_name, c_pwd, exdays) {
188
+      var exdate = new Date(); //获取时间
189
+      exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays); //保存的天数
190
+      //字符串拼接cookie
191
+      window.document.cookie =
192
+        "userName" + "=" + c_name + ";path=/;expires=" + exdate.toGMTString();
193
+      window.document.cookie =
194
+        "userPwd" + "=" + c_pwd + ";path=/;expires=" + exdate.toGMTString();
195
+    },
196
+    getCookie: function() {
197
+      this.$nextTick(() => {
198
+        if (this.form.pwd != "") {
199
+          this.checked = true;
200
+        }
201
+      });
202
+      if (document.cookie.length > 0) {
203
+        var arr = document.cookie.split("; "); //这里显示的格式需要切割一下自己可输出看下
204
+        for (var i = 0; i < arr.length; i++) {
205
+          var arr2 = arr[i].split("="); //再次切割
206
+          //判断查找相对应的值
207
+          if (arr2[0] == "userName") {
208
+            this.form.mobile = arr2[1]; //保存到保存数据的地方
209
+          } else if (arr2[0] == "userPwd") {
210
+            this.form.pwd = arr2[1];
211
+          }
212
+        }
213
+      }
214
+    },
215
+    //清除cookie
216
+    clearCookie: function() {
217
+      this.setCookie("", "", -1); //修改2值都为空,天数为负1天就好了
218
+    },
219
+    agree() {
220
+      this.$router.push({ path: "/privacy" });
221
+    },
222
+    agree1() {
223
+      this.$router.push({ path: "/userAgreement" });
224
+    }
225
+  }
226
+};
227
+</script>
228
+
229
+<style rel="stylesheet/scss" lang="scss" scoped>
230
+.container {
231
+  // background: $white-bg;
232
+  background: #fff;
233
+  @include box-sizing;
234
+  position: fixed;
235
+  width: 100%;
236
+  height: 100%;
237
+  display: flex;
238
+  justify-content: space-between;
239
+
240
+  .newLogin {
241
+    width: 100%;
242
+    height: 100%;
243
+    margin: auto;
244
+    // box-shadow: 0px 2px 25px 0px rgba(37, 143, 252, 0.1);
245
+    background: #fff;
246
+  }
247
+  .login {
248
+    // @include box-shadow;
249
+    @include text-align;
250
+    @include display-flex;
251
+    @include align-items-center;
252
+    // @include justify-content-center;
253
+    @include flex-direction;
254
+    height: 100%;
255
+    overflow-y: auto;
256
+    .logo {
257
+      // padding: 3rem 0 2.5rem;
258
+      padding: 0 0 0.5rem;
259
+      img {
260
+        width: 44%;
261
+        height: auto;
262
+        display: inline-block;
263
+      }
264
+    }
265
+    .reg {
266
+      width: 9.3rem;
267
+      .welcome {
268
+        text-align: left;
269
+        font-size: 0.55rem;
270
+        font-weight: 400;
271
+        color: rgba(37, 143, 252, 1);
272
+        margin-bottom: 0.5rem;
273
+        // line-height: 14px;
274
+      }
275
+      .newForget {
276
+        text-align: right;
277
+        font-size: 0.45rem;
278
+        font-weight: 400;
279
+        color: rgba(37, 143, 252, 1);
280
+        margin-top: 0.3rem;
281
+      }
282
+      .form {
283
+        border: 1px $border-color solid;
284
+        border-radius: 4px;
285
+        li {
286
+          border-bottom: 1px $border-color solid;
287
+          @include align-items-center;
288
+          @include text-align;
289
+          @include display-flex;
290
+          @include box-sizing;
291
+          .tel {
292
+            padding: 0.4rem 0;
293
+            width: 90%;
294
+            border: none;
295
+            outline: none;
296
+            font-size: 0.6rem;
297
+          }
298
+          .mint-cell {
299
+            width: 100%;
300
+          }
301
+          &:last-child {
302
+            border: none;
303
+          }
304
+          .iconfont {
305
+            color: $main-color;
306
+            font-size: 0.6rem;
307
+            margin: 0 0.46rem;
308
+          }
309
+        }
310
+      }
311
+      .forget {
312
+        text-align: left;
313
+        padding: 0.45rem 1rem;
314
+        a {
315
+          float: left;
316
+          font-size: 0.28rem;
317
+          color: $main-color;
318
+          &:nth-child(2) {
319
+            color: #999999;
320
+            float: right;
321
+          }
322
+          &:active {
323
+            background: $white-bg;
324
+          }
325
+        }
326
+      }
327
+      .loginBtn {
328
+        width: 100%;
329
+        height: 1.4rem;
330
+        line-height: 1.4rem;
331
+        background: $main-color;
332
+        color: #fff;
333
+        font-size: 0.6rem;
334
+        @include text-align;
335
+        border-radius: 4px;
336
+        margin: 1rem 0 0 0;
337
+      }
338
+      .disableLoginBtn {
339
+        background: lightgray;
340
+      }
341
+    }
342
+  }
343
+  .remember {
344
+    float: left;
345
+  }
346
+  .agreeText {
347
+    color: #409eff;
348
+    font-size: 14px;
349
+  }
350
+}
351
+</style>
352
+
353
+<style lang="scss">
354
+.remember {
355
+  .el-checkbox__inner {
356
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
357
+      width: 20px;
358
+      height: 20px;
359
+    }
360
+    @media only screen and (min-width: 768px) {
361
+      width: 20px;
362
+      height: 20px;
363
+    }
364
+  }
365
+  .el-checkbox__inner::after {
366
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
367
+      left: 7px;
368
+      height: 12px;
369
+      width: 4px;
370
+    }
371
+
372
+    @media only screen and (min-width: 768px) {
373
+      left: 7px;
374
+      height: 12px;
375
+      width: 4px;
376
+    }
377
+  }
378
+  .el-checkbox__label {
379
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
380
+      font-size: 0.45rem;
381
+    }
382
+    @media only screen and (min-width: 768px) {
383
+      font-size: 0.45rem;
384
+    }
385
+  }
386
+}
387
+.agree {
388
+  .el-checkbox__inner {
389
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
390
+      width: 20px;
391
+      height: 20px;
392
+    }
393
+    @media only screen and (min-width: 768px) {
394
+      width: 20px;
395
+      height: 20px;
396
+    }
397
+  }
398
+  .el-checkbox__inner::after {
399
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
400
+      left: 7px;
401
+      height: 12px;
402
+      width: 4px;
403
+    }
404
+
405
+    @media only screen and (min-width: 768px) {
406
+      left: 7px;
407
+      height: 12px;
408
+      width: 4px;
409
+    }
410
+  }
411
+  .el-checkbox__label {
412
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
413
+      font-size: 0.45rem;
414
+    }
415
+    @media only screen and (min-width: 768px) {
416
+      font-size: 0.45rem;
417
+    }
418
+  }
419
+  .agreeText {
420
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
421
+      font-size: 0.45rem;
422
+    }
423
+    @media only screen and (min-width: 768px) {
424
+      font-size: 0.45rem;
425
+    }
426
+  }
427
+}
428
+</style>

+ 27 - 0
src/pages/layout/ContentArea.vue View File

@@ -0,0 +1,27 @@
1
+<template>
2
+  <div class="mainContent">
3
+    <!-- <record-page></record-page> -->
4
+    <router-view :key="key"></router-view>
5
+  </div>
6
+</template>
7
+
8
+<script>
9
+import RecordPage from "./RecordPage";
10
+export default {
11
+  name: "ContentArea",
12
+  components: {
13
+    RecordPage
14
+  },
15
+  computed: {
16
+    key() {
17
+      return this.$route.fullPath;
18
+    }
19
+  }
20
+};
21
+</script>
22
+
23
+<style style="stylesheet/scss" lang="scss" scoped>
24
+.mainContent {
25
+  margin: 0 0 0 1.58rem;
26
+}
27
+</style>

+ 123 - 0
src/pages/layout/RecordPage.vue View File

@@ -0,0 +1,123 @@
1
+<template>
2
+  <div class="record">
3
+    <div class="top">
4
+      <popover placement="bottom">
5
+        <div slot="content" class="popover-demo-content">
6
+          <ul>
7
+            <li>医院医院医院</li>
8
+            <li>医院医院医院 <span class="iconfont">&#xe721;</span></li>
9
+          </ul>
10
+        </div>
11
+        <div class="hospital">
12
+          <span class="title"> 深圳市人民医院血液透析中心</span
13
+          ><span class="iconfont">&#xe74a;</span>
14
+        </div>
15
+      </popover>
16
+
17
+      <div class="department">
18
+        <ul>
19
+          <li
20
+            v-for="(item, i) in ['候诊室', '透析区']"
21
+            :key="i"
22
+            :class="index == i ? 'active' : ''"
23
+            @click="ClickTab(i)"
24
+          >
25
+            {{ item }}
26
+          </li>
27
+        </ul>
28
+      </div>
29
+      <div class="search">
30
+        <span class="iconfont">&#xe64d;</span>
31
+        <input type="text" class="searchInput" placeholder="透析号/姓名" />
32
+      </div>
33
+    </div>
34
+    <div class="area">
35
+      <waiting-area v-show="index == 0" title="候诊区"></waiting-area>
36
+      <dialysis-area v-show="index == 1" title="透析区"></dialysis-area>
37
+    </div>
38
+  </div>
39
+</template>
40
+
41
+<script>
42
+import DialysisArea from "@/pages/main/DialysisArea";
43
+import WaitingArea from "@/pages/main/WaitingArea";
44
+import { Popover } from "vux";
45
+export default {
46
+  name: "RecordPage",
47
+  data() {
48
+    return {
49
+      index: 0
50
+    };
51
+  },
52
+  components: {
53
+    DialysisArea,
54
+    WaitingArea,
55
+    Popover
56
+    // Group,
57
+    // Cell
58
+  },
59
+  methods: {
60
+    ClickTab: function(tabIndex) {
61
+      this.index = tabIndex;
62
+    }
63
+  }
64
+};
65
+</script>
66
+
67
+<style style="stylesheet/scss" lang="scss" scoped>
68
+.record {
69
+  .top {
70
+    padding: 0.28rem 0.3rem;
71
+    @include display-flex;
72
+    @include align-items-center;
73
+    @include text-align;
74
+    @include justify-content-between;
75
+    font-size: 0.3rem;
76
+    border-bottom: 1px #e5e5e5 solid;
77
+    .title {
78
+      font-size: 0.3rem;
79
+      font-weight: bold;
80
+      color: $pgh-color;
81
+    }
82
+    .iconfont {
83
+      font-size: 0.24rem;
84
+      color: #a8b3ba;
85
+    }
86
+  }
87
+  .department {
88
+    ul {
89
+      li {
90
+        float: left;
91
+        font-size: 0.28rem;
92
+        margin: 0 0.2rem;
93
+        height: 0.48rem;
94
+        line-height: 0.48rem;
95
+        width: 1.4rem;
96
+        &.active {
97
+          background: $main-color;
98
+          color: #fff;
99
+          border-radius: 30px;
100
+        }
101
+      }
102
+    }
103
+  }
104
+  .search {
105
+    background: #ebf1f7;
106
+    border-radius: 30px;
107
+    padding: 0 0.3rem;
108
+    height: 0.6rem;
109
+    line-height: 0.6rem;
110
+    color: #a8b3ba;
111
+
112
+    .iconfont {
113
+      color: #a8b3ba;
114
+    }
115
+    .searchInput {
116
+      font-size: 0.28rem;
117
+      border: none;
118
+      outline: none;
119
+      background: #ebf1f7;
120
+    }
121
+  }
122
+}
123
+</style>

+ 172 - 0
src/pages/layout/SideBar.vue View File

@@ -0,0 +1,172 @@
1
+<template>
2
+  <div class="sideColumn">
3
+    <div class="column">
4
+      <!-- <div class="head"><img :src="$store.getters.user.org.org_logo" alt=""></div> -->
5
+      <ul class="sidebar">
6
+        <li style="position: relative;" :class="active_index == 0 ? 'active' : ''">
7
+          <router-link to="/main">
8
+            <span class="iconfont">&#xe6e6;</span>
9
+            <p>记录</p>
10
+          </router-link>
11
+          <span
12
+            class="redpoint"
13
+            v-if="total_read_dot"
14
+          >{{ total_read_dot > 99 ? total_read_dot + "+" : total_read_dot }}</span>
15
+        </li>
16
+        <li :class="active_index == 1 ? 'active' : ''">
17
+          <router-link to="/monitoring">
18
+            <span class="iconfont">&#xe6f5;</span>
19
+            <p>监控</p>
20
+          </router-link>
21
+        </li>
22
+        <li :class="active_index == 2 ? 'active' : ''">
23
+          <router-link to="/advice">
24
+            <span class="iconfont">&#xe6f4;</span>
25
+            <p>医嘱</p>
26
+          </router-link>
27
+        </li>
28
+        <li :class="active_index == 3 ? 'active' : ''">
29
+          <router-link to="/my">
30
+            <span class="iconfont">&#xe715;</span>
31
+            <p>我的</p>
32
+          </router-link>
33
+        </li>
34
+      </ul>
35
+    </div>
36
+  </div>
37
+</template>
38
+
39
+<script>
40
+export default {
41
+  name: "SideBar",
42
+  props: {
43
+    active_index: {
44
+      type: Number,
45
+      default: 0
46
+    },
47
+    total_read_dot: {
48
+      type: Number,
49
+      default: 0
50
+    }
51
+  }
52
+};
53
+</script>
54
+
55
+<style style="stylesheet/scss" lang="scss" scoped>
56
+.redpoint {
57
+  display: inline-block;
58
+  height: 26px;
59
+  width: 26px;
60
+  line-height: 26px;
61
+  text-align: center;
62
+  font-size: 0.34rem;
63
+  border-radius: 20px;
64
+  color: #fff;
65
+  background: #f56c6c;
66
+  position: absolute;
67
+  top: 3px;
68
+  right: -16px;
69
+  @media only screen and (max-width: 415px) {
70
+    height: 16px;
71
+    width: 16px;
72
+    line-height: 16px;
73
+    top: 1px;
74
+    right: -8px;
75
+  }
76
+  @media only screen and (min-width: 415px) and (max-width: 767px) {
77
+    height: 20px;
78
+    width: 20px;
79
+    line-height: 21px;
80
+    font-size: 0.36rem;
81
+  }
82
+}
83
+.sideColumn {
84
+  // float: left;
85
+  // width: 1.58rem;
86
+  background: #f5f8fb;
87
+  // height: 100%;
88
+  // border-right: 1px solid rgba(193, 193, 193, 0.8);
89
+  border-top: 1px solid rgba(193, 193, 193, 0.8);
90
+  // position: fixed;
91
+  height: 50px;
92
+  z-index: 999;
93
+  @media only screen and (min-width: 768px) {
94
+    height: 70px;
95
+  }
96
+  .column {
97
+    .head {
98
+      @include display-flex;
99
+      @include align-items-center;
100
+      @include text-align;
101
+      @include justify-content-center;
102
+      margin: 0.5rem auto 0.7rem auto;
103
+      width: 1rem;
104
+      height: 1rem;
105
+      overflow: hidden;
106
+      border-radius: 50%;
107
+      img {
108
+        width: 100%;
109
+        height: auto;
110
+        display: block;
111
+      }
112
+    }
113
+    .sidebar {
114
+      @include display-flex;
115
+      @include align-items-center;
116
+      // @include flex-direction;
117
+      @include text-align;
118
+      flex-direction: row;
119
+      justify-content: space-around;
120
+      height: 50px;
121
+      padding: 0;
122
+      @media only screen and (min-width: 768px) {
123
+        height: 70px;
124
+      }
125
+      li {
126
+        height: 100%;
127
+        display: flex;
128
+        align-items: center;
129
+        // padding: 0 0 0.8rem 0;
130
+        a {
131
+          color: #a8b3ba;
132
+          display: inline-block;
133
+          padding: 0;
134
+          margin: 0;
135
+          @media only screen and (min-width: 768px) {
136
+            display: flex;
137
+            align-items: center;
138
+            // margin-bottom: 20px;
139
+          }
140
+          @media only screen and (min-width: 416px) {
141
+            display: flex;
142
+            align-items: center;
143
+            // margin-bottom: 20px;
144
+          }
145
+          p {
146
+            font-size: 0.32rem;
147
+            // margin-top: 0.05rem;
148
+            @media only screen and (max-width: 812px) {
149
+              font-size: 0.45rem;
150
+            }
151
+          }
152
+          .iconfont {
153
+            font-size: 0.52rem;
154
+            @media only screen and (max-width: 768px) {
155
+              font-size: 0.8rem;
156
+            }
157
+            display: inline-block;
158
+          }
159
+        }
160
+        &.active {
161
+          a {
162
+            color: $main-color;
163
+            .iconfont {
164
+              color: $main-color;
165
+            }
166
+          }
167
+        }
168
+      }
169
+    }
170
+  }
171
+}
172
+</style>

+ 29 - 0
src/pages/layout/layout.vue View File

@@ -0,0 +1,29 @@
1
+<template>
2
+  <div class="mainBox">
3
+    <side-bar></side-bar>
4
+    <content-area></content-area>
5
+  </div>
6
+</template>
7
+
8
+<script>
9
+import SideBar from "./Sidebar";
10
+import ContentArea from "./ContentArea";
11
+export default {
12
+  name: "layout",
13
+  components: {
14
+    SideBar,
15
+    ContentArea
16
+  }
17
+};
18
+</script>
19
+
20
+<style style="stylesheet/scss" lang="scss" scoped>
21
+html,
22
+body {
23
+  height: 100%;
24
+}
25
+.mainBox {
26
+  height: 100%;
27
+  font-size: 0.3rem;
28
+}
29
+</style>

+ 259 - 0
src/pages/main/DetailsPage.vue View File

@@ -0,0 +1,259 @@
1
+<template>
2
+  <div class="mainBox">
3
+    <div class="mainContent">
4
+      <div class="navigation">
5
+        <div class="goBack newGoBack">
6
+          <span class="back" @click="backAction()">
7
+            <span class="iconfont">&#xe720;</span>返回
8
+          </span>
9
+          <el-popover placement="bottom" trigger="click" :disabled="true">
10
+            <li slot="reference" class="name">{{ patient_name }}</li>
11
+          </el-popover>
12
+        </div>
13
+        <div class="nav newNav1">
14
+          <ul>
15
+            <li
16
+              v-for="(item, i) in ['病历', '透析', '今日']"
17
+              :key="i"
18
+              :class="index == i ? 'active' : ''"
19
+              @click="ClickTab(i)"
20
+            >{{ item }}</li>
21
+          </ul>
22
+        </div>
23
+
24
+        <!-- <div @click="openPicker()" class="time">
25
+                  {{pickerVisible}}<span class="iconfont">&#xe74a;</span>
26
+        </div>-->
27
+        <!-- <div class="time" style="width:1.49rem;">
28
+                  <span class="iconfont">2018-01-01&#xe74a;</span>
29
+        </div>-->
30
+        <div class="print" style="float: right; display:none">
31
+          <el-button size="mini" type="primary" @click="print" icon="el-icon-printer">打印</el-button>
32
+        </div>
33
+      </div>
34
+
35
+      <div class="Tab">
36
+        <CaseHistory v-show="index == 0" title="病历"></CaseHistory>
37
+        <!--<check-tab v-show="index==1" title="化验单"></check-tab>-->
38
+        <dialysis-tab v-show="index == 1" title="透析" v-on:records="jump(val)"></dialysis-tab>
39
+        <today-tab ref="today" v-show="index == 2" title="今日"></today-tab>
40
+      </div>
41
+    </div>
42
+    <div class="add" @click="print">
43
+      <p>打印预览</p>
44
+    </div>
45
+    <side-bar :active_index="0"></side-bar>
46
+    <!-- <mt-datetime-picker
47
+            v-model="pickerVisible"
48
+            type="date"
49
+            ref="picker"
50
+            year-format="{value} "
51
+            month-format="{value} "
52
+            date-format="{value} ">
53
+    </mt-datetime-picker>-->
54
+  </div>
55
+</template>
56
+
57
+<script>
58
+import SideBar from "@/pages/layout/SideBar";
59
+import TodayTab from "./today/TodayTab";
60
+import DialysisTab from "./dialysis/DialysisTab";
61
+import RecordsTab from "./records/RecordsTab";
62
+import { Popover } from "vux";
63
+import CheckTab from "./dialysis/CheckTab";
64
+import { parseTime } from "@/utils";
65
+import { GetPatientInfoWithDiseases } from "@/api/patient";
66
+import { Toast } from "vant";
67
+import CaseHistory from "./records/CaseHistory";
68
+
69
+export default {
70
+  name: "DetailsPage",
71
+  components: {
72
+    CaseHistory,
73
+    CheckTab,
74
+    SideBar,
75
+    TodayTab,
76
+    DialysisTab,
77
+    RecordsTab,
78
+    Popover
79
+  },
80
+  data() {
81
+    return {
82
+      // pickerVisible: new Date(),
83
+      patient_id: 0,
84
+      patient_name: "",
85
+      date: 0,
86
+      index: 2,
87
+      patient: null
88
+    };
89
+  },
90
+  created() {
91
+    var patient_id = this.$route.query.patient_id;
92
+    var date = this.$route.query.date;
93
+    var patient_name = this.$route.query.patient_name;
94
+    this.patient_id = patient_id;
95
+    this.date = date;
96
+    this.patient_name = patient_name;
97
+    this.GetPatientInfoWithDiseases(this.patient_id);
98
+  },
99
+  methods: {
100
+    ClickTab: function(tabIndex) {
101
+      this.index = tabIndex;
102
+    },
103
+    backAction() {
104
+      this.$router.back(-1);
105
+    },
106
+    openPicker() {
107
+      this.$refs.picker.open();
108
+    },
109
+    print: function() {
110
+      var xtdate = parseTime(this.date, "{y}-{m}-{d}");
111
+      if (this.patient != null) {
112
+        this.$router.push(
113
+          "/Print?xtdate=" + xtdate + "&xtno=" + this.patient.dialysis_no
114
+        );
115
+      }
116
+    },
117
+    GetPatientInfoWithDiseases(id) {
118
+      GetPatientInfoWithDiseases(id)
119
+        .then(response => {
120
+          if (response.data.state == 1) {
121
+            this.patient = response.data.data.patient;
122
+          } else {
123
+            Toast.fail("网络异常");
124
+            return false;
125
+          }
126
+        })
127
+        .catch(() => {
128
+          // on cancel
129
+          Toast.fail("网络异常");
130
+          return false;
131
+        });
132
+    },
133
+    jump: function(val) {
134
+      this.index = 2;
135
+    },
136
+    toMyPatients() {
137
+      var patient_id = this.$route.query.patient_id;
138
+      this.$router.push("/mypatients/" + patient_id);
139
+    }
140
+  }
141
+};
142
+</script>
143
+
144
+<style style="stylesheet/scss" lang="scss" scoped>
145
+.mainBox {
146
+  display: flex;
147
+  flex-direction: column;
148
+  height: 100%;
149
+  overflow-x: hidden;
150
+  > :first-child {
151
+    flex: 1;
152
+    overflow-x: hidden;
153
+  }
154
+}
155
+.mainContent {
156
+  position: relative;
157
+  .navigation {
158
+    // @include display-flex;
159
+    // @include align-items-center;
160
+    // @include text-align;
161
+    // @include box-sizing;
162
+    // @include justify-content-between;
163
+    padding: 0.3rem 0.36rem;
164
+    // border-bottom: 1px #e5e5e5 solid;
165
+    position: fixed;
166
+    top: 0;
167
+    left: 0;
168
+    right: 0;
169
+    z-index: 100;
170
+    background: #258ffc;
171
+    .newGoBack {
172
+      float: left;
173
+    }
174
+    .newNav1 {
175
+      float: left;
176
+    }
177
+    .name {
178
+      color: #fff;
179
+    }
180
+    .nav {
181
+      margin-left: 0.4rem;
182
+      @media only screen and (min-width: 376px) and (max-width: 415px) {
183
+        margin-left: 1rem;
184
+      }
185
+      @media only screen and (min-width: 415px) and (max-width: 767px) {
186
+        margin-left: 1.6rem;
187
+      }
188
+      @media only screen and (min-width: 768px) {
189
+        margin-left: 2rem;
190
+      }
191
+      ul {
192
+        li {
193
+          float: left;
194
+          font-size: 0.45rem;
195
+          margin: 0 0.2rem;
196
+          height: 0.7rem;
197
+          line-height: 0.7rem;
198
+          padding: 0 0.3rem;
199
+          cursor: pointer;
200
+          color: #fff;
201
+          &.active {
202
+            // background: $main-color;
203
+            background: #fff;
204
+            color: #258ffc;
205
+            // color: #fff;
206
+            border-radius: 30px;
207
+          }
208
+        }
209
+      }
210
+    }
211
+    .time {
212
+      cursor: pointer;
213
+      .iconfont {
214
+        margin-left: 0.1rem;
215
+      }
216
+    }
217
+  }
218
+  .Tab {
219
+    padding-top: 63px;
220
+    // padding-bottom: 0.25rem;
221
+    @media only screen and (max-width: 812px) {
222
+      padding-top: 42px !important;
223
+    }
224
+  }
225
+}
226
+.add {
227
+  width: 1.6rem;
228
+  height: 1.6rem;
229
+  background: #f18f68;
230
+  // box-shadow: 0px 3px 9px 0px rgba(7, 30, 102, 0.15);
231
+  border-radius: 50%;
232
+  position: fixed;
233
+  right: 0.6rem;
234
+  bottom: 2.25rem;
235
+  font-size: 0.34rem;
236
+  text-align: center;
237
+  // @media only screen and (max-width: 767px) {
238
+  //   display: none;
239
+  // }
240
+  p {
241
+    width: 26px;
242
+    text-align: center;
243
+    margin: 9px auto 0;
244
+    color: #fff;
245
+    // @media only screen and (min-width: 768px) {
246
+    //   width: 40px !important;
247
+    //   margin: 11px auto 0;
248
+    // }
249
+    @media only screen and (min-width: 768px) {
250
+      width: 50px;
251
+      margin: 17px auto 0;
252
+    }
253
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
254
+      margin: 12px auto 0;
255
+      width: 30px;
256
+    }
257
+  }
258
+}
259
+</style>

+ 614 - 0
src/pages/main/DialysisArea.vue View File

@@ -0,0 +1,614 @@
1
+<template>
2
+  <div>
3
+    <div v-loading="loading">
4
+      <div class="screening">
5
+        <ul>
6
+          <el-popover
7
+            v-model="zone_options_visible"
8
+            placement="bottom"
9
+            trigger="click"
10
+          >
11
+            <li slot="reference">
12
+              {{
13
+                zones.length <= 1 && zone_selected > 0
14
+                  ? "全部分区"
15
+                  : zones[zone_selected].text
16
+              }}
17
+              <span class="iconfont">&#xe74a;</span>
18
+            </li>
19
+
20
+            <div class="popover-demo-content">
21
+              <ul>
22
+                <li
23
+                  v-for="(zone, index) in zones"
24
+                  :key="zone.value"
25
+                  @click="handleZoneChange(index)"
26
+                  :class="zone_selected == index ? 'tick' : ''"
27
+                >
28
+                  {{ zone.text }}
29
+                </li>
30
+              </ul>
31
+            </div>
32
+          </el-popover>
33
+
34
+          <el-popover
35
+            v-model="sch_type_options_visible"
36
+            placement="bottom"
37
+            trigger="click"
38
+          >
39
+            <li slot="reference">
40
+              {{ schedual_types[schedual_type_selected].text }}
41
+              <span class="iconfont">&#xe74a;</span>
42
+            </li>
43
+            <div class="popover-demo-content">
44
+              <ul>
45
+                <li
46
+                  v-for="schedualType in schedual_types"
47
+                  :key="schedualType.value"
48
+                  @click="handletimeType(schedualType.value)"
49
+                  :class="
50
+                    schedual_type_selected == schedualType.value ? 'tick' : ''
51
+                  "
52
+                >
53
+                  {{ schedualType.text }}
54
+                </li>
55
+              </ul>
56
+            </div>
57
+          </el-popover>
58
+
59
+          <li @click="openPicker()">
60
+            {{ selected_date_str }}
61
+            <span class="iconfont">&#xe74a;</span>
62
+          </li>
63
+
64
+          <li @click="mypatient()" :class="newMypatient == 1 ? 'active' : ''">
65
+            我的病人
66
+          </li>
67
+        </ul>
68
+      </div>
69
+
70
+      <div class="stateBox">
71
+        <div v-for="(item, index) in filtedScheduals" :key="index">
72
+          <h2 class="title">{{ item.zone_name }}</h2>
73
+          <patient-box
74
+            class="clearfix"
75
+            :patients="item.scheduals"
76
+          ></patient-box>
77
+        </div>
78
+        <div class="NoData" v-if="filtedScheduals.length == 0 && networkStates">
79
+          <img
80
+            style="margin-top: 50px; margin-bottom: 50px"
81
+            src="@/assets/login/data.jpg"
82
+            alt
83
+          />
84
+        </div>
85
+        <div
86
+          class="NoData"
87
+          v-if="!networkStates"
88
+          style="display: block;text-align: center"
89
+        >
90
+          <p style="margin-top: 100px;font-size: 18px">
91
+            网络异常,请点击重新加载
92
+          </p>
93
+
94
+          <!--<img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/no_network.jpg" alt="">-->
95
+          <van-button
96
+            slot="button"
97
+            size="normal"
98
+            type="info"
99
+            style="display:block;margin:0 auto"
100
+            @click="reloads()"
101
+            >重新加载</van-button
102
+          >
103
+        </div>
104
+      </div>
105
+      <mt-datetime-picker
106
+        v-model="selected_date"
107
+        ref="picker"
108
+        type="date"
109
+        year-format="{value} "
110
+        month-format="{value} "
111
+        date-format="{value} "
112
+        @confirm="handleScheduleDateChange"
113
+      ></mt-datetime-picker>
114
+    </div>
115
+  </div>
116
+</template>
117
+
118
+<script>
119
+import PatientBox from './PatientBox'
120
+import { Popover } from 'vux'
121
+import { Datetime } from 'vux'
122
+import { parseTime } from '@/utils/index'
123
+import { getDialysisScheduals } from '@/api/dialysis'
124
+import { Toast } from 'vant'
125
+import $ from 'jquery'
126
+
127
+export default {
128
+  name: 'DialysisArea',
129
+  components: {
130
+    PatientBox,
131
+    Popover,
132
+    Datetime
133
+  },
134
+  inject: ['reload'],
135
+  data () {
136
+    return {
137
+      loading: false,
138
+      user_id: 0,
139
+      networkStates: true,
140
+      timer: null,
141
+      ismypatient: this.$store.getters.app.dialysis_area.ismypatient,
142
+      selected_date: this.$store.getters.app.dialysis_area.schedule_date, // new Date(),
143
+      schedual_types: [
144
+        { value: 0, text: '全部班', select: true },
145
+        { value: 1, text: '上午', select: false },
146
+        { value: 2, text: '下午', select: false },
147
+        { value: 3, text: '晚上', select: false }
148
+      ],
149
+      schedual_type_selected: this.$store.getters.app.dialysis_area
150
+        .schedule_type_select_index,
151
+
152
+      zone_selected: this.$store.getters.app.dialysis_area.zone_select_index,
153
+      zones: [{ value: 0, text: '全部分区', select: true }],
154
+      dialysis_scheduals: [],
155
+
156
+      zone_options_visible: false,
157
+      sch_type_options_visible: false,
158
+      newMypatient: 0
159
+    }
160
+  },
161
+  props: {
162
+    search_keyword: {
163
+      type: String,
164
+      default: ''
165
+    }
166
+  },
167
+  computed: {
168
+    selected_date_str: function () {
169
+      return parseTime(this.selected_date, '{y}-{m}-{d}')
170
+    },
171
+
172
+    filtedScheduals: function () {
173
+      if (this.dialysis_scheduals.length == 0) {
174
+        return []
175
+      }
176
+
177
+      var search_keyword = this.search_keyword
178
+      if (search_keyword.length > 0) {
179
+        var schedules = []
180
+        for (let o_i = 0; o_i < this.dialysis_scheduals.length; o_i++) {
181
+          const scheduleInfo = this.dialysis_scheduals[o_i]
182
+          var originSchedules = scheduleInfo.scheduals
183
+          if (originSchedules.length == 0) {
184
+            continue
185
+          }
186
+          var filtedSchedules = []
187
+          for (let s_i = 0; s_i < originSchedules.length; s_i++) {
188
+            const schedule = originSchedules[s_i]
189
+            if ( schedule.patient.name.indexOf(search_keyword) != -1  ) {
190
+              filtedSchedules.push(schedule)
191
+              break
192
+            }
193
+          }
194
+          if (filtedSchedules.length > 0) {
195
+            schedules.push({
196
+              zone_name: scheduleInfo.zone_name,
197
+              scheduals: filtedSchedules
198
+            })
199
+          }
200
+        }
201
+        return schedules
202
+      }
203
+      if (this.ismypatient) {
204
+        var zone_selected = this.zone_selected
205
+        var timetype_selected = this.schedual_type_selected
206
+        var zone_name =
207
+          zone_selected == 0 ? '' : this.zones[zone_selected].text
208
+        var schedules = []
209
+        for (let o_i = 0; o_i < this.dialysis_scheduals.length; o_i++) {
210
+          const scheduleInfo = this.dialysis_scheduals[o_i]
211
+          var originSchedules = scheduleInfo.scheduals
212
+          if (originSchedules.length == 0) {
213
+            continue
214
+          }
215
+          var filtedSchedules = []
216
+          for (let s_i = 0; s_i < originSchedules.length; s_i++) {
217
+            const schedule = originSchedules[s_i]
218
+            if (schedule.dialysis_order.start_nurse == this.user_id) {
219
+              if (
220
+                zone_name.length == 0 ||
221
+                (zone_name.length > 0 &&
222
+                  zone_name == schedule.device_number.zone.name)
223
+              ) {
224
+                if (
225
+                  timetype_selected == 0 ||
226
+                  schedule.schedule_type == timetype_selected
227
+                ) {
228
+                  filtedSchedules.push(schedule)
229
+                }
230
+              }
231
+              // break;
232
+            }
233
+          }
234
+          if (filtedSchedules.length > 0) {
235
+            schedules.push({
236
+              zone_name: scheduleInfo.zone_name,
237
+              scheduals: filtedSchedules
238
+            })
239
+          }
240
+        }
241
+        return schedules
242
+      }
243
+
244
+      var zone_selected = this.zone_selected
245
+      var timetype_selected = this.schedual_type_selected
246
+      if (
247
+        (zone_selected == 0 && timetype_selected == 0) ||
248
+        this.zones.length <= 1
249
+      ) {
250
+        return this.dialysis_scheduals
251
+      }
252
+
253
+      var zone_name = zone_selected == 0 ? '' : this.zones[zone_selected].text
254
+      var schedules = []
255
+      for (let o_i = 0; o_i < this.dialysis_scheduals.length; o_i++) {
256
+        const scheduleInfo = this.dialysis_scheduals[o_i]
257
+        var originSchedules = scheduleInfo.scheduals
258
+        var filtedSchedules = []
259
+        for (let s_i = 0; s_i < originSchedules.length; s_i++) {
260
+          const schedule = originSchedules[s_i]
261
+          if (this.ismypatient) {
262
+            if (schedule.dialysis_order.creator == this.user_id) {
263
+              filtedSchedules.push(schedule)
264
+            }
265
+          } else {
266
+            if (
267
+              zone_name.length == 0 ||
268
+              (zone_name.length > 0 &&
269
+                zone_name == schedule.device_number.zone.name)
270
+            ) {
271
+              if (
272
+                timetype_selected == 0 ||
273
+                schedule.schedule_type == timetype_selected
274
+              ) {
275
+                filtedSchedules.push(schedule)
276
+              }
277
+            }
278
+          }
279
+        }
280
+        if (filtedSchedules.length > 0) {
281
+          schedules.push({
282
+            zone_name: scheduleInfo.zone_name,
283
+            scheduals: filtedSchedules
284
+          })
285
+        }
286
+      }
287
+      this.ismypatient = false
288
+      return schedules
289
+    }
290
+  },
291
+
292
+  created () {
293
+    this.user_id = this.$store.getters.user.user.id
294
+
295
+    var storedata = this.$store.getters.scheduals
296
+    var scheduals = storedata.scheduals
297
+    if (Object.keys(storedata).length > 0) {
298
+      var zoneMap = {}
299
+      var schedualMap = {}
300
+      for (let index = 0; index < scheduals.length; index++) {
301
+        const schedual = scheduals[index]
302
+        if (schedual.dialysis_order == null) {
303
+          continue
304
+        }
305
+        if (schedualMap[schedual.device_number.zone.name] == null) {
306
+          schedualMap[schedual.device_number.zone.name] = []
307
+        }
308
+        schedualMap[schedual.device_number.zone.name].push(schedual)
309
+        if (zoneMap[schedual.device_number.zone.name] == null) {
310
+          zoneMap[schedual.device_number.zone.name] =
311
+            schedual.device_number.zone
312
+        }
313
+      }
314
+
315
+      var zones = []
316
+      zones.push({ value: 0, text: '全部分区' })
317
+      for (var zoneName in zoneMap) {
318
+        zones.push({ value: zoneMap[zoneName].id, text: zoneName })
319
+      }
320
+
321
+      zones = zones.sort(function (a, b) {
322
+        return a.value > b.value
323
+      })
324
+      this.zones = zones
325
+
326
+      var dialysis_scheduals = []
327
+      for (let index = 0; index < zones.length; index++) {
328
+        const zone = zones[index]
329
+        var scheduals = schedualMap[zone.text]
330
+        if (scheduals == null) {
331
+          continue
332
+        }
333
+        dialysis_scheduals.push({
334
+          zone_name: zone.text,
335
+          scheduals: scheduals
336
+        })
337
+      }
338
+      this.dialysis_scheduals = dialysis_scheduals
339
+    } else {
340
+      this.requestDialysisScheduals()
341
+    }
342
+  },
343
+  mounted () {
344
+    this.timer = window.setInterval(() => {
345
+      setTimeout(this.requestDialysisScheduals(), 0)
346
+    }, 60000)
347
+  },
348
+  beforeDestroy () {
349
+    clearInterval(this.timer)
350
+    this.timer = null
351
+  },
352
+  methods: {
353
+    clearPatient () {
354
+      this.search_keyword = ''
355
+      this.ismypatient = false
356
+      this.$emit('clear_search_keyword')
357
+      this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
358
+        zone: this.zone_selected,
359
+        schedule_type: this.schedual_type_selected,
360
+        schedule_date: this.selected_date,
361
+        ismypatient: this.ismypatient
362
+      })
363
+    },
364
+    mypatient () {
365
+      this.search_keyword = ''
366
+      this.ismypatient = true
367
+      this.$emit('clear_search_keyword')
368
+      this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
369
+        zone: this.zone_selected,
370
+        schedule_type: this.schedual_type_selected,
371
+        schedule_date: this.selected_date,
372
+        ismypatient: this.ismypatient
373
+      })
374
+      this.newMypatient = 1
375
+    },
376
+    reloads: function () {
377
+      this.reload()
378
+    },
379
+    handletimeType: function (index) {
380
+      if (!this.ismypatient) {
381
+        this.ismypatient = false
382
+      }
383
+      this.sch_type_options_visible = false
384
+      this.schedual_type_selected = index
385
+      this.$emit('clear_search_keyword')
386
+      this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
387
+        zone: this.zone_selected,
388
+        schedule_type: this.schedual_type_selected,
389
+        schedule_date: this.selected_date,
390
+        ismypatient: this.ismypatient
391
+      })
392
+    },
393
+    handleZoneChange: function (index) {
394
+      this.ismypatient = false
395
+      this.zone_options_visible = false
396
+      this.zone_selected = index
397
+      this.$emit('clear_search_keyword')
398
+      this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
399
+        zone: this.zone_selected,
400
+        schedule_type: this.schedual_type_selected,
401
+        schedule_date: this.selected_date,
402
+        ismypatient: this.ismypatient
403
+      })
404
+      this.newMypatient = 0
405
+    },
406
+    handleScheduleDateChange: function (date) {
407
+      if (!this.ismypatient) {
408
+        this.ismypatient = false
409
+      }
410
+      this.zone_selected = 0
411
+      this.schedual_type_selected = 0
412
+      this.$emit('clear_search_keyword')
413
+      this.$store.dispatch('SaveDialysisAreaSelectIndexs', {
414
+        zone: this.zone_selected,
415
+        schedule_type: this.schedual_type_selected,
416
+        schedule_date: this.selected_date,
417
+        ismypatient: this.ismypatient
418
+      })
419
+      this.requestDialysisScheduals()
420
+    },
421
+
422
+    requestDialysisScheduals () {
423
+      // this.$toast.loading({forbidClick: true, duration: 0})
424
+      // this.loading = true;
425
+      var type = 0
426
+      getDialysisScheduals({ type: type, date: this.selected_date_str })
427
+        .then(rs => {
428
+          this.networkStates = true
429
+          var resp = rs.data
430
+          if (resp.state == 1) {
431
+            this.loading = false
432
+
433
+            // console.log(resp.data)
434
+            var scheduals = resp.data.scheduals
435
+            this.$store.dispatch('SetScheduals', { scheduals: scheduals })
436
+            this.$store.dispatch('SetWaitScheduals', { waitscheduals: scheduals })
437
+            this.$emit('refWaitingArea')
438
+            var zoneMap = {}
439
+            var schedualMap = {}
440
+            for (let index = 0; index < scheduals.length; index++) {
441
+              const schedual = scheduals[index]
442
+              if (schedual.dialysis_order == null) {
443
+                continue
444
+              }
445
+              if (schedualMap[schedual.device_number.zone.name] == null) {
446
+                schedualMap[schedual.device_number.zone.name] = []
447
+              }
448
+              schedualMap[schedual.device_number.zone.name].push(schedual)
449
+              if (zoneMap[schedual.device_number.zone.name] == null) {
450
+                zoneMap[schedual.device_number.zone.name] =
451
+                  schedual.device_number.zone
452
+              }
453
+            }
454
+
455
+            var zones = []
456
+            zones.push({ value: 0, text: '全部分区' })
457
+            for (var zoneName in zoneMap) {
458
+              zones.push({ value: zoneMap[zoneName].id, text: zoneName })
459
+            }
460
+
461
+            zones = zones.sort(function (a, b) {
462
+              return a.value > b.value
463
+            })
464
+            this.zones = zones
465
+
466
+            // eslint-disable-next-line camelcase
467
+            var dialysis_scheduals = []
468
+            for (let index = 0; index < zones.length; index++) {
469
+              const zone = zones[index]
470
+              // eslint-disable-next-line no-redeclare
471
+              var scheduals = schedualMap[zone.text]
472
+              if (scheduals == null) {
473
+                continue
474
+              }
475
+              dialysis_scheduals.push({
476
+                zone_name: zone.text,
477
+                scheduals: scheduals
478
+              })
479
+            }
480
+            // eslint-disable-next-line camelcase
481
+            this.dialysis_scheduals = dialysis_scheduals
482
+          } else {
483
+            this.loading = false
484
+
485
+            this.$toast({
486
+              message: resp.msg
487
+            })
488
+          }
489
+        })
490
+        .catch(error => {
491
+          this.loading = false
492
+
493
+          // 超时之后在这里捕抓错误信息.
494
+          if (error.response) {
495
+            this.networkStates = false
496
+
497
+            console.log('error.response')
498
+            console.log(error.response)
499
+          } else if (error.request) {
500
+            this.networkStates = false
501
+
502
+            // if(error.request.readyState == 4 && error.request.status == 0){
503
+            //   //我在这里重新请求
504
+            //   this.networkStates = false
505
+            // }
506
+          } else {
507
+            this.networkStates = false
508
+          }
509
+        })
510
+    },
511
+    openPicker () {
512
+      this.$refs.picker.open()
513
+      this.newMypatient = 0
514
+    }
515
+    // getMyPatient () {
516
+    //   console.log('这是啥', this.zone_options_visible)
517
+    //   console.log('日期', this.selected_date)
518
+    // }
519
+  }
520
+}
521
+</script>
522
+
523
+<style style="stylesheet/scss" lang="scss" scoped>
524
+.screening {
525
+  border-bottom: 1px #e5e5e5 solid;
526
+  position: fixed;
527
+  top: 100px;
528
+  @media only screen and (min-width: 768px) {
529
+    top: 163px;
530
+  }
531
+  @media only screen and (min-width: 415px) and (max-width: 767px) {
532
+    top: 134px;
533
+  }
534
+  // @media only screen and (min-width: 813px) and (max-width: 1024px) {
535
+  //   top: 130px;
536
+  // }
537
+  right: 0;
538
+  z-index: 66;
539
+  left: 0;
540
+  background: #fff;
541
+  // @media only screen and (max-width: 812px) {
542
+  //   top: 50px !important;
543
+  // }
544
+  ul {
545
+    @include display-flex;
546
+    @include align-items-center;
547
+    @include text-align;
548
+    @include justify-content-between;
549
+    width: 90%;
550
+    margin: 0 auto;
551
+    li {
552
+      font-size: 0.45rem;
553
+      padding: 0.3rem 0;
554
+      cursor: pointer;
555
+      .iconfont {
556
+        font-size: 0.45rem;
557
+        color: #a8b3ba;
558
+        margin-left: 0.1rem;
559
+        // @media only screen and (max-width: 768px) {
560
+        //   font-size: 0.45 !important;
561
+        // }
562
+      }
563
+    }
564
+    .active {
565
+      position: relative;
566
+      &::before {
567
+        position: absolute;
568
+        bottom: 0;
569
+        left: 0;
570
+        width: 100%;
571
+        height: 2px;
572
+        background: $main-color;
573
+        // border-bottom: 0.04rem $main-color solid;
574
+        content: "";
575
+      }
576
+    }
577
+  }
578
+}
579
+.stateBox {
580
+  // padding: 0.26rem 0 0 0.6rem;
581
+  // background: #fff;
582
+  .title {
583
+    font-size: 0.34rem;
584
+    font-weight: 600;
585
+    color: $title-color;
586
+    height: 1rem;
587
+    line-height: 0.8rem;
588
+    display: inline-block;
589
+  }
590
+}
591
+
592
+.shadow {
593
+  width: 100%;
594
+  height: 100%;
595
+  position: absolute;
596
+  left: 0;
597
+  top: 0;
598
+  z-index: 998;
599
+  background-color: #000;
600
+  opacity: 0.6;
601
+  display: none;
602
+}
603
+
604
+.picker-toolbar {
605
+  height: 60px;
606
+}
607
+.mint-datetime-action {
608
+  line-height: 60px;
609
+  font-size: 0.45rem;
610
+  @media only screen and (max-width: 768px) {
611
+    line-height: 40px !important;
612
+  }
613
+}
614
+</style>

+ 488 - 0
src/pages/main/PatientBox.vue View File

@@ -0,0 +1,488 @@
1
+<template>
2
+  <div>
3
+    <div
4
+      class="patient"
5
+      :class="borderColor(patient)"
6
+      v-for="(patient, index) in patients"
7
+      :key="index"
8
+      @click="detailAction(patient)"
9
+    >
10
+      <!-- <router-link :to="{path:'/details',  query: {patient_id: patient.patient_id, date: patient.schedule_date}}"> -->
11
+      <div class="kehu">
12
+        <div style="position: relative;flex:2;" class="tx">
13
+          <img
14
+            :src="
15
+              patient.patient.avatar.length > 0
16
+                ? patient.patient.avatar
17
+                : '../../assets/product/test.jpg'
18
+            "
19
+            alt
20
+          />
21
+          <span class="redpoint" v-if="getStatus(patient)">
22
+            {{
23
+            getUnReadNum(patient) > 99
24
+            ? getUnReadNum(patient) + "+"
25
+            : getUnReadNum(patient)
26
+            }}
27
+          </span>
28
+          <div class="right">
29
+            <h3 class="name">
30
+              {{ patient.patient.name }}
31
+              <span class="yztx" v-if="getStatus(patient)">医嘱</span>
32
+              <span class="yc" v-show="isAbnormal(patient)">异常</span>
33
+            </h3>
34
+            <span class="num">{{ genderText(patient) }} | {{ age(patient) }}岁</span>
35
+            <!-- 性别、年龄 -->
36
+          </div>
37
+        </div>
38
+        <div class="online" style="flex:1;" v-show="computeState(patient) != 4">
39
+          <p :class="stateColor(patient)">{{ stateText(patient) }}</p>
40
+          <!-- <span class="time">剩余时间 : 90:08</span>     -->
41
+        </div>
42
+      </div>
43
+      <!-- </router-link> -->
44
+      <div class="function" :class="functionColor(patient)">
45
+        <ul>
46
+          <li>
47
+            <span class="iconfont">&#xe6f7;</span>
48
+            班次 : {{ timeTypeText(patient) }}
49
+          </li>
50
+          <li>
51
+            <span class="iconfont">&#xe6de;</span>
52
+            床位号 :
53
+            {{
54
+            patient.dialysis_order &&
55
+            patient.dialysis_order.device_number &&
56
+            patient.dialysis_order.device_number.number.length > 0
57
+            ? patient.dialysis_order.device_number.number
58
+            : patient.device_number.number
59
+            }}
60
+          </li>
61
+          <li>
62
+            <span class="iconfont">&#xe6f6;</span>
63
+            透析模式 : {{ $store.getters.treatment_mode[patient.mode_id].name }}
64
+          </li>
65
+        </ul>
66
+      </div>
67
+    </div>
68
+  </div>
69
+</template>
70
+
71
+<script>
72
+import { parseTime } from "@/utils";
73
+import { jsGetAge } from "@/utils/tools";
74
+import { setDialysisOrWaitSelectedConfig } from "@/utils/data_config";
75
+export default {
76
+  name: "PatientBox",
77
+  props: {
78
+    patients: Array
79
+  },
80
+  data() {
81
+    return {};
82
+  },
83
+  created() {
84
+    console.log("11111");
85
+    console.log(this.patients);
86
+  },
87
+  methods: {
88
+    getUnReadNum: function(schedual) {
89
+      if (schedual.doctor_advice != null) {
90
+        let doctorAdvice = [];
91
+        for (let i = 0; i < schedual.doctor_advice.length; i++) {
92
+          if (schedual.doctor_advice[i].execution_state == 2) {
93
+            doctorAdvice.push(schedual.doctor_advice[i]);
94
+          }
95
+        }
96
+        const sorted = this.groupBy(doctorAdvice, function(item) {
97
+          return [item.groupno];
98
+        });
99
+        return sorted.length;
100
+      }
101
+    },
102
+    getStatus: function(schedual) {
103
+      var isShowDot = false;
104
+      if (schedual.doctor_advice != null) {
105
+        for (let i = 0; i < schedual.doctor_advice.length; i++) {
106
+          if (schedual.doctor_advice[i].execution_state == 2) {
107
+            isShowDot = true;
108
+          }
109
+        }
110
+        return isShowDot;
111
+      } else {
112
+        return false;
113
+      }
114
+    },
115
+    stateColor: function(schedual) {
116
+      var state = this.computeState(schedual);
117
+      if (state == 1) {
118
+        return "blue";
119
+      } else if (state == 2) {
120
+        return "gray";
121
+      } else if (state == 3) {
122
+        return "red";
123
+      } else if (state == 5) {
124
+        return "green1";
125
+      } else if (state == 6) {
126
+        return "green2";
127
+      } else {
128
+        return "blue";
129
+      }
130
+    },
131
+    functionColor: function(schedual) {
132
+      var state = this.computeState(schedual);
133
+      if (state == 1 || state == 3) {
134
+        return "blue";
135
+      } else if (state == 2) {
136
+        return "gray";
137
+      } else {
138
+        return "blue";
139
+      }
140
+    },
141
+    borderColor: function(schedual) {
142
+      var yc = this.isAbnormal(schedual);
143
+      if (yc == true) {
144
+        return "red";
145
+      } else {
146
+        return "gray";
147
+      }
148
+    },
149
+    stateText: function(schedual) {
150
+      var state = this.computeState(schedual);
151
+      if (state == 1) {
152
+        return "已上机";
153
+      } else if (state == 2) {
154
+        return "已下机";
155
+      } else if (state == 3) {
156
+        return "监测中";
157
+      } else if (state == 5) {
158
+        return "待称重";
159
+      } else if (state == 6) {
160
+        return "待开处方";
161
+      } else {
162
+        // return schedual.patient.gender == 1 ? "男" : "女"
163
+        return "未上机";
164
+      }
165
+    },
166
+    computeState: function(schedual) {
167
+      if (
168
+        schedual.assessment_before_dislysis == null ||
169
+        schedual.assessment_before_dislysis.weight_before == 0
170
+      ) {
171
+        // 未签到称重
172
+        return 5;
173
+      }
174
+      if (schedual.prescription == null || schedual.prescription.creater == 0) {
175
+        // 未确认处方
176
+        return 6;
177
+      }
178
+
179
+      if (schedual.dialysis_order == null) {
180
+        // 未上机
181
+        return 4;
182
+      } else if (schedual.dialysis_order.stage == 2) {
183
+        // 已下机
184
+        return 2;
185
+      } else if (
186
+        schedual.dialysis_order.stage == 1 &&
187
+        schedual.monitoring_records != null &&
188
+        schedual.monitoring_records.length > 1
189
+      ) {
190
+        // 监测中
191
+        return 3;
192
+      } else {
193
+        return 1;
194
+      }
195
+    },
196
+
197
+    orderState: function(schedual) {
198
+      if (schedual.dialysis_order == null) {
199
+        // 未上机
200
+        return 4;
201
+      } else if (schedual.dialysis_order.stage == 2) {
202
+        // 已下机
203
+        return 2;
204
+      } else if (
205
+        schedual.dialysis_order.stage == 1 &&
206
+        schedual.monitoring_records != null &&
207
+        schedual.monitoring_records.length > 1
208
+      ) {
209
+        // 监测中
210
+        return 3;
211
+      } else {
212
+        return 1;
213
+      }
214
+    },
215
+    isAbnormal: function(schedual) {
216
+      return false; // schedual.yc;
217
+    },
218
+    timeTypeText: function(schedual) {
219
+      if (schedual.schedule_type == 1) {
220
+        return "上午";
221
+      } else if (schedual.schedule_type == 2) {
222
+        return "下午";
223
+      } else {
224
+        return "晚上";
225
+      }
226
+    },
227
+    genderText: function(schedual) {
228
+      if (schedual.patient.gender == 0) {
229
+        return "未知";
230
+      } else if (schedual.patient.gender == 1) {
231
+        return "男";
232
+      } else {
233
+        return "女";
234
+      }
235
+    },
236
+    age: function(schedual) {
237
+      if (schedual.patient.birthday != 0) {
238
+        return jsGetAge(
239
+          parseTime(schedual.patient.birthday, "{y}-{m}-{d}"),
240
+          "-"
241
+        );
242
+      } else {
243
+        return ''
244
+      }
245
+
246
+      // var now = new Date();
247
+      // var nowYear = parseTime(now, "{y}");
248
+      // var birthdayYear = parseTime(schedual.patient.birthday, "{y}");
249
+      // // console.log(nowYear)
250
+      // // console.log(birthdayYear)
251
+      // return nowYear - birthdayYear;
252
+    },
253
+    groupBy(array, f) {
254
+      const groups = {};
255
+      array.forEach(function(o) {
256
+        const group = JSON.stringify(f(o));
257
+        groups[group] = groups[group] || [];
258
+        groups[group].push(o);
259
+      });
260
+      return Object.keys(groups).map(function(group) {
261
+        return groups[group];
262
+      });
263
+    },
264
+    detailAction: function(schedual) {
265
+      if (schedual.dialysis_order != null) {
266
+        setDialysisOrWaitSelectedConfig(1);
267
+      } else {
268
+        setDialysisOrWaitSelectedConfig(0);
269
+      }
270
+
271
+      var patient_id = schedual.patient_id;
272
+      var date = schedual.schedule_date;
273
+      this.$router.push({
274
+        path: "/details",
275
+        query: {
276
+          patient_id: patient_id,
277
+          date: date,
278
+          patient_name: schedual.patient.name
279
+        }
280
+      });
281
+    }
282
+  }
283
+};
284
+</script>
285
+
286
+<style style="stylesheet/scss" lang="scss" scoped>
287
+.patient {
288
+  border: 1px #e5e5ee solid;
289
+  padding: 0.33rem 0;
290
+  width: 47%;
291
+  margin: 0 3% 0.5rem 0;
292
+  float: left;
293
+  border-radius: 5px;
294
+  @media only screen and (max-width: 415px) {
295
+    width: 96% !important;
296
+  }
297
+  @media only screen and (min-width: 415px) and (max-width: 767px) {
298
+    width: 48%;
299
+    margin: 0 1% 0.5rem 0;
300
+  }
301
+  .function {
302
+    padding: 0.3rem 0.32rem 0 0.32rem;
303
+    color: #7b8a97;
304
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
305
+      margin: 0;
306
+      padding: 0.3rem 0.1rem 0 0.1rem;
307
+    }
308
+    ul {
309
+      @include display-flex;
310
+      @include align-items-center;
311
+      @include text-align;
312
+      @include justify-content-between;
313
+      li {
314
+        font-size: 0.3rem;
315
+        @include display-flex;
316
+        @include align-items-center;
317
+        @media only screen and (max-width: 415px) {
318
+          font-size: 0.36rem;
319
+        }
320
+        .iconfont {
321
+          margin: 0 0.1rem 0 0;
322
+          font-size: 0.4rem;
323
+          display: none;
324
+        }
325
+      }
326
+    }
327
+  }
328
+  .blue {
329
+    color: $main-color;
330
+    .iconfont {
331
+      color: $main-color;
332
+    }
333
+  }
334
+  .kehu {
335
+    @include display-flex;
336
+    @include align-items-center;
337
+    @include text-align;
338
+    @include justify-content-between;
339
+    border-bottom: 1px #e5e5e5 solid;
340
+    padding: 0 0 0.3rem 0.32rem;
341
+    @media only screen and (min-width: 415px) and (max-width: 767px) {
342
+      padding: 0 0 0.3rem 0.1rem;
343
+    }
344
+    .tx {
345
+      @include display-flex;
346
+      @include align-items-center;
347
+      img {
348
+        width: 1rem;
349
+        height: 1rem;
350
+        border-radius: 50%;
351
+        float: left;
352
+        margin: 0 0.2rem 0 0;
353
+      }
354
+      .right {
355
+        float: left;
356
+        text-align: left;
357
+        .name {
358
+          font-size: 0.34rem;
359
+          color: $title-color;
360
+          font-weight: 600;
361
+          margin-bottom: 0.1rem;
362
+          @media only screen and (max-width: 415px) {
363
+            font-size: 0.45rem;
364
+          }
365
+          @media only screen and (min-width: 416px) and (max-width: 767px) {
366
+            font-size: 0.4rem;
367
+          }
368
+          .yc {
369
+            background: #ff7979;
370
+            color: #fff;
371
+            height: 0.38rem;
372
+            line-height: 0.38rem;
373
+            font-size: 0.24rem;
374
+            width: 0.74rem;
375
+            border-radius: 4px;
376
+            display: inline-block;
377
+            text-align: center;
378
+            margin-left: 0.13rem;
379
+          }
380
+        }
381
+        .num {
382
+          font-size: 0.3rem;
383
+          @media only screen and (max-width: 415px) {
384
+            font-size: 0.36rem;
385
+          }
386
+        }
387
+      }
388
+    }
389
+
390
+    .online {
391
+      text-align: center;
392
+      width: 50%;
393
+      border-left: 1px #e5e5e5 solid;
394
+      p {
395
+        background: #c6cdd2;
396
+        color: #fff;
397
+        width: 1.45rem;
398
+        height: 0.8rem;
399
+        line-height: 0.8rem;
400
+        border-radius: 4px;
401
+        margin: 0 auto;
402
+        font-size: 0.32rem;
403
+        @media only screen and (max-width: 767px) {
404
+          font-size: 0.36rem;
405
+          width: 1.7rem;
406
+        }
407
+        @media only screen and (min-width: 415px) and (max-width: 767px) {
408
+          width: 1.3rem;
409
+          font-size: 0.36rem;
410
+        }
411
+      }
412
+      .blue {
413
+        background: $main-color;
414
+      }
415
+      .red {
416
+        background: #f18f68;
417
+      }
418
+      .green {
419
+        background: #5bd18b;
420
+      }
421
+      .green1 {
422
+        background: #258ffc;
423
+      }
424
+      .green2 {
425
+        background: #e6a23c;
426
+      }
427
+      .gray {
428
+        background: #a8b3ba;
429
+      }
430
+      .lightGray {
431
+        background: #c6cdd2;
432
+      }
433
+      .time {
434
+        font-size: 0.26rem;
435
+        color: #34495e;
436
+      }
437
+    }
438
+  }
439
+}
440
+.red {
441
+  border: 1px #ff7979 solid;
442
+}
443
+.redpoint {
444
+  display: inline-block;
445
+  height: 26px;
446
+  width: 26px;
447
+  line-height: 23px;
448
+  text-align: center;
449
+  font-size: 0.8em;
450
+  border-radius: 20px;
451
+  color: #fff;
452
+  background: #f56c6c;
453
+  position: absolute;
454
+  top: -6px;
455
+  left: 0.6rem;
456
+  border: 1px solid #fff;
457
+  @media only screen and (max-width: 415px) {
458
+    height: 16px;
459
+    width: 16px;
460
+    line-height: 15px;
461
+    top: -6px;
462
+    left: 0.6rem;
463
+  }
464
+  @media only screen and (min-width: 415px) and (max-width: 767px) {
465
+    height: 20px;
466
+    width: 20px;
467
+    line-height: 19px;
468
+    top: -6px;
469
+    left: 0.6rem;
470
+    font-size: 0.36rem;
471
+  }
472
+}
473
+.yztx {
474
+  margin: 0 5px;
475
+  padding: 3px 10px;
476
+  background-color: #f56c6c;
477
+  color: #fff;
478
+  border-radius: 3px;
479
+  font-size: 0.32rem;
480
+  @media only screen and (max-width: 415px) {
481
+    font-size: 0.34rem !important;
482
+  }
483
+  @media only screen and (min-width: 415px) and (max-width: 767px) {
484
+    margin: 0;
485
+    padding: 3px 3px;
486
+  }
487
+}
488
+</style>

File diff suppressed because it is too large
+ 2463 - 0
src/pages/main/Print.vue


+ 586 - 0
src/pages/main/PrintIndex.vue View File

@@ -0,0 +1,586 @@
1
+<template>
2
+  <div
3
+    class="mainBox"
4
+    v-loading="loading"
5
+    element-loading-text="加载中"
6
+    element-loading-spinner="el-icon-loading"
7
+    element-loading-background="rgba(0, 0, 0, 0.8)"
8
+    style="width: 100%;height: 100%"
9
+  >
10
+    <div class="mainContent">
11
+      <div class="navigation" v-if="isShow == true">
12
+        <div class="goBack">
13
+          <span class="back" @click="backAction()">
14
+            <span class="iconfont">&#xe720;</span>返回
15
+          </span>
16
+        </div>
17
+        <!--<div class="print" style="float: right">-->
18
+        <!--&lt;!&ndash;<el-button size="mini" type="primary" icon="el-icon-printer" @click="printThisPage">打印</el-button>&ndash;&gt;-->
19
+        <!--</div>-->
20
+      </div>
21
+      <DialysisPrintOrderOne
22
+        style="margin-top:60px;"
23
+        v-bind:childResponse="childResponse"
24
+        v-if="org_template_info.template_id == 1"
25
+      ></DialysisPrintOrderOne>
26
+      <DialysisPrintOrderTwo
27
+        style="margin-top:60px;"
28
+        v-bind:childResponse="childResponse"
29
+        v-if="
30
+          org_template_info.template_id == 2 ||
31
+            org_template_info.template_id == 0
32
+        "
33
+      ></DialysisPrintOrderTwo>
34
+      <DialysisPrintOrderFive
35
+        style="margin-top:60px;"
36
+        v-bind:childResponse="childResponse"
37
+        v-if="org_template_info.template_id == 5"
38
+      ></DialysisPrintOrderFive>
39
+      <!--<DialysisPrintOrderSix style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==6"></DialysisPrintOrderSix>-->
40
+      <DialysisPrintOrderSix
41
+        style="margin-top:60px;"
42
+        v-bind:childResponse="childResponse"
43
+        v-if="org_template_info.template_id == 6"
44
+      ></DialysisPrintOrderSix>
45
+    </div>
46
+    <side-bar :active_index="0" v-if="isShow == true"></side-bar>
47
+  </div>
48
+</template>
49
+
50
+<script>
51
+import { getPrintDialysisRecord } from "@/api/dialysis";
52
+import { getDataConfig } from "@/utils/data";
53
+import SideBar from "@/pages/layout/SideBar";
54
+import { jsGetAge, uParseTime } from "@/utils/tools";
55
+import { fetchAllAdminUsers } from "@/api/doctor";
56
+import LabelBox from "./printItem/LabelBox";
57
+import DialysisPrintOrderOne from "./template/DialysisPrintOrderOne";
58
+import DialysisPrintOrderTwo from "./template/DialysisPrintOrderTwo";
59
+import DialysisPrintOrderFive from "./template/DialysisPrintOrderFive";
60
+import DialysisPrintOrderSix from "./template/DialysisPrintOrderSix";
61
+
62
+export default {
63
+  name: "PrintIndex",
64
+  components: {
65
+    DialysisPrintOrderSix,
66
+    DialysisPrintOrderOne,
67
+    DialysisPrintOrderTwo,
68
+    DialysisPrintOrderFive,
69
+    LabelBox,
70
+    SideBar
71
+  },
72
+  data() {
73
+    return {
74
+      isShowImg: true,
75
+      isShow: true,
76
+      operators: [],
77
+      dialysisOrder: {
78
+        DeviceNumber: []
79
+      },
80
+      org_template_info: {},
81
+      childResponse: {},
82
+      operatorMaps: {},
83
+      complications: [
84
+        "低血压",
85
+        "高血压",
86
+        "心律失常",
87
+        "头晕",
88
+        "头痛",
89
+        "呕吐",
90
+        "抽搐",
91
+        "出血",
92
+        "心衰",
93
+        "腹痛"
94
+      ],
95
+      jilurow: 10,
96
+      loading: true,
97
+      orgname: "",
98
+      patientInfo_gender_1: false,
99
+      patientInfo_gender_2: false,
100
+      patientInfo_source_2: false,
101
+      patientInfo_source_1: false,
102
+      modeOptions: {},
103
+      replacementWays: [],
104
+      perfusionApparatus: [],
105
+      anticoagulantsConfit: {},
106
+      bloodAccessParOpera: {},
107
+      dialysateFormulationOptions: {},
108
+
109
+      queryParams: {
110
+        xtdate: "",
111
+        xtno: ""
112
+      },
113
+      patientInfo: {
114
+        birth: "",
115
+        age: "",
116
+        DialysisSchedule: {
117
+          device_number: { number: "" },
118
+          device_zone: { name: "" }
119
+        },
120
+        gender: 0
121
+      },
122
+      predialysis: {
123
+        internal_fistula: "",
124
+        internal_fistula_skin: "",
125
+        catheter: "",
126
+        blood_access_part_opera_name: ""
127
+      },
128
+      afterdialysis: {
129
+        complications_index: ""
130
+      },
131
+      prescription: {
132
+        dialysate_formulation_name: "",
133
+        device: {}
134
+      },
135
+      advices: [],
136
+      users: [],
137
+      monitors: [],
138
+      summary: {},
139
+      adminUser: [],
140
+      receiverTreatmentAccess: {},
141
+
142
+      AlPanel: {
143
+        id: 0,
144
+        name: "",
145
+        type: 1,
146
+        shouji: 2,
147
+        weichi: 2,
148
+        zongliang: 2,
149
+        gaimingcheng: -1,
150
+        gaijiliang: -1,
151
+        shouji_unit: "mg",
152
+        weichi_unit: "mg/h",
153
+        zongliang_unit: "mg",
154
+        gaimingcheng_unit: "",
155
+        gaijiliang_unit: ""
156
+      }
157
+    };
158
+  },
159
+
160
+  methods: {
161
+    getUser() {
162
+      fetchAllAdminUsers().then(response => {
163
+        if (response.data.state == 1) {
164
+          this.adminUser = response.data.data.users;
165
+          console.log(this.adminUser);
166
+          this.loading = false;
167
+        } else {
168
+          this.loading = false;
169
+          this.$message.error("请求数据失败");
170
+          return false;
171
+        }
172
+      });
173
+    },
174
+    getTime(value, temp) {
175
+      if (value != undefined) {
176
+        return uParseTime(value, temp);
177
+      }
178
+      return "";
179
+    },
180
+    // printThisPage() {
181
+    //   var xtdate = this.$route.query.xtdate;
182
+    //   this.$router.push(
183
+    //     "/Prints?xtdate=" + xtdate + "&xtno=" + this.$route.query.xtno
184
+    //   );
185
+    // },
186
+    backAction() {
187
+      this.$router.back(-1);
188
+    },
189
+    getXuserName(id) {
190
+      if (id <= 0) {
191
+        return "";
192
+      }
193
+      var name = "";
194
+      if (this.users == null || typeof this.users.length == "undefined") {
195
+        return name;
196
+      }
197
+      var leng = this.users.length;
198
+      if (leng == 0) {
199
+        return name;
200
+      }
201
+      for (let index = 0; index < leng; index++) {
202
+        if (this.users[index].id == id) {
203
+          name = this.users[index].name;
204
+          break;
205
+        }
206
+      }
207
+      return name;
208
+    },
209
+    setAdminUserES(id) {
210
+      console.log(id);
211
+      if (id == 0) {
212
+        return "";
213
+      }
214
+      if (id == undefined) {
215
+        return "";
216
+      }
217
+      if (id in this.operatorMaps) {
218
+        return this.operatorMaps[id].url;
219
+      }
220
+      return "";
221
+    },
222
+    modeName(mode_id) {
223
+      return typeof this.modeOptions[mode_id] != "undefined" &&
224
+        typeof this.modeOptions[mode_id].name != "undefined"
225
+        ? this.modeOptions[mode_id].name
226
+        : "";
227
+    },
228
+    getDialysisRecord() {
229
+      this.loading = true;
230
+      getPrintDialysisRecord(this.queryParams).then(response => {
231
+        this.loading = false;
232
+        if (response.data.state == 1) {
233
+          this.childResponse = response;
234
+          this.org_template_info = response.data.data.org_template_info;
235
+        } else {
236
+          this.$message.error("请求数据失败");
237
+          return false;
238
+        }
239
+
240
+        console.log(this.advices);
241
+      });
242
+    },
243
+
244
+    bloodAccessParOperaName(id) {
245
+      if (id in this.bloodAccessParOpera) {
246
+        return this.bloodAccessParOpera[id].name;
247
+      }
248
+      return "";
249
+    },
250
+    dialysateFormulationName(id) {
251
+      if (id in this.dialysateFormulationOptions) {
252
+        return this.dialysateFormulationOptions[id].name;
253
+      }
254
+      return "";
255
+    },
256
+    getNumber() {
257
+      if (this.dialysisOrder != null) {
258
+        return (
259
+          this.patientInfo.DialysisSchedule.device_zone.name +
260
+          this.dialysisOrder.DeviceNumber.number
261
+        );
262
+      } else {
263
+        return this.patientInfo.DialysisSchedule.device_zone.name;
264
+      }
265
+    },
266
+    getAdminUser(id) {
267
+      console.log(id);
268
+      if (id == 0) {
269
+        return "";
270
+      }
271
+      if (id == undefined) {
272
+        return "";
273
+      }
274
+      for (let i = 0; i < this.adminUser.length; i++) {
275
+        if (this.adminUser[i].id == id) {
276
+          return this.adminUser[i].name;
277
+        }
278
+      }
279
+    },
280
+    printlog(val) {
281
+      console.log(typeof val + "Second");
282
+    }
283
+  },
284
+  watch: {
285
+    "patientInfo.gender": function() {
286
+      if (this.patientInfo.gender == 1) {
287
+        this.patientInfo_gender_1 = true;
288
+        this.patientInfo_gender_2 = false;
289
+      } else if (this.patientInfo.gender == 2) {
290
+        this.patientInfo_gender_2 = true;
291
+        this.patientInfo_gender_1 = false;
292
+      } else {
293
+        this.patientInfo_gender_2 = false;
294
+        this.patientInfo_gender_1 = false;
295
+      }
296
+    },
297
+
298
+    "patientInfo.source": function() {
299
+      if (this.patientInfo.source == 1) {
300
+        this.patientInfo_source_1 = true;
301
+        this.patientInfo_source_2 = false;
302
+      } else if (this.patientInfo.source == 2) {
303
+        this.patientInfo_source_2 = true;
304
+        this.patientInfo_source_1 = false;
305
+      } else {
306
+        this.patientInfo_source_2 = false;
307
+        this.patientInfo_source_1 = false;
308
+      }
309
+    }
310
+  },
311
+  created() {
312
+    var xtuser = this.$store.getters.user;
313
+    this.orgname = xtuser.org.org_name;
314
+    // this.orgname = "遂溪方济医院";
315
+    this.modeOptions = this.$store.getters.treatment_mode;
316
+    this.replacementWays = this.$store.getters.replacement_ways;
317
+    this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
318
+    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
319
+
320
+    // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
321
+
322
+    var bloodAccessParOpera = getDataConfig(
323
+      "hemodialysis",
324
+      "vascular_access_desc"
325
+    );
326
+    for (var key in bloodAccessParOpera) {
327
+      this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
328
+        bloodAccessParOpera[key];
329
+    }
330
+
331
+    var dialysateFormulationOptions = getDataConfig(
332
+      "hemodialysis",
333
+      "dialysate_formulation"
334
+    );
335
+    for (var key in dialysateFormulationOptions) {
336
+      this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
337
+        dialysateFormulationOptions[key];
338
+    }
339
+
340
+    const xtdate = this.$route.query && this.$route.query.xtdate;
341
+    const xtno = this.$route.query && this.$route.query.xtno;
342
+    if (
343
+      typeof xtdate == "string" &&
344
+      xtdate.length > 0 &&
345
+      typeof xtno == "string" &&
346
+      xtno.length > 0
347
+    ) {
348
+      this.queryParams.xtdate = xtdate;
349
+      this.queryParams.xtno = xtno;
350
+      this.getDialysisRecord();
351
+    } else {
352
+      this.$message.error("参数不齐");
353
+      return false;
354
+    }
355
+
356
+    // this.getUser();
357
+  }
358
+};
359
+</script>
360
+
361
+<style style="stylesheet/scss" lang="scss" scoped>
362
+.dialysis-print-order {
363
+  width: 960px;
364
+  margin: 0 auto;
365
+  .order-yy-name {
366
+    margin: 10px auto 0 auto;
367
+    text-align: center;
368
+    font-size: 20px;
369
+  }
370
+  .order-title {
371
+    margin: auto;
372
+    font-weight: 600;
373
+    text-align: center;
374
+    font-size: 22px;
375
+    padding: 10px 20px 20px 20px;
376
+  }
377
+  .table-box {
378
+    width: 100%;
379
+    line-height: 15px;
380
+    font-size: 14px;
381
+    .under-line {
382
+      border-bottom: 1px solid #999;
383
+      width: 95%;
384
+      text-align: center;
385
+      margin-left: 2px;
386
+    }
387
+  }
388
+  .print-table {
389
+    width: 100%;
390
+    text-align: center;
391
+    border-collapse: collapse;
392
+    line-height: 25px;
393
+    font-size: 14px;
394
+    .title-box {
395
+      text-align: center;
396
+      font-size: 16px;
397
+    }
398
+  }
399
+  .print-table-no {
400
+    width: 100%;
401
+    text-align: center;
402
+    border-collapse: collapse;
403
+    font-size: 14px;
404
+  }
405
+}
406
+
407
+.dialysis-print-order .radio-lebel-box {
408
+  font-weight: 400;
409
+  cursor: pointer;
410
+}
411
+.dialysis-print-order .radio-no {
412
+  opacity: 0;
413
+  outline: none;
414
+  position: absolute;
415
+  margin: 0;
416
+  width: 0;
417
+  height: 0;
418
+  z-index: -1;
419
+}
420
+.dialysis-print-order .radio-inner {
421
+  white-space: nowrap;
422
+  cursor: pointer;
423
+  outline: none;
424
+  display: inline-block;
425
+  line-height: 1;
426
+  position: relative;
427
+  vertical-align: middle;
428
+}
429
+.dialysis-print-order .radio-fang {
430
+  display: inline-block;
431
+  position: relative;
432
+  border: 1px solid #000;
433
+  box-sizing: border-box;
434
+  width: 14px;
435
+  height: 14px;
436
+  background-color: #fff;
437
+  z-index: 1;
438
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
439
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
440
+}
441
+.dialysis-print-order .is-checked-radio::after {
442
+  content: "√";
443
+  font-size: 15px;
444
+}
445
+.es-img {
446
+  height: 25px;
447
+}
448
+
449
+html,
450
+body {
451
+  height: 100%;
452
+}
453
+.mainBox {
454
+  height: 100%;
455
+  font-size: 0.3rem;
456
+  .sideColumn {
457
+    // float: left;
458
+    // width: 1.58rem;
459
+    background: #f5f8fb;
460
+    // height: 100%;
461
+    // border-right: 1px #c1c1c1 solid;
462
+    // position: fixed;
463
+    .column {
464
+      // height: 100%;
465
+      // background: #f5f8fb;
466
+      .head {
467
+        @include display-flex;
468
+        @include align-items-center;
469
+        @include flex-direction;
470
+        @include text-align;
471
+        @include justify-content-center;
472
+        margin: 0.5rem 0 0.5rem 0;
473
+        img {
474
+          width: 100%;
475
+          height: 100%;
476
+          border-radius: 0.5rem;
477
+          width: 0.7rem;
478
+          height: 0.7rem;
479
+        }
480
+      }
481
+      .sidebar {
482
+        @include display-flex;
483
+        @include align-items-center;
484
+        @include flex-direction;
485
+        @include text-align;
486
+        padding: 0;
487
+        li {
488
+          // font-size:0.23rem;
489
+          padding: 0 0 0.8rem 0;
490
+          a {
491
+            color: #a8b3ba;
492
+            display: inline-block;
493
+            padding: 0;
494
+            margin: 0;
495
+            p {
496
+              font-size: 0.24rem;
497
+              margin-top: 0.2rem;
498
+            }
499
+            .iconfont {
500
+              font-size: 0.5rem;
501
+              display: inline-block;
502
+            }
503
+          }
504
+          &.active {
505
+            a {
506
+              color: #409eff;
507
+            }
508
+          }
509
+        }
510
+      }
511
+    }
512
+  }
513
+}
514
+.navigation {
515
+  @include display-flex;
516
+  @include align-items-center;
517
+  @include text-align;
518
+  @include box-sizing;
519
+  @include justify-content-between;
520
+  padding: 0.3rem 0.36rem;
521
+  border-bottom: 1px #e5e5e5 solid;
522
+  position: fixed;
523
+  top: 0;
524
+  left: 0;
525
+  right: 0;
526
+  z-index: 100;
527
+  background: #fff;
528
+  .goBack {
529
+    // color: #6e7a87;
530
+    cursor: pointer;
531
+    @include display-flex;
532
+    @include align-items-center;
533
+    @include text-align;
534
+    .back {
535
+      color: $main-color;
536
+      margin-right: 0.87rem;
537
+      .iconfont {
538
+        color: $main-color;
539
+      }
540
+    }
541
+    .name {
542
+      .iconfont {
543
+        margin-left: 0.1rem;
544
+      }
545
+    }
546
+  }
547
+  .nav {
548
+    ul {
549
+      li {
550
+        float: left;
551
+        font-size: 0.3rem;
552
+        margin: 0 0.2rem;
553
+        height: 0.5rem;
554
+        line-height: 0.5rem;
555
+        width: 1rem;
556
+        cursor: pointer;
557
+        &.active {
558
+          background: $main-color;
559
+          color: #fff;
560
+          border-radius: 30px;
561
+        }
562
+      }
563
+    }
564
+  }
565
+  .time {
566
+    cursor: pointer;
567
+    .iconfont {
568
+      margin-left: 0.1rem;
569
+    }
570
+  }
571
+}
572
+
573
+.mainContent {
574
+  // margin: 0 0 0 1.58rem;
575
+}
576
+.mainBox {
577
+  display: flex;
578
+  flex-direction: column;
579
+  height: 100%;
580
+  overflow: hidden;
581
+  > :first-child {
582
+    flex: 1;
583
+    overflow: auto;
584
+  }
585
+}
586
+</style>

+ 360 - 0
src/pages/main/RecordPage.vue View File

@@ -0,0 +1,360 @@
1
+<template>
2
+  <div>
3
+    <!-- <van-row class="top_row">
4
+    <van-col :span="14">-->
5
+    <div class="top_row">
6
+      <!-- <div class="head">
7
+        <img :src="$store.getters.user.org.org_logo" alt />
8
+      </div>-->
9
+      <div class="floatLeft">
10
+        <span class="title">{{ $store.getters.user.org.org_short_name }}</span>
11
+        <router-link to="/add_urgent_schedule">
12
+          <p class="order">临时排班</p>
13
+        </router-link>
14
+      </div>
15
+      <!-- </van-col> -->
16
+      <!-- <van-col :span="6">
17
+        <div class="department">
18
+          <ul>
19
+            <li style="position: relative;" :class="index == 0? 'active':'' " @click="ClickTab(0)">
20
+              {{'候诊区'}}
21
+              <span class="redpoint" v-if="un_read_wait_num">{{un_read_wait_num > 99 ? un_read_wait_num+'+':un_read_wait_num}}</span>
22
+            </li>
23
+            <li style="position: relative;" :class="index == 1? 'active':'' " @click="ClickTab(1)">
24
+              {{'透析区'}}
25
+              <span class="redpoint" v-if="un_read_dialysis_num">{{un_read_dialysis_num > 99 ? un_read_dialysis_num+'+':un_read_dialysis_num}}</span>
26
+            </li>
27
+          </ul>
28
+        </div>
29
+      </van-col>-->
30
+      <!-- <van-col :span="10"> -->
31
+      <!-- <router-link to="/add_urgent_schedule">
32
+          <van-button size="small" type="info" class="add_schedule_btn">临时排班</van-button>
33
+      </router-link>-->
34
+      <!-- <div class="search">
35
+        <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
36
+          <i class="iconfont" slot="left-icon">&#xe741;</i>
37
+          <van-button
38
+            slot="button"
39
+            size="small"
40
+            type="info"
41
+            style="border: none;"
42
+            @click="searchWithKeyword"
43
+          >搜索</van-button>
44
+        </van-field>
45
+      </div>-->
46
+      <!-- </van-col>
47
+      </van-row>-->
48
+      <div class="newSearch">
49
+        <!-- <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
50
+          <i class="iconfont" slot="left-icon">&#xe741;</i>
51
+          <van-button
52
+            slot="button"
53
+            size="small"
54
+            type="info"
55
+            style="border: none;"
56
+            @click="searchWithKeyword"
57
+          >搜索</van-button>
58
+        </van-field>-->
59
+        <el-input
60
+          class="newinput"
61
+          prefix-icon="el-icon-search"
62
+          v-model="search_input"
63
+          ref="search_field"
64
+          placeholder="透析号/姓名"
65
+        ></el-input>
66
+        <p class="searchBtn" @click="searchWithKeyword">搜索</p>
67
+      </div>
68
+      <div class="box">
69
+        <div class="newDepartment">
70
+          <ul>
71
+            <li
72
+              style="position: relative;"
73
+              :class="index == 0 ? 'active' : ''"
74
+              @click="ClickTab(0)"
75
+            >
76
+              {{ "候诊区" }}
77
+              <span class="redpoint" v-if="un_read_wait_num">
78
+                {{
79
+                un_read_wait_num > 99
80
+                ? un_read_wait_num + "+"
81
+                : un_read_wait_num
82
+                }}
83
+              </span>
84
+            </li>
85
+            <li
86
+              style="position: relative;"
87
+              :class="index == 1 ? 'active' : ''"
88
+              @click="ClickTab(1)"
89
+            >
90
+              {{ "透析区" }}
91
+              <span class="redpoint" v-if="un_read_dialysis_num">
92
+                {{
93
+                un_read_dialysis_num > 99
94
+                ? un_read_dialysis_num + "+"
95
+                : un_read_dialysis_num
96
+                }}
97
+              </span>
98
+            </li>
99
+          </ul>
100
+        </div>
101
+      </div>
102
+    </div>
103
+    <!-- <div class="top">
104
+        <div class="hospital">
105
+          <span class="title"> {{ $store.getters.user.org.org_short_name }} </span>
106
+        </div>
107
+        <div class="department">
108
+            <ul>
109
+                <li v-for="(item,i) in ['候诊室','透析区']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li>
110
+            </ul>
111
+        </div>
112
+        <div class="search">
113
+          <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" style="background-color: #ebf1f7; height: 0.6rem; line-height: 0.6rem; padding: 0 0 0 10px; border-radius: 30px;">
114
+            <i class="iconfont" slot="left-icon">&#xe741;</i>
115
+            <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索</van-button>
116
+          </van-field>
117
+        </div>
118
+        <van-button size="small" type="info">临时排班</van-button>
119
+    </div>-->
120
+    <div class="area">
121
+      <waiting-area ref="waitingArea" v-show="index == 0" title="候诊区" :search_keyword="search_keyword"></waiting-area>
122
+      <dialysis-area @refWaitingArea="refWaitingArea" v-show="index == 1" title="透析区" :search_keyword="search_keyword"  @clear_search_keyword="clearKeyword" ></dialysis-area>
123
+    </div>
124
+  </div>
125
+</template>
126
+
127
+<script>
128
+import DialysisArea from './DialysisArea'
129
+import WaitingArea from './WaitingArea'
130
+import { Popover } from 'vux'
131
+import { getDialysisScheduals, getWaitingScheduals } from '@/api/dialysis'
132
+import { parseTime } from '@/utils/index'
133
+import { getDialysisOrWaitSelectedConfig } from '@/utils/data_config'
134
+
135
+export default {
136
+  name: 'RecordPage',
137
+  props: {
138
+    un_read_wait_num: {
139
+      type: Number
140
+    },
141
+    un_read_dialysis_num: {
142
+      type: Number
143
+    }
144
+  },
145
+  data () {
146
+    return {
147
+      index: 1,
148
+      search_input: '',
149
+      search_keyword: '',
150
+      scheduals: [],
151
+      advice_groups: [],
152
+      unReadWaitNum: 0,
153
+      unReadDialysisNum: 0
154
+    }
155
+  },
156
+  components: {
157
+    DialysisArea,
158
+    WaitingArea,
159
+    Popover
160
+    // Group,
161
+    // Cell
162
+  },
163
+
164
+  methods: {
165
+    refWaitingArea: function () {
166
+      this.$refs.waitingArea.requestScheduals()
167
+      this.$emit('refAdvice')
168
+    },
169
+    ClickTab: function (tabIndex) {
170
+      this.index = tabIndex
171
+    },
172
+    searchWithKeyword: function () {
173
+      this.$refs.search_field.blur()
174
+      this.search_keyword = this.search_input
175
+    },
176
+    clearKeyword: function () {
177
+      this.search_input = ''
178
+      this.search_keyword = ''
179
+    }
180
+  },
181
+  created () {
182
+    var index = getDialysisOrWaitSelectedConfig()
183
+    console.log(index)
184
+    if (index != null) {
185
+      this.index = index
186
+    }
187
+  }
188
+}
189
+</script>
190
+
191
+<style lang="scss" scoped>
192
+.top_row {
193
+  // height: 50px;
194
+  font-size: 0.3rem;
195
+  padding: 0 0.3rem 0;
196
+  @media only screen and (min-width: 813px) and (max-width: 1024px) {
197
+    padding: 0.3rem 0.3rem;
198
+  }
199
+  // border-bottom: 1px #e5e5e5 solid;
200
+  // display: flex;
201
+  // align-items: center;
202
+  background: #258ffc;
203
+  .floatLeft {
204
+    line-height: 1rem;
205
+    height: 1rem;
206
+    margin-top: 0.1rem;
207
+    .order {
208
+      float: right;
209
+      font-size: 0.45rem;
210
+      color: #fff;
211
+    }
212
+  }
213
+  .search {
214
+    float: right;
215
+    margin-top: 15px;
216
+  }
217
+}
218
+.title {
219
+  font-size: 0.45rem;
220
+  font-weight: 600;
221
+  height: 45px;
222
+  // line-height: 50px;
223
+  margin-left: 8px;
224
+  // color: $title-color;
225
+  color: #fff;
226
+}
227
+.newDepartment {
228
+  text-align: center;
229
+  // height: 100%;
230
+  width: 60%;
231
+  margin: 0 auto;
232
+  ul {
233
+    height: 100%;
234
+    display: flex;
235
+    justify-content: space-around;
236
+    align-items: center;
237
+    li {
238
+      float: left;
239
+      font-size: 0.45rem;
240
+      margin: 0 0.2rem;
241
+      height: 0.8rem;
242
+      line-height: 0.8rem;
243
+      padding: 0 0.4rem;
244
+      // color: $title-color;
245
+      color: #fff;
246
+      &.active {
247
+        // background: $main-color;
248
+        background: #ffffff;
249
+        color: #258ffc;
250
+        border-radius: 30px;
251
+      }
252
+    }
253
+  }
254
+}
255
+
256
+.add_schedule_btn {
257
+  margin-left: 10px;
258
+  float: right;
259
+  background-color: #ff7978;
260
+  border: none;
261
+}
262
+
263
+.redpoint {
264
+  display: inline-block;
265
+  height: 30px;
266
+  width: 30px;
267
+  line-height: 26px;
268
+  text-align: center;
269
+  font-size: 0.8em;
270
+  border-radius: 20px;
271
+  color: #fff;
272
+  background: #f56c6c;
273
+  position: absolute;
274
+  top: -6px;
275
+  right: -8px;
276
+  border: 1px solid #fff;
277
+  @media only screen and (max-width: 767px) {
278
+    height: 16px;
279
+    width: 16px;
280
+    line-height: 15px;
281
+  }
282
+  @media only screen and (min-width: 415px) and (max-width: 767px) {
283
+    height: 20px;
284
+    width: 20px;
285
+    line-height: 20px;
286
+    font-size: 0.36rem;
287
+  }
288
+}
289
+.box {
290
+  height: 1rem;
291
+  margin-top: 0.26rem;
292
+  background: #258ffc;
293
+}
294
+.head {
295
+  width: 45px;
296
+  height: 45px;
297
+  border-radius: 50%;
298
+  margin-top: 3px;
299
+  display: inline-block;
300
+  float: left;
301
+  img {
302
+    width: 100%;
303
+    height: 100%;
304
+    border-radius: 50%;
305
+  }
306
+}
307
+.newSearch {
308
+  height: 1rem;
309
+  width: 100%;
310
+  background: #fff;
311
+  border-radius: 30px;
312
+  overflow: hidden;
313
+  .searchBtn {
314
+    width: 14%;
315
+    float: right;
316
+    height: 1rem;
317
+    line-height: 1rem;
318
+    text-align: center;
319
+    font-size: 0.45rem;
320
+    color: #258ffc;
321
+    vertical-align: middle;
322
+  }
323
+}
324
+</style>
325
+<style lang="scss">
326
+.newinput {
327
+  height: 100%;
328
+  width: 85% !important;
329
+  float: left;
330
+  .el-input__inner {
331
+    height: 1rem;
332
+    line-height: 1rem;
333
+    width: 100%;
334
+    border-radius: 30px;
335
+    border: none;
336
+    font-size: 0.45rem;
337
+    box-sizing: border-box;
338
+    padding-bottom: 0.05rem;
339
+    vertical-align: middle;
340
+    @media only screen and (min-width: 768px) {
341
+      padding-left: 0.9rem !important;
342
+    }
343
+  }
344
+  .el-input__icon {
345
+    line-height: 0.95rem;
346
+    font-size: 0.45rem;
347
+    margin-top: 0.02rem;
348
+    padding-left: 0.1rem;
349
+    @media only screen and (min-width: 768px) {
350
+      margin-top: 1px;
351
+    }
352
+  }
353
+  .el-input__prefix {
354
+    // left:1px;
355
+    @media only screen and (min-width: 768px) {
356
+      left: 10px;
357
+    }
358
+  }
359
+}
360
+</style>

+ 0 - 0
src/pages/main/WaitingArea.vue View File


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