门诊医生站-》开立诊断 页面调整
This commit is contained in:
@@ -87,13 +87,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import {getLodop} from '../../../plugins/print/LodopFuncs'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="recordBill">
|
||||
<div id="div1" class="printView_header">
|
||||
<div style="text-align: center; font-size: 20px; height: 40px">
|
||||
{{ userStore.hospitalName }}输液执行单
|
||||
长春市朝阳区中医院输液执行单
|
||||
</div>
|
||||
<div>
|
||||
<span>座位:{{ printData.patientInfo.encounterLocationName }}</span>
|
||||
@@ -61,13 +61,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import {getLodop} from '../../../plugins/print/LodopFuncs'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
printData: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="printTicket">
|
||||
<p>{{ userStore.hospitalName }}</p>
|
||||
<p>长春市朝阳区中医院</p>
|
||||
<div>
|
||||
<span>姓名:</span>
|
||||
<span>{{ printData.patientName }}</span>
|
||||
@@ -26,14 +26,9 @@
|
||||
</template>
|
||||
<script>
|
||||
import JsBarcode from 'jsbarcode';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
export default {
|
||||
name: 'TriageTicket',
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
|
||||
@@ -6,62 +6,27 @@
|
||||
:ellipsis="false"
|
||||
>
|
||||
<template v-for="(item, index) in topMenus">
|
||||
<!-- 处理有子菜单的情况 -->
|
||||
<template v-if="item.children && item.children.length > 0 && index < visibleNumber">
|
||||
<el-sub-menu :style="{'--theme': theme}" :index="item.path" :key="index">
|
||||
<template #title>
|
||||
<svg-icon
|
||||
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
|
||||
:icon-class="item.meta.icon"/>
|
||||
{{ item.meta.title }}
|
||||
</template>
|
||||
<template v-for="(child, childIndex) in item.children" :key="childIndex">
|
||||
<el-menu-item :index="item.path + '/' + (child.path || '')">
|
||||
{{ child.meta.title }}
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</el-sub-menu>
|
||||
</template>
|
||||
<!-- 处理无子菜单的情况 -->
|
||||
<template v-else-if="index < visibleNumber">
|
||||
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index">
|
||||
<svg-icon
|
||||
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
|
||||
:icon-class="item.meta.icon"/>
|
||||
{{ item.meta.title }}
|
||||
</el-menu-item>
|
||||
</template>
|
||||
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber">
|
||||
<svg-icon
|
||||
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
|
||||
:icon-class="item.meta.icon"/>
|
||||
{{ item.meta.title }}
|
||||
</el-menu-item>
|
||||
</template>
|
||||
|
||||
<!-- 顶部菜单超出数量折叠 -->
|
||||
<el-sub-menu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
|
||||
<template #title>更多菜单</template>
|
||||
<template v-for="(item, index) in topMenus" :key="index">
|
||||
<!-- 处理有子菜单的情况 -->
|
||||
<template v-if="item.children && item.children.length > 0 && index >= visibleNumber">
|
||||
<el-sub-menu :index="item.path">
|
||||
<template #title>
|
||||
<svg-icon
|
||||
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
|
||||
:icon-class="item.meta.icon"/>
|
||||
{{ item.meta.title }}
|
||||
</template>
|
||||
<template v-for="(child, childIndex) in item.children" :key="childIndex">
|
||||
<el-menu-item :index="item.path + '/' + (child.path || '')">
|
||||
{{ child.meta.title }}
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</el-sub-menu>
|
||||
</template>
|
||||
<!-- 处理无子菜单的情况 -->
|
||||
<template v-else-if="index >= visibleNumber">
|
||||
<el-menu-item :index="item.path">
|
||||
<svg-icon
|
||||
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
|
||||
:icon-class="item.meta.icon"/>
|
||||
{{ item.meta.title }}
|
||||
</el-menu-item>
|
||||
</template>
|
||||
<template v-for="(item, index) in topMenus">
|
||||
<el-menu-item
|
||||
:index="item.path"
|
||||
:key="index"
|
||||
v-if="index >= visibleNumber">
|
||||
<svg-icon
|
||||
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
|
||||
:icon-class="item.meta.icon"/>
|
||||
{{ item.meta.title }}
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</el-sub-menu>
|
||||
</el-menu>
|
||||
@@ -143,20 +108,6 @@ const activeMenu = computed(() => {
|
||||
activePath = path;
|
||||
appStore.toggleSideBarHide(true);
|
||||
}
|
||||
|
||||
// 检查当前路径是否是子菜单路径
|
||||
let isChildRoute = false;
|
||||
for (const item of routers.value) {
|
||||
if (item.children && item.children.length > 0) {
|
||||
const childRoute = item.children.find(child => (item.path + '/' + (child.path || '')) === path);
|
||||
if (childRoute) {
|
||||
isChildRoute = true;
|
||||
activePath = item.path; // 激活父菜单
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
activeRoutes(activePath);
|
||||
return activePath;
|
||||
})
|
||||
@@ -172,42 +123,20 @@ function handleSelect(key, keyPath) {
|
||||
if (isHttp(key)) {
|
||||
// http(s):// 路径新窗口打开
|
||||
window.open(key, "_blank");
|
||||
} else {
|
||||
// 检查是否是子菜单路径
|
||||
let isChildRoute = false;
|
||||
let parentRoute = null;
|
||||
|
||||
// 查找父路由
|
||||
for (const item of routers.value) {
|
||||
if (item.children && item.children.length > 0) {
|
||||
const childRoute = item.children.find(child => (item.path + '/' + (child.path || '')) === key);
|
||||
if (childRoute) {
|
||||
isChildRoute = true;
|
||||
parentRoute = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isChildRoute) {
|
||||
// 处理子菜单路径
|
||||
router.push({ path: key });
|
||||
appStore.toggleSideBarHide(true);
|
||||
} else if (!route || !route.children) {
|
||||
// 没有子路由路径内部打开
|
||||
const routeMenu = childrenMenus.value.find(item => item.path === key);
|
||||
if (routeMenu && routeMenu.query) {
|
||||
let query = JSON.parse(routeMenu.query);
|
||||
router.push({ path: key, query: query });
|
||||
} else {
|
||||
router.push({ path: key });
|
||||
}
|
||||
appStore.toggleSideBarHide(true);
|
||||
} else if (!route || !route.children) {
|
||||
// 没有子路由路径内部打开
|
||||
const routeMenu = childrenMenus.value.find(item => item.path === key);
|
||||
if (routeMenu && routeMenu.query) {
|
||||
let query = JSON.parse(routeMenu.query);
|
||||
router.push({ path: key, query: query });
|
||||
} else {
|
||||
// 显示左侧联动菜单
|
||||
activeRoutes(key);
|
||||
appStore.toggleSideBarHide(false);
|
||||
router.push({ path: key });
|
||||
}
|
||||
appStore.toggleSideBarHide(true);
|
||||
} else {
|
||||
// 显示左侧联动菜单
|
||||
activeRoutes(key);
|
||||
appStore.toggleSideBarHide(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user