diff --git a/src/components/table/DisasterTable.vue b/src/components/table/DisasterTable.vue index 982ccb3..fe6835a 100644 --- a/src/components/table/DisasterTable.vue +++ b/src/components/table/DisasterTable.vue @@ -5,6 +5,11 @@ v-model="state.search.disasterType"> + + + + @@ -16,7 +21,7 @@ - + @@ -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; diff --git a/src/router/route.js b/src/router/route.js index 96e8da1..806bdc2 100644 --- a/src/router/route.js +++ b/src/router/route.js @@ -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: '普通管理员管理', }, }, diff --git a/src/views/dataService/multimediaData/index.vue b/src/views/dataService/multimediaData/index.vue index 63e54a5..f5d4c58 100644 --- a/src/views/dataService/multimediaData/index.vue +++ b/src/views/dataService/multimediaData/index.vue @@ -17,15 +17,15 @@ - - + + - + @@ -33,7 +33,7 @@ - + @@ -42,23 +42,23 @@ Search - - - - - Batch operation - + + + + + Batch operation + - + - baidu(中文) + baidu bing twitter weibo @@ -69,15 +69,7 @@ Read more - - + - Do you want to keep this data as response data? - Cancel @@ -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; } + diff --git a/src/views/dataService/pictureInfo/component/upload.vue b/src/views/dataService/pictureInfo/component/upload.vue index 4c55a6e..79ab822 100644 --- a/src/views/dataService/pictureInfo/component/upload.vue +++ b/src/views/dataService/pictureInfo/component/upload.vue @@ -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(() => { diff --git a/src/views/dataService/remoteSensingData/components/retrievalCondition.vue b/src/views/dataService/remoteSensingData/components/retrievalCondition.vue index 286015f..33d5a5f 100644 --- a/src/views/dataService/remoteSensingData/components/retrievalCondition.vue +++ b/src/views/dataService/remoteSensingData/components/retrievalCondition.vue @@ -18,38 +18,6 @@ - - - - - - - + - - - - - - - + + + + + + + - - - - - - - .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; } \ No newline at end of file diff --git a/src/views/responseManagement/dataUpload/index.vue b/src/views/responseManagement/dataUpload/index.vue index 299fb65..82a7189 100644 --- a/src/views/responseManagement/dataUpload/index.vue +++ b/src/views/responseManagement/dataUpload/index.vue @@ -3,20 +3,8 @@ - - - - - - - - - + + @@ -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(); } // 初始化灾害表格数据 diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index 5191785..a3a79b6 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -5,56 +5,34 @@ - - - + + + {{ getValue(scope.row.disasterType) }} - - - - + + {{ dateFormat(scope.row.disasterTime) }} - - + Awaiting approval Rejected - + Approve - - - - + + - - - - - + + + + {{ getValue(scope.row.disasterType) }} - - - - + + {{ dateFormat(scope.row.disasterTime) }} - - - - - - - - - + + + Approved Rejected Complete response - - + Allocation Response ended @@ -114,9 +83,69 @@ :total="state.tableData.total"> + + + + + + + + + + {{ getValue(scope.row.disasterType) }} + + + + + + + {{ dateFormat(scope.row.disasterTime) }} + + + + + + + + + + + + + + + + {{ getValue(scope.row.disasterType) }} + + + + + + + {{ dateFormat(scope.row.disasterTime) }} + + + + + + {{ dateFormat(scope.row.respondedTime) }} + + + + + + - + Point Area @@ -131,11 +160,24 @@ + - + + + + + + + + + + + Cancel @@ -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 diff --git a/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue b/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue index 9837df0..550bbe7 100644 --- a/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue +++ b/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue @@ -16,7 +16,12 @@ d - + + + + {{ dateFormat(scope.row.disasterTime) }} + + { 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');