Browse Source

医保说明

master
xuhuajiao 1 year ago
commit
5b20c49ef7
  1. 9
      .env.development
  2. 9
      .env.production
  3. 197
      .eslintrc.js
  4. 23
      .gitignore
  5. 31
      README.md
  6. 11
      babel.config.js
  7. 56
      package.json
  8. BIN
      public/favicon.ico
  9. 17
      public/index.html
  10. 16
      src/App.vue
  11. 15
      src/api/inquiryMachine.js
  12. BIN
      src/assets/images/bg.png
  13. BIN
      src/assets/images/medical/zl_20240117101221_11.jpg
  14. BIN
      src/assets/images/medical/zl_20240117101221_12.jpg
  15. BIN
      src/assets/images/medical/zl_20240117101221_13.jpg
  16. BIN
      src/assets/images/medical/zl_20240117101221_14.jpg
  17. BIN
      src/assets/images/medical/zl_20240117101221_15.jpg
  18. BIN
      src/assets/images/medical/zl_20240117101221_16.jpg
  19. BIN
      src/assets/images/medical/zl_20240117101221_17.jpg
  20. BIN
      src/assets/images/medical/zl_20240117101221_18.jpg
  21. BIN
      src/assets/images/medical/zl_20240117101221_19.jpg
  22. BIN
      src/assets/images/medical/zl_20240117101221_20.jpg
  23. BIN
      src/assets/images/medical/zl_20240117101221_21.jpg
  24. BIN
      src/assets/images/medical/zl_20240117101221_22.jpg
  25. BIN
      src/assets/images/medical/zl_20240117101221_23.jpg
  26. BIN
      src/assets/images/medical/zl_20240117101221_24.jpg
  27. BIN
      src/assets/images/medical/zl_20240117101221_25.jpg
  28. BIN
      src/assets/images/medical/zl_20240117101221_26.jpg
  29. BIN
      src/assets/images/medical/zl_20240117101221_27.jpg
  30. BIN
      src/assets/images/medical/zl_20240117101221_28.jpg
  31. BIN
      src/assets/images/medical/zl_20240117101221_29.jpg
  32. BIN
      src/assets/images/medical/zl_20240117101221_30.jpg
  33. BIN
      src/assets/images/medical/zl_20240117101221_31.jpg
  34. BIN
      src/assets/images/medical/zl_20240117101221_32.jpg
  35. BIN
      src/assets/images/medical/zl_20240117101221_33.jpg
  36. BIN
      src/assets/images/medical/zl_20240117101221_34.jpg
  37. BIN
      src/assets/images/medical/zl_20240117101221_35.jpg
  38. BIN
      src/assets/images/medical/zl_20240117101221_36.jpg
  39. BIN
      src/assets/images/medical/zl_20240117101221_37.jpg
  40. BIN
      src/assets/images/medical/zl_20240117101221_38.jpg
  41. BIN
      src/assets/images/medical/zl_20240117101221_39.jpg
  42. BIN
      src/assets/images/medical/zl_20240117101221_40.jpg
  43. BIN
      src/assets/images/medical/zl_20240117101221_41.jpg
  44. BIN
      src/assets/images/medical/zl_20240117101221_42.jpg
  45. BIN
      src/assets/images/medical/zl_20240117101221_43.jpg
  46. BIN
      src/assets/images/medical/zl_20240117101221_44.jpg
  47. BIN
      src/assets/images/medical/zl_20240117101221_45.jpg
  48. BIN
      src/assets/images/medical/zl_20240117101221_46.jpg
  49. BIN
      src/assets/images/medical/zl_20240117101221_47.jpg
  50. BIN
      src/assets/images/medical/zl_20240117101221_48.jpg
  51. BIN
      src/assets/images/medical/zl_20240117101221_49.jpg
  52. BIN
      src/assets/images/medical/zl_20240117101221_50.jpg
  53. BIN
      src/assets/images/medical/zl_20240117101221_51.jpg
  54. BIN
      src/assets/images/medical/zl_20240117101221_52.jpg
  55. BIN
      src/assets/images/medical/zl_20240117101221_53.jpg
  56. BIN
      src/assets/images/medical/zl_20240117101221_54.jpg
  57. BIN
      src/assets/images/medical/zl_20240117101221_55.jpg
  58. BIN
      src/assets/images/medical/zl_20240117101221_56.jpg
  59. BIN
      src/assets/images/medical/zl_20240117101221_57.jpg
  60. BIN
      src/assets/images/medical/zl_20240117101221_58.jpg
  61. BIN
      src/assets/images/medical/zl_20240117101221_59.jpg
  62. BIN
      src/assets/images/medical/zl_20240117101221_60.jpg
  63. BIN
      src/assets/images/medical/zl_20240117101221_61.jpg
  64. BIN
      src/assets/images/medical/zl_20240117101221_62.jpg
  65. BIN
      src/assets/logo.png
  66. 104
      src/assets/styles/index.scss
  67. 78
      src/assets/styles/style.scss
  68. 147
      src/common/flexible.js
  69. 61
      src/common/scrollMixins.js
  70. 28
      src/main.js
  71. 22
      src/router/index.js
  72. 15
      src/store/index.js
  73. 92
      src/utils/index.js
  74. 54
      src/utils/request.js
  75. 26
      src/utils/resizeMixins.js
  76. 166
      src/views/index.vue
  77. 62
      vue.config.js

9
.env.development

@ -0,0 +1,9 @@
ENV = 'development'
# 接口地址
# 许镇-本地服地址
VUE_APP_BASE_API = 'http://192.168.99.67:8080'
VUE_APP_WS_API = 'ws://192.168.99.67:8081'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true

9
.env.production

@ -0,0 +1,9 @@
ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
# VUE_APP_BASE_API = 'https://openapitest.aiyxlib.com'
VUE_APP_BASE_API = 'http://172.22.0.23:8080'
# VUE_APP_BASE_API = 'http://127.0.0.1:8080'
# 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'ws://192.168.99.107:7071'

197
.eslintrc.js

@ -0,0 +1,197 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off",
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}

23
.gitignore

@ -0,0 +1,23 @@
.DS_Store
node_modules
dist/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
package-lock.json

31
README.md

@ -0,0 +1,31 @@
医保说明
```bash
# install dependency
npm install
# develop
npm run serve
# 构建生产环境
npm run build
```
```bash
## 项目结构
├── src # 源代码
│ ├── api # 所有请求
│ ├── assets # 主题 字体等静态资源
│ ├── router # 路由
│ ├── views # views 所有页面
│ │ ├── index # 主页面
│ ├── App.vue # 入口页面
│ ├── main.js # 入口文件 加载组件 初始化等
├── .env.xxx # 环境变量配置
├── .eslintrc.js # eslint 配置项
├── .babelrc # babel-loader 配置
├── .travis.yml # 自动化CI配置
├── vue.config.js # vue-cli 配置
├── postcss.config.js # postcss 配置
└── package.json # package.json
```

11
babel.config.js

@ -0,0 +1,11 @@
const plugins = ['@vue/babel-plugin-transform-vue-jsx', '@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-nullish-coalescing-operator']
// 生产环境移除console
if (process.env.NODE_ENV === 'production') {
plugins.push('transform-remove-console')
}
module.exports = {
plugins: plugins,
presets: [
'@vue/cli-plugin-babel/preset'
]
}

56
package.json

@ -0,0 +1,56 @@
{
"name": "intelligence-inquiry-machine",
"version": "1.0.0",
"description": "医保说明",
"scripts": {
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@babel/core": "^7.19.0",
"@babel/preset-env": "^7.19.0",
"@jiaminghi/data-view": "^2.7.3",
"@types/echarts": "^4.4.3",
"axios": "^0.27.2",
"core-js": "^3.6.4",
"echarts": "^4.6.0",
"element-ui": "^2.15.9",
"swiper": "^8.4.2",
"vue": "^2.6.11",
"vue-awesome": "^4.0.2",
"vue-awesome-swiper": "^3.1.3",
"vue-router": "^3.1.5",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.2.0",
"@vue/cli-plugin-eslint": "^4.2.0",
"@vue/cli-service": "^4.2.0",
"babel-eslint": "^10.0.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.1.2",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

BIN
public/favicon.ico

17
public/index.html

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

16
src/App.vue

@ -0,0 +1,16 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<style lang="scss">
body {
margin: 0;
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>

15
src/api/inquiryMachine.js

@ -0,0 +1,15 @@
import request from '@/utils/request'
// import qs from 'qs'
// 分页获取信息
export function getGuaranteeImage(params) {
return request({
url: '/whfl/getGuaranteeImage',
method: 'get',
params: params
})
}
export default {
getGuaranteeImage
}

BIN
src/assets/images/bg.png

After

Width: 412  |  Height: 412  |  Size: 120 KiB

BIN
src/assets/images/medical/zl_20240117101221_11.jpg

After

Width: 1920  |  Height: 1358  |  Size: 357 KiB

BIN
src/assets/images/medical/zl_20240117101221_12.jpg

After

Width: 1920  |  Height: 1358  |  Size: 340 KiB

BIN
src/assets/images/medical/zl_20240117101221_13.jpg

After

Width: 1920  |  Height: 1358  |  Size: 345 KiB

BIN
src/assets/images/medical/zl_20240117101221_14.jpg

After

Width: 1920  |  Height: 1358  |  Size: 334 KiB

BIN
src/assets/images/medical/zl_20240117101221_15.jpg

After

Width: 1920  |  Height: 1358  |  Size: 535 KiB

BIN
src/assets/images/medical/zl_20240117101221_16.jpg

After

Width: 1920  |  Height: 1358  |  Size: 465 KiB

BIN
src/assets/images/medical/zl_20240117101221_17.jpg

After

Width: 1920  |  Height: 1358  |  Size: 385 KiB

BIN
src/assets/images/medical/zl_20240117101221_18.jpg

After

Width: 1920  |  Height: 1358  |  Size: 417 KiB

BIN
src/assets/images/medical/zl_20240117101221_19.jpg

After

Width: 1920  |  Height: 1358  |  Size: 526 KiB

BIN
src/assets/images/medical/zl_20240117101221_20.jpg

After

Width: 1920  |  Height: 1358  |  Size: 390 KiB

BIN
src/assets/images/medical/zl_20240117101221_21.jpg

After

Width: 1920  |  Height: 1358  |  Size: 412 KiB

BIN
src/assets/images/medical/zl_20240117101221_22.jpg

After

Width: 1920  |  Height: 1358  |  Size: 471 KiB

BIN
src/assets/images/medical/zl_20240117101221_23.jpg

After

Width: 1920  |  Height: 1358  |  Size: 503 KiB

BIN
src/assets/images/medical/zl_20240117101221_24.jpg

After

Width: 1920  |  Height: 1358  |  Size: 343 KiB

BIN
src/assets/images/medical/zl_20240117101221_25.jpg

After

Width: 1920  |  Height: 1358  |  Size: 359 KiB

BIN
src/assets/images/medical/zl_20240117101221_26.jpg

After

Width: 1920  |  Height: 1358  |  Size: 348 KiB

BIN
src/assets/images/medical/zl_20240117101221_27.jpg

After

Width: 1920  |  Height: 1358  |  Size: 379 KiB

BIN
src/assets/images/medical/zl_20240117101221_28.jpg

After

Width: 1920  |  Height: 1358  |  Size: 365 KiB

BIN
src/assets/images/medical/zl_20240117101221_29.jpg

After

Width: 1920  |  Height: 1358  |  Size: 378 KiB

BIN
src/assets/images/medical/zl_20240117101221_30.jpg

After

Width: 1920  |  Height: 1358  |  Size: 382 KiB

BIN
src/assets/images/medical/zl_20240117101221_31.jpg

After

Width: 1920  |  Height: 1358  |  Size: 385 KiB

BIN
src/assets/images/medical/zl_20240117101221_32.jpg

After

Width: 1920  |  Height: 1358  |  Size: 389 KiB

BIN
src/assets/images/medical/zl_20240117101221_33.jpg

After

Width: 1920  |  Height: 1358  |  Size: 384 KiB

BIN
src/assets/images/medical/zl_20240117101221_34.jpg

After

Width: 1920  |  Height: 1358  |  Size: 371 KiB

BIN
src/assets/images/medical/zl_20240117101221_35.jpg

After

Width: 1920  |  Height: 1358  |  Size: 375 KiB

BIN
src/assets/images/medical/zl_20240117101221_36.jpg

After

Width: 1920  |  Height: 1358  |  Size: 368 KiB

BIN
src/assets/images/medical/zl_20240117101221_37.jpg

After

Width: 1920  |  Height: 1358  |  Size: 359 KiB

BIN
src/assets/images/medical/zl_20240117101221_38.jpg

After

Width: 1920  |  Height: 1358  |  Size: 385 KiB

BIN
src/assets/images/medical/zl_20240117101221_39.jpg

After

Width: 1920  |  Height: 1358  |  Size: 369 KiB

BIN
src/assets/images/medical/zl_20240117101221_40.jpg

After

Width: 1920  |  Height: 1358  |  Size: 393 KiB

BIN
src/assets/images/medical/zl_20240117101221_41.jpg

After

Width: 1920  |  Height: 1358  |  Size: 375 KiB

BIN
src/assets/images/medical/zl_20240117101221_42.jpg

After

Width: 1920  |  Height: 1358  |  Size: 370 KiB

BIN
src/assets/images/medical/zl_20240117101221_43.jpg

After

Width: 1920  |  Height: 1358  |  Size: 405 KiB

BIN
src/assets/images/medical/zl_20240117101221_44.jpg

After

Width: 1920  |  Height: 1358  |  Size: 396 KiB

BIN
src/assets/images/medical/zl_20240117101221_45.jpg

After

Width: 1920  |  Height: 1358  |  Size: 378 KiB

BIN
src/assets/images/medical/zl_20240117101221_46.jpg

After

Width: 1920  |  Height: 1358  |  Size: 378 KiB

BIN
src/assets/images/medical/zl_20240117101221_47.jpg

After

Width: 1920  |  Height: 1358  |  Size: 379 KiB

BIN
src/assets/images/medical/zl_20240117101221_48.jpg

After

Width: 1920  |  Height: 1358  |  Size: 383 KiB

BIN
src/assets/images/medical/zl_20240117101221_49.jpg

After

Width: 1920  |  Height: 1358  |  Size: 413 KiB

BIN
src/assets/images/medical/zl_20240117101221_50.jpg

After

Width: 1920  |  Height: 1358  |  Size: 400 KiB

BIN
src/assets/images/medical/zl_20240117101221_51.jpg

After

Width: 1920  |  Height: 1358  |  Size: 390 KiB

BIN
src/assets/images/medical/zl_20240117101221_52.jpg

After

Width: 1920  |  Height: 1358  |  Size: 416 KiB

BIN
src/assets/images/medical/zl_20240117101221_53.jpg

After

Width: 1920  |  Height: 1358  |  Size: 416 KiB

BIN
src/assets/images/medical/zl_20240117101221_54.jpg

After

Width: 1920  |  Height: 1358  |  Size: 384 KiB

BIN
src/assets/images/medical/zl_20240117101221_55.jpg

After

Width: 1920  |  Height: 1358  |  Size: 390 KiB

BIN
src/assets/images/medical/zl_20240117101221_56.jpg

After

Width: 1920  |  Height: 1358  |  Size: 424 KiB

BIN
src/assets/images/medical/zl_20240117101221_57.jpg

After

Width: 1920  |  Height: 1358  |  Size: 402 KiB

BIN
src/assets/images/medical/zl_20240117101221_58.jpg

After

Width: 1920  |  Height: 1358  |  Size: 347 KiB

BIN
src/assets/images/medical/zl_20240117101221_59.jpg

After

Width: 1920  |  Height: 1358  |  Size: 368 KiB

BIN
src/assets/images/medical/zl_20240117101221_60.jpg

After

Width: 1920  |  Height: 1358  |  Size: 375 KiB

BIN
src/assets/images/medical/zl_20240117101221_61.jpg

After

Width: 1920  |  Height: 1358  |  Size: 406 KiB

BIN
src/assets/images/medical/zl_20240117101221_62.jpg

After

Width: 1920  |  Height: 1358  |  Size: 313 KiB

BIN
src/assets/logo.png

After

Width: 200  |  Height: 200  |  Size: 6.7 KiB

104
src/assets/styles/index.scss

@ -0,0 +1,104 @@
.content-main{
display: flex;
justify-content: space-between;
width: 100%;
height: 100vh;
padding: 30px 40px;
background: url('~@/assets/images/bg.png') repeat 0 0;
overflow: hidden;
}
.nav-menu {
background: #ffffff;
width: 300px;
margin-right: 20px;
ul {
margin-top: 30px;
li {
height: 90px;
font-size: 30px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
line-height: 90px;
text-align: center;
margin-bottom: 20px;
&:hover {
background: #e4e4e4;
}
&.is-active {
background: linear-gradient(
318deg,
#38b8d9 0%,
#5394f1 45%,
#a0a9ef 100%
);
color: #ffffff;
}
}
}
}
.menu-list{
position: relative;
flex: 1;
height: calc(100vh - 60px);
background-color: #fff;
overflow: hidden;
.image-swiper {
width: 100%;
height: calc(100vh - 130px);
padding: 20px 20px 0 20px;
}
::v-deep .el-image{
display: block;
height: 100%;
img{
display: block;
width: auto;
height: 100%;
margin: 0 auto;
}
}
.page-div{
font-size: 30px;
position: absolute;
left: 50%;
bottom: 6px;
z-index: 1999;
transform: translate(-50%,-50%);
span{
display: inline-block;
margin-right: 30px;
}
}
.el-empty{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
::v-deep .el-empty__description p{
font-size: 20px;
color: #000;
}
}
}
::v-deep .el-carousel__arrow{
width: 100px;
height: 100%;
background-color: transparent;
border-radius: 0;
i{
width: 36px;
height: 36px;
background: rgba(31, 45, 61, .11);
line-height: 36px;
border-radius: 50%;
text-align: center;
}
}

78
src/assets/styles/style.scss

@ -0,0 +1,78 @@
// 全局样式
* {
margin: 0;
padding: 0;
list-style-type: none;
box-sizing: border-box;
outline: none;
}
html {
margin: 0;
padding: 0;
}
body {
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
background-color: #f1f1f1;
margin: 0;
padding: 0;
}
a {
color: #343440;
text-decoration: none;
}
ul{
margin: 0;
padding: 0;
li{
list-style: none;
}
}
.clearfix {
&::after {
content: "";
display: table;
height: 0;
line-height: 0;
visibility: hidden;
clear: both;
}
}
/**滚动条的宽度*/
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
//滚动条的滑块
::-webkit-scrollbar-thumb {
background-color: #44A9E4;
border-radius: 5px;
}
.icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
//浮动
.float-r {
float: right;
}
//文章一行显示多余省略号显示
.title-item {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
}

147
src/common/flexible.js

@ -0,0 +1,147 @@
(function(win, lib) {
var doc = win.document
var docEl = doc.documentElement
var metaEl = doc.querySelector('meta[name="viewport"]')
var flexibleEl = doc.querySelector('meta[name="flexible"]')
var dpr = 0
var scale = 0
var tid
var flexible = lib.flexible || (lib.flexible = {})
if (metaEl) {
console.warn('将根据已有的meta标签来设置缩放比例')
var match = metaEl
.getAttribute('content')
// eslint-disable-next-line no-useless-escape
.match(/initial\-scale=([\d\.]+)/)
if (match) {
scale = parseFloat(match[1])
dpr = parseInt(1 / scale)
}
} else if (flexibleEl) {
var content = flexibleEl.getAttribute('content')
if (content) {
// eslint-disable-next-line no-useless-escape
var initialDpr = content.match(/initial\-dpr=([\d\.]+)/)
// eslint-disable-next-line no-useless-escape
var maximumDpr = content.match(/maximum\-dpr=([\d\.]+)/)
if (initialDpr) {
dpr = parseFloat(initialDpr[1])
scale = parseFloat((1 / dpr).toFixed(2))
}
if (maximumDpr) {
dpr = parseFloat(maximumDpr[1])
scale = parseFloat((1 / dpr).toFixed(2))
}
}
}
if (!dpr && !scale) {
// eslint-disable-next-line no-unused-vars
var isAndroid = win.navigator.appVersion.match(/android/gi)
var isIPhone = win.navigator.appVersion.match(/iphone/gi)
var devicePixelRatio = win.devicePixelRatio
if (isIPhone) {
// iOS下,对于2和3的屏,用2倍的方案,其余的用1倍方案
if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) {
dpr = 3
} else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)) {
dpr = 2
} else {
dpr = 1
}
} else {
// 其他设备下,仍旧使用1倍的方案
dpr = 1
}
scale = 1 / dpr
}
docEl.setAttribute('data-dpr', dpr)
if (!metaEl) {
metaEl = doc.createElement('meta')
metaEl.setAttribute('name', 'viewport')
metaEl.setAttribute(
'content',
'initial-scale=' +
scale +
', maximum-scale=' +
scale +
', minimum-scale=' +
scale +
', user-scalable=no'
)
if (docEl.firstElementChild) {
docEl.firstElementChild.appendChild(metaEl)
} else {
var wrap = doc.createElement('div')
wrap.appendChild(metaEl)
doc.write(wrap.innerHTML)
}
}
function refreshRem() {
var width = docEl.getBoundingClientRect().width
// 最小1366px,最大适配2560px
if (width / dpr < 1366) {
width = 1366 * dpr
} else if (width / dpr > 2560) {
width = 2560 * dpr
}
// 设置成24等份,设计稿时1920px的,这样1rem就是80px
var rem = width / 24
docEl.style.fontSize = rem + 'px'
flexible.rem = win.rem = rem
}
win.addEventListener(
'resize',
function() {
clearTimeout(tid)
tid = setTimeout(refreshRem, 300)
},
false
)
win.addEventListener(
'pageshow',
function(e) {
if (e.persisted) {
clearTimeout(tid)
tid = setTimeout(refreshRem, 300)
}
},
false
)
if (doc.readyState === 'complete') {
doc.body.style.fontSize = 12 * dpr + 'px'
} else {
doc.addEventListener(
'DOMContentLoaded',
// eslint-disable-next-line no-unused-vars
function(e) {
doc.body.style.fontSize = 12 * dpr + 'px'
},
false
)
}
refreshRem()
flexible.dpr = win.dpr = dpr
flexible.refreshRem = refreshRem
flexible.rem2px = function(d) {
var val = parseFloat(d) * this.rem
if (typeof d === 'string' && d.match(/rem$/)) {
val += 'px'
}
return val
}
flexible.px2rem = function(d) {
var val = parseFloat(d) / this.rem
if (typeof d === 'string' && d.match(/px$/)) {
val += 'rem'
}
return val
}
})(window, window['lib'] || (window['lib'] = {}))

61
src/common/scrollMixins.js

@ -0,0 +1,61 @@
export default {
data() {
return {
scrollDom: null,
interval: null,
scrollTimer: null, // 滚动定时器
pauseTimer: null, // 暂停定时器
timeout: null,
step: null
}
},
created() {
},
mounted() {
// this.dataCompleteFun()
},
destroyed() {
// 清理定时器
clearTimeout(this.pauseTimer)
this.pauseTimer = null
clearInterval(this.scrollTimer)
this.scrollTimer = null
// 清理点击监听
window.document.removeEventListener('click', this.pauseScroll)
},
methods: {
autoScroll() {
// 滚动长度为0
if (this.scrollDom.scrollHeight - this.scrollDom.clientHeight > 0) {
// 如果定时器存在
if (this.scrollTimer) {
// 则先清除
clearInterval(this.scrollTimer)
clearTimeout(this.pauseTimer)
this.scrollTimer = null
this.pauseTimer = null
}
this.scrollTimer = setInterval(() => {
const scrollHeight = this.scrollDom.scrollHeight
const clientHeight = this.scrollDom.clientHeight
const scroll = scrollHeight - clientHeight
// 获取当前滚动条距离顶部高度
const scrollTop = this.scrollDom.scrollTop
// 当滚动到底部时,间隔时间后重回顶部开始
if (scrollTop + this.step >= scroll) {
this.scrollDom.scrollTop = scroll
this.pauseTimer = setTimeout(() => {
this.scrollDom.scrollTop = 0
this.autoScroll()
}, this.timeout)
} else { // 没有则继续滚动
this.scrollDom.scrollTop = scrollTop + this.step
}
// console.log(scrollHeight, clientHeight, scroll, scrollTop)
}, this.interval)
} else {
return
}
}
}
}

28
src/main.js

@ -0,0 +1,28 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 适配flex
import '@/common/flexible.js'
// 引入全局css
import './assets/styles/style.scss'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
import axios from 'axios'
Vue.prototype.$axios = axios
import { parseTime } from '@/utils/index.js'
Vue.filter('parseTime', function(time, cFormat) {
return parseTime(time, cFormat)
})
new Vue({
router,
store,
render: (h) => h(App)
}).$mount('#app')

22
src/router/index.js

@ -0,0 +1,22 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'index',
component: () => import('@/views/index.vue'),
meta: {
title: '医保说明'
}
}
]
const router = new VueRouter({
mode: 'hash',
routes
})
export default router

15
src/store/index.js

@ -0,0 +1,15 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
},
mutations: {
},
actions: {
},
modules: {
}
})

92
src/utils/index.js

@ -0,0 +1,92 @@
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result
const later = function() {
// 据上一次触发时间间隔
const last = +new Date() - timestamp
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
if (last < wait && last > 0) {
timeout = setTimeout(later, wait - last)
} else {
timeout = null
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) {
result = func.apply(context, args)
if (!timeout) context = args = null
}
}
}
return function(...args) {
context = this
timestamp = +new Date()
const callNow = immediate && !timeout
// 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait)
if (callNow) {
result = func.apply(context, args)
context = args = null
}
return result
}
}
// 获取当前日期时间
export function getCurrentTime() {
const yy = new Date().getFullYear()
const mm = new Date().getMonth() + 1
const dd = new Date().getDate()
const hh = new Date().getHours()
const mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
const ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
const time = yy + '年' + mm + '月' + dd + '日 ' + hh + ':' + mf + ':' + ss
return time
}
/**
* Parse the time to string
* @param {(Object|string|number)} time
* @param {string} cFormat
* @returns {string}
*/
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'undefined' || time === null || time === 'null') {
return ''
} else if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}

54
src/utils/request.js

@ -0,0 +1,54 @@
import axios from 'axios'
import { Message } from 'element-ui'
// 创建axios实例
const service = axios.create({
baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_API : '/', // api 的 base_url
timeout: 1000 * 30, // 请求超时时间
headers: {
'Content-Type': 'application/json'
}
})
// request拦截器
service.interceptors.request.use(
config => {
// if (getToken()) {
// config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
// }
const token = '' // 登录后生成用于识别用户身份,项目不需要直接去掉
config.headers['Authorization'] = token || ''
return config
},
error => {
console.error('error: ', error)
Promise.reject(error)
}
)
// response 拦截器
service.interceptors.response.use(
response => {
const errorMsg = response.data.errMsg
if (response.status === 200) {
// console.log(response.data.data)
if (response.data instanceof Blob) {
return response.data
} else if (response.data.data) {
return response.data.data
} else {
return response.data
}
} else {
Message.error({
message: errorMsg,
duration: 5000
})
Promise.reject()
}
},
error => {
return Promise.reject(error)
}
)
export default service

26
src/utils/resizeMixins.js

@ -0,0 +1,26 @@
// 混入代码 resize-mixins.js
import { debounce } from '@/utils/index'
const resizeChartMethod = '$__resizeChartMethod'
export default {
data() {
// 在组件内部将图表init的引用映射到chart属性上
return {
chart: null
}
},
created() {
window.addEventListener('resize', this[resizeChartMethod], false)
},
beforeDestroy() {
window.removeEventListener('reisze', this[resizeChartMethod])
},
methods: {
// 通过lodash的防抖函数来控制resize的频率
[resizeChartMethod]: debounce(function() {
if (this.chart) {
this.chart.resize()
}
}, 100)
}
}

166
src/views/index.vue

@ -0,0 +1,166 @@
<template>
<div class="content-main">
<div class="nav-menu">
<ul>
<li :class="{ 'is-active': selectMenuIndex === 0 }" @click="selectMenuChange(0)">药品公示</li>
<li :class="{ 'is-active': selectMenuIndex === 1 }" @click="selectMenuChange(1)">诊疗项目</li>
</ul>
</div>
<div class="menu-list">
<!-- <div v-loading="loading" class="swiper mySwiper">
<div class="swiper-wrapper">
<div v-for="(item,index) in swiperList" :key="index" class="swiper-slide">
<img :src=" linkSrc + '/whfly/getImage.do?id=' + item.id">
</div>
</div>
</div>
<div v-if="swiperList.length !== 0" class="swiper-button-prev" />
<div v-if="swiperList.length !== 0" class="swiper-button-next" /> -->
<!-- @change="(idx) => (curIndex = idx)" -->
<!-- :arrow="swiperList.length <= 1 ? 'never' : 'always'" -->
<el-carousel
v-loading="loading"
class="image-swiper"
:loop="false"
:height="'100%'"
:interval="8000"
:initial-index="curIndex"
indicator-position="none"
:arrow="swiperList.length <= 1 ? 'never' : 'always'"
@change="changeCarousel"
>
<!-- :src="'data:image/png;base64,' + arrayBufferToBase64(item.image)" -->
<!-- :src="linkSrc + '/whfly/getImage.do?id=' + item.id" -->
<el-carousel-item v-for="(item, index) in swiperList" :key="index">
<el-image
:src="linkSrc + '/whfly/getImage.do?id=' + item.id"
:preview-src-list="swiperList.map(item => linkSrc + '/whfly/getImage.do?id=' + item.id)"
:initial-index="index"
:fit="'cover'"
/>
</el-carousel-item>
</el-carousel>
<div v-if="swiperList.length!==0 " class="page-div"><span> {{ curIndex+1 }} </span> {{ totalRows }} </div>
<el-empty v-if="swiperList.length === 0 && !loading" :image-size="200" />
</div>
</div>
</template>
<script>
import { getGuaranteeImage } from '@/api/inquiryMachine'
// import { Swiper } from 'vue-awesome-swiper'
// import 'swiper/swiper-bundle.css'
export default {
name: 'ActivityDetail',
data() {
return {
curIndex: 0,
loading: false,
selectMenuIndex: 0,
selectName: '药品公示',
itemParams: null,
swiperList: [],
pageNo: 1,
totalPages: 0,
totalRows: 0,
linkSrc: process.env.VUE_APP_BASE_API,
swiper: null
}
},
created() {
this.itemParams = JSON.parse(localStorage.getItem('activityDetail'))
if (JSON.parse(localStorage.getItem('selectIndex')) === 1) {
this.selectMenuIndex = 1
this.selectName = '诊疗项目'
} else {
this.selectMenuIndex = 0
this.selectName = '药品公示'
}
this.loading = true
this.getIntroductionInfo()
},
mounted() {
},
methods: {
// initSwiper() {
// const _this = this
// _this.swiper = new Swiper('.swiper', {
// autoplay: {
// delay: 5000,
// disableOnInteraction: false
// },
// navigation: {
// nextEl: '.swiper-button-next',
// prevEl: '.swiper-button-prev'
// },
// on: {
// slideChangeTransitionEnd: function() {
// if (this.activeIndex % 8 === 0 && parseInt(_this.pageNo) <= parseInt(_this.totalPages)) {
// _this.getIntroductionInfo()
// }
// }
// }
// })
// },
selectMenuChange(index) {
this.loading = true
this.curIndex = 0
this.swiperList = []
this.pageNo = 1
this.selectMenuIndex = index
if (index === 1) {
this.selectName = '诊疗项目'
} else {
this.selectName = '药品公示'
}
this.getIntroductionInfo()
localStorage.setItem('selectMenuIndex', JSON.stringify(this.selectMenuIndex))
},
getIntroductionInfo() {
const parmas = {
'classify': this.selectName,
'pageNo': this.pageNo,
'pageSize': 4
}
getGuaranteeImage(parmas).then(res => {
// console.log(res.picList.length)
this.totalPages = res.page.totalPages
this.totalRows = res.page.totalRows
if (parseInt(this.pageNo) > parseInt(res.page.totalPages) && res.picList.length === 0) {
this.loading = false
return false
} else {
this.pageNo++
this.swiperList.push(...res.picList)
// this.$nextTick(function() {
// this.initSwiper()
// })
this.loading = false
}
})
},
// text
changeCarousel(active, val) {
this.curIndex = active
if (active % 2 === 0 && parseInt(this.pageNo) <= parseInt(this.totalPages)) {
this.getIntroductionInfo()
}
}
// arrayBufferToBase64(buffer) {
// var binary = ''
// var bytes = new Uint8Array(buffer)
// var len = bytes.byteLength
// for (var i = 0; i < len; i++) {
// binary += String.fromCharCode(bytes[i])
// }
// return window.btoa(binary)
// }
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/index.scss";
</style>

62
vue.config.js

@ -0,0 +1,62 @@
const path = require('path')
const resolve = dir => {
return path.join(__dirname, dir)
}
const name = '医保说明'
module.exports = {
publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
outputDir: 'dist',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
port: 3000,
open: true,
overlay: {
warnings: false,
errors: true
},
// host: 'localhost',
proxy: {
'/whfl': {
target: process.env.VUE_APP_BASE_API,
changeOrigin: true,
pathRewrite: {
'^/whfl': 'whfl'
}
},
'/auth': {
target: process.env.VUE_APP_BASE_API,
changeOrigin: true,
pathRewrite: {
'^/auth': 'auth'
}
}
}
},
configureWebpack: {
name: name,
resolve: {
alias: {
'@': resolve('src')
}
},
performance: {
hints: 'warning',
// 入口起点的最大体积
maxEntrypointSize: 50000000,
// 生成文件的最大体积
maxAssetSize: 30000000
}
},
chainWebpack: config => {
config.resolve
.alias.set('_c', resolve('src/components'))
config.plugin('html')
.tap(args => {
args[0].title = '医保说明'
return args
})
}
}
Loading…
Cancel
Save