zqq:0404版本

This commit is contained in:
qqGroup0 2023-04-04 13:57:33 +08:00
parent e51960aa51
commit 08a2c80743
3 changed files with 205 additions and 158 deletions

View File

@ -0,0 +1,8 @@
import request from '/@/utils/request';
export const getRemoteSensingSourceData = (param) => {
return request({
url: '/api/biz-vordm/remote-sensing-source-data/front/page/eq' + param,
method: 'get',
});
};

View File

@ -2,50 +2,52 @@ import request from '/@/utils/request';
import qs from 'qs'; import qs from 'qs';
export const getUserInfo = () => { export const getUserInfo = () => {
return request({ return request({
url: '/api/system-manager/user/info', url: '/api/system-manager/user/info',
method: 'get', method: 'get',
}) });
} };
export const resetPassword = (userIds) => { export const resetPassword = (userIds) => {
return request({ return request({
url: '/api/system-manager/user/reset-password', url: '/api/system-manager/user/reset-password',
method: 'post', method: 'post',
params: { params: {
userIds, userIds,
} },
}) });
} };
export const updatePassword = (oldPassword, newPassword, newPassword1) => { export const updatePassword = (oldPassword, newPassword, newPassword1) => {
return request({ return request({
url: '/api/system-manager/user/update-password', url: '/api/system-manager/user/update-password',
method: 'post', method: 'post',
params: { params: {
oldPassword, oldPassword,
newPassword, newPassword,
newPassword1, newPassword1,
} },
}) });
} };
export const getButtons = () => request({ export const getButtons = () =>
url: '/api/system-manager/menu/buttons', request({
method: 'get' url: '/api/system-manager/menu/buttons',
}); method: 'get',
});
export const refreshToken = (refresh_token, tenantId) => request({ export const refreshToken = (refresh_token, tenantId) =>
url: '/api/system-manager/oauth/token', request({
method: 'post', url: '/api/system-manager/oauth/token',
headers: { method: 'post',
'Tenant-Id': tenantId, headers: {
'Content-Type': 'application/x-www-form-urlencoded', 'Tenant-Id': tenantId,
}, 'Content-Type': 'application/x-www-form-urlencoded',
data: qs.stringify({ },
tenantId, data: qs.stringify({
refresh_token, tenantId,
grant_type: "refresh_token", refresh_token,
scope: "all", grant_type: 'refresh_token',
}) scope: 'all',
}); }),
});

View File

@ -131,111 +131,74 @@
<div class="system-user-search mb15"> <div class="system-user-search mb15">
<!-- 选择灾害类型下拉框 --> <!-- 选择灾害类型下拉框 -->
<el-select v-model="value_disastertype" <el-select v-model="state.value_disasterType"
size="default" size="default"
placeholder="Select disaster type"> placeholder="Select disaster type">
<el-option v-for="item in options_disastertype" <el-option v-for="item in state.options_disasterType"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" /> :value="item.value" />
</el-select> </el-select>
<!-- 选择灾害时间下拉框 --> <!-- 选择灾害时间下拉框 -->
<el-date-picker v-model="value_disastertime" <el-date-picker v-model="state.value_disasterTime"
type="date" type="date"
placeholder="Select disaster time" placeholder="Select disaster time"
class="ml10" class="ml10"
size="default" /> size="default" />
<!-- 选择受灾地 -->
<el-input v-model="state.value_disasterCountry"
style="width: 20%;margin-left: 1%;"
placeholder="请输入受灾地" />
<!-- 选择灾害事件下拉框 --> <!-- 选择灾害事件下拉框 -->
<el-select v-model="value_disasterevent" <!-- <el-select v-model="state.value_disasterEvent"
size="default" size="default"
placeholder="Select disaster event" placeholder="Select disaster event"
class="ml10"> class="ml10">
<el-option v-for="item in options_disasterevent" <el-option v-for="item in options_disasterEvent"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" /> :value="item.value" />
</el-select> </el-select> -->
<!-- 选择爬虫类型下拉框 -->
<el-select v-model="value_crawlertype"
size="default"
placeholder="Select crawler type"
class="ml10">
<el-option v-for="item in options_crawlertype"
:key="item.value"
:label="item.label"
:value="item.value" />
</el-select>
<!-- 选择爬虫状态下拉框 -->
<!-- <el-select v-model="value_crawlerstatus" size="default" placeholder="Select crawler status" class="ml10">
<el-option v-for="item in options_crawlerstatus" :key="item.value" :label="item.label" :value="item.value" />
</el-select> -->
<!-- <el-input v-model="state.tableData.param.search" size="default" placeholder="请输入角色名称" style="max-width: 180px"> </el-input> -->
<el-button size="default" <el-button size="default"
type="primary" type="primary"
class="ml10"> class="ml10"
@click="searchRemoteSensingSourceData">
<el-icon> <el-icon>
<ele-Search /> <ele-Search />
</el-icon> </el-icon>
Search Search
</el-button> </el-button>
<el-button size="default"
type="success"
class="ml10">
<el-icon>
<ele-Search />
</el-icon>
Start crawling
</el-button>
<el-button size="default"
type="warning"
class="ml10">
<el-icon>
<ele-Search />
</el-icon>
Stop crawling
</el-button>
<!-- <el-button size="default" type="success" class="ml10" @click="onOpenAddRole('add')">
<el-icon>
<ele-FolderAdd />
</el-icon>
新增角色
</el-button> -->
</div> </div>
<el-table :data="state.requestData"
<el-table :data="state.tableData.data"
v-loading="state.tableData.loading"
style="width: 100%"> style="width: 100%">
<el-table-column type="index" <el-table-column type="index"
label="ID" label="ID"
width="50" /> width="50"></el-table-column>
<el-table-column prop="userName" <el-table-column prop="satelliteCode"
label="User name" label="Satellite code"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Administrator" <el-table-column prop="productLevel"
label="Administrator" label="Product level"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Email" <el-table-column prop="productResolution"
label="Email" label="Product resolution(m)"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Organization" <el-table-column prop="cloudCover"
label="Organization" label="Cloud cover(%)"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Disaster type" <el-table-column prop="projectBandNum"
label="Disaster type" label="Project band num"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Disaster keyword" <el-table-column prop="sourceOrganization"
label="Disaster keyword" label="Source organization"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Affected country" <el-table-column prop="thumbnailLink"
label="Affected country" label="Thumbnail link"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Longitude" <!-- <el-table-column prop="Longitude"
label="Longitude" label="Longitude"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="Latitude" <el-table-column prop="Latitude"
@ -252,7 +215,7 @@
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="responseStatus" <el-table-column prop="responseStatus"
label="Response status" label="Response status"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column> <!-- <el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> --> <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> -->
@ -278,8 +241,8 @@
class="mt15" class="mt15"
:pager-count="5" :pager-count="5"
:page-sizes="[10, 20, 30]" :page-sizes="[10, 20, 30]"
v-model:current-page="state.tableData.param.pageNum"
background background
v-model:current-page="state.tableData.param.pageNum"
v-model:page-size="state.tableData.param.pageSize" v-model:page-size="state.tableData.param.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="state.tableData.total"> :total="state.tableData.total">
@ -290,8 +253,11 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive } from 'vue'; import { ref, reactive, onMounted, watch } from 'vue';
import Map from "/@/components/Map.vue"; import Map from "/@/components/Map.vue";
import { getRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/index.js";
import { time } from 'echarts';
// //
const sensor = ref([ const sensor = ref([
@ -435,9 +401,26 @@ const idOptions = [
}, },
] ]
// const state = reactive({
const options_disastertype = [ activeName: 'first',
{ startTime: '',
endTime: '',
addCoord: false,
satelliteSelected: [],
coordinateList: [],
selectID: '',
tableData: {
data: [],
total: 0,
loading: false,
param: {
search: '',
pageNum: 1,
pageSize: 10,
},
},
//
options_disasterType: [{
value: 'Earthquake', value: 'Earthquake',
label: 'Earthquake', label: 'Earthquake',
}, },
@ -460,52 +443,27 @@ const options_disastertype = [
{ {
value: 'Landslide', value: 'Landslide',
label: 'Landslide', label: 'Landslide',
}, }],
]; value_disasterType: '',
value_disasterTime: '',
// value_disasterCountry: '',
const options_crawlertype = [ requestData: [],
{
value: 'Bing',
label: 'Bing',
},
{
value: 'Twitter',
label: 'Twitter',
},
{
value: 'Baidu',
label: 'Baidu',
},
{
value: 'Weibo',
label: 'Weibo',
},
];
const state = reactive({
activeName: 'first',
startTime: '',
endTime: '',
addCoord: false,
satelliteSelected: [],
coordinateList: [],
selectID: '',
tableData: {
data: [],
total: 0,
loading: false,
param: {
search: '',
pageNum: 1,
pageSize: 10,
},
},
value_disastertype: '',
value_disastertime: '',
value_crawlertype: '',
}) })
//
const onHandleSizeChange = (val) => {
// searchContent.value = "";
state.tableData.param.pageSize = val;
// currentPage.value = currentPage.value;
};
//
const onHandleCurrentChange = (val) => {
// pageSize.value = pageSize.value;
state.tableData.param.pageNum = val;
// studentData(classID.value, courseID.value, currentPage.value, pageSize.value);
};
const shortcuts = [ const shortcuts = [
{ {
text: '1 month ago', text: '1 month ago',
@ -578,6 +536,85 @@ const ClearCondition = () => {
state.selectID = '' state.selectID = ''
} }
//
const searchRemoteSensingSourceData = () => {
let select = {
"type": state.value_disasterType,
"time": filterTime(state.value_disasterTime),
"country": state.value_disasterCountry,
"size": state.tableData.param.pageSize,
"current": state.tableData.param.pageNum
}
var requestParam = "";
for (var index = 0; index < Object.keys(select).length; index++) {
if (index == 0) {
requestParam += "?" + Object.keys(select)[index] + '=' + Object.values(select)[index]
}
else {
requestParam += '&' + Object.keys(select)[index] + '=' + Object.values(select)[index]
}
}
//
getRemoteSensingSourceData(requestParam).then(
(res) => {
let requestRes = JSON.parse(JSON.stringify(res.records))
for (let index = 0; index < requestRes.length; index++) {
state.requestData.push(requestRes[index])
}
state.tableData.total = JSON.parse(JSON.stringify(res.total))
state.tableData.param.pageNum = JSON.parse(JSON.stringify(res.current))
state.tableData.param.pageSize = JSON.parse(JSON.stringify(res.size))
})
}
//
const filterTime = (time) => {
var date = new Date(time);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? "0" + m : m;
var d = date.getDate();
d = d < 10 ? "0" + d : d;
var h = date.getHours();
h = h < 10 ? "0" + h : h;
var minute = date.getMinutes();
minute = minute < 10 ? "0" + minute : minute;
var s = date.getSeconds();
s = s < 10 ? "0" + s : s;
return y + "-" + m + "-" + d;
// return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + s;
}
//
onMounted(() => {
// var requestParam = "";
// for (var index = 0; index < Object.keys(select).length; index++) {
// if (index == 0) {
// requestParam += "?" + Object.keys(select)[index] + '=' + Object.values(select)[index]
// }
// else {
// requestParam += '&' + Object.keys(select)[index] + '=' + Object.values(select)[index]
// }
// }
// getRemoteSensingSourceData(requestParam).then(
// (res) => {
// let requestRes = JSON.parse(JSON.stringify(res.records))
// for (let index = 0; index < requestRes.length; index++) {
// state.requestData.push(requestRes[index])
// }
// })
})
// tab
watch(() => state.activeName, (newValue, oldValue) => {
console.log('监听到了')
},
{ immediate: true }
);
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">