zs 3 mēneši atpakaļ
vecāks
revīzija
8f16bc305f

+ 5 - 0
src/store/api/platform/matchReg.js

@@ -30,11 +30,16 @@ export const MatchRegStore = defineStore('matchReg', () => {
     const res = await axios.$delete(`${url}/${payload}`)
     return res
   }
+  const exportReg = async (payload) => {
+    const res = await axios.$get(`${url}/export/${payload}`)
+    return res
+  }
   return {
     query,
     fetch,
     create,
     update,
+    exportReg,
     del
   }
 })

+ 4 - 8
src/views/center/parts/preliminaryMatch.vue

@@ -172,14 +172,10 @@ const handleRowSelectable = (row) => {
   return row.status == '1'
 }
 // 导出
-const toExport = () => {
-  if (selectionList.value && selectionList.value.length > 0) {
-    console.log('导出')
-  } else {
-    ElMessage({
-      message: '请选择要导出的数据!',
-      type: 'warning'
-    })
+const toExport = async () => {
+  const res = await store.exportReg(id.value)
+  if ($checkRes(res, true)) {
+    window.open(res.data)
   }
 }
 const toClose = async () => {