批量打印清单

pull/1/head
dearlin 2024-02-05 11:48:29 +08:00
parent 3fbaa951bd
commit 34dd98ed80
3 changed files with 10 additions and 4 deletions

View File

@ -1,8 +1,11 @@
<template> <template>
<layout-card> <layout-card>
<div id="printContent"> <div id="printContent">
<div class="page_break" v-for="item in id" :key="item"> <div class="page_break" v-for="(item, index) in id" :key="item">
<inspection-record-view :check-record-id="item" /> <inspection-record-view
:check-record-id="item"
:list-type="listtypes[index]"
/>
</div> </div>
</div> </div>
<div class="tc mt-10"> <div class="tc mt-10">
@ -17,8 +20,9 @@ import { useRoute } from "vue-router";
import { ref } from "vue"; import { ref } from "vue";
const route = useRoute(); const route = useRoute();
const { DATA_IDS } = route.query; const { DATA_IDS, LIST_TYPE } = route.query;
const id = ref(DATA_IDS.split(",")); const id = ref(DATA_IDS.split(","));
const listtypes = ref(LIST_TYPE.split(","));
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@ -206,10 +206,12 @@ const fnBatchPrinting = () => {
return; return;
} }
const DATA_IDS = selectionData.map((item) => item.CHECKRECORD_ID).join(","); const DATA_IDS = selectionData.map((item) => item.CHECKRECORD_ID).join(",");
const LIST_TYPE = selectionData.map((item) => item.LIST_TYPE).join(",");
router.push({ router.push({
path: "/hazard_investigation/inspection_record/batch_printing", path: "/hazard_investigation/inspection_record/batch_printing",
query: { query: {
DATA_IDS, DATA_IDS,
LIST_TYPE,
}, },
}); });
}; };

View File

@ -109,7 +109,7 @@ const fnSubmit = debounce(
if (props.hiddenType === "unqualified") { if (props.hiddenType === "unqualified") {
if (!props.longitude && !props.latitude) { if (!props.longitude && !props.latitude) {
ElMessage.error("正在获取当前位置中,请等待"); ElMessage.error("正在获取当前位置中,请等待");
return; // return;
} }
params = { params = {
...params, ...params,