123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- <template>
- <router-view v-slot="{ Component }">
- <keep-alive exclude="login">
- <component :is="Component"/>
- </keep-alive>
- </router-view>
- <soctet-dialog v-if="socketErrDialog"/>
- <progress-bar/>
- </template>
- <script setup name="App">
- import {useStore} from 'vuex'
- import {setCallback, socketErrDialog} from "@/utils/websocket";
- import {ElMessageBox, ElNotification} from "element-plus";
- import sleep from "@/utils/sleep";
- import SoctetDialog from "@/components/xiao-chan/websocket/SoctetDialog.vue";
- import router from "@/router";
- import ProgressBar from "@/components/xiao-chan/progress-bar/ProgressBar.vue";
- const store = useStore()
- let windowSize = getWindowSize()
- store.commit('app/setWindowSize', windowSize)
- store.commit('app/setJdt', {
- title: '数据上传',
- isOpen: false,
- abnormalClosing: false,
- })
- window.onresize = () => {
- store.commit('app/setWindowSize', getWindowSize())
- }
- const emrChannelFunc = {
- "firstPageOfMedicalRecord": (val) => {
- router.push({
- name: 'fillCaseFrontSheet',
- query: {
- patNo: val.inpatientNo,
- deptCode: val.smallDept,
- },
- })
- },
- "medicalAdvice": (val) => {
- router.push({
- name: 'yiZhuLuRu',
- params: {
- inpatientNo: val.inpatientNo
- },
- query: {
- pattern: 'all'
- }
- })
- }
- }
- const createChannel = () => {
- let homePage = new BroadcastChannel('emrChannel')
- homePage.addEventListener('message', async (e) => {
- if (!router.currentRoute.value.path.includes('/myEmrEditor')) {
- await router.push('/blank')
- let data = JSON.parse(e.data)
- emrChannelFunc[data.name](data.data)
- }
- })
- }
- onMounted(() => {
- createChannel()
- setCallback('refreshToken', (data) => {
- store.commit('user/tokenChange', data.token)
- })
- setCallback('sidSingle', async () => {
- await store.dispatch('user/loginOut')
- await ElMessageBox.alert('您的账号已在其他地方登陆,如需修改密码请在个人中心中修改。', '提示', {
- type: 'warning',
- })
- })
- setCallback('criticalValue', (data) => {
- ElMessageBox.alert(data.message, '患者危急值', {
- type: 'error'
- }).then(() => {
- }).catch(() => {
- })
- })
- setCallback('systemNotification', (data) => {
- if (data.count) {
- let newCount = store.state.app.unreadMessageCount + data.count
- store.commit('app/setUnreadMessageCount', newCount)
- }
- if (data.refreshDelay) {
- sleep(data.refreshDelay).then(() => {
- location.reload();
- })
- }
- if (data?.donTDisplay) {
- return
- }
- ElNotification({
- title: typeof data.title === 'undefined' ? '新消息' : data.title,
- message: data.message,
- dangerouslyUseHTMLString: true,
- type: typeof data.type === 'undefined' ? 'warning' : data.type,
- duration: 0,
- })
- })
- })
- function getWindowSize() {
- const w = window.innerWidth
- const h = window.innerHeight - 96
- return {w, h}
- }
- </script>
- <style lang="scss">
- ::-webkit-scrollbar {
- width: 6px;
- &:hover {
- cursor: pointer;
- }
- }
- ::-webkit-scrollbar-thumb {
- border-radius: 4px;
- background: rgba(144, 147, 153, .3);
- &:hover {
- cursor: pointer;
- }
- }
- ::-webkit-scrollbar-button {
- width: 0;
- height: 0;
- display: none;
- }
- html,
- body,
- #app {
- height: 100vh;
- width: 100vw;
- margin: 0;
- padding: 0;
- background-color: #f5f5f5;
- }
- .el-container {
- height: 100%;
- width: 100%;
- margin: 0;
- padding: 0;
- }
- ul, li {
- list-style: none;
- margin: 0;
- padding: 0;
- }
- .小手指 {
- cursor: pointer;
- }
- .xc_box {
- box-shadow: 0 4px 8px rgb(0 0 0 / 20%), 0 6px 20px rgb(0 0 0 / 19%);
- }
- #app {
- font-family: Avenir, Helvetica, Arial, sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- //color: #2c3e50;
- color: black;
- width: 100%;
- height: 100vh;
- font-size: 13px;
- }
- .ellipsis-text {
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- }
- .sex-icon {
- width: 15px;
- height: 15px;
- }
- .el-table .cell {
- padding-left: 4px;
- padding-right: 4px;
- color: black;
- }
- .el-header {
- padding: 0 14px;
- height: 36px;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- }
- .el-header > * {
- flex-wrap: nowrap;
- flex-shrink: 0;
- flex-grow: 0;
- }
- .el-main {
- padding: 0 14px;
- overflow: hidden;
- }
- .el-table__body tr.current-row > td,
- .el-table--striped .el-table__body tr.el-table__row--striped.current-row td {
- background-color: #a7d3ff !important;
- }
- .el-input.is-disabled .el-input__inner {
- color: blue;
- }
- .icon-shangxiatuodong {
- cursor: move;
- font-size: 12px;
- }
- .shangxiatuodong {
- cursor: move;
- }
- .el-checkbox__inner {
- width: 16px;
- height: 16px;
- border: 1px solid #000;
- border-radius: 4px;
- }
- .axios-loading2 {
- animation: axiosloading 1s;
- background-image: url('/src/assets/images/loading.gif');
- -webkit-background-image: url('/src/assets/images/loading.gif');
- background-repeat: no-repeat;
- background-position: center;
- }
- .el-dialog__header {
- border-bottom: 1px solid #ebeef5;
- background-color: #f8f8f8;
- border-radius: 4px;
- }
- .el-dialog {
- border-radius: 4px;
- }
- @keyframes axiosloading {
- 0% {
- opacity: 0;
- }
- 99% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
- .component-box-wrapper__fullscreen {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background: white;
- padding: 20px;
- z-index: 10000;
- height: 100%;
- overflow: auto;
- }
- .component-box-wrapper__half-transparent {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background: rgba(0, 0, 0, 0.7);
- padding: 20px;
- z-index: 1000;
- height: 100%;
- overflow: auto;
- display: flex;
- align-items: flex-start;
- justify-content: center;
- }
- .finger:hover {
- cursor: pointer;
- }
- .component-content-box__dialog-like {
- width: 60%;
- padding: 20px;
- background: white;
- margin-top: 15vh;
- }
- .component-header-box {
- position: relative;
- width: 100%;
- display: flex;
- padding: 0 0 12px 0;
- }
- .component-header__title {
- width: 70%;
- font-size: 16px;
- display: flex;
- align-items: center;
- }
- .component-header__close-button {
- width: 30%;
- text-align: right;
- }
- table th.star div::before {
- content: '*';
- color: #f56c6cff;
- margin-right: 4px;
- }
- .bi_tian .el-form-item__label::before {
- content: '*';
- color: #f56c6cff;
- margin-right: 4px;
- }
- .el-select-dropdown__item.selected {
- background-color: #71abed66;
- }
- .el-select-dropdown__item.hover,
- .el-select-dropdown__item:hover {
- background-color: #fac44d;
- color: white;
- }
- .el-message {
- border: none;
- border-radius: 2px;
- background-color: white;
- padding: 10px 16px;
- box-shadow: 1px 3px 8px 4px rgb(0 0 0 / 10%);
- .el-message__content {
- color: #333333;
- }
- }
- .el-table .el_table__current {
- background-color: #a7d3ff;
- }
- .remove_hover tbody tr:hover > td {
- background-color: transparent !important;
- }
- input[type=number] {
- -moz-appearance: textfield;
- }
- input[type=number]::-webkit-inner-spin-button,
- input[type=number]::-webkit-outer-spin-button {
- -webkit-appearance: none;
- margin: 0;
- }
- .vxe-header-max_content {
- .vxe-table--header {
- tr th {
- height: max-content !important;
- }
- }
- }
- .vxe-scroll_15 {
- .vxe-table--body-wrapper {
- &::-webkit-scrollbar {
- width: 15px;
- height: 15px;
- }
- }
- }
- .vxe-padding_zero {
- .vxe-header--row {
- th {
- padding: 0 !important;
- }
- .vxe-cell {
- padding: 0 !important;
- }
- }
- .vxe-body--row {
- .vxe-cell {
- padding: 0 !important;
- }
- }
- }
- </style>
|