Commit 48cfd035 authored by sheng du's avatar sheng du
Browse files

init

parent 89dffcd8
No related merge requests found
Pipeline #802 canceled with stages
> 1%
last 2 versions
not dead
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
VUE_APP_REMOTE_URL = '/'
\ No newline at end of file
# just a flag
ENV = 'production'
# base api
VUE_APP_BASE_API = '/'
\ No newline at end of file
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "eslint:recommended"],
parserOptions: {
parser: "babel-eslint"
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
}
};
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# CountingDreams
数梦智慧两江
\ No newline at end of file
数梦智慧两江
# vue2.x 模板仓库
模板仓库
- [x] vuex 自动添加模块:store 下模块文件夹 index.js
- [x] axios
- [x] vue-router 自动添加路由:views 文件夹下每一个文件夹下都 index.vue,嵌套路由下必须有 index.vue router-view
- [x] sass && scss
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
{
"name": "templat",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.0",
"core-js": "^3.6.5",
"dayjs": "^1.9.7",
"echarts": "^5.4.3",
"element-ui": "^2.14.0",
"gho-menu": "^1.0.1",
"loadash": "^1.0.0",
"mockjs": "^1.1.0",
"vue": "^2.6.11",
"vue-functional-data-merge": "^3.1.0",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"lint-staged": "^9.5.0",
"node-sass": "^6.0.0",
"prettier": "^1.19.1",
"sass-loader": "^10.2.0",
"script-ext-html-webpack-plugin": "^2.1.5",
"vue-template-compiler": "^2.6.11",
"webpack-bundle-analyzer": "^4.1.0"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue}": [
"vue-cli-service lint",
"git add"
]
}
}
public/favicon.ico

4.19 KB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script src="http://at.alicdn.com/t/font_2273126_oy1g7zvosu.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
{
"科室数据": "",
"state": true,
"message": "SUCCESS",
"body": [
{
"name": "肾内科",
"id": 1
},
{
"name": "呼吸内科",
"id": 2
},
{
"name": "普外科",
"id": 3
},
{
"name": "泌尿外科",
"id": 4
}
],
"cause": null
}
{
"事件数据": "",
"state": true,
"message": "SUCCESS",
"body": [
{
"name": "多联抗生素使用",
"id": 1
},
{
"name": "特殊抗生素使用",
"id": 2
},
{
"name": "抢救",
"id": 3
},
{
"name": "重大及特殊治疗",
"id": 4
},
{
"name": "特殊类切口抗菌素使用",
"id": 5
},
{
"name": "超期使用抗菌素",
"id": 6
},
{
"name": "危急值人数",
"id": 7
},
{
"name": "危重患者",
"id": 8
},
{
"name": "转危患者",
"id": 9
},
{
"name": "重点疾病",
"id": 10
},
{
"name": "院内感染",
"id": 11
},
{
"name": "住院超过30天人数",
"id": 12
},
{
"name": "传染病",
"id": 13
},
{
"name": "死亡患者",
"id": 14
}
],
"cause": null
}
{
"重点疾病数据": "",
"state": true,
"message": "SUCCESS",
"body": {
"表头数据": "",
"headers": [
{
"field": "index",
"dataField": "index",
"fieldName": "序号",
"fixed": true,
"sorted": false,
"index": 1
},
{
"field": "name",
"dataField": "name",
"fieldName": "姓名",
"fixed": true,
"sorted": false,
"index": 2
},
{
"field": "sex",
"dataField": "sex",
"fieldName": "性别",
"fixed": true,
"sorted": false,
"index": 3
},
{
"field": "age",
"dataField": "age",
"fieldName": "年龄",
"fixed": true,
"sorted": false,
"index": 4
},
{
"field": "rtime",
"dataField": "rtime",
"fieldName": "入院日期",
"fixed": true,
"sorted": false,
"index": 5
},
{
"field": "ctime",
"dataField": "ctime",
"fieldName": "出院日期",
"fixed": true,
"sorted": false,
"index": 6
},
{
"field": "rdept",
"dataField": "rdept",
"fieldName": "入院科室",
"fixed": true,
"sorted": false,
"index": 7
},
{
"field": "cdept",
"dataField": "cdept",
"fieldName": "出院日期",
"fixed": true,
"sorted": false,
"index": 8
},
{
"field": "infoName",
"dataField": "infoName",
"fieldName": "诊断名称",
"fixed": true,
"sorted": false,
"index": 11
},
{
"field": "infoTime",
"dataField": "infoTime",
"fieldName": "诊断时间",
"fixed": true,
"sorted": false,
"index": 10
},
{
"field": "doctor",
"dataField": "doctor",
"fieldName": "管床医生",
"fixed": true,
"sorted": false,
"index": 12
}
],
"pages": 1,
"total": 1,
"pageNum": 1,
"pageSize": 20,
"list": [
{
"index": "1",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"infoTime": "2020-06-25",
"infoName": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "2",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"infoTime": "2020-06-25",
"infoName": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "3",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"infoTime": "2020-06-25",
"infoName": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "4",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"infoTime": "2020-06-25",
"infoName": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "5",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"infoTime": "2020-06-25",
"infoName": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "6",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"infoTime": "2020-06-25",
"infoName": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "7",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"infoTime": "2020-06-25",
"infoName": "腿部骨质坏死",
"doctor": "王晓梅"
}
],
"prePage": 0,
"nextPage": 0,
"extData": {}
},
"cause": null
}
{
"危重患者数据": "",
"state": true,
"message": "SUCCESS",
"body": {
"表头数据": "",
"headers": [
{
"field": "index",
"dataField": "index",
"fieldName": "序号",
"fixed": true,
"sorted": false,
"index": 1
},
{
"field": "name",
"dataField": "name",
"fieldName": "姓名",
"fixed": true,
"sorted": false,
"index": 2
},
{
"field": "sex",
"dataField": "sex",
"fieldName": "性别",
"fixed": true,
"sorted": false,
"index": 3
},
{
"field": "age",
"dataField": "age",
"fieldName": "年龄",
"fixed": true,
"sorted": false,
"index": 4
},
{
"field": "rtime",
"dataField": "rtime",
"fieldName": "入院日期",
"fixed": true,
"sorted": false,
"index": 5
},
{
"field": "ctime",
"dataField": "ctime",
"fieldName": "出院日期",
"fixed": true,
"sorted": false,
"index": 6
},
{
"field": "rdept",
"dataField": "rdept",
"fieldName": "入院科室",
"fixed": true,
"sorted": false,
"index": 7
},
{
"field": "cdept",
"dataField": "cdept",
"fieldName": "出院日期",
"fixed": true,
"sorted": false,
"index": 8
},
{
"field": "state",
"dataField": "state",
"fieldName": "状态",
"fixed": true,
"sorted": false,
"index": 9
},
{
"field": "startTime",
"dataField": "startTime",
"fieldName": "开始时间",
"fixed": true,
"sorted": false,
"index": 10
},
{
"field": "info",
"dataField": "info",
"fieldName": "诊断",
"fixed": true,
"sorted": false,
"index": 11
},
{
"field": "doctor",
"dataField": "doctor",
"fieldName": "管床医生",
"fixed": true,
"sorted": false,
"index": 12
}
],
"pages": 1,
"total": 1,
"pageNum": 1,
"pageSize": 20,
"list": [
{
"index": "1",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"startTime": "2020-06-25",
"info": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "2",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"startTime": "2020-06-25",
"info": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "3",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"startTime": "2020-06-25",
"info": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "4",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"startTime": "2020-06-25",
"info": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "5",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"startTime": "2020-06-25",
"info": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "6",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"startTime": "2020-06-25",
"info": "腿部骨质坏死",
"doctor": "王晓梅"
},
{
"index": "7",
"name": "赵晓峰",
"sex": "男",
"age": "42岁",
"rtime": "2020-06-25",
"ctime": "2020-06-25",
"rdept": "急诊科",
"cdept": "急诊科",
"state": "紧急",
"startTime": "2020-06-25",
"info": "腿部骨质坏死",
"doctor": "王晓梅"
}
],
"prePage": 0,
"nextPage": 0,
"extData": {}
},
"cause": null
}
<template>
<div id="app">
<InnerView v-if="!isLogin">
<AppHeader @changeCollapse="changeCollapse"></AppHeader>
<div class="main-view">
<SubHeader></SubHeader>
<div class="flex content-view">
<SideBar :isCollapse="isCollapse"></SideBar>
<div class="right-main">
<PaddingView class="flex-col">
<BreadCrumb ref="BreadCrumb"> </BreadCrumb>
<!-- <transition :name="transition"> -->
<keep-alive :include="cacheRoutes">
<router-view class="child-view"></router-view>
</keep-alive>
<!-- </transition> -->
</PaddingView>
</div>
</div>
</div>
</InnerView>
<InnerView v-else>
<router-view class="child-view"></router-view>
</InnerView>
</div>
</template>
<script>
import { mapState } from "vuex";
import {
// RouteView,
InnerView,
} from "@/components/Layout";
import { SideBar, AppHeader, SubHeader, BreadCrumb } from "@/components/App";
export default {
name: "App",
components: {
SideBar,
AppHeader,
// RouteView,
InnerView,
SubHeader,
BreadCrumb,
},
data() {
return {
transition: "",
lastRouteIndex: 0,
isCollapse: false,
};
},
computed: {
...mapState({
cacheRoutes: (state) => state.app.cacheRoutes,
}),
isLogin() {
return this.$route.path == "/login";
},
},
watch: {
$route(val) {
// console.log(val);
const index = val?.meta?.index || 0;
if (val.meta.index >= this.lastRouteIndex) {
this.transition = "right-slide-in";
} else {
this.transition = "left-slide-in";
}
this.lastRouteIndex = index;
},
},
methods: {
changeCollapse(val) {
this.isCollapse = val;
},
},
};
</script>
<style lang="scss">
* {
box-sizing: border-box;
}
html,
body,
#app {
margin: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
background: #f5f5f5;
}
#app {
display: flex;
}
.main-view {
display: flex;
flex-flow: column;
position: relative;
z-index: 2;
width: 1200px;
margin: 0 auto;
height: calc(100vh - 136px);
margin-top: 22px;
overflow: hidden;
}
.content-view {
width: 100%;
height: 100%;
overflow-y: hidden;
padding-top: 20px;
}
.right-main {
width: 100%;
margin-left: 18px;
border-radius: 8px;
background-color: #fff;
overflow-y: auto;
overflow-x: hidden;
}
</style>
import request from "@/utils/request";
export default {
//获取用户信息
getUserInfo(params) {
return request({
url: "/mock/getUserInfo",
method: "get",
params
});
},
};
\ No newline at end of file
import request from "@/utils/request";
export default {
//登录
login(params) {
return request({
url: "/mock/login",
method: "post",
params
});
},
//退出登录
loginOut(params) {
return request({
url: "/mock/loginOut",
method: "post",
params
});
},
};
import common from "./common";
import auth from "./auth";
export {
common,
auth
};
\ No newline at end of file
@import "./variables.scss";
@import "~element-ui/packages/theme-chalk/src/index";
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
/*高宽分别对应横竖滚动条的尺寸*/
height: 2px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 10px;
box-shadow: inset 0 0 5px rgba(97, 184, 179, 0.1);
background: #2171FF;
}
::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
border-radius: 10px;
background: #ededed;
}
.flex {
display: flex;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-end {
display: flex;
align-items: center;
justify-content: flex-end;
}
.hidden-text {
opacity: 0;
}
.flex-col {
display: flex;
flex-flow: column;
}
.content-title {
font-size: 12px;
line-height: 18px;
height: 18px;
padding-left: 15px;
position: relative;
color: #2171FF;
display: flex;
align-items: center;
margin-left: 14px;
margin-top: 20px;
&::before {
content: '';
left: 0;
position: absolute;
width: 4px;
height: 12px;
border-radius: 3px;
background: #3182FF;
}
}
.el-button--primary.is-plain {
background-color: transparent;
border-color: #2171FF;
&:hover {
background-color: #2171FF;
color: #fff;
}
}
.el-button--warning.is-plain {
background-color: transparent;
border-color: #FF8D1A;
&:hover {
// background-color: #FF8D1A;
// color: #fff;
}
}
.el-menu {
&.el-menu--horizontal {
background: transparent;
padding-left: 5px;
padding-top: 20px;
flex-shrink: 0;
.el-menu-item {
padding: 0 0;
margin-right: 100px;
height: 36px;
line-height: 36px;
border-bottom: none;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 4px;
background-color: #2171FF;
transition: all .3s;
opacity: 0;
border-radius: 2px;
}
&.is-active {
color: #2171FF;
border-bottom: none;
position: relative;
&::after {
opacity: 1;
}
}
}
}
}
.el-descriptions {
.el-descriptions__body {
background-color: transparent;
padding-top: 24px;
font-size: 12px;
color: #666;
line-height: 18px;
}
:not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 22px;
}
}
.el-input {
width: 325px;
}
.el-input__inner {
background-color: transparent;
padding: 0px 9px;
}
.el-input--small .el-input__inner {
height: 30px;
line-height: 30px;
border-radius: 1px;
}
\ No newline at end of file
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin scrollBar {
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
@mixin relative {
position: relative;
width: 100%;
height: 100%;
}
@mixin pct($pct) {
width: #{$pct};
position: relative;
margin: 0 auto;
}
@mixin triangle($width, $height, $color, $direction) {
$width: $width/2;
$color-border-style: $height solid $color;
$transparent-border-style: $width solid transparent;
height: 0;
width: 0;
@if $direction==up {
border-bottom: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==right {
border-left: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
@else if $direction==down {
border-top: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==left {
border-right: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
}
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 to comment