Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改侧边栏 #1388

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vue-router": "^3.0.1",
"vuedraggable": "^2.16.0",
"vuex": "^3.0.1",
"wangeditor": "^3.1.1",
"wangeditor": "^4.7.9",
"xlsx": "^0.13.3"
},
"devDependencies": {
Expand Down
52 changes: 45 additions & 7 deletions src/components/editor/editor.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="editor-wrapper">
<div :id="editorId"></div>
<div class="editor-wrapper" style="height:100%;">
<div :id="editorId" style="height:100% !important;" ></div>
</div>
</template>

<script>
import Editor from 'wangeditor'
import 'wangeditor/release/wangEditor.min.css'
// import 'wangeditor/release/wangEditor.min.css'
import { oneOf } from '@/libs/tools'
export default {
name: 'Editor',
Expand Down Expand Up @@ -52,13 +52,45 @@ export default {
},
mounted () {
this.editor = new Editor(`#${this.editorId}`)
this.editor.customConfig.onchange = (html) => {
this.editor.config.onchange = (html) => {
console.log(`onchange html si: ${JSON.stringify(html)}`)
let text = this.editor.txt.text()
if (this.cache) localStorage.editorCache = html
this.$emit('input', this.valueType === 'html' ? html : text)
this.$emit('on-change', html, text)
}
this.editor.customConfig.onchangeTimeout = this.changeInterval
// this.editor.config.menuTooltipPosition = 'down'
this.editor.config.showMenuTooltips = false
this.editor.config.onchangeTimeout = this.changeInterval
this.editor.config.menus = [
'head',
'bold',
'fontSize',
'italic',
'strikeThrough',
'indent',
'lineHeight',
'foreColor',
'backColor',
'list',
'justify',
'quote',
'table',
'splitLine',
'undo',
'redo'
]
this.editor.config.colors = [
'#ffffff',
'#000000',
'#1c487f',
'#4d80bf',
'#c24f4a',
'#8baa4a',
'#7b5ba1',
'#46acc8',
'#f9963b'
]
// create这个方法一定要在所有配置项之后调用
this.editor.create()
// 如果本地有存储加载本地存储内容
Expand All @@ -69,7 +101,13 @@ export default {
</script>

<style lang="less">
.editor-wrapper *{
z-index: 100 !important;
.editor-wrapper {
// z-index: 100 !important;
.w-e-text-container{
height: calc(~"130%") !important;
}
.w-e-toolbar{
height: 100px;
}
}
</style>
2 changes: 1 addition & 1 deletion src/components/main/main.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<Layout style="height: 100%" class="main">
<Sider hide-trigger collapsible :width="256" :collapsed-width="64" v-model="collapsed" class="left-sider" :style="{overflow: 'hidden'}">
<Sider hide-trigger collapsible :width="200" :collapsed-width="65" v-model="collapsed" class="left-sider" :style="{overflow: 'hidden'}">
<side-menu accordion ref="sideMenu" :active-name="$route.name" :collapsed="collapsed" @on-select="turnToPage" :menu-list="menuList">
<!-- 需要放在菜单上面的内容,如Logo,写在side-menu标签内部,如下 -->
<div class="logo-con">
Expand Down
29 changes: 28 additions & 1 deletion src/locale/lang/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,32 @@ export default {
tree_table_page: '树状表格',
org_tree_page: '组织结构树',
drag_drawer_page: '可拖动抽屉',
tree_select_page: '树状下拉选择器'
tree_select_page: '树状下拉选择器',
// 设置路由
zero_setting: '设置',
my_info: '个人信息',
permissions: '权限设置',
phone_num: '重置手机号',
pwd: '重置密码',
// 搜索路由
zero_search: '查询',
doctor: '医生信息',
patient: '病人信息',
transforPatient: '病人转移',
// 审批路由
zero_approval: '申请审批',
filed: '申请加入医院',
sure: '审批加入医院',
// 模板
zero_template: '模板',
cases: '病例模板',
dropdown: '下拉框模板',
table: '表格模板',
// 精神疾病路由
zero_spirit: '精神疾病',
in_hospital_record: '入院记录',
search_home_record: '查房记录',
download_table: '下载表格',
setting_table: '表格配置'

}
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import VOrgTree from 'v-org-tree'
import 'v-org-tree/dist/v-org-tree.css'
// 实际打包时应该不引入mock
/* eslint-disable */
if (process.env.NODE_ENV !== 'production') require('@/mock')
// if (process.env.NODE_ENV !== 'production')
require('@/mock')

Vue.use(iView, {
i18n: (key, value) => i18n.t(key, value)
Expand Down
223 changes: 223 additions & 0 deletions src/router/hRouter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
import Main from '@/components/main'
// import parentView from '@/components/parent-view'

// 设置
const setting = [
{
path: '/setting',
name: 'zero_setting',
component: Main,
meta: {
title: '精神疾病',
icon: 'ios-book'
},
children: [
{
path: 'my_info',
name: 'my_info',
meta: {
icon: '_qq',
title: 'my_info'
},
component: () => import('@/view/zero/settings/myInfo.vue')
},
{
path: 'permissions',
name: 'permissions',
meta: {
icon: '_qq',
title: 'permissions'
},
component: () => import('@/view/zero/settings/permissions.vue')
},
{
path: 'phone_num',
name: 'phone_num',
meta: {
icon: '_qq',
title: 'phone_num'
},
component: () => import('@/view/zero/settings/phoneNum.vue')
},
{
path: 'pwd',
name: 'pwd',
meta: {
icon: '_qq',
title: 'pwd'
},
component: () => import('@/view/zero/settings/pwd.vue')
}
]
}
]

// 搜索
const search = [
{
path: '/search',
name: 'zero_search',
component: Main,
meta: {
title: '查询',
icon: 'ios-book'
},
children: [
{
path: 'doctor',
name: 'doctor',
meta: {
icon: '_qq',
title: 'doctor'
},
component: () => import('@/view/zero/search/doctor.vue')
},
{
path: 'patient',
name: 'patient',
meta: {
icon: '_qq',
title: 'patient'
},
component: () => import('@/view/zero/search/patient.vue')
},
{
path: 'transforPatient',
name: 'transforPatient',
meta: {
icon: '_qq',
title: 'transforPatient'
},
component: () => import('@/view/zero/search/transforPatient.vue')
}
]
}
]

// 审批
const approval = [
{
path: '/approval',
name: 'zero_approval',
component: Main,
meta: {
title: '审批',
icon: 'ios-book'
},
children: [
{
path: 'filed',
name: 'filed',
meta: {
icon: '_qq',
title: 'filed'
},
component: () => import('@/view/zero/approval/filed.vue')
},
{
path: 'sure',
name: 'sure',
meta: {
icon: '_qq',
title: 'sure'
},
component: () => import('@/view/zero/approval/sure.vue')
}
]
}
]

// 模板
const templete = [
{
path: '/template',
name: 'zero_template',
component: Main,
meta: {
title: '模板',
icon: 'ios-book'
},
children: [
{
path: 'cases',
name: 'cases',
meta: {
icon: '_qq',
title: 'cases'
},
component: () => import('@/view/zero/template/cases.vue')
},
{
path: 'dropdown',
name: 'dropdown',
meta: {
icon: '_qq',
title: 'dropdown'
},
component: () => import('@/view/zero/template/dropdown.vue')
},
{
path: 'table',
name: 'table',
meta: {
icon: '_qq',
title: 'table'
},
component: () => import('@/view/zero/template/table.vue')
}
]
}
]

// 精神疾病
const spirit = [
{
path: '/spirit',
name: 'zero_spirit',
component: Main,
meta: {
title: '精神疾病',
icon: 'ios-book'
},
children: [
{
path: 'in_hospital_record',
name: 'in_hospital_record',
meta: {
icon: '_qq',
title: 'in_hospital_record'
},
component: () => import('@/view/zero/spirit/inHospitalRecord.vue')
},
{
path: 'search_home_record',
name: 'search_home_record',
meta: {
icon: '_qq',
title: 'search_home_record'
},
component: () => import('@/view/zero/spirit/searchHomeRecord.vue')
},
{
path: 'download_table',
name: 'download_table',
meta: {
icon: 'md-download',
title: 'download_table'
},
component: () => import('@/view/zero/spirit/downloadTable.vue')
},
{
path: 'setting_table',
name: 'setting_table',
meta: {
icon: '_qq',
title: 'setting_table'
},
component: () => import('@/view/zero/spirit/settingTable.vue')
}
]
}
]

export default [...setting, ...search, ...approval, ...templete, ...spirit]
3 changes: 2 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const { homeName } = config
Vue.use(Router)
const router = new Router({
routes,
mode: 'history'
mode: 'hash',
base: '/hospital'
})
const LOGIN_PAGE_NAME = 'login'

Expand Down
Loading