|
@@ -97,7 +97,7 @@ import { onMounted, reactive, ref, toRefs } from 'vue';
|
|
|
import FillingAdd from './fillingAdd.vue';
|
|
|
import TableDetails from './tableDetails.vue';
|
|
|
import { ElButton, ElCol } from 'element-plus';
|
|
|
-import { fillingSelect } from '@/api/dataFilling/fillingManage';
|
|
|
+import { fillingSelect, fillingRelease } from '@/api/dataFilling/fillingManage';
|
|
|
import * as XLSX from 'xlsx';
|
|
|
|
|
|
const loading = ref(true);
|
|
@@ -214,17 +214,20 @@ const handlePagination = ({ page, limit }) => {
|
|
|
};
|
|
|
|
|
|
const handleIssue = (row) => {
|
|
|
- const index = tableData.value.findIndex((item) => item.id === row.id);
|
|
|
- if (index !== -1) {
|
|
|
- // 更新前端表格状态
|
|
|
- tableData.value[index].issued_status = 2;
|
|
|
- someApiToUpdateStatus(row.id)
|
|
|
- .then(() => {
|
|
|
- console.log('状态更新成功');
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- console.error('状态更新失败', error);
|
|
|
- });
|
|
|
+ // 检查是否有report_id
|
|
|
+ if (!row.report_id) {
|
|
|
+ console.error('报告ID不存在,无法下发');
|
|
|
+ return;
|
|
|
}
|
|
|
+ // 构造下发请求的URL
|
|
|
+ const releaseUrl = `${row.report_id}`;
|
|
|
+ // 发起下发请求
|
|
|
+ fillingRelease(releaseUrl)
|
|
|
+ .then(() => {
|
|
|
+ fetchFillList();
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ console.error('下发操作失败:', error);
|
|
|
+ });
|
|
|
};
|
|
|
</script>
|