瀏覽代碼

Merge branch 'master' into 淮海科技

lighter 1 周之前
父節點
當前提交
3d4dbd381e

+ 1 - 1
src/api/technology-archives/technology-archives.js

@@ -619,7 +619,7 @@ export function exportTechnologyArchivesInfo(params) {
 }
 
 
-//导出护理档案全部信息
+//导出档案全部信息
 export function exportMultiTechnologyArchives(params) {
     ElMessageBox.prompt('导出文件名字', '提示', {
         confirmButtonText: '确定',

+ 17 - 10
src/views/technology-archives/HLTechnologyArchivesSearch.vue

@@ -8,7 +8,9 @@
         <el-option v-for="item in typeList" :key="item.code" :label="item.name" :value="item.code" />
       </el-select>
       <el-button type="primary" icon="Search" @click="queryTechnologyArchivesInfo" style="margin-left: 10px">查询</el-button>
-      <el-button type="primary" icon="Download" @click="exportDataall" style="margin-left: 5px">导出全部</el-button>
+      <el-tooltip content="如果进行了查询则导出查询的信息,否则导出所有表的全部信息" placement="top">
+        <el-button type="primary" icon="Download" @click="exportDataall" style="margin-left: 5px">导出全部</el-button>
+      </el-tooltip>
     </header>
     <div class="layout_main">
       <div class="layout_display_flex_y">
@@ -20,13 +22,15 @@
             <template v-for="col in displayData">
               <el-table-column v-if="col.columns" :prop="col.name" :label="col.display" 
                 :width="col.width" :align="col.align">
-                <template v-for="cell in col.columns">
-                  <el-table-column v-if="col.show" :prop="cell.name" :label="cell.display"
-                    :width="cell.width" :align="cell.align" show-overflow-tooltip>
-                  </el-table-column>
-                  <el-table-column v-else :prop="cell.name" :label="cell.display"
-                    :width="cell.width" :align="cell.align">
-                  </el-table-column>
+                <template v-if="col.columns">
+                  <template v-for="cell in col.columns">
+                    <el-table-column v-if="col.show" :prop="cell.name" :label="cell.display"
+                      :width="cell.width" :align="cell.align" show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column v-else :prop="cell.name" :label="cell.display"
+                      :width="cell.width" :align="cell.align">
+                    </el-table-column>
+                  </template>
                 </template>
               </el-table-column>
               <el-table-column v-else-if="col.show" :prop="col.name" :label="col.display" :width="col.width"
@@ -67,7 +71,7 @@ import {ElMessage} from "element-plus";
 import {
   selectTechnologyArchivesHLInfo,
   selectTechnologyArchivesHLType,
-  exportMultiTechnologyArchives
+  exportHLMultiTechnologyArchives
 } from "@/api/technology-archives/technology-archives";
 import {useUserStore} from "@/pinia/user-store";
 
@@ -78,6 +82,7 @@ let param = ref({
 })
 
 let params = ref({
+  text:'',
   exportTypes: [],
   exportNames: []
 })
@@ -122,10 +127,12 @@ const queryTechnologyArchivesInfo = async () => {
   }
   param.value.textType = textType.value
   param.value.text = text.value
+  params.value.text = text.value
   console.log(param.value)
   await selectTechnologyArchivesHLInfo(param.value)
     .then((res) => {
       if(res){
+        console.log(res)
         technologyArchivesData.value = res.taData
         displayData.value = res.displayData
       }
@@ -156,6 +163,6 @@ const exportDataall = () => {
     
   } 
   console.log(params.value)
-  exportMultiTechnologyArchives(params.value)
+  exportHLMultiTechnologyArchives(params.value)
 }
 </script>

+ 6 - 2
src/views/technology-archives/TechnologyArchivesSearch.vue

@@ -8,8 +8,10 @@
         <el-option v-for="item in typeList" :key="item.code" :label="item.name" :value="item.code" />
       </el-select>
       <el-button type="primary" icon="Search" @click="queryTechnologyArchivesInfo" style="margin-left: 10px">查询</el-button>
-      <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button>
-      <el-button type="primary" icon="Download" @click="exportDataall" style="margin-left: 5px">导出全部</el-button>
+      <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出单表</el-button>
+      <el-tooltip content="如果进行了查询则导出查询的信息,否则导出所有表的全部信息" placement="top">
+        <el-button type="primary" icon="Download" @click="exportDataall" style="margin-left: 5px">导出全部</el-button>
+      </el-tooltip>
     </header>
     <div class="layout_main">
       <div class="layout_display_flex_y">
@@ -80,6 +82,7 @@ let param = ref({
 })
 
 let params = ref({
+  text: '',
   exportTypes: [],
   exportNames: []
 })
@@ -125,6 +128,7 @@ const queryTechnologyArchivesInfo = async () => {
   }
   param.value.textType = textType.value
   param.value.text = text.value
+  params.value.text = text.value
   await selectTechnologyArchivesInfo(param.value)
     .then((res) => {
       if(res){