Commit 0e7ae4a8 by yzh

feat:esa前端页面

parent 808b936a
......@@ -110,6 +110,10 @@ export const spiderDataApi = {
stDetail: '/spaceTrack/detail',
stDataDelete: '/sspaceTrackt/delete',
exportSpiderData: '/export/downloadFile',
esaList: '/esa/list',
esaMissionDetail: '/esa/missionDetail',
esaStationDetail: '/esa/stationDetail',
} as const
......
......@@ -90,4 +90,32 @@ export function exportSpiderData(data: UserQueryParams) {
method: POST,
data
}) as unknown as Promise<ApiResponse>
}
\ No newline at end of file
}
// 获取esa数据列表
export function getESAList(data: UserQueryParams) {
return request({
url: spiderDataApi.esaList,
method: POST,
data
}) as unknown as Promise<ApiResponse>
}
// 获取esa任务详情
export function getESAMissionDetail(data: UserQueryParams) {
return request({
url: spiderDataApi.esaMissionDetail,
method: POST,
data
}) as unknown as Promise<ApiResponse>
}
// 获取esa站点详情
export function getESAStationDetail(data: UserQueryParams) {
return request({
url: spiderDataApi.esaStationDetail,
method: POST,
data
}) as unknown as Promise<ApiResponse>
}
......@@ -18,6 +18,7 @@ const props = defineProps({
shortcuts: { type: Array as PropType<shortcutsType[]>, default: () => [] }
})
const defaultValue = ref('')
const cronLabel = ref()
const dialogVisible = ref(false)
const getYear = () => {
let v: number[] = []
......@@ -217,7 +218,7 @@ const value_second = computed(() => {
} else if (v.type == '1') {
return v.range.start + '-' + v.range.end
} else if (v.type == '2') {
return v.loop.start + '/' + v.loop.end
return '*' + '/' + v.loop.end
} else if (v.type == '3') {
return v.appoint.length > 0 ? v.appoint.join(',') : '*'
} else {
......@@ -231,7 +232,7 @@ const value_minute = computed(() => {
} else if (v.type == '1') {
return v.range.start + '-' + v.range.end
} else if (v.type == '2') {
return v.loop.start + '/' + v.loop.end
return '*' + '/' + v.loop.end
} else if (v.type == '3') {
return v.appoint.length > 0 ? v.appoint.join(',') : '*'
} else {
......@@ -245,7 +246,7 @@ const value_hour = computed(() => {
} else if (v.type == '1') {
return v.range.start + '-' + v.range.end
} else if (v.type == '2') {
return v.loop.start + '/' + v.loop.end
return '*' + '/' + v.loop.end
} else if (v.type == '3') {
return v.appoint.length > 0 ? v.appoint.join(',') : '*'
} else {
......@@ -259,7 +260,7 @@ const value_day = computed(() => {
} else if (v.type == '1') {
return v.range.start + '-' + v.range.end
} else if (v.type == '2') {
return v.loop.start + '/' + v.loop.end
return '*' + '/' + v.loop.end
} else if (v.type == '3') {
return v.appoint.length > 0 ? v.appoint.join(',') : '*'
} else if (v.type == '4') {
......@@ -275,7 +276,7 @@ const value_month = computed(() => {
} else if (v.type == '1') {
return v.range.start + '-' + v.range.end
} else if (v.type == '2') {
return v.loop.start + '/' + v.loop.end
return '*' + '/' + v.loop.end
} else if (v.type == '3') {
return v.appoint.length > 0 ? v.appoint.join(',') : '*'
} else {
......@@ -334,10 +335,56 @@ watch(
() => props.modelValue,
() => {
defaultValue.value = props.modelValue
cronLabel.value = parseCronExpression(props.modelValue)
}
)
const parseCronExpression = (cronExpression: string) => {
const res = cronExpression.split('*').length - 1
if (res >= 5) {
const aaa = cronExpression.split(' ')
for (let i = 0; i < aaa.length; i++) {
if (aaa[i] != '*') {
if (i == 0) {
if (aaa[i].length === 3) {
return `每${aaa[i][2]}秒执行一次`
} else {
return `每${aaa[i][2] + aaa[i][3]}秒执行一次`
}
} else if (i == 1) {
if (aaa[i].length === 3) {
return `每${aaa[i][2]}分钟执行一次`
} else {
return `每${aaa[i][2] + aaa[i][3]}分钟执行一次`
}
} else if (i == 2) {
if (aaa[i].length === 3) {
return `每${aaa[i][2]}小时执行一次`
} else {
return `每${aaa[i][2] + aaa[i][3]}小时执行一次`
}
} else if (i == 3) {
if (aaa[i].length === 3) {
return `每${aaa[i][2]}天执行一次`
} else {
return `每${aaa[i][2] + aaa[i][3]}天执行一次`
}
} else if (i == 4) {
if (aaa[i].length === 3) {
return `每${aaa[i][2]}月执行一次`
} else {
return `每${aaa[i][2] + aaa[i][3]}月执行一次`
}
}
}
}
} else if(cronExpression == '* * * * * *'){
return `请生成表达式`
}
}
onMounted(() => {
defaultValue.value = props.modelValue
if(props.modelValue != '* * * * * *'){
cronLabel.value = parseCronExpression(props.modelValue)
}
})
const emit = defineEmits(['update:modelValue'])
const select = ref()
......@@ -499,11 +546,48 @@ const submit = () => {
year
const res = defaultValue.value.split('*').length - 1
console.log(defaultValue.value)
const cronRes = defaultValue.value.split(' ')
// cronLabel
for (let i = 0; i < cronRes.length; i++) {
if (cronRes[i] != '*') {
if (i == 0) {
if (cronRes[i].length === 3) {
cronLabel.value = `每${cronRes[i][2]}秒执行一次`
} else {
cronLabel.value = `每${cronRes[i][2] + cronRes[i][3]}秒执行一次`
}
} else if (i == 1) {
if (cronRes[i].length === 3) {
cronLabel.value = `每${cronRes[i][2]}分钟执行一次`
} else {
cronLabel.value = `每${cronRes[i][2] + cronRes[i][3]}分钟执行一次`
}
} else if (i == 2) {
if (cronRes[i].length === 3) {
cronLabel.value = `每${cronRes[i][2]}小时执行一次`
} else {
cronLabel.value = `每${cronRes[i][2] + cronRes[i][3]}小时执行一次`
}
} else if (i == 3) {
if (cronRes[i].length === 3) {
cronLabel.value = `每${cronRes[i][2]}天执行一次`
} else {
cronLabel.value = `每${cronRes[i][2] + cronRes[i][3]}天执行一次`
}
} else if (i == 4) {
if (cronRes[i].length === 3) {
cronLabel.value = `每${cronRes[i][2]}月执行一次`
} else {
cronLabel.value = `每${cronRes[i][2] + cronRes[i][3]}月执行一次`
}
}
}
}
if (res >= 5) {
emit('update:modelValue', defaultValue.value)
dialogVisible.value = false
}else{
} else {
ElMessage.warning('cron表达式错误,只可设置一个间隔')
emit('update:modelValue', defaultValue.value)
}
......@@ -516,7 +600,7 @@ const inputChange = () => {
</script>
<template>
<div>
<el-input v-model="defaultValue" disabled class="input-with-select" v-bind="$attrs" @input="inputChange">
<el-input v-model="cronLabel" disabled class="input-with-select" v-bind="$attrs" @input="inputChange">
</el-input>
<div class="sc-cron">
<el-tabs>
......@@ -528,7 +612,7 @@ const inputChange = () => {
</div>
</template>
<el-form>
<el-form-item label="类型" >
<el-form-item label="类型">
<el-radio-group v-model="cronValue.second.type">
<el-radio-button value="0">重置</el-radio-button>
<!-- <el-radio-button value="1">范围</el-radio-button> -->
......@@ -600,7 +684,7 @@ const inputChange = () => {
<el-form>
<el-form-item label="类型">
<el-radio-group v-model="cronValue.hour.type">
<el-radio-button value="0">重置</el-radio-button>
<el-radio-button value="0">重置</el-radio-button>
<!-- <el-radio-button value="1">范围</el-radio-button> -->
<el-radio-button value="2" id="cron-hour-frequency">间隔</el-radio-button>
<!-- <el-radio-button value="3">指定</el-radio-button> -->
......@@ -697,7 +781,7 @@ const inputChange = () => {
</el-form-item>
</el-form>
</el-tab-pane>
<!-- <el-tab-pane>
<template #label>
<div class="sc-cron-num">
......@@ -748,7 +832,7 @@ const inputChange = () => {
</el-form>
</el-form>
</el-tab-pane> -->
<!-- <el-tab-pane>
<template #label>
<div class="sc-cron-num">
......@@ -840,19 +924,18 @@ const inputChange = () => {
background-color: var(--el-fill-color-blank);
}
.el-radio-button__inner{
.el-radio-button__inner {
background: #1d5484;
}
</style>
<style>
.el-input.is-disabled .el-input__wrapper{
.el-input.is-disabled .el-input__wrapper {
background: #1d5484;
box-shadow: 0,0,0,0px;
box-shadow: 0, 0, 0, 0px;
}
.el-radio-button__inner{
.el-radio-button__inner {
background: #1d5484;
color: #fff;
border: none;
......
......@@ -13,6 +13,8 @@
<el-checkbox label="DSN数据" value="dsn" id="dsn-checkbox"/>
<el-checkbox label="ITU数据" value="itu" id="itu-checkbox"/>
<el-checkbox label="ST数据" value="spaceTrack" id="st-checkbox"/>
<el-checkbox label="ESA数据" value="esa" id="st-checkbox"/>
</el-checkbox-group>
</el-form-item>
</el-form>
......@@ -295,6 +297,10 @@ const saveToSelectedLocation = async (blobData: any, fileHandle: any) => {
// 关闭弹窗的方法
const close = () => {
exportObject.value = {
timeValue: [],
spiderType: []
}
formRef.value?.clearValidate()
exportDialogVisible.value = false
}
......
......@@ -16,7 +16,6 @@
jumper-text="跳转"
/>
</el-config-provider>
</template>
<script lang="ts" setup>
......
......@@ -125,6 +125,7 @@ export interface UserQueryParams {
filters?: any
norad_cat_id?: string
object_name?: string
name?:string
spacecraft?:string
station?:string
}
\ No newline at end of file
......@@ -300,12 +300,19 @@ const dataTime = ref('')
const recordTime = ref('')
// 是否暂停使用
const isSuspended = ref('')
interface dsnInfo {
targetName:string
targetNam:string
}
const dsnInfoDialog = ref<dsnInfo>()
// 存放定时器的id
const timerId = ref<number | null>()
const tableData = ref([])
const tableData = ref()
const pageObj = ref({
total: 10,
pageSize: 10,
pageSize: 1,
pageNo: 1
})
// 查看数据详情的方法
......@@ -331,7 +338,14 @@ const handleDetails = (row: any) => {
// 获取dsn数据列表的方法
const getData = async () => {
const res = await getDsnList({ page: pageObj.value.pageNo, size: pageObj.value.pageSize })
tableData.value = res.data.list[0].dishes
let dishesData = []
for(let i = 0; i < res.data.list[0].stations.length; i++){
for(let j = 0; j < res.data.list[0].stations[i].dishes.length; j++){
dishesData.push(res.data.list[0].stations[i].dishes[j])
}
}
pageObj.value.total = dishesData.length
tableData.value = dishesData
}
const handleClose = () => {
detailVisibleValue.value = false
......@@ -351,7 +365,7 @@ const handleRefresh = () => {
// 保存id删除的时候用
timerId.value = setInterval(async () => {
const res = await getDsnList({ page: pageObj.value.pageNo, size: pageObj.value.pageSize });
tableData.value = res.data.list[0].dishes;
tableData.value = res.data.list[0].dishes
}, 5000);
} else {
ElMessage.success('停止刷新')
......
......@@ -14,15 +14,17 @@
<el-text class="mx-1">获取时间:</el-text>
</el-form-item>
<el-form-item>
<el-date-picker type="datetimerange" format="YYYY-MM-DD HH:mm:ss" v-model="searchTimeValue"
start-placeholder="开始时间" style="width: 330px" end-placeholder="结束时间"
date-format="YYYY/MM/DD ddd" time-format="A hh:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" />
<el-config-provider :locale="zhCn">
<el-date-picker type="datetimerange" format="YYYY-MM-DD HH:mm:ss" v-model="searchTimeValue"
start-placeholder="开始时间" style="width: 330px" end-placeholder="结束时间"
date-format="YYYY/MM/DD ddd" time-format="A hh:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" />
</el-config-provider>
</el-form-item>
<el-form-item>
<el-text class="mx-1">SNS Notice ID:</el-text>
<el-text class="mx-1">站点名称:</el-text>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入" v-model="searchTargetId" style="width: 170.5px" />
<el-input placeholder="请输入" v-model="searchStation" style="width: 170.5px" />
</el-form-item>
<el-form-item>
<el-space>
......@@ -36,40 +38,53 @@
<div class="m-t-5" />
<div>
<el-table :data="tableData" style="width: 100%" border :row-style="{ height: '42.5px' }"
<el-table :data="tableData" style="width: 100%" border :row-style="{ height: '45.5px' }"
:header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
<!-- <el-table-column type="selection" width="40" /> -->
<el-table-column property="number" label="序号" width="55" type="index" />
<el-table-column property="item.ntc_id" label="目标名称" show-overflow-tooltip />
<el-table-column property="identity.adm_name_e" label="站点名称" show-overflow-tooltip />
<el-table-column property="identity.sat_name" label="距离" show-overflow-tooltip />
<el-table-column property="item.plan_txt" label="往返光时" show-overflow-tooltip />
<el-table-column property="item.plan_txt" label="行动开始时间" show-overflow-tooltip />
<el-table-column property="item.plan_txt" label="行动结束时间" show-overflow-tooltip />
<el-table-column property="item.plan_txt" label="跟踪开始时间" show-overflow-tooltip />
<el-table-column property="item.plan_txt" label="跟踪结束时间" show-overflow-tooltip />
<el-table-column property="item.plan_txt" label="支持类型" show-overflow-tooltip />
<el-table-column property="identity.ntc_type" label="目标在线状态" show-overflow-tooltip>
<el-table-column property="data.mission" label="目标名称" width="86" show-overflow-tooltip />
<el-table-column property="data.station" label="站点名称" width="88" show-overflow-tooltip />
<el-table-column property="data.distance" label="距离" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.identity.ntc_type === 'G' ? '是' : '否' }}
{{ scope.row.data.distance === null ? '-' : scope.row.data.distance }}
</template>
</el-table-column>
<el-table-column property="identity.long_nom" label="目标接收状态" show-overflow-tooltip>
<el-table-column property="data.roundTripLightTime" label="往返光时" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.identity.long_nom === null ? '-' : scope.row.identity.long_nom }}
{{ scope.row.data.roundTripLightTime === null ? '-' : scope.row.data.roundTripLightTime }}
</template>
</el-table-column>
<el-table-column property="item.minPerigee" label="目标传输状态" show-overflow-tooltip>
<el-table-column property="data.boa" label="行动开始时间" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.item.minPerigee === null ? '-' : scope.row.item.minPerigee }}
{{ formatTimestamp(scope.row.data.boa) }}
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="120">
<template #default>
<el-button link type="primary" size="small" @click="handleDetails">
<el-table-column property="data.plan_txt" label="行动结束时间" show-overflow-tooltip>
<template #default="scope">
{{ formatTimestamp(scope.row.data.bot) }}
</template>
</el-table-column>
<el-table-column property="data.plan_txt" label="跟踪结束时间" show-overflow-tooltip>
<template #default="scope">
{{ formatTimestamp(scope.row.data.eoa) }}
</template>
</el-table-column>
<el-table-column property="data.plan_txt" label="跟踪开始时间" show-overflow-tooltip>
<template #default="scope">
{{ formatTimestamp(scope.row.data.eot) }}
</template>
</el-table-column>
<el-table-column label="目标在线状态" width="110" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.data.target?.[scope.row.data.mission] === 'true' ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="85">
<template #default="scope">
<el-button link type="primary" size="small" @click="handleMissionDetails(scope.row.data.mission)">
目标信息
</el-button>
<el-button link type="primary" size="small" @click="handleStationDetails">站点信息</el-button>
<el-button link type="primary" size="small"
@click="handleStationDetails(scope.row.data.station)">站点信息</el-button>
</template>
</el-table-column>
</el-table>
......@@ -155,7 +170,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发射点:" label-position="left">
<el-form-item label="发射点:" label-position="left">
<el-input v-model="targetLaunchLocation" />
</el-form-item>
</el-col>
......@@ -196,7 +211,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<!-- <el-row :gutter="20">
<el-col :span="12">
<el-form-item label="是否在仪表盘中显示:" label-position="left">
<el-input v-model="targetIsShowInDashboard" />
......@@ -207,11 +222,11 @@
<el-input v-model="targetType" />
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="24">
<el-form-item label="描述:" label-position="left">
<el-input v-model="targetDescription" />
<el-input v-model="targetDescription" type="textarea" :rows="3" />
</el-form-item>
</el-col>
</el-row>
......@@ -398,9 +413,9 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="24">
<el-form-item label="描述:" label-position="left">
<el-input v-model="stationDescription" />
<el-input v-model="stationDescription" type="textarea" :rows="3" />
</el-form-item>
</el-col>
</el-row>
......@@ -416,13 +431,22 @@
import { onMounted, ref } from 'vue'
import Pagination from '@/components/pagination/index.vue'
import exportDialog from '@/components/Export/index.vue'
import { getItuList, getItuDetail, deleteItuData } from '@/api/spiderData'
import { getESAList, getESAMissionDetail, getESAStationDetail } from '@/api/spiderData'
import { ElMessage } from 'element-plus'
import { ta } from 'element-plus/es/locales.mjs'
// ElConfigProvider 组件
import { ElConfigProvider } from 'element-plus';
// 引入中文包
import zhCn from 'element-plus/es/locale/lang/zh-cn';
defineOptions({ name: 'Pagination' })
// 更改分页文字
zhCn.el.pagination.total = '共 `{total} 条`';
zhCn.el.pagination.goto = '跳至';
zhCn.el.pagination.pagesize = '条/页';
zhCn.el.pagination.pageClassifier = '页';
// 查找字段
const searchTargetName = ref('')
const searchTimeValue = ref('')
const searchTargetId = ref('')
const searchStation = ref('')
const showDeleteDialog = ref(false)
const detailVisibleValue = ref(false)
const stationVisibleValue = ref(false)
......@@ -450,7 +474,7 @@ const targetInclination = ref('')
const targetPeriod = ref('')
// 发射日期
const targetLaunchDate = ref('')
// 发射
// 发射
const targetLaunchLocation = ref('')
// 相关仪器
const targetInstruments = ref('')
......@@ -463,13 +487,12 @@ const targetSolarWindSpeed = ref('')
// 太阳通量密度
const targetSolarFluxDensity = ref('')
// 是否在仪表盘中显示
const targetIsShowInDashboard = ref('')
// const targetIsShowInDashboard = ref('')
// 目标类型
const targetType = ref('')
// 描述
const targetDescription = ref('')
// 站点详情信息
// 站点名称
const stationName = ref('')
......@@ -530,6 +553,45 @@ const stationType = ref('')
// 描述
const stationDescription = ref('')
// 查看esa站点详情的方法
const handleStationDetails = async (id: any) => {
const res = await getESAStationDetail({ name: id })
// 防止残留数据
stationDescription.value = ''
// 字段赋值
stationName.value = res.data.data[0].name
stationCountry.value = res.data.data[0].country
stationLongitude.value = res.data.data[0].longitude
stationLatitude.value = res.data.data[0].latitude
stationAltitude.value = res.data.data[0].altitude
stationDiameter.value = res.data.data[0].diameter
stationAzimuthSpeed.value = res.data.data[0].antennaSpeedAzimuth
stationElevationSpeed.value = res.data.data[0].antennaSpeedElevation
stationBand.value = res.data.data[0].band
stationTMTC.value = res.data.data[0].tmtcStandards
stationFrequencyAndTiming.value = res.data.data[0].frequencyAndTiming
stationWeather.value = res.data.data[0].weather === null ? '无' : res.data.data[0].weather
stationUplinkSPolarization.value = res.data.data[0].uplinkSBandPolarization === null ? '无' : res.data.data[0].uplinkSBandPolarization
stationUplinkSEirp.value = res.data.data[0].uplinkSBandEirp === null ? '无' : res.data.data[0].uplinkSBandEirp
stationUplinkXPolarization.value = res.data.data[0].uplinkXBandPolarization === null ? '无' : res.data.data[0].uplinkXBandPolarization
stationUplinkXEirp.value = res.data.data[0].uplinkXBandEirp === null ? '无' : res.data.data[0].uplinkXBandEirp
stationUplinkKaPolarization.value = res.data.data[0].uplinkKaBandPolarization === null ? '无' : res.data.data[0].uplinkKaBandPolarization
stationUplinkKaEirp.value = res.data.data[0].uplinkKaBandEirp === null ? '无' : res.data.data[0].uplinkKaBandEirp
stationDownlinkSPolarization.value = res.data.data[0].downlinkSBandPolarization === null ? '无' : res.data.data[0].downlinkSBandPolarization
stationDownlinkSGt.value = res.data.data[0].downlinkSBandGT === null ? '无' : res.data.data[0].downlinkSBandGT
stationDownlinkXPolarization.value = res.data.data[0].downlinkXBandPolarization === null ? '无' : res.data.data[0].downlinkXBandPolarization
stationDownlinkXGt.value = res.data.data[0].downlinkXBandGT === null ? '无' : res.data.data[0].downlinkXBandGT
stationDownlinkKaPolarization.value = res.data.data[0].downlinkKaBandPolarization === null ? '无' : res.data.data[0].downlinkKaBandPolarization
stationDownlinkKaGt.value = res.data.data[0].downlinkKaBandGT === null ? '无' : res.data.data[0].downlinkKaBandGT
stationTemperature.value = res.data.data[0].temperature
stationPressure.value = res.data.data[0].airPressure
stationHumidity.value = res.data.data[0].humidity
stationType.value = res.data.data[0].type
for (let i = 0; i < res.data.data[0].description.length; i++) {
stationDescription.value += res.data.data[0].description[i]
}
stationVisibleValue.value = true
}
const tableData = ref([])
const pageObj = ref({
......@@ -537,20 +599,59 @@ const pageObj = ref({
pageSize: 10,
pageNo: 1
})
// 查看数据详情的方法
const handleDetails = async (id: any) => {
const formatTimestamp = (timestamp: any) => {
if (!timestamp || typeof timestamp !== 'number' || timestamp <= 0) {
return '-';
}
const msTimestamp = String(timestamp).length === 10 ? timestamp * 1000 : timestamp;
const date = new Date(msTimestamp);
if (isNaN(date.getTime())) {
return '-';
}
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hour = String(date.getHours()).padStart(2, '0');
const minute = String(date.getMinutes()).padStart(2, '0');
const second = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
};
// 查看esa任务详情的方法
const handleMissionDetails = async (id: any) => {
const res = await getESAMissionDetail({ name: id })
// 防止残留数据
targetDescription.value = ''
// 字段赋值
targetName.value = res.data.data[0].name
targetMissionType.value = res.data.data[0].type
targetOrbit.value = res.data.data[0].orbitsAround
targetDimension.value = res.data.data[0].dimensions
targetLaunchMass.value = res.data.data[0].launchMass
targetDryMass.value = res.data.data[0].dryMass
targetPerigee.value = res.data.data[0].perigee
targetApogee.value = res.data.data[0].apogee
targetPower.value = res.data.data[0].power
targetInclination.value = res.data.data[0].inclination
targetLaunchDate.value = formatTimestamp(res.data.data[0].launchDate)
targetLaunchLocation.value = res.data.data[0].launchSite
targetPeriod.value = res.data.data[0].period
targetInstruments.value = res.data.data[0].instruments
targetServiceDate.value = formatTimestamp(res.data.data[0].enteredService)
targetIsCoreMission.value = res.data.data[0].coreMission
targetSolarWindSpeed.value = res.data.data[0].solarWindSpeed
targetSolarFluxDensity.value = res.data.data[0].solarFluxDensity
for (let i = 0; i < res.data.data[0].description.length; i++) {
targetDescription.value += res.data.data[0].description[i]
}
detailVisibleValue.value = true
}
//
const handleStationDetails = async (id: any) => {
stationVisibleValue.value = true
}
// 获取itu数据列表的方法
// 获取esa数据列表的方法
const getData = async () => {
const res = await getItuList({ page: pageObj.value.pageNo, size: pageObj.value.pageSize })
searchStation.value = ''
searchTargetName.value = ''
searchTargetId.value = ''
searchTimeValue.value = ''
const res = await getESAList({ page: pageObj.value.pageNo, size: pageObj.value.pageSize })
pageObj.value.total = res.data.total
tableData.value = res.data.list
}
......@@ -558,11 +659,11 @@ const handleClose = () => {
detailVisibleValue.value = false
}
const handleSearch = async () => {
if (searchTargetName.value === '' && searchTargetId.value === '' && searchTimeValue.value === '') {
if (searchTargetName.value === '' && searchStation.value === '' && searchTimeValue.value === '') {
ElMessage.warning('请输入搜索内容')
return
}
const res = await getItuList({ sat_name: searchTargetName.value, ntc_id: searchTargetId.value, times: searchTimeValue.value, page: pageObj.value.pageNo, size: pageObj.value.pageSize })
const res = await getESAList({ spacecraft: searchTargetName.value, station: searchStation.value, times: searchTimeValue.value, page: pageObj.value.pageNo, size: pageObj.value.pageSize })
pageObj.value.total = res.data.total
tableData.value = res.data.list
}
......@@ -575,9 +676,6 @@ onMounted(() => {
// 调整表单项间距
.detailForm {
// background-image: url("@/assets/picture/dialog1.png");
// background-size: 100% 100%;
// background-repeat: no-repeat;
.el-dialog-title {
font-size: 180px;
}
......
......@@ -3,7 +3,7 @@
<div class="formStyle">
<el-form inline>
<el-form-item>
<el-text class="mx-1" >目标名称:</el-text>
<el-text class="mx-1">目标名称:</el-text>
</el-form-item>
<el-form-item>
<div>
......@@ -11,12 +11,14 @@
</div>
</el-form-item>
<el-form-item>
<el-text class="mx-1" >获取时间:</el-text>
<el-text class="mx-1">获取时间:</el-text>
</el-form-item>
<el-form-item>
<el-date-picker type="datetimerange" format="YYYY-MM-DD HH:mm:ss" v-model="searchTimeValue"
start-placeholder="开始时间" style="width: 330px" end-placeholder="结束时间"
date-format="YYYY/MM/DD ddd" time-format="A hh:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" />
<el-config-provider :locale="zhCn">
<el-date-picker type="datetimerange" format="YYYY-MM-DD HH:mm:ss" v-model="searchTimeValue"
start-placeholder="开始时间" style="width: 330px" end-placeholder="结束时间"
date-format="YYYY/MM/DD ddd" time-format="A hh:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" />
</el-config-provider>
</el-form-item>
<el-form-item>
<el-text class="mx-1">SNS Notice ID:</el-text>
......@@ -36,7 +38,7 @@
<div class="m-t-5" />
<div>
<el-table :data="tableData" style="width: 100%" border :row-style="{ height: '42.5px' }"
<el-table :data="tableData" style="width: 100%" border :row-style="{ height: '45px' }"
:header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
<!-- <el-table-column type="selection" width="40" /> -->
<el-table-column property="number" label="序号" width="55" type="index" />
......@@ -120,7 +122,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="SNS Notice ID:" label-position="left">
<el-input v-model="snsId" />
<el-input v-model="snsId" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -269,7 +271,16 @@ import Pagination from '@/components/pagination/index.vue'
import exportDialog from '@/components/Export/index.vue'
import { getItuList, getItuDetail, deleteItuData } from '@/api/spiderData'
import { ElMessage } from 'element-plus'
// ElConfigProvider 组件
import { ElConfigProvider } from 'element-plus';
// 引入中文包
import zhCn from 'element-plus/es/locale/lang/zh-cn';
defineOptions({ name: 'Pagination' })
// 更改分页文字
zhCn.el.pagination.total = '共 `{total} 条`';
zhCn.el.pagination.goto = '跳至';
zhCn.el.pagination.pagesize = '条/页';
zhCn.el.pagination.pageClassifier = '页';
const searchTargetName = ref('')
const searchTimeValue = ref('')
const searchTargetId = ref('')
......@@ -370,11 +381,11 @@ const handleClose = () => {
detailVisibleValue.value = false
}
const handleSearch = async () => {
if(searchTargetName.value === '' && searchTargetId.value === '' && searchTimeValue.value === ''){
if (searchTargetName.value === '' && searchTargetId.value === '' && searchTimeValue.value === '') {
ElMessage.warning('请输入搜索内容')
return
}
const res = await getItuList({ sat_name: searchTargetName.value, ntc_id: searchTargetId.value, times: searchTimeValue.value , page: pageObj.value.pageNo, size: pageObj.value.pageSize })
const res = await getItuList({ sat_name: searchTargetName.value, ntc_id: searchTargetId.value, times: searchTimeValue.value, page: pageObj.value.pageNo, size: pageObj.value.pageSize })
pageObj.value.total = res.data.total
tableData.value = res.data.list
}
......@@ -386,6 +397,7 @@ onMounted(() => {
<style scoped lang="scss">
// 调整表单项间距
.detailForm {
// background-image: url("@/assets/picture/dialog1.png");
// background-size: 100% 100%;
// background-repeat: no-repeat;
......@@ -417,11 +429,9 @@ onMounted(() => {
.el-text {
color: #FFFFFF;
}
</style>
<style>
.el-input {
--el-input-text-color: #FFFFFF;
}
......
......@@ -14,9 +14,11 @@
<el-text class="mx-1">获取时间:</el-text>
</el-form-item>
<el-form-item>
<el-date-picker v-model="timeValue" type="datetimerange" format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始时间"
end-placeholder="结束时间" date-format="YYYY/MM/DD ddd" time-format="A hh:mm:ss" style="width: 330px"
value-format="YYYY-MM-DD HH:mm:ss" />
<el-config-provider :locale="zhCn">
<el-date-picker v-model="timeValue" type="datetimerange" format="YYYY-MM-DD HH:mm:ss"
start-placeholder="开始时间" end-placeholder="结束时间" date-format="YYYY/MM/DD ddd"
time-format="A hh:mm:ss" style="width: 330px" value-format="YYYY-MM-DD HH:mm:ss" />
</el-config-provider>
</el-form-item>
<el-form-item>
<el-text class="mx-1">NORAD CAT ID:</el-text>
......@@ -41,7 +43,7 @@
<div class="m-t-5" />
<div>
<el-table :data="tableData" style="width: 100%" border :row-style="{ height: '43.5px' }"
<el-table :data="tableData" style="width: 100%" border :row-style="{ height: '45.5px' }"
:header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
<!-- <el-table-column type="selection" width="40" /> -->
<el-table-column property="number" label="序号" width="55" type="index" />
......@@ -176,7 +178,16 @@ import Pagination from '@/components/pagination/index.vue'
import exportDialog from '@/components/Export/index.vue'
import { getStList, getStDetail, deleteStData } from '@/api/spiderData'
import { ElMessage } from 'element-plus'
// ElConfigProvider 组件
import { ElConfigProvider } from 'element-plus';
// 引入中文包
import zhCn from 'element-plus/es/locale/lang/zh-cn';
defineOptions({ name: 'Pagination' })
// 更改分页文字
zhCn.el.pagination.total = '共 `{total} 条`';
zhCn.el.pagination.goto = '跳至';
zhCn.el.pagination.pagesize = '条/页';
zhCn.el.pagination.pageClassifier = '页';
const searchTargetName = ref('')
const noradCatId = ref('')
const showDeleteDialog = ref(false)
......@@ -247,11 +258,11 @@ const handleClose = () => {
detailVisibleValue.value = false
}
const handleSearch = async () => {
if(searchTargetName.value === '' && noradCatId.value === '' && timeValue.value === ''){
if (searchTargetName.value === '' && noradCatId.value === '' && timeValue.value === '') {
ElMessage.warning('请输入搜索内容')
return
}
const res = await getStList({ norad_cat_id: noradCatId.value, object_name: searchTargetName.value, times:timeValue.value, page: pageObj.value.pageNo, size: pageObj.value.pageSize })
const res = await getStList({ norad_cat_id: noradCatId.value, object_name: searchTargetName.value, times: timeValue.value, page: pageObj.value.pageNo, size: pageObj.value.pageSize })
tableData.value = res.data.list
pageObj.value.total = res.data.total
}
......
......@@ -5,22 +5,6 @@
<div class="custom-style flex gap-4">
<el-segmented v-model="mode" :options="sizeOptions" style="margin-bottom: 1rem" size="default" />
<el-button type="primary" @click="handleExport">导出</el-button>
<!-- <el-button type="primary" @click="handleExport">导入</el-button> -->
<!-- <el-upload ref="upload" class="upload-demo"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" :limit="1"
:on-exceed="handleExceed" :auto-upload="false">
<template #trigger>
<el-button type="primary">select file</el-button>
</template>
<el-button class="ml-3" type="success" @click="submitUpload">
upload to server
</el-button>
<template #tip>
<div class="el-upload__tip text-red">
limit 1 file, new file will cover the old file
</div>
</template>
</el-upload> -->
</div>
</div>
<!-- 综合数据页面组件 -->
......@@ -35,6 +19,7 @@
<!-- ST数据页面组件 -->
<stDataTab v-if="mode === 'ST数据'">
</stDataTab>
<!-- ESA数据页面组件 -->
<esDataTab v-if="mode === 'ESA数据'">
</esDataTab>
</div>
......@@ -51,14 +36,13 @@ import ituDataTab from './components/ituDataTab.vue'
import stDataTab from './components/stDataTab.vue'
import dsnDataTab from './components/dsnData/dsnTab.vue'
import esDataTab from './components/esDataTab.vue'
import exportDialog from '@/components/Export/index.vue'
import { genFileId } from 'element-plus'
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
// const
const mode = ref('DSN数据')
const showDeleteDialog = ref(false)
const sizeOptions = ['DSN数据', 'ITU数据', 'ST数据', 'ES数据']
const sizeOptions = ['DSN数据', 'ITU数据', 'ST数据', 'ESA数据']
const route = useRoute()
const router = useRouter()
const modeValue = ref<any>('数据展示')
......@@ -90,6 +74,7 @@ onMounted(() => {
modeValue.value = route.query.mode
mode.value = modeValue.value
}
console.log(mode.value)
})
</script>
......
......@@ -78,10 +78,12 @@ const rules = ref<FormRules<RuleForm>>({
{
validator: (rule, value, callback) => {
// 计算字符串中'*'的数量
const starCount = (value.match(/\*/g) || []).length;
if (starCount < 5) {
const starCount = (value.match(/\//g) || []).length;
if (starCount > 1) {
callback(new Error('cron表达式最多设置一个间隔'));
} else {
}else if(starCount == 0){
callback(new Error('请设置cron表达式'));
}else {
callback();
}
},
......@@ -189,7 +191,7 @@ watch(
}
if (!newVisible) {
// 清空表单
cronExpression.value = ''
// cronExpression.value = ''
}
},
{ immediate: true }
......
......@@ -140,7 +140,7 @@ const taskName = ref('')
const taskValue = ref('')
const belongSpiderType = ref('')
const router = useRouter()
const frequency = ref('')
const frequency = ref()
const editMode = ref(AddMode.UPDATE_TASK)
const deleteMode = ref(DeleteMode.SINGLE_DELETE)
const showDeleteDialog = ref(false)
......@@ -188,8 +188,10 @@ const changeStatus = async (task: any, newStatus: string) => {
const handleEdit = () => {
}
// 打开新建任务弹窗
const openTaskDialog = () => {
editMode.value = AddMode.ADD_TASK
frequency.value = '* * * * * *'
showTaskDialog.value = true
}
// 获取任务列表的方法
......
......@@ -9,20 +9,12 @@
<el-text class="mx-1">时间:</el-text>
</el-form-item>
<el-form-item>
<el-date-picker v-model="timeValue" type="datetimerange" start-placeholder="Start date"
end-placeholder="End date" format="YYYY-MM-DD HH:mm:ss" date-format="YYYY/MM/DD ddd"
time-format="A hh:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"/>
<el-config-provider :locale="zhCn">
<el-date-picker v-model="timeValue" type="datetimerange" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss" date-format="YYYY/MM/DD ddd"
time-format="A hh:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" />
</el-config-provider>
</el-form-item>
<!-- <el-form-item>
<el-text class="mx-1">调度状态:</el-text>
</el-form-item>
<el-form-item>
<div>
<el-select v-model="taskValue" placeholder="请选择" style="width: 220px">
<el-option v-for="item in taskOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</el-form-item> -->
<el-form-item>
<el-space>
<el-button type="primary" @click="searchData">查询</el-button>
......@@ -38,7 +30,6 @@
<el-table :data="tableData" style="width: 100%" border :header-cell-style="{ textAlign: 'center' }"
:cell-style="{ textAlign: 'center' }">
<el-table-column property="number" label="序号" width="55" type="index" />
<!-- <el-table-column property="project" label="项目名称" show-overflow-tooltip /> -->
<el-table-column property="spider" label="所属爬虫" show-overflow-tooltip />
<el-table-column property="schedule_mode" label="调度模式" show-overflow-tooltip />
<el-table-column property="run_status" label="调度状态" show-overflow-tooltip>
......@@ -57,15 +48,7 @@
{{ scope.row.run_status === "unknown" ? '已结束' : scope.row.run_status }}
</template>
</el-table-column>
<!-- <el-table-column property="duration" label="持续时间" show-overflow-tooltip /> -->
<el-table-column property="create_time" label="调度时间" width="200" show-overflow-tooltip />
<!-- <el-table-column label="运行日志" width="120">
<template #default="scope">
<el-button size="small" plain type="primary" @click="handleDetails(scope.row)">
日志
</el-button>
</template>
</el-table-column> -->
</el-table>
</div>
<div class="pagination w-full flex flex-row-reverse pr-4 m-t-4">
......@@ -82,7 +65,16 @@ import { useRoute } from 'vue-router'
import { useRouter } from 'vue-router'
import { getSpiderTaskRecord } from '@/api/spiderTask.ts'
import { ElMessage } from 'element-plus'
// ElConfigProvider 组件
import { ElConfigProvider } from 'element-plus';
// 引入中文包
import zhCn from 'element-plus/es/locale/lang/zh-cn';
defineOptions({ name: 'Pagination' })
// 更改分页文字
zhCn.el.pagination.total = '共 `{total} 条`';
zhCn.el.pagination.goto = '跳至';
zhCn.el.pagination.pagesize = '条/页';
zhCn.el.pagination.pageClassifier = '页';
const route = useRoute()
const router = useRouter()
const taskValue = ref('')
......@@ -146,7 +138,7 @@ const searchData = async () => {
const endTime = timeValue.value[1]
resTime.push(startTime)
resTime.push(endTime)
const res = await getSpiderTaskRecord({ page: pageObj.value.pageNo, size: pageObj.value.pageSize, status: 'total' ,times: resTime})
const res = await getSpiderTaskRecord({ page: pageObj.value.pageNo, size: pageObj.value.pageSize, status: 'total', times: resTime })
pageObj.value.total = res.data.total
tableData.value = res.data.list
}
......
......@@ -31,7 +31,7 @@ export default defineConfig({
proxy: {
// 代理API请求,使用更精确的路径匹配
'/api': {
target: 'http://127.0.0.1:5001/',
target: 'http://192.168.0.176:5001/',
changeOrigin: true,
},
}
......
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