提交代码
This commit is contained in:
parent
4c0daee6c6
commit
612335508b
|
@ -82,6 +82,22 @@ export const submit = (row) => {
|
||||||
data: 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) => {
|
export const getList = (current, size, param) => {
|
||||||
let params = {
|
let params = {
|
||||||
current,
|
current,
|
||||||
|
|
|
@ -6,10 +6,18 @@
|
||||||
|
|
||||||
<div class="rsSelect">
|
<div class="rsSelect">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<span>{{ state.data.disasterKeyword }}</span>
|
<el-row>
|
||||||
<p style="color: #878787; ">VoRDM ID:{{ state.data.vordmId }}</p>
|
<el-col :span="12">
|
||||||
<p style="color: #aa4434;">Disaster time: {{ state.data.disasterTime }}</p>
|
<span>{{ state.data.disasterKeyword }}</span>
|
||||||
<p style="color: #878787; ">Disaster Country: {{ state.data.disasterCountry }}</p>
|
<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>
|
||||||
<el-card class="box-card" style="margin-top: 3%;">
|
<el-card class="box-card" style="margin-top: 3%;">
|
||||||
<span>Select time range</span>
|
<span>Select time range</span>
|
||||||
|
@ -112,13 +120,30 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Map from "/@/components/Map.vue";
|
import Map from "/@/components/Map.vue";
|
||||||
import { ref, reactive, watch, defineExpose, onMounted,defineEmits } from '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 { useUserInfo } from '/@/stores/userInfo';
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { useVariableStore } from '/@/stores/index.ts';
|
import { useVariableStore } from '/@/stores/index.ts';
|
||||||
|
@ -132,6 +157,8 @@ const disabledDate = (time) => {
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
const map = ref()
|
const map = ref()
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
statusData: [],
|
||||||
|
statusShow: false,
|
||||||
switch:true,
|
switch:true,
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
|
@ -205,6 +232,14 @@ const state = reactive({
|
||||||
data2:[],
|
data2:[],
|
||||||
geometry: null,
|
geometry: null,
|
||||||
})
|
})
|
||||||
|
//获取爬取卫星状态
|
||||||
|
const openStatus = () => {
|
||||||
|
getStatus(state.data.disasterId).then(res => {
|
||||||
|
state.statusData = res;
|
||||||
|
console.log(res,state.statusData)
|
||||||
|
state.statusShow = true;
|
||||||
|
})
|
||||||
|
}
|
||||||
//获取所有卫星类型
|
//获取所有卫星类型
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
BizDict({ code: 'satelliteType' }).then(res => {
|
BizDict({ code: 'satelliteType' }).then(res => {
|
||||||
|
@ -224,7 +259,20 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
state.dictData = res;
|
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) => {
|
const onMapClick = (e) => {
|
||||||
state.lat = e.latlng.lat.toFixed(3);
|
state.lat = e.latlng.lat.toFixed(3);
|
||||||
|
|
Loading…
Reference in New Issue