From aae226cb7c601097fde64fb90944b2db3ea52bc2 Mon Sep 17 00:00:00 2001 From: liyuchen <791867849@qq.com> Date: Fri, 14 Apr 2023 09:23:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=89=8D=E7=BC=80-liyuchen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/response/administrator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/response/administrator.js b/src/api/response/administrator.js index a35995d..7233002 100644 --- a/src/api/response/administrator.js +++ b/src/api/response/administrator.js @@ -35,7 +35,7 @@ export const addAdmin = (data) => { export const remove = (ids) => { return request({ - url: '/api/' + moduleName + '/administrator/delete', + url: '/api/' + moduleName + '/ui/administrator/delete', method: 'delete', params: { ids, From 16a70ab7d8d95a038c0df37c1f08fdcc690545b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Fri, 14 Apr 2023 14:47:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../responseManagement/userResponse/index.vue | 73 ++++++++++++++++++- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index b5c4fee..39461f4 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -130,9 +130,9 @@ Latitude: - + Longitude: - + @@ -156,7 +156,7 @@ + + + + \ No newline at end of file diff --git a/src/views/dataService/pictureInfo/component/upload.vue b/src/views/dataService/pictureInfo/component/upload.vue index e7b7f4b..3a7a01a 100644 --- a/src/views/dataService/pictureInfo/component/upload.vue +++ b/src/views/dataService/pictureInfo/component/upload.vue @@ -58,10 +58,6 @@ const state = reactive({ isShowDialog: false, isLoading:false, ruleForm: { - name: '', //标样名称 - code: '',//标样编号 - states: '',//标样状态 - tableData: [], }, tableData: [], //字典值 diff --git a/src/views/dataService/pictureInfo/index.vue b/src/views/dataService/pictureInfo/index.vue index 256004e..e76d3a8 100644 --- a/src/views/dataService/pictureInfo/index.vue +++ b/src/views/dataService/pictureInfo/index.vue @@ -1,5 +1,6 @@ + + \ No newline at end of file diff --git a/src/views/dataService/visualData/component/editWordCloudForm.vue b/src/views/dataService/visualData/component/editWordCloudForm.vue new file mode 100644 index 0000000..f6a6358 --- /dev/null +++ b/src/views/dataService/visualData/component/editWordCloudForm.vue @@ -0,0 +1,129 @@ + + + + + \ No newline at end of file diff --git a/src/views/dataService/visualData/component/hotspotForm.vue b/src/views/dataService/visualData/component/hotspotForm.vue index 78e4b11..99c72b4 100644 --- a/src/views/dataService/visualData/component/hotspotForm.vue +++ b/src/views/dataService/visualData/component/hotspotForm.vue @@ -4,7 +4,7 @@ - + diff --git a/src/views/dataService/visualData/index.vue b/src/views/dataService/visualData/index.vue index ad5d532..88e1e11 100644 --- a/src/views/dataService/visualData/index.vue +++ b/src/views/dataService/visualData/index.vue @@ -1,5 +1,6 @@ @@ -137,24 +156,15 @@ import type { TabsPaneContext } from 'element-plus'; import HotspotForm from './component/hotspotForm.vue'; import WordClouds from './component/wordCloudForm.vue'; +import EditHotspotForm from './component/editHotspotForm.vue'; +import EditWordCloudsForm from './component/editWordCloudForm.vue'; import {getWordClouds,getHotspot,getDisasterPage,delData} from '/@/api/data/visualData.js'; +import en from 'element-plus/dist/locale/en.mjs' const activeName = ref('first'); const hotspotRef = ref(); const wordCloudsRef = ref(); -const handleClick = (tab) => { - state.tabVal = tab; - state. tableData={ - data: [], - total: 0, - loading: false, - param: { - search: '', - pageNum: 1, - pageSize: 10, - }, - } - getTableData(); -}; +const editHotspotRef = ref(); +const editWordCloudsRef = ref(); //复制内容 import { defineAsyncComponent, reactive, onMounted, ref } from 'vue'; @@ -166,6 +176,8 @@ const uploadRef = ref(); // 定义变量内容 const roleDialogRef = ref(); const state = reactive({ + multipleWord:[], + multipleHotspot:[], tabVal:'first', disasterId:null, disasterData: { @@ -189,6 +201,28 @@ const state = reactive({ }, }, }); + +const handleSelectionChange = (val) => { + state.multipleWord = val +} + +const handleSelectionHotspotChange = (val) => { + state.multipleHotspot = val +} +const handleClick = (tab) => { + state.tabVal = tab; + state. tableData={ + data: [], + total: 0, + loading: false, + param: { + search: '', + pageNum: 1, + pageSize: 10, + }, + } + getTableData(); +}; const auditData = (row) => { let id = row.id auditRef.value.openDialog([{"id":id}]); @@ -262,10 +296,48 @@ const uploadData = () => { } state.tabVal == 'first' ? wordCloudsRef.value.openDialog(state.disasterId) : hotspotRef.value.openDialog(state.disasterId); }; -// 打开修改角色弹窗 -const onOpenEditRole = (type, row) => { - roleDialogRef.value.openDialog(type, row); +// 打开修改热点弹窗 +const editHotspot = (row) => { + editHotspotRef.value.openDialog(row); }; +// 打开修改词云弹窗 +const editWordCloud = (row) => { + editWordCloudsRef.value.openDialog(row); +}; +//批量删除词云或者热点数据 +const batchDel = () => { + if(state.tabVal == 'first' && state.multipleWord.length == 0){ + ElMessage.warning("Select the data to be operated first"); + return false; + } + if(state.tabVal == 'second' && state.multipleHotspot.length == 0){ + ElMessage.warning("Select the data to be operated first"); + return false; + } + ElMessageBox.confirm(`This action batch deletes the data,Whether to continue?`, 'tip', { + confirmButtonText: 'confirm', + cancelButtonText: 'cancel', + type: 'warning', + }) + .then(() => { + if(state.tabVal == 'first'){ + //删除词云 + let id = state.multipleWord.map(item=>item.id) + delData(id.join(),1).then(res=>{ + getTableData(); + ElMessage.success('delete successfully'); + }) + }else{ + //删除热点 + let id = state.multipleHotspot.map(item=>item.id) + delData(id.join(),2).then(res=>{ + getTableData(); + ElMessage.success('delete successfully'); + }) + } + }) + .catch(() => {}); +} // 删除词云 const delWordCloud = (row) => { ElMessageBox.confirm(`This action deletes the word cloud:“${row.word}”,Whether to continue?`, 'tip', { diff --git a/src/views/responseManagement/dataUpload/index.vue b/src/views/responseManagement/dataUpload/index.vue index 292b704..38e607a 100644 --- a/src/views/responseManagement/dataUpload/index.vue +++ b/src/views/responseManagement/dataUpload/index.vue @@ -14,8 +14,11 @@ - +
+ + @@ -105,6 +118,7 @@ const auditRef = ref(); // 定义变量内容 const roleDialogRef = ref(); const state = reactive({ + multipleSelection:[], disasterId:null, disasterData: { data: [], @@ -127,6 +141,17 @@ const state = reactive({ }, }, }); +const handleSelectionChange = (val) => { + state.multipleSelection = val +} +//批量审核普通管理员数据 +const batchAudit = () => { + if(state.multipleSelection.length == 0){ + ElMessage.warning("Select the data to be operated first"); + return false; + } + auditRef.value.openDialog(state.multipleSelection); +} const auditData = (row) => { let id = row.id auditRef.value.openDialog([{"id":id}]); diff --git a/src/views/systemManagement/administrator/index.vue b/src/views/systemManagement/administrator/index.vue index 7f3ad17..86ee0f7 100644 --- a/src/views/systemManagement/administrator/index.vue +++ b/src/views/systemManagement/administrator/index.vue @@ -10,16 +10,18 @@ search - + batch audit +
+ @@ -90,6 +92,7 @@ const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialo // 定义变量内容 const roleDialogRef = ref(); const state = reactive({ + multipleSelection:[], searchName:'', tableData: { data: [], @@ -102,6 +105,9 @@ const state = reactive({ }, }, }); +const handleSelectionChange = (val) => { + state.multipleSelection = val +} //审核管理者可以管理这个灾害 const auditManager = (row) => { auditRef.value.openDialog([{...row}]); @@ -138,7 +144,15 @@ const addUser = () => { const onOpenEditRole = (type, row) => { roleDialogRef.value.openDialog(type, row); }; -// 删除角色 +//批量审核普通管理员数据 +const batchAudit = () => { + if(state.multipleSelection.length == 0){ + ElMessage.warning("Select the data to be operated first"); + return false; + } + auditRef.value.openDialog(state.multipleSelection); +} +// 删除普通管理员 const deleteUser = (row) => { ElMessageBox.confirm(`This operation will delete the user:“${row.name}”,Whether to continue?`, 'tip', { confirmButtonText: 'confirm', diff --git a/src/views/systemManagement/chiefAdministrator/index.vue b/src/views/systemManagement/chiefAdministrator/index.vue index f7644fb..254201c 100644 --- a/src/views/systemManagement/chiefAdministrator/index.vue +++ b/src/views/systemManagement/chiefAdministrator/index.vue @@ -16,10 +16,18 @@ add + + + + + batch delete + + @@ -94,6 +102,7 @@ const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialo // 定义变量内容 const roleDialogRef = ref(); const state = reactive({ + multipleSelection:[], searchName:'', tableData: { data: [], @@ -106,6 +115,9 @@ const state = reactive({ }, }, }); +const handleSelectionChange = (val) => { + state.multipleSelection = val +} // 初始化表格数据 const getTableData = () => { state.tableData.loading = true; @@ -118,7 +130,7 @@ const getTableData = () => { state.tableData.loading = false; }, 500); }; -// 打开新增角色弹窗 +// 打开新增chief管理员弹窗 const addUser = () => { administratorRef.value.openDialog(); }; @@ -126,7 +138,27 @@ const addUser = () => { const onOpenEditRole = (type, row) => { roleDialogRef.value.openDialog(type, row); }; -// 删除角色 +//批量删除chief管理员数据 +const batchDel = () => { + if(state.multipleSelection.length == 0){ + ElMessage.warning("Select the data to be operated first"); + return false; + } + ElMessageBox.confirm(`This action batch deletes the chief data,Whether to continue?`, 'tip', { + confirmButtonText: 'confirm', + cancelButtonText: 'cancel', + type: 'warning', + }) + .then(() => { + let id = state.multipleSelection.map(item=>item.id) + remove(id.join()).then(res=>{ + getTableData(); + ElMessage.success('delete successfully'); + }) + }) + .catch(() => {}); +} +// 删除chief管理员数据 const deleteUser = (row) => { ElMessageBox.confirm(`This operation will delete the user:“${row.name}”,Whether to continue?`, 'tip', { confirmButtonText: 'confirm',