From 10f866f3940f520fa9b5ed07e03e73e9b5381394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=83=B3?= <826276471@qq.com> Date: Wed, 5 Mar 2025 17:30:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=9C=9F=E5=9C=B0=E8=BF=9D=E6=B3=95?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/index.html | 4 +- .../illegalHandle/common/FileUpload.vue | 86 ++++++ .../illegalHandle/common/Register.vue | 30 ++- .../component/illegalHandle/index.vue | 244 +++++++++++++++++- .../component/landsManage/index.vue | 61 ++--- 5 files changed, 374 insertions(+), 51 deletions(-) create mode 100644 sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/FileUpload.vue diff --git a/main/index.html b/main/index.html index b1788ff..211ab8e 100644 --- a/main/index.html +++ b/main/index.html @@ -6,14 +6,14 @@ - + diff --git a/sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/FileUpload.vue b/sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/FileUpload.vue new file mode 100644 index 0000000..a9a1953 --- /dev/null +++ b/sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/FileUpload.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/Register.vue b/sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/Register.vue index 5af4394..cf69e61 100644 --- a/sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/Register.vue +++ b/sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/Register.vue @@ -1,5 +1,5 @@ @@ -61,9 +62,7 @@ import { useUserStore } from '@/store/modules/user'; import { getLandsList, exportLands, delLand, saveLand, importLands } from '@/apis/land.js'; import { ElMessage } from 'element-plus'; import useLandHook from './useLandHook'; -import { CommonUpload } from '@/apis'; import Attrs from './common/Attrs.vue'; -import { add } from 'lodash'; const { landType, landsType, landClassificationType, handleIficationType } = useLandHook(); const { VITE_APP_BASE_API } = import.meta.env; @@ -79,8 +78,9 @@ const local_ = ref([102.833669, 24.88149, '昆明市']); const local = ref(JSON.parse(JSON.stringify(local_.value))); /* --------------- data --------------- */ // #region +const loading = ref(false); const crudRef = ref(); -const pageData = reactive({ +const pageData = ref({ currentPage: 1, pageSize: 10, total: 0, @@ -88,8 +88,8 @@ const pageData = reactive({ const data = ref([]); const option = reactive({ ...CRUD_OPTIONS, - selection: false, menuWidth: 120, + selection: false, column: [ { label: '地块名', @@ -342,16 +342,16 @@ const option = reactive({ label: '土地使用权信息', prop: 'baseGroup', column: [ - // { - // label: '地理位置', - // prop: 'coordinate', - // viewDisplay: false, - // }, - // { - // label: '地理位置', - // prop: 'coordinateView', - // addDisplay: false, - // }, + { + label: '地理位置', + prop: 'coordinate', + viewDisplay: false, + }, + { + label: '地理位置', + prop: 'coordinateView', + addDisplay: false, + }, { label: '图片', prop: 'landUrl', @@ -375,30 +375,33 @@ const rowData = ref([]); // #region async function getList() { + loading.value = true; const params = { - current: pageData.currentPage, - size: pageData.pageSize, + current: pageData.value.currentPage, + size: pageData.value.pageSize, landType: landType.value, ...searchData, }; let res = await getLandsList(params); + loading.value = false; if (res.code == 200) { - data.value = res.data.records; + const { total, records } = res.data; + data.value = records; data.value.forEach((v) => { v.isTransfer = v.landTransfer || 1; v.isTransferView = v.landTransfer == 1 ? '否' : '是'; v.landClassificationTypeView = handleIficationType(v.handleIficationType); - // v.coordinateView = v.coordinate; + v.coordinateView = v.coordinate; }); - pageData.total = res.data.total; + pageData.value.total = total; } } function handlePageChange(val) { - pageData.currentPage = val; + pageData.value.currentPage = val; getList(); } function handleSizeChange(val) { - pageData.pageSize = val; + pageData.value.pageSize = val; getList(); } async function handleSearch(form, done) { @@ -412,9 +415,9 @@ async function handleResetSearch() { for (let key in searchData) { searchData[key] = ''; } - pageData.currentPage = 1; - pageData.pageSize = 10; - pageData.total = 0; + pageData.value.currentPage = 1; + pageData.value.pageSize = 10; + pageData.value.total = 0; await getList(); } const attrNames = reactive(landsType.map((v) => v.label)); @@ -518,9 +521,9 @@ async function handleRowSave(val, done, loading) { data.landCertificateUrl = landOwnerUrls.join(); data.landUrl = landUrls.join(); data.villageCode = data.villageCode[data.villageCode.length - 1] || ''; - // if (local.value.length != 0) { - // data.coordinate = `${local.value[0]}E,${local.value[1]}N`; - // } + if (local.value.length != 0) { + data.coordinate = `${local.value[0]}E,${local.value[1]}N`; + } const res = await saveLand(data); loading(); if (res.code == 200) {