数据分析接口添加参数

This commit is contained in:
duwenyuan 2026-07-20 10:15:46 +08:00
parent 3572fe2c11
commit bd683ea1c2
3 changed files with 12 additions and 4 deletions

View File

@ -43,6 +43,7 @@ const form = reactive({
dataSource: '',
nuclideName: '',
station: '',
stationIds: [] as any[],
startDate: '',
endDate: '',
createTime: [] as string[],
@ -91,6 +92,7 @@ function handleSampleTypeChange() {
return;
}
form.station = '';
form.stationIds = [];
form.nuclideName = ''; //
getStation();
getNuclide();
@ -245,6 +247,7 @@ async function handleSearch() {
await formRef.value.validate((valid) => {
if (valid) {
form.stationIds = form.station ? [form.station] : [];
getList();
}
});
@ -400,7 +403,8 @@ function initCharts() {
const exportChartsData = async () => {
try {
console.log('开始下载...');
form.type = 'nuclideTime'
form.type = 'nuclideTime';
form.stationIds = form.station ? [form.station] : [];
const { filename, blob } = await exportData(form);
// const filename = ''
console.log('文件信息:', {

View File

@ -93,6 +93,7 @@ function handleSampleTypeChange() {
return;
}
form.value.station = '';
form.value.stationIds = [];
getStation();
getNuclide();
}
@ -106,6 +107,7 @@ function getList() {
return;
formEl.validate((valid, fields) => {
if (valid) {
form.value.stationIds = [form.value.station];
getActConcIntvl(form.value, (res) => {
// const data = await fetch('../../../../public/mock/data.json');
// const res = await data.json();
@ -378,7 +380,8 @@ function renderChart(series) {
const exportChartsData = async () => {
try {
console.log('开始下载...');
form.value.type = 'sampleRangeFreq'
form.value.type = 'sampleRangeFreq';
form.value.stationIds = form.value.station ? [form.value.station] : [];
const { filename, blob } = await exportData(form.value);
// const filename = ''
console.log('文件信息:', {

View File

@ -345,8 +345,9 @@ function renderChart() {
const exportChartsData = async () => {
try {
console.log('开始下载...');
form.type = 'nuclideCompare'
const { filename, blob } = await exportData(form);
form.value.type = 'nuclideCompare';
const payload = JSON.parse(JSON.stringify(form.value));
const { filename, blob } = await exportData(payload);
// const filename = ''
console.log('文件信息:', {
filename,