Browse Source

规则测试导出

Morphone0429 4 years ago
parent
commit
a362111807

+ 36 - 0
src/api/cdss.js

@@ -475,5 +475,41 @@ export default {
   getResultOtherTransfusionPage(param) {
     return axios.post(urls.getResultOtherTransfusionPage, param);
   },
+  billExportExcel(param) {
+    return axios.post(urls.billExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  criticalExportExcel(param) {
+    return axios.post(urls.criticalExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  highriskDrugExportExcel(param) {
+    return axios.post(urls.highriskDrugExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  highriskOperationExportExcel(param) {
+    return axios.post(urls.highriskOperationExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  otherLisExportExcel(param) {
+    return axios.post(urls.otherLisExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  otherPacsExportExcel(param) {
+    return axios.post(urls.otherPacsExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  otherTransfusionExportExcel(param) {
+    return axios.post(urls.otherTransfusionExportExcel, param, {
+      responseType: 'blob',
+    });
+  },
+
   
 };

+ 8 - 0
src/api/config.js

@@ -499,6 +499,14 @@ export default {
     'getResultOtherPacsPage': '/api/cdssman/test/rule/getResultOtherPacsPage',   //其他值提醒(辅检)测试列表
     'getResultOtherTransfusionPage': '/api/cdssman/test/rule/getResultOtherTransfusionPage',   //其他值提醒(输血)测试列表
     'otherRuleTest': '/api/cdssman/test/rule/otherRuleTest',   //其他值提醒规则测试
+    
+    'billExportExcel': '/api/cdssman/test/rule/billExportExcel',   //开单合理性规则测试结果导出
+    'criticalExportExcel': '/api/cdssman/test/rule/criticalExportExcel',   //危急值规则测试结果导出
+    'highriskDrugExportExcel': '/api/cdssman/test/rule/highriskDrugExportExcel',   //高危药品规则测试结果导出
+    'highriskOperationExportExcel': '/api/cdssman/test/rule/highriskOperationExportExcel',   //高危手术规则测试结果导出
+    'otherLisExportExcel': '/api/cdssman/test/rule/otherLisExportExcel',   //化验其他提醒规则测试结果导出
+    'otherPacsExportExcel': '/api/cdssman/test/rule/otherPacsExportExcel',   //辅检其他提醒规则测试结果导出
+    'otherTransfusionExportExcel': '/api/cdssman/test/rule/otherTransfusionExportExcel',   //输血其他提醒规则测试结果导出
 
   },
   menuIconList: { //菜单对应图标

+ 23 - 3
src/components/testManager/knowledgeMapRule/BillCommonTest.vue

@@ -147,10 +147,8 @@ export default {
   },
   methods: {
     handleInitData() {
-      console.log(this.$route.params);
       const { data, type } = this.$route.params;
       this.type = type;
-      console.log(this.type, '111');
       let billType; // 开单合理性规则类型  1  通用  2 输血
       if (data && data.caseName === '开单合理性提醒_通用规则') {
         billType = 1;
@@ -203,7 +201,29 @@ export default {
     },
     // 导出
     exportData() {
-      
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        billType: 1, //1:通用,2:输血
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.billExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-开单合理性提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
     },
   },
 };

+ 23 - 1
src/components/testManager/knowledgeMapRule/BillFusionTest.vue

@@ -190,7 +190,29 @@ export default {
     },
     // 导出
     exportData() {
-      
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        billType: 2, //1:通用,2:输血
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.billExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-开单合理性输血提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
     },
   },
 };

+ 23 - 1
src/components/testManager/knowledgeMapRule/CriticalAuxTest.vue

@@ -176,7 +176,29 @@ export default {
     },
     // 导出
     exportData() {
-      
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        criticalType: 2, //1:检验,2:检查
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.criticalExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-辅助检查危急值提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
     },
   },
 };

+ 24 - 2
src/components/testManager/knowledgeMapRule/CriticalLabTest.vue

@@ -136,7 +136,7 @@ export default {
     handleInitData() {
       const { data, type } = this.$route.params;
       this.type = type;
-      let criticalType; // 开单合理性规则类型  1  通用  2 输血
+      let criticalType;
       if (data && data.caseName === '危机值提醒_实验室检查规则') {
         criticalType = 1;
       } else if (data && data.caseName === '危机值提醒_辅助检查规则') {
@@ -188,7 +188,29 @@ export default {
     },
     // 导出
     exportData() {
-      
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+        criticalType: 1, //1:检验,2:检查
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.criticalExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-实验室检查危急值提醒规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
     },
   },
 };

+ 52 - 12
src/components/testManager/knowledgeMapRule/HighRiskDrugTest.vue

@@ -11,15 +11,25 @@
       linkTo="KnowledgeMapRuleTest"
     >
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item style="marginBottom: 0px">
+        <el-form-item style="marginbottom: 0px">
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
     <div style="margin: 60px 20px 0">
       <el-table :data="list" border>
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
-        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="highriskItemName"
@@ -50,7 +60,12 @@
           label="药品高危级别"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column :resizable="false" prop="output" label="实际结果" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="expectedOutput"
@@ -58,7 +73,9 @@
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column label="测试结果">
-          <template slot-scope="scope">{{ scope.row.success === 1 ? '成功' : '失败' }}</template>
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
         </el-table-column>
         <el-table-column
           v-if="type !== 'success'"
@@ -97,7 +114,7 @@ export default {
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      type: ''
+      type: '',
     };
   },
   created() {
@@ -109,7 +126,7 @@ export default {
     }
   },
   beforeRouteEnter(to, from, next) {
-    next(vm => {
+    next((vm) => {
       Object.assign(vm, to.params);
       vm.inCurrentPage = to.params.currentPage;
     });
@@ -120,7 +137,7 @@ export default {
       this.type = type;
       return {
         resultId: data && data.resultId,
-        success: type === 'success' ? 1 : 0
+        success: type === 'success' ? 1 : 0,
       };
     },
     indexMethod(index) {
@@ -147,9 +164,9 @@ export default {
         lock: true,
         text: 'Loading',
         spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
+        background: 'rgba(0, 0, 0, 0.7)',
       });
-      api.getResultHighriskDrugPage(params).then(res => {
+      api.getResultHighriskDrugPage(params).then((res) => {
         loading.close();
         if (res.data.code === '0') {
           this.list = res.data.data && res.data.data.records;
@@ -162,8 +179,31 @@ export default {
       });
     },
     // 导出
-    exportData() {}
-  }
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.highriskDrugExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-高风险提示_高危药品规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>
 

+ 54 - 14
src/components/testManager/knowledgeMapRule/HighRiskOperationTest.vue

@@ -11,15 +11,25 @@
       linkTo="KnowledgeMapRuleTest"
     >
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item style="marginBottom: 0px">
+        <el-form-item style="marginbottom: 0px">
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
     <div style="margin: 60px 20px 0">
       <el-table :data="list" border>
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
-        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="highriskItemName"
@@ -38,13 +48,13 @@
           label="手术级别"
           show-overflow-tooltip
         ></el-table-column>
-         <el-table-column
+        <el-table-column
           :resizable="false"
           prop="factorItemType"
           label="禁忌项类型"
           show-overflow-tooltip
         ></el-table-column>
-         <el-table-column
+        <el-table-column
           :resizable="false"
           prop="factorItemName"
           label="禁忌项(标准术语)"
@@ -62,7 +72,12 @@
           label="禁忌项输入值/结果"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column :resizable="false" prop="output" label="实际结果" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="expectedOutput"
@@ -70,7 +85,9 @@
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column label="测试结果">
-          <template slot-scope="scope">{{ scope.row.success === 1 ? '成功' : '失败' }}</template>
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
         </el-table-column>
         <el-table-column
           v-if="type !== 'success'"
@@ -109,7 +126,7 @@ export default {
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      type: ''
+      type: '',
     };
   },
   created() {
@@ -121,7 +138,7 @@ export default {
     }
   },
   beforeRouteEnter(to, from, next) {
-    next(vm => {
+    next((vm) => {
       Object.assign(vm, to.params);
       vm.inCurrentPage = to.params.currentPage;
     });
@@ -132,7 +149,7 @@ export default {
       this.type = type;
       return {
         resultId: data && data.resultId,
-        success: type === 'success' ? 1 : 0
+        success: type === 'success' ? 1 : 0,
       };
     },
     indexMethod(index) {
@@ -159,9 +176,9 @@ export default {
         lock: true,
         text: 'Loading',
         spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
+        background: 'rgba(0, 0, 0, 0.7)',
       });
-      api.getResultHighriskOperationPage(params).then(res => {
+      api.getResultHighriskOperationPage(params).then((res) => {
         loading.close();
         if (res.data.code === '0') {
           this.list = res.data.data && res.data.data.records;
@@ -174,8 +191,31 @@ export default {
       });
     },
     // 导出
-    exportData() {}
-  }
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.highriskOperationExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-高风险提示_高危手术整合规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>
 

+ 3 - 1
src/components/testManager/knowledgeMapRule/KnowledgeMapRuleTest.vue

@@ -203,9 +203,11 @@ export default {
     // 跳转至失败/成功条数页面
     goToFailedOrSuccessPage(row, type) {
       const page = this.handleGoPage(row.caseName);
+      let hospital = this.hospitalData.find(item=>item.id === this.hospitalId )
+      let hospitalName = hospital.name 
       this.$router.push({
         name: page,
-        params: { data: { ...row }, type, hospitalId: this.hospitalId },
+        params: { data: { ...row }, type, hospitalId: this.hospitalId, hospitalName},
       });
     },
     // 处理跳转到的页面

+ 53 - 13
src/components/testManager/knowledgeMapRule/OtherAssayRuleTest.vue

@@ -11,15 +11,25 @@
       linkTo="KnowledgeMapRuleTest"
     >
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item style="marginBottom: 0px">
+        <el-form-item style="marginbottom: 0px">
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
     <div style="margin: 60px 20px 0">
       <el-table :data="list" border>
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
-        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="otherItemName"
@@ -44,7 +54,7 @@
           label="禁忌项类型"
           show-overflow-tooltip
         ></el-table-column>
-         <el-table-column
+        <el-table-column
           :resizable="false"
           prop="remindItemName"
           label="禁忌项(标准术语)"
@@ -56,7 +66,12 @@
           label="禁忌项(医院术语)"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column :resizable="false" prop="output" label="实际结果" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="expectedOutput"
@@ -64,7 +79,9 @@
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column label="测试结果">
-          <template slot-scope="scope">{{ scope.row.success === 1 ? '成功' : '失败' }}</template>
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
         </el-table-column>
         <el-table-column
           v-if="type !== 'success'"
@@ -103,7 +120,7 @@ export default {
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      type: ''
+      type: '',
     };
   },
   created() {
@@ -115,7 +132,7 @@ export default {
     }
   },
   beforeRouteEnter(to, from, next) {
-    next(vm => {
+    next((vm) => {
       Object.assign(vm, to.params);
       vm.inCurrentPage = to.params.currentPage;
     });
@@ -126,7 +143,7 @@ export default {
       this.type = type;
       return {
         resultId: data && data.resultId,
-        success: type === 'success' ? 1 : 0
+        success: type === 'success' ? 1 : 0,
       };
     },
     indexMethod(index) {
@@ -153,9 +170,9 @@ export default {
         lock: true,
         text: 'Loading',
         spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
+        background: 'rgba(0, 0, 0, 0.7)',
       });
-      api.getResultOtherLisPage(params).then(res => {
+      api.getResultOtherLisPage(params).then((res) => {
         loading.close();
         if (res.data.code === '0') {
           this.list = res.data.data && res.data.data.records;
@@ -168,8 +185,31 @@ export default {
       });
     },
     // 导出
-    exportData() {}
-  }
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.otherLisExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-其他提醒_化验规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>
 

+ 36 - 6
src/components/testManager/knowledgeMapRule/OtherAuxRuleTest.vue

@@ -36,19 +36,19 @@
           label="检查结果描述(标准术语)"
           show-overflow-tooltip
         ></el-table-column>
-         <el-table-column
+        <el-table-column
           :resizable="false"
           prop="gender"
           label="性别"
           show-overflow-tooltip
         ></el-table-column>
-         <el-table-column
+        <el-table-column
           :resizable="false"
           prop="ageRange"
           label="年龄"
           show-overflow-tooltip
         ></el-table-column>
-       
+
         <el-table-column
           :resizable="false"
           prop="remindItemType"
@@ -73,7 +73,12 @@
           label="禁忌项输入值/结果"
           show-overflow-tooltip
         ></el-table-column>
-       <el-table-column :resizable="false" prop="output" label="实际结果" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="expectedOutput"
@@ -81,7 +86,9 @@
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column label="测试结果">
-          <template slot-scope="scope">{{ scope.row.success === 1 ? '成功' : '失败' }}</template>
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
         </el-table-column>
         <el-table-column
           v-if="type !== 'success'"
@@ -185,7 +192,30 @@ export default {
       });
     },
     // 导出
-    exportData() {},
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.otherPacsExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-其他提醒_辅检规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
   },
 };
 </script>

+ 53 - 13
src/components/testManager/knowledgeMapRule/OtherFusionRuleTest.vue

@@ -11,15 +11,25 @@
       linkTo="KnowledgeMapRuleTest"
     >
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item style="marginBottom: 0px">
+        <el-form-item style="marginbottom: 0px">
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
     <div style="margin: 60px 20px 0">
       <el-table :data="list" border>
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
-        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="otherItemName"
@@ -44,7 +54,7 @@
           label="禁忌项类型"
           show-overflow-tooltip
         ></el-table-column>
-         <el-table-column
+        <el-table-column
           :resizable="false"
           prop="conflictItemName"
           label="禁忌项(标准术语)"
@@ -56,7 +66,12 @@
           label="禁忌项(医院术语)"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column :resizable="false" prop="output" label="实际结果" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="output"
+          label="实际结果"
+          show-overflow-tooltip
+        ></el-table-column>
         <el-table-column
           :resizable="false"
           prop="expectedOutput"
@@ -64,7 +79,9 @@
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column label="测试结果">
-          <template slot-scope="scope">{{ scope.row.success === 1 ? '成功' : '失败' }}</template>
+          <template slot-scope="scope">{{
+            scope.row.success === 1 ? '成功' : '失败'
+          }}</template>
         </el-table-column>
         <el-table-column
           v-if="type !== 'success'"
@@ -103,7 +120,7 @@ export default {
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
       total: 0,
-      type: ''
+      type: '',
     };
   },
   created() {
@@ -115,7 +132,7 @@ export default {
     }
   },
   beforeRouteEnter(to, from, next) {
-    next(vm => {
+    next((vm) => {
       Object.assign(vm, to.params);
       vm.inCurrentPage = to.params.currentPage;
     });
@@ -126,7 +143,7 @@ export default {
       this.type = type;
       return {
         resultId: data && data.resultId,
-        success: type === 'success' ? 1 : 0
+        success: type === 'success' ? 1 : 0,
       };
     },
     indexMethod(index) {
@@ -153,9 +170,9 @@ export default {
         lock: true,
         text: 'Loading',
         spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
+        background: 'rgba(0, 0, 0, 0.7)',
       });
-      api.getResultOtherTransfusionPage(params).then(res => {
+      api.getResultOtherTransfusionPage(params).then((res) => {
         loading.close();
         if (res.data.code === '0') {
           this.list = res.data.data && res.data.data.records;
@@ -168,8 +185,31 @@ export default {
       });
     },
     // 导出
-    exportData() {}
-  }
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let params = {
+        success: type === 'success' ? 1 : 0,
+        resultId: data.resultId,
+      };
+      this.$alert('确定要导出规则测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api.otherTransfusionExportExcel(params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(
+                res.data,
+                `${hospitalName}-其他提醒_输血规则测试结果.xls`
+              );
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>