Commit 6d2f48e9 by changjin

完成静态页面

parent ad5a41b6
{
"presets": [
["env", {
"modules": false
}],
"stage-2"
],
"plugins": ["transform-runtime","transform-vue-jsx"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["transform-es2015-modules-commonjs", "dynamic-import-node"]
}
}
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
/build/
/config/
/dist/
/*.js
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
.DS_Store
node_modules/
/dist/
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
// to edit target browsers: use "browserslist" field in package.json
"postcss-import": {},
"autoprefixer": {}
}
}
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
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')
})
}
}
'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'
}
}
'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'
},
externals: {
'BMap': 'BMap'
},
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')]
},
{
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]')
}
}, {
test: /\.less$/,
loader: 'style-loader!css-loader!less-loader'
}
]
},
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'
}
}
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
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: true,
hot: true,
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
}),
]
})
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)
}
})
})
'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'),
// set the following option to `true` if you want to extract CSS from
// codesplit chunks into this main css file as well.
// This will result in *all* of your app's CSS being loaded upfront.
allChunks: false,
}),
// 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 vender 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
'use strict'
// This is the webpack config used for unit tests.
const utils = require('./utils')
const webpack = require('webpack')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const webpackConfig = merge(baseWebpackConfig, {
// use inline sourcemap for karma-sourcemap-loader
module: {
rules: utils.styleLoaders()
},
devtool: '#inline-source-map',
resolveLoader: {
alias: {
// necessary to to make lang="scss" work in test when using vue-loader's ?inject option
// see discussion at https://github.com/vuejs/vue-loader/issues/724
'scss-loader': 'sass-loader'
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/test.env')
})
]
})
// no need for app entry during tests
delete webpackConfig.entry
module.exports = webpackConfig
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
'use strict'
// Template version: 1.2.5
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8007, // 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: '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,
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false,
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: false,
// 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
}
}
'use strict'
module.exports = {
NODE_ENV: '"production"'
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>医疗远程问诊-医生端</title>
<!-- <link rel="shortcut icon" href="../static/img/logo.ico"/> -->
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
</head>
<body>
<div id="app"></div>
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "dining-hall-front",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "changjin <changjin@maxrocky.com>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0",
"start": "npm run dev",
"unit": "jest --config test/unit/jest.conf.js --coverage",
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e",
"lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.17.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-polyfill": "^6.26.0",
"cors": "^2.8.5",
"element-ui": "^2.8.2",
"hchs-vue-charts": "^1.2.8",
"less": "^2.7.3",
"less-loader": "^4.0.5",
"lodash": "^4.17.10",
"moment": "^2.22.1",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vue-simple-uploader": "^0.4.6",
"vuex": "^3.1.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-jest": "^21.0.2",
"babel-loader": "^7.1.1",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"cross-spawn": "^5.0.1",
"css-loader": "^0.28.0",
"eslint": "^3.19.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-html": "^3.0.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eventsource-polyfill": "^0.9.6",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"jest": "^21.2.0",
"jest-serializer-vue": "^0.3.0",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"rimraf": "^2.6.0",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-jest": "^1.0.2",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<style lang='less'>
@import "../static/css/main.less";
</style>
\ No newline at end of file
<template>
<div class="main">
<div class="header">
<div class="left">
<div class="imgDiv left">
<img :src="headUrl" class="img">
</div>
<div class="name left white font14">你好,刘德华</div>
</div>
<div class="right mt10">
<div class="date left white font14 mt10">2016年08月08日 08:08:08</div>
<el-button class="ml20" @click="goBack">返回</el-button>
</div>
</div>
<h1 class="white">接诊记录</h1>
<div class="mt20">
<div class="content mt20">
<div class="list font12 pointer" v-for="(item,index) in list" :key="index" @click="goDetail">
<el-col :span="6">接诊时间:{{item.date}}</el-col>
<el-col :span="6">接诊时长:{{item.min}}</el-col>
<el-col :span="4">接入方式:{{item.way}}</el-col>
<el-col :span="4">处置:{{item.status}}</el-col>
<el-col :span="6" class="mt10">病人姓名:{{item.name}}</el-col>
<el-col :span="6" class="mt10">是否预约下次问诊:{{item.is}}</el-col>
<el-col :span="6" class="mt10">是否需要手术:{{item.is}}</el-col>
<el-col :span="6" class="mt10">预计到院时间:{{item.date1}}</el-col>
</div>
</div>
<el-pagination
:page-size="20"
:pager-count="11"
layout="prev, pager, next"
:total="1000" class="pagination mt20 right">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data () {
return {
headUrl:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
list:[
{
date:'2019年8月24日 12:38:40',
min: '13分15秒',
way:'导诊',
status: '完成',
name: '张学友',
is:'否',
date1: '2019年9月8日 10点'
},
{
date:'2019年8月24日 12:38:40',
min: '13分15秒',
way:'导诊',
status: '完成',
name: '张学友',
is:'否',
date1: '2019年9月8日 10点'
},
{
date:'2019年8月24日 12:38:40',
min: '13分15秒',
way:'导诊',
status: '完成',
name: '张学友',
is:'否',
date1: '2019年9月8日 10点'
},
{
date:'2019年8月24日 12:38:40',
min: '13分15秒',
way:'导诊',
status: '完成',
name: '张学友',
is:'否',
date1: '2019年9月8日 10点'
},
{
date:'2019年8月24日 12:38:40',
min: '13分15秒',
way:'导诊',
status: '完成',
name: '张学友',
is:'否',
date1: '2019年9月8日 10点'
},
{
date:'2019年8月24日 12:38:40',
min: '13分15秒',
way:'导诊',
status: '完成',
name: '张学友',
is:'否',
date1: '2019年9月8日 10点'
},
{
date:'2019年8月24日 12:38:40',
min: '13分15秒',
way:'导诊',
status: '完成',
name: '张学友',
is:'否',
date1: '2019年9月8日 10点'
},
]
}
},
created () {
},
methods: {
goDetail () {
this.$router.push('/medicalRecordDetail')
},
goBack () {
this.$router.go(-1)
},
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
overflow: hidden;
height: 85%;
}
.content{
background: #fff;
height: 350px;
overflow: auto;
}
.list{
padding: 10px 20px;
border-bottom: 1px solid #ddd;
overflow: hidden;
}
</style>
<template>
<div class="main">
<div class="header">
<div class="left">
<div class="imgDiv left">
<img :src="headUrl" class="img">
</div>
<div class="name left white font14">你好,刘德华</div>
</div>
<div class="right mt10">
<div class="date left white font14 mt10">2016年08月08日 08:08:08</div>
</div>
</div>
<el-row class="content mt30">
<el-col :span="7">
<div class="plate pointer" @click="goMenu1" style="background:#ff99ff">
<p class="white text-center bold mt20">排班表</p>
<div class="icon mt20"><img src="../../../static/img/news.png" class="img"></div>
</div>
</el-col>
<el-col :span="7" :offset="1">
<div class="plate pointer" @click="goMenu2" style="background:#67ff9a">
<p class="white text-center bold mt20">登录接诊</p>
<div class="icon mt20"><img src="../../../static/img/news.png" class="img"></div>
</div>
</el-col>
<el-col :span="7" :offset="1">
<div class="plate1 pointer" @click="goMenu3" style="background:#ffcc33;">
<p class="white text-center bold mt20">信息展示提醒区</p>
</div>
<div class="plate1 pointer mt30" @click="goMenu4" style="background:#9966ff">
<p class="white text-center bold mt20">病案记录</p>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data () {
return {
headUrl:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg'
}
},
created () {
},
methods: {
goMenu1 () {
this.$router.push('/roaster')
},
goMenu2 () {
this.$router.push('/videoLogin')
},
goMenu3 () {
this.$router.push('/message')
},
goMenu4 () {
this.$router.push('/incompleteRecords')
},
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
height: 85%;
overflow: hidden;
}
.content{
height: 100%;
overflow: hidden;
p{font-size: 26px;}
}
.plate{
padding: 20px;
height: 320px;
overflow: hidden;
}
.plate1{
padding: 20px;
height: 125px;
overflow: hidden;
line-height: 80px;
}
.icon{margin:auto;width:150px;height: 150px;}
.cont{
margin:0 71px;
}
</style>
<template>
<div class="main">
<el-form ref="form" :model="form" label-width="80px" class="formDiv">
<h1 class="font22 text-center">登录</h1>
<el-form-item label="用户名" class="mt30">
<el-input v-model="form.name" placeholder="请输入用户名"></el-input>
</el-form-item>
<el-form-item label="密码">
<el-input v-model="form.phone" placeholder="请输入密码"></el-input>
</el-form-item>
<el-col :span="24" class="text-center mt30">
<el-button type="primary" round @click="loginBtn">登录</el-button>
</el-col>
</el-form>
</div>
</template>
<script>
export default {
data () {
return {
form:{}
}
},
created () {
},
methods: {
loginBtn () {
this.$router.push('/index')
}
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
overflow: hidden;
height: 85%;
}
.formDiv{
width:30%;
background: #fff;
margin: 10% auto;
padding: 20px 30px;
border-radius: 10px;
overflow: hidden;
}
</style>
<template>
<div class="main">
<div class="header">
<div class="left">
<div class="imgDiv left">
<img :src="headUrl" class="img">
</div>
<div class="name left white font14">你好,刘德华</div>
</div>
<div class="right mt10">
<div class="date left white font14 mt10">2016年08月08日 08:08:08</div>
<el-button class="ml20" @click="goBack">返回</el-button>
</div>
</div>
<h1 class="white">博羽的病案</h1>
<div class="content mt20">
<el-row>
<el-col :span="4" class="mb10">就诊成员:博羽</el-col>
<el-col :span="4" class="mb10">年龄:32</el-col>
<el-col :span="16" class="mb10">性别:男</el-col>
<el-col :span="4" class="mb10">问诊次数:23次</el-col>
<el-col :span="8" class="mb10">最后一次问诊:2019年9月1日 12:30:00</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<h1 class="font16 mb10">病案内容</h1>
<el-col :span="6" class="mb10">问诊时间:2019年8月24日</el-col>
<el-col :span="6" class="mb10">确诊疾病:口腔溃疡</el-col>
<el-col :span="6" class="mb10">患病时长:一周</el-col>
<el-col :span="6" class="mb10">处置:完成</el-col>
<el-col :span="2">病情描述:</el-col>
<el-col :span="20">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar tempor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus sapien nunc eget.</el-col>
</el-row>
</div>
</div>
</template>
<script>
export default {
data () {
return {
headUrl:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
}
},
created () {
},
methods: {
goBack () {
this.$router.go(-1)
},
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
overflow: hidden;
height: 85%;
}
.content{
background: #fff;
padding: 30px;
height: 330px;
overflow: auto;
}
.list{
padding: 10px 20px;
border-bottom: 1px solid #ddd;
overflow: hidden;
}
</style>
<template>
<div class="main">
<div class="header">
<div class="left">
<div class="imgDiv left">
<img :src="headUrl" class="img">
</div>
<div class="name left white font14">你好,刘德华</div>
</div>
<div class="right mt10">
<div class="date left white font14 mt10">2016年08月08日 08:08:08</div>
<el-button class="ml20" @click="goBack">返回</el-button>
</div>
</div>
<h1 class="white">通知查询</h1>
<div class="content mt20">
<div class="list" v-for="(item,index) in list" :key="index">
<p class="font12">系统消息:</p>
<p class="font12 ml20 mt10">{{item}}</p>
</div>
</div>
<el-pagination
:page-size="20"
:pager-count="11"
layout="prev, pager, next"
:total="1000" class="pagination mt20 right">
</el-pagination>
</div>
</template>
<script>
export default {
data () {
return {
headUrl:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
list:[
'尊敬的XXX,您的刚刚使用了1次问诊服务,您的免费服务包,剩余27次服务。',
'尊敬的XXX大夫,您已确认接收XXX病人,病人预计将于2019年9月4日 10:00:00 到院入住。',
'尊敬的XXX大夫,XXX病人已预约将于明天到医院取药。',
'尊敬的XXX主任,已有15名患者预约了您于9月10日的专家号,目前剩余号数:0.',
'尊敬的XXX主任,已有15名患者预约了您于9月10日的专家号,目前剩余号数:0.',
'尊敬的XXX主任,已有15名患者预约了您于9月10日的专家号,目前剩余号数:0.',
'尊敬的XXX主任,已有15名患者预约了您于9月10日的专家号,目前剩余号数:0.',
'尊敬的XXX主任,已有15名患者预约了您于9月10日的专家号,目前剩余号数:0.',
'尊敬的XXX主任,已有15名患者预约了您于9月10日的专家号,目前剩余号数:0.',
]
}
},
created () {
},
methods: {
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
overflow: hidden;
height: 85%;
}
.content{
background: #fff;
height: 350px;
overflow: auto;
border: 1px solid #999;
.list{
border-bottom: 1px solid #ddd;
padding: 10px;
}
}
</style>
<template>
<div class="main">
<div class="header">
<div class="left">
<div class="imgDiv left">
<img :src="headUrl" class="img">
</div>
<div class="name left white font14">你好,刘德华</div>
</div>
<div class="right mt10">
<div class="date left white font14 mt10">2016年08月08日 08:08:08</div>
<el-button class="ml20" @click="goBack">返回</el-button>
</div>
</div>
<el-form ref="form" :model="form" label-width="100px" class="mt30">
<el-form-item label="排班表:">
<el-date-picker
v-model="form.date"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
<div class="content mt30">
<el-row v-for="(item,index) in list" :key="index" class="desc white">
<el-col :span="8" class="font14">时间:{{item.date}}</el-col>
<el-col :span="4" class="font14">接诊病人数量:{{item.count}}</el-col>
<el-col :span="4" class="font14">挂出专家号:{{item.count}}</el-col>
<el-col :span="4" class="font14">已预约病人:{{item.count}}</el-col>
</el-row>
</div>
</div>
</template>
<script>
export default {
data () {
return {
form: {},
headUrl:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
list: [
{
url:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
name:'张三',
department: '心内科',
date:'2019年9月15日 08:00--10:00',
number:'6',
count: 4,
price:5000,
desc:'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar tempor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus sapien nunc eget.'
},
{
url:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
name:'张三',
department: '心内科',
date:'2019年9月15日 08:00--10:00',
number:'6',
count: 4,
price:5000,
desc:'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar tempor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus sapien nunc eget.'
},
]
}
},
created () {
},
methods: {
goBack () {
this.$router.go(-1)
},
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
overflow: hidden;
height: 85%;
}
.content{
background: #fff;
padding: 10px;
height: 320px;
overflow: auto;
clear: both;
.desc{
background: #178fc2;
padding: 10px 20px;
margin-bottom: 10px;
}
}
</style>
<template>
<div class="main">
<el-button class="left" @click="goBack">返回</el-button>
<h1 class="text-center">在班医生查岗</h1>
<p class="mt30">当前诊室 刘德华:</p>
<img :src="url" class="img mt20">
</div>
</template>
<script>
export default {
data () {
return {
url:'../../../static/img/video.png'
}
},
created () {
},
methods: {
goBack () {
this.$router.go(-1)
}
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 10% 5% 10%;
background: #fff;
}
</style>
<template>
<div class="main">
<div class="header">
<div class="left">
<div class="imgDiv left">
<img :src="headUrl" class="img">
</div>
<div class="name left white font14">你好,刘德华</div>
</div>
<div class="right mt10">
<div class="date left white font14 mt10">2016年08月08日 08:08:08</div>
<el-button class="ml20" @click="goBack">返回</el-button>
</div>
</div>
<div class="content mt30">
<div class="iconDiv mt30">
<img src="../../../static/img/cup.png" class="img">
</div>
<p class="font20 text-center mt20">正在等待接待人员确认,请您稍等</p>
</div>
</div>
</template>
<script>
export default {
data () {
return {
headUrl:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
}
},
created () {
},
methods: {
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
overflow: hidden;
height: 85%;
}
.content{
background: #fff;
padding: 30px;
height: 330px;
overflow: hidden;
.iconDiv{
width:150px;
height: 150px;
margin: auto;
}
}
</style>
<template>
<div class="main">
<div class="header">
<div class="left">
<div class="imgDiv left">
<img :src="headUrl" class="img">
</div>
<div class="name left white font14">你好,刘德华</div>
</div>
<div class="right mt10">
<div class="date left white font14 mt10">2016年08月08日 08:08:08</div>
<el-button class="ml20" @click="goBack">返回</el-button>
</div>
</div>
<div class="content mt30">
<p class="font20 text-center mt20">您已成功链接问诊室,当前心内科问诊人数共<span class="color">27</span></p>
<p class="font20 text-center mt20">在您名下排队的人数共<span class="color">2</span></p>
<p class="font20 text-center mt20"><span class="bold" style="font-size:52px;padding-right:20px;">20</span>秒后开始接听病人</p>
<div class="text-center mt30"><el-button type="primary" round>开始接入</el-button></div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
headUrl:'http://img3.imgtn.bdimg.com/it/u=378824344,1185609431&fm=26&gp=0.jpg',
}
},
created () {
},
methods: {
}
}
</script>
<style scoped lang="less">
.main{
padding: 2% 5% 5% 5%;
background: #1a9ed7;
overflow: hidden;
height: 85%;
}
.content{
background: #fff;
padding: 30px;
height: 330px;
overflow: hidden;
}
</style>
import Vue from 'vue'
import uploader from 'vue-simple-uploader'
import App from './App'
import router from './router'
import axios from 'axios'
import 'babel-polyfill'
import ElementUI from 'element-ui'
import Vuex from 'vuex'
import store from './vuex/store'
require('element-ui/lib/theme-chalk/index.css')
require('../static/css/index.css')
Vue.use(uploader)
Vue.use(Vuex)
Vue.prototype.baseURL = 'https://diningback.bgy.com.cn' // 生产
axios.defaults.baseURL = Vue.prototype.baseURL
axios.defaults.withCredentials = true
axios.defaults.timeout = 60000
Vue.config.productionTip = false
var alert = require('element-ui').MessageBox.alert
Vue.use(ElementUI)
Vue.prototype.$axios = axios
axios.interceptors.request.use(config => {
config.headers['access_token'] = window.sessionStorage.getItem('access-token')
return config
}, err => {
return Promise.reject(err)
})
async function responseInterceptor (response) {
if (response.data.code === '0') {
return response
} else {
// 在添加其他的错误码判断
if (response.data.msg) {
alert(response.data.msg, '温馨提示')
}
}
}
// 设置拦截器
axios.interceptors.response.use(function (response) {
return responseInterceptor(response)
})
function initVue () {
new Vue({
el: '#app',
router,
axios,
alert,
store,
template: '<App/>',
components: { App }
})
}
initVue()
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
mode: 'history',
routes: [
{
path: '/',
redirect: '/index'
},
{
path: '/index', // 首页
component: resolve =>
require(['../components/page/index.vue'], resolve)
},
{
path: '/login', // 登录
component: resolve =>
require(['../components/page/login.vue'], resolve)
},
{
path: '/video', // 视频页面
component: resolve =>
require(['../components/page/video.vue'], resolve)
},
{
path: '/incompleteRecords', // 接诊记录
component: resolve =>
require(['../components/page/incompleteRecords.vue'], resolve)
},
{
path: '/medicalRecordDetail', // 病案详情
component: resolve =>
require(['../components/page/medicalRecordDetail.vue'], resolve)
},
{
path: '/message', // 信息提醒
component: resolve =>
require(['../components/page/message.vue'], resolve)
},
{
path: '/roaster', // 排班表
component: resolve =>
require(['../components/page/roaster.vue'], resolve)
},
{
path: '/videoLogin', // 视频登录
component: resolve =>
require(['../components/page/videoLogin.vue'], resolve)
},
{
path: '/waitPatient', // 等待病人
component: resolve =>
require(['../components/page/waitPatient.vue'], resolve)
}
]
})
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
// 定义状态
state: {
diningId: ''
},
mutations: {
}
})
export default store
This source diff could not be displayed because it is too large. You can view the blob instead.
*{
padding: 0;
margin: 0;
list-style: none;
font-style: normal;
text-decoration: none;
&:hover{
outline: none;
}
}
html,body,#app,.wrapper{
width:100%;
height:100%;
/*overflow: hidden;*/
}
.wrapper{
overflow-y: hidden;
position: relative;
min-width: 1200px;
}
body{
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
background:#f1f2f6;
}
a{text-decoration: none}
.bold{
font-weight: bold!important;
}
.block{
display: block!important;
}
.text-right{
text-align: right!important;
}
.text-left{
text-align: left!important;
}
.text-center{
text-align: center!important;
}
.mt5{
margin-top: 5px!important;
}
.mt10{
margin-top: 10px!important;
}
.mt15{
margin-top: 15px!important;
}
.mt20{
margin-top: 20px!important;
}
.mt30{
margin-top: 30px!important;
}
.mt50{
margin-top: 50px!important;
}
.ml10{
margin-left: 10px!important;
}
.ml20{
margin-left: 20px!important;
}
.ml30{
margin-left: 30px!important;
}
.ml40{
margin-left: 40px!important;
}
.mr10{
margin-right: 10px!important;
}
.mr20{
margin-right: 20px!important;
}
.mb10{
margin-bottom: 10px!important;
}
.mb20{
margin-bottom: 20px!important;
}
.mb30{
margin-bottom: 30px!important;
}
.font12{
font-size: 12px!important;
}
.font14{
font-size: 14px!important;
}
.font16{
font-size: 16px!important;
}
.font18{
font-size: 18px!important;
}
.font20{
font-size: 20px!important;
}
.font22{
font-size: 22px!important;
}
.img{
width:100%!important;
height:100%!important;
}
.right{
float: right!important;
}
.left{
float: left!important;
}
.color{
color: #ffae33!important;
}
.orange{
color: #EA6C01!important;
}
.green{
color: #5ABB3C!important;
}
.red{
color: red!important;
}
.gray{
color: #999!important;
}
.gray6{
color: #666!important;
}
.white{
color: #fff!important;
}
.pointer{
cursor: pointer!important;
}
.clear{
clear: both!important;
}
.line{
text-decoration-line: underline!important;
}
.header{
height: 80px;
.imgDiv{
width:60px;
height: 60px;
img{
border-radius: 50%;
}
}
.name{
margin-top:20px;
margin-left:10px;
}
}
.el-form-item__label{
font-size: 18px;
color: #fff;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment