Jelajahi Sumber

跳转页面

xiaochan 1 tahun lalu
induk
melakukan
cae5c17cd5

+ 21 - 13
src/api/login.js

@@ -1,23 +1,31 @@
 import request from '../utils/request'
 
 export function loginApi(data) {
-  return request({
-    url: '/login/login',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: '/login/login',
+        method: 'post',
+        data,
+    })
 }
 
 export function getWardsApi() {
-  return request({
-    url: '/login/getWards',
-    method: 'get',
-  })
+    return request({
+        url: '/login/getWards',
+        method: 'get',
+    })
 }
 
 export function fetchMenusApi() {
-  return request({
-    url: '/login/fetchVueMenus',
-    method: 'get',
-  })
+    return request({
+        url: '/login/fetchVueMenus',
+        method: 'get',
+    })
+}
+
+export function simpleLogin(code) {
+    return request({
+        url: '/login/simpleLogin',
+        method: 'get',
+        params: {code}
+    })
 }

+ 8 - 0
src/api/reports/report-query-center.ts

@@ -70,3 +70,11 @@ export function saveThePersonRoleCode(data: any) {
         data
     })
 }
+
+export function updateName(id: string, name: string) {
+    return request({
+        url: '/reportQueryCenter/updateName',
+        method: 'get',
+        params: {id, name}
+    })
+}

+ 7 - 3
src/components/cy/message-box/src/index.vue

@@ -259,7 +259,7 @@ onMounted(async () => {
 
                 </header>
                 <div class="cy-message-box_body">
-                  <div class="cy-message-box_message">
+                  <div class="cy-message-box_message" v-if="props.message">
                     <component :is="props.showInput ? 'label' : 'p'"
                                v-if="props.dangerouslyUseHTMLString"
                                v-html="props.message"
@@ -270,7 +270,7 @@ onMounted(async () => {
                       {{ props.message }}
                     </component>
                   </div>
-                  <div v-if="props.showInput" style="margin-top: 3px">
+                  <div v-if="props.showInput" style="padding-top: 15px">
                     <el-select v-model="inputValue"
                                v-if="props.selectOption"
                                size="small"
@@ -410,9 +410,13 @@ $cy-message-box-radius: 13px;
       .cy-message-box_message {
         max-height: 200px;
         overflow: auto;
-        //min-height: 30px;
+        min-height: 19px;
         box-sizing: border-box;
 
+        label {
+          touch-action: manipulation;
+        }
+
         &::-webkit-scrollbar {
           width: 10px;
           height: 10px;

+ 1 - 1
src/components/query-components/page-help-type.ts

@@ -1,6 +1,6 @@
 import {Arrayable} from "element-plus/es/utils";
+// @ts-ignore
 import {FormItemRule} from "element-plus/es/tokens/form";
-import {Style} from "util";
 import {StyleValue} from "vue";
 
 export interface codeName {

+ 12 - 2
src/router/modules/dashboard.js

@@ -7,6 +7,11 @@ const route = [
         component: createNameComponent(() => import('@/views/system/login.vue')),
         hideMenu: true,
         meta: {title: '登录', hideTabs: true},
+    }, {
+        path: '/jumpRedirect',
+        component: createNameComponent(() => import('@/views/system/JumpRedirect.vue')),
+        hideMenu: true,
+        meta: {title: '跳转重定向', hideTabs: true, passRule: true},
     },
     {
         path: '/mzEmr/:patientInfo?',
@@ -280,7 +285,7 @@ const route = [
         meta: {title: '医技模块'},
         children: [
             {
-                path: 'yiJiFeiYongLuRu',
+                path: 'yiJiFeiYongLuRu/:patNo?',
                 component: createNameComponent(() => import('@/views/med-tec-mod/YiJiFeiYongLuRu.vue')),
                 meta: {title: '医技费用录入'},
             },
@@ -527,6 +532,11 @@ const route = [
                 path: 'emrSuggestion',
                 component: createNameComponent(() => import('@/views/emr-manage/EmrSuggestion.vue')),
                 meta: {title: '病历建议维护'},
+            },
+            {
+                path: 'dynamicDataObjects',
+                component: createNameComponent(() => import('@/views/emr-manage/DynamicDataObjects.vue')),
+                meta: {title: '动态数据元'}
             }
         ]
     },
@@ -583,7 +593,7 @@ const route = [
             },
             {
                 path: 'patientInformationInquiry',
-                name:'patientInformationInquiry',
+                name: 'patientInformationInquiry',
                 component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/PatientInformationInquiry.vue')),
                 meta: {title: '患者信息查询', passRule: true},
             },

+ 14 - 1
src/store/modules/user.js

@@ -1,4 +1,4 @@
-import {fetchMenusApi, getWardsApi, loginApi} from '@/api/login'
+import {fetchMenusApi, getWardsApi, loginApi, simpleLogin} from '@/api/login'
 import router from '@/router'
 
 const state = () => ({
@@ -77,6 +77,18 @@ const mutations = {
 
 // actions
 const actions = {
+
+    simpleLogin({commit, dispatch}, {userInfo, fetchVueMenus}) {
+        commit('tokenChange', userInfo.token)
+        commit('sidChange', userInfo.sid)
+        commit('infoChange', userInfo)
+
+        commit('menusChange', fetchVueMenus.routes)
+        commit('routesChange', fetchVueMenus.routes)
+        commit('pathsChange', fetchVueMenus.paths)
+        commit('flatRoutesChange', fetchVueMenus.flatRoutes)
+    },
+
     // login by login.vue
     login({commit, dispatch}, params) {
         return new Promise((resolve, reject) => {
@@ -84,6 +96,7 @@ const actions = {
                 commit('tokenChange', res.token)
                 commit('sidChange', res.sid)
                 commit('infoChange', res)
+
                 dispatch('getWards').then((infoRes) => {
                     resolve(res)
                 })

+ 8 - 8
src/views/clinic/TransferInOfExpenses.vue

@@ -1,20 +1,21 @@
 <template>
   <page-layer>
     <template #header>
+      住院号:
       <el-input
           v-model="inpatientNo"
           clearable
           placeholder="在此输入住院号"
           prefix-icon="Search"
           size="small"
-          style="width: 300px"
+          style="width: 150px"
           @blur="inpatientNo = $event.target.value.trim()"
           @keyup.enter="queryClick"
       >
-        <template #prepend>住院号</template>
       </el-input>
       <el-button style="margin-left: 10px" type="primary" @click="queryClick">查询患者信息</el-button>
       <el-divider direction="vertical"></el-divider>
+      机制号:
       <el-input
           v-model="serialNo"
           clearable
@@ -22,13 +23,12 @@
           placeholder="在此输入机制号"
           prefix-icon="Search"
           size="small"
-          style="width: 300px"
+          style="width: 150px"
           @blur="serialNo = $event.target.value.trim()"
           @keyup.enter="querySerialNo"
       >
-        <template #prepend>机制号</template>
       </el-input>
-      <el-select v-model="liShiFlag" size="small">
+      <el-select v-model="liShiFlag" size="small" style="width: 70px;">
         <el-option v-for="item in chaKanLiShi" :key="item.code" :label="item.name" :value="item.code"></el-option>
       </el-select>
       <el-button style="margin-left: 10px" type="primary" @click="querySerialNo">查询机制号信息</el-button>
@@ -104,7 +104,7 @@
         </el-descriptions>
       </div>
       收费日期:
-      <el-date-picker v-model="chargeDate" type="datetime"></el-date-picker>
+      <el-date-picker v-model="chargeDate" type="datetime" style="width: 165px"/>
       执行科室:
       <el-select
           style="width: 120px"
@@ -475,8 +475,8 @@ const remoteMethodHuiZhenKeShi = (val) => {
 
 
 let chaKanLiShi = [
-  {code: 0, name: '不查看历史记录'},
-  {code: 1, name: '查看历史记录'},
+  {code: 0, name: '当前'},
+  {code: 1, name: '历史'},
 ]
 </script>
 

+ 11 - 0
src/views/emr-manage/DynamicDataObjects.vue

@@ -0,0 +1,11 @@
+<script setup lang="ts">
+
+</script>
+
+<template>
+
+</template>
+
+<style scoped lang="scss">
+
+</style>

+ 6 - 6
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -401,7 +401,7 @@ const emrSocket = ref<{
   medicalRecordSwitching: (val: string) => Promise<void>;
   documentChange: (id: string) => void;
   clearSocket: () => void;
-} | null>(null)
+}>()
 
 const categoryCode = ref('')
 const templateName = ref('')
@@ -443,7 +443,7 @@ const currentEditorUser = ref<{
   deptName: string
   name: string
   code: string
-}>(null)
+}>()
 
 const foldBothSides = ref({
   isLeft: true,
@@ -1404,7 +1404,7 @@ const analysisIframeSrcSearch = async () => {
 
 const popupRef = ref<{
   positionChange: (evt: any, view: any, position: any) => void
-} | null>(null)
+} >()
 
 const popupFunc = {
   setShortcutKey: () => {
@@ -1718,7 +1718,7 @@ const initEdit = () => {
           name: userInfoStore.value.name
         }
       },
-      data: patientData.value
+      data: emrConfig.value.editor ? patientData.value : {}
     }
   }
 
@@ -1943,8 +1943,8 @@ const fragmentOrOutline = ref(2)
 const outlineData = ref<Outline[]>([])
 const outlineRef = ref<{
   changeElementById: (id: string) => void
-}>(null)
-const fragmentOrOutlineRef = ref<HTMLDivElement>(null)
+}>()
+const fragmentOrOutlineRef = ref<HTMLDivElement>()
 const {height: fragmentOrOutlineHeight} = useElementSize(fragmentOrOutlineRef)
 
 function fragmentOrOutlineActivationClassName(val: number) {

+ 0 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init.ts

@@ -19,8 +19,6 @@ export const emrStateEnum = {
     "出院只读": 5,
 }
 
-export const conciseMode = ref(false)
-export const completeModeSwitch = ref(false)
 
 export function resolveRoute(val) {
     query.value = JSON.parse(window.atob(val))

+ 9 - 0
src/views/med-tec-mod/YiJiFeiYongLuRu.vue

@@ -117,6 +117,8 @@ import {ElMessage, ElMessageBox} from 'element-plus'
 import {downloadExcel} from '@/utils/excel'
 import {getServerDateApi} from "@/api/public-api";
 import {userInfoStore} from "@/utils/store-public";
+import router from "@/router";
+import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
 
 const dangQianShiJian = new Date()
 const deptList = userInfoStore.value.partTimeDeptMap
@@ -263,6 +265,13 @@ const theUploadIsSuccessful = async () => {
   queryHuanZheFeiYong()
 }
 
+onMounted(() => {
+  const temp = router.currentRoute.value.query.patNo
+  if (stringNotBlank(temp)) {
+    queryTerm.value.inpatientNo = temp
+    getHuanZheXinXiClick()
+  }
+})
 
 </script>
 

+ 126 - 0
src/views/system/JumpRedirect.vue

@@ -0,0 +1,126 @@
+<script setup lang="ts">
+import {onMounted, ref} from "vue";
+import router from '@/router'
+import {simpleLogin} from '@/api/login'
+import store from '@/store'
+import XEUtils from 'xe-utils'
+import {stringIsBlank} from '@/utils/blank-utils'
+import {userInfoStore} from "@/utils/store-public";
+
+interface Info {
+  url: string
+  code: string
+}
+
+const openAddress = {
+  '/medTecMod/yiJiFeiYongLuRu': () => {
+    routerPush(`${info.url}`)
+  },
+  '/myEmrEditor': () => {
+    const parseUrl = XEUtils.parseUrl(info.url)
+    const param = parseUrl.searchQuery
+    const data = {
+      patNo: param.patNo,
+      times: XEUtils.toNumber(param.times),
+      state: XEUtils.toNumber(param.state),
+    }
+    if (stringIsBlank(data.patNo)) {
+      setMsg('住院号不能为空')
+    }
+    if (stringIsBlank(data.times)) {
+      setMsg('住院次数不能为空')
+    }
+    if (stringIsBlank(data.state)) {
+      setMsg('状态不能为空')
+    }
+    routerPush(`/myEmrEditor/${window.btoa(JSON.stringify(data))}`)
+  },
+  '/mzEmr': () => {
+    const parseUrl = XEUtils.parseUrl(info.url)
+    const param = parseUrl.searchQuery
+    const data = {
+      patientId: param.patientId,
+      time: param.time
+    }
+    routerPush(`/mzEmr/${window.btoa(JSON.stringify(data))}`)
+  }
+}
+
+async function routerPush(val: string) {
+  await router.push(val)
+  // location.reload();
+}
+
+let info: Info = {
+  url: '',
+  code: '',
+}
+
+const errorMsg = ref('')
+
+async function loginFunc() {
+  try {
+    localStorage.clear()
+    const userInfo = await simpleLogin(info.code)
+    await store.dispatch('user/simpleLogin', userInfo)
+  } catch (e) {
+    console.error(e)
+    setMsg(e)
+  }
+
+}
+
+function setMsg(value: string) {
+  errorMsg.value = value
+  throw new Error(value)
+}
+
+onMounted(async () => {
+  info = router.currentRoute.value.query as Info
+
+  if (info == null) {
+    setMsg('参数不能为空')
+    return
+  }
+
+  if (info.url === null) {
+    setMsg('地址不能为空')
+  }
+
+  if (info.code === null) {
+    setMsg('用户编码不能为空')
+  }
+  let index = info.url.indexOf("?");
+  let newUrl = (index === -1) ? info.url : info.url.substring(0, index);
+
+  try {
+    const func = openAddress[newUrl]
+    if (typeof func === 'undefined') {
+      setMsg('页面未开放')
+    }
+    if (info.code !== userInfoStore.value.code) {
+      await loginFunc()
+    }
+    func()
+  } catch {
+
+  }
+
+})
+</script>
+
+<template>
+  <el-result
+      icon="error"
+      :title="errorMsg"
+      sub-title="错误"
+  >
+    <template #extra>
+      <el-button type="primary">Back</el-button>
+    </template>
+  </el-result>
+</template>
+
+<style scoped lang="scss">
+
+</style>

+ 1 - 1
src/views/utilities/page-editor-help/PageEditorHelp.vue

@@ -36,7 +36,7 @@ const addEl = (val: headerType) => {
   pageJson.value.queryParam[key] = val.defaultValue
 }
 
-const pageJson = ref<componentType>(null)
+const pageJson = ref<componentType | any>({})
 
 const theCurrentComponent = ref(-1)
 const itemClick = (data: headerType, index) => {

+ 45 - 24
src/views/utilities/page-editor-help/components/PageTree.vue

@@ -5,7 +5,7 @@ import {
   addReportQueryCenter,
   delReportQueryCenterById,
   getReportTree,
-  ReportForms, updateParentById
+  ReportForms, updateName, updateParentById
 } from "@/api/reports/report-query-center";
 import {componentType} from "@/components/query-components/page-help-type";
 import {dataTree} from '../public-data'
@@ -15,6 +15,8 @@ import type {
   NodeDropType,
 } from 'element-plus/es/components/tree/src/tree.type'
 import {useCompRef} from "@/utils/useCompRef";
+import RightClickMenu from "@/components/menu-item/RightClickMenu.vue";
+import {CyMessageBox} from "@/components/cy/message-box";
 
 const props = defineProps<{
   currentPage: (data: ReportForms) => void
@@ -22,20 +24,12 @@ const props = defineProps<{
 
 const treeRef = useCompRef(ElTree)
 
-const contextmenu = (event: Event, data: ReportForms) => {
-  console.log(event, data)
-}
 
 const addPageClick = async () => {
-  let {value} = await ElMessageBox.prompt('创建文件夹', '提示', {
-    type: "warning",
-    confirmButtonText: '确认',
-    cancelButtonText: '取消',
-    inputPattern: /\S/,
-    inputValidator: (val) => {
-      return val.length <= 20;
-    },
-    inputErrorMessage: '名称不能为空,且不能超过 20 个字。',
+  let {value} = await CyMessageBox.prompt({
+    title: '创建文件夹',
+    inputMaxLength: 20,
+    inputRows: 2,
   })
 
   addReportQueryCenter({
@@ -65,8 +59,8 @@ const nodeClick = (data: ReportForms, a) => {
   currentTreeParent.value = data.parentId === null ? null : temp
 }
 
-const currentTree = ref<ReportForms>(null)
-const currentTreeParent = ref<ReportForms>(null)
+const currentTree = ref<ReportForms | any>({})
+const currentTreeParent = ref<ReportForms | any>({})
 const addFile = async () => {
   let defaultValue: componentType = {
     isShow: true,
@@ -129,8 +123,9 @@ const addFile = async () => {
 }
 
 const delReportQueryCenterClick = async (data: ReportForms) => {
-  await ElMessageBox.alert('是否删除', '提示', {
-    type: 'error'
+  await CyMessageBox.confirm({
+    message: '你确定要删除吗?',
+    type: 'delete'
   })
   delReportQueryCenterById(data.id).then((res) => {
     getReportTreeFunc()
@@ -149,6 +144,37 @@ const handleDragEnd = (draggingNode: Node, dropNode: Node, dropType: NodeDropTyp
   }
 }
 
+const config = [
+  {
+    name: '修改文件名',
+    click: async (data: ReportForms) => {
+      const {value} = await CyMessageBox.prompt({
+        title: '文件名',
+        inputMaxLength: 20,
+        inputRows: 2,
+        inputDefaultValue: data.name
+      })
+      await updateName(data.id, value)
+      data.name = value
+    }
+  },
+  {
+    name: '删除',
+    click: (data: ReportForms) => {
+      delReportQueryCenterClick(data)
+    }
+  }
+]
+
+const mousePosition = ref({})
+const contextmenu = (event: Event, data: ReportForms) => {
+  mousePosition.value = {
+    event,
+    data: data,
+    index: data['$treeNodeId']
+  }
+}
+
 onMounted(() => {
   getReportTreeFunc()
 })
@@ -158,6 +184,7 @@ onMounted(() => {
 <template>
   <el-button @click="addPageClick">新增文件夹</el-button>
   <el-button @click="addFile">新增文件</el-button>
+  <RightClickMenu :config="config" :mouse-position="mousePosition"/>
   <el-tree :data="dataTree"
            ref="treeRef"
            @node-click="nodeClick"
@@ -165,14 +192,8 @@ onMounted(() => {
            highlight-current
            draggable
            :allow-drop="allowDrop"
-           @node-drag-end="handleDragEnd"
-           default-expand-all>
+           @node-drag-end="handleDragEnd">
     <template #default="{node,data}">
-      <el-button type="danger"
-                 text
-                 @click.stop="delReportQueryCenterClick(data)">
-        删除
-      </el-button>
       <el-icon>
         <Document v-if="data.type === 0"/>
         <Folder v-else/>