diff --git a/src/api/disasterInfo/index.js b/src/api/disasterInfo/index.js index f7ed885..c10ab83 100644 --- a/src/api/disasterInfo/index.js +++ b/src/api/disasterInfo/index.js @@ -1,19 +1,19 @@ import request from '/@/utils/request'; -import {moduleName} from '/@/utils/request'; +import { moduleName } from '/@/utils/request'; export function getList(params) { return request({ - url: '/api/'+moduleName+'/ui/disasterInfo/list', + url: '/api/' + moduleName + '/ui/disasterInfo/list', method: 'get', params, }); } -export function getPage(current,size,params) { +export function getPage(current, size, params) { return request({ - url: '/api/'+moduleName+'/ui/disasterInfo/list', + url: '/api/' + moduleName + '/ui/disasterInfo/list', method: 'get', - params:{ + params: { current, size, ...params @@ -21,17 +21,17 @@ export function getPage(current,size,params) { }); } -export function updateDisasterManage(data){ +export function updateDisasterManage(data) { return request({ - url: '/api/'+moduleName+'/ui/disasterInfo/updateBatch', + url: '/api/' + moduleName + '/ui/disasterInfo/updateBatch', method: 'put', data: data, }); } -export function removeManage(data){ +export function removeManage(data) { return request({ - url: '/api/'+moduleName+'/ui/disasterInfo/removeManage', + url: '/api/' + moduleName + '/ui/disasterInfo/removeManage', method: 'put', data: data, }); @@ -41,7 +41,7 @@ export function removeManage(data){ //review export function review(data) { return request({ - url: '/api/'+moduleName+'/ui/disasterInfo/review', + url: '/api/' + moduleName + '/ui/disasterInfo/review', method: 'post', data: data, }); @@ -50,28 +50,38 @@ export function review(data) { /** * 首页 dashborad */ -export function statistics(){ +export function statistics() { return request({ - url: '/api/'+moduleName+'/ui/disasterInfo/statistics', + url: '/api/' + moduleName + '/ui/disasterInfo/statistics', method: 'get' }); } -export const getUserList = (name,current,size) => { +export const getUserList = (name, current, size) => { return request({ - url: '/api/yyhouc-system-manager/user/list', - method: 'get', - params: { - name, - current, - size - } - }); + url: '/api/yyhouc-system-manager/user/list', + method: 'get', + params: { + name, + current, + size + } + }); } export function submit(data) { return request({ - url: '/api/'+moduleName+'/ui/disasterInfo/submit', + url: '/api/' + moduleName + '/ui/disasterInfo/submit', method: 'post', data, }); -} \ No newline at end of file +} + +export function responseEndedDisasterInfo(id) { + return request({ + url: '/api/' + moduleName + '/ui/disasterInfo/responseEndedDisasterInfo', + method: 'get', + params: { + id + } + }); +} diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index 84b7b25..b504124 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -1,41 +1,42 @@ --> - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - + - + - + - + - + - Point - Area - Edit - Clear + Point + Area + Edit + Clear - + Latitude: - + + Longitude: - + - + - + - + @@ -193,7 +154,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 } from '/@/api/disasterInfo/index'; +import { getList, review, responseEndedDisasterInfo } from '/@/api/disasterInfo/index'; import { getDictionary } from '/@/api/system/dictbiz'; import { useVariableStore } from '/@/stores/index.ts' //引入地图 @@ -223,6 +184,23 @@ const MapPage = defineAsyncComponent({ const onAllocation = (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) => { return useDateFormat(date, 'YYYY-MM-DD').value; } @@ -406,26 +384,27 @@ const getValue = (key) => { };