├── static └── .gitkeep ├── images ├── 发药界面.png ├── 开药界面.png ├── 挂号界面.png ├── 登录界面.png ├── 看诊界面.png ├── 缴费界面.png └── 退号界面.png ├── src ├── assets │ ├── bg.jpg │ ├── bg1.jpg │ ├── bg1.png │ ├── bg2.jpg │ ├── bg3.gif │ ├── bg3.jpg │ ├── bg5.jpg │ └── 404_images │ │ ├── 404.png │ │ └── 404_cloud.png ├── store │ ├── getters.js │ ├── index.js │ └── modules │ │ └── user.js ├── utils │ ├── auth.js │ └── request.js ├── App.vue ├── api │ ├── login.js │ ├── diagnose.js │ └── registration.js ├── main.js ├── permission.js ├── router │ └── index.js └── views │ ├── doctor │ ├── diagnose.vue │ └── component │ │ ├── PrescriptionTemplate.vue │ │ ├── IllnessDiagnose.vue │ │ ├── PatientList.vue │ │ ├── MedicalMainPage.vue │ │ └── PrescriptionPane.vue │ ├── registration │ ├── refund.vue │ ├── withdraw_regis.vue │ ├── pay.vue │ └── regis.vue │ ├── index.vue │ ├── 404.vue │ ├── login │ └── index.vue │ └── medicine │ └── medicine.vue ├── Dockerfile ├── config ├── prod.env.js ├── dev.env.js └── index.js ├── .editorconfig ├── .gitignore ├── .babelrc ├── .postcssrc.js ├── index.html ├── nginx.conf ├── README.md └── package.json /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/发药界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/images/发药界面.png -------------------------------------------------------------------------------- /images/开药界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/images/开药界面.png -------------------------------------------------------------------------------- /images/挂号界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/images/挂号界面.png -------------------------------------------------------------------------------- /images/登录界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/images/登录界面.png -------------------------------------------------------------------------------- /images/看诊界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/images/看诊界面.png -------------------------------------------------------------------------------- /images/缴费界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/images/缴费界面.png -------------------------------------------------------------------------------- /images/退号界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/images/退号界面.png -------------------------------------------------------------------------------- /src/assets/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/bg.jpg -------------------------------------------------------------------------------- /src/assets/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/bg1.jpg -------------------------------------------------------------------------------- /src/assets/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/bg1.png -------------------------------------------------------------------------------- /src/assets/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/bg2.jpg -------------------------------------------------------------------------------- /src/assets/bg3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/bg3.gif -------------------------------------------------------------------------------- /src/assets/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/bg3.jpg -------------------------------------------------------------------------------- /src/assets/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/bg5.jpg -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx 2 | COPY nginx.conf /etc/nginx/nginx.conf 3 | COPY dist/ /usr/vuejs/nginx -------------------------------------------------------------------------------- /src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/404_images/404.png -------------------------------------------------------------------------------- /src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiangZei/his_frontend/HEAD/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"', 4 | BASE_API: '"http://192.168.133.129:8080"' 5 | } 6 | -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | token:state=>state.user.token, 3 | msg:state=>state.user.msg, 4 | type:state=>state.user.type 5 | }; 6 | export default getters 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 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:'"http://localhost:8080"' 8 | }); 9 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import user from './modules/user' 4 | import getters from './getters' 5 | Vue.use(Vuex); 6 | 7 | const store = new Vuex.Store({ 8 | modules:{ 9 | user 10 | }, 11 | getters 12 | }); 13 | 14 | export default store 15 | -------------------------------------------------------------------------------- /src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | const TokenKey = 'loginToken'; 3 | 4 | 5 | export function getToken(){ 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token){ 10 | return Cookies.set(TokenKey,token) 11 | } 12 | 13 | export function removeToken(){ 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 23 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | his1 7 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | worker_processes 1; 2 | events { 3 | worker_connections 1024; 4 | } 5 | 6 | http { 7 | include mime.types; 8 | default_type application/octet-stream; 9 | sendfile on; 10 | keepalive_timeout 65; 11 | server { 12 | listen 8081; 13 | server_name localhost; 14 | root /usr/vuejs/nginx/; 15 | index index.html; 16 | location =/login{ 17 | proxy_pass http://localhost:8081/; // 服务地址 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/api/login.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | 4 | export function login(type,username,password){ 5 | return request({ 6 | url:'/admin/login', 7 | method:'post', 8 | data:{ 9 | username, 10 | password, 11 | type 12 | } 13 | }) 14 | } 15 | 16 | export function getInfo(username){ 17 | return request({ 18 | url:'/admin/getInfo?username='+username, 19 | method:'get' 20 | }) 21 | } 22 | 23 | export function logout(){ 24 | return request({ 25 | url:'/admin/logout', 26 | method:'get' 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 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 | 5 | 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | import locale from 'element-ui/lib/locale/lang/zh-CN' 9 | import App from './App' 10 | import router from './router' 11 | 12 | import store from './store' 13 | Vue.use(ElementUI,{locale}) 14 | Vue.config.productionTip = false 15 | import '@/permission' 16 | 17 | 18 | /* eslint-disable no-new */ 19 | new Vue({ 20 | el: '#app', 21 | router, 22 | store, 23 | components: { App }, 24 | template: '' 25 | }) 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # his1 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | ``` 20 | 21 | ## 登录界面 22 | 23 | ![](images/登录界面.png) 24 | 25 | ## 挂号界面 26 | 27 | ![挂号界面](images/挂号界面.png) 28 | 29 | ## 退号界面 30 | 31 | ![退号界面](images/退号界面.png) 32 | 33 | ## 缴费界面 34 | 35 | ![缴费界面](images/缴费界面.png) 36 | 37 | ## 看诊界面 38 | 39 | ![看诊界面](images/看诊界面.png) 40 | 41 | ## 开药界面 42 | 43 | ![开药界面](images/开药界面.png) 44 | 45 | ## 发药界面 46 | 47 | ![发药界面](images/发药界面.png) -------------------------------------------------------------------------------- /src/permission.js: -------------------------------------------------------------------------------- 1 | import Nprogress from 'nprogress' 2 | import 'nprogress/nprogress.css' 3 | import {getToken,removeToken} from "@/utils/auth"; 4 | import {Message} from 'element-ui' 5 | import router from './router' 6 | import store from './store' 7 | 8 | //路由拦截 9 | router.beforeEach((to,from,next)=>{ 10 | Nprogress.start(); 11 | if(getToken()){ 12 | if(to.path==='/'){ 13 | removeToken(); //删掉token 14 | next() 15 | Nprogress.done() 16 | }else{ 17 | if(store.getters.msg.length===0){ 18 | store.dispatch('GetInfo').then(res=>{ //拉取用户信息 19 | next() 20 | }).catch((err)=>{ 21 | store.dispatch('FedLogOut').then(()=>{ 22 | Message.error(err||"Vertification failed,please login again") 23 | next({path:'/'}) 24 | }) 25 | }) 26 | }else{ 27 | next() 28 | } 29 | next() 30 | Nprogress.done(); 31 | } 32 | }else{ 33 | if(to.path!=='/'){ 34 | next({path: '/'}) 35 | }else{ 36 | next() 37 | } 38 | Nprogress.done(); 39 | } 40 | }) 41 | -------------------------------------------------------------------------------- /src/utils/request.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import {Message,MessageBox} from 'element-ui' 3 | import store from '../store' 4 | import {getToken} from '@/utils/auth' 5 | 6 | //创建axios实例 7 | const service = axios.create({ 8 | baseURL: process.env.BASE_API,//api的base_url 9 | timeout:4000//请求超时时间 10 | }); 11 | 12 | 13 | //request拦截器 14 | service.interceptors.request.use(config=>{ 15 | if(store.getters.token){ 16 | config.headers['Authorization']=getToken() // 让每个请求携带自定义token 17 | } 18 | return config 19 | },error=>{ 20 | alert("请求出错误") 21 | console.log(error) 22 | Promise.reject(error) 23 | } 24 | ) 25 | 26 | //response拦截器 27 | service.interceptors.response.use( 28 | response=>{ 29 | /* 30 | 状态码非200抛错 31 | */ 32 | const res = response.data 33 | 34 | if(res.code!==200){ 35 | Message({ 36 | message:res.message, 37 | type:'error', 38 | duration:1000 39 | }) 40 | // 401:未登录 41 | if(res.code===401||res.code===403){ 42 | MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登陆','确定登出',{ 43 | confirmButtonText:'重新登陆', 44 | cancelButtonText:'取消', 45 | type:'warning' 46 | }).then(()=>{ 47 | store.dispatch('FedLogOut').then(()=>{ 48 | location.reload() //为了重新实例化vue-router对象 避免bug 49 | }) 50 | }) 51 | } 52 | return Promise.reject('error') 53 | }else{ 54 | return response.data 55 | } 56 | }, 57 | error=>{ 58 | console.log('err'+error)//for debug 59 | Message({ 60 | message:error.message, 61 | type:'error', 62 | duration:1000 63 | }) 64 | return Promise.reject(error) 65 | } 66 | ) 67 | 68 | export default service 69 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | 4 | 5 | Vue.use(Router) 6 | export default new Router({ 7 | routes: [ 8 | // { 9 | // path: '/',component: ()=>import('@/views/login/index'), hidden:true 10 | // }, 11 | { 12 | path: '/', 13 | component: () => import('@/views/login/index'), 14 | hidden: true 15 | }, 16 | {path:'/404',component:()=>import("@/views/404")}, 17 | { 18 | path: '/admain', 19 | // redirect:'/admain/regis', 20 | name: 'admain', 21 | meta:{requireAuth:true}, 22 | component: () => import('@/views/index'), 23 | // component: Layout, 24 | children:[ 25 | { 26 | path:'regis', 27 | name:'regis', 28 | meta:{requireAuth:true}, 29 | component:()=>import('@/views/registration/regis') 30 | }, 31 | { 32 | path:'withdraw_regis', 33 | name:'withdraw_regis', 34 | meta:{requireAuth:true}, 35 | component:()=>import('@/views/registration/withdraw_regis') 36 | }, 37 | { 38 | path:'pay', 39 | name:'pay', 40 | meta:{requireAuth:true}, 41 | component:()=>import('@/views/registration/pay') 42 | }, 43 | { 44 | path:'refund', 45 | name:'refund', 46 | meta:{requireAuth:true}, 47 | component:()=>import('@/views/registration/refund') 48 | }, 49 | { 50 | path:'diagnose', 51 | name:'diagnose', 52 | meta:{requireAuth:true}, 53 | component:()=>import('@/views/doctor/diagnose') 54 | }, 55 | { 56 | path:'medicine', 57 | name:'medicine', 58 | meta:{requireAuth:true}, 59 | component:()=>import('@/views/medicine/medicine') 60 | } 61 | ] 62 | }, 63 | {path:'*',redirect:'/404',hidden:true} 64 | ] 65 | }) 66 | 67 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 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 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../dist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../dist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: '/', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "his1", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "XiangZei <2219049571@qq.com>", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "axios": "^0.19.0", 14 | "element-ui": "^2.10.1", 15 | "iview": "^3.4.2", 16 | "js-cookie": "^2.2.0", 17 | "node-sass": "^4.12.0", 18 | "nprogress": "^0.2.0", 19 | "sass-loader": "^7.1.0", 20 | "vue": "^2.5.2", 21 | "vue-router": "^3.0.1", 22 | "vuex": "^3.1.1", 23 | "webpack-bundle-analyzer": ">=3.3.2", 24 | "webpack-dev-server": ">=3.1.11" 25 | }, 26 | "devDependencies": { 27 | "autoprefixer": "^7.1.2", 28 | "babel-core": "^6.22.1", 29 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 30 | "babel-loader": "^7.1.1", 31 | "babel-plugin-syntax-jsx": "^6.18.0", 32 | "babel-plugin-transform-runtime": "^6.22.0", 33 | "babel-plugin-transform-vue-jsx": "^3.5.0", 34 | "babel-preset-env": "^1.3.2", 35 | "babel-preset-stage-2": "^6.22.0", 36 | "chalk": "^2.0.1", 37 | "copy-webpack-plugin": "^4.0.1", 38 | "css-loader": "^0.28.0", 39 | "extract-text-webpack-plugin": "^3.0.0", 40 | "file-loader": "^1.1.4", 41 | "friendly-errors-webpack-plugin": "^1.6.1", 42 | "html-webpack-plugin": "^2.30.1", 43 | "node-notifier": "^5.1.2", 44 | "node-sass": "^4.12.0", 45 | "optimize-css-assets-webpack-plugin": "^3.2.0", 46 | "ora": "^1.2.0", 47 | "portfinder": "^1.0.13", 48 | "postcss-import": "^11.0.0", 49 | "postcss-loader": "^2.0.8", 50 | "postcss-url": "^7.2.1", 51 | "rimraf": "^2.6.0", 52 | "sass-loader": "^7.1.0", 53 | "semver": "^5.3.0", 54 | "shelljs": "^0.7.6", 55 | "uglifyjs-webpack-plugin": "^1.1.1", 56 | "url-loader": "^0.5.8", 57 | "vue-loader": "^13.3.0", 58 | "vue-style-loader": "^3.0.1", 59 | "vue-template-compiler": "^2.5.2", 60 | "webpack": "^3.6.0", 61 | "webpack-bundle-analyzer": "^2.9.0", 62 | "webpack-dev-server": "^2.9.1", 63 | "webpack-merge": "^4.1.0" 64 | }, 65 | "engines": { 66 | "node": ">= 6.0.0", 67 | "npm": ">= 3.0.0" 68 | }, 69 | "browserslist": [ 70 | "> 1%", 71 | "last 2 versions", 72 | "not ie <= 8" 73 | ] 74 | } 75 | -------------------------------------------------------------------------------- /src/store/modules/user.js: -------------------------------------------------------------------------------- 1 | import {login,logout,getInfo} from '@/api/login' 2 | import {getToken,setToken,removeToken} from "@/utils/auth"; 3 | 4 | const user={ 5 | state:{ 6 | token:getToken(), 7 | name:localStorage.getItem("name"), 8 | avatar:'', 9 | type:localStorage.getItem("type"), 10 | msg:[], 11 | id:10 12 | }, 13 | mutations:{ 14 | SET_TOKEN:(state, token)=>{ 15 | state.token=token 16 | }, 17 | SET_NAME:(state,name)=> { 18 | localStorage.setItem("name",name) 19 | state.name = name 20 | }, 21 | SET_AVATAR:(state,avatar)=>{ 22 | state.avatar = avatar 23 | }, 24 | SET_TYPE:(state,type)=>{ 25 | localStorage.setItem("type",type) 26 | state.type=type 27 | }, 28 | SET_MSG:(state,msg)=>{ 29 | state.msg=msg 30 | } 31 | }, 32 | actions:{ 33 | Login({commit},userInfo){ 34 | const username = userInfo.username.trim() 35 | return new Promise((resolve,reject)=>{ 36 | commit('SET_NAME',username) 37 | if(userInfo.type==1){ 38 | commit('SET_TYPE',"管理员") 39 | }else if(userInfo.type==2){ 40 | commit("SET_TYPE","挂号收费员") 41 | }else if(userInfo.type==3){ 42 | commit("SET_TYPE","医生") 43 | } 44 | login(userInfo.type,username,userInfo.password).then( 45 | response=>{ 46 | const data = response.data; 47 | const tokenStr = data.tokenHead+data.token 48 | setToken(tokenStr) 49 | commit('SET_TOKEN',tokenStr) 50 | 51 | resolve() 52 | }).catch(error=>{ 53 | reject(error) 54 | }) 55 | }) 56 | }, 57 | //获取用户信息 58 | GetInfo({commit,state}){ 59 | return new Promise((resolve,reject)=>{ 60 | getInfo(state.name).then(response=>{ 61 | const data = response.data 62 | if(data.msg&&data.msg.length>0){ 63 | commit('SET_MSG',data.msg) 64 | } 65 | commit('SET_AVATAR',data.avatar) 66 | resolve(response) 67 | }).catch(error=>{ 68 | reject(error) 69 | }) 70 | }) 71 | }, 72 | //登出 73 | LogOut({commit,state}){ 74 | return new Promise((resolve,reject)=>{ 75 | logout().then(()=>{ 76 | commit('SET_TOKEN','') 77 | commit('SET_NAME','') 78 | commit('SET_AVATAR','') 79 | commit('SET_TYPE','') 80 | commit('SET_MSG',[]) 81 | removeToken() 82 | resolve() 83 | }).catch(error=>{ 84 | reject(error) 85 | }) 86 | }) 87 | }, 88 | //前端 登出 89 | FedLogOut({commit}){ 90 | return new Promise(resolve=>{ 91 | commit('SET_TOKEN','') 92 | removeToken() 93 | resolve() 94 | }) 95 | } 96 | } 97 | }; 98 | export default user 99 | -------------------------------------------------------------------------------- /src/api/diagnose.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getpatientlist(docid){ 4 | return request({ 5 | url:'/diagnose/getPatientList?docid='+docid, 6 | method:'GET' 7 | }) 8 | } 9 | 10 | export function submitmedicalmainpage(medicalmainpage){ 11 | return request({ 12 | url:'/diagnose/submitMedicalMainPage', 13 | method: 'POST', 14 | data:medicalmainpage 15 | }) 16 | } 17 | 18 | export function changestatus(registid){ 19 | return request({ 20 | url:'/diagnose/changeStatus', 21 | method:'POST', 22 | data:{ 23 | "registid":registid 24 | } 25 | }) 26 | } 27 | 28 | export function openpre(medicalrecordid,registid,docid,medicalrecordname){ 29 | return request({ 30 | url:'/diagnose/addPrescription', 31 | method:'POST', 32 | data:{ 33 | "medicalrecordid":medicalrecordid, 34 | "registid":registid, 35 | "docid":docid, 36 | "medicalrecordname":medicalrecordname, 37 | "createtime":"", 38 | "status":1 39 | } 40 | }) 41 | } 42 | 43 | export function filldetail(prescriptionid,detailmsg){ 44 | return request({ 45 | url:'/diagnose/filldetail', 46 | method:'POST', 47 | data:{ 48 | "prescriptionid":prescriptionid, 49 | "drugid":detailmsg.drugid, 50 | "usage":detailmsg.usage, 51 | "uselevel":detailmsg.uselevel, 52 | "freq":detailmsg.freq, 53 | "num":detailmsg.num, 54 | "status":1 55 | } 56 | }) 57 | } 58 | //this.prescriptionSelection[a].prescriptionname,this.patient.registid,this.patient.mdeicalrecordid 59 | export function cancel(prescriptionname,registid,medicalrecordid){ 60 | return request({ 61 | url:'/diagnose/cancel', 62 | method:'POST', 63 | data:{ 64 | "prescriptionname":prescriptionname, 65 | "registid":registid, 66 | "medicalrecordid":medicalrecordid, 67 | "status":2 68 | } 69 | }) 70 | } 71 | 72 | export function searchdrug(code){ 73 | return request({ 74 | url:'/diagnose/searchdrug?code='+code, 75 | method:'GET' 76 | }) 77 | } 78 | 79 | export function getPrescriptionList(){ 80 | return request({ 81 | url:'/diagnose/getPrescriptionTemplateList', 82 | method:'GET' 83 | }) 84 | } 85 | 86 | export function getprescriptionDetail(id){ 87 | return request({ 88 | url:'/diagnose/getPrescriptionDetail?id='+id, 89 | method:'GET' 90 | }) 91 | } 92 | 93 | export function getIllnessCata(){ 94 | return request({ 95 | url:'/diagnose/getIllnessCata', 96 | method:'GET' 97 | }) 98 | } 99 | 100 | export function searchill(val){ 101 | return request({ 102 | url:'/diagnose/searchill?cataid='+val, 103 | method:"GET" 104 | }) 105 | } 106 | // "illcode": "SH", 107 | // "illname": "伤寒", 108 | // "icdcode": "A01.001" 109 | // "illid":1 110 | export function addFirstDiagnose(diagnoseill,medicalrecordid,registid){ 111 | return request({ 112 | url:'/diagnose/addFirstDiagnose', 113 | method:"POST", 114 | data:{ 115 | "illid":diagnoseill.illid, 116 | "diagnosetype":diagnoseill.diagnosetype, 117 | "finaldiagnose":1, 118 | "medicalrecordid":medicalrecordid, 119 | "registid":registid, 120 | "diagnosetime":"" 121 | } 122 | }) 123 | } 124 | 125 | export function getdiagnose(medicalrecordid,registid){ 126 | return request({ 127 | url:'/diagnose/getDiagnose', 128 | method:"POST", 129 | data:{ 130 | "medicalrecordid":medicalrecordid, 131 | "registid":registid 132 | } 133 | }) 134 | } 135 | 136 | export function finishdiagnose(registid){ 137 | return request({ 138 | url:"/diagnose/finishdiagnose", 139 | method:"POST", 140 | data:{ 141 | registid 142 | } 143 | }) 144 | } 145 | 146 | export function coverMedicalMainPage(medicalmainpage){ 147 | return request({ 148 | url:'/diagnose/coverMedicalMainPage', 149 | method: 'POST', 150 | data:medicalmainpage 151 | }) 152 | } 153 | -------------------------------------------------------------------------------- /src/api/registration.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getdoclist(depName,regType){ 4 | return request({ 5 | url:'/registration/getDocList?depName='+depName+'®Type='+regType, 6 | method:'GET' 7 | }) 8 | } 9 | 10 | export function getrequiremsg(){ 11 | return request({ 12 | url:'/registration/getRequireMsg', 13 | method:'GET' 14 | }) 15 | } 16 | 17 | export function getpatientmsg(medicalNum){ 18 | return request({ 19 | url:'/registration/getPatientMsg?medicalNum='+medicalNum, 20 | method:'GET' 21 | }) 22 | } 23 | 24 | export function getleft(docNum){ 25 | return request({ 26 | url:'/registration/getleft?docNum='+docNum, 27 | method:'GET' 28 | }) 29 | } 30 | 31 | export function regis(form){ 32 | return request({ 33 | url:'/registration/regis', 34 | method:'POST', 35 | data:form 36 | }) 37 | } 38 | 39 | export function getRegistMsg(medicalNum){ 40 | return request({ 41 | url:'/registration/getRegistMsg?medicalrecordid='+medicalNum, 42 | method:"GET" 43 | }) 44 | } 45 | 46 | export function withdrawRegis(registid){ 47 | return request({ 48 | url:'/registration/withdrawRegis?registid='+registid, 49 | method:'GET' 50 | }) 51 | } 52 | export function getPayType(){ 53 | return request({ 54 | url:'/registration/getPayType', 55 | method:'GET' 56 | }) 57 | } 58 | 59 | export function settlement(registid,medicalrecordid,docid,chargetype,invoiceNum){ 60 | return request({ 61 | url:'/registration/settlement', 62 | method:'POST', 63 | data:{ 64 | "registid":registid, 65 | "medicalrecordid":medicalrecordid, 66 | "docid":docid, 67 | "chargetype":chargetype, 68 | "invoicenum":invoiceNum 69 | } 70 | }) 71 | } 72 | 73 | export function feeSettlement(registid,medicalrecordid,docid) { 74 | return request({ 75 | url:'/registration/feeSettlement', 76 | method:'POST', 77 | data:{ 78 | "registid":registid, 79 | "medicalrecordid":medicalrecordid, 80 | "docid":docid, 81 | "chargetype":0, 82 | "invoicenum":0 83 | } 84 | }) 85 | } 86 | 87 | export function getPreMsg(medicalrecordid){ 88 | return request({ 89 | url:'/registration/getPreMsg?medicalrecordid='+medicalrecordid, 90 | method:'GET' 91 | }) 92 | } 93 | 94 | export function settlement_1(registid,docid,form,row){ 95 | return request({ 96 | url:'/registration/Settlement', 97 | method:'POST', 98 | data:{ 99 | "registid":registid, 100 | "pd":row.prescriptionid, 101 | "protype":1, 102 | "drugname":row.drugname, 103 | "fee":row.fee, 104 | "quantity":row.num, 105 | "depid":row.depid, 106 | "starttime":row.createtime, 107 | "startdocid":row.docid, 108 | "chargetime":"", 109 | "docid":docid, 110 | "medicalrecordid":form.medicalrecordid, 111 | "pdi":row.pdi, 112 | "paytype":form.paytype, 113 | } 114 | }) 115 | } 116 | 117 | export function startinvoice(form,personid){ 118 | return request({ 119 | url:'/registration/startinvoice', 120 | method:'POST', 121 | data:{ 122 | "invoicenum":form.invoiceid, 123 | "invoicefee":form.fee, 124 | "invoicevalid":1, 125 | "time":"", 126 | "personid":personid, 127 | "registid":form.medicalrecordid, 128 | "chargetype":form.paytype, 129 | "rushredinvoice":'', 130 | "invoicestate":0 131 | } 132 | }) 133 | } 134 | 135 | export function distributemedicine(registid,docid,form,row){ 136 | return request({ 137 | url:'/registration/distributemedicine', 138 | method:'POST', 139 | data:{ 140 | "pdi":row.pdi 141 | } 142 | }) 143 | } 144 | export function getPreMsg_medicine(medicalrecordid){ 145 | return request({ 146 | url:'/registration/getPreMsgMedicine?medicalrecordid='+medicalrecordid, 147 | method:'GET' 148 | }) 149 | } -------------------------------------------------------------------------------- /src/views/doctor/diagnose.vue: -------------------------------------------------------------------------------- 1 | 33 | 118 | 119 | 128 | 129 | -------------------------------------------------------------------------------- /src/views/registration/refund.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | 310 | -------------------------------------------------------------------------------- /src/views/index.vue: -------------------------------------------------------------------------------- 1 | 73 | 74 | 130 | 131 | 163 | -------------------------------------------------------------------------------- /src/views/doctor/component/PrescriptionTemplate.vue: -------------------------------------------------------------------------------- 1 | 76 | 77 | 168 | 169 | 172 | -------------------------------------------------------------------------------- /src/views/404.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 31 | 32 | 226 | -------------------------------------------------------------------------------- /src/views/registration/withdraw_regis.vue: -------------------------------------------------------------------------------- 1 | 2 | 89 | 188 | 189 | 212 | -------------------------------------------------------------------------------- /src/views/login/index.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 163 | 164 | 280 | -------------------------------------------------------------------------------- /src/views/medicine/medicine.vue: -------------------------------------------------------------------------------- 1 | 100 | 101 | 244 | 267 | -------------------------------------------------------------------------------- /src/views/doctor/component/IllnessDiagnose.vue: -------------------------------------------------------------------------------- 1 | 141 | 142 | 246 | 247 | 252 | -------------------------------------------------------------------------------- /src/views/doctor/component/PatientList.vue: -------------------------------------------------------------------------------- 1 | 110 | 111 | 277 | 278 | 281 | -------------------------------------------------------------------------------- /src/views/registration/pay.vue: -------------------------------------------------------------------------------- 1 | 157 | 158 | 340 | 363 | -------------------------------------------------------------------------------- /src/views/doctor/component/MedicalMainPage.vue: -------------------------------------------------------------------------------- 1 | 122 | 123 | 305 | 306 | 307 | 321 | -------------------------------------------------------------------------------- /src/views/registration/regis.vue: -------------------------------------------------------------------------------- 1 | 228 | 436 | 439 | -------------------------------------------------------------------------------- /src/views/doctor/component/PrescriptionPane.vue: -------------------------------------------------------------------------------- 1 | 253 | 254 | 590 | 591 | 616 | --------------------------------------------------------------------------------