Kaynağa Gözat

医嘱批量复制粘贴

xiaochan 2 yıl önce
ebeveyn
işleme
575bb7cd29

+ 13 - 0
src/App.vue

@@ -435,4 +435,17 @@ input[type=number]::-webkit-outer-spin-button {
 }
 
 
+.select_v2_width_150 {
+  .el-vl__window {
+    width: 150px !important;
+  }
+}
+
+.select_v2_width_120 {
+  .el-vl__window {
+    width: 120px !important;
+  }
+}
+
+
 </style>

+ 9 - 0
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.js

@@ -268,3 +268,12 @@ export function updateOrderInstruction(orderNo, str) {
         params: {orderNo, str}
     })
 }
+
+
+export function copyTableOrder(data) {
+    return request({
+        url: url + '/copyTableOrder',
+        method: 'post',
+        data
+    })
+}

+ 4 - 0
src/components/xiao-chan/select-v4/SelectV4.vue

@@ -2,6 +2,7 @@
   <el-select-v2
       ref="selectRef"
       v-model="value"
+      :popper-class="props.popperClass"
       :remote-method="method"
       filterable
       :disabled="props.disabled"
@@ -42,6 +43,9 @@ const props = defineProps({
   disabled: {
     type: Boolean,
     default: false
+  },
+  popperClass: {
+    type: String
   }
 })
 

+ 19 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition.vue

@@ -186,6 +186,13 @@
               </el-dropdown-item>
             </div>
 
+            <div v-title="'<span style=\'color:#fffe00\'>带有实验性质的功能,如果此方法出错频率高,后期可能会删除。</span>' +
+             '<br />复制选中的医嘱并粘贴。'">
+              <el-dropdown-item @click="openCopyDialog">
+                复制选中的医嘱
+              </el-dropdown-item>
+            </div>
+
           </el-dropdown-menu>
         </template>
       </el-dropdown>
@@ -233,6 +240,9 @@
   <one-click-stop v-if="oneClickStopDialog"
                   @closed="oneClickStopDialog  = false"/>
 
+  <CopyTableDataOrder v-model="copyTableDialog"
+                      v-if="copyTableDialog"/>
+
 </template>
 
 <script setup name='YzQueryCondition'>
@@ -262,6 +272,9 @@ import OutpatientAppointments
 import OneClickStop from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/OneClickStop.vue";
 import XEUtils from 'xe-utils'
 import {getPatientInfo, receiveAndRecalculateCost} from "@/api/inpatient/patient";
+import CopyTableDataOrder
+  from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/table/CopyTableDataOrder.vue";
+import {isDev} from "@/utils/public";
 
 const props = defineProps({
   patientInfo: {
@@ -277,6 +290,12 @@ const props = defineProps({
 
 const emits = defineEmits(['batchDeleteOrdersClick'])
 
+const copyTableDialog = ref(false)
+const openCopyDialog = () => {
+  if (youWuXuanZheHuanZhe()) return
+  copyTableDialog.value = true
+}
+
 const queryYz = async (isScroll = true) => {
   if (!props.patientInfo.inpatientNo) {
     BizException(ExceptionEnum.MESSAGE_ERROR, '请先选择患者')

+ 1 - 1
src/utils/public.js

@@ -19,7 +19,7 @@ export function noNeedRule(...val) {
     return !needRule(val)
 }
 
-export let isDev = import.meta.env.VITE_BASE_URL !== 'http://172.16.32.160:8706'
+export let isDev = import.meta.env.VITE_BASE_URL !== 'http://172.16.32.160:8077'
 
 export const nullToEmpty = (val) => {
     if (stringIsBlank(val)) {

+ 3 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.ts

@@ -11,6 +11,7 @@ import EventBus from "../../../../utils/mitt";
 import XEUtils from 'xe-utils'
 import {computed} from 'vue'
 import {getAncillaryInformation} from '../../../../api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
+import sleep from "../../../../utils/sleep";
 
 // 患者信息
 export const huanZheXinXi = ref<{
@@ -634,6 +635,8 @@ export const clickOnThePatient = async (patNo: string) => {
     } else {
         await jsQueryYzData();
     }
+
+
     queryParam.value.frequCode = frequCodeEnum.all;
     queryParam.value.zhuangTai = 0;
     queryParam.value.displayRange = 2;

+ 143 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/table/CopyTableDataOrder.vue

@@ -0,0 +1,143 @@
+<script setup lang="ts">
+import {defineEmits, defineProps, onMounted, ref} from 'vue'
+import {useVModels} from "@vueuse/core";
+import {
+  huanZheXinXi,
+  yaoPinPingLvData, yzData,
+  yzMitt
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {windowSizeStore} from "@/utils/store-public";
+import XEUtils from "xe-utils";
+import {getServerDateApi} from "@/api/public-api";
+import SelectV4 from "@/components/xiao-chan/select-v4/SelectV4.vue";
+import XcCheckbox from "@/components/xiao-chan/checkbox/XcCheckbox.vue";
+import {copyTableOrder} from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+
+const props = defineProps<{
+  modelValue: boolean
+}>()
+
+const emits = defineEmits(['update:modelValue'])
+const {modelValue} = useVModels(props, emits)
+
+const selectData = ref([])
+
+const closed = () => {
+  modelValue.value = false
+}
+
+const confirmClick = () => {
+  let data = {
+    inpatientNo: huanZheXinXi.value.inpatientNo,
+    admissTimes: huanZheXinXi.value.admissTimes,
+    list: selectData.value
+  }
+  copyTableOrder(data).then((list) => {
+    yzData.value.push(...list.data)
+    let temp = {}
+    XEUtils.arrayEach(list.list, (item) => {
+      temp[item] = true
+    })
+    yzMitt.emit('scrollEndAndTwinkle', temp)
+    modelValue.value = false
+  })
+}
+
+const currentFrequCode = ref('QD')
+
+const setFrequCode = (val) => {
+  XEUtils.arrayEach(selectData.value, (item) => {
+    item.frequCode = val
+  })
+}
+
+onMounted(async () => {
+  selectData.value = XEUtils.clone(yzMitt.emit('getSelectedData'), true)
+  if (selectData.value.length === 0) {
+    xcMessage.error('请选择医嘱')
+    modelValue.value = false
+  }
+  let now = await getServerDateApi();
+  XEUtils.arrayEach(selectData.value, (item) => {
+    item.startTime = now
+    item.endTime = null
+  });
+
+
+})
+
+</script>
+
+<template>
+  <el-dialog v-model="modelValue" @closed="closed" title="复制选中的医嘱"
+             width="80%"
+             class="copy_table_order"
+             top="1%">
+
+    <select-v4 :data="yaoPinPingLvData"
+               popper-class="select_v2_width_120"
+               v-model="currentFrequCode"
+               style="width: 110px"/>
+    <el-button @click="setFrequCode(currentFrequCode)" type="primary">批量设置为 {{ currentFrequCode }}</el-button>
+    <el-button @click="setFrequCode('ONCE')" type="primary">批量设置临时</el-button>
+    <br/>
+
+    <span style="color: red">
+      批量复制粘贴,能修改的都会放到这个表格中修改,一次剂量怎么都不可修改,领量也是,至少是在这个功能下。
+      <br/>
+      注意:这个复制,选中了夫医嘱不会自动复制子医嘱需要同事选中父子医嘱才可以。
+    </span>
+
+    <el-table :data="selectData" :height="windowSizeStore.h / 1.2">
+      <el-table-column type="index" width="30"/>
+      <el-table-column prop="orderGroup" label="组" width="20"/>
+      <el-table-column prop="orderName" label="医嘱名称" width="225" show-overflow-tooltip/>
+      <el-table-column prop="dose" label="剂量" width="75"/>
+      <el-table-column prop="frequCode" label="频率" width="120">
+        <template #default="scope">
+          <select-v4 :data="yaoPinPingLvData"
+                     popper-class="select_v2_width_120"
+                     v-model="scope.row.frequCode"
+                     style="width: 110px"/>
+        </template>
+      </el-table-column>
+      <el-table-column prop="ybSelfFlag" label="自费" width="30">
+        <template #default="scope">
+          <xc-checkbox
+              v-model="scope.row.ybSelfFlag"
+              inactive-value="0"
+              active-value="1"/>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="emergencyFlag" label="紧急" width="30">
+        <template #default="scope">
+          <xc-checkbox
+              v-model="scope.row.emergencyFlag"
+              inactive-value="0"
+              active-value="1"/>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="instruction" label="嘱托">
+        <template #default="scope">
+          <el-input v-model="scope.row.instruction" maxlength="50"/>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <template #footer>
+      <el-button @click="modelValue = false">取消</el-button>
+      <el-button @click="confirmClick">确认</el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<style lang="scss">
+.copy_table_order {
+  .el-dialog__body {
+    padding: 5px;
+  }
+}
+</style>