|
|
@@ -18,14 +18,19 @@ import ResultTable from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrT
|
|
|
import BacterialCultureTable
|
|
|
from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTestV2/BacterialCultureTable.vue";
|
|
|
import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
+import {copyStrFunc} from "@/utils/public";
|
|
|
|
|
|
-const props = defineProps<{
|
|
|
- patNo: string,
|
|
|
- dateRange?: string[]
|
|
|
-}>()
|
|
|
+const props = withDefaults(
|
|
|
+ defineProps<{
|
|
|
+ patNo: string,
|
|
|
+ dateRange?: string[],
|
|
|
+ isEmr?: boolean
|
|
|
+ }>(), {
|
|
|
+ isEmr: false
|
|
|
+ }
|
|
|
+)
|
|
|
|
|
|
const emits = defineEmits(['close'])
|
|
|
-
|
|
|
const dateRange = ref<string[]>([])
|
|
|
const sidebarData = ref<SidebarData[]>([])
|
|
|
const inspectionHeader = ref<InspectionHeader>({
|
|
|
@@ -139,28 +144,38 @@ const currentReportForm = ref<SidebarData>({
|
|
|
const resultRef = ref<{
|
|
|
selectedData?: () => {} | [];
|
|
|
setData: (val: any) => void
|
|
|
+ getSelectedStr: () => string
|
|
|
}>()
|
|
|
|
|
|
let copyData = []
|
|
|
+let copyDataStr = ''
|
|
|
const appendCopy = () => {
|
|
|
- if (XEUtils.isArray(resultRef.value.selectedData())) {
|
|
|
- copyData.push(...resultRef.value.selectedData())
|
|
|
+ if (props.isEmr) {
|
|
|
+ if (XEUtils.isArray(resultRef.value.selectedData())) {
|
|
|
+ copyData.push(...resultRef.value.selectedData())
|
|
|
+ } else {
|
|
|
+ copyData.push(resultRef.value.selectedData())
|
|
|
+ }
|
|
|
} else {
|
|
|
- copyData.push(resultRef.value.selectedData())
|
|
|
+ copyDataStr += resultRef.value.getSelectedStr()
|
|
|
+ console.log(resultRef.value.getSelectedStr())
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const copyClick = () => {
|
|
|
- const temp = {
|
|
|
- content: copyData,
|
|
|
- plainText: '检验粘贴不要使用(文本粘贴)。'
|
|
|
+ if (props.isEmr) {
|
|
|
+ const temp = {
|
|
|
+ content: copyData,
|
|
|
+ plainText: '检验粘贴不要使用(文本粘贴)。'
|
|
|
+ }
|
|
|
+ window.localStorage.setItem("clipBoardData", JSON.stringify(temp))
|
|
|
+ xcMessage.success('复制成功,不要使用(文本粘贴)。')
|
|
|
+ } else {
|
|
|
+ copyStrFunc(copyDataStr)
|
|
|
}
|
|
|
- window.localStorage.setItem(
|
|
|
- "clipBoardData",
|
|
|
- JSON.stringify(temp)
|
|
|
- )
|
|
|
+ copyData = []
|
|
|
+ copyDataStr = ''
|
|
|
emits('close')
|
|
|
- xcMessage.success('复制成功,不要使用(文本粘贴)。')
|
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|