瀏覽代碼

下载软件接口

xiaochan 1 年之前
父節點
當前提交
8c2e9d3369

+ 0 - 1
src/api/emr-control/emr-time-limit-prompt.ts

@@ -8,7 +8,6 @@ export function timeLimitPrompt(userCode: string) {
     })
 }
 
-
 export function timeLimitPromptByPatientNo(patNo: string) {
     return request({
         url: '/timeLimitPrompt/timeLimitPromptByPatientNo',

+ 20 - 48
src/layout/function-list/Download.vue

@@ -1,65 +1,37 @@
 <template>
   <div title="下载">
-    <el-dropdown style="margin: 0 10px" trigger="click" @command="downloadReadCard">
+    <el-dropdown style="margin: 0 10px" trigger="click">
       <el-icon style="font-size: 18px">
         <Download/>
       </el-icon>
       <template #dropdown>
         <el-dropdown-menu>
-          <el-dropdown-item command="thcardreader">读卡插件安装包</el-dropdown-item>
-          <el-dropdown-item command="framework" divided>.Net Framework</el-dropdown-item>
-          <el-dropdown-item command="chrome90" divided>高版本Chrome浏览器</el-dropdown-item>
-          <el-dropdown-item command="google" divided>Chrome浏览器免安装</el-dropdown-item>
-          <el-dropdown-item command="lodop" divided>LODOP打印插件</el-dropdown-item>
-          <el-dropdown-item command="7z32" divided>7zip解压缩32位</el-dropdown-item>
-          <el-dropdown-item command="7z64" divided>7zip解压缩64位</el-dropdown-item>
-          <el-dropdown-item command="reportViewer" divided>临床调阅</el-dropdown-item>
+          <el-dropdown-item v-for="item in appList"
+                            @click="handelClick(item.url)"
+          >
+            {{ item.name }}
+          </el-dropdown-item>
         </el-dropdown-menu>
       </template>
     </el-dropdown>
   </div>
 </template>
 
-<script>
-import {defineComponent} from 'vue'
+<script setup lang="ts">
+import {magicApi} from "@/utils/database/magic-api-request";
 
-export default defineComponent({
-  name: 'download',
-  setup() {
-    return {
-      downloadReadCard,
-    }
-  },
-})
+const appList = ref<{ name: string, url: string }[]>([])
 
-function downloadReadCard(command) {
-  let filename
-  switch (command) {
-    case 'thcardreader':
-      filename = 'readcard/读卡插件.msi'
-      break
-    case 'framework':
-      filename = 'readcard/.NET Framework 4.6.1.exe'
-      break
-    case 'chrome90':
-      filename = 'chrome90.exe'
-      break
-    case 'google':
-      filename = 'google.rar'
-      break
-    case 'lodop':
-      filename = 'LODOP/CLodop_Setup_for_Win32NT.exe'
-      break
-    case '7z32':
-      filename = '7zip/7z2201-x32.exe'
-      break
-    case '7z64':
-      filename = '7zip/7z2201-x64.exe'
-      break
-    case 'reportViewer':
-      filename = 'ReportViewerSetup.exe'
-      break
-  }
-  window.open(`http://webhis.thyy.cn:8080/download/${filename}`, '_blank')
+function handelClick(url: string) {
+  window.open(url, '_blank')
 }
+
+onMounted(() => {
+  magicApi({
+    method: 'get',
+    url: '/intergration/appDownload',
+  }).then(res => {
+    appList.value = res
+  })
+})
 </script>

+ 2 - 2
src/layout/function-list/system-config/EmrConfig.vue

@@ -44,10 +44,10 @@ const emrFunctionLayout = computed(() => {
 
 async function sortEmrFunction() {
   await nextTick()
-  Sortable.create(emrFunctionRef.value, {
+  Sortable.create(<HTMLElement>emrFunctionRef!.value, {
     animation: 200,
     handle: '.system_emr_function-item',
-    onEnd({newIndex, oldIndex}: { newIndex: number, oldIndex: number }) {
+    onEnd({newIndex, oldIndex}) {
       const currRow = emrFunctionLayout.value.splice(oldIndex, 1)[0];
       emrFunctionLayout.value.splice(newIndex, 0, currRow)
     },