glj-代码提交
This commit is contained in:
parent
186519cc7b
commit
209340dbeb
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
highlight-current-row @row-click="tableClick">
|
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="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="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>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable></el-table-column>
|
||||||
|
|
|
@ -17,15 +17,15 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<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: 90vh;">
|
||||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<div class="system-user-search " style="display: flex;margin-left: 10px;margin-top: 10px;margin-bottom:-15px ">
|
||||||
<el-form-item label="Type" label-width="100px">
|
<el-form-item label="Type">
|
||||||
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
||||||
size="default" clearable @change="getTableData(); state.queryTitle = ''">
|
size="default" clearable @change="getTableData(); state.queryTitle = ''">
|
||||||
<el-option value="1" label="News"></el-option>
|
<el-option value="1" label="News"></el-option>
|
||||||
<el-option value="2" label="SocialMedia"></el-option>
|
<el-option value="2" label="SocialMedia"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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"
|
<el-select v-model=" state.srarchType " placeholder="Please select data type" style="max-width: 200px"
|
||||||
size="default" clearable>
|
size="default" clearable>
|
||||||
<el-option value="0" label="Awaiting approval"></el-option>
|
<el-option value="0" label="Awaiting approval"></el-option>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<el-option value="2" label="Rejected"></el-option>
|
<el-option value="2" label="Rejected"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-input v-model=" state.queryTitle " placeholder="Please enter a title"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button size="default" type="primary" class="ml10" @click=" getTableData ">
|
<el-button size="default" type="primary" class="ml10" @click=" getTableData ">
|
||||||
|
@ -42,13 +42,13 @@
|
||||||
</el-icon>
|
</el-icon>
|
||||||
Search
|
Search
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="default" type="success" class="ml10" @click=" openDialog ">
|
|
||||||
<el-icon>
|
|
||||||
<ele-Upload />
|
|
||||||
</el-icon>
|
|
||||||
Batch operation
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</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 "
|
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
|
||||||
@selection-change=" handleSelectionChange " style="width: 100%; height: 600px;">
|
@selection-change=" handleSelectionChange " style="width: 100%; height: 600px;">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<el-table-column prop="content" label="Content" 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>
|
<el-table-column prop="type" label="Type" show-overflow-tooltip>
|
||||||
<template #default=" scope ">
|
<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 == '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 == 0 ">twitter</el-tag>
|
||||||
<el-tag type="info" v-if=" state.searchName == '2' && scope.row.type == 1 ">weibo</el-tag>
|
<el-tag type="info" v-if=" state.searchName == '2' && scope.row.type == 1 ">weibo</el-tag>
|
||||||
|
@ -69,15 +69,6 @@
|
||||||
<a :href=" scope.row.link " target="_blank">Read more</a>
|
<a :href=" scope.row.link " target="_blank">Read more</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="Operate" label="Operate" show-overflow-tooltip>
|
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||||
<template #default=" scope ">
|
<template #default=" scope ">
|
||||||
<el-button size="small" text type="info" v-if=" scope.row.status == 0 "
|
<el-button size="small" text type="info" v-if=" scope.row.status == 0 "
|
||||||
|
@ -99,15 +90,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-dialog v-model=" state.dialogVisible " title="Review" width="30%">
|
<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?
|
Do you want to keep this data as response data?
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click=" state.dialogVisible = false ">Cancel</el-button>
|
<el-button @click=" state.dialogVisible = false ">Cancel</el-button>
|
||||||
|
@ -375,4 +358,5 @@ onMounted(() => {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -47,6 +47,7 @@ const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
|
title:null,
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//字典值
|
//字典值
|
||||||
|
@ -133,6 +134,9 @@ const onSubmit = () => {
|
||||||
console.log(a, b, '--------------');
|
console.log(a, b, '--------------');
|
||||||
}
|
}
|
||||||
uploadData(state.dataForm).then(res => {
|
uploadData(state.dataForm).then(res => {
|
||||||
|
state.dataForm = new FormData(),
|
||||||
|
state.fileArray = [];
|
||||||
|
upFileRef.value.clearFiles();
|
||||||
ElMessage.success("Upload successfully");
|
ElMessage.success("Upload successfully");
|
||||||
emit('callback');
|
emit('callback');
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
|
|
@ -18,38 +18,6 @@
|
||||||
<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:80vh;">
|
||||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<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-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-tree-select v-model="state.value_satelliteType" :data="state.options_satelliteType" multiple
|
<el-tree-select v-model="state.value_satelliteType" :data="state.options_satelliteType" multiple
|
||||||
|
@ -73,61 +41,22 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
<!-- 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 type="index" label="Index" align="center" width="80"></el-table-column>
|
||||||
<el-table-column prop="satelliteCode" label="Satellite code" align="center"
|
<el-table-column prop="satelliteCode" label="Satellite code" width="170" align="center"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="productTime" label="Product time" align="center"
|
<el-table-column prop="productTime" label="Product time" width="170" align="center"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="productBandsNum" label="Product bands num" align="center"
|
<el-table-column prop="productBandsNum" label="Product bands num" width="200" align="center"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="productResolution" label="Product resolution(m)" align="center"
|
<el-table-column prop="productResolution" label="Product resolution(m)" width="220" align="center"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center"
|
<el-table-column prop="cloudCover" label="Cloud cover(%)" align="center" width="180"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="sourceOrganization" label="Source organization" align="center"
|
<el-table-column prop="sourceOrganization" label="Source organization" width="200" align="center"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="downloadUrl" label="Download url" align="center" show-overflow-tooltip>
|
<el-table-column prop="downloadUrl" label="Download url" align="center" width="200" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</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-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
<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"
|
style="margin-right: 20px;" :page-sizes="[10, 20, 30]" background v-model:current-page="state.tableData.param.pageNum"
|
||||||
|
|
|
@ -501,7 +501,7 @@ defineExpose({
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.rsSelect {
|
.rsSelect {
|
||||||
border: 1px solid #040728;
|
border: 1px solid #f7f7fa;
|
||||||
height: 52rem;
|
height: 52rem;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|
|
@ -3,20 +3,8 @@
|
||||||
<el-config-provider :locale="en">
|
<el-config-provider :locale="en">
|
||||||
<el-row :gutter="22">
|
<el-row :gutter="22">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<disasterTable @childClick="tableClick"></disasterTable>
|
||||||
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>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
|
@ -77,6 +65,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
import Audit from './component/audit.vue';
|
import Audit from './component/audit.vue';
|
||||||
|
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||||
const auditRef = ref();
|
const auditRef = ref();
|
||||||
|
@ -150,8 +139,8 @@ const formatSizeUnits = (size) => {
|
||||||
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||||
}
|
}
|
||||||
//灾害表格点击事件
|
//灾害表格点击事件
|
||||||
const tableClick = (row, column, event) => {
|
const tableClick = (i) => {
|
||||||
state.disasterId = row.disasterId;
|
state.disasterId = i.disasterId;
|
||||||
getTableData();
|
getTableData();
|
||||||
}
|
}
|
||||||
// 初始化灾害表格数据
|
// 初始化灾害表格数据
|
||||||
|
|
|
@ -5,56 +5,34 @@
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
|
||||||
<el-tab-pane label="Unapproved" name="first">
|
<el-tab-pane label="Unapproved" name="first">
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
<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="username" label="User name" show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="organization" label="Organization" show-overflow-tooltip></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>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip sortable>
|
||||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip
|
||||||
<!-- <el-table-column prop="affectedCountry" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
sortable></el-table-column>
|
||||||
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable>
|
||||||
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
|
||||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 格式化去除时分秒 -->
|
<!-- 格式化去除时分秒 -->
|
||||||
{{ dateFormat(scope.row.disasterTime) }}
|
{{ dateFormat(scope.row.disasterTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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 sortable>
|
||||||
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
<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 === 0">Awaiting approval</el-tag>
|
||||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary"
|
<el-button size="small" text type="primary"
|
||||||
@click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
@click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
<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
|
: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">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-tab-pane>
|
</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 :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="username" label="User name" show-overflow-tooltip sortable></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 sortable></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 sortable></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 sortable>
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
|
||||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterKeyword" label="Disaster keyword" show-overflow-tooltip
|
||||||
<!-- <el-table-column prop="Affected country" label="Affected country" show-overflow-tooltip></el-table-column> -->
|
sortable></el-table-column>
|
||||||
<!-- <el-table-column prop="Longitude" label="Longitude" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable>
|
||||||
<el-table-column prop="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
|
||||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 格式化去除时分秒 -->
|
<!-- 格式化去除时分秒 -->
|
||||||
{{ dateFormat(scope.row.disasterTime) }}
|
{{ dateFormat(scope.row.disasterTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column prop="reviewTime" label="reviewTime" show-overflow-tooltip />
|
<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>
|
||||||
|
|
||||||
<!-- <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>
|
|
||||||
|
|
||||||
|
|
||||||
<template #default="scope">
|
<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 === 2">Approved</el-tag>
|
||||||
<el-tag type="info" v-if="scope.row.respondStatus === 1">Rejected</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>
|
<el-tag type="success" v-if="scope.row.respondStatus === 3">Complete response</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column width="200" prop="Operate" label="Operate" show-overflow-tooltip sortable>
|
||||||
<el-table-column width="200" prop="Operate" label="Operate" show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocation</el-button>
|
<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>
|
<el-button size="small" text type="danger" @click="responseEnded(scope.row)">Response ended</el-button>
|
||||||
|
@ -114,9 +83,69 @@
|
||||||
:total="state.tableData.total">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-tab-pane>
|
</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>
|
</el-tabs>
|
||||||
</div>
|
</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-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='1' @click="mapEvents('1')">Point</el-radio>
|
||||||
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</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-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||||
</el-container>
|
</el-container>
|
||||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||||
|
|
||||||
<el-form-item label="Disaster Time">
|
<el-form-item label="Disaster Time">
|
||||||
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||||
placeholder="Select date and time" />
|
placeholder="Select date and time" />
|
||||||
</el-form-item>
|
</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>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">Cancel</el-button>
|
<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 { reactive, onMounted, ref, nextTick, watchEffect, defineAsyncComponent } from 'vue';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
import { getList, review, responseEndedDisasterInfo } from '/@/api/disasterInfo/index';
|
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 { useVariableStore } from '/@/stores/index.ts'
|
||||||
//引入地图
|
//引入地图
|
||||||
import Map from '/@/components/Map.vue';
|
import Map from '/@/components/Map.vue';
|
||||||
|
@ -176,14 +218,17 @@ const variableStore = useVariableStore();
|
||||||
const mapRef = ref();
|
const mapRef = ref();
|
||||||
const activeName = ref('first');
|
const activeName = ref('first');
|
||||||
const select = ref();
|
const select = ref();
|
||||||
|
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
state.selectName = tab.props.name;
|
state.selectName = tab.props.name;
|
||||||
getTableData();
|
getTableData();
|
||||||
};
|
};
|
||||||
|
|
||||||
const MapPage = defineAsyncComponent({
|
const MapPage = defineAsyncComponent({
|
||||||
loader: () => import('/@/components/Map.vue'),
|
loader: () => import('/@/components/Map.vue'),
|
||||||
delay: 200,
|
delay: 200,
|
||||||
})
|
})
|
||||||
|
|
||||||
const onAllocation = (row) => {
|
const onAllocation = (row) => {
|
||||||
select.value.openDialog(row)
|
select.value.openDialog(row)
|
||||||
};
|
};
|
||||||
|
@ -196,8 +241,9 @@ const responseEnded = (row) => {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
responseEndedDisasterInfo(row.id).then((da) => {
|
responseEndedDisasterInfo(row.disasterId).then((da) => {
|
||||||
ElMessage.success('Operation successful');
|
getTableData();
|
||||||
|
ElMessage.success('success');
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
|
@ -210,6 +256,8 @@ const dateFormat = (date) => {
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const roleDialogRef = ref();
|
const roleDialogRef = ref();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
//灾害类型字典项
|
||||||
|
dictList: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableData: {
|
tableData: {
|
||||||
data: [],
|
data: [],
|
||||||
|
@ -236,6 +284,10 @@ const getTableData = () => {
|
||||||
//根据activeName的值来判断是哪个tab页
|
//根据activeName的值来判断是哪个tab页
|
||||||
if (state.selectName === 'first') {
|
if (state.selectName === 'first') {
|
||||||
state.tableData.param.respondStatus = 0;
|
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 {
|
} else {
|
||||||
state.tableData.param.respondStatus = 3;
|
state.tableData.param.respondStatus = 3;
|
||||||
}
|
}
|
||||||
|
@ -262,11 +314,6 @@ const onOpenEditRole = (type, row) => {
|
||||||
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly)
|
||||||
}
|
}
|
||||||
state.wktPoint_Poly = mapRef.value.mapOperations.wktParseToMap(row.geometry)
|
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')
|
mapEvents('1')
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
@ -314,15 +361,16 @@ const reviews = (index) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
state.edit.respondStatus = 1;
|
state.edit.respondStatus = 1;
|
||||||
} else {
|
} else {
|
||||||
state.edit.respondStatus = 3;
|
state.edit.respondStatus = 2;
|
||||||
}
|
}
|
||||||
state.edit.geometry = variableStore.layerGroupPoint === null ? variableStore.layerGroupPoly : variableStore.layerGroupPoint;
|
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.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00";
|
||||||
|
state.edit.id = state.edit.disasterId;
|
||||||
review(state.edit).then((res) => {
|
review(state.edit).then((res) => {
|
||||||
ElMessage.success('success');
|
|
||||||
state.dialogVisible = false;
|
state.dialogVisible = false;
|
||||||
getTableData();
|
getTableData();
|
||||||
|
ElMessage.success('success');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 分页改变
|
// 分页改变
|
||||||
|
@ -379,7 +427,9 @@ onMounted(() => {
|
||||||
getDictionary({ code: 'disaster' }).then((res) => {
|
getDictionary({ code: 'disaster' }).then((res) => {
|
||||||
state.disasterTypeList = res;
|
state.disasterTypeList = res;
|
||||||
});
|
});
|
||||||
|
getListNew({ code: 'disaster' }).then(res => {
|
||||||
|
state.dictList = res[0].children
|
||||||
|
})
|
||||||
});
|
});
|
||||||
const getValue = (key) => {
|
const getValue = (key) => {
|
||||||
//返回state.disasterTypeLis 对应的value
|
//返回state.disasterTypeLis 对应的value
|
||||||
|
|
|
@ -16,7 +16,12 @@
|
||||||
<el-table-column property="dictValue" label="DisasterType" width="150" />
|
<el-table-column property="dictValue" label="DisasterType" width="150" />
|
||||||
<el-table-column property="disasterCountry" label="DisasterCountry" width="200" />
|
<el-table-column property="disasterCountry" label="DisasterCountry" width="200" />
|
||||||
<el-table-column property="disasterKeyword" label="DisasterKeyword" width="200" />d
|
<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-column property="disasterLevel" label="DisasterLevel" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange"
|
<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 {getPage,updateDisasterManage} from '/@/api/disasterInfo/index.js';
|
||||||
import {reactive, ref} from "vue";
|
import {reactive, ref} from "vue";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import { useDateFormat } from '@vueuse/shared';
|
||||||
|
|
||||||
const emit = defineEmits(['callback']);
|
const emit = defineEmits(['callback']);
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
@ -77,9 +84,13 @@ const openDialog = (chiefId) => {
|
||||||
state.chiefId = chiefId;
|
state.chiefId = chiefId;
|
||||||
getDisaterInfo();
|
getDisaterInfo();
|
||||||
};
|
};
|
||||||
|
//格式化时间
|
||||||
|
const dateFormat = (date) => {
|
||||||
|
return useDateFormat(date, 'YYYY-MM-DD').value;
|
||||||
|
}
|
||||||
//获取灾害列表
|
//获取灾害列表
|
||||||
const getDisaterInfo = () => {
|
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.data = res.records;
|
||||||
state.tableData.total = res.total;
|
state.tableData.total = res.total;
|
||||||
})
|
})
|
||||||
|
@ -99,7 +110,7 @@ const onSubmit = () => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//将选中的灾害转为{"id":"","chiefId":""}格式
|
//将选中的灾害转为{"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=>{
|
updateDisasterManage(saveRes).then(res=>{
|
||||||
ElMessage.success("Management success")
|
ElMessage.success("Management success")
|
||||||
emit('callback');
|
emit('callback');
|
||||||
|
|
Loading…
Reference in New Issue