diff --git a/src/api/data/otherData.js b/src/api/data/otherData.js index 6e6c838..ba7cd2e 100644 --- a/src/api/data/otherData.js +++ b/src/api/data/otherData.js @@ -81,4 +81,17 @@ export const deleteData = (id) => { id } }); -}; \ No newline at end of file +}; + +/** + * 修改实体数据 + * @param data + * @returns {Promise>} + */ +export const updateEntityData = (data) => { + return request({ + url: '/api/' + moduleName + '/ui/EntityData/updateEntityData', + method: 'post', + data: data + }); +}; diff --git a/src/views/dataService/otherData/component/upload.vue b/src/views/dataService/otherData/component/upload.vue index 64d6cad..29c6afa 100644 --- a/src/views/dataService/otherData/component/upload.vue +++ b/src/views/dataService/otherData/component/upload.vue @@ -1,6 +1,6 @@ + + + @@ -149,6 +153,7 @@ const onSubmit = () => { state.dataForm.append('remark', state.ruleForm.remark); state.dataForm.append('disasterId', state.disasterId); state.dataForm.append('visualFlag', state.ruleForm.visualFlag); + state.dataForm.append('title', state.ruleForm.title); for (let [a, b] of state.dataForm.entries()) { console.log(a, b, '--------------'); } diff --git a/src/views/dataService/otherData/index.vue b/src/views/dataService/otherData/index.vue index d324a51..ff8d2fd 100644 --- a/src/views/dataService/otherData/index.vue +++ b/src/views/dataService/otherData/index.vue @@ -6,7 +6,7 @@
- + @@ -50,8 +50,14 @@ - + + + + @@ -63,6 +69,7 @@ @@ -84,7 +91,7 @@ import en from 'element-plus/dist/locale/en.mjs' import type { TabsPaneContext } from 'element-plus'; import Upload from './component/upload.vue'; -import { getOtherDataPage, getDisasterPage, deleteData } from '/@/api/data/otherData.js' +import { getOtherDataPage, getDisasterPage, deleteData, updateEntityData } from '/@/api/data/otherData.js' const activeName = ref('first'); //复制内容 @@ -166,8 +173,8 @@ const getDisasterData = () => { state.disasterData.loading = true; getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => { state.disasterData.data = res.records; - state.disasterData.data.forEach(item=>{ - let date = item.disasterTime.slice(0,10); + state.disasterData.data.forEach(item => { + let date = item.disasterTime.slice(0, 10); item.disasterTime = date; }) state.disasterData.total = res.total; @@ -180,7 +187,7 @@ const getTableData = () => { state.tableData.loading = true; getOtherDataPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId": state.disasterId, "type": state.searchName, "isDeleted": 0 }).then(res => { console.log(res); - + state.tableData.data = res.records; state.tableData.total = res.total; }) @@ -237,6 +244,17 @@ const del = (row) => { }) .catch(() => { }); }; + + + +// 删除其他数据 +const pub = (row) => { + console.log(row, "发布信息"); + updateEntityData().then(da => { + + }) +}; + // 分页改变 const onHandleDisasterSizeChange = (val) => { state.disasterData.param.pageSize = val; @@ -280,6 +298,7 @@ onMounted(() => { } } } + .mt15 { display: flex; justify-content: end; diff --git a/src/views/dataService/pictureInfo/component/upload.vue b/src/views/dataService/pictureInfo/component/upload.vue index 3a7a01a..4c55a6e 100644 --- a/src/views/dataService/pictureInfo/component/upload.vue +++ b/src/views/dataService/pictureInfo/component/upload.vue @@ -2,17 +2,8 @@ - +
Drop file here or click to upload @@ -24,69 +15,67 @@ + + + - - + + - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/dataService/pictureInfo/index.vue b/src/views/dataService/pictureInfo/index.vue index 39b678e..d82d1b4 100644 --- a/src/views/dataService/pictureInfo/index.vue +++ b/src/views/dataService/pictureInfo/index.vue @@ -65,16 +65,6 @@ -