Commit 160a92a7 by 周田

Merge branch 'liucan' into 'main'

fix:修复创建任务间隔时间校验,分页错误

See merge request !19
parents 8e5091ba 5a19fcdd
...@@ -213,20 +213,20 @@ const pageObj = ref({ ...@@ -213,20 +213,20 @@ const pageObj = ref({
// 查看数据详情的方法 // 查看数据详情的方法
const handleDetails = (row: any) => { const handleDetails = (row: any) => {
targetName.value = row.targets[0].name; targetName.value = row.targets[0].name;
windSpeed.value = row.windSpeed === "" ? "-" : row.windSpeed; windSpeed.value = row.windSpeed === "" ? "--" : row.windSpeed;
antennaName.value = row.name; antennaName.value = row.name;
antennaStatus.value = row.activity; antennaStatus.value = row.activity;
targetAzimuth.value = row.azimuthAngle; targetAzimuth.value = row.azimuthAngle;
targetDistance.value = row.targets[0].uplegRange; targetDistance.value = row.targets[0].uplegRange;
targetElevation.value = row.elevationAngle; targetElevation.value = row.elevationAngle;
upSignalStatus.value = row.signals.length < 1 ? "-" : row.signals[0].active; upSignalStatus.value = row.signals.length < 1 ? "--" : row.signals[0].active;
upSignalSource.value = row.signals.length < 1 ? "-" : row.targets[0].name; upSignalSource.value = row.signals.length < 1 ? "--" : row.targets[0].name;
upSignalFrequencyBand.value = row.signals.length < 1 ? "-" : row.signals[0].band; upSignalFrequencyBand.value = row.signals.length < 1 ? "--" : row.signals[0].band;
upSignalLaunchPower.value = row.signals.length < 1 ? "-" : row.signals[0].power; upSignalLaunchPower.value = row.signals.length < 1 ? "--" : row.signals[0].power;
downSignalStatus.value = row.signals.length < 2 ? "-" : row.signals[1].active; downSignalStatus.value = row.signals.length < 2 ? "--" : row.signals[1].active;
downSignalSource.value = row.signals.length < 2 ? "-" : row.targets[0].name; downSignalSource.value = row.signals.length < 2 ? "--" : row.targets[0].name;
downSignalFrequencyBand.value = row.signals.length < 2 ? "-" : row.signals[1].band; downSignalFrequencyBand.value = row.signals.length < 2 ? "--" : row.signals[1].band;
downSignalReceptionPower.value = row.signals.length < 2 ? "-" : row.signals[1].power; downSignalReceptionPower.value = row.signals.length < 2 ? "--" : row.signals[1].power;
roundTripTime.value = row.targets[0].rtlt; roundTripTime.value = row.targets[0].rtlt;
detailVisibleValue.value = true; detailVisibleValue.value = true;
}; };
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
<div class="btns"> <div class="btns">
<el-button plain type="primary" @click="handleSearch">查询</el-button> <el-button plain type="primary" @click="getData">查询</el-button>
<el-button plain @click="resetForm">重置</el-button> <el-button plain @click="resetForm">重置</el-button>
</div> </div>
</div> </div>
...@@ -137,11 +137,11 @@ ...@@ -137,11 +137,11 @@
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">目标尺寸:</span> <span class="item-title">目标尺寸:</span>
<span class="item">{{ targetDimension ?? "-" }}</span> <span class="item">{{ targetDimension ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">发射质量:</span> <span class="item-title">发射质量:</span>
<span class="item">{{ targetLaunchMass ?? "-" }}</span> <span class="item">{{ targetLaunchMass ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">干质量:</span> <span class="item-title">干质量:</span>
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">发射站点:</span> <span class="item-title">发射站点:</span>
<span class="item">{{ targetLaunchLocation ?? "-" }}</span> <span class="item">{{ targetLaunchLocation ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">轨道周期:</span> <span class="item-title">轨道周期:</span>
...@@ -175,23 +175,23 @@ ...@@ -175,23 +175,23 @@
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">相关仪器:</span> <span class="item-title">相关仪器:</span>
<span class="item">{{ targetInstruments ?? "-" }}</span> <span class="item">{{ targetInstruments ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">服役日期:</span> <span class="item-title">服役日期:</span>
<span class="item">{{ targetServiceDate ?? "-" }}</span> <span class="item">{{ targetServiceDate ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">是否为核心任务:</span> <span class="item-title">是否为核心任务:</span>
<span class="item">{{ targetIsCoreMission ?? "-" }}</span> <span class="item">{{ targetIsCoreMission ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">太阳风速:</span> <span class="item-title">太阳风速:</span>
<span class="item">{{ targetSolarWindSpeed ?? "-" }}</span> <span class="item">{{ targetSolarWindSpeed ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">太阳通量密度:</span> <span class="item-title">太阳通量密度:</span>
<span class="item">{{ targetSolarFluxDensity ?? "-" }}</span> <span class="item">{{ targetSolarFluxDensity ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">轨道倾角:</span> <span class="item-title">轨道倾角:</span>
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">站点气压:</span> <span class="item-title">站点气压:</span>
<span class="item">{{ stationPressure === "" ? "-" : stationPressure }}</span> <span class="item">{{ stationPressure === "" ? "--" : stationPressure }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">站点天气情况:</span> <span class="item-title">站点天气情况:</span>
...@@ -328,11 +328,11 @@ ...@@ -328,11 +328,11 @@
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">站点温度:</span> <span class="item-title">站点温度:</span>
<span class="item">{{ stationTemperature === "" ? "-" : stationTemperature }}</span> <span class="item">{{ stationTemperature === "" ? "--" : stationTemperature }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">站点湿度:</span> <span class="item-title">站点湿度:</span>
<span class="item">{{ stationHumidity === "" ? "-" : stationHumidity }}</span> <span class="item">{{ stationHumidity === "" ? "--" : stationHumidity }}</span>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -529,25 +529,25 @@ const handleStationDetails = async (id: any) => { ...@@ -529,25 +529,25 @@ const handleStationDetails = async (id: any) => {
stationBand.value = stationData.band || ""; stationBand.value = stationData.band || "";
stationTMTC.value = stationData.tmtcStandards || ""; stationTMTC.value = stationData.tmtcStandards || "";
stationFrequencyAndTiming.value = stationData.frequencyAndTiming || ""; stationFrequencyAndTiming.value = stationData.frequencyAndTiming || "";
stationWeather.value = stationData.weather === null ? "-" : stationData.weather || "-"; stationWeather.value = stationData.weather === null ? "--" : stationData.weather || "--";
stationUplinkSPolarization.value = stationUplinkSPolarization.value =
stationData.uplinkSBandPolarization === null ? "-" : stationData.uplinkSBandPolarization || "-"; stationData.uplinkSBandPolarization === null ? "--" : stationData.uplinkSBandPolarization || "--";
stationUplinkSEirp.value = stationData.uplinkSBandEirp === null ? "-" : stationData.uplinkSBandEirp || "-"; stationUplinkSEirp.value = stationData.uplinkSBandEirp === null ? "--" : stationData.uplinkSBandEirp || "--";
stationUplinkXPolarization.value = stationUplinkXPolarization.value =
stationData.uplinkXBandPolarization === null ? "-" : stationData.uplinkXBandPolarization || "-"; stationData.uplinkXBandPolarization === null ? "--" : stationData.uplinkXBandPolarization || "--";
stationUplinkXEirp.value = stationData.uplinkXBandEirp === null ? "-" : stationData.uplinkXBandEirp || "-"; stationUplinkXEirp.value = stationData.uplinkXBandEirp === null ? "--" : stationData.uplinkXBandEirp || "--";
stationUplinkKaPolarization.value = stationUplinkKaPolarization.value =
stationData.uplinkKaBandPolarization === null ? "-" : stationData.uplinkKaBandPolarization || "-"; stationData.uplinkKaBandPolarization === null ? "--" : stationData.uplinkKaBandPolarization || "--";
stationUplinkKaEirp.value = stationData.uplinkKaBandEirp === null ? "-" : stationData.uplinkKaBandEirp || "-"; stationUplinkKaEirp.value = stationData.uplinkKaBandEirp === null ? "--" : stationData.uplinkKaBandEirp || "--";
stationDownlinkSPolarization.value = stationDownlinkSPolarization.value =
stationData.downlinkSBandPolarization === null ? "-" : stationData.downlinkSBandPolarization || "-"; stationData.downlinkSBandPolarization === null ? "--" : stationData.downlinkSBandPolarization || "--";
stationDownlinkSGt.value = stationData.downlinkSBandGT === null ? "-" : stationData.downlinkSBandGT || "-"; stationDownlinkSGt.value = stationData.downlinkSBandGT === null ? "--" : stationData.downlinkSBandGT || "--";
stationDownlinkXPolarization.value = stationDownlinkXPolarization.value =
stationData.downlinkXBandPolarization === null ? "-" : stationData.downlinkXBandPolarization || "-"; stationData.downlinkXBandPolarization === null ? "--" : stationData.downlinkXBandPolarization || "--";
stationDownlinkXGt.value = stationData.downlinkXBandGT === null ? "-" : stationData.downlinkXBandGT || "-"; stationDownlinkXGt.value = stationData.downlinkXBandGT === null ? "--" : stationData.downlinkXBandGT || "--";
stationDownlinkKaPolarization.value = stationDownlinkKaPolarization.value =
stationData.downlinkKaBandPolarization === null ? "-" : stationData.downlinkKaBandPolarization || "-"; stationData.downlinkKaBandPolarization === null ? "--" : stationData.downlinkKaBandPolarization || "--";
stationDownlinkKaGt.value = stationData.downlinkKaBandGT === null ? "-" : stationData.downlinkKaBandGT || "-"; stationDownlinkKaGt.value = stationData.downlinkKaBandGT === null ? "--" : stationData.downlinkKaBandGT || "--";
stationTemperature.value = stationData.temperature || ""; stationTemperature.value = stationData.temperature || "";
stationPressure.value = stationData.airPressure || ""; stationPressure.value = stationData.airPressure || "";
stationHumidity.value = stationData.humidity || ""; stationHumidity.value = stationData.humidity || "";
...@@ -557,7 +557,7 @@ const handleStationDetails = async (id: any) => { ...@@ -557,7 +557,7 @@ const handleStationDetails = async (id: any) => {
if (Array.isArray(stationData.description)) { if (Array.isArray(stationData.description)) {
stationDescription.value = stationData.description.join(""); stationDescription.value = stationData.description.join("");
} else { } else {
stationDescription.value = stationData.description || "-"; stationDescription.value = stationData.description || "--";
} }
stationVisibleValue.value = true; stationVisibleValue.value = true;
...@@ -575,12 +575,12 @@ const pageObj = ref({ ...@@ -575,12 +575,12 @@ const pageObj = ref({
}); });
const formatTimestamp = (timestamp: any) => { const formatTimestamp = (timestamp: any) => {
if (!timestamp || typeof timestamp !== "number" || timestamp <= 0) { if (!timestamp || typeof timestamp !== "number" || timestamp <= 0) {
return "-"; return "--";
} }
const msTimestamp = String(timestamp).length === 10 ? timestamp * 1000 : timestamp; const msTimestamp = String(timestamp).length === 10 ? timestamp * 1000 : timestamp;
const date = new Date(msTimestamp); const date = new Date(msTimestamp);
if (isNaN(date.getTime())) { if (isNaN(date.getTime())) {
return "-"; return "--";
} }
const year = date.getFullYear(); const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0"); const month = String(date.getMonth() + 1).padStart(2, "0");
...@@ -631,21 +631,6 @@ const resetForm = () => { ...@@ -631,21 +631,6 @@ const resetForm = () => {
// 获取esa数据列表的方法 // 获取esa数据列表的方法
const getData = async () => { const getData = async () => {
tableLoading.value = true; tableLoading.value = true;
const res = await getESAList({ page: pageObj.value.pageNo, size: pageObj.value.pageSize });
pageObj.value.total = res.data.total;
tableData.value = res.data.list;
console.log(tableData.value);
tableLoading.value = false;
};
const handleClose = () => {
detailVisibleValue.value = false;
};
const handleSearch = async () => {
if (searchTargetName.value === "" && searchStation.value === "" && searchTimeValue.value === "") {
ElMessage.warning("请输入搜索内容");
return;
}
const res = await getESAList({ const res = await getESAList({
spacecraft: searchTargetName.value, spacecraft: searchTargetName.value,
station: searchStation.value, station: searchStation.value,
...@@ -655,7 +640,12 @@ const handleSearch = async () => { ...@@ -655,7 +640,12 @@ const handleSearch = async () => {
}); });
pageObj.value.total = res.data.total; pageObj.value.total = res.data.total;
tableData.value = res.data.list; tableData.value = res.data.list;
tableLoading.value = false;
}; };
const handleClose = () => {
detailVisibleValue.value = false;
};
onMounted(() => { onMounted(() => {
getData(); getData();
}); });
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
</div> </div>
<div class="btns"> <div class="btns">
<el-button plain type="primary" @click="handleSearch">查询</el-button> <el-button plain type="primary" @click="getData">查询</el-button>
<el-button plain="" @click="resetForm">重置</el-button> <el-button plain="" @click="resetForm">重置</el-button>
</div> </div>
</div> </div>
...@@ -87,7 +87,12 @@ ...@@ -87,7 +87,12 @@
label="是否确认使用" label="是否确认使用"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column property="regulatory_status.resumption_list" width="140" label="是否暂停使用" show-overflow-tooltip /> <el-table-column
property="regulatory_status.resumption_list"
width="140"
label="是否暂停使用"
show-overflow-tooltip
/>
<el-table-column width="180" property="crawl_time" label="采集时间" show-overflow-tooltip /> <el-table-column width="180" property="crawl_time" label="采集时间" show-overflow-tooltip />
<el-table-column label="操作" width="60"> <el-table-column label="操作" width="60">
<template #default="scope"> <template #default="scope">
...@@ -125,7 +130,7 @@ ...@@ -125,7 +130,7 @@
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">网络组织:</span> <span class="item-title">网络组织:</span>
<span class="item">{{ ntwkOrg ?? "-" }}</span> <span class="item">{{ ntwkOrg ?? "--" }}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="item-title">计划/非计划类型:</span> <span class="item-title">计划/非计划类型:</span>
...@@ -315,17 +320,17 @@ const handleDetails = async (id: any) => { ...@@ -315,17 +320,17 @@ const handleDetails = async (id: any) => {
planType.value = res.data.identity.plan_type; planType.value = res.data.identity.plan_type;
syncType.value = res.data.identity.ntc_type; syncType.value = res.data.identity.ntc_type;
isNtcType.value = res.data.item.ntc_type; isNtcType.value = res.data.item.ntc_type;
syncPosition.value = res.data.identity.long_nom === null ? "-" : res.data.identity.long_nom; syncPosition.value = res.data.identity.long_nom === null ? "--" : res.data.identity.long_nom;
perigee.value = res.data.item.minPerigee === null ? "-" : res.data.item.minPerigee; perigee.value = res.data.item.minPerigee === null ? "--" : res.data.item.minPerigee;
apogee.value = res.data.item.maxApog === null ? "-" : res.data.item.maxApog; apogee.value = res.data.item.maxApog === null ? "--" : res.data.item.maxApog;
lowestAltitude.value = res.data.item.minAltitude === null ? "-" : res.data.item.minAltitude; lowestAltitude.value = res.data.item.minAltitude === null ? "--" : res.data.item.minAltitude;
referenceSubject.value = res.data.item.ref_body === null ? "-" : res.data.item.ref_body; referenceSubject.value = res.data.item.ref_body === null ? "--" : res.data.item.ref_body;
lowestFrequency.value = res.data.item.freq_min === null ? "-" : res.data.item.freq_min; lowestFrequency.value = res.data.item.freq_min === null ? "--" : res.data.item.freq_min;
highestFrequency.value = res.data.item.freq_max === null ? "-" : res.data.item.freq_max; highestFrequency.value = res.data.item.freq_max === null ? "--" : res.data.item.freq_max;
status.value = res.data.regulatory_status.active_status; status.value = res.data.regulatory_status.active_status;
validityPeriod.value = res.data.regulatory_status.prd_valid; validityPeriod.value = res.data.regulatory_status.prd_valid;
earliestUsageDate.value = earliestUsageDate.value =
res.data.regulatory_status.d_reg_limit === null ? "-" : res.data.regulatory_status.d_reg_limit; res.data.regulatory_status.d_reg_limit === null ? "--" : res.data.regulatory_status.d_reg_limit;
isUsed.value = res.data.regulatory_status.f_biu_grps; isUsed.value = res.data.regulatory_status.f_biu_grps;
isPauseUsed.value = res.data.regulatory_status.resumption_list; isPauseUsed.value = res.data.regulatory_status.resumption_list;
recordTime.value = res.data.crawl_time; recordTime.value = res.data.crawl_time;
...@@ -333,7 +338,7 @@ const handleDetails = async (id: any) => { ...@@ -333,7 +338,7 @@ const handleDetails = async (id: any) => {
earliestRegulatoryDate.value = res.data.regulatory_status.d_inuse_list; earliestRegulatoryDate.value = res.data.regulatory_status.d_inuse_list;
isRestoreUsed.value = res.data.regulatory_status.resumption_list; isRestoreUsed.value = res.data.regulatory_status.resumption_list;
validityPeriodSatelliteNetworkOldName.value = res.data.regulatory_status.old_satellite_network_name; validityPeriodSatelliteNetworkOldName.value = res.data.regulatory_status.old_satellite_network_name;
BFIFICdate.value = res.data.regulatory_status.d_wic === null ? "-" : res.data.regulatory_status.d_wic; BFIFICdate.value = res.data.regulatory_status.d_wic === null ? "--" : res.data.regulatory_status.d_wic;
detailVisibleValue.value = true; detailVisibleValue.value = true;
}; };
...@@ -349,23 +354,7 @@ const resetForm = () => { ...@@ -349,23 +354,7 @@ const resetForm = () => {
}; };
const getData = async () => { const getData = async () => {
tableLoading.value = true; tableLoading.value = true;
const res = await getItuList({ page: pageObj.value.pageNo, size: pageObj.value.pageSize }); const res = await await getItuList({
pageObj.value.total = res.data.total;
tableData.value = res.data.list;
console.log(tableData.value);
tableLoading.value = false;
};
const handleClose = () => {
detailVisibleValue.value = false;
};
const handleSearch = async () => {
if (searchTargetName.value === "" && searchTargetId.value === "" && searchTimeValue.value === "") {
ElMessage.warning("请输入搜索内容");
return;
}
tableLoading.value = true;
const res = await getItuList({
sat_name: searchTargetName.value, sat_name: searchTargetName.value,
ntc_id: searchTargetId.value, ntc_id: searchTargetId.value,
times: searchTimeValue.value, times: searchTimeValue.value,
...@@ -376,6 +365,9 @@ const handleSearch = async () => { ...@@ -376,6 +365,9 @@ const handleSearch = async () => {
tableData.value = res.data.list; tableData.value = res.data.list;
tableLoading.value = false; tableLoading.value = false;
}; };
const handleClose = () => {
detailVisibleValue.value = false;
};
onMounted(() => { onMounted(() => {
getData(); getData();
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
</div> </div>
<div class="btns"> <div class="btns">
<el-button plain type="primary" @click="handleSearch">查询</el-button> <el-button plain type="primary" @click="getData">查询</el-button>
<el-button plain @click="resetForm">重置</el-button> <el-button plain @click="resetForm">重置</el-button>
</div> </div>
</div> </div>
...@@ -310,21 +310,6 @@ const resetForm = () => { ...@@ -310,21 +310,6 @@ const resetForm = () => {
// 获取st数据列表的方法 // 获取st数据列表的方法
const getData = async () => { const getData = async () => {
tableLoading.value = true; tableLoading.value = true;
const res = await getStList({ page: pageObj.value.pageNo, size: pageObj.value.pageSize });
pageObj.value.total = res.data.total;
tableData.value = res.data.list;
console.log(tableData.value);
tableLoading.value = false;
};
const handleClose = () => {
detailVisibleValue.value = false;
};
const handleSearch = async () => {
if (searchTargetName.value === "" && noradCatId.value === "" && timeValue.value === "") {
ElMessage.warning("请输入搜索内容");
return;
}
const res = await getStList({ const res = await getStList({
norad_cat_id: noradCatId.value, norad_cat_id: noradCatId.value,
object_name: searchTargetName.value, object_name: searchTargetName.value,
...@@ -332,9 +317,14 @@ const handleSearch = async () => { ...@@ -332,9 +317,14 @@ const handleSearch = async () => {
page: pageObj.value.pageNo, page: pageObj.value.pageNo,
size: pageObj.value.pageSize, size: pageObj.value.pageSize,
}); });
tableData.value = res.data.list;
pageObj.value.total = res.data.total; pageObj.value.total = res.data.total;
tableData.value = res.data.list;
tableLoading.value = false;
}; };
const handleClose = () => {
detailVisibleValue.value = false;
};
onMounted(() => { onMounted(() => {
getData(); getData();
}); });
......
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, reactive, ref } from "vue"; import { onMounted, reactive, ref } from "vue";
import { defineProps } from "vue";
import { watch } from "vue"; import { watch } from "vue";
import { addSpiderTask } from "@/api/spiderTask"; import { addSpiderTask } from "@/api/spiderTask";
import { AddMode } from "./enum"; import { AddMode } from "./enum";
...@@ -154,6 +153,7 @@ const handleConfirm = async () => { ...@@ -154,6 +153,7 @@ const handleConfirm = async () => {
//验证表单内容是否通过,通过继续执行 //验证表单内容是否通过,通过继续执行
if (valid) { if (valid) {
if (currentMode.value === AddMode.ADD_TASK) { if (currentMode.value === AddMode.ADD_TASK) {
if (!checkExGap(exGaps)) return;
await addSpiderTask({ await addSpiderTask({
scrapyd_server_id: taskParams.value.scrapyd_server_id, scrapyd_server_id: taskParams.value.scrapyd_server_id,
schedule_type: taskParams.value.schedule_type, schedule_type: taskParams.value.schedule_type,
...@@ -167,6 +167,7 @@ const handleConfirm = async () => { ...@@ -167,6 +167,7 @@ const handleConfirm = async () => {
emit("getTaskList"); emit("getTaskList");
ElMessage.success("添加成功"); ElMessage.success("添加成功");
} else if (currentMode.value === AddMode.UPDATE_TASK) { } else if (currentMode.value === AddMode.UPDATE_TASK) {
if (!checkExGap(exGaps)) return;
await addSpiderTask({ await addSpiderTask({
scrapyd_server_id: taskParams.value.scrapyd_server_id, scrapyd_server_id: taskParams.value.scrapyd_server_id,
schedule_type: taskParams.value.schedule_type, schedule_type: taskParams.value.schedule_type,
...@@ -189,6 +190,17 @@ const handleConfirm = async () => { ...@@ -189,6 +190,17 @@ const handleConfirm = async () => {
exGaps.day = 0; exGaps.day = 0;
}); });
}; };
//校验设置的间隔是否合法
const checkExGap = (exGaps: any) => {
if (exGaps.second < 5 && exGaps.minute <= 0 && exGaps.hour <= 0 && exGaps.day <= 0) {
ElMessage.warning("间隔时间不能小于5秒");
return false;
} else {
return true;
}
};
const getData = async () => { const getData = async () => {
const res = await getSpiderList({ scrapydServerId: "1", project: "spiders" }); const res = await getSpiderList({ scrapydServerId: "1", project: "spiders" });
spiderTypeOptions.value = res.data; spiderTypeOptions.value = res.data;
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
:total="pageObj.total" :total="pageObj.total"
v-model:page="pageObj.pageNo" v-model:page="pageObj.pageNo"
v-model:limit="pageObj.pageSize" v-model:limit="pageObj.pageSize"
@pagination="getData" @pagination="searchData"
v-model:pagerCount="pageObj.pagerCount" v-model:pagerCount="pageObj.pagerCount"
/> />
</div> </div>
...@@ -178,7 +178,6 @@ const getData = async () => { ...@@ -178,7 +178,6 @@ const getData = async () => {
}); });
pageObj.value.total = res.data.total; pageObj.value.total = res.data.total;
tableData.value = res.data.list; tableData.value = res.data.list;
console.log(tableData.value);
tableLoading.value = false; tableLoading.value = false;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment