Переглянути джерело

匹配添加有效日期范围

lighter 3 роки тому
батько
коміт
e2c6027fda
1 змінених файлів з 341 додано та 371 видалено
  1. 341 371
      src/views/dictionary/NationalSiMatch.vue

+ 341 - 371
src/views/dictionary/NationalSiMatch.vue

@@ -22,14 +22,13 @@
         <el-switch v-model="fuzzy" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
         &nbsp;
       </span>
-      <el-button icon="el-icon-search" type="primary" @click="search">检索</el-button>&nbsp;
-      <el-button type="danger" @click="syncInjryMtch">同步工伤匹配</el-button>&nbsp;
+      <el-button icon="el-icon-search" type="primary" @click="search">检索</el-button>&nbsp; <el-button type="danger" @click="syncInjryMtch">同步工伤匹配</el-button>&nbsp;
       <span v-if="queryParam.status === 0 && queryParam.type >= 3">
-        <el-button icon="el-icon-refresh" type="warning"
-                   @click="syncNewServiceOrItem"> 同步新增{{ queryParam.type === 3 ? '项目' : '耗材' }} </el-button>
+        <el-button icon="el-icon-refresh" type="warning" @click="syncNewServiceOrItem"> 同步新增{{ queryParam.type === 3 ? '项目' : '耗材' }} </el-button>
       </span>
       <span v-if="queryParam.status === 1">
         <el-button icon="el-icon-upload" type="primary" @click="beforeUploadMatch">上传匹配关系</el-button>
+        <el-button icon="el-icon-download" type="primary" @click="exportExcel">导出EXCEL</el-button>
       </span>
     </el-header>
     <el-main>
@@ -49,6 +48,8 @@
         <el-table-column v-if="queryParam.type === 3" label="地方名称" prop="localName"></el-table-column>
         <el-table-column v-if="queryParam.status === 1" label="国家名称" prop="nationalName"></el-table-column>
         <el-table-column v-if="queryParam.status === 1" label="国家代码" prop="nationalCode"></el-table-column>
+        <el-table-column v-if="queryParam.status === 1" label="开始时间" prop="startTime"></el-table-column>
+        <el-table-column v-if="queryParam.status === 1" label="结束时间" prop="endTime"></el-table-column>
         <el-table-column v-if="queryParam.status === 1" label="是否已上传">
           <template #default="scope">
             {{ cptYesOrNo(scope.row.uploadedFlag) }}
@@ -57,25 +58,21 @@
         <el-table-column label="操作">
           <template #default="scope">
             <el-button icon="el-icon-edit" type="text" @click="modifyLocalItem(scope.row)">修改</el-button>
-            <el-button v-if="queryParam.status === 1" icon="el-icon-refresh-left" type="text"
-                       @click="rvkUploadMatch(scope.row)">撤销匹配上传
-            </el-button>
-            <el-button v-if="queryParam.status === 0" icon="el-icon-aim" type="text" @click="beforeMatch(scope.row)">
-              匹配
-            </el-button>
+            <el-button v-if="queryParam.status === 1" icon="el-icon-refresh-left" type="text" @click="rvkUploadMatch(scope.row)">撤销匹配上传 </el-button>
+            <el-button v-if="queryParam.status === 0" icon="el-icon-aim" type="text" @click="beforeMatch(scope.row)"> 匹配 </el-button>
             <el-button v-else icon="el-icon-close" type="text" @click="deleteMatch(scope.row)">取消匹配</el-button>
           </template>
         </el-table-column>
       </el-table>
       <el-pagination
-          :current-page="queryParam.currentPage"
-          :page-size="queryParam.pageSize"
-          :page-sizes="[15, 30, 45, 70, 100]"
-          :total="data.total"
-          layout="total, sizes, prev, pager, next, jumper"
-          style="margin-top: 5px"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
+        :current-page="queryParam.currentPage"
+        :page-size="queryParam.pageSize"
+        :page-sizes="[15, 30, 45, 70, 100]"
+        :total="data.total"
+        layout="total, sizes, prev, pager, next, jumper"
+        style="margin-top: 5px"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
       ></el-pagination>
     </el-main>
     <el-dialog v-model="showNationalList" top="5vh" width="80%">
@@ -130,8 +127,7 @@
       <el-input v-show="queryParam.type === 3" v-model="discription" clearable style="width: 300px">
         <template #prepend>内涵过滤</template>
       </el-input>
-      <el-input v-show="queryParam.type === 1 || queryParam.type === 4" v-model="factory" clearable
-                style="width: 300px">
+      <el-input v-show="queryParam.type === 1 || queryParam.type === 4" v-model="factory" clearable style="width: 300px">
         <template #prepend>厂家过滤</template>
       </el-input>
       <el-divider v-show="queryParam.type === 4" direction="vertical"></el-divider>
@@ -150,8 +146,6 @@
         <el-table-column v-if="queryParam.type === 1" label="生产厂家" prop="factory"></el-table-column>
         <el-table-column v-if="queryParam.type === 1" label="批准文号" prop="approvalNumber"></el-table-column>
         <el-table-column v-if="queryParam.type === 1" label="药品本位码" prop="drugStandardCode"></el-table-column>
-        <el-table-column v-if="queryParam.type === 2" label="开始日期" prop="startTime"></el-table-column>
-        <el-table-column v-if="queryParam.type === 2" label="结束日期" prop="endTime"></el-table-column>
         <el-table-column v-if="queryParam.type === 3" label="项目内涵" prop="projectConnotation"></el-table-column>
         <el-table-column v-if="queryParam.type === 3" label="除外内容" prop="exclusions"></el-table-column>
         <el-table-column v-if="queryParam.type === 3" label="计价单位" prop="valuationUnit"></el-table-column>
@@ -159,8 +153,8 @@
         <el-table-column v-if="queryParam.type === 4" label="医保通用名" prop="siName"></el-table-column>
         <el-table-column v-if="queryParam.type === 4" label="材质" prop="material"></el-table-column>
         <el-table-column v-if="queryParam.type === 4" label="耗材企业" prop="factory"></el-table-column>
-        <el-table-column v-if="queryParam.type === 4" label="开始时间" prop="startTime"></el-table-column>
-        <el-table-column v-if="queryParam.type === 4" label="结束时间" prop="endTime"></el-table-column>
+        <el-table-column label="开始时间" prop="startTime"></el-table-column>
+        <el-table-column label="结束时间" prop="endTime"></el-table-column>
         <el-table-column label="匹配">
           <template #default="scope">
             <el-button circle icon="el-icon-thumb" type="success" @click="doMatch(scope.row)"></el-button>
@@ -193,8 +187,7 @@
             <template #prepend>标准编码</template>
           </el-input>
           <div class="m-prepend">项目内涵</div>
-          <el-input v-model="data.row.discription" class="mt-4" clearable rows="3" size="small"
-                    type="textarea"></el-input>
+          <el-input v-model="data.row.discription" class="mt-4" clearable rows="3" size="small" type="textarea"></el-input>
         </div>
         <div class="drawer-footer">
           <el-button icon="el-icon-close" size="small" @click="cancelModify">取消</el-button>
@@ -204,401 +197,378 @@
     </el-drawer>
     <el-dialog v-model="showUploadPrm" title="请填写以下参数" width="20%">
       <div style="height: 8px"></div>
-      <el-date-picker v-model="uploadPrm.beginDate" format="YYYY-MM-DD" placeholder="开始日期"
-                      value-format="YYYY-MM-DD"></el-date-picker>
+      <el-date-picker v-model="uploadPrm.beginDate" format="YYYY-MM-DD" placeholder="开始日期" value-format="YYYY-MM-DD"></el-date-picker>
       <div style="height: 8px"></div>
-      <el-date-picker v-model="uploadPrm.endDate" format="YYYY-MM-DD" placeholder="结束日期"
-                      value-format="YYYY-MM-DD"></el-date-picker>
+      <el-date-picker v-model="uploadPrm.endDate" format="YYYY-MM-DD" placeholder="结束日期" value-format="YYYY-MM-DD"></el-date-picker>
       <div style="height: 16px"></div>
       <el-button icon="el-icon-check" type="primary" @click="executeUploadMatch">确定上传</el-button>
     </el-dialog>
   </el-container>
 </template>
 
-<script>
-import {reactive, ref} from '@vue/reactivity'
-import {
-  asyncNewNameForServicesOrItems,
-  cancelMatch,
-  executeMatch,
-  selectLocalItems,
-  selectNationalItems,
-  synchronizeInjuryMatch,
-  updateLocalItem
-} from '@/api/national-match'
+<script setup name="NationalSiMatch">
+import { reactive, ref } from '@vue/reactivity'
+import { asyncNewNameForServicesOrItems, cancelMatch, executeMatch, selectLocalItems, selectNationalItems, synchronizeInjuryMatch, updateLocalItem } from '@/api/national-match'
 import store from '@/store'
-import {ElMessage, ElMessageBox} from 'element-plus'
-import {computed} from '@vue/runtime-core'
-import {cptYesOrNo} from '@/utils/computed'
-import {revokeCatalogueContrast, uploadCatalogueContrast} from '@/api/medical-insurance/si-manage'
-
-export default {
-  setup() {
-    const windowSize = store.state.app.windowSize
-    const tableHeight = windowSize.h - 85
-    const dialogTableHeight = tableHeight * 0.8 - 160
-    const statuses = initStatuses()
-    const delFlags = initDelFlags()
-    const types = initTypes()
-    const factory = ref('')
-    const certiNo = ref('')
-    const nationalCode = ref('')
-    const discription = ref('')
-    const fuzzy = ref(false)
-    const data = reactive({
-      total: 0,
-      list: [],
-      row: {},
-      national: [],
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { computed } from '@vue/runtime-core'
+import { cptYesOrNo } from '@/utils/computed'
+import { revokeCatalogueContrast, uploadCatalogueContrast } from '@/api/medical-insurance/si-manage'
+import { Export } from '@/utils/ExportExcel'
+
+const windowSize = store.state.app.windowSize
+const tableHeight = windowSize.h - 85
+const dialogTableHeight = tableHeight * 0.8 - 160
+const statuses = initStatuses()
+const delFlags = initDelFlags()
+const types = initTypes()
+const factory = ref('')
+const certiNo = ref('')
+const nationalCode = ref('')
+const discription = ref('')
+const fuzzy = ref(false)
+const data = reactive({
+  total: 0,
+  list: [],
+  row: {},
+  national: [],
+})
+const selections = ref([])
+const showUploadPrm = ref(false)
+const uploadPrm = reactive({
+  type: '',
+  beginDate: '',
+  endDate: '',
+})
+
+const cptNationalItems = computed(() => {
+  if (queryParam.type === 1) {
+    return data.national.filter((item) => {
+      return item.factory.indexOf(factory.value) !== -1 && item.nationalCode.indexOf(nationalCode.value) !== -1
     })
-    const selections = ref([])
-    const showUploadPrm = ref(false)
-    const uploadPrm = reactive({
-      type: '',
-      beginDate: '',
-      endDate: '',
+  } else if (queryParam.type === 3) {
+    return data.national.filter((item) => {
+      return item.projectConnotation.indexOf(discription.value) !== -1 && item.nationalCode.indexOf(nationalCode.value) !== -1
     })
-
-    const cptNationalItems = computed(() => {
-      if (queryParam.type === 1) {
-        return data.national.filter((item) => {
-          return item.factory.indexOf(factory.value) !== -1 && item.nationalCode.indexOf(nationalCode.value) !== -1
-        })
-      } else if (queryParam.type === 3) {
-        return data.national.filter((item) => {
-          return item.projectConnotation.indexOf(discription.value) !== -1 && item.nationalCode.indexOf(nationalCode.value) !== -1
-        })
-      } else if (queryParam.type === 4) {
-        return data.national.filter((item) => {
-          return item.factory.indexOf(factory.value) !== -1 && item.nationalCode.indexOf(nationalCode.value) !== -1
-        })
-      } else {
-        return data.national.filter((item) => {
-          return true
-        })
-      }
+  } else if (queryParam.type === 4) {
+    return data.national.filter((item) => {
+      return item.factory.indexOf(factory.value) !== -1 && item.nationalCode.indexOf(nationalCode.value) !== -1
     })
-
-    const queryParam = reactive({
-      status: 0,
-      delFlag: 0,
-      type: 1,
-      code: null,
-      name: null,
-      pageSize: 30,
-      currentPage: 1,
+  } else {
+    return data.national.filter((item) => {
+      return true
     })
+  }
+})
+
+const queryParam = reactive({
+  status: 0,
+  delFlag: 0,
+  type: 1,
+  code: null,
+  name: null,
+  pageSize: 30,
+  currentPage: 1,
+  isExport: false,
+})
+
+const queryTypeChanged = (val) => {
+  data.list = []
+  data.national = []
+  if (val === 4) {
+    fuzzy.value = true
+  } else {
+    fuzzy.value = false
+  }
+}
 
-    const queryTypeChanged = (val) => {
+const search = () => {
+  queryParam.isExport = false
+  selectLocalItems(queryParam)
+    .then((res) => {
+      data.total = res.total
+      data.list = res.list
+    })
+    .catch(() => {
       data.list = []
-      data.national = []
-      if (val === 4) {
-        fuzzy.value = true
-      } else {
-        fuzzy.value = false
-      }
-    }
-
-    const search = () => {
-      selectLocalItems(queryParam)
-          .then((res) => {
-            data.total = res.total
-            data.list = res.list
-          })
-          .catch(() => {
-            data.list = []
-          })
-    }
+    })
+}
 
-    const handleSizeChange = (val) => {
-      queryParam.pageSize = val
-      search()
-    }
-    const handleCurrentChange = (val) => {
-      queryParam.currentPage = val
-      search()
-    }
+const handleSizeChange = (val) => {
+  queryParam.pageSize = val
+  search()
+}
+const handleCurrentChange = (val) => {
+  queryParam.currentPage = val
+  search()
+}
 
-    const syncNewServiceOrItem = () => {
-      asyncNewNameForServicesOrItems().then((res) => {
-        ElMessage({
-          type: 'success',
-          message: res,
-          duration: 2000,
-          showClose: true,
-        })
-        search()
-      })
-    }
+const syncNewServiceOrItem = () => {
+  asyncNewNameForServicesOrItems().then((res) => {
+    ElMessage({
+      type: 'success',
+      message: res,
+      duration: 2000,
+      showClose: true,
+    })
+    search()
+  })
+}
 
-    const showModifyLocalItem = ref(false)
-    const modifyLocalItem = (row) => {
-      if (row.uploadedFlag === 1) {
-        ElMessage({
-          message: '请先撤销匹配上传再修改。',
-          type: 'warning',
-          showClose: true,
-        })
-        return
-      }
-      data.row = row
-      showModifyLocalItem.value = true
-    }
-    const cancelModify = () => {
-      showModifyLocalItem.value = false
-      search()
-    }
-    const confirmModify = () => {
-      updateLocalItem(data.row).then((res) => {
-        ElMessage({
-          type: 'success',
-          message: res,
-          duration: 2000,
-          showClose: true,
-        })
-        showModifyLocalItem.value = false
-      })
-    }
+const showModifyLocalItem = ref(false)
+const modifyLocalItem = (row) => {
+  if (row.uploadedFlag === 1) {
+    ElMessage({
+      message: '请先撤销匹配上传再修改。',
+      type: 'warning',
+      showClose: true,
+    })
+    return
+  }
+  data.row = row
+  showModifyLocalItem.value = true
+}
+const cancelModify = () => {
+  showModifyLocalItem.value = false
+  search()
+}
+const confirmModify = () => {
+  updateLocalItem(data.row).then((res) => {
+    ElMessage({
+      type: 'success',
+      message: res,
+      duration: 2000,
+      showClose: true,
+    })
+    showModifyLocalItem.value = false
+  })
+}
 
-    const showNationalList = ref(false)
-    const beforeMatch = (row) => {
-      if (fuzzy.value) {
-        ElMessageBox.prompt('请调整关联查询的名称:', '提示', {
-          inputValue: row.name,
-          confirmButtonText: '查询',
-          cancelButtonText: '取消',
-        })
-            .then(({value}) => {
-              row.fuzzyName = value
-              getNationalItems(row)
-            })
-            .catch(() => {
-            })
-      } else {
-        row.fuzzyName = row.name
+const showNationalList = ref(false)
+const beforeMatch = (row) => {
+  if (fuzzy.value) {
+    ElMessageBox.prompt('请调整关联查询的名称:', '提示', {
+      inputValue: row.name,
+      confirmButtonText: '查询',
+      cancelButtonText: '取消',
+    })
+      .then(({ value }) => {
+        row.fuzzyName = value
         getNationalItems(row)
-      }
-    }
-
-    const getNationalItems = (row) => {
-      selectNationalItems(row).then((res) => {
-        factory.value = ''
-        data.row = row
-        data.national = res
-        showNationalList.value = true
       })
-    }
+      .catch(() => {})
+  } else {
+    row.fuzzyName = row.name
+    getNationalItems(row)
+  }
+}
 
-    const doMatch = (row) => {
-      const header =
-          '<div style="font-weight: bold">选中的数据为:</div><div style="color: #409EFF">' +
-          '本院名称:' +
-          data.row.name +
-          '</div>' +
-          '<div style="color:red">' +
-          '<div>' +
-          '国家名称:' +
-          row.nationalName +
-          '</div>' +
-          '<div>' +
-          '国家代码:' +
-          row.nationalCode +
-          '</div>' +
-          '</div>'
-
-      const medOnly =
-          '<div style="color: #409EFF; margin-top: 8px">' +
-          '本院规格:' +
-          data.row.specification +
-          '</div>' +
-          '<div style="color:red">' +
-          '<div>' +
-          '注册规格:' +
-          row.makeRegisteredSpecification +
-          '</div>' +
-          '<div>' +
-          '实际规格:' +
-          row.makeActualSpecification +
-          '</div>' +
-          '</div>'
-
-      const srvcOnly = '<div style="color: #409EAA">' + '地方名称:' + row.localMedicalServiceName + '</div>'
-
-      const supplyOnly = '<div style="color: #409EAA">' + '注册证号:' + row.registrationCertificateNo + '</div>'
-
-      const end = '<div style="font-weight: bold"d>是否确认匹配?</div>'
-
-      let msg = ''
-      if (queryParam.type === 3) {
-        msg = header + srvcOnly + end
-      } else if (queryParam.type === 4) {
-        msg = header + supplyOnly + end
-      } else {
-        msg = header + medOnly + end
-      }
-
-      ElMessageBox.confirm(msg, '提示', {
-        dangerouslyUseHTMLString: true,
-        type: 'warning',
-        confirmButtonText: '确认匹配',
-        cancelButtonText: '取消',
-      })
-          .then(() => {
-            data.row.nationalCode = row.nationalCode
-            data.row.nationalName = row.nationalName
-            executeMatch(data.row).then((res) => {
-              search()
-              showNationalList.value = false
-              ElMessage({
-                type: 'success',
-                message: res,
-                duration: 2000,
-                showClose: true,
-              })
-            })
-          })
-          .catch({})
-    }
+const getNationalItems = (row) => {
+  selectNationalItems(row).then((res) => {
+    factory.value = ''
+    data.row = row
+    data.national = res
+    showNationalList.value = true
+  })
+}
 
-    const deleteMatch = (row) => {
-      if (row.uploadedFlag === 1) {
-        ElMessage({
-          message: '请先撤销匹配上传再取消匹配。',
-          type: 'warning',
-          showClose: true,
-        })
-        return
-      }
-      cancelMatch(row).then((res) => {
+const doMatch = (row) => {
+  const header =
+    '<div style="font-weight: bold">选中的数据为:</div><div style="color: #409EFF">' +
+    '本院名称:' +
+    data.row.name +
+    '</div>' +
+    '<div style="color:red">' +
+    '<div>' +
+    '国家名称:' +
+    row.nationalName +
+    '</div>' +
+    '<div>' +
+    '国家代码:' +
+    row.nationalCode +
+    '</div>' +
+    '</div>'
+
+  const medOnly =
+    '<div style="color: #409EFF; margin-top: 8px">' +
+    '本院规格:' +
+    data.row.specification +
+    '</div>' +
+    '<div style="color:red">' +
+    '<div>' +
+    '注册规格:' +
+    row.makeRegisteredSpecification +
+    '</div>' +
+    '<div>' +
+    '实际规格:' +
+    row.makeActualSpecification +
+    '</div>' +
+    '</div>'
+
+  const srvcOnly = '<div style="color: #409EAA">' + '地方名称:' + row.localMedicalServiceName + '</div>'
+
+  const supplyOnly = '<div style="color: #409EAA">' + '注册证号:' + row.registrationCertificateNo + '</div>'
+
+  const end = '<div style="font-weight: bold"d>是否确认匹配?</div>'
+
+  let msg = ''
+  if (queryParam.type === 3) {
+    msg = header + srvcOnly + end
+  } else if (queryParam.type === 4) {
+    msg = header + supplyOnly + end
+  } else {
+    msg = header + medOnly + end
+  }
+
+  ElMessageBox.confirm(msg, '提示', {
+    dangerouslyUseHTMLString: true,
+    type: 'warning',
+    confirmButtonText: '确认匹配',
+    cancelButtonText: '取消',
+  })
+    .then(() => {
+      data.row.nationalCode = row.nationalCode
+      data.row.nationalName = row.nationalName
+      executeMatch(data.row).then((res) => {
+        search()
+        showNationalList.value = false
         ElMessage({
           type: 'success',
           message: res,
           duration: 2000,
           showClose: true,
         })
-        search()
       })
-    }
+    })
+    .catch({})
+}
 
-    const handleSelectionChange = (val) => {
-      selections.value = val
-    }
+const deleteMatch = (row) => {
+  if (row.uploadedFlag === 1) {
+    ElMessage({
+      message: '请先撤销匹配上传再取消匹配。',
+      type: 'warning',
+      showClose: true,
+    })
+    return
+  }
+  cancelMatch(row).then((res) => {
+    ElMessage({
+      type: 'success',
+      message: res,
+      duration: 2000,
+      showClose: true,
+    })
+    search()
+  })
+}
 
-    const beforeUploadMatch = () => {
-      if (selections.value.length === 0) {
-        ElMessage({
-          message: '请选择要上传的条目!',
-          type: 'warning',
-          showClose: true,
-        })
-        return
-      }
-      uploadPrm.type = queryParam.type
-      showUploadPrm.value = true
-    }
+const handleSelectionChange = (val) => {
+  selections.value = val
+}
 
-    const executeUploadMatch = () => {
-      if (!uploadPrm.beginDate || !uploadPrm.endDate) {
-        ElMessage({
-          message: '请填写开始日期和结束日期。',
-          type: 'warning',
-          showClose: true,
-        })
-        return
-      }
-      uploadPrm.list = selections
-      uploadCatalogueContrast(uploadPrm).then((res) => {
-        ElMessage({
-          message: res,
-          type: 'success',
-          showClose: true,
-        })
-        showUploadPrm.value = false
-      })
-    }
+const beforeUploadMatch = () => {
+  if (selections.value.length === 0) {
+    ElMessage({
+      message: '请选择要上传的条目!',
+      type: 'warning',
+      showClose: true,
+    })
+    return
+  }
+  uploadPrm.type = queryParam.type
+  showUploadPrm.value = true
+}
 
-    const rvkUploadMatch = (row) => {
-      uploadPrm.type = queryParam.type
-      uploadPrm.chargeCode = row.code
-      uploadPrm.nationalCode = row.nationalCode
-      revokeCatalogueContrast(uploadPrm).then((res) => {
-        ElMessage({
-          message: res,
-          type: 'success',
-          showClose: true,
-        })
-      })
-    }
+const executeUploadMatch = () => {
+  if (!uploadPrm.beginDate || !uploadPrm.endDate) {
+    ElMessage({
+      message: '请填写开始日期和结束日期。',
+      type: 'warning',
+      showClose: true,
+    })
+    return
+  }
+  uploadPrm.list = selections
+  uploadCatalogueContrast(uploadPrm).then((res) => {
+    ElMessage({
+      message: res,
+      type: 'success',
+      showClose: true,
+    })
+    showUploadPrm.value = false
+  })
+}
 
-    const syncInjryMtch = () => {
-      synchronizeInjuryMatch().then((res) => {
-        ElMessage({
-          message: res,
-          type: 'success',
-          showClose: true,
-        })
-      })
-    }
+const rvkUploadMatch = (row) => {
+  uploadPrm.type = queryParam.type
+  uploadPrm.chargeCode = row.code
+  uploadPrm.nationalCode = row.nationalCode
+  revokeCatalogueContrast(uploadPrm).then((res) => {
+    ElMessage({
+      message: res,
+      type: 'success',
+      showClose: true,
+    })
+  })
+}
+
+const syncInjryMtch = () => {
+  synchronizeInjuryMatch().then((res) => {
+    ElMessage({
+      message: res,
+      type: 'success',
+      showClose: true,
+    })
+  })
+}
 
-    return {
-      factory,
-      certiNo,
-      discription,
-      tableHeight,
-      dialogTableHeight,
-      statuses,
-      delFlags,
-      types,
-      queryParam,
-      data,
-      fuzzy,
-      showNationalList,
-      cptNationalItems,
-      showModifyLocalItem,
-      showUploadPrm,
-      uploadPrm,
-      cptYesOrNo,
-      queryTypeChanged,
-      search,
-      syncNewServiceOrItem,
-      handleSizeChange,
-      handleCurrentChange,
-      modifyLocalItem,
-      cancelModify,
-      confirmModify,
-      beforeMatch,
-      doMatch,
-      deleteMatch,
-      handleSelectionChange,
-      beforeUploadMatch,
-      rvkUploadMatch,
-      executeUploadMatch,
-      syncInjryMtch,
-      nationalCode
+const exportExcel = () => {
+  queryParam.isExport = true
+  selectLocalItems(queryParam).then((res) => {
+    queryParam.isExport = false
+    const fields = {
+      code: '院内码',
+      name: '院内名称',
+      nationalCode: '国家编码',
+      nationalName: '国家名称',
+      startTime: '开始日期',
+      endTime: '结束日期',
+      localName: '地方编码',
+      unit: '单位',
+      serial: '大小包装',
+      dosage: '剂型',
+      specification: '规格',
+      approvalNumber: '注册证号',
+      factory: '厂家',
+      discription: '内涵',
+      standardCode: '标准编码',
+      price: '价格',
     }
-  },
+    Export(res.list, fields, '已匹配数据')
+  })
 }
 
 function initStatuses() {
   return [
-    {code: 0, name: '未匹配'},
-    {code: 1, name: '已匹配'},
+    { code: 0, name: '未匹配' },
+    { code: 1, name: '已匹配' },
   ]
 }
 
 function initDelFlags() {
   return [
-    {code: 0, name: '启用'},
-    {code: 1, name: '停用'},
+    { code: 0, name: '启用' },
+    { code: 1, name: '停用' },
   ]
 }
 
 function initTypes() {
   return [
-    {code: 1, name: '西药/中成药'},
-    {code: 2, name: '中草药'},
-    {code: 3, name: '项目'},
-    {code: 4, name: '耗材'},
+    { code: 1, name: '西药/中成药' },
+    { code: 2, name: '中草药' },
+    { code: 3, name: '项目' },
+    { code: 4, name: '耗材' },
   ]
 }
 </script>