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?H~I;{LQWk3aKK8$bLRyt$g?- { + const notifier = require('node-notifier') + + return (severity, errors) => { + if (severity !== 'error') return + + const error = errors[0] + const filename = error.file && error.file.split('!').pop() + + notifier.notify({ + title: packageConfig.name, + message: severity + ': ' + error.name, + subtitle: filename || '', + icon: path.join(__dirname, 'logo.png') + }) + } +} diff --git a/build/vue-loader.conf.js b/build/vue-loader.conf.js new file mode 100644 index 0000000..33ed58b --- /dev/null +++ b/build/vue-loader.conf.js @@ -0,0 +1,22 @@ +'use strict' +const utils = require('./utils') +const config = require('../config') +const isProduction = process.env.NODE_ENV === 'production' +const sourceMapEnabled = isProduction + ? config.build.productionSourceMap + : config.dev.cssSourceMap + +module.exports = { + loaders: utils.cssLoaders({ + sourceMap: sourceMapEnabled, + extract: isProduction + }), + cssSourceMap: sourceMapEnabled, + cacheBusting: config.dev.cacheBusting, + transformToRequire: { + video: ['src', 'poster'], + source: 'src', + img: 'src', + image: 'xlink:href' + } +} diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js new file mode 100644 index 0000000..1f4f47e --- /dev/null +++ b/build/webpack.base.conf.js @@ -0,0 +1,92 @@ +'use strict' +const path = require('path') +const utils = require('./utils') +const config = require('../config') +const vueLoaderConfig = require('./vue-loader.conf') + +function resolve (dir) { + return path.join(__dirname, '..', dir) +} + +const createLintingRule = () => ({ + test: /\.(js|vue)$/, + loader: 'eslint-loader', + enforce: 'pre', + include: [resolve('src'), resolve('test')], + options: { + formatter: require('eslint-friendly-formatter'), + emitWarning: !config.dev.showEslintErrorsInOverlay + } +}) + +module.exports = { + context: path.resolve(__dirname, '../'), + entry: { + app: './src/main.js' + }, + output: { + path: config.build.assetsRoot, + filename: '[name].js', + publicPath: process.env.NODE_ENV === 'production' + ? config.build.assetsPublicPath + : config.dev.assetsPublicPath + }, + resolve: { + extensions: ['.js', '.vue', '.json'], + alias: { + 'vue$': 'vue/dist/vue.esm.js', + '@': resolve('src'), + } + }, + module: { + rules: [ + ...(config.dev.useEslint ? [createLintingRule()] : []), + { + test: /\.vue$/, + loader: 'vue-loader', + options: vueLoaderConfig + }, + { + test: /\.js$/, + loader: 'babel-loader', + include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] + }, + { + test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, + loader: 'url-loader', + options: { + limit: 10000, + name: utils.assetsPath('img/[name].[hash:7].[ext]') + } + }, + { + test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, + loader: 'url-loader', + options: { + limit: 10000, + name: utils.assetsPath('media/[name].[hash:7].[ext]') + } + }, + { + test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, + loader: 'url-loader', + options: { + limit: 10000, + name: utils.assetsPath('fonts/[name].[hash:7].[ext]') + } + } + ] + }, + node: { + // prevent webpack from injecting useless setImmediate polyfill because Vue + // source contains it (although only uses it if it's native). + setImmediate: false, + // prevent webpack from injecting mocks to Node native modules + // that does not make sense for the client + dgram: 'empty', + fs: 'empty', + net: 'empty', + tls: 'empty', + child_process: 'empty' + } +} diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js new file mode 100644 index 0000000..070ae22 --- /dev/null +++ b/build/webpack.dev.conf.js @@ -0,0 +1,95 @@ +'use strict' +const utils = require('./utils') +const webpack = require('webpack') +const config = require('../config') +const merge = require('webpack-merge') +const path = require('path') +const baseWebpackConfig = require('./webpack.base.conf') +const CopyWebpackPlugin = require('copy-webpack-plugin') +const HtmlWebpackPlugin = require('html-webpack-plugin') +const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') +const portfinder = require('portfinder') + +const HOST = process.env.HOST +const PORT = process.env.PORT && Number(process.env.PORT) + +const devWebpackConfig = merge(baseWebpackConfig, { + module: { + rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) + }, + // cheap-module-eval-source-map is faster for development + devtool: config.dev.devtool, + + // these devServer options should be customized in /config/index.js + devServer: { + clientLogLevel: 'warning', + historyApiFallback: { + rewrites: [ + { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, + ], + }, + hot: true, + contentBase: false, // since we use CopyWebpackPlugin. + compress: true, + host: HOST || config.dev.host, + port: PORT || config.dev.port, + open: config.dev.autoOpenBrowser, + overlay: config.dev.errorOverlay + ? { warnings: false, errors: true } + : false, + publicPath: config.dev.assetsPublicPath, + proxy: config.dev.proxyTable, + quiet: true, // necessary for FriendlyErrorsPlugin + watchOptions: { + poll: config.dev.poll, + } + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env': require('../config/dev.env') + }), + new webpack.HotModuleReplacementPlugin(), + new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. + new webpack.NoEmitOnErrorsPlugin(), + // https://github.com/ampedandwired/html-webpack-plugin + new HtmlWebpackPlugin({ + filename: 'index.html', + template: 'index.html', + inject: true + }), + // copy custom static assets + new CopyWebpackPlugin([ + { + from: path.resolve(__dirname, '../static'), + to: config.dev.assetsSubDirectory, + ignore: ['.*'] + } + ]) + ] +}) + +module.exports = new Promise((resolve, reject) => { + portfinder.basePort = process.env.PORT || config.dev.port + portfinder.getPort((err, port) => { + if (err) { + reject(err) + } else { + // publish the new Port, necessary for e2e tests + process.env.PORT = port + // add port to devServer config + devWebpackConfig.devServer.port = port + + // Add FriendlyErrorsPlugin + devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ + compilationSuccessInfo: { + messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], + }, + onErrors: config.dev.notifyOnErrors + ? utils.createNotifierCallback() + : undefined + })) + + resolve(devWebpackConfig) + } + }) +}) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js new file mode 100644 index 0000000..2f17259 --- /dev/null +++ b/build/webpack.prod.conf.js @@ -0,0 +1,149 @@ +'use strict' +const path = require('path') +const utils = require('./utils') +const webpack = require('webpack') +const config = require('../config') +const merge = require('webpack-merge') +const baseWebpackConfig = require('./webpack.base.conf') +const CopyWebpackPlugin = require('copy-webpack-plugin') +const HtmlWebpackPlugin = require('html-webpack-plugin') +const ExtractTextPlugin = require('extract-text-webpack-plugin') +const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') +const UglifyJsPlugin = require('uglifyjs-webpack-plugin') + +const env = process.env.NODE_ENV === 'testing' + ? require('../config/test.env') + : require('../config/prod.env') + +const webpackConfig = merge(baseWebpackConfig, { + module: { + rules: utils.styleLoaders({ + sourceMap: config.build.productionSourceMap, + extract: true, + usePostCSS: true + }) + }, + devtool: config.build.productionSourceMap ? config.build.devtool : false, + output: { + path: config.build.assetsRoot, + filename: utils.assetsPath('js/[name].[chunkhash].js'), + chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') + }, + plugins: [ + // http://vuejs.github.io/vue-loader/en/workflow/production.html + new webpack.DefinePlugin({ + 'process.env': env + }), + new UglifyJsPlugin({ + uglifyOptions: { + compress: { + warnings: false + } + }, + sourceMap: config.build.productionSourceMap, + parallel: true + }), + // extract css into its own file + new ExtractTextPlugin({ + filename: utils.assetsPath('css/[name].[contenthash].css'), + // Setting the following option to `false` will not extract CSS from codesplit chunks. + // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. + // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, + // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 + allChunks: true, + }), + // Compress extracted CSS. We are using this plugin so that possible + // duplicated CSS from different components can be deduped. + new OptimizeCSSPlugin({ + cssProcessorOptions: config.build.productionSourceMap + ? { safe: true, map: { inline: false } } + : { safe: true } + }), + // generate dist index.html with correct asset hash for caching. + // you can customize output by editing /index.html + // see https://github.com/ampedandwired/html-webpack-plugin + new HtmlWebpackPlugin({ + filename: process.env.NODE_ENV === 'testing' + ? 'index.html' + : config.build.index, + template: 'index.html', + inject: true, + minify: { + removeComments: true, + collapseWhitespace: true, + removeAttributeQuotes: true + // more options: + // https://github.com/kangax/html-minifier#options-quick-reference + }, + // necessary to consistently work with multiple chunks via CommonsChunkPlugin + chunksSortMode: 'dependency' + }), + // keep module.id stable when vendor modules does not change + new webpack.HashedModuleIdsPlugin(), + // enable scope hoisting + new webpack.optimize.ModuleConcatenationPlugin(), + // split vendor js into its own file + new webpack.optimize.CommonsChunkPlugin({ + name: 'vendor', + minChunks (module) { + // any required modules inside node_modules are extracted to vendor + return ( + module.resource && + /\.js$/.test(module.resource) && + module.resource.indexOf( + path.join(__dirname, '../node_modules') + ) === 0 + ) + } + }), + // extract webpack runtime and module manifest to its own file in order to + // prevent vendor hash from being updated whenever app bundle is updated + new webpack.optimize.CommonsChunkPlugin({ + name: 'manifest', + minChunks: Infinity + }), + // This instance extracts shared chunks from code splitted chunks and bundles them + // in a separate chunk, similar to the vendor chunk + // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk + new webpack.optimize.CommonsChunkPlugin({ + name: 'app', + async: 'vendor-async', + children: true, + minChunks: 3 + }), + + // copy custom static assets + new CopyWebpackPlugin([ + { + from: path.resolve(__dirname, '../static'), + to: config.build.assetsSubDirectory, + ignore: ['.*'] + } + ]) + ] +}) + +if (config.build.productionGzip) { + const CompressionWebpackPlugin = require('compression-webpack-plugin') + + webpackConfig.plugins.push( + new CompressionWebpackPlugin({ + asset: '[path].gz[query]', + algorithm: 'gzip', + test: new RegExp( + '\\.(' + + config.build.productionGzipExtensions.join('|') + + ')$' + ), + threshold: 10240, + minRatio: 0.8 + }) + ) +} + +if (config.build.bundleAnalyzerReport) { + const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin + webpackConfig.plugins.push(new BundleAnalyzerPlugin()) +} + +module.exports = webpackConfig From 3fd146e473e86a2cbfae4e755c4f52a5644f064a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E6=85=95=E6=B6=B5?= <2292559624@qq.com> Date: Mon, 31 Oct 2022 19:50:22 +0800 Subject: [PATCH 3/6] co --- config/dev.env.js | 7 ++++ config/index.js | 85 ++++++++++++++++++++++++++++++++++++++++++++++ config/prod.env.js | 4 +++ config/test.env.js | 7 ++++ 4 files changed, 103 insertions(+) create mode 100644 config/dev.env.js create mode 100644 config/index.js create mode 100644 config/prod.env.js create mode 100644 config/test.env.js diff --git a/config/dev.env.js b/config/dev.env.js new file mode 100644 index 0000000..1e22973 --- /dev/null +++ b/config/dev.env.js @@ -0,0 +1,7 @@ +'use strict' +const merge = require('webpack-merge') +const prodEnv = require('./prod.env') + +module.exports = merge(prodEnv, { + NODE_ENV: '"development"' +}) diff --git a/config/index.js b/config/index.js new file mode 100644 index 0000000..36f75f7 --- /dev/null +++ b/config/index.js @@ -0,0 +1,85 @@ +'use strict' +// Template version: 1.3.1 +// see http://vuejs-templates.github.io/webpack for documentation. + +const path = require('path') + +module.exports = { + dev: { + + // Paths + assetsSubDirectory: 'static', + assetsPublicPath: '/', + proxyTable: { + '/api': { + target: 'http://localhost:8443', + changeOrigin: true, + pathRewrite: { + '^/api': '' + } + } + }, + + + // Various Dev Server settings + host: 'localhost', // can be overwritten by process.env.HOST + port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + autoOpenBrowser: false, + errorOverlay: true, + notifyOnErrors: true, + poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- + + // Use Eslint Loader? + // If true, your code will be linted during bundling and + // linting errors and warnings will be shown in the console. + useEslint: true, + // If true, eslint errors and warnings will also be shown in the error overlay + // in the browser. + showEslintErrorsInOverlay: false, + + /** + * Source Maps + */ + + // https://webpack.js.org/configuration/devtool/#development + devtool: 'cheap-module-eval-source-map', + + // If you have problems debugging vue-files in devtools, + // set this to false - it *may* help + // https://vue-loader.vuejs.org/en/options.html#cachebusting + cacheBusting: true, + + cssSourceMap: true + }, + + build: { + // Template for index.html + index: path.resolve(__dirname, '../dist/index.html'), + + // Paths + assetsRoot: path.resolve(__dirname, '../dist'), + assetsSubDirectory: 'static', + assetsPublicPath: '/', + + /** + * Source Maps + */ + + productionSourceMap: true, + // https://webpack.js.org/configuration/devtool/#production + devtool: '#source-map', + + // Gzip off by default as many popular static hosts such as + // Surge or Netlify already gzip all static assets for you. + // Before setting to `true`, make sure to: + // npm install --save-dev compression-webpack-plugin + productionGzip: false, + productionGzipExtensions: ['js', 'css'], + + // Run the build command with an extra argument to + // View the bundle analyzer report after build finishes: + // `npm run build --report` + // Set to `true` or `false` to always turn it on or off + bundleAnalyzerReport: process.env.npm_config_report + } +} diff --git a/config/prod.env.js b/config/prod.env.js new file mode 100644 index 0000000..a6f9976 --- /dev/null +++ b/config/prod.env.js @@ -0,0 +1,4 @@ +'use strict' +module.exports = { + NODE_ENV: '"production"' +} diff --git a/config/test.env.js b/config/test.env.js new file mode 100644 index 0000000..c2824a3 --- /dev/null +++ b/config/test.env.js @@ -0,0 +1,7 @@ +'use strict' +const merge = require('webpack-merge') +const devEnv = require('./dev.env') + +module.exports = merge(devEnv, { + NODE_ENV: '"testing"' +}) From 0b300a457bf1874660867f6508fdd521bfee0c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E6=85=95=E6=B6=B5?= <2292559624@qq.com> Date: Fri, 11 Nov 2022 17:06:17 +0800 Subject: [PATCH 4/6] dm --- src/advance/AdvanceIndex.vue | 118 +++++++++++++++++ src/common/NavMenu.vue | 46 +++++++ src/docrecords/DocrecordIndex.vue | 210 ++++++++++++++++++++++++++++++ src/home/Appindex.vue | 15 +++ src/records/RecordIndex.vue | 35 +++++ src/records/SearchBar.vue | 34 +++++ src/records/SideMenu.vue | 52 ++++++++ src/records/record.vue | 64 +++++++++ 8 files changed, 574 insertions(+) create mode 100644 src/advance/AdvanceIndex.vue create mode 100644 src/common/NavMenu.vue create mode 100644 src/docrecords/DocrecordIndex.vue create mode 100644 src/home/Appindex.vue create mode 100644 src/records/RecordIndex.vue create mode 100644 src/records/SearchBar.vue create mode 100644 src/records/SideMenu.vue create mode 100644 src/records/record.vue diff --git a/src/advance/AdvanceIndex.vue b/src/advance/AdvanceIndex.vue new file mode 100644 index 0000000..c192440 --- /dev/null +++ b/src/advance/AdvanceIndex.vue @@ -0,0 +1,118 @@ + + + + + + + + diff --git a/src/common/NavMenu.vue b/src/common/NavMenu.vue new file mode 100644 index 0000000..ffefeda --- /dev/null +++ b/src/common/NavMenu.vue @@ -0,0 +1,46 @@ + ++ ++ ++ + + ++ + + ++ ++ + + + + + ++ + + + ++ + + ++ ++ + + + + + + + + ++ ++ + + + + ++ + +确定 ++ 根据你的描述,为你诊断如下: 感冒通常伴有发热,发热会使体温升高,为了避免体温升得过高,必须多喝水、多排毒;可自己熬制点生姜红糖茶,乘热喝掉,让身体出汗,请注意监控你的体温,如果体温在37.3°C以上请及时就医,如果出现头疼、咽喉肿痛等症状,建议用药速感宁胶囊 + 根据你的描述,为你诊断如下: 如果你最近长时间用眼导致眼睛干涩疲劳,应当注意保护用眼,在电脑前工作不应超过1小时,或使用保护功能的眼药水缓解症状,如果视物变形、模糊、中心视力下降,则可能患上黄斑变性、角膜炎,眼前如果出现黑影,可能是视网膜脱落,都应到眼科医院进行治疗 + 根据你的描述,为你诊断如下: 中耳炎 + + ++ + + + + + diff --git a/src/docrecords/DocrecordIndex.vue b/src/docrecords/DocrecordIndex.vue new file mode 100644 index 0000000..3d12977 --- /dev/null +++ b/src/docrecords/DocrecordIndex.vue @@ -0,0 +1,210 @@ + ++ {{ item.navItem }} + + 更多功能 + + 欢迎进入校医院管理系统 ++ + + diff --git a/src/home/Appindex.vue b/src/home/Appindex.vue new file mode 100644 index 0000000..2a0343e --- /dev/null +++ b/src/home/Appindex.vue @@ -0,0 +1,15 @@ + +欢迎登录校医院智能管理系统
++ ++ ++ ++ 搜索 ++ ++ ++ ++ ++ ++ ++ ++ ++ +处理 ++ ++ ++ + ++ + ++ + ++ + ++ + + ++ + ++ ++ ++ ++ ++ ++ ++ +角色管理 ++ Welcome to my System! ++ + + + + diff --git a/src/records/RecordIndex.vue b/src/records/RecordIndex.vue new file mode 100644 index 0000000..344ee7c --- /dev/null +++ b/src/records/RecordIndex.vue @@ -0,0 +1,35 @@ + ++ + + + + + diff --git a/src/records/SearchBar.vue b/src/records/SearchBar.vue new file mode 100644 index 0000000..2c971f0 --- /dev/null +++ b/src/records/SearchBar.vue @@ -0,0 +1,34 @@ + ++ ++ + + ++ ++ + + + + diff --git a/src/records/SideMenu.vue b/src/records/SideMenu.vue new file mode 100644 index 0000000..3702c39 --- /dev/null +++ b/src/records/SideMenu.vue @@ -0,0 +1,52 @@ + ++ +搜索 ++ + + + + + diff --git a/src/records/record.vue b/src/records/record.vue new file mode 100644 index 0000000..94cab3c --- /dev/null +++ b/src/records/record.vue @@ -0,0 +1,64 @@ + ++ + 预约挂号记录 + ++ + 就诊记录 + ++ + 购药记录 + ++ + 预问诊记录 + ++ + + + + + From 9f5bd59065c7575c1521d00aab4ab2b67f15baec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E6=85=95=E6=B6=B5?= <2292559624@qq.com> Date: Thu, 24 Nov 2022 23:40:48 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 22 ++++ src/HelloWorld.vue | 113 +++++++++++++++++++ src/Home.vue | 20 ++++ src/HosdataApplication.java | 13 +++ src/Login.vue | 91 +++++++++++++++ src/assets/logo.png | Bin 0 -> 6849 bytes src/controller/DoctorController.java | 20 ++++ src/controller/DocyzController.java | 35 ++++++ src/controller/InController.java | 32 ++++++ src/controller/LoginController.java | 49 +++++++++ src/controller/RegisterController.java | 46 ++++++++ src/controller/ShopController.java | 46 ++++++++ src/controller/ZhuController.java | 27 +++++ src/dao/DocDAO.java | 12 ++ src/dao/DoctorDAO.java | 10 ++ src/dao/InDAO.java | 12 ++ src/dao/RegisterDAO.java | 15 +++ src/dao/ShopDAO.java | 10 ++ src/dao/ShopRecordDAO.java | 10 ++ src/dao/UserDAO.java | 18 +++ src/dao/ZhuDAO.java | 12 ++ src/main.js | 21 ++++ src/pojo/Doctor.java | 40 +++++++ src/pojo/Docyz.java | 76 +++++++++++++ src/pojo/Information.java | 52 +++++++++ src/pojo/Medicine.java | 60 ++++++++++ src/pojo/RegisterRecord.java | 74 +++++++++++++ src/pojo/ShopRecord.java | 48 ++++++++ src/pojo/User.java | 52 +++++++++ src/pojo/Zhuce.java | 52 +++++++++ src/register/RegisterIndex.vue | 128 +++++++++++++++++++++ src/result/Result.java | 19 ++++ src/router/index.js | 123 +++++++++++++++++++++ src/service/DoctorService.java | 21 ++++ src/service/DocyzService.java | 27 +++++ src/service/InService.java | 26 +++++ src/service/RegisterService.java | 35 ++++++ src/service/ShopService.java | 39 +++++++ src/service/UserService.java | 38 +++++++ src/service/ZhuService.java | 23 ++++ src/setting/SettingIndex.vue | 147 +++++++++++++++++++++++++ src/shop/ShopIndex.vue | 99 +++++++++++++++++ src/shoprecords/ShoprecordIndex.vue | 56 ++++++++++ src/treatment/TreatmentIndex.vue | 71 ++++++++++++ src/zhu/ZhuceIndex.vue | 83 ++++++++++++++ 45 files changed, 2023 insertions(+) create mode 100644 src/App.vue create mode 100644 src/HelloWorld.vue create mode 100644 src/Home.vue create mode 100644 src/HosdataApplication.java create mode 100644 src/Login.vue create mode 100644 src/assets/logo.png create mode 100644 src/controller/DoctorController.java create mode 100644 src/controller/DocyzController.java create mode 100644 src/controller/InController.java create mode 100644 src/controller/LoginController.java create mode 100644 src/controller/RegisterController.java create mode 100644 src/controller/ShopController.java create mode 100644 src/controller/ZhuController.java create mode 100644 src/dao/DocDAO.java create mode 100644 src/dao/DoctorDAO.java create mode 100644 src/dao/InDAO.java create mode 100644 src/dao/RegisterDAO.java create mode 100644 src/dao/ShopDAO.java create mode 100644 src/dao/ShopRecordDAO.java create mode 100644 src/dao/UserDAO.java create mode 100644 src/dao/ZhuDAO.java create mode 100644 src/main.js create mode 100644 src/pojo/Doctor.java create mode 100644 src/pojo/Docyz.java create mode 100644 src/pojo/Information.java create mode 100644 src/pojo/Medicine.java create mode 100644 src/pojo/RegisterRecord.java create mode 100644 src/pojo/ShopRecord.java create mode 100644 src/pojo/User.java create mode 100644 src/pojo/Zhuce.java create mode 100644 src/register/RegisterIndex.vue create mode 100644 src/result/Result.java create mode 100644 src/router/index.js create mode 100644 src/service/DoctorService.java create mode 100644 src/service/DocyzService.java create mode 100644 src/service/InService.java create mode 100644 src/service/RegisterService.java create mode 100644 src/service/ShopService.java create mode 100644 src/service/UserService.java create mode 100644 src/service/ZhuService.java create mode 100644 src/setting/SettingIndex.vue create mode 100644 src/shop/ShopIndex.vue create mode 100644 src/shoprecords/ShoprecordIndex.vue create mode 100644 src/treatment/TreatmentIndex.vue create mode 100644 src/zhu/ZhuceIndex.vue diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..a2a7be5 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,22 @@ + ++ ++ ++ ++ ++ ++ +++ + + + + diff --git a/src/HelloWorld.vue b/src/HelloWorld.vue new file mode 100644 index 0000000..1c19f2a --- /dev/null +++ b/src/HelloWorld.vue @@ -0,0 +1,113 @@ + ++ ++ + + + + + diff --git a/src/Home.vue b/src/Home.vue new file mode 100644 index 0000000..d5986c5 --- /dev/null +++ b/src/Home.vue @@ -0,0 +1,20 @@ + +{{ msg }}
+Essential Links
++
+- + + Core Docs + +
+- + + Forum + +
+- + + Community Chat + +
+- + + Twitter + +
+
+- + + Docs for This Template + +
+Ecosystem
++
+- + + vue-router + +
+- + + vuex + +
+- + + vue-loader + +
+- + + awesome-vue + +
+++ + + + + diff --git a/src/HosdataApplication.java b/src/HosdataApplication.java new file mode 100644 index 0000000..4d34f26 --- /dev/null +++ b/src/HosdataApplication.java @@ -0,0 +1,13 @@ +package com.example.hosdata; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class HosdataApplication { + + public static void main(String[] args) { + SpringApplication.run(HosdataApplication.class, args); + } + +} diff --git a/src/Login.vue b/src/Login.vue new file mode 100644 index 0000000..f015593 --- /dev/null +++ b/src/Login.vue @@ -0,0 +1,91 @@ + ++++ + + + + + + + diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..f3d2503fc2a44b5053b0837ebea6e87a2d339a43 GIT binary patch literal 6849 zcmaKRcUV(fvo}bjDT-7nLI_nlK}sT_69H+`qzVWDA|yaU?}j417wLi^B1KB1SLsC& zL0ag7$U(XW5YR7p&Ux?s校医院智能管理系统登录
++ ++ ++ + + + ++ + ++ + ++ + +登录 +++没有账号,请点击注册 +P$d4lvMt8C^+TcQu4F zQqv!UF!I+kw)c0jhd6+g6oCr9P?7)?!qX1ui*iL{p}sKCAGuJ{{W)0z1pLF|=>h}& zt(2Lr0Z`2ig8<5i%Zk}cO5Fm=LByqGWaS`oqChZdEFmc`0hSb#gg|Aap^{+WKOYcj zHjINK)KDG%&s?Mt4CL(T=?;~U@bU2x_mLKN!#GJuK_CzbNw5SMEJorG!}_5;?R>@1 zSl)jns3WlU7^J%=(hUtfmuUCU&C3%8B5C^f5>W2Cy8jW3#{Od{lF1}|?c61##3dzA zsPlFG;l_FzBK}8>|H_Ru_H#!_7$UH4UKo3lKOA}g1(R&|e@}GINYVzX?q=_WLZCgh z)L|eJMce`D0EIwgRaNETDsr+?vQknSGAi=7H00r`QnI%oQnFxm`G2umXso9l+8*&Q z7WqF|$p49js$mdzo^BXpH#gURy=UO;=IMrYc5?@+sR4y_?d*~0^YP7d+y0{}0)zBM zIKVM(DBvICK#~7N0a+PY6)7;u=dutmNqK3AlsrUU9U`d;msiucB_|8|2kY=(7XA;G zwDA8AR)VCA#JOkxm#6 oHNS^YVuOU;8p$N)2{`;oF|rQ?B~K$%rHDxXs+_G zF5|-uqHZvSzq}L;5Kcy_P+x0${33}Ofb6+TX&=y;;PkEOpz% +_bCw_ {<&~ zeLV|!bP%l1qxywfVr9Z9JI+++EO^x>ZuCK);=$VIG1`kxK8F2M8AdC$iOe3cj 1fo(ce4l-9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n&}^Z{+TW}mQe b9=8b<_a`&Cm#n%n~ zU47MvCBsdXFB1+adOO)03+nczfWa#vwk #r{o{dF)QWya9v2nv43Zp3%Ps}($lA02*_g25t;|T{A5snSY?3A zrRQ~(Ygh_ebltHo1VC bJb*eOAr;4cnlXLvI>*$-#AVsGg6B1r7@;g^L zFlJ_th0vxO7;-opU@WAFe;<}?!2q?RBrFK5U{ *ai@NLKZ^};Ul}beukveh?TQn;$%9=R+DX07m82gP$=}Uo_%&ngV`}Hyv8g{u z3SWzTGV|cwQuFIs7ZDOqO_fGf8Q`8MwL}eUp>q?4eqCmOTcwQuXtQckPy|4F1on8l zP*h>d+cH#XQf|+6c|S{7SF(Lg>bR~l(0uY?O{OEVlaxa5@e%T&xju=o1`=OD#qc16 zSvyH*my(dcp6~VqR;o(#@m44Lug@~_qw+HA=mS#Z^ 4reBy8iV?H~I;{LQWk3aKK8$bLRyt$g?- listByDepartment(String department) throws Exception { + return doctorService.listByDepartment(department); + } +} diff --git a/src/controller/DocyzController.java b/src/controller/DocyzController.java new file mode 100644 index 0000000..833b028 --- /dev/null +++ b/src/controller/DocyzController.java @@ -0,0 +1,35 @@ +package com.example.hosdata.controller; + +import com.example.hosdata.pojo.Docyz; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.service.DocyzService; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +public class DocyzController { + @Autowired + DocyzService docService; + + @CrossOrigin + @PostMapping("/api/docrecords") + public Docyz addOrUpdate(@RequestBody Docyz doc) throws Exception { + docService.addOrUpdate(doc); + return doc; + } + + /* @CrossOrigin + @GetMapping("/api/docrecords") + public List listdoctorname() throws Exception { + return docService.listBydoctorname(); + }*/ + + @CrossOrigin + @GetMapping("/api/treatment") + public List listghname() throws Exception { + return docService.listByghname(); + } +} diff --git a/src/controller/InController.java b/src/controller/InController.java new file mode 100644 index 0000000..71048f8 --- /dev/null +++ b/src/controller/InController.java @@ -0,0 +1,32 @@ +package com.example.hosdata.controller; + +import com.example.hosdata.pojo.Information; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.service.DocyzService; +import com.example.hosdata.service.InService; +import com.example.hosdata.service.RegisterService; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.util.HtmlUtils; + +import java.util.List; + +@RestController +public class InController { + @Autowired + InService inService; + + @CrossOrigin + @GetMapping("/api/setting") + public List listuser() throws Exception { + return inService.listbyuser(); + } + + @CrossOrigin + @PostMapping("/api/setting") + public Information Update(@RequestBody Information information) throws Exception { + inService.update(information); + return information; + } +} diff --git a/src/controller/LoginController.java b/src/controller/LoginController.java new file mode 100644 index 0000000..e9c637c --- /dev/null +++ b/src/controller/LoginController.java @@ -0,0 +1,49 @@ +package com.example.hosdata.controller; + +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.pojo.User; +import com.example.hosdata.result.Result; +import com.example.hosdata.service.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.util.HtmlUtils; + +import java.util.List; + +@Controller +public class LoginController { + + @Autowired + UserService userService; + + @CrossOrigin + @PostMapping(value = "/api/login") + @ResponseBody + public Result login(@RequestBody User requestUser) { + String username = requestUser.getUsername(); + username = HtmlUtils.htmlEscape(username); + String id = requestUser.getId(); + id = HtmlUtils.htmlEscape(id); + String realname = requestUser.getRealname(); + realname = HtmlUtils.htmlEscape(realname); + + User user = userService.getall(id,username, requestUser.getPassword(),realname); + //String id=requestUser.getId(); + RegisterService.username = username; + DocyzService.ghname = realname; + DocyzService.doctorname = realname; + ShopService.myzh = username; + InService.userna = username; + if (null == user) { + return new Result(400); + } else if(id.equals("医务人员")){ + return new Result(100); + } else if(id.equals("管理员")){ + return new Result(300); + }else { + return new Result(200); + } + } +} + diff --git a/src/controller/RegisterController.java b/src/controller/RegisterController.java new file mode 100644 index 0000000..145d6a0 --- /dev/null +++ b/src/controller/RegisterController.java @@ -0,0 +1,46 @@ +package com.example.hosdata.controller; + + +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.service.DocyzService; +import com.example.hosdata.service.RegisterService; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.util.HtmlUtils; + +import java.util.List; + +@RestController +public class RegisterController { + @Autowired + RegisterService Reservice; + + @CrossOrigin + @GetMapping("/api/records") + public List list() throws Exception { + return Reservice.listByname(); + } + + @CrossOrigin + @GetMapping("/api/docrecords") + public List listdoc() throws Exception { + return Reservice.list(); + } + + /*@CrossOrigin + @PostMapping("/api/docrecords") + public List searchResult(@RequestParam(value="doctor",required=false) String doctor) { + return Reservice.Search(doctor); + }*/ + + + @CrossOrigin + @PostMapping("/api/register") + public RegisterRecord addOrUpdate(@RequestBody RegisterRecord record) throws Exception { + Reservice.addOrUpdate(record); + return record; + } + +} + diff --git a/src/controller/ShopController.java b/src/controller/ShopController.java new file mode 100644 index 0000000..65955d1 --- /dev/null +++ b/src/controller/ShopController.java @@ -0,0 +1,46 @@ +package com.example.hosdata.controller; + +import com.example.hosdata.pojo.Medicine; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.pojo.ShopRecord; +import com.example.hosdata.service.ShopService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +public class ShopController { + + @Autowired + ShopService shopService; + + @ResponseBody + @CrossOrigin + @GetMapping(value = "/api/shop") + public List shop() { + return shopService.MedicineList(); + } + + @CrossOrigin + @PostMapping("/api/shop") + public ShopRecord Add(@RequestBody ShopRecord SR) throws Exception { + shopService.addOrUpdate(SR); + return SR; + } + + @CrossOrigin + @PostMapping("/api/Admin") + public Medicine Update(@RequestBody Medicine medicine) throws Exception { + shopService.Update(medicine); + return medicine; + } + + @CrossOrigin + @GetMapping("/api/shoprecords") + public List listbymyzh() throws Exception { + return shopService.listBymyzh(); + } + +} diff --git a/src/controller/ZhuController.java b/src/controller/ZhuController.java new file mode 100644 index 0000000..279da7f --- /dev/null +++ b/src/controller/ZhuController.java @@ -0,0 +1,27 @@ +package com.example.hosdata.controller; +import com.example.hosdata.pojo.Information; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.pojo.Zhuce; +import com.example.hosdata.service.DocyzService; +import com.example.hosdata.service.InService; +import com.example.hosdata.service.RegisterService; + +import com.example.hosdata.service.ZhuService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.util.HtmlUtils; + +import java.util.List; + +@RestController +public class ZhuController { + @Autowired + ZhuService zhuService; + + @CrossOrigin + @PostMapping("/api/zhu") + public Zhuce add(@RequestBody Zhuce zhuce) throws Exception { + zhuService.add(zhuce); + return zhuce; + } +} diff --git a/src/dao/DocDAO.java b/src/dao/DocDAO.java new file mode 100644 index 0000000..5b90df4 --- /dev/null +++ b/src/dao/DocDAO.java @@ -0,0 +1,12 @@ +package com.example.hosdata.dao; + +import com.example.hosdata.pojo.Docyz; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + +public interface DocDAO extends JpaRepository { + List findByGhname(String ghname); + + List findByDoctorname(String doctorname); +} diff --git a/src/dao/DoctorDAO.java b/src/dao/DoctorDAO.java new file mode 100644 index 0000000..9405b0b --- /dev/null +++ b/src/dao/DoctorDAO.java @@ -0,0 +1,10 @@ +package com.example.hosdata.dao; +import java.util.*; +import com.example.hosdata.pojo.Doctor; +import org.springframework.data.domain.Page; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface DoctorDAO extends JpaRepository { + List findAllByDepartment(String department); + List findAllByDoctorname(String doctorname); +} diff --git a/src/dao/InDAO.java b/src/dao/InDAO.java new file mode 100644 index 0000000..a3207cd --- /dev/null +++ b/src/dao/InDAO.java @@ -0,0 +1,12 @@ +package com.example.hosdata.dao; + +import com.example.hosdata.pojo.Information; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.pojo.User; +import org.springframework.data.domain.Page; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; +public interface InDAO extends JpaRepository { + List findByUsername(String username); +} diff --git a/src/dao/RegisterDAO.java b/src/dao/RegisterDAO.java new file mode 100644 index 0000000..c1ef457 --- /dev/null +++ b/src/dao/RegisterDAO.java @@ -0,0 +1,15 @@ +package com.example.hosdata.dao; + + +import com.example.hosdata.pojo.RegisterRecord; +import org.springframework.data.domain.Page; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + +public interface RegisterDAO extends JpaRepository { + List findByUsername(String username); + + List findByDoctor(String doctor); + +} diff --git a/src/dao/ShopDAO.java b/src/dao/ShopDAO.java new file mode 100644 index 0000000..d0a9c45 --- /dev/null +++ b/src/dao/ShopDAO.java @@ -0,0 +1,10 @@ +package com.example.hosdata.dao; + +import com.example.hosdata.pojo.Medicine; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + +public interface ShopDAO extends JpaRepository { + List findAllByPlace(String place); +} diff --git a/src/dao/ShopRecordDAO.java b/src/dao/ShopRecordDAO.java new file mode 100644 index 0000000..55bd1c9 --- /dev/null +++ b/src/dao/ShopRecordDAO.java @@ -0,0 +1,10 @@ +package com.example.hosdata.dao; + +import com.example.hosdata.pojo.Medicine; +import com.example.hosdata.pojo.ShopRecord; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; +public interface ShopRecordDAO extends JpaRepository { + List findByMyzh(String myzh); +} diff --git a/src/dao/UserDAO.java b/src/dao/UserDAO.java new file mode 100644 index 0000000..f3e1781 --- /dev/null +++ b/src/dao/UserDAO.java @@ -0,0 +1,18 @@ +package com.example.hosdata.dao; +import com.example.hosdata.pojo.User; +import org.springframework.data.jpa.repository.JpaRepository; +import java.util.List; + +public interface UserDAO extends JpaRepository { + User findByUsername(String username); + + User getByUsernameAndPassword(String username,String password); + + User getByIdAndUsernameAndPassword(String id,String username,String password); + + User getByIdAndUsernameAndPasswordAndRealname(String id,String username,String password,String realname); + +} + +//操作数据库的对象,使用了JPA,无需手动构建SQL语句,而只需要按照规范提供方法的名字即可实现对数据库的增删查改 + diff --git a/src/dao/ZhuDAO.java b/src/dao/ZhuDAO.java new file mode 100644 index 0000000..140051d --- /dev/null +++ b/src/dao/ZhuDAO.java @@ -0,0 +1,12 @@ +package com.example.hosdata.dao; + +import com.example.hosdata.pojo.Information; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.pojo.User; +import com.example.hosdata.pojo.Zhuce; +import org.springframework.data.domain.Page; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; +public interface ZhuDAO extends JpaRepository { +} diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..471ed03 --- /dev/null +++ b/src/main.js @@ -0,0 +1,21 @@ +import Vue from 'vue' +import App from './App' +import router from './router' +import ElementUI from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' + +var axios = require('axios') +axios.defaults.baseURL = 'http://localhost:8443/api' +Vue.prototype.$axios = axios +Vue.config.productionTip = false + +Vue.use(ElementUI) + +/* eslint-disable no-new */ +new Vue({ + el: '#app', + render: h => h(App), + router, + components: { App }, + template: ' ' +}) diff --git a/src/pojo/Doctor.java b/src/pojo/Doctor.java new file mode 100644 index 0000000..9160784 --- /dev/null +++ b/src/pojo/Doctor.java @@ -0,0 +1,40 @@ +package com.example.hosdata.pojo; +import javax.persistence.*; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@Entity +@Table(name = "doctor") +@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" }) + +public class Doctor { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "doctorid") + int doctorid; + + String doctorname; + String department; + String worktime; + + public String getDoctorname() { + return doctorname; + } + public void setDoctorname(String doctorname) { + this.doctorname = doctorname; + } + + public String getDepartment() { + return department; + } + public void setDpartment(String department) { + this.department = department; + } + + public String getWorktime() { + return worktime; + } + public void setWorktime(String worktime) { + this.worktime = worktime; + } +} diff --git a/src/pojo/Docyz.java b/src/pojo/Docyz.java new file mode 100644 index 0000000..d2b62e0 --- /dev/null +++ b/src/pojo/Docyz.java @@ -0,0 +1,76 @@ +package com.example.hosdata.pojo; + +import javax.persistence.*; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@Entity +@Table(name = "docyz") +@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" }) + +public class Docyz { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "idnumber") + int idnumber; + + String doctorname; + + String ghname; + int yyh; + String zhengz; + String zhend; + String liaoc; + + + public int getIdnumber() { + return idnumber; + } + public void setIdnumber(int idnumber) { + this.idnumber = idnumber; + } + + public String getDoctorname() { + return doctorname; + } + public void setDoctorname(String doctorname) { + this.doctorname = doctorname; + } + + public String getGhname() { + return ghname; + } + public void setGhname(String ghname) { + this.ghname = ghname; + } + + public int getYyh() { + return yyh; + } + public void setYyh(int yyh) { + this.yyh = yyh; + } + + public String getZhengz() { + return zhengz; + } + public void setZhengz(String zhengz) { + this.zhengz = zhengz; + } + + public String getZhend() { + return zhend; + } + public void setZhend(String zhend) { + this.zhend = zhend; + } + + public String getLiaoc() { + return liaoc; + } + public void setLiaoc(String liaoc) { + this.liaoc = liaoc; + } + +} + diff --git a/src/pojo/Information.java b/src/pojo/Information.java new file mode 100644 index 0000000..968ccb6 --- /dev/null +++ b/src/pojo/Information.java @@ -0,0 +1,52 @@ +package com.example.hosdata.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.*; + +@Entity +@Table(name = "user") +@JsonIgnoreProperties({"handler","hibernateLazyInitializer"}) + +public class Information { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + String id; + + String username; + String password; + + String realname; + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getRealname() { + return realname; + } + + public void setRealname(String realname) { + this.realname = realname; + } +} diff --git a/src/pojo/Medicine.java b/src/pojo/Medicine.java new file mode 100644 index 0000000..40ab1b8 --- /dev/null +++ b/src/pojo/Medicine.java @@ -0,0 +1,60 @@ +package com.example.hosdata.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.*; + +@Entity +@Table(name = "medicine") +@JsonIgnoreProperties({"handler","hibernateLazyInitializer"}) + +public class Medicine { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + int id; + + String name; + int number; + double price; + + String place; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public int getNumber() {return number;} + + public void setNumber(int number) { + this.number = number; + } + + + public double getPrice() {return price;} + + public void setPrice(double price) { + this.price = price; + } + + public String getPlace() {return place;} + + public void setPlace(String place) { + this.place = place; + } + +} diff --git a/src/pojo/RegisterRecord.java b/src/pojo/RegisterRecord.java new file mode 100644 index 0000000..1032245 --- /dev/null +++ b/src/pojo/RegisterRecord.java @@ -0,0 +1,74 @@ +package com.example.hosdata.pojo; +import javax.persistence.*; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@Entity +@Table(name = "register") +@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" }) + +public class RegisterRecord { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "idnum") + int idnum; + + String name; + String department; + String major; + String time; + String doctor; + String username; + + + + public int getIdnum() { + return idnum; + } + public void setIdnum(int idnum) { + this.idnum = idnum; + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public String getDepartment() { + return department; + } + public void setDepartment(String department) { + this.department = department; + } + + public String getMajor() { + return major; + } + public void setMajor(String major) { + this.major = major; + } + + public String getTime() { + return time; + } + public void setTime(String time) { + this.time = time; + } + + public String getDoctor() { + return doctor; + } + public void setDoctor(String doctor) { + this.doctor = doctor; + } + + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + +} diff --git a/src/pojo/ShopRecord.java b/src/pojo/ShopRecord.java new file mode 100644 index 0000000..cfe50f1 --- /dev/null +++ b/src/pojo/ShopRecord.java @@ -0,0 +1,48 @@ +package com.example.hosdata.pojo; + +import javax.persistence.*; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@Entity +@Table(name = "shoprecord") +@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" }) + +public class ShopRecord { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "mid") + int mid; + + String medicine; + int number; + + String myzh; + + public String getMedicine() { + return medicine; + } + public void setMedicine(String medicine) { + this.medicine = medicine; + } + + public int getNumber() {return number;} + public void setNumber(int number) { + this.number = number; + } + + public int getMid() { + return mid; + } + public void setMid(int mid) { + this.mid = mid; + } + + public String getMyzh() { + return myzh; + } + public void setMyzh(String myzh) { + this.myzh = myzh; + } + +} diff --git a/src/pojo/User.java b/src/pojo/User.java new file mode 100644 index 0000000..c041957 --- /dev/null +++ b/src/pojo/User.java @@ -0,0 +1,52 @@ +package com.example.hosdata.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.*; + +@Entity +@Table(name = "user") +@JsonIgnoreProperties({"handler","hibernateLazyInitializer"}) + +public class User { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + String id; + + String username; + String password; + + String realname; + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getRealname() { + return realname; + } + + public void setRealname(String realname) { + this.realname = realname; + } +} diff --git a/src/pojo/Zhuce.java b/src/pojo/Zhuce.java new file mode 100644 index 0000000..9ad6b5a --- /dev/null +++ b/src/pojo/Zhuce.java @@ -0,0 +1,52 @@ +package com.example.hosdata.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.*; + +@Entity +@Table(name = "user") +@JsonIgnoreProperties({"handler","hibernateLazyInitializer"}) + +public class Zhuce { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + String id; + + String username; + String password; + + String realname; + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getRealname() { + return realname; + } + + public void setRealname(String realname) { + this.realname = realname; + } +} diff --git a/src/register/RegisterIndex.vue b/src/register/RegisterIndex.vue new file mode 100644 index 0000000..dadd6f7 --- /dev/null +++ b/src/register/RegisterIndex.vue @@ -0,0 +1,128 @@ + + + + + + + + diff --git a/src/result/Result.java b/src/result/Result.java new file mode 100644 index 0000000..6cf46ec --- /dev/null +++ b/src/result/Result.java @@ -0,0 +1,19 @@ +package com.example.hosdata.result; + +public class Result { + //响应码 + private int code; + + public Result(int code) { + this.code = code; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + +} diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..cda5260 --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,123 @@ +import Vue from 'vue' +import Router from 'vue-router' +import AppIndex from '../components/home/AppIndex' +import Login from '../components/Login' +import Home from '../components/Home' +import RegisterIndex from '../components/register/RegisterIndex' +import ShopIndex from '../components/shop/ShopIndex' +import RecordIndex from '../components/records/RecordIndex' +import AdvanceIndex from '../components/advance/AdvanceIndex' +import DocrecordIndex from '../components/docrecords/DocrecordIndex' +import TreatmentIndex from '../components/treatment/TreatmentIndex' +import ShoprecordIndex from '../components/shoprecords/ShoprecordIndex' +import SettingIndex from '../components/setting/SettingIndex' +import ZhuceIndex from '../components/zhu/ZhuceIndex' +import AdminIndex from '../components/Admin/AdminIndex' + +Vue.use(Router) + +export default new Router({ + routes: [ + { + path: '/home', + name: 'Home', + component: Home, + redirect: '/index', + children: [ + { + path: '/index', + name: 'AppIndex', + component: AppIndex, + meta: { + requireAuth: true + } + }, + { + path: '/register', + name: 'RegisterIndex', + component: RegisterIndex, + meta: { + requireAuth: true + } + }, + { + path: '/shop', + name: 'ShopIndex', + component: ShopIndex, + meta: { + requireAuth: true + } + }, + { + path: '/records', + name: 'RecordIndex', + component: RecordIndex, + meta: { + requireAuth: true + } + }, + { + path: '/advance', + name: 'AdvanceIndex', + component: AdvanceIndex, + meta: { + requireAuth: true + } + }, + { + path: '/treatment', + name: 'TreatmentIndex', + component: TreatmentIndex, + meta: { + requireAuth: true + } + }, + { + path: '/shoprecords', + name: 'ShoprecordIndex', + component: ShoprecordIndex, + meta: { + requireAuth: true + } + }, + { + path: '/setting', + name: 'SettingIndex', + component: SettingIndex, + meta: { + requireAuth: true + } + } + ] + }, + { + path: '/docrecords', + name: 'DocrecordIndex', + component: DocrecordIndex, + meta: { + requireAuth: true + } + }, + { + path: '/login', + name: 'Login', + component: Login + }, + { + path: '/zhu', + name: 'ZhuceIndex', + component: ZhuceIndex, + meta: { + requireAuth: true + } + }, + { + path: '/Admin', + name: 'AdminIndex', + component: AdminIndex, + meta: { + requireAuth: true + } + } + ] +}) diff --git a/src/service/DoctorService.java b/src/service/DoctorService.java new file mode 100644 index 0000000..efb6ccc --- /dev/null +++ b/src/service/DoctorService.java @@ -0,0 +1,21 @@ +package com.example.hosdata.service; + +import com.example.hosdata.dao.DoctorDAO; +import com.example.hosdata.pojo.Doctor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +public class DoctorService { + @Autowired + DoctorDAO doctorDAO; + + public List填写预约挂号信息
++ ++ + ++ + ++ ++ + + + + + + + + + + + ++ ++ + ++ ++ + + + + + + ++ ++ + + + + + + + + + + + + +确定 +listByDepartment(String department) { + return doctorDAO.findAllByDepartment(department); + } + + public List listworktime(String doctor) { + return doctorDAO.findAllByDoctorname(doctor); + } +} diff --git a/src/service/DocyzService.java b/src/service/DocyzService.java new file mode 100644 index 0000000..55cff90 --- /dev/null +++ b/src/service/DocyzService.java @@ -0,0 +1,27 @@ +package com.example.hosdata.service; + +import com.example.hosdata.dao.DocDAO; +import com.example.hosdata.pojo.Docyz; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.List; + +@Service +public class DocyzService { + @Autowired + DocDAO docDAO; + static public String ghname; + static public String doctorname; + + public void addOrUpdate(Docyz doc) { + docDAO.save(doc); + } + + public List listByghname() { + return docDAO.findByGhname(this.ghname); + } + + public List listBydoctorname() { + return docDAO.findByDoctorname(this.doctorname); + } +} diff --git a/src/service/InService.java b/src/service/InService.java new file mode 100644 index 0000000..33bf04b --- /dev/null +++ b/src/service/InService.java @@ -0,0 +1,26 @@ +package com.example.hosdata.service; + +import com.example.hosdata.dao.InDAO; +import com.example.hosdata.dao.RegisterDAO; +import com.example.hosdata.pojo.Information; +import com.example.hosdata.pojo.RegisterRecord; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class InService { + @Autowired + InDAO inDAO; + static public String userna; + + public List listbyuser() { + return inDAO.findByUsername(userna); + } + + public void update(Information information) { + inDAO.save(information); + } +} diff --git a/src/service/RegisterService.java b/src/service/RegisterService.java new file mode 100644 index 0000000..0864d07 --- /dev/null +++ b/src/service/RegisterService.java @@ -0,0 +1,35 @@ +package com.example.hosdata.service; + +import com.example.hosdata.dao.RegisterDAO; +import com.example.hosdata.pojo.RegisterRecord; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class RegisterService { + @Autowired + RegisterDAO reDAO; + static public String username; + + public List listByname() { + return reDAO.findByUsername(this.username); + } + + public void addOrUpdate(RegisterRecord record) { + reDAO.save(record); + } + + public List list() { + return reDAO.findAll(); + } + + public List Search(String doctor) { + return reDAO.findByDoctor(doctor); + } + +} + + diff --git a/src/service/ShopService.java b/src/service/ShopService.java new file mode 100644 index 0000000..1529aa7 --- /dev/null +++ b/src/service/ShopService.java @@ -0,0 +1,39 @@ +package com.example.hosdata.service; + +import com.example.hosdata.dao.ShopDAO; +import com.example.hosdata.dao.ShopRecordDAO; +import com.example.hosdata.pojo.Medicine; +import com.example.hosdata.pojo.ShopRecord; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ShopService { + public String place = "药房"; + + static public String myzh; + @Autowired + ShopDAO shopDAO; + + @Autowired + ShopRecordDAO shopRecordDAO; + + public List MedicineList(){ + return shopDAO.findAllByPlace(place); + } + + public void addOrUpdate(ShopRecord shopRecord) { + shopRecordDAO.save(shopRecord); + } + + public void Update(Medicine medicine) { + medicine.setPlace("药房"); + shopDAO.save(medicine); + } + + public List listBymyzh() { + return shopRecordDAO.findByMyzh(this.myzh); + } +} diff --git a/src/service/UserService.java b/src/service/UserService.java new file mode 100644 index 0000000..11d3c0e --- /dev/null +++ b/src/service/UserService.java @@ -0,0 +1,38 @@ +package com.example.hosdata.service; + +import com.example.hosdata.dao.UserDAO; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.pojo.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class UserService { + @Autowired + UserDAO userDAO; + + public boolean isExist(String username) { + User user = getByName(username); + return null!=user; + } + + public User getByName(String username) { + return userDAO.findByUsername(username); + } + + public User get(String username, String password){ + return userDAO.getByUsernameAndPassword(username, password); + } + + public void add(User user) { + userDAO.save(user); + } + + public User getall(String id, String username, String password, String realname) { + return userDAO.getByIdAndUsernameAndPasswordAndRealname(id,username,password,realname); + } + +} +//在DAO中只定义基础的增删改查操作,而具体操作需要service来完成 diff --git a/src/service/ZhuService.java b/src/service/ZhuService.java new file mode 100644 index 0000000..668682f --- /dev/null +++ b/src/service/ZhuService.java @@ -0,0 +1,23 @@ +package com.example.hosdata.service; + +import com.example.hosdata.dao.InDAO; +import com.example.hosdata.dao.RegisterDAO; +import com.example.hosdata.dao.ZhuDAO; +import com.example.hosdata.pojo.Information; +import com.example.hosdata.pojo.RegisterRecord; +import com.example.hosdata.pojo.Zhuce; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ZhuService { + @Autowired + ZhuDAO zhuDAO; + + public void add(Zhuce zhuce) { + zhuDAO.save(zhuce); + } +} diff --git a/src/setting/SettingIndex.vue b/src/setting/SettingIndex.vue new file mode 100644 index 0000000..79aff7e --- /dev/null +++ b/src/setting/SettingIndex.vue @@ -0,0 +1,147 @@ + + + + + + + + diff --git a/src/shop/ShopIndex.vue b/src/shop/ShopIndex.vue new file mode 100644 index 0000000..4ff9d37 --- /dev/null +++ b/src/shop/ShopIndex.vue @@ -0,0 +1,99 @@ + ++ ++ ++ ++ ++ +修改 ++ ++ + ++ ++ + ++ + ++ + ++ + ++ + ++ + + + + diff --git a/src/shoprecords/ShoprecordIndex.vue b/src/shoprecords/ShoprecordIndex.vue new file mode 100644 index 0000000..bf0af64 --- /dev/null +++ b/src/shoprecords/ShoprecordIndex.vue @@ -0,0 +1,56 @@ + ++ + + ++ ++ + ++ + + + ++ ++ ++ ++ ++ + + +购买 ++ + + + + + diff --git a/src/treatment/TreatmentIndex.vue b/src/treatment/TreatmentIndex.vue new file mode 100644 index 0000000..df10415 --- /dev/null +++ b/src/treatment/TreatmentIndex.vue @@ -0,0 +1,71 @@ + ++ ++ ++ ++ + + + + + diff --git a/src/zhu/ZhuceIndex.vue b/src/zhu/ZhuceIndex.vue new file mode 100644 index 0000000..615f01a --- /dev/null +++ b/src/zhu/ZhuceIndex.vue @@ -0,0 +1,83 @@ + ++ ++ ++ ++ ++ ++ ++ + + + + + From 5e0d63960f4e37b77c90055e70e2adb096bcb50c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E6=85=95=E6=B6=B5?= <2292559624@qq.com> Date: Thu, 24 Nov 2022 23:42:22 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {.idea => src/.idea}/.gitignore | 0 {.idea => src/.idea}/codeStyles/Project.xml | 0 {.idea => src/.idea}/codeStyles/codeStyleConfig.xml | 0 {.idea => src/.idea}/hospital.iml | 0 .../.idea}/inspectionProfiles/Project_Default.xml | 0 {.idea => src/.idea}/jpa-buddy.xml | 0 .../.idea}/libraries/chromedriver_win32.xml | 0 .../selenium_server_standalone_3_141_59.xml | 0 {.idea => src/.idea}/misc.xml | 0 {.idea => src/.idea}/modules.xml | 0 {build => src/build}/build.js | 0 {build => src/build}/check-versions.js | 0 {build => src/build}/logo.png | Bin {build => src/build}/utils.js | 0 {build => src/build}/vue-loader.conf.js | 0 {build => src/build}/webpack.base.conf.js | 0 {build => src/build}/webpack.dev.conf.js | 0 {build => src/build}/webpack.prod.conf.js | 0 {config => src/config}/dev.env.js | 0 {config => src/config}/index.js | 0 {config => src/config}/prod.env.js | 0 {config => src/config}/test.env.js | 0 22 files changed, 0 insertions(+), 0 deletions(-) rename {.idea => src/.idea}/.gitignore (100%) rename {.idea => src/.idea}/codeStyles/Project.xml (100%) rename {.idea => src/.idea}/codeStyles/codeStyleConfig.xml (100%) rename {.idea => src/.idea}/hospital.iml (100%) rename {.idea => src/.idea}/inspectionProfiles/Project_Default.xml (100%) rename {.idea => src/.idea}/jpa-buddy.xml (100%) rename {.idea => src/.idea}/libraries/chromedriver_win32.xml (100%) rename {.idea => src/.idea}/libraries/selenium_server_standalone_3_141_59.xml (100%) rename {.idea => src/.idea}/misc.xml (100%) rename {.idea => src/.idea}/modules.xml (100%) rename {build => src/build}/build.js (100%) rename {build => src/build}/check-versions.js (100%) rename {build => src/build}/logo.png (100%) rename {build => src/build}/utils.js (100%) rename {build => src/build}/vue-loader.conf.js (100%) rename {build => src/build}/webpack.base.conf.js (100%) rename {build => src/build}/webpack.dev.conf.js (100%) rename {build => src/build}/webpack.prod.conf.js (100%) rename {config => src/config}/dev.env.js (100%) rename {config => src/config}/index.js (100%) rename {config => src/config}/prod.env.js (100%) rename {config => src/config}/test.env.js (100%) diff --git a/.idea/.gitignore b/src/.idea/.gitignore similarity index 100% rename from .idea/.gitignore rename to src/.idea/.gitignore diff --git a/.idea/codeStyles/Project.xml b/src/.idea/codeStyles/Project.xml similarity index 100% rename from .idea/codeStyles/Project.xml rename to src/.idea/codeStyles/Project.xml diff --git a/.idea/codeStyles/codeStyleConfig.xml b/src/.idea/codeStyles/codeStyleConfig.xml similarity index 100% rename from .idea/codeStyles/codeStyleConfig.xml rename to src/.idea/codeStyles/codeStyleConfig.xml diff --git a/.idea/hospital.iml b/src/.idea/hospital.iml similarity index 100% rename from .idea/hospital.iml rename to src/.idea/hospital.iml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/src/.idea/inspectionProfiles/Project_Default.xml similarity index 100% rename from .idea/inspectionProfiles/Project_Default.xml rename to src/.idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/jpa-buddy.xml b/src/.idea/jpa-buddy.xml similarity index 100% rename from .idea/jpa-buddy.xml rename to src/.idea/jpa-buddy.xml diff --git a/.idea/libraries/chromedriver_win32.xml b/src/.idea/libraries/chromedriver_win32.xml similarity index 100% rename from .idea/libraries/chromedriver_win32.xml rename to src/.idea/libraries/chromedriver_win32.xml diff --git a/.idea/libraries/selenium_server_standalone_3_141_59.xml b/src/.idea/libraries/selenium_server_standalone_3_141_59.xml similarity index 100% rename from .idea/libraries/selenium_server_standalone_3_141_59.xml rename to src/.idea/libraries/selenium_server_standalone_3_141_59.xml diff --git a/.idea/misc.xml b/src/.idea/misc.xml similarity index 100% rename from .idea/misc.xml rename to src/.idea/misc.xml diff --git a/.idea/modules.xml b/src/.idea/modules.xml similarity index 100% rename from .idea/modules.xml rename to src/.idea/modules.xml diff --git a/build/build.js b/src/build/build.js similarity index 100% rename from build/build.js rename to src/build/build.js diff --git a/build/check-versions.js b/src/build/check-versions.js similarity index 100% rename from build/check-versions.js rename to src/build/check-versions.js diff --git a/build/logo.png b/src/build/logo.png similarity index 100% rename from build/logo.png rename to src/build/logo.png diff --git a/build/utils.js b/src/build/utils.js similarity index 100% rename from build/utils.js rename to src/build/utils.js diff --git a/build/vue-loader.conf.js b/src/build/vue-loader.conf.js similarity index 100% rename from build/vue-loader.conf.js rename to src/build/vue-loader.conf.js diff --git a/build/webpack.base.conf.js b/src/build/webpack.base.conf.js similarity index 100% rename from build/webpack.base.conf.js rename to src/build/webpack.base.conf.js diff --git a/build/webpack.dev.conf.js b/src/build/webpack.dev.conf.js similarity index 100% rename from build/webpack.dev.conf.js rename to src/build/webpack.dev.conf.js diff --git a/build/webpack.prod.conf.js b/src/build/webpack.prod.conf.js similarity index 100% rename from build/webpack.prod.conf.js rename to src/build/webpack.prod.conf.js diff --git a/config/dev.env.js b/src/config/dev.env.js similarity index 100% rename from config/dev.env.js rename to src/config/dev.env.js diff --git a/config/index.js b/src/config/index.js similarity index 100% rename from config/index.js rename to src/config/index.js diff --git a/config/prod.env.js b/src/config/prod.env.js similarity index 100% rename from config/prod.env.js rename to src/config/prod.env.js diff --git a/config/test.env.js b/src/config/test.env.js similarity index 100% rename from config/test.env.js rename to src/config/test.env.js注册新用户
++ ++ ++ + ++ + ++ + ++ + +确定 +