xiaochan 1 yıl önce
ebeveyn
işleme
8fadcb263d

+ 7 - 1
package-lock.json

@@ -13,6 +13,7 @@
         "@kjgl77/datav-vue3": "1.7.2",
         "@vitejs/plugin-legacy": "5.4.0",
         "@vueuse/core": "10.9.0",
+        "@vxe-ui/plugin-export-xlsx": "^4.0.2",
         "@vxe-ui/plugin-render-chart": "^4.0.1",
         "axios": "1.6.0",
         "clipboard": "2.0.11",
@@ -23,7 +24,7 @@
         "driver.js": "1.3.1",
         "echarts": "5.5.0",
         "element-plus": "file:deps/element-plus.2.7.1.1.tar.gz",
-        "exceljs": "4.4.0",
+        "exceljs": "^4.4.0",
         "file-saver": "2.0.5",
         "iconv-lite": "0.6.3",
         "jquery": "3.7.1",
@@ -3744,6 +3745,11 @@
       "resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.28.tgz",
       "integrity": "sha512-oeLLJ0b54QdOSSgYQ9TiKW/xAGrc9r0weCA/5UfyGdm3n3js4cNOuuf9Tml7UwgBQpl4uWMbMwUZKLh2yqPF3A=="
     },
+    "node_modules/@vxe-ui/plugin-export-xlsx": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmmirror.com/@vxe-ui/plugin-export-xlsx/-/plugin-export-xlsx-4.0.2.tgz",
+      "integrity": "sha512-BzavNRZcWX8UgBOitOuykMgvBz1tGZR+EzIHBedckz6Kn+qcofvrKRUtnDhl+7yecM/6Q+XtE7UAiqRyyHpbMg=="
+    },
     "node_modules/@vxe-ui/plugin-render-chart": {
       "version": "4.0.1",
       "resolved": "https://registry.npmmirror.com/@vxe-ui/plugin-render-chart/-/plugin-render-chart-4.0.1.tgz",

+ 2 - 1
package.json

@@ -13,6 +13,7 @@
     "@kjgl77/datav-vue3": "1.7.2",
     "@vitejs/plugin-legacy": "5.4.0",
     "@vueuse/core": "10.9.0",
+    "@vxe-ui/plugin-export-xlsx": "^4.0.2",
     "@vxe-ui/plugin-render-chart": "^4.0.1",
     "axios": "1.6.0",
     "clipboard": "2.0.11",
@@ -23,7 +24,7 @@
     "driver.js": "1.3.1",
     "echarts": "5.5.0",
     "element-plus": "file:deps/element-plus.2.7.1.1.tar.gz",
-    "exceljs": "4.4.0",
+    "exceljs": "^4.4.0",
     "file-saver": "2.0.5",
     "iconv-lite": "0.6.3",
     "jquery": "3.7.1",

+ 6 - 5
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -163,11 +163,6 @@ const drawerRange: {
       click: () => {
         openWindow()
       }
-    }, {
-      name: '草药',
-      comp: () => {
-        return h(component.EmrHerbs, {...propsPatientInfo.value})
-      }
     }, {
       name: '心电',
       comp: () => {
@@ -230,6 +225,12 @@ const drawerRange: {
       name: '手术',
       comp: () => h(component.EmrOperation, {...propsPatientInfo.value, onToFillInData: toFillInData})
     },
+    {
+      name: '草药',
+      comp: () => {
+        return h(component.EmrHerbs, {...propsPatientInfo.value})
+      }
+    },
     {
       name: '营养',
       comp: () => h(component.NreTable, {

+ 1 - 1
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrHerbs.vue

@@ -119,7 +119,7 @@ const dianJiChaXunYiZhu = () => {
     times: props.times,
   }
   huoQuCaoYaoShuJu(data).then((res) => {
-    caoYaoShuJu.value = []
+    caoYaoShuJu.value = res
   })
 }
 

+ 5 - 13
src/main.js

@@ -19,14 +19,14 @@ import VTitle from "@/directives/v-title";
 import "driver.js/dist/driver.css";
 import DomZIndex from 'dom-zindex'
 import initVxeConfig from "@/utils/xe-utils-enhance/vxe-formatter";
-import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
-import ExcelJS from 'exceljs'
 import VWaves from "@/directives/v-waves";
 import piniaInstall from "@/pinia/pinia-install";
 import VxeUIPluginRenderChart from '@vxe-ui/plugin-render-chart'
 import '@vxe-ui/plugin-render-chart/dist/style.css'
 import VxeUI from 'vxe-pc-ui'
 import 'vxe-pc-ui/lib/style.css'
+import VxeUIPluginExportXLSX from '@vxe-ui/plugin-export-xlsx'
+import ExcelJS from 'exceljs'
 
 DomZIndex.getNext = () => {
     return useZIndex().nextZIndex()
@@ -43,17 +43,6 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
     app.component(key, component)
 }
 
-// VXETable.config({
-//     version: 0,
-//     table: {
-//         autoResize: true,
-//         height: 700
-//     },
-// })
-
-VXETable.use(VXETablePluginExportXLSX, {
-    ExcelJS
-})
 
 piniaInstall(app)
 app.use(ElementPlus, {locale: zhCn, size: 'small'})
@@ -67,6 +56,9 @@ app.use(print)
 app.use(VxeUI)
 app.use(VXETable)
 VxeUI.use(VxeUIPluginRenderChart)
+VxeUI.use(VxeUIPluginExportXLSX, {
+    ExcelJS
+})
 app.use(JsonViewer);
 app.use(router)
 app.mount('#app')

+ 2 - 2
src/utils/cy-use/useVxeTable.tsx

@@ -1,7 +1,8 @@
 // @ts-nocheck
 import {computed, nextTick, onMounted, reactive, ref, Ref, watch} from 'vue'
 import type {VxePagerProps, VxeTableProps} from "vxe-table";
-import {VxeColumn, VxePager, VxeTable} from "vxe-table";
+import {VxeColumn, VxeTable} from "vxe-table";
+import {VxePager} from 'vxe-pc-ui'
 import {TablePublicMethods, VxeTableEventProps, VxeTablePropTypes} from "vxe-table/types/table";
 import XEUtils from "xe-utils";
 import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
@@ -10,7 +11,6 @@ import {ElButton, ElPopover} from "element-plus";
 import setDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
 import CyDialog from "@/components/cy/dialog/src/CyDialog.vue";
 import {IsCyDialog} from "@/components/cy/dialog/src/useCyDialog";
-import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
 import {tsxVModel} from "@/utils/cy-use/useTsxUtils";
 import {isDev} from "@/utils/public";
 import {useElementVisibility} from '@vueuse/core'

+ 3 - 3
src/utils/xe-utils-enhance/vxe-formatter.ts

@@ -1,16 +1,16 @@
-import {VXETable} from 'vxe-table'
+import {VxeUI} from 'vxe-pc-ui'
 import XEUtils from "xe-utils";
 import {treeSearch} from "@/utils/xe-utils-enhance/array-utils";
 import {Ref, unref} from "vue";
 
 function addVxeTableFormats() {
-    VXETable.formats.add('formatDate', {
+    VxeUI.formats.add('formatDate', {
         cellFormatMethod({cellValue}, format: string = 'yy-MM-dd HH:mm') {
             return XEUtils.toDateString(cellValue, format)
         }
     })
 
-    VXETable.formats.add('formatSex', {
+    VxeUI.formats.add('formatSex', {
         cellFormatMethod({cellValue}) {
             switch (cellValue) {
                 case 1:

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

@@ -57,7 +57,7 @@ const tableGridComputed: ComputedRef<VxeGridProps> = computed(() => {
   return {
     data: props.data,
     columns: columnBindComputed.value,
-    expandConfig: {},
+    exportConfig: {},
     height: 'auto',
     autoResize: true,
     syncResize: false,

+ 4 - 3
src/views/data-base/page-editor-help-v2/components/page-editor-v2/PageEditorV2.vue

@@ -3,13 +3,14 @@ import {ref, nextTick} from "vue";
 import PageHelpV2 from "@/views/data-base/page-editor-help-v2/components/page-editor-v2/PageHelpV2.vue";
 import {pageHelpV2Mitt} from "@/views/data-base/page-editor-help-v2/page-help-v2";
 import {ReportForms} from "@/api/reports/report-query-center";
+import useCompRef from "@/utils/useCompRef";
 
 const props = defineProps<{
   currentData: ReportForms
 }>()
 
 const componentAttributeRef = ref(null)
-const pageHelpRef = ref(null)
+const pageHelpRef = useCompRef(PageHelpV2)
 const tabsValue = ref('属性配置')
 const otherConfigurationsRef = ref()
 const componentPageHelp = ref<null>(null)
@@ -30,9 +31,9 @@ function doTest(data) {
 }
 
 defineExpose({
-  setPageData: async (value) => {
+  setPageData: async (value: any) => {
     await nextTick()
-    pageHelpRef.value.setPageData(value)
+    pageHelpRef.value?.setPageData(value)
   }
 })
 </script>

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

@@ -15,6 +15,7 @@ import {shortcutTrigger, xcEvent} from "@/utils/xckeydown";
 import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
 import PageHelpTable from "@/views/data-base/page-editor-help-v2/components/PageHelpTable.vue";
 import {useUserStore} from "@/pinia/user-store";
+import {onDeactivated} from "@vue/runtime-core";
 
 interface Columns {
   title: string,
@@ -348,10 +349,9 @@ function exportExcel(data: { data: any[], columns: Columns[], fileName?: string
   }
   tableRef.value.openExport({
     filename: data.fileName,
-    types: ['csv', 'html', 'xml', 'txt'],
+    types: ['csv', 'html', 'xml', 'txt', 'xlsx'],
     type: 'csv',
     useStyle: true,
-    original: true,
   })
 }
 
@@ -359,10 +359,10 @@ let shortcutKeyRegistration = {
   ctrl: {s: handleSavaData}
 }
 
-let keyWatch = null
+let keyWatch = XEUtils.noop
 
-onUnmounted(() => {
-  keyWatch && keyWatch()
+onDeactivated(() => {
+  keyWatch()
 })
 
 onActivated(() => {
@@ -375,7 +375,7 @@ onActivated(() => {
 defineExpose({
   setPageData,
   setTableData,
-  setUrl: (val) => {
+  setUrl: (val: string) => {
     if (pageData.value.submitUrl) {
       return
     }