提交代码
This commit is contained in:
parent
4c0daee6c6
commit
612335508b
|
@ -82,6 +82,22 @@ export const submit = (row) => {
|
|||
data: row,
|
||||
});
|
||||
};
|
||||
export const submit2 = (row) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/crawlInfo/submit2',
|
||||
method: 'post',
|
||||
data: row,
|
||||
});
|
||||
};
|
||||
export const getStatus = (disasterId) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/crawlInfo/getStatus',
|
||||
method: 'get',
|
||||
params: {
|
||||
disasterId,
|
||||
},
|
||||
});
|
||||
};
|
||||
export const getList = (current, size, param) => {
|
||||
let params = {
|
||||
current,
|
||||
|
|
|
@ -6,10 +6,18 @@
|
|||
|
||||
<div class="rsSelect">
|
||||
<el-card class="box-card">
|
||||
<span>{{ state.data.disasterKeyword }}</span>
|
||||
<p style="color: #878787; ">VoRDM ID:{{ state.data.vordmId }}</p>
|
||||
<p style="color: #aa4434;">Disaster time: {{ state.data.disasterTime }}</p>
|
||||
<p style="color: #878787; ">Disaster Country: {{ state.data.disasterCountry }}</p>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>{{ state.data.disasterKeyword }}</span>
|
||||
<p style="color: #878787; ">VoRDM ID:{{ state.data.vordmId }}</p>
|
||||
<p style="color: #aa4434;">Disaster time: {{ state.data.disasterTime }}</p>
|
||||
<p style="color: #878787; ">Disaster Country: {{ state.data.disasterCountry }}</p>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <span>{{ state.data.disasterId }}</span> -->
|
||||
<el-button @click="openStatus">View crawler status started</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="margin-top: 3%;">
|
||||
<span>Select time range</span>
|
||||
|
@ -112,13 +120,30 @@
|
|||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-dialog title="status" v-model="state.statusShow" width="420px">
|
||||
<el-table :data="state.statusData">
|
||||
<el-table-column prop="type" label="satellite type" width="180" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{showTitle(scope.row.type)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="status" width="180" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- 使用英语显示一下状态 0-未开始,1-正在爬取 2已完成 -->
|
||||
<el-tag v-if="scope.row.status == 0" style="width:140px ;">Service called</el-tag>
|
||||
<el-tag v-if="scope.row.status == 1" style="width:140px ;" type ="info">Service startup</el-tag>
|
||||
<el-tag v-if="scope.row.status == 2" style="width:140px ;" type ="success">Service finished</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Map from "/@/components/Map.vue";
|
||||
import { ref, reactive, watch, defineExpose, onMounted,defineEmits } from 'vue';
|
||||
import { rs, submit ,rs2 } from '/@/api/crawl/index';
|
||||
import { submit2 as submit ,rs2,getStatus } from '/@/api/crawl/index';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useVariableStore } from '/@/stores/index.ts';
|
||||
|
@ -132,6 +157,8 @@ const disabledDate = (time) => {
|
|||
// 初始化数据
|
||||
const map = ref()
|
||||
const state = reactive({
|
||||
statusData: [],
|
||||
statusShow: false,
|
||||
switch:true,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
|
@ -205,6 +232,14 @@ const state = reactive({
|
|||
data2:[],
|
||||
geometry: null,
|
||||
})
|
||||
//获取爬取卫星状态
|
||||
const openStatus = () => {
|
||||
getStatus(state.data.disasterId).then(res => {
|
||||
state.statusData = res;
|
||||
console.log(res,state.statusData)
|
||||
state.statusShow = true;
|
||||
})
|
||||
}
|
||||
//获取所有卫星类型
|
||||
onMounted(() => {
|
||||
BizDict({ code: 'satelliteType' }).then(res => {
|
||||
|
@ -224,7 +259,20 @@ onMounted(() => {
|
|||
}
|
||||
state.dictData = res;
|
||||
})
|
||||
//页面禁止刷新
|
||||
window.onbeforeunload = function () {
|
||||
return "Do you really want to leave this page?";
|
||||
}
|
||||
})
|
||||
const showTitle = (type) => {
|
||||
let title = '';
|
||||
state.dictData.forEach(item => {
|
||||
if (item.dictKey == type) {
|
||||
title = item.dictValue;
|
||||
}
|
||||
})
|
||||
return title;
|
||||
}
|
||||
|
||||
const onMapClick = (e) => {
|
||||
state.lat = e.latlng.lat.toFixed(3);
|
||||
|
|
Loading…
Reference in New Issue