diff --git a/src/views/tested/MeasurementPlan/task/components/list.vue b/src/views/tested/MeasurementPlan/task/components/list.vue index 50f443c..c3b0baa 100644 --- a/src/views/tested/MeasurementPlan/task/components/list.vue +++ b/src/views/tested/MeasurementPlan/task/components/list.vue @@ -239,7 +239,7 @@ ids: selectList.value.map(item => item.id), } exportTask(data).then((res) => { - exportFile(res.data, '计量计划') + exportFile(res.data, '任务单列表') loading.close() }) .catch((_) => { diff --git a/src/views/tested/MeasurementPlan/task/components/list.vue b/src/views/tested/MeasurementPlan/task/components/list.vue index 50f443c..c3b0baa 100644 --- a/src/views/tested/MeasurementPlan/task/components/list.vue +++ b/src/views/tested/MeasurementPlan/task/components/list.vue @@ -239,7 +239,7 @@ ids: selectList.value.map(item => item.id), } exportTask(data).then((res) => { - exportFile(res.data, '计量计划') + exportFile(res.data, '任务单列表') loading.close() }) .catch((_) => { diff --git a/src/views/tested/subpackage/task/components/edit.vue b/src/views/tested/subpackage/task/components/edit.vue index 0f17b9f..076c895 100644 --- a/src/views/tested/subpackage/task/components/edit.vue +++ b/src/views/tested/subpackage/task/components/edit.vue @@ -290,12 +290,20 @@ }) // 打印 const printPage = () => { + const loading = ElLoading.service({ + lock: true, + text: 'Loading', + background: 'rgba(255, 255, 255, 0.8)', + }) printPageApi({ id: ruleForm.value.id, pdf: true, }).then((res) => { + loading.close() // printContent(res.data) printContent(getFiles(res.data, 'application/pdf;chartset=UTF-8')) + }).catch(() => { + loading.close() }) } @@ -329,7 +337,7 @@ 取消 - + 打印 @@ -416,7 +424,7 @@ - + diff --git a/src/views/tested/MeasurementPlan/task/components/list.vue b/src/views/tested/MeasurementPlan/task/components/list.vue index 50f443c..c3b0baa 100644 --- a/src/views/tested/MeasurementPlan/task/components/list.vue +++ b/src/views/tested/MeasurementPlan/task/components/list.vue @@ -239,7 +239,7 @@ ids: selectList.value.map(item => item.id), } exportTask(data).then((res) => { - exportFile(res.data, '计量计划') + exportFile(res.data, '任务单列表') loading.close() }) .catch((_) => { diff --git a/src/views/tested/subpackage/task/components/edit.vue b/src/views/tested/subpackage/task/components/edit.vue index 0f17b9f..076c895 100644 --- a/src/views/tested/subpackage/task/components/edit.vue +++ b/src/views/tested/subpackage/task/components/edit.vue @@ -290,12 +290,20 @@ }) // 打印 const printPage = () => { + const loading = ElLoading.service({ + lock: true, + text: 'Loading', + background: 'rgba(255, 255, 255, 0.8)', + }) printPageApi({ id: ruleForm.value.id, pdf: true, }).then((res) => { + loading.close() // printContent(res.data) printContent(getFiles(res.data, 'application/pdf;chartset=UTF-8')) + }).catch(() => { + loading.close() }) } @@ -329,7 +337,7 @@ 取消 - + 打印 @@ -416,7 +424,7 @@ - + diff --git a/src/views/tested/subpackage/task/components/list.vue b/src/views/tested/subpackage/task/components/list.vue index a22b440..04215b8 100644 --- a/src/views/tested/subpackage/task/components/list.vue +++ b/src/views/tested/subpackage/task/components/list.vue @@ -3,7 +3,7 @@ import { reactive, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import ApprovalDialog from './ApprovalDialog.vue' -import { cancelReview, deleteReview, exportReview, getListPage1, submitReview } from '@/api/eqpt/subpackage/task' +import { cancelReview, deleteReview, getListPage1, submitReview } from '@/api/eqpt/subpackage/task' import { getListPage } from '@/api/eqpt/subpackage/directory' import { SCHEDULE } from '@/utils/scheduleDict' import { exportFile } from '@/utils/exportUtils' @@ -371,7 +371,7 @@