소스 검색

优化数据导入

gaohaiyong 1 년 전
부모
커밋
60a497d13c
2개의 변경된 파일51개의 추가작업 그리고 15개의 파일을 삭제
  1. 42 10
      src/views/data/medicalRecords/index.vue
  2. 9 5
      src/views/dataImport/dataAnalysis/index.vue

+ 42 - 10
src/views/data/medicalRecords/index.vue

@@ -97,11 +97,15 @@ export default {
         pageSize: 10,
         pageSize: 10,
       },
       },
       departmentList: [],
       departmentList: [],
+      hospital_name:'', // 医院名称
+      pageType:'', 
     };
     };
   },
   },
   mounted() {
   mounted() {
     this.formData.endTime = this.storageGet('endTime');
     this.formData.endTime = this.storageGet('endTime');
     this.formData.startTime = this.storageGet('startTime');
     this.formData.startTime = this.storageGet('startTime');
+    this.hospital_name = this.$route.query.hospital_name?this.$route.query.hospital_name:'';
+    this.pageType = this.$route.query.pageType?this.$route.query.pageType:'';
     this.selectInfo()
     this.selectInfo()
     this.funQuery();
     this.funQuery();
   },
   },
@@ -155,15 +159,31 @@ export default {
     },
     },
     funQuery() {
     funQuery() {
       //查询
       //查询
-      let pramse = {
-        AAC01_start_date: this.formData.startTime || '',
-        AAC01_end_date: this.formData.endTime || '',
-        AAA28: this.formData.recordNum,
-        page: this.paginationData.currentPage, //页码
-        limit: this.paginationData.pageSize, //条数,
-        AAC11C: this.formData.AAC11C
-      };
-      this.$axios.post('/qualityList', pramse).then(res => {
+      let pramse = {};
+      let apiUrl = '';
+      if(this.pageType == 'bl_import'){
+        // 数据导入进入
+        pramse.hospitalName = this.hospital_name, //医院
+        pramse.dep_name = this.formData.AAC11C; //科室,
+        pramse.AAA28 = this.formData.recordNum,
+        pramse.start_time = this.formData.startTime || '',
+        pramse.end_time = this.formData.endTime || '',
+        pramse.page = this.paginationData.currentPage, //页码
+        pramse.page_size = this.paginationData.pageSize; //条数,
+        pramse.is_export = 0;
+        apiUrl = '/bl_import/getBlAll'
+      }else{
+        
+        pramse.AAC01_start_date = this.formData.startTime || '',
+        pramse.AAC01_end_date = this.formData.endTime || '',
+        pramse.AAA28 = this.formData.recordNum,
+        pramse.page = this.paginationData.currentPage, //页码
+        pramse.limit = this.paginationData.pageSize, //条数,
+        pramse.AAC11C = this.formData.AAC11C;
+
+        apiUrl = '/qualityList'
+      }
+      this.$axios.post(apiUrl, pramse).then(res => {
         console.log(res);
         console.log(res);
         this.paginationData.total = res.data.count;
         this.paginationData.total = res.data.count;
         this.tableData = res.data.list;
         this.tableData = res.data.list;
@@ -179,13 +199,25 @@ export default {
     },
     },
     // 导出
     // 导出
     onExport() {
     onExport() {
+
       let pramse = {
       let pramse = {
         start_time:this.formData.startTime,
         start_time:this.formData.startTime,
         end_time:this.formData.endTime,
         end_time:this.formData.endTime,
         AAA28: this.formData.recordNum,
         AAA28: this.formData.recordNum,
         is_export: 1
         is_export: 1
       };
       };
-      this.funExeclPost('病案首页列表', pramse, '/homeErrorDataList', 'xlsx');
+      let apiUrl = '';
+      
+      if(this.pageType == 'bl_import'){
+
+        pramse.hospitalName = this.hospital_name;
+        apiUrl = '/bl_import/getBlAll'
+
+      }else{
+        
+        apiUrl = '/homeErrorDataList'
+      }
+      this.funExeclPost('病案首页列表', pramse, apiUrl, 'xlsx');
     },
     },
     funExeclPost(fileName, pramse, httpUrl, format) {
     funExeclPost(fileName, pramse, httpUrl, format) {
       //导出
       //导出

+ 9 - 5
src/views/dataImport/dataAnalysis/index.vue

@@ -110,8 +110,6 @@
 </template>
 </template>
 <script>
 <script>
 import * as echarts from 'echarts';
 import * as echarts from 'echarts';
-import { downloadFile } from '@/httpFile';
-import elTableInfiniteScroll from 'el-table-infinite-scroll';
 export default {
 export default {
   name: 'dataAnalysis',
   name: 'dataAnalysis',
   components: {
   components: {
@@ -170,7 +168,7 @@ export default {
     funGoto() {
     funGoto() {
       this.storageSet('endTime', this.formData.endTime || '');
       this.storageSet('endTime', this.formData.endTime || '');
       this.storageSet('startTime', this.formData.startTime || '');
       this.storageSet('startTime', this.formData.startTime || '');
-      this.goto('/medicalRecords');
+      this.goto(`/medicalRecords?pageType=bl_import&hospital_name=${this.hospital_name}`);
     },
     },
     // 点击重置条件
     // 点击重置条件
     getResult() {
     getResult() {
@@ -438,13 +436,19 @@ export default {
      GoDefectList(error) {
      GoDefectList(error) {
       this.storageSet('endTime', this.formData.endTime || '');
       this.storageSet('endTime', this.formData.endTime || '');
       this.storageSet('startTime', this.formData.startTime || '');
       this.storageSet('startTime', this.formData.startTime || '');
-      this.$router.push(`/defectList?error_rule=${error.error_rule}`);
+      this.$router.push({ 
+        path: '/defectList',
+        query: { 
+          hospital_name: this.hospital_name,
+          error_rule:error.error_rule 
+        }}
+      );
     },
     },
     // 点击缺陷病案
     // 点击缺陷病案
     funGototo(){
     funGototo(){
       this.storageSet('endTime', this.formData.endTime || '');
       this.storageSet('endTime', this.formData.endTime || '');
       this.storageSet('startTime', this.formData.startTime || '');
       this.storageSet('startTime', this.formData.startTime || '');
-      this.goto('/defectList')
+      this.goto(`/defectList?hospital_name=${this.hospital_name}`)
     },
     },
  
  
   },
   },