Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin into main
This commit is contained in:
commit
c9743536fa
|
@ -75,3 +75,13 @@ export function submit(data) {
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function responseEndedDisasterInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/api/' + moduleName + '/ui/disasterInfo/responseEndedDisasterInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
</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>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
<el-button size="small" text type="primary"
|
||||||
|
@click="onOpenEditRole('edit', scope.row)">Approve</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="Approved" 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 type="index" label="ID" width="50" />
|
|
||||||
<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></el-table-column>
|
||||||
<!-- <el-table-column prop="Administrator" label="Administrator" 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="organization" label="Organization" show-overflow-tooltip></el-table-column>
|
||||||
|
@ -79,112 +80,72 @@
|
||||||
<!-- <el-table-column prop="Affected country" label="Affected country" 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="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="Latitude" label="Latitude" show-overflow-tooltip></el-table-column> -->
|
||||||
<el-table-column prop="disasterTime"
|
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip>
|
||||||
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"
|
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip></el-table-column>
|
||||||
label="Answer"
|
|
||||||
show-overflow-tooltip></el-table-column>
|
|
||||||
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
|
<!-- <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 prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
|
||||||
<el-table-column prop="respondStatus"
|
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
|
||||||
label="Response status"
|
|
||||||
show-overflow-tooltip>
|
|
||||||
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info"
|
<el-tag type="info" v-if="scope.row.respondStatus === 2">Approved</el-tag>
|
||||||
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>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="Operate"
|
<el-table-column width="200" prop="Operate" label="Operate" show-overflow-tooltip>
|
||||||
label="Operate"
|
|
||||||
show-overflow-tooltip>
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small"
|
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocation</el-button>
|
||||||
text
|
<el-button size="small" text type="danger" @click="responseEnded(scope.row)">Response ended</el-button>
|
||||||
type="primary"
|
|
||||||
@click="onAllocation(scope.row)">Allocation</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange"
|
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||||
@current-change="onHandleCurrentChange"
|
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
|
||||||
class="mt15"
|
v-model:page-size="state.tableData.param.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
: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">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="state.dialogVisible"
|
<el-dialog v-model="state.dialogVisible" title="Approval" width="30%">
|
||||||
title="Approval"
|
|
||||||
width="30%">
|
|
||||||
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
<el-container style="margin-top: -2%;margin-bottom: 2%;">
|
||||||
<el-radio v-model="state.radio"
|
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio>
|
||||||
label='1'
|
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio>
|
||||||
@click="mapEvents('1')">Point</el-radio>
|
<el-radio v-model="state.radio" label='3' @click="mapEvents('3')">Edit</el-radio>
|
||||||
<el-radio v-model="state.radio"
|
<el-button type="primary" style="margin-left: 5%;" @click="ClearSubmit">Clear</el-button>
|
||||||
label='2'
|
|
||||||
@click="mapEvents('2')">Area</el-radio>
|
|
||||||
<el-radio v-model="state.radio"
|
|
||||||
label='3'
|
|
||||||
@click="mapEvents('3')">Edit</el-radio>
|
|
||||||
<el-button type="primary"
|
|
||||||
style="margin-left: 5%;"
|
|
||||||
@click="ClearSubmit">Clear</el-button>
|
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-container style="margin-top: 2%;margin-bottom: 2%;"
|
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio === '1' ? true : false">
|
||||||
v-if="state.radio==='1'?true:false">
|
|
||||||
<span style="line-height: 35px;"> Latitude:</span>
|
<span style="line-height: 35px;"> Latitude:</span>
|
||||||
<el-input placeholder="wait……"
|
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly">
|
||||||
style="height:35px;margin-right: 1%;"
|
</el-input>
|
||||||
v-model="state.dislat"
|
|
||||||
readonly="readonly"> </el-input>
|
|
||||||
<span style="line-height: 35px;">Longitude:</span>
|
<span style="line-height: 35px;">Longitude:</span>
|
||||||
<el-input placeholder="wait……"
|
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
|
||||||
style="height:35px;"
|
|
||||||
v-model="state.dislon"
|
|
||||||
readonly="readonly"></el-input>
|
|
||||||
</el-container>
|
</el-container>
|
||||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;"
|
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||||
ref="mapRef"></MapPage>
|
|
||||||
<el-form-item label="Disaster Time">
|
<el-form-item label="Disaster Time">
|
||||||
<el-date-picker v-model="state.edit.disasterTime"
|
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
|
||||||
type="date"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
placeholder="Select date and time" />
|
placeholder="Select date and time" />
|
||||||
</el-form-item>
|
</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>
|
||||||
<el-button type="danger"
|
<el-button type="danger" @click="reviews(1)">
|
||||||
@click="reviews(1)">
|
|
||||||
Reject
|
Reject
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary"
|
<el-button type="primary" @click="reviews(2)">
|
||||||
@click="reviews(2)">
|
|
||||||
Approve
|
Approve
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<selectUser ref="select"
|
<selectUser ref="select" @callback="getTableData"></selectUser>
|
||||||
@callback="getTableData"></selectUser>
|
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -193,7 +154,7 @@
|
||||||
import en from 'element-plus/dist/locale/en.mjs'
|
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 } from '/@/api/disasterInfo/index';
|
import { getList, review, responseEndedDisasterInfo } from '/@/api/disasterInfo/index';
|
||||||
import { getDictionary } from '/@/api/system/dictbiz';
|
import { getDictionary } from '/@/api/system/dictbiz';
|
||||||
import { useVariableStore } from '/@/stores/index.ts'
|
import { useVariableStore } from '/@/stores/index.ts'
|
||||||
//引入地图
|
//引入地图
|
||||||
|
@ -223,6 +184,23 @@ const MapPage = defineAsyncComponent({
|
||||||
const onAllocation = (row) => {
|
const onAllocation = (row) => {
|
||||||
select.value.openDialog(row)
|
select.value.openDialog(row)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const responseEnded = (row) => {
|
||||||
|
ElMessageBox.confirm(`Confirm completion of response?`, 'Prompt', {
|
||||||
|
confirmButtonText: 'Yes',
|
||||||
|
cancelButtonText: 'No',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
responseEndedDisasterInfo(row.id).then((da) => {
|
||||||
|
ElMessage.success('Operation successful');
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const dateFormat = (date) => {
|
const dateFormat = (date) => {
|
||||||
return useDateFormat(date, 'YYYY-MM-DD').value;
|
return useDateFormat(date, 'YYYY-MM-DD').value;
|
||||||
}
|
}
|
||||||
|
@ -422,6 +400,7 @@ const getValue = (key) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mt15 {
|
.mt15 {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
|
|
Loading…
Reference in New Issue