Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin into zqq
This commit is contained in:
commit
1e1b223a6a
|
@ -5,6 +5,11 @@
|
|||
v-model="state.search.disasterType">
|
||||
<el-option v-for="(item, index) in state.dictList" :value="item.dictKey" :key="index" :label="item.dictValue" />
|
||||
</el-select>
|
||||
<el-select class="form-select" style="margin-left: 10px;" size="default" clearable placeholder="Disaster Status"
|
||||
v-model="state.search.disasterStatus">
|
||||
<el-option value="2" label="Responding"/>
|
||||
<el-option value="3" label="Responded"/>
|
||||
</el-select>
|
||||
<el-input type="text" class="form-control" size="default" clearable placeholder="Disaster Country"
|
||||
v-model="state.search.disasterCountry" />
|
||||
<el-button size="default" type="primary" class="ml10" @click="getDisasterTable">
|
||||
|
@ -16,7 +21,7 @@
|
|||
</div>
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="118" />
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="128" sortable/>
|
||||
<el-table-column prop="dictValue" label="Disaster type" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable></el-table-column>
|
||||
|
@ -40,7 +45,8 @@ const emit = defineEmits(["click"]);
|
|||
const props = defineProps({
|
||||
//响应状态
|
||||
status: {
|
||||
type: Number
|
||||
type: Number,
|
||||
default: 2
|
||||
},
|
||||
})
|
||||
const state = reactive({
|
||||
|
@ -76,6 +82,7 @@ const getDictBizData = () => {
|
|||
}
|
||||
//获取灾害列表
|
||||
const getDisasterTable = () => {
|
||||
convert();
|
||||
getPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, state.search).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
state.disasterData.data.forEach(item => {
|
||||
|
@ -85,6 +92,10 @@ const getDisasterTable = () => {
|
|||
state.disasterData.total = res.total;
|
||||
})
|
||||
}
|
||||
//判断查询条件
|
||||
const convert = () => {
|
||||
state.search.disasterStatus ? state.search.respondStatus = state.search.disasterStatus : state.search.respondStatus = 2
|
||||
}
|
||||
// 分页改变
|
||||
const onHandleDisasterSizeChange = (val) => {
|
||||
state.disasterData.param.pageSize = val;
|
||||
|
|
|
@ -73,7 +73,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
icon: 'ele-FolderChecked',
|
||||
zh: '用户响应管理',
|
||||
},
|
||||
},
|
||||
|
@ -89,7 +89,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'iconfont icon-icon-',
|
||||
icon: 'ele-DocumentChecked',
|
||||
zh: '数据上传管理',
|
||||
},
|
||||
},
|
||||
|
@ -105,7 +105,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'iconfont icon-icon-',
|
||||
icon: 'ele-Tools',
|
||||
zh: 'tool管理',
|
||||
},
|
||||
},
|
||||
|
@ -121,7 +121,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'iconfont icon-icon-',
|
||||
icon: 'ele-Cellphone',
|
||||
zh: 'tool管理',
|
||||
},
|
||||
},
|
||||
|
@ -156,7 +156,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
icon: 'ele-Monitor',
|
||||
zh: '多媒体数据',
|
||||
},
|
||||
},
|
||||
|
@ -172,7 +172,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'ele-ColdDrink',
|
||||
icon: 'ele-MapLocation',
|
||||
zh: '遥感数据',
|
||||
},
|
||||
},
|
||||
|
@ -188,7 +188,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'ele-ColdDrink',
|
||||
icon: 'ele-Document',
|
||||
zh: '其他数据服务',
|
||||
},
|
||||
},
|
||||
|
@ -204,7 +204,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'ele-ColdDrink',
|
||||
icon: 'ele-PieChart',
|
||||
zh: '其他数据服务',
|
||||
},
|
||||
},
|
||||
|
@ -220,7 +220,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin', 'chief'],
|
||||
icon: 'ele-ColdDrink',
|
||||
icon: 'ele-Picture',
|
||||
zh: '其他数据服务',
|
||||
},
|
||||
},
|
||||
|
@ -255,7 +255,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'ele-ColdDrink',
|
||||
icon: 'ele-User',
|
||||
zh: '管理员管理',
|
||||
},
|
||||
},
|
||||
|
@ -271,7 +271,7 @@ export const dynamicRoutes = [
|
|||
isAffix: false,
|
||||
isIframe: false,
|
||||
roles: ['admin'],
|
||||
icon: 'iconfont icon-caidan',
|
||||
icon: 'ele-MessageBox',
|
||||
zh: '普通管理员管理',
|
||||
},
|
||||
},
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-form-item label="Type" label-width="100px">
|
||||
<div class="system-user-search " style="display: flex;margin-left: 10px;margin-top: 10px;margin-bottom:-15px ">
|
||||
<el-form-item label="Type">
|
||||
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
||||
size="default" clearable @change="getTableData(); state.queryTitle = ''">
|
||||
<el-option value="1" label="News"></el-option>
|
||||
<el-option value="2" label="SocialMedia"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label=" Review status" label-width="100px">
|
||||
<el-form-item label="Review status">
|
||||
<el-select v-model=" state.srarchType " placeholder="Please select data type" style="max-width: 200px"
|
||||
size="default" clearable>
|
||||
<el-option value="0" label="Awaiting approval"></el-option>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<el-option value="2" label="Rejected"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Title" label-width="100px" v-if=" state.searchName == '1' ">
|
||||
<el-form-item label="Title" v-if=" state.searchName == '1' ">
|
||||
<el-input v-model=" state.queryTitle " placeholder="Please enter a title"></el-input>
|
||||
</el-form-item>
|
||||
<el-button size="default" type="primary" class="ml10" @click=" getTableData ">
|
||||
|
@ -42,23 +42,23 @@
|
|||
</el-icon>
|
||||
Search
|
||||
</el-button>
|
||||
<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-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" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column v-if=" state.searchName == '1' " prop="title" label="Title"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column v-if=" state.searchName == '1' " prop="title" label="Title"
|
||||
show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="content" label="Content" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="type" label="Type" show-overflow-tooltip>
|
||||
<template #default=" scope ">
|
||||
<el-tag type="info" v-if=" state.searchName == '1' && scope.row.type == 0 ">baidu(中文)</el-tag>
|
||||
<el-tag type="info" v-if=" state.searchName == '1' && scope.row.type == 0 ">baidu</el-tag>
|
||||
<el-tag type="info" v-if=" state.searchName == '1' && scope.row.type == 1 ">bing</el-tag>
|
||||
<el-tag type="info" v-if=" state.searchName == '2' && scope.row.type == 0 ">twitter</el-tag>
|
||||
<el-tag type="info" v-if=" state.searchName == '2' && scope.row.type == 1 ">weibo</el-tag>
|
||||
|
@ -69,15 +69,7 @@
|
|||
<a :href=" scope.row.link " target="_blank">Read more</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="title" label="Professional title" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="size" label="Data size" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ formatSizeUnits(scope.row.size) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="uploadTime" label="Upload time" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="createTime" label="Create Time" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default=" scope ">
|
||||
<el-button size="small" text type="info" v-if=" scope.row.status == 0 "
|
||||
|
@ -99,15 +91,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-model=" state.dialogVisible " title="Review" width="30%">
|
||||
<!-- <el-form-item label="status">
|
||||
<el-select v-model="state.edit.status" placeholder="please select data type" style="max-width: 200px"
|
||||
size="default" clearable>
|
||||
<el-option value="1" label="reserve"></el-option>
|
||||
<el-option value="2" label="not reserve"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
Do you want to keep this data as response data?
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click=" state.dialogVisible = false ">Cancel</el-button>
|
||||
|
@ -272,6 +256,10 @@ const getTableData = () => {
|
|||
state.tableData.loading = true;
|
||||
getNewsList(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId": state.disasterId, "isDeleted": 0, status: state.srarchType, title: state.queryTitle }, state.searchName == '1' ? true : false).then(res => {
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.data.forEach(item => {
|
||||
let date = item.createTime.slice(0, 10);
|
||||
item.createTime = date;
|
||||
})
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
/* state.tableData.data = data;
|
||||
|
@ -375,4 +363,5 @@ onMounted(() => {
|
|||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -47,6 +47,7 @@ const state = reactive({
|
|||
isShowDialog: false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
title:null,
|
||||
},
|
||||
tableData: [],
|
||||
//字典值
|
||||
|
@ -133,6 +134,9 @@ const onSubmit = () => {
|
|||
console.log(a, b, '--------------');
|
||||
}
|
||||
uploadData(state.dataForm).then(res => {
|
||||
state.dataForm = new FormData(),
|
||||
state.fileArray = [];
|
||||
upFileRef.value.clearFiles();
|
||||
ElMessage.success("Upload successfully");
|
||||
emit('callback');
|
||||
}).finally(() => {
|
||||
|
|
|
@ -18,38 +18,6 @@
|
|||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height:80vh;">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<!-- 选择灾害类型 -->
|
||||
<!-- <el-select v-model="state.value_disasterType"
|
||||
size="default"
|
||||
clearable
|
||||
placeholder="Select disaster type"
|
||||
@visible-change="searchDisasterType">
|
||||
<el-option v-for="item in state.options_disasterType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select> -->
|
||||
<!-- 选择灾害时间 -->
|
||||
<!-- <el-date-picker v-model="state.value_disasterDate"
|
||||
type="date"
|
||||
placeholder="Select disaster time"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
class="ml10"
|
||||
size="default"
|
||||
@focus="searchDisasterDate" /> -->
|
||||
<!-- 选择受灾地 -->
|
||||
<!-- <el-select v-model="state.value_disasterCountry"
|
||||
size="default"
|
||||
clearable
|
||||
placeholder="Select disaster country"
|
||||
style="margin-left: 0.6%;"
|
||||
@visible-change="searchDisasterCountry">
|
||||
<el-option v-for="item in state.options_disasterCountry"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select> -->
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-tree-select v-model="state.value_satelliteType" :data="state.options_satelliteType" multiple
|
||||
|
@ -73,61 +41,22 @@
|
|||
|
||||
</div>
|
||||
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
||||
<el-table :data="state.requestData" style="width: 100%">
|
||||
<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" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productTime" label="Product time" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productBandsNum" label="Product bands num" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="productResolution" label="Product resolution(m)" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sourceOrganization" label="Source organization" align="center"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="downloadUrl" label="Download url" align="center" show-overflow-tooltip>
|
||||
<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="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>
|
||||
<!-- <el-table-column prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip></el-table-column> -->
|
||||
|
||||
<!-- <template slot-scope="scope">
|
||||
<el-link :href="scope.row.downloadUrl">查看详情</el-link>
|
||||
</template> -->
|
||||
<!-- <el-table-column prop="Longitude"
|
||||
label="Longitude"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Latitude"
|
||||
label="Latitude"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="responseTime"
|
||||
label="Response time"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column prop="responseStatus"
|
||||
label="Response status"
|
||||
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="status" label="角色状态" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.status">启用</el-tag>
|
||||
<el-tag type="info" v-else>禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="scope">
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary" @click="onRowDel(scope.row)"
|
||||
>删除</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"
|
||||
|
|
|
@ -501,9 +501,10 @@ defineExpose({
|
|||
|
||||
<style scoped lang="scss">
|
||||
.rsSelect {
|
||||
border: 1px solid #040728;
|
||||
border: 1px solid #f7f7fa;
|
||||
height: 52rem;
|
||||
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin-bottom: 3%;
|
||||
|
@ -548,5 +549,6 @@ defineExpose({
|
|||
|
||||
#map {
|
||||
height: 52rem;
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
|
@ -3,20 +3,8 @@
|
|||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="10">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.disasterData.param.pageNum" background
|
||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.disasterData.total">
|
||||
</el-pagination>
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||
<disasterTable @childClick="tableClick"></disasterTable>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
|
@ -77,6 +65,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import Audit from './component/audit.vue';
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
// 引入组件
|
||||
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||
const auditRef = ref();
|
||||
|
@ -150,8 +139,8 @@ const formatSizeUnits = (size) => {
|
|||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||
}
|
||||
//灾害表格点击事件
|
||||
const tableClick = (row, column, event) => {
|
||||
state.disasterId = row.disasterId;
|
||||
const tableClick = (i) => {
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
}
|
||||
// 初始化灾害表格数据
|
||||
|
|
|
@ -5,56 +5,34 @@
|
|||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
||||
<el-tab-pane label="Unapproved" name="first">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip sortable>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="affectedCountry" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 0">Awaiting approval</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary"
|
||||
@click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||
</template>
|
||||
</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="status" label="角色状态" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="success" v-if="scope.row.status">启用</el-tag>
|
||||
<el-tag type="info" v-else>禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="scope">
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary" @click="onRowDel(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||
|
@ -62,46 +40,37 @@
|
|||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Approved | Rejected" name="second">
|
||||
|
||||
<el-tab-pane label="Approved" name="second">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="Administrator" label="Administrator" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="email" label="Email" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="email" label="Email" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip sortable>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
||||
<!-- <el-table-column prop="Affected country" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="reviewTime" label="reviewTime" show-overflow-tooltip />
|
||||
|
||||
|
||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
||||
<!-- <el-table-column prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
|
||||
<el-table-column width="170" prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||
|
||||
|
||||
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="reviewTime" label="reviewTime" show-overflow-tooltip sortable />
|
||||
<el-table-column width="170" prop="respondStatus" label="Response status" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.respondStatus === 3">Complete response</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="200" prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<el-table-column width="200" prop="Operate" label="Operate" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocation</el-button>
|
||||
<el-button size="small" text type="danger" @click="responseEnded(scope.row)">Response ended</el-button>
|
||||
|
@ -114,9 +83,69 @@
|
|||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label="Rejected" name="firstNew">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip sortable>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label="Finish" name="firstNewOne">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column prop="username" label="User name" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip sortable>
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="respondedTime" label="Responded time" show-overflow-tooltip sortable>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.respondedTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-dialog v-model="state.dialogVisible" title="Approval" width="30%">
|
||||
<el-dialog v-model="state.dialogVisible" title="Approval" width="35%">
|
||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio>
|
||||
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio>
|
||||
|
@ -131,11 +160,24 @@
|
|||
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||
</el-container>
|
||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||
|
||||
<el-form-item label="Disaster Time">
|
||||
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="Select date and time" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Disaster type">
|
||||
<el-select class="form-select" size="default" clearable placeholder="Disaster Type"
|
||||
v-model="state.edit.disasterType">
|
||||
<el-option v-for="(item, index) in state.dictList" :value="item.dictKey" :key="index"
|
||||
:label="item.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Disaster country">
|
||||
<el-input v-model="state.edit.disasterCountry" placeholder="please Disaster country" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Theme keywords">
|
||||
<el-input v-model="state.edit.disasterKeyword" placeholder="please Theme keywords" clearable></el-input>
|
||||
</el-form-item>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">Cancel</el-button>
|
||||
|
@ -158,7 +200,7 @@ import en from 'element-plus/dist/locale/en.mjs'
|
|||
import { reactive, onMounted, ref, nextTick, watchEffect, defineAsyncComponent } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { getList, review, responseEndedDisasterInfo } from '/@/api/disasterInfo/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
import { getDictionary,getList as getListNew } from '/@/api/system/dictbiz';
|
||||
import { useVariableStore } from '/@/stores/index.ts'
|
||||
//引入地图
|
||||
import Map from '/@/components/Map.vue';
|
||||
|
@ -176,14 +218,17 @@ const variableStore = useVariableStore();
|
|||
const mapRef = ref();
|
||||
const activeName = ref('first');
|
||||
const select = ref();
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
state.selectName = tab.props.name;
|
||||
getTableData();
|
||||
};
|
||||
|
||||
const MapPage = defineAsyncComponent({
|
||||
loader: () => import('/@/components/Map.vue'),
|
||||
delay: 200,
|
||||
})
|
||||
|
||||
const onAllocation = (row) => {
|
||||
select.value.openDialog(row)
|
||||
};
|
||||
|
@ -196,8 +241,9 @@ const responseEnded = (row) => {
|
|||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
responseEndedDisasterInfo(row.id).then((da) => {
|
||||
ElMessage.success('Operation successful');
|
||||
responseEndedDisasterInfo(row.disasterId).then((da) => {
|
||||
getTableData();
|
||||
ElMessage.success('success');
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
|
@ -210,6 +256,8 @@ const dateFormat = (date) => {
|
|||
// 定义变量内容
|
||||
const roleDialogRef = ref();
|
||||
const state = reactive({
|
||||
//灾害类型字典项
|
||||
dictList: [],
|
||||
dialogVisible: false,
|
||||
tableData: {
|
||||
data: [],
|
||||
|
@ -236,6 +284,10 @@ const getTableData = () => {
|
|||
//根据activeName的值来判断是哪个tab页
|
||||
if (state.selectName === 'first') {
|
||||
state.tableData.param.respondStatus = 0;
|
||||
} else if (state.selectName === 'second') {
|
||||
state.tableData.param.respondStatus = 2;
|
||||
} else if (state.selectName === 'firstNew') {
|
||||
state.tableData.param.respondStatus = 1;
|
||||
} else {
|
||||
state.tableData.param.respondStatus = 3;
|
||||
}
|
||||
|
@ -262,11 +314,6 @@ const onOpenEditRole = (type, row) => {
|
|||
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
||||
}
|
||||
state.wktPoint_Poly = mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
||||
// mapRef.value.mapOperations.on("click", (res)=>{
|
||||
// mapRef.value.mapOperations.clearPolygon()
|
||||
// mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly)
|
||||
// mapRef.value.mapOperations.addInteractMarker(res.latlng.lat, res.latlng.lng)
|
||||
// })
|
||||
mapEvents('1')
|
||||
}, 100);
|
||||
};
|
||||
|
@ -314,15 +361,16 @@ const reviews = (index) => {
|
|||
if (index === 1) {
|
||||
state.edit.respondStatus = 1;
|
||||
} else {
|
||||
state.edit.respondStatus = 3;
|
||||
state.edit.respondStatus = 2;
|
||||
}
|
||||
state.edit.geometry = variableStore.layerGroupPoint === null ? variableStore.layerGroupPoly : variableStore.layerGroupPoint;
|
||||
//时间格式化
|
||||
state.edit.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00";
|
||||
state.edit.id = state.edit.disasterId;
|
||||
review(state.edit).then((res) => {
|
||||
ElMessage.success('success');
|
||||
state.dialogVisible = false;
|
||||
getTableData();
|
||||
ElMessage.success('success');
|
||||
});
|
||||
}
|
||||
// 分页改变
|
||||
|
@ -379,7 +427,9 @@ onMounted(() => {
|
|||
getDictionary({ code: 'disaster' }).then((res) => {
|
||||
state.disasterTypeList = res;
|
||||
});
|
||||
|
||||
getListNew({ code: 'disaster' }).then(res => {
|
||||
state.dictList = res[0].children
|
||||
})
|
||||
});
|
||||
const getValue = (key) => {
|
||||
//返回state.disasterTypeLis 对应的value
|
||||
|
|
|
@ -16,7 +16,12 @@
|
|||
<el-table-column property="dictValue" label="DisasterType" width="150" />
|
||||
<el-table-column property="disasterCountry" label="DisasterCountry" width="200" />
|
||||
<el-table-column property="disasterKeyword" label="DisasterKeyword" width="200" />d
|
||||
<el-table-column property="disasterTime" label="DisasterTime" />
|
||||
<el-table-column prop="disasterTime" label="DisasterTime" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="disasterLevel" label="DisasterLevel" />
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
|
@ -45,6 +50,8 @@ import en from 'element-plus/dist/locale/en.mjs'
|
|||
import {getPage,updateDisasterManage} from '/@/api/disasterInfo/index.js';
|
||||
import {reactive, ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import { useDateFormat } from '@vueuse/shared';
|
||||
|
||||
const emit = defineEmits(['callback']);
|
||||
const tableRef = ref();
|
||||
const state = reactive({
|
||||
|
@ -77,9 +84,13 @@ const openDialog = (chiefId) => {
|
|||
state.chiefId = chiefId;
|
||||
getDisaterInfo();
|
||||
};
|
||||
//格式化时间
|
||||
const dateFormat = (date) => {
|
||||
return useDateFormat(date, 'YYYY-MM-DD').value;
|
||||
}
|
||||
//获取灾害列表
|
||||
const getDisaterInfo = () => {
|
||||
getPage(state.tableData.param.pageNum,state.tableData.param.pageSize,{"respondStatus":3,"chiefId":state.chiefId,"disasterType":state.searchName}).then(res=>{
|
||||
getPage(state.tableData.param.pageNum,state.tableData.param.pageSize,{"respondStatus":2,"chiefId":state.chiefId,"disasterType":state.searchName}).then(res=>{
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
|
@ -99,7 +110,7 @@ const onSubmit = () => {
|
|||
return false;
|
||||
}
|
||||
//将选中的灾害转为{"id":"","chiefId":""}格式
|
||||
const saveRes = state.multipleSelection.map(item=> ({id:item.id,chiefId:state.chiefId}))
|
||||
const saveRes = state.multipleSelection.map(item=> ({id:item.disasterId,chiefId:state.chiefId}))
|
||||
updateDisasterManage(saveRes).then(res=>{
|
||||
ElMessage.success("Management success")
|
||||
emit('callback');
|
||||
|
|
Loading…
Reference in New Issue