Browse Source

优化和添加影像

xiaochan 1 year ago
parent
commit
be82fe207a

+ 2 - 1
src/api/emr-control/emr-control.ts

@@ -1,4 +1,5 @@
 import request from "./request";
+import requestV2 from "../../utils/request-v2";
 
 export function linkQualityControl(startDate, endDate, sid, timeType) {
     return request({
@@ -9,7 +10,7 @@ export function linkQualityControl(startDate, endDate, sid, timeType) {
 }
 
 export function obtainTheProportionOfMedicalRecords(startDate, endDate, finalControl) {
-    return request({
+    return requestV2<string>({
         url: '/emrQualityControl/obtainTheProportionOfMedicalRecords',
         method: 'get',
         params: {startDate, endDate, finalControl}

+ 8 - 0
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -31,6 +31,7 @@
       <el-button-group>
         <el-button @click="open(10)" type="success">病理</el-button>
         <el-button @click="open(11)" type="primary">荧光</el-button>
+        <el-button @click="openWindow " type="warning">影像</el-button>
       </el-button-group>
     </template>
   </el-popover>
@@ -86,6 +87,9 @@
     <div style="width: 100%;height: 100%" v-if="index === 11">
       <fluorescence-test show-copy :pat-no="patInfo.inpatientNo" :times="patInfo.admissTimes"/>
     </div>
+
+    <!--    <IframeInspectImage :pat-no="patInfo.inpatientNo"/>-->
+
   </el-drawer>
 
 </template>
@@ -172,6 +176,10 @@ const handleDrawerOpened = () => {
   zIndex.value = useZIndex().nextZIndex()
 }
 
+function openWindow() {
+  window.open(`http://172.16.32.122:8081/Clinical?inHospitalNum=${patInfo.value.inpatientNo}`, '_blank');
+}
+
 onMounted(async () => {
   patInfo.value = props.patInfo
   end.value = formatDate(await getServerDateApi())

+ 19 - 0
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/IframeInspectImage.vue

@@ -0,0 +1,19 @@
+<template>
+  <iframe :src="src" width="100%" height="100%" style="border: 0 "/>
+</template>
+
+<script setup lang="ts">
+import {computed} from "vue";
+
+const props = defineProps<{
+  patNo: string
+}>()
+
+const src = computed(() => {
+  return `http://172.16.32.122:8081/Clinical?inHospitalNum=${props.patNo}`
+})
+</script>
+
+<style scoped>
+
+</style>

+ 30 - 30
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/CheckApplicationHistory.vue

@@ -1,23 +1,23 @@
 <template>
-    <xc-table :local-data="props.data"
-              :final-height="getWindowSize.h  - (yzHeaderSize) - 100 "
-              @row-click="dianJiaJianChaXiangQing">
-        <el-table-column label="项目名称" prop="orderName" show-overflow-tooltip></el-table-column>
-        <el-table-column label="接受" prop="receiveFlagName" show-overflow-tooltip></el-table-column>
-        <el-table-column label="时间" prop="startTime">
-            <template #default="{row}">
-                {{ getFormatDatetime(row.startTime, 'YY-MM-DD HH:mm') }}
-            </template>
-        </el-table-column>
-        <el-table-column v-if="props.data.delFlag !='1'" label="操作" width="120">
-            <template #default="scope">
-                <el-button icon="Delete"
-                           type="danger"
-                           @click.stop="dianJiShanChu(scope.row, scope.$index)"> 删除
-                </el-button>
-            </template>
-        </el-table-column>
-    </xc-table>
+  <xc-table :local-data="props.data"
+            :final-height="getWindowSize.h  - (yzHeaderSize) - 100 "
+            @row-click="dianJiaJianChaXiangQing">
+    <el-table-column label="项目名称" prop="orderName" show-overflow-tooltip></el-table-column>
+    <el-table-column label="接受" prop="receiveFlagName" show-overflow-tooltip></el-table-column>
+    <el-table-column label="时间" prop="startTime">
+      <template #default="{row}">
+        {{ getFormatDatetime(row.startTime, 'YY-MM-DD HH:mm') }}
+      </template>
+    </el-table-column>
+    <el-table-column v-if="props.data.delFlag !='1'" label="操作" width="120">
+      <template #default="scope">
+        <el-button icon="Delete"
+                   type="danger"
+                   @click.stop="dianJiShanChu(scope.row, scope.$index)">
+        </el-button>
+      </template>
+    </el-table-column>
+  </xc-table>
 </template>
 
 <script setup name='CheckApplicationHistory'>
@@ -31,27 +31,27 @@ import {yzHeaderSize} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/
 import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
 
 const props = defineProps({
-    data: Object,
-    returnData: Function,
+  data: Object,
+  returnData: Function,
 })
 
 const windowSize = computed(() => {
-    return store.state.app.windowSize
+  return store.state.app.windowSize
 })
 
 const dianJiaJianChaXiangQing = (row) => {
-    props.returnData(row)
+  props.returnData(row)
 }
 
 const dianJiShanChu = (row, index) => {
-    ElMessageBox.confirm(`您确定要删除【${row.orderName}】吗?`, '提示')
-        .then(() => {
-            shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then((res) => {
-                props.data.splice(index, 1)
-            })
-        })
-        .catch(() => {
+  ElMessageBox.confirm(`您确定要删除【${row.orderName}】吗?`, '提示')
+      .then(() => {
+        shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then((res) => {
+          props.data.splice(index, 1)
         })
+      })
+      .catch(() => {
+      })
 }
 
 </script>

+ 0 - 5
src/router/modules/dashboard.js

@@ -905,11 +905,6 @@ const route = [
                 path: 'pageEditorHelp',
                 component: createNameComponent(() => import('@/views/utilities/page-editor-help/PageEditorHelp.vue')),
                 meta: {title: '页面编辑'}
-            },
-            {
-                path: 'knowledgeBase',
-                component: createNameComponent(() => import('@/views/utilities/KnowledgeBase.vue')),
-                meta: {title: '知识库上线'}
             }
         ],
     },

+ 3 - 1
src/utils/database/magic-api-request.ts

@@ -5,7 +5,8 @@ import {CyMessageBox} from "../../components/cy/message-box";
 
 const service = axios.create({
     // @ts-ignore
-    baseURL: import.meta.env.VITE_DATA_BASE,
+    // baseURL: import.meta.env.VITE_DATA_BASE,
+    baseURL: 'http://172.16.32.160:9205',
     withCredentials: true,
     timeout: 0
 })
@@ -35,6 +36,7 @@ service.interceptors.response.use((response) => {
 
     if (response.data.code === -1) {
         xcMessage.error(response.data.message)
+        return Promise.reject(response.data)
     }
 
     if (response.data.code === -2) {

+ 2 - 1
src/views/data-base/page-editor-help-v2/components/page-editor-v2/CodeEditor.vue

@@ -53,9 +53,10 @@ const jsEditRef = ref<HTMLDivElement>()
 const simulatedParametersDiv = ref<HTMLDivElement>()
 
 function handleClose() {
+  const data = monacoEditor.getValue()
   monacoEditor.dispose()
   simulatedParametersEditor.dispose()
-  emits('close', monacoEditor.getValue(), props.codeEditorOption.prompt.key, props.codeEditorOption.funcOrOn)
+  emits('close', data, props.codeEditorOption.prompt.key, props.codeEditorOption.funcOrOn)
 }
 
 const editorStyle = computed(() => {

+ 6 - 0
src/views/data-base/page-editor-help-v2/components/page-editor-v2/PageAddComponent.vue

@@ -10,6 +10,12 @@ const props = defineProps<{
 const emits = defineEmits(['addComponent', 'refresh'])
 
 function addComponentClick(item) {
+  if (!item.data.on) {
+    item.data.on = {}
+  }
+  if (!item.data.func) {
+    item.data.func = {}
+  }
   const comp = {
     bind: {
       ...item.bind

+ 26 - 5
src/views/data-base/page-editor-help-v2/components/page-editor-v2/PageFormBind.vue

@@ -5,13 +5,15 @@ import {
   ElAndXc,
   PageStore
 } from "@/views/data-base/page-editor-help-v2/page-help-v2";
-import {ref, h, nextTick, onMounted, reactive} from "vue";
-import {ElOption, ElSelect, ElSwitch, ElInput, ElInputNumber, ElDivider, ElButton} from "element-plus";
-import {PageHeader, PageJsonObject} from "@/api/reports/report-query-center";
 import * as vue from "vue";
+import {h, nextTick, onMounted, reactive, ref} from "vue";
+import {ElButton, ElDivider, ElInput, ElInputNumber, ElOption, ElSelect, ElSwitch} from "element-plus";
+import {PageHeader, PageJsonObject} from "@/api/reports/report-query-center";
 import CodeEditor from "@/views/data-base/page-editor-help-v2/components/page-editor-v2/CodeEditor.vue";
 import JsonEditor from "@/views/data-base/page-editor-help-v2/components/page-editor-v2/JsonEditor.vue";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
+import XEUtils from "xe-utils";
+import {copyStrFunc} from "@/utils/public";
 
 const showDiv = ref(false)
 const componentBinds = ref<{ [key: string]: ComponentBind } | null>()
@@ -77,14 +79,17 @@ async function changeCurrentBind(item) {
  * 组件属性的额外配置
  */
 function renderHelp() {
+  const {currentClickIndex, pageData} = props.store
   const func = new Function("pageJson", "currentBind", "el", "vue", 'xcMessage', renderRef.value)
-  return func(props.store.pageData.value, currentItem.value, ElAndXc, vue, xcMessage)
+  return func(props.store.pageData.value, pageData.value.header[currentClickIndex.value], ElAndXc, vue, xcMessage)
 }
 
 /**
  * 绑定组件属性的 事件
  */
 function onFuncHelp() {
+  const {currentClickIndex, pageData} = props.store
+
   for (let key in componentBinds.value) {
     const item = componentBinds.value[key]
     const func = {}
@@ -93,7 +98,7 @@ function onFuncHelp() {
         func[capitalizeFirstLetter(itemKey, 'on')] = (val) => {
           const func = new Function("pageJson", "currentBind", "val", item.on[itemKey])
           try {
-            func(props.store.pageData.value, currentItem.value, val)
+            func(props.store.pageData.value, pageData.value.header[currentClickIndex.value], val)
           } catch (e) {
             console.error(e)
           }
@@ -174,12 +179,15 @@ function render(key: string, item: ComponentBind) {
 }
 
 function handleClickEdit(key: string, value: any, name: 'on' | 'func') {
+  const {currentClickIndex, pageData} = props.store
+  currentItem.value = pageData.value.header[currentClickIndex.value]
   if (!currentItem.value[name]) {
     currentItem.value[name] = {}
   }
   if (!currentItem.value[name][key]) {
     currentItem.value[name][key] = ''
   }
+
   codeEditorOption.code = currentItem.value[name][key]
   codeEditorOption.dialog = true
   codeEditorOption.prompt = value
@@ -209,6 +217,18 @@ function editStyleClick() {
   jsonEditOrOption.key = 'style'
 }
 
+function exportJSON() {
+  const temp = XEUtils.clone(currentItem.value)
+  const bind = temp.bind
+  delete temp.bind
+  const tempData = {
+    bind: bind,
+    data: temp
+  }
+
+  copyStrFunc(JSON.stringify(tempData))
+}
+
 onMounted(() => {
   emits('refresh')
 })
@@ -232,6 +252,7 @@ defineExpose({
 
   <teleport :to="props.teleportDiv">
     <div style="text-align: left; padding: 0 15px">
+      <el-button @click="exportJSON" icon="RefreshLeft" type="primary" text>导出JSON</el-button>
       <el-button @click="emits('refresh')" icon="RefreshLeft" type="primary" text>刷新</el-button>
     </div>
     <div v-if="componentBinds && showDiv" class="page_help-bind-container">

+ 7 - 3
src/views/data-base/page-editor-help-v2/components/page-editor-v2/PageHelpV2.vue

@@ -211,7 +211,10 @@ function setPageData(data: PageJsonObject, currentIndex = -1) {
   pageData.value = temp
   if (currentIndex > 0) {
     bindRef.value?.changeCurrentBind(pageData.value.header[currentClickIndex.value])
+  } else {
+    bindRef.value?.changeCurrentBind(null)
   }
+  currentClickIndex.value = currentIndex
   initTable()
   requiredInit(true)
 }
@@ -237,7 +240,7 @@ const compData = ref()
 const bindData = ref()
 
 async function bindRefresh() {
-  bindData.value = await reportQueryCenterApi('/reportCenter/components/componentBind')
+  bindData.value = await reportQueryCenterApi('/reportCenterOption/components/componentBind')
   await nextTick()
   if (currentClickIndex.value > -1) {
     bindRef.value?.changeCurrentBind(pageData.value.header[currentClickIndex.value])
@@ -245,10 +248,11 @@ async function bindRefresh() {
 }
 
 async function addComponentRefresh() {
-  compData.value = await reportQueryCenterApi('/reportCenter/components/addComponents')
+  compData.value = await reportQueryCenterApi('/reportCenterOption/components/addComponents')
 }
 
-function testClick() {
+async function testClick() {
+  await formRef.value.validate()
   const data = {}
   pageData.value.header.forEach(item => {
     data[item.key] = pageData.value.params[item.key]

+ 2 - 2
src/views/data-base/page-editor-help-v2/components/page-help-editor/MagicIframeEditor.vue

@@ -8,9 +8,9 @@ import {xcMessage} from "@/utils/xiaochan-element-plus";
 
 const iframe = ref<HTMLIFrameElement>()
 // const src = 'http://192.168.56.1:8991'
-// const src = import.meta.env.VITE_DATA_BASE + '/magic/web/index.html'
+const src = import.meta.env.VITE_DATA_BASE + '/magic/web/index.html'
 
-const src = 'http://172.16.32.160:9205/magic/web/index.html'
+// const src = 'http://172.16.32.160:9205/magic/web/index.html'
 
 function sendMessage(name: string, value: any) {
   const data = {

+ 2 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/final-quality-control/FinalQualityControl.vue

@@ -28,7 +28,8 @@ const queryClick = () => {
   let temp = {
     startDate: start,
     endDate: end,
-    socketId: sid
+    socketId: sid,
+    timeType: timeType.value
   }
   finalControl(temp).then((res) => {
     let {patient, proportion: p} = res
@@ -40,7 +41,6 @@ const queryClick = () => {
 const proportion = ref('0%')
 const queryScale = async () => {
   let {startTime, endTime} = getDateRangeFormatDate(dateRange.value)
-  //@ts-ignore
   proportion.value = await obtainTheProportionOfMedicalRecords(startTime, endTime, 1)
 }
 

+ 9 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue

@@ -11,7 +11,10 @@
           start-placeholder="申请开始"
           style="width: 220px"
           type="daterange"/>
-      <el-button icon="Search" type="primary" @click="dianJiChaXunHuanZheJianCha">查询</el-button>
+      <el-button-group>
+        <el-button icon="Search" type="primary" @click="dianJiChaXunHuanZheJianCha">查询</el-button>
+        <el-button type="primary" @click="imageClick">影像</el-button>
+      </el-button-group>
       <el-divider direction="vertical"></el-divider>
       <el-button icon="Check" type="success" @click="saveData">保存</el-button>
       <el-button icon="Check" type="primary" @click="saveTemplate"
@@ -141,7 +144,6 @@ const dianJiChaXunHuanZheJianCha = () => {
   })
 
   jieGuoRefV2.value.queryData()
-
 }
 
 
@@ -268,6 +270,11 @@ const searchAdd = (data) => {
   addJcCheck(temp);
 }
 
+function imageClick() {
+  if (youWuXuanZheHuanZhe()) return
+  window.open(`http://172.16.32.122:8081/Clinical?inHospitalNum=${huanZheXinXi.value.inpatientNo}`, '_blank');
+}
+
 
 onChangePatient(dianJiChaXunHuanZheJianCha)
 

+ 2 - 6
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/jiancha/JianChaJieGuoV2.vue

@@ -1,8 +1,7 @@
 <script setup lang="ts">
-import {onMounted, ref} from "vue";
+import {ref} from "vue";
 import {getJcIdByPatNo, getExamineDetail} from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
 import CyAutoSize from "@/components/cy/auto-size/cy-auto-size.vue";
-import XcOption from "@/components/xiao-chan/select/XcOption.vue";
 import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
 import {dateBr} from "@/utils/moment-utils";
 import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
@@ -19,6 +18,7 @@ const orderData = ref([])
 const details = ref({})
 
 function queryDetails() {
+  if (!currentId.value) return
   getExamineDetail(currentId.value).then(res => {
     orderData.value = res
   })
@@ -59,10 +59,6 @@ async function queryData() {
   queryDetails()
 }
 
-onMounted(() => {
-  queryData()
-})
-
 defineExpose({
   queryData
 })