Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin into zqq
This commit is contained in:
commit
4f37f7ba42
BIN
public/home.jpg
BIN
public/home.jpg
Binary file not shown.
Before Width: | Height: | Size: 384 KiB |
BIN
public/home.png
BIN
public/home.png
Binary file not shown.
Before Width: | Height: | Size: 2.2 MiB |
|
@ -24,3 +24,11 @@ export const review = (ids,status,type) => {
|
|||
}
|
||||
})
|
||||
}
|
||||
export const importTemplate = (data) => {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/news/importTemplate',
|
||||
headers:{'Content-Type': 'multipart/form-data'},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -29,3 +29,11 @@ export const getPagesRemoteSensingSourceData = (param) => {
|
|||
params: param,
|
||||
});
|
||||
};
|
||||
|
||||
export const approval = (data) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/remoteSensing/approval',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
|
@ -0,0 +1,50 @@
|
|||
import request from '/@/utils/request';
|
||||
import { moduleName } from '/@/utils/request';
|
||||
|
||||
export function websitesPage(current, size, params) {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/websites/websitesPage',
|
||||
method: 'get',
|
||||
params: {
|
||||
current,
|
||||
size,
|
||||
...params
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export function saveWebsites(data) {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/websites/saveWebsites',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export function updateWebsites(data) {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/websites/updateWebsites',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const delWebsites = (id) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/websites/remove',
|
||||
method: 'delete',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const getWebsitesById = (id) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/websites/getWebsitesById',
|
||||
method: 'get',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
});
|
||||
};
|
|
@ -7,7 +7,7 @@
|
|||
@command="onComponentSizeChange">
|
||||
<div class="layout-navbars-breadcrumb-user-icon">
|
||||
<i class="iconfont icon-ziti"
|
||||
title="组件大小"></i>
|
||||
title="component size"></i>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
|
|
|
@ -52,11 +52,11 @@ const emit = defineEmits(['currentContextmenuClick']);
|
|||
const state = reactive({
|
||||
isShow: false,
|
||||
dropdownList: [
|
||||
{ contextMenuClickId: 0, txt: '刷新', affix: false, icon: 'ele-RefreshRight' },
|
||||
{ contextMenuClickId: 1, txt: '关闭', affix: false, icon: 'ele-Close' },
|
||||
{ contextMenuClickId: 2, txt: '关闭其它', affix: false, icon: 'ele-CircleClose' },
|
||||
{ contextMenuClickId: 3, txt: '全部关闭', affix: false, icon: 'ele-FolderDelete' },
|
||||
{ contextMenuClickId: 4, txt: '当前页全屏', affix: false, icon: 'iconfont icon-fullscreen' },
|
||||
{ contextMenuClickId: 0, txt: 'Refresh', affix: false, icon: 'ele-RefreshRight' },
|
||||
{ contextMenuClickId: 1, txt: 'Close', affix: false, icon: 'ele-Close' },
|
||||
{ contextMenuClickId: 2, txt: 'Close other', affix: false, icon: 'ele-CircleClose' },
|
||||
{ contextMenuClickId: 3, txt: 'Close all', affix: false, icon: 'ele-FolderDelete' },
|
||||
{ contextMenuClickId: 4, txt: 'The current page full screen', affix: false, icon: 'iconfont icon-fullscreen' },
|
||||
],
|
||||
item: {},
|
||||
arrowLeft: 10,
|
||||
|
|
|
@ -50,7 +50,7 @@ export const dynamicRoutes = [
|
|||
component: () => import('/@/views/responseManagement/index.vue'),
|
||||
redirect: '/responseManagement/userResponse',
|
||||
meta: {
|
||||
title: 'Response management',
|
||||
title: 'Response',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -66,13 +66,13 @@ export const dynamicRoutes = [
|
|||
name: 'userResponseManagement',
|
||||
component: () => import('/@/views/responseManagement/userResponse/index.vue'),
|
||||
meta: {
|
||||
title: 'User response management',
|
||||
title: 'User response',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
roles: ['admin'],
|
||||
icon: 'ele-FolderChecked',
|
||||
zh: '用户响应管理',
|
||||
},
|
||||
|
@ -82,7 +82,7 @@ export const dynamicRoutes = [
|
|||
name: 'data-upload-management',
|
||||
component: () => import('/@/views/responseManagement/dataUpload/index.vue'),
|
||||
meta: {
|
||||
title: 'Data upload management',
|
||||
title: 'Data upload',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -98,13 +98,13 @@ export const dynamicRoutes = [
|
|||
name: 'tool-management',
|
||||
component: () => import('/@/views/responseManagement/tool/index.vue'),
|
||||
meta: {
|
||||
title: 'Tool Management',
|
||||
title: 'Tool',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
roles: ['admin'],
|
||||
icon: 'ele-Tools',
|
||||
zh: 'tool管理',
|
||||
},
|
||||
|
@ -114,13 +114,13 @@ export const dynamicRoutes = [
|
|||
name: 'contact-management',
|
||||
component: () => import('/@/views/responseManagement/contact/index.vue'),
|
||||
meta: {
|
||||
title: 'Contact Management',
|
||||
title: 'Contact',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
roles: ['admin'],
|
||||
icon: 'ele-Cellphone',
|
||||
zh: 'tool管理',
|
||||
},
|
||||
|
@ -149,7 +149,7 @@ export const dynamicRoutes = [
|
|||
name: 'multimediaData',
|
||||
component: () => import('/@/views/dataService/multimediaData/index.vue'),
|
||||
meta: {
|
||||
title: 'Multimedia data service',
|
||||
title: 'Multimedia data',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -165,7 +165,7 @@ export const dynamicRoutes = [
|
|||
name: 'remoteSensingData',
|
||||
component: () => import('/@/views/dataService/remoteSensingData/index.vue'),
|
||||
meta: {
|
||||
title: 'Remote sensing data service',
|
||||
title: 'Remote sensing data',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -181,7 +181,7 @@ export const dynamicRoutes = [
|
|||
name: 'otherData',
|
||||
component: () => import('/@/views/dataService/otherData/index.vue'),
|
||||
meta: {
|
||||
title: 'Other data service',
|
||||
title: 'Other data',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -197,7 +197,7 @@ export const dynamicRoutes = [
|
|||
name: 'visualData',
|
||||
component: () => import('/@/views/dataService/visualData/index.vue'),
|
||||
meta: {
|
||||
title: 'Visual data service',
|
||||
title: 'Visual data',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -213,7 +213,7 @@ export const dynamicRoutes = [
|
|||
name: 'pictureInfo',
|
||||
component: () => import('/@/views/dataService/pictureInfo/index.vue'),
|
||||
meta: {
|
||||
title: 'Picture info service',
|
||||
title: 'Picture info',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -224,6 +224,22 @@ export const dynamicRoutes = [
|
|||
zh: '其他数据服务',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/dataService/disasterPartners',
|
||||
name: 'disasterPartners',
|
||||
component: () => import('/@/views/dataService/disasterPartners/index.vue'),
|
||||
meta: {
|
||||
title: 'Disaster Website',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'ele-Star',
|
||||
zh: '遥感数据',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -248,7 +264,7 @@ export const dynamicRoutes = [
|
|||
name: 'chief-administrator-management',
|
||||
component: () => import('/@/views/systemManagement/chiefAdministrator/index.vue'),
|
||||
meta: {
|
||||
title: 'Chief Administrator management',
|
||||
title: 'Chief Administrator',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -264,7 +280,7 @@ export const dynamicRoutes = [
|
|||
name: 'administratorManagement',
|
||||
component: () => import('/@/views/systemManagement/administrator/index.vue'),
|
||||
meta: {
|
||||
title: 'Administrator management',
|
||||
title: 'Administrator',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
@ -280,7 +296,7 @@ export const dynamicRoutes = [
|
|||
name: 'systemDic',
|
||||
component: () => import('/@/views/system/dic/index.vue'),
|
||||
meta: {
|
||||
title: 'Dictionary management',
|
||||
title: 'Dictionary',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
|
|
@ -131,7 +131,7 @@ body,
|
|||
}
|
||||
// pc端左侧导航样式
|
||||
.layout-aside-pc-220 {
|
||||
width: 220px !important;
|
||||
width: 250px !important;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
.layout-aside-pc-64 {
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
// 默认样式修改
|
||||
.el-menu {
|
||||
border-right: none !important;
|
||||
width: 220px;
|
||||
width: 250px;
|
||||
}
|
||||
.el-menu-item {
|
||||
height: 56px !important;
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
<template>
|
||||
<el-dialog title="edit" v-model="state.isShowDialog" width="550px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item prop="title" label="name">
|
||||
<el-select v-model="state.ruleForm.title" class="m-2" placeholder="please enter name">
|
||||
<el-option label="GDACS" value="GDACS"></el-option>
|
||||
<el-option label="Charter" value="Charter"></el-option>
|
||||
<el-option label="USGS" value="USGS"></el-option>
|
||||
<el-option label="INGV" value="INGV"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="link" label="link">
|
||||
<el-input v-model="state.ruleForm.link" class="m-2" placeholder="please enter link" :rows="3" type="text"
|
||||
style="width:220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="websiteId" label="websiteid">
|
||||
<el-input v-model="state.ruleForm.websiteId" class="m-2" placeholder="please enter websiteid" :rows="3" type="text"
|
||||
style="width:220px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { getWebsitesById, updateWebsites } from '/@/api/websites/websites.js';
|
||||
import { ElMessage } from "element-plus";
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
isShowDialog: false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
title: null,
|
||||
},
|
||||
})
|
||||
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
title: [
|
||||
{ required: true, message: 'please enter name', trigger: 'change' }
|
||||
],
|
||||
link: [
|
||||
{ required: true, message: 'please enter link', trigger: 'blur' }
|
||||
],
|
||||
websiteId: [
|
||||
{ required: true, message: 'please enter websiteid', trigger: 'blur' }
|
||||
],
|
||||
})
|
||||
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
adminAddFormRef.value.resetFields();
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
state.isShowDialog = true;
|
||||
state.ruleForm.id = row.id;
|
||||
getWebsitesById(row.id).then(da=>{
|
||||
state.ruleForm.title = da.title;
|
||||
state.ruleForm.link = da.link;
|
||||
state.ruleForm.websiteId = da.websiteId;
|
||||
})
|
||||
};
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
state.isShowDialog = false;
|
||||
resetField();
|
||||
};
|
||||
// 取消
|
||||
const onCancel = () => {
|
||||
closeDialog();
|
||||
};
|
||||
// 新增
|
||||
const onSubmit = () => {
|
||||
adminAddFormRef.value.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
state.isLoading = true;
|
||||
updateWebsites(state.ruleForm).then(da => {
|
||||
ElMessage.success("success");
|
||||
emit('callback');
|
||||
}).finally(() => {
|
||||
state.isLoading = false;
|
||||
})
|
||||
closeDialog();
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-dialog title="upload" v-model="state.isShowDialog" width="550px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item prop="title" label="name">
|
||||
<el-select v-model="state.ruleForm.title" class="m-2" placeholder="please enter name">
|
||||
<el-option label="GDACS" value="GDACS"></el-option>
|
||||
<el-option label="Charter" value="Charter"></el-option>
|
||||
<el-option label="USGS" value="USGS"></el-option>
|
||||
<el-option label="INGV" value="INGV"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="link" label="link">
|
||||
<el-input v-model="state.ruleForm.link" class="m-2" placeholder="please enter link" :rows="3" type="text"
|
||||
style="width:220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="websiteId" label="websiteid">
|
||||
<el-input v-model="state.ruleForm.websiteId" class="m-2" placeholder="please enter websiteid" :rows="3" type="text"
|
||||
style="width:220px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { saveWebsites } from '/@/api/websites/websites.js';
|
||||
import { ElMessage } from "element-plus";
|
||||
const upFileRef = ref();
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
isShowDialog: false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
title: null,
|
||||
},
|
||||
})
|
||||
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
title: [
|
||||
{ required: true, message: 'please enter name', trigger: 'change' }
|
||||
],
|
||||
link: [
|
||||
{ required: true, message: 'please enter link', trigger: 'blur' }
|
||||
],
|
||||
websiteId: [
|
||||
{ required: true, message: 'please enter websiteid', trigger: 'blur' }
|
||||
],
|
||||
})
|
||||
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
adminAddFormRef.value.resetFields();
|
||||
state.fileArray = [];
|
||||
upFileRef.value.clearFiles();
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
state.isShowDialog = true;
|
||||
state.ruleForm.disasterId = row;
|
||||
};
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
state.isShowDialog = false;
|
||||
resetField();
|
||||
};
|
||||
// 取消
|
||||
const onCancel = () => {
|
||||
closeDialog();
|
||||
};
|
||||
// 新增
|
||||
const onSubmit = () => {
|
||||
adminAddFormRef.value.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
state.isLoading = true;
|
||||
saveWebsites(state.ruleForm).then(da => {
|
||||
ElMessage.success("success");
|
||||
emit('callback');
|
||||
}).finally(() => {
|
||||
state.isLoading = false;
|
||||
})
|
||||
closeDialog();
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,280 @@
|
|||
<template>
|
||||
<div class="system-role-container layout-padding">
|
||||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-button size="default" type="success" class="ml10" @click="uploadData">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
Upload
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||
<el-icon>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
Batch delete
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="title" label="Name" width="120" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ formatName(scope.row.title) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="link" label="Link" width="450" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="editData(scope.row)">Edit</el-button>
|
||||
<el-button size="small" text type="primary" @click="del(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-config-provider>
|
||||
<Upload ref="uploadRef" @callback="getTableData" />
|
||||
<EditPicture ref="editUploadRef" @callback="getTableData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="systemRole">
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
import Upload from './component/upload.vue';
|
||||
import EditPicture from './component/editPicture.vue';
|
||||
import { getDisasterPage } from '/@/api/data/pictureInfo.js';
|
||||
import { websitesPage, delWebsites } from '/@/api/websites/websites.js';
|
||||
import en from 'element-plus/dist/locale/en.mjs';
|
||||
const activeName = ref('first');
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
// 引入组件
|
||||
const auditRef = ref();
|
||||
const uploadRef = ref();
|
||||
const editUploadRef = ref();
|
||||
// 定义变量内容
|
||||
const state = reactive({
|
||||
multipleSelection: [],
|
||||
tabVal: 'first',
|
||||
disasterId: null,
|
||||
disasterData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
param: {
|
||||
search: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
},
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
param: {
|
||||
search: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
},
|
||||
});
|
||||
const handleSelectionChange = (val) => {
|
||||
state.multipleSelection = val;
|
||||
};
|
||||
//格式化图片名称
|
||||
const formatName = (name) => {
|
||||
return name;
|
||||
};
|
||||
const auditData = (row) => {
|
||||
let id = row.id;
|
||||
auditRef.value.openDialog([{ id: id }]);
|
||||
};
|
||||
//格式化字节
|
||||
const formatSize = (size) => {
|
||||
var data = '';
|
||||
if (size < 0.1 * 1024) {
|
||||
//如果小于0.1KB转化成B
|
||||
data = size.toFixed(2) + 'B';
|
||||
} else if (size < 0.1 * 1024 * 1024) {
|
||||
//如果小于0.1MB转化成KB
|
||||
data = (size / 1024).toFixed(2) + 'KB';
|
||||
} else if (size < 0.1 * 1024 * 1024 * 1024) {
|
||||
//如果小于0.1GB转化成MB
|
||||
data = (size / (1024 * 1024)).toFixed(2) + 'MB';
|
||||
} else {
|
||||
//其他转化成GB
|
||||
data = (size / (1024 * 1024 * 1024)).toFixed(2) + 'GB';
|
||||
}
|
||||
var sizestr = data + '';
|
||||
var len = sizestr.indexOf('.');
|
||||
var dec = sizestr.substr(len + 1, 2);
|
||||
if (dec == '00') {
|
||||
//当小数点后为00时 去掉小数部分
|
||||
return sizestr.substring(0, len) + sizestr.substr(len + 3, 2);
|
||||
}
|
||||
return sizestr;
|
||||
};
|
||||
const formatSizeUnits = (size) => {
|
||||
if (size === 0 || size === -1) return '0 B';
|
||||
var k = 1000, // or 1024
|
||||
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
||||
i = Math.floor(Math.log(size) / Math.log(k));
|
||||
|
||||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
};
|
||||
//灾害表格点击事件
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
};
|
||||
// 初始化灾害表格数据
|
||||
const getDisasterData = () => {
|
||||
state.disasterData.loading = true;
|
||||
getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then((res) => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
item.disasterTime = date;
|
||||
})
|
||||
state.disasterData.total = res.total;
|
||||
state.disasterData.loading = false;
|
||||
});
|
||||
};
|
||||
|
||||
// 初始化表格数据
|
||||
const getTableData = () => {
|
||||
state.tableData.loading = true;
|
||||
|
||||
websitesPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { disasterId: state.disasterId}).then(
|
||||
(res) => {
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.total = res.total;
|
||||
}
|
||||
);
|
||||
setTimeout(() => {
|
||||
state.tableData.loading = false;
|
||||
}, 500);
|
||||
};
|
||||
// 打开上传弹窗
|
||||
const uploadData = () => {
|
||||
if (state.disasterId == null) {
|
||||
ElMessage.warning('Please select the disaster first');
|
||||
return false;
|
||||
}
|
||||
uploadRef.value.openDialog(state.disasterId);
|
||||
};
|
||||
// 打开修改角色弹窗
|
||||
const editData = (row) => {
|
||||
editUploadRef.value.openDialog(row);
|
||||
};
|
||||
//批量删除图片数据
|
||||
const batchDel = () => {
|
||||
if (state.multipleSelection.length == 0) {
|
||||
ElMessage.warning('Select the data to be operated first');
|
||||
return false;
|
||||
}
|
||||
ElMessageBox.confirm(`This action batch deletes the data,Whether to continue?`, 'tip', {
|
||||
confirmButtonText: 'confirm',
|
||||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
let id = state.multipleSelection.map((item) => item.id);
|
||||
delWebsites(id.join()).then((res) => {
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
// 删除图片信息
|
||||
const del = (row) => {
|
||||
ElMessageBox.confirm(`This action will delete the picture:“${row.title}”,,Whether to continue?`, 'tip', {
|
||||
confirmButtonText: 'confirm',
|
||||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
delWebsites(row.id).then((res) => {
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleDisasterSizeChange = (val) => {
|
||||
state.disasterData.param.pageSize = val;
|
||||
getDisasterData();
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleDisasterCurrentChange = (val) => {
|
||||
state.disasterData.param.pageNum = val;
|
||||
getDisasterData();
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleSizeChange = (val) => {
|
||||
state.tableData.param.pageSize = val;
|
||||
getTableData();
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleCurrentChange = (val) => {
|
||||
state.tableData.param.pageNum = val;
|
||||
getTableData();
|
||||
};
|
||||
// 页面加载时
|
||||
onMounted(() => {
|
||||
getDisasterData();
|
||||
//getTableData();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.demo-tabs>.el-tabs__content {
|
||||
padding: 32px;
|
||||
color: #6b778c;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.system-role-container {
|
||||
.system-role-padding {
|
||||
padding: 15px;
|
||||
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.demo-tabs>.el-tabs__content {
|
||||
padding: 32px;
|
||||
color: #6b778c;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
|
@ -5,191 +5,226 @@
|
|||
<el-image style="height:40px ; width:100px!" src="/baidu.jpg"></el-image>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="Confirm keywords" style="text-align:center;">
|
||||
<el-form-item label="Confirm keywords" style="text-align:center;">
|
||||
<el-input v-model="state.baidu.keywords">
|
||||
</el-input>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="page" style="text-align:center ; margin-left: 10px;">
|
||||
<el-input v-model="state.baidu.page" type="number" style="width: 70px ;"></el-input>
|
||||
<el-form-item label="page" style="text-align:center ; margin-left: 10px;">
|
||||
<el-input v-model="state.baidu.page" type="number" style="width: 70px ;"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" style="text-align:center ;">
|
||||
<el-icon :size="40" style="cursor:pointer ;" :title="state.baidu.status==0?'Waiting in queue……':'start'" :color="state.baidu.status==0?'#4f4':'blue'" @click="state.baidu.status==0?confirmBox('baidu'):start('baidu')" v-if="state.baiduOption.buttonIs&&(state.baidu.status==0||!state.baidu.status)">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z"></path></svg>
|
||||
<el-icon :size="40" style="cursor:pointer ;" :title="state.baidu.status == 0 ? 'Waiting in queue……' : 'start'"
|
||||
:color="state.baidu.status == 0 ? '#4f4' : 'blue'"
|
||||
@click="state.baidu.status == 0 ? confirmBox('baidu') : start('baidu')"
|
||||
v-if="state.baiduOption.buttonIs && (state.baidu.status == 0 || !state.baidu.status)">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||
<path fill="currentColor"
|
||||
d="m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z">
|
||||
</path>
|
||||
</svg>
|
||||
</el-icon>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="Data collection in progress, please wait……" color="#131313" v-if="state.baiduOption.buttonIs&&state.baidu.status==1">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="Data collection in progress, please wait……"
|
||||
color="#131313" v-if="state.baiduOption.buttonIs && state.baidu.status == 1">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||
<path fill="currentColor"
|
||||
d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z">
|
||||
</path>
|
||||
</svg>
|
||||
</el-icon>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="once more start" color="#4f4" @click="start('baidu')" v-if="state.baiduOption.buttonIs&&state.baidu.status==2">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"></path></svg>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="once more start" color="#4f4" @click="start('baidu')"
|
||||
v-if="state.baiduOption.buttonIs && state.baidu.status == 2">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||
<path fill="currentColor"
|
||||
d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z">
|
||||
</path>
|
||||
</svg>
|
||||
</el-icon>
|
||||
|
||||
<span v-if="!state.baiduOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.baiduOption.runTitle }}</span>
|
||||
<span v-if="!state.baiduOption.buttonIs" style="height: 40; line-height: 40px;">{{
|
||||
state.baiduOption.runTitle }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="3" style="text-align:center ;">
|
||||
<el-image style="height:40px ; width:100px!" src="/bing.webp"></el-image>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="Confirm keywords" style="text-align:center ;">
|
||||
<el-input v-model="state.bing.keywords"></el-input>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="Confirm keywords" style="text-align:center ;">
|
||||
<el-input v-model="state.bing.keywords"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" >
|
||||
<el-col :span="3">
|
||||
<el-form-item label="page" style="text-align:center; margin-left: 10px;">
|
||||
<el-input v-model="state.bing.page" type="number" style="width: 70px ;"></el-input>
|
||||
<el-input v-model="state.bing.page" type="number" style="width: 70px ;"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" style="text-align:center ;">
|
||||
<el-icon :size="40" style="cursor:pointer ;" :title="state.bing.status==0?'Waiting in queue……':'start'" :color="state.bing.status==0?'#4f4':'blue'" @click="state.bing.status==0?confirmBox('bing'):start('bing')" v-if="state.bingOption.buttonIs&&(state.bing.status==0||!state.bing.status)">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z"></path></svg>
|
||||
<el-icon :size="40" style="cursor:pointer ;" :title="state.bing.status == 0 ? 'Waiting in queue……' : 'start'"
|
||||
:color="state.bing.status == 0 ? '#4f4' : 'blue'"
|
||||
@click="state.bing.status == 0 ? confirmBox('bing') : start('bing')"
|
||||
v-if="state.bingOption.buttonIs && (state.bing.status == 0 || !state.bing.status)">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||
<path fill="currentColor"
|
||||
d="m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z">
|
||||
</path>
|
||||
</svg>
|
||||
</el-icon>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="Data collection in progress, please wait……" color="#131313" v-if="state.buttonIs&&state.bing.status==1">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="Data collection in progress, please wait……"
|
||||
color="#131313" v-if="state.buttonIs && state.bing.status == 1">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||
<path fill="currentColor"
|
||||
d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z">
|
||||
</path>
|
||||
</svg>
|
||||
</el-icon>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="once more start" color="#4f4" @click="start('bing')" v-if="state.bingOption.buttonIs&&state.bing.status==2">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"></path></svg>
|
||||
<el-icon :size="40" style="cursor:pointer ;" title="once more start" color="#4f4" @click="start('bing')"
|
||||
v-if="state.bingOption.buttonIs && state.bing.status == 2">
|
||||
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728="">
|
||||
<path fill="currentColor"
|
||||
d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z">
|
||||
</path>
|
||||
</svg>
|
||||
</el-icon>
|
||||
|
||||
<span v-if="!state.bingOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.bingOption.runTitle }}</span>
|
||||
<span v-if="!state.bingOption.buttonIs" style="height: 40; line-height: 40px;">{{ state.bingOption.runTitle
|
||||
}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="state.isShowDialog=false" size="default">close</el-button>
|
||||
<el-button @click="state.isShowDialog = false" size="default">close</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup >
|
||||
import { ElMessage,ElMessageBox} from 'element-plus';
|
||||
import {reactive,defineExpose} from 'vue';
|
||||
import {news,submit,getList} from '/@/api/crawl/index';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { reactive, defineExpose } from 'vue';
|
||||
import { news, submit, getList } from '/@/api/crawl/index';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
const userInfo = useUserInfo();
|
||||
const state = reactive({
|
||||
isShowDialog:false,
|
||||
data:{},
|
||||
table:[],
|
||||
baidu:{
|
||||
keywords:"",
|
||||
page:5,
|
||||
disaster_id:undefined
|
||||
isShowDialog: false,
|
||||
data: {},
|
||||
table: [],
|
||||
baidu: {
|
||||
keywords: "",
|
||||
page: 5,
|
||||
disaster_id: undefined
|
||||
},
|
||||
bing:{
|
||||
keywords:"",
|
||||
page:10,
|
||||
disaster_id:undefined
|
||||
bing: {
|
||||
keywords: "",
|
||||
page: 10,
|
||||
disaster_id: undefined
|
||||
},
|
||||
baiduOption:{
|
||||
buttonIs:true,
|
||||
runTitle:""
|
||||
baiduOption: {
|
||||
buttonIs: true,
|
||||
runTitle: ""
|
||||
},
|
||||
bingOption:{
|
||||
buttonIs:true,
|
||||
runTitle:""
|
||||
bingOption: {
|
||||
buttonIs: true,
|
||||
runTitle: ""
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
const confirmBox = (text)=>{
|
||||
const confirmBox = (text) => {
|
||||
ElMessageBox.confirm(
|
||||
'Already in queue, continue to start?',
|
||||
'Warning',
|
||||
{
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
start(text)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: 'restart success',
|
||||
'Already in queue, continue to start?',
|
||||
'Warning',
|
||||
{
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
start(text)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: 'restart success',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: 'Cancel restart',
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: 'Cancel restart',
|
||||
})
|
||||
})
|
||||
}
|
||||
const openDialog = (row) => {
|
||||
state.baidu={};
|
||||
state.bing={};
|
||||
state.baidu = {};
|
||||
state.bing = {};
|
||||
state.data = row;
|
||||
state.baidu.keywords = row.disasterKeyword;
|
||||
state.baidu.disaster_id = row.id
|
||||
state.bing.keywords=row.disasterKeyword;
|
||||
state.bing.disaster_id = row.id
|
||||
state.baidu.disaster_id = row.disasterId
|
||||
state.bing.keywords = row.disasterKeyword;
|
||||
state.bing.disaster_id = row.disasterId
|
||||
getDate();
|
||||
state.isShowDialog = true;
|
||||
}
|
||||
const getDate = ()=>{
|
||||
getList(1,10,{disasterId:state.data.id}).then(res=>{
|
||||
const getDate = () => {
|
||||
getList(1, 10, { disasterId: state.data.disasterId }).then(res => {
|
||||
let data = res.records;
|
||||
for (let index = 0; index < data.length; index++) {
|
||||
const element = data[index];
|
||||
if(element.type == 2){
|
||||
if (element.type == 2) {
|
||||
state.baidu = element;
|
||||
}
|
||||
if(element.type == 1){
|
||||
if (element.type == 1) {
|
||||
state.bing = element;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
state.baidu.page=10;
|
||||
state.bing.page=10;
|
||||
state.baidu.page = 10;
|
||||
state.bing.page = 10;
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
const start = (text)=>{
|
||||
state.baiduOption.runTitle="start(5s)";
|
||||
const start = (text) => {
|
||||
state.baiduOption.runTitle = "start(5s)";
|
||||
let count = 4;
|
||||
const countdown = setInterval(function() {
|
||||
if(text=='baidu'){
|
||||
state.baiduOption.runTitle="start("+count+"s)";
|
||||
}else{
|
||||
state.bingOption.runTitle="start("+count+"s)";
|
||||
const countdown = setInterval(function () {
|
||||
if (text == 'baidu') {
|
||||
state.baiduOption.runTitle = "start(" + count + "s)";
|
||||
} else {
|
||||
state.bingOption.runTitle = "start(" + count + "s)";
|
||||
}
|
||||
|
||||
|
||||
count -= 1;
|
||||
if (count < 0) {
|
||||
if(text=='baidu'){
|
||||
state.baiduOption.buttonIs= true ;
|
||||
}else{
|
||||
state.bingOption.buttonIs= true ;
|
||||
if (count < 0) {
|
||||
if (text == 'baidu') {
|
||||
state.baiduOption.buttonIs = true;
|
||||
} else {
|
||||
state.bingOption.buttonIs = true;
|
||||
}
|
||||
clearInterval(countdown);
|
||||
console.log('倒计时结束');
|
||||
}
|
||||
}, 1000);
|
||||
let keywords = (text=='baidu'?state.baidu.keywords:state.bing.keywords);
|
||||
let page = (text=='baidu'?state.baidu.page:state.bing.page);
|
||||
let id = (text=='baidu'?state.baidu.id:state.bing.id);
|
||||
let keywords = (text == 'baidu' ? state.baidu.keywords : state.bing.keywords);
|
||||
let page = (text == 'baidu' ? state.baidu.page : state.bing.page);
|
||||
let id = (text == 'baidu' ? state.baidu.id : state.bing.id);
|
||||
submit(
|
||||
{
|
||||
type:text=='baidu'?2:1,
|
||||
manageId:userInfo.userInfos.id,
|
||||
status:0,
|
||||
disasterId:state.data.id,
|
||||
keywords:keywords,
|
||||
id:(id?id:null)
|
||||
type: text == 'baidu' ? 2 : 1,
|
||||
manageId: userInfo.userInfos.id,
|
||||
status: 0,
|
||||
disasterId: state.data.disasterId,
|
||||
keywords: keywords,
|
||||
id: (id ? id : null)
|
||||
}
|
||||
).then(ret=>{
|
||||
if(ret == 1042){
|
||||
).then(ret => {
|
||||
if (ret == 1042) {
|
||||
ElMessage.error("error")
|
||||
}else{
|
||||
news(ret.disasterId, keywords, page,(text=="baidu"),ret.id).then(res=>{
|
||||
} else {
|
||||
news(ret.disasterId, keywords, page, (text == "baidu"), ret.id).then(res => {
|
||||
getData();
|
||||
ElMessage.success("success")
|
||||
})
|
||||
ElMessage.success("Data is being acquired!")
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -198,9 +233,6 @@ defineExpose({
|
|||
})
|
||||
|
||||
</script>
|
||||
<style >
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style >.inline-block {
|
||||
display: inline-block;
|
||||
}</style>
|
|
@ -0,0 +1,104 @@
|
|||
<template>
|
||||
<el-dialog title="upload" v-model="state.isShowDialog" width="550px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item label="file:" style="margin-top: 30px;">
|
||||
<el-upload ref="upFileRef" class="upload-demo" :accept="'.xls,.xlsx'" :file-list="state.fileData" :auto-upload="false" :on-change="handleChange">
|
||||
<template #trigger>
|
||||
<el-button type="primary">select file</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="title" label="type:" style="margin-top: 30px;">
|
||||
<el-select v-model="state.ruleForm.title" class="m-2" placeholder="please enter name">
|
||||
<el-option label="bing" value="1"></el-option>
|
||||
<el-option label="baidu" value="0"></el-option>
|
||||
<el-option label="twitter" value="2"></el-option>
|
||||
<el-option label="weibo" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="uploadHandler()" size="default"
|
||||
:loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { importTemplate } from '/@/api/news/index.js';
|
||||
import { ElMessage } from "element-plus";
|
||||
const upFileRef = ref();
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
fileList: [],
|
||||
isShowDialog: false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
title: null,
|
||||
},
|
||||
})
|
||||
//通过onchanne触发方法获得文件列表
|
||||
const handleChange = (file, fileList) => {
|
||||
state.fileList = fileList;
|
||||
console.log(state.fileList)
|
||||
};
|
||||
|
||||
//上传处理
|
||||
const uploadHandler = () => {
|
||||
const form = new FormData();
|
||||
form.append("fileData", state.fileList[0].raw);
|
||||
form.append("type", state.ruleForm.title);
|
||||
form.append("disasterId", state.ruleForm.disasterId);
|
||||
state.isLoading = true;
|
||||
importTemplate(form).then(da => {
|
||||
ElMessage.success("success");
|
||||
emit('callback');
|
||||
}).finally(() => {
|
||||
state.isLoading = false;
|
||||
})
|
||||
closeDialog();
|
||||
};
|
||||
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
title: [
|
||||
{ required: true, message: 'please enter type', trigger: 'change' }
|
||||
],
|
||||
})
|
||||
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
adminAddFormRef.value.resetFields();
|
||||
state.fileArray = [];
|
||||
upFileRef.value.clearFiles();
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
state.isShowDialog = true;
|
||||
state.ruleForm.disasterId = row;
|
||||
};
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
state.isShowDialog = false;
|
||||
resetField();
|
||||
};
|
||||
// 取消
|
||||
const onCancel = () => {
|
||||
closeDialog();
|
||||
};
|
||||
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<div class="system-user-search "
|
||||
style="display: flex;margin-left: 10px;margin-top: 10px;margin-bottom:-15px ">
|
||||
<el-form-item label="Type">
|
||||
|
@ -44,12 +44,21 @@
|
|||
Search
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button size="default" type="success" class="ml10" @click="openDialog">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
Batch operation
|
||||
</el-button>
|
||||
<div>
|
||||
<el-button size="default" type="success" class="ml10" @click="openDialog">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
Batch operation
|
||||
</el-button>
|
||||
<el-button size="default" type="success" class="ml10" @click="OpenuploadDataRef()">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</el-icon>
|
||||
Upload
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%; height: 600px;">
|
||||
<el-table-column type="selection" width="55" />
|
||||
|
@ -107,33 +116,28 @@
|
|||
</el-dialog>
|
||||
</el-config-provider>
|
||||
<boot ref="bootRef" @callback="getTableData" />
|
||||
<uploadData ref="uploadDataRef" @callback="getTableData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="dataMultimediaData">
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
import { getOtherDataPage, getDisasterPage, deleteData } from '/@/api/data/otherData.js'
|
||||
import { getList } from '/@/api/disasterInfo/index';
|
||||
import { getList as getNewsList, review } from '/@/api/news/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
import boot from "./component/boot.vue";
|
||||
import uploadData from "./component/uploadData.vue";
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
// 引入组件
|
||||
const auditRef = ref();
|
||||
const bootRef = ref();
|
||||
const uploadDataRef = ref();
|
||||
|
||||
|
||||
// 定义变量内容
|
||||
const roleDialogRef = ref();
|
||||
|
||||
const getValue = (key) => {
|
||||
//返回state.disasterTypeLis 对应的value
|
||||
return state.disasterTypeList.find((item) => item.dictKey === key)?.dictValue;
|
||||
};
|
||||
const state = reactive({
|
||||
dialogVisible: false,
|
||||
multipleSelection: [],
|
||||
|
@ -167,6 +171,7 @@ const state = reactive({
|
|||
},
|
||||
selectList: [],
|
||||
});
|
||||
|
||||
const openDialog = async (row, bool) => {
|
||||
if (bool) {
|
||||
state.selectList = [row]
|
||||
|
@ -175,6 +180,7 @@ const openDialog = async (row, bool) => {
|
|||
}
|
||||
state.dialogVisible = true;
|
||||
};
|
||||
|
||||
const reviews = async (status) => {
|
||||
let ids = state.selectList.map((item) => item.id);
|
||||
//将ids 转为字符串 使用逗号分隔
|
||||
|
@ -186,41 +192,11 @@ const reviews = async (status) => {
|
|||
getTableData();
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectionChange = (val) => {
|
||||
state.multipleSelection = val
|
||||
}
|
||||
const auditData = (row) => {
|
||||
let id = row.id
|
||||
auditRef.value.openDialog([{ "id": id }]);
|
||||
}
|
||||
//格式化字节
|
||||
const formatSize = (size) => {
|
||||
var data = "";
|
||||
if (size < 0.1 * 1024) { //如果小于0.1KB转化成B
|
||||
data = size.toFixed(2) + "B";
|
||||
} else if (size < 0.1 * 1024 * 1024) {//如果小于0.1MB转化成KB
|
||||
data = (size / 1024).toFixed(2) + "KB";
|
||||
} else if (size < 0.1 * 1024 * 1024 * 1024) { //如果小于0.1GB转化成MB
|
||||
data = (size / (1024 * 1024)).toFixed(2) + "MB";
|
||||
} else { //其他转化成GB
|
||||
data = (size / (1024 * 1024 * 1024)).toFixed(2) + "GB";
|
||||
}
|
||||
var sizestr = data + "";
|
||||
var len = sizestr.indexOf("\.");
|
||||
var dec = sizestr.substr(len + 1, 2);
|
||||
if (dec == "00") {//当小数点后为00时 去掉小数部分
|
||||
return sizestr.substring(0, len) + sizestr.substr(len + 3, 2);
|
||||
}
|
||||
return sizestr;
|
||||
}
|
||||
const formatSizeUnits = (size) => {
|
||||
if (size === 0) return '0 B';
|
||||
var k = 1000, // or 1024
|
||||
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
||||
i = Math.floor(Math.log(size) / Math.log(k));
|
||||
};
|
||||
|
||||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
}
|
||||
//灾害表格点击事件
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
|
@ -229,12 +205,6 @@ const tableClick = (i) => {
|
|||
// 初始化灾害表格数据
|
||||
const getDisasterData = () => {
|
||||
state.disasterData.loading = true;
|
||||
// param: {
|
||||
// search: '',
|
||||
// current: 1,
|
||||
// size: 10,
|
||||
// respondStatus: 0,
|
||||
// },
|
||||
let param = {
|
||||
"search": state.disasterData.param.search,
|
||||
"current": state.disasterData.param.pageNum,
|
||||
|
@ -265,82 +235,39 @@ const getTableData = () => {
|
|||
state.tableData.data = res.records;
|
||||
|
||||
if (state.searchName == '1') {
|
||||
console.log(111111111111111111);
|
||||
|
||||
|
||||
state.tableData.data.forEach(item => {
|
||||
let date = item.createTime.slice(0, 10);
|
||||
item.time = date;
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
state.tableData.data.forEach(item => {
|
||||
let date = item.time.slice(0, 10);
|
||||
item.time = date;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
/* state.tableData.data = data;
|
||||
state.tableData.total = state.tableData.data.length;*/
|
||||
setTimeout(() => {
|
||||
state.tableData.loading = false;
|
||||
}, 500);
|
||||
};
|
||||
|
||||
// 打开上传弹窗
|
||||
const startBot = (row: any) => {
|
||||
bootRef.value.openDialog(row);
|
||||
|
||||
};
|
||||
// 打开修改角色弹窗
|
||||
const onOpenEditRole = (type, row) => {
|
||||
roleDialogRef.value.openDialog(type, row);
|
||||
};
|
||||
//批量删除其他数据
|
||||
const batchDel = () => {
|
||||
if (state.multipleSelection.length == 0) {
|
||||
ElMessage.warning("Select the data to be operated first");
|
||||
|
||||
// 打开上传弹窗
|
||||
const OpenuploadDataRef = () => {
|
||||
if (state.disasterId == null) {
|
||||
ElMessage.warning('Please select the disaster first');
|
||||
return false;
|
||||
}
|
||||
ElMessageBox.confirm(`This action batch deletes the other data,Whether to continue?`, 'tip', {
|
||||
confirmButtonText: 'confirm',
|
||||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
let id = state.multipleSelection.map(item => item.id)
|
||||
deleteData(id.join()).then(res => {
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
// 删除其他数据
|
||||
const del = (row) => {
|
||||
ElMessageBox.confirm(`This action deletes the other data:“${row.title}”,Whether to continue?`, 'tip', {
|
||||
confirmButtonText: 'confirm',
|
||||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
deleteData(row.id).then(res => {
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleDisasterSizeChange = (val) => {
|
||||
state.disasterData.param.pageSize = val;
|
||||
getDisasterData();
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleDisasterCurrentChange = (val) => {
|
||||
state.disasterData.param.pageNum = val;
|
||||
getDisasterData();
|
||||
uploadDataRef.value.openDialog(state.disasterId);
|
||||
};
|
||||
|
||||
// 分页改变
|
||||
const onHandleSizeChange = (val) => {
|
||||
state.tableData.param.pageSize = val;
|
||||
|
@ -351,6 +278,7 @@ const onHandleCurrentChange = (val) => {
|
|||
state.tableData.param.pageNum = val;
|
||||
getTableData();
|
||||
};
|
||||
|
||||
// 页面加载时
|
||||
onMounted(() => {
|
||||
getDisasterData();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-dialog title="upload" v-model="state.isShowDialog" width="500px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef"
|
||||
style="margin-left: 6%;">
|
||||
<el-form-item label="upload picture" prop="img">
|
||||
<el-form-item label="upload" prop="img">
|
||||
<el-upload ref="upFileRef" class="upload-demo" drag accept="image/*" action="#" multiple :http-request="uploadPic"
|
||||
:on-remove="removePic" :before-upload="beforeUpload">
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
||||
size="default" clearable>
|
||||
|
@ -38,9 +38,9 @@
|
|||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="uploaderName" label="Uploader name" width="100"
|
||||
<el-table-column prop="uploaderName" label="Uploader name" width="150"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="isPublish" label="isPublish" width="90" show-overflow-tooltip>
|
||||
<el-table-column prop="isPublish" label="isPublish" width="110" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="warning" v-if="scope.row.isPublish == 0">NO</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.isPublish == 1">YES</el-tag>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="title" label="Title" show-overflow-tooltip
|
||||
width="150"></el-table-column>
|
||||
<el-table-column prop="size" label="Data size" width="90" show-overflow-tooltip>
|
||||
<el-table-column prop="size" label="Data size" width="110" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ formatSizeUnits(scope.row.size) }}
|
||||
</template>
|
||||
|
@ -262,6 +262,7 @@ const pub = (row) => {
|
|||
}
|
||||
updateEntityData(daNew)
|
||||
ElMessage.success('success');
|
||||
getTableData()
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
@ -1,79 +1,70 @@
|
|||
<template>
|
||||
<el-dialog title="edit picture" v-model="state.isShowDialog" width="700px" :close-on-click-modal="false" @close="closeDialog">
|
||||
<el-dialog title="edit picture" v-model="state.isShowDialog" width="700px" :close-on-click-modal="false"
|
||||
@close="closeDialog">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item label="upload picture" prop="img">
|
||||
<el-upload
|
||||
ref="upFileRef"
|
||||
v-model:file-list="state.fileList"
|
||||
action="#"
|
||||
list-type="picture-card"
|
||||
accept="image/*"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="changeUpload"
|
||||
:limit="1"
|
||||
:auto-upload="false"
|
||||
:class="{hide: state.hideUpload }"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
<el-upload ref="upFileRef" v-model:file-list="state.fileList" action="#" list-type="picture-card" accept="image/*"
|
||||
:on-preview="handlePictureCardPreview" :on-remove="handleRemove" :on-change="changeUpload" :limit="1"
|
||||
:auto-upload="false" :class="{ hide: state.hideUpload }">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
|
||||
<el-dialog v-model="state.dialogVisible">
|
||||
<img w-full :src="state.dialogImageUrl" alt="Preview Image" />
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="data title">
|
||||
<el-input v-model="state.ruleForm.title" class="m-2" placeholder="please enter data title" :rows="3" type="text"
|
||||
style="width:220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Home page show" prop="isMain">
|
||||
<el-select v-model="state.ruleForm.isMain" class="m-2" placeholder="please select home show">
|
||||
<el-option
|
||||
label="show"
|
||||
value="1"
|
||||
></el-option>
|
||||
<el-option
|
||||
label="not show"
|
||||
value="0"
|
||||
></el-option>
|
||||
<el-option label="show" value="1"></el-option>
|
||||
<el-option label="not show" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import {reactive, ref} from "vue";
|
||||
import {updatePicture} from '/@/api/data/pictureInfo.js';
|
||||
import {ElMessage} from "element-plus";
|
||||
import { reactive, ref } from "vue";
|
||||
import { updatePicture } from '/@/api/data/pictureInfo.js';
|
||||
import { ElMessage } from "element-plus";
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
import {computed} from "@vue/reactivity";
|
||||
import { computed } from "@vue/reactivity";
|
||||
const upFileRef = ref();
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
dialogVisible:false,
|
||||
dialogImageUrl:'',
|
||||
disabled:false,
|
||||
hideUpload:false,
|
||||
fileList:[],
|
||||
dialogVisible: false,
|
||||
dialogImageUrl: '',
|
||||
disabled: false,
|
||||
hideUpload: false,
|
||||
fileList: [],
|
||||
isShowDialog: false,
|
||||
isLoading:false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
},
|
||||
tableData: [],
|
||||
//字典值
|
||||
dictData: [],
|
||||
unitData:[],
|
||||
unitData: [],
|
||||
standardId: '',
|
||||
detectionData: [],
|
||||
disasterId:null,
|
||||
dataForm:new FormData(),
|
||||
fileArray:[],
|
||||
id:null,
|
||||
disasterId: null,
|
||||
dataForm: new FormData(),
|
||||
fileArray: [],
|
||||
id: null,
|
||||
})
|
||||
//上传图片改变时
|
||||
const changeUpload = (file, fileList) => {
|
||||
|
@ -82,28 +73,27 @@ const changeUpload = (file, fileList) => {
|
|||
}
|
||||
//验证图片
|
||||
const validImg = (rule, value, callback) => {
|
||||
if(state.fileList.length>0){
|
||||
if (state.fileList.length > 0) {
|
||||
adminAddFormRef.value.clearValidate('img')
|
||||
callback();
|
||||
}else{
|
||||
} else {
|
||||
return callback(new Error('please upload image'));
|
||||
}
|
||||
}
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
img: [
|
||||
{required: true,trigger: 'change',validator:validImg}
|
||||
{ required: true, trigger: 'change', validator: validImg }
|
||||
],
|
||||
isMain: [
|
||||
{required: true, message: 'please select home page show', trigger: 'change'}
|
||||
{ required: true, message: 'please select home page show', trigger: 'change' }
|
||||
],
|
||||
remark:[
|
||||
{required: true, message: 'please select data details', trigger: 'blur'}
|
||||
remark: [
|
||||
{ required: true, message: 'please select data details', trigger: 'blur' }
|
||||
],
|
||||
})
|
||||
//图片删除
|
||||
const handleRemove = (uploadFile, uploadFiles) => {
|
||||
console.log(uploadFile, uploadFiles)
|
||||
state.hideUpload = state.fileList.length >= 1
|
||||
}
|
||||
//图片预览
|
||||
|
@ -125,7 +115,7 @@ const uploadPic = (data) => {
|
|||
}
|
||||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item=>item.uid===data.raw.uid), 1)
|
||||
state.fileArray.splice(state.fileArray.findIndex(item => item.uid === data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//重置表单
|
||||
|
@ -139,10 +129,11 @@ const resetField = () => {
|
|||
const openDialog = (row) => {
|
||||
state.isShowDialog = true;
|
||||
//回显图片
|
||||
state.fileList.push({'name':row.name,'uid':row.id,'url':row.link});
|
||||
state.fileList.push({ 'name': row.name, 'uid': row.id, 'url': row.link });
|
||||
state.hideUpload = state.fileList.length >= 1
|
||||
//state.dialogImageUrl = row.link;
|
||||
state.ruleForm.isMain = row.isMain+"";
|
||||
state.ruleForm.isMain = row.isMain + "";
|
||||
state.ruleForm.title = row.name;
|
||||
state.id = row.id
|
||||
};
|
||||
// 关闭弹窗
|
||||
|
@ -162,18 +153,22 @@ const onSubmit = () => {
|
|||
if (valid) {
|
||||
console.log(state.fileList);
|
||||
state.isLoading = true;
|
||||
state.fileList.forEach(item=>{
|
||||
state.dataForm.append('file',item.raw);
|
||||
|
||||
state.fileList.forEach(item => {
|
||||
console.log(item.raw,"item.raw");
|
||||
if (item.raw) {
|
||||
console.log(1111111111111);
|
||||
state.dataForm.append('file', item.raw);
|
||||
}
|
||||
})
|
||||
state.dataForm.append('isMain',state.ruleForm.isMain);
|
||||
state.dataForm.append('id',state.id);
|
||||
for(let [a, b] of state.dataForm.entries()){
|
||||
console.log(a, b, '--------------');
|
||||
}
|
||||
state.dataForm.append('isMain', state.ruleForm.isMain);
|
||||
state.dataForm.append('id', state.id);
|
||||
state.dataForm.append('name', state.ruleForm.title);
|
||||
updatePicture(state.dataForm).then(res => {
|
||||
state.dataForm = new FormData(),
|
||||
ElMessage.success("Upload successfully");
|
||||
emit('callback');
|
||||
}).finally(()=>{
|
||||
}).finally(() => {
|
||||
state.isLoading = false;
|
||||
})
|
||||
closeDialog();
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- <el-input size="default" placeholder="please enter username" style="max-width: 180px" v-model="state.searchName"
|
||||
clearable></el-input>
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<el-dialog title="address" v-model="state.isShowDialog" width="700px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="190px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item prop="downloadurl" label="data downloadUrl">
|
||||
<el-input v-model="state.ruleForm.downloadUrl" placeholder="please data downloadurl"
|
||||
type="text" style="width:320px; height: 40px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">confirm</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { approval } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
isShowDialog: false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
},
|
||||
disasterId: null,
|
||||
})
|
||||
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
downloadurl: [
|
||||
{ required: true, message: 'please data downloadurl', trigger: 'blur' }
|
||||
],
|
||||
})
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
adminAddFormRef.value.resetFields();
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
state.isShowDialog = true;
|
||||
state.ruleForm.id = row.id;
|
||||
if (row.downloadUrl) {
|
||||
state.ruleForm.downloadUrl = row.downloadUrl;
|
||||
}
|
||||
};
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
state.isShowDialog = false;
|
||||
resetField();
|
||||
};
|
||||
// 取消
|
||||
const onCancel = () => {
|
||||
closeDialog();
|
||||
};
|
||||
// 新增
|
||||
const onSubmit = () => {
|
||||
if (!state.ruleForm.downloadUrl) {
|
||||
return;
|
||||
}
|
||||
state.ruleForm.status = 3;
|
||||
approval(state.ruleForm).then(da => {
|
||||
ElMessage.success('success!');
|
||||
closeDialog();
|
||||
emit("callback");
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,76 @@
|
|||
<template>
|
||||
<el-dialog title="approval" v-model="state.isShowDialog" width="700px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="120px" :rules="rules" ref="adminAddFormRef">
|
||||
<el-form-item label="pass or not" prop="status">
|
||||
<el-radio-group v-model="state.ruleForm.status">
|
||||
<el-radio :label="2">pass</el-radio>
|
||||
<el-radio :label="4">no pass</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="onSubmit" size="default" :loading="state.isLoading">confirm</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { approval } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
isShowDialog: false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
},
|
||||
disasterId: null,
|
||||
})
|
||||
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
status: [
|
||||
{ required: true, message: 'please check pass or not', trigger: 'change' }
|
||||
]
|
||||
})
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
adminAddFormRef.value.resetFields();
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
state.isShowDialog = true;
|
||||
state.ruleForm.id = row.id;
|
||||
};
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
state.isShowDialog = false;
|
||||
resetField();
|
||||
};
|
||||
// 取消
|
||||
const onCancel = () => {
|
||||
closeDialog();
|
||||
};
|
||||
// 新增
|
||||
const onSubmit = () => {
|
||||
approval(state.ruleForm).then(da=>{
|
||||
ElMessage.success('success!');
|
||||
closeDialog();
|
||||
emit("callback");
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -2,33 +2,40 @@
|
|||
<div>
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 80vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
|
||||
<disasterTable @childClick="tableClick">
|
||||
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</disasterTable>
|
||||
<el-table-column prop="Operate" label="Operate" width="85" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="startBot(scope.row)">start</el-button>
|
||||
<!-- <el-tag type="info" v-if="scope.row.respondStatus == 3">complete</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height:80vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height:85vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- 选择灾害类型 -->
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-col :span="6">
|
||||
<el-tree-select v-model="state.value_satelliteType" :data="state.options_satelliteType" multiple
|
||||
collapse-tags collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||
placeholder="Select satellite type" />
|
||||
</el-col>
|
||||
<el-col :span="8" style="padding-left:1%;">
|
||||
<el-col :span="6" style="margin-left: 1%;">
|
||||
<el-tree-select v-model="state.value_resolution" :data="state.options_resolution" multiple collapse-tags
|
||||
collapse-tags-tooltip :render-after-expand="false" show-checkbox clearable
|
||||
placeholder="Select resolution" />
|
||||
</el-col>
|
||||
<el-col :span="6" style="margin-left: 1%;">
|
||||
<el-select class="form-select" size="default" clearable placeholder="Select status"
|
||||
v-model="state.status">
|
||||
<el-option v-for="(item, index) in state.options_status" :value="item.value" :key="index"
|
||||
:label="item.label" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button size="default" type="primary" class="ml10" @click="searchRemoteSensingSourceData">
|
||||
<el-icon>
|
||||
|
@ -43,40 +50,51 @@
|
|||
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
||||
<el-table :data="state.requestData" style="width: 1000Px;">
|
||||
<el-table-column type="index" label="Index" align="center" width="80"></el-table-column>
|
||||
<el-table-column prop="satelliteCode" label="Satellite code" width="170" align="center"
|
||||
<el-table-column prop="satelliteCode" label="Satellite code" width="170" align="center" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="productTime" label="Product time" width="170" align="center" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="productBandsNum" label="Product bands num" width="200" align="center"
|
||||
show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="productTime" label="Product time" width="170" align="center"
|
||||
<el-table-column prop="productResolution" label="Product resolution(m)" width="220" align="center"
|
||||
show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="productBandsNum" label="Product bands num" width="200" align="center"
|
||||
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center" width="180" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="sourceOrganization" label="Source organization" width="200" align="center"
|
||||
show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="productResolution" label="Product resolution(m)" width="220" align="center"
|
||||
show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center" width="180"
|
||||
show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="sourceOrganization" label="Source organization" width="200" align="center"
|
||||
show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="downloadUrl" label="Download url" align="center" width="200" show-overflow-tooltip>
|
||||
<el-table-column prop="downloadUrl" label="Download url" align="center" width="200" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" align="center" width="200" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button v-if="scope.row.status === 1" size="small" text type="primary" @click="approvalDataOpen(scope.row)">start</el-button>
|
||||
<el-button v-if="scope.row.status === 2 || scope.row.status === 3" size="small" text type="primary" @click="addAddressOpen(scope.row)">add_address</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
style="margin-right: 20px;" :page-sizes="[10, 20, 30]" background v-model:current-page="state.tableData.param.pageNum"
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
style="margin-right: 20px;" :page-sizes="[10, 20, 30]" background
|
||||
v-model:current-page="state.tableData.param.pageNum" v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<approvalData ref="approvalDataRef" @callback="getData()" />
|
||||
<addAddress ref="addAddressRef" @callback="getData()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { getRemoteSensingSourceData, getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
import { getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
import { getDisasterPage } from '/@/api/data/otherData.js'
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
import approvalData from "./approvalData.vue";
|
||||
import addAddress from "./addAddress.vue";
|
||||
|
||||
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
|
||||
|
||||
const approvalDataRef = ref();
|
||||
const addAddressRef = ref();
|
||||
const state = reactive({
|
||||
disasterData: {
|
||||
data: [],
|
||||
|
@ -107,6 +125,29 @@ const state = reactive({
|
|||
// value_disasterDate: '',
|
||||
// options_disasterCountry: [],
|
||||
// value_disasterCountry: [],
|
||||
//0-爬虫获取,1-未审核,2-,已审核,上传源数据未补充下载 链接,3-已审核上传源数据已补充下载链接
|
||||
options_status: [
|
||||
{
|
||||
label: 'Crawler acquisition',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: 'Unapproved',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: 'Approved',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: 'Finish',
|
||||
value: '3'
|
||||
},
|
||||
{
|
||||
label: 'No pass',
|
||||
value: '4'
|
||||
},
|
||||
],
|
||||
options_resolution: [{
|
||||
label: '<0.8m',
|
||||
value: '<0.8m'
|
||||
|
@ -146,7 +187,7 @@ const state = reactive({
|
|||
requestSatellite: []
|
||||
})
|
||||
const emit = defineEmits(['response']);
|
||||
const startBot=(row)=>{
|
||||
const startBot = (row) => {
|
||||
emit('response', row);
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
|
@ -165,6 +206,16 @@ const tableClick = (i) => {
|
|||
getData()
|
||||
}
|
||||
|
||||
// 打开审批
|
||||
const approvalDataOpen = (row) => {
|
||||
approvalDataRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 打开审批
|
||||
const addAddressOpen = (row) => {
|
||||
addAddressRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 获取遥感影像元数据
|
||||
const getData = () => {
|
||||
let data = {
|
||||
|
@ -172,20 +223,9 @@ const getData = () => {
|
|||
}
|
||||
getPagesRemoteSensingSourceData(data).then(
|
||||
(res) => {
|
||||
console.log(res.records);
|
||||
state.requestData = res.records;
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
// getRemoteSensingSourceDataByCondition(1, 1000, JSON.stringify(data)).then(
|
||||
// (res) => {
|
||||
// state.requestData = res.records;
|
||||
// for (let index = 0; index < res.records.length; index++) {
|
||||
// state.requestResolution[index] = state.requestData[index].productResolution
|
||||
// state.requestSatellite[index] = state.requestData[index].satelliteCode
|
||||
// }
|
||||
// state.requestResolution = new Set(state.requestResolution)
|
||||
// state.requestSatellite = new Set(state.requestSatellite)
|
||||
// })
|
||||
}
|
||||
|
||||
// 查询遥感元数据
|
||||
|
@ -256,18 +296,26 @@ const searchRemoteSensingSourceData = () => {
|
|||
dataNew = {
|
||||
disasterId: state.disasterId,
|
||||
satelliteCodeList: state.satelliteCodeList.join(","),
|
||||
productResolutionVos: state.listData
|
||||
productResolutionVos: state.listData,
|
||||
status: state.status
|
||||
}
|
||||
} else {
|
||||
dataNew = {
|
||||
disasterId: state.disasterId,
|
||||
productResolutionVos: state.listData
|
||||
productResolutionVos: state.listData,
|
||||
status: state.status
|
||||
}
|
||||
}
|
||||
|
||||
getDataByCondition(state.tableData.param.pageNum, state.tableData.param.pageSize, dataNew)
|
||||
}
|
||||
|
||||
const reviseDownload = (row) => {
|
||||
|
||||
console.log(row, "rowrowrow");
|
||||
}
|
||||
|
||||
|
||||
// 根据检索条件检索遥感元数据
|
||||
const getDataByCondition = (current, size, dataNew) => {
|
||||
console.log('传过来的数据:', state.tableData.param.pageNum);
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- <el-input size="default" placeholder="please enter username" style="max-width: 180px" v-model="state.searchName"
|
||||
clearable></el-input>
|
||||
|
|
|
@ -252,6 +252,9 @@ const initLineChart = (xData,data1, data2) => {
|
|||
type: 'value',
|
||||
name: 'initiate',
|
||||
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||
nameTextStyle: {
|
||||
padding: [0, 40, 0, 0] // 上右下左
|
||||
},
|
||||
}
|
||||
],
|
||||
series: [
|
||||
|
@ -318,6 +321,9 @@ const initLineVandDChart = (xData,data1, data2) => {
|
|||
type: 'value',
|
||||
name: 'download',
|
||||
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
|
||||
nameTextStyle: {
|
||||
padding: [0, 40, 0, 0] // 上右下左
|
||||
},
|
||||
}
|
||||
],
|
||||
series: [
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 85vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-button size="default" type="primary" class="ml10" @click="batchAudit">
|
||||
<el-icon>
|
||||
|
|
|
@ -86,7 +86,9 @@ const save = async () => {
|
|||
chiefId: state.selectData[0].id,
|
||||
chiefName: state.selectData[0].name,
|
||||
};
|
||||
let res = await submit(params);
|
||||
let res = await submit(params).then(da=>{
|
||||
ElMessage.success('Save success');
|
||||
});
|
||||
emit('callback');
|
||||
closeDialog();
|
||||
};
|
||||
|
|
|
@ -280,7 +280,7 @@
|
|||
</div>
|
||||
<el-dialog v-model="state.dialogVisible"
|
||||
title="Approval"
|
||||
width="35%">
|
||||
width="45%">
|
||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||
<el-radio v-model="state.radio"
|
||||
label='1'
|
||||
|
@ -338,6 +338,8 @@
|
|||
<div class="latLon-div"> {{ state.popupLat }} , {{ state.popupLon }} </div>
|
||||
|
||||
<el-form :inline="true"
|
||||
label-width="auto"
|
||||
:label-position="labelPosition"
|
||||
:model="formInline"
|
||||
class="demo-form-inline">
|
||||
|
||||
|
@ -348,6 +350,7 @@
|
|||
value-format="YYYY-MM-DD"
|
||||
placeholder="Select date and time" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Disaster type">
|
||||
<el-select style="width: 200px; height: 40px;"
|
||||
class="form-select"
|
||||
|
@ -378,7 +381,7 @@
|
|||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="cancelApporval">Cancel</el-button>
|
||||
<el-button @click="dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="danger"
|
||||
@click="reviews(1)">
|
||||
Reject
|
||||
|
@ -777,6 +780,7 @@ const getValue = (key) => {
|
|||
float: right;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.latLon-div {
|
||||
position: absolute;
|
||||
top: 60%;
|
||||
|
@ -785,4 +789,10 @@ const getValue = (key) => {
|
|||
color: white;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.form-select {
|
||||
.el-input__wrapper {
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -65,9 +65,10 @@ let checkPhone = (rule, value, callback) => {
|
|||
} else {
|
||||
//验证手机号
|
||||
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
|
||||
const regNew = /^\+?[1-9]\d{1,14}$/
|
||||
//验证区号
|
||||
const phoneReg = /^\d{3}-\d{8}|\d{4}-\d{7}$/
|
||||
if (reg.test(value)||phoneReg.test(value)) {
|
||||
if (regNew.test(value)) {
|
||||
callback();
|
||||
} else {
|
||||
return callback(new Error('Please enter the correct contact number'));
|
||||
|
|
|
@ -86,7 +86,7 @@ const batchDelete = () => {
|
|||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
let id = state.multipleSelection.map(item => ({ id: item.id, chiefId: null }))
|
||||
let id = state.multipleSelection.map(item => ({ id: item.disasterId, chiefId: null }))
|
||||
removeManage(id).then(res => {
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
|
@ -101,7 +101,7 @@ const deleteDisaster = (row) => {
|
|||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
let delData = [{ "id": row.id, "cheif": null }]
|
||||
let delData = [{ "id": row.disasterId, "cheif": null }]
|
||||
removeManage(delData).then(res => {
|
||||
getTableData();
|
||||
ElMessage.success('Deleted successfully');
|
||||
|
|
Loading…
Reference in New Issue