From f30a3ff7dcfb2ed40d7489c987cd220e4c393aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Tue, 25 Apr 2023 17:21:21 +0800 Subject: [PATCH 01/11] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map.vue | 15 ++++++++++++- src/utils/request.js | 2 +- .../responseManagement/userResponse/index.vue | 21 ++++++++++++------- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/components/Map.vue b/src/components/Map.vue index 69608f1..0751013 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -59,6 +59,10 @@ onMounted(() => { const mapOperations = { wktParseToMap: (res) => { let layer = omnivore.wkt.parse(res) + if(featureLayerG_area.getLayers().length != 0||featureLayerG_point.getLayers().length != 0){ + + return; + } layer.addTo(featureLayerG_point) let attr = Object.values(layer._layers) @@ -66,9 +70,12 @@ const mapOperations = { // 判断审核的数据类型,如果是点则直接flyTo if (attr[0].feature.geometry.type.indexOf('Polygon') == -1) { homeMap.flyTo([attr[0].feature.geometry.coordinates[1], attr[0].feature.geometry.coordinates[0]], 3) + variableStore.layerGroupPoint=res; + return {'layer':layer,'location':[attr[0].feature.geometry.coordinates[1],attr[0].feature.geometry.coordinates[0]]} } // 判断审核的数据类型,如果是面则计算中心点 然后再fly else { + variableStore.layerGroupPoly=res; let polygons = []; for (let i = 0; i < attr[0].feature.geometry.coordinates.length; i++) { console.log(attr[0].feature.geometry.coordinates[i]) @@ -83,8 +90,9 @@ const mapOperations = { let final_center = turf.center(turf.featureCollection(features)) // console.log(final_center) homeMap.flyTo([final_center.geometry.coordinates[1], final_center.geometry.coordinates[0]], 3) + return {'layer':layer,'location':null} } - return layer + // return layer }, /** 添加点标注 @@ -313,6 +321,11 @@ const mapOperations = { }) e.layer.addTo(featureLayerG_area) polygon = e.layer + let features = featureLayerG_area.toGeoJSON().features + variableStore.layerGroupPoly = features.map(function (feature) { + return WKT.convert(feature.geometry) + }) + variableStore.layerGroupPoly = variableStore.layerGroupPoly.join('\n') }) // featureLayerG_area.clearLayers() // variableStore.layerGroupPoly=null; diff --git a/src/utils/request.js b/src/utils/request.js index 23898cb..68714cd 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -4,7 +4,7 @@ import qs from 'qs'; import { Session } from '/@/utils/storage'; // export const moduleName = 'zqq-biz-vordm'; -export const moduleName = 'biz-vordm'; +export const moduleName = 'glj-biz-vordm'; export const crawlModule = 'vordm-crawl'; // 配置新建一个 axios 实例 const service = axios.create({ diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index c44ee4d..d23c27d 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -111,7 +111,7 @@ - + Point Area @@ -238,7 +238,10 @@ const onOpenEditRole = (type, row) => { if(state.wktPoint_Poly){ mapRef.value.mapOperations.removeLayer(state.wktPoint_Poly) } - state.wktPoint_Poly= mapRef.value.mapOperations.wktParseToMap(row.geometry) + let wkt=mapRef.value.mapOperations.wktParseToMap(row.geometry) + state.wktPoint_Poly= wkt.layer + console.log(wkt.location) + changelatlon(wkt.location[0],wkt.location[1]); // mapRef.value.mapOperations.on("click", (res)=>{ // mapRef.value.mapOperations.clearPolygon() // mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly) @@ -251,7 +254,7 @@ const mapEvents = (ev)=>{ if(ev == '1'){ // mapRef.value.mapOperations.clearPolygon() mapRef.value.mapOperations.on("click", mapClick) - mapRef.value.mapOperations.on("mousemove", changelatlon) + // mapRef.value.mapOperations.on("mousemove", changelatlon) mapRef.value.mapOperations.clearPolygon() }else if(ev == '2'){ @@ -275,8 +278,8 @@ const ClearSubmit = () => { } const mapClick=(res)=>{ mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly ) - changelatlon(res); - state.wktPoint_Poly=mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3)) + changelatlon(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3)); + mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3)) // console.log(state.wktPoint_Poly) } const reviews = (index) => { @@ -307,10 +310,12 @@ const onHandleCurrentChange = (val) => { state.tableData.param.pageNum = val; getTableData(); }; -const changelatlon = (e) => { +const changelatlon = (lat,lon) => { //深拷贝e - state.dislat = e.latlng.lat.toFixed(3); - state.dislon= e.latlng.lng.toFixed(3); + // state.dislat = e.latlng.lat.toFixed(3); + // state.dislon= e.latlng.lng.toFixed(3); + state.dislat = lat; + state.dislon= lon; // if (state.lon < 0) { // state.lon = state.lon + 360; // } From 4611558cffd6e77f47fff5594ce4228dbd72a1a0 Mon Sep 17 00:00:00 2001 From: yyhouc <792163605@qq.com> Date: Tue, 25 Apr 2023 17:29:46 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 46 ++-- src/api/crawl/index.js | 19 +- src/utils/request.js | 2 +- .../components/searchCondition.vue | 217 ++++++++++-------- .../responseManagement/userResponse/index.vue | 10 +- 5 files changed, 156 insertions(+), 138 deletions(-) diff --git a/package-lock.json b/package-lock.json index bff5248..e30a322 100644 --- a/package-lock.json +++ b/package-lock.json @@ -342,11 +342,6 @@ "fastq": "^1.6.0" } }, - "@popperjs/core": { - "version": "npm:@sxzz/popperjs-es@2.11.7", - "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", - "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" - }, "@rollup/pluginutils": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", @@ -2005,7 +2000,7 @@ }, "clone": { "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" }, "color-convert": { @@ -2202,7 +2197,7 @@ }, "deep-equal": { "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", "requires": { "is-arguments": "^1.0.4", @@ -2215,7 +2210,7 @@ "dependencies": { "object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" } } @@ -2228,7 +2223,7 @@ }, "define-properties": { "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "requires": { "has-property-descriptors": "^1.0.0", @@ -2237,7 +2232,7 @@ "dependencies": { "object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" } } @@ -2331,6 +2326,13 @@ "lodash-unified": "^1.0.2", "memoize-one": "^6.0.0", "normalize-wheel-es": "^1.2.0" + }, + "dependencies": { + "@popperjs/core": { + "version": "npm:@sxzz/popperjs-es@2.11.7", + "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", + "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" + } } }, "esbuild": { @@ -2538,12 +2540,12 @@ }, "eventemitter3": { "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==" }, "extend": { "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "falafel": { @@ -2575,7 +2577,7 @@ }, "fast-diff": { "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" }, "fast-json-stable-stringify": { @@ -2688,7 +2690,7 @@ }, "functions-have-names": { "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, "geojson-equality": { @@ -2796,7 +2798,7 @@ }, "has-property-descriptors": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "requires": { "get-intrinsic": "^1.1.1" @@ -2809,7 +2811,7 @@ }, "has-tostringtag": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "requires": { "has-symbols": "^1.0.2" @@ -2865,7 +2867,7 @@ }, "is-arguments": { "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "requires": { "call-bind": "^1.0.2", @@ -2891,7 +2893,7 @@ }, "is-date-object": { "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "requires": { "has-tostringtag": "^1.0.0" @@ -2935,7 +2937,7 @@ }, "is-regex": { "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "requires": { "call-bind": "^1.0.2", @@ -3176,7 +3178,7 @@ }, "object-is": { "version": "1.1.5", - "resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.5.tgz", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", "requires": { "call-bind": "^1.0.2", @@ -3247,7 +3249,7 @@ }, "parchment": { "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz", + "resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz", "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==" }, "parent-module": { @@ -3394,7 +3396,7 @@ }, "quill": { "version": "1.3.7", - "resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz", + "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz", "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", "requires": { "clone": "^2.1.1", diff --git a/src/api/crawl/index.js b/src/api/crawl/index.js index 08df2f7..a341df3 100644 --- a/src/api/crawl/index.js +++ b/src/api/crawl/index.js @@ -24,7 +24,7 @@ export const news = (disaster_id, keywords, page, isBaidu, id) => { }, }); }; -export const rs = (stime, etime, disaster_id, ranges, type = 1) => { +export const rs = (stime, etime, disaster_id, ranges, type = 1,id) => { let method = 'sentinel'; if (type == 1) { method = 'sentinel'; @@ -33,15 +33,22 @@ export const rs = (stime, etime, disaster_id, ranges, type = 1) => { } else { method = 'searchone'; } - + let data = { + stime, + etime, + disaster_id, + id, + } + if(type != 1 && type != 2){ + data['geo'] = ranges + }else{ + data['ranges']=ranges + } return request({ url: '/api/' + crawlModule + '/rs/' + method, method: 'post', data: { - stime, - etime, - disaster_id, - ranges, + }, }); }; diff --git a/src/utils/request.js b/src/utils/request.js index 1e18ec7..432d50e 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -4,7 +4,7 @@ import qs from 'qs'; import { Session } from '/@/utils/storage'; // export const moduleName = 'zqq-biz-vordm'; -export const moduleName = 'biz-vordm'; +export const moduleName = 'yyhouc-biz-vordm'; export const crawlModule = "vordm-crawl"; // 配置新建一个 axios 实例 const service = axios.create({ diff --git a/src/views/dataService/remoteSensingData/components/searchCondition.vue b/src/views/dataService/remoteSensingData/components/searchCondition.vue index 406ad6e..74182d0 100644 --- a/src/views/dataService/remoteSensingData/components/searchCondition.vue +++ b/src/views/dataService/remoteSensingData/components/searchCondition.vue @@ -134,6 +134,7 @@ import Map from "/@/components/Map.vue"; import { ref, reactive, watch } from 'vue'; import { rs, submit } from '/@/api/crawl/index'; import { useUserInfo } from '/@/stores/userInfo'; +import { ElMessage } from "element-plus"; const userInfo = useUserInfo(); // 初始化数据 @@ -184,82 +185,82 @@ const state = reactive({ // } // ] }, - { - value: '国产系列卫星', - label: '国产系列卫星', - children: [ - { - value: 'GF - 1', - label: 'GF - 1', - }, - { - value: 'GF - 2', - label: 'GF - 2', - }, - { - value: 'GF - 3', - label: 'GF - 3', - }, - { - value: 'GF - 4', - label: 'GF - 4', - }, - { - value: 'GF - 6', - label: 'GF - 6', - }, - { - value: 'ZY - 3', - label: 'ZY - 3', - }, - { - value: 'ZY - 302', - label: 'ZY - 302', - }, - { - value: 'ZY - 02C', - label: 'ZY - 02C', - }, - ], - }, - { - value: '欧比特珠海一号系列卫星', - label: '欧比特珠海一号系列卫星', - children: [ - { - value: 'OVS - 2A', - label: 'OVS - 2A', - }, - { - value: 'OVS - 3A', - label: 'OVS - 3A', - }, - { - value: 'OVS - 1A', - label: 'OVS - 1A', - }, - { - value: 'OVS - 1B', - label: 'OVS - 1B', - }, - { - value: 'OHS - 2A', - label: 'OHS - 2A', - }, - { - value: 'OHS - 2B', - label: 'OHS - 2B', - }, - { - value: 'OHS - 2C', - label: 'OHS - 2C', - }, - { - value: 'OHS - 2D', - label: 'OHS - 2D', - }, - ], - } + // { + // value: '国产系列卫星', + // label: '国产系列卫星', + // children: [ + // { + // value: 'GF - 1', + // label: 'GF - 1', + // }, + // { + // value: 'GF - 2', + // label: 'GF - 2', + // }, + // { + // value: 'GF - 3', + // label: 'GF - 3', + // }, + // { + // value: 'GF - 4', + // label: 'GF - 4', + // }, + // { + // value: 'GF - 6', + // label: 'GF - 6', + // }, + // { + // value: 'ZY - 3', + // label: 'ZY - 3', + // }, + // { + // value: 'ZY - 302', + // label: 'ZY - 302', + // }, + // { + // value: 'ZY - 02C', + // label: 'ZY - 02C', + // }, + // ], + // }, + // { + // value: '欧比特珠海一号系列卫星', + // label: '欧比特珠海一号系列卫星', + // children: [ + // { + // value: 'OVS - 2A', + // label: 'OVS - 2A', + // }, + // { + // value: 'OVS - 3A', + // label: 'OVS - 3A', + // }, + // { + // value: 'OVS - 1A', + // label: 'OVS - 1A', + // }, + // { + // value: 'OVS - 1B', + // label: 'OVS - 1B', + // }, + // { + // value: 'OHS - 2A', + // label: 'OHS - 2A', + // }, + // { + // value: 'OHS - 2B', + // label: 'OHS - 2B', + // }, + // { + // value: 'OHS - 2C', + // label: 'OHS - 2C', + // }, + // { + // value: 'OHS - 2D', + // label: 'OHS - 2D', + // }, + // ], + // } ], shortcuts: [ { @@ -399,6 +400,20 @@ const editCoordinate = () => { // 开始爬虫 const startCrawl = () => { + if(!state.startTime){ + ElMessage.error("Please select the search start time") + return; + } + if(!state.endTime){ + ElMessage.error("Please select the search end time") + return; + } + if(state.coordinateList.length==0||!state.coordinateList[0].Lat||!state.coordinateList[0].Lng||!state.coordinateList[1].Lat ||!state.coordinateList[1].Lng){ + ElMessage.error("Please draw the area on the map") + return; + } + + var ranges = state.coordinateList[0].Lat + ' ' + state.coordinateList[0].Lng + ',' + state.coordinateList[1].Lat + ' ' + state.coordinateList[1].Lng var type = null if (state.satelliteSelected[0] == 'landsat') { @@ -413,36 +428,38 @@ const startCrawl = () => { var param = { "stime": state.startTime, "etime": state.endTime, - "disaster_id": state.selectID * 1, + "disaster_id": state.selectID, "ranges": ranges, "id": id } console.log(param); - submit( - { - type: type, - manageId: userInfo.userInfos.id, - status: 0, - disasterId: state.selectID, - id: (id ? id : null) - } - ).then(ret => { - if (ret == 1042) { - ElMessage.error("error") - } else { + // submit( + // { + // type: type, + // startDate:state.startTime, + // endDate:state.endTime, + // manageId: userInfo.userInfos.id, + // status: 0, + // disasterId: state.selectID, + // id: (id ? id : null) + // } + // ).then(ret => { + // if (ret == 1042) { + // ElMessage.error("error") + // } else { + + // rs(stime, etime, disaster_id, ranges, type = 1).then(res => { + // console.log(res); + // // getData(); + // ElMessage({ + // message: 'Success, Start crawling.', + // type: 'success', + // }) + // }) - rs(param).then(res => { - console.log(res); - // getData(); - ElMessage({ - message: 'Success, Start crawling.', - type: 'success', - }) - }) - - } - }) + // } + // }) } // 清空搜索条件 diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index 9539538..da035c6 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -190,15 +190,7 @@ style="height:35px;"> - <<<<<<< HEAD - - - ======= - - >>>>>>> zqq + Date: Tue, 25 Apr 2023 18:30:08 +0800 Subject: [PATCH 03/11] =?UTF-8?q?glj-=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/data/otherData.js | 15 +- .../otherData/component/upload.vue | 9 +- src/views/dataService/otherData/index.vue | 31 +- .../pictureInfo/component/upload.vue | 82 ++-- src/views/dataService/pictureInfo/index.vue | 14 +- .../responseManagement/userResponse/index.vue | 393 ++++++++++-------- .../systemManagement/administrator/index.vue | 24 +- 7 files changed, 307 insertions(+), 261 deletions(-) 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 @@ -