|
|
@@ -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>
|