From 491bb5df409d42195f31e607802d58cbfa1b682c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E6=83=B3?= <826276471@qq.com>
Date: Thu, 27 Feb 2025 17:30:06 +0800
Subject: [PATCH 1/2] feat
---
.../src/apis/land.js | 7 +++
.../landsManage/common/CreateLand.vue | 9 +++-
.../component/landsManage/index.vue | 44 +++++++++++++------
3 files changed, 45 insertions(+), 15 deletions(-)
diff --git a/sub-government-affairs-service/src/apis/land.js b/sub-government-affairs-service/src/apis/land.js
index 2763bf2..13206ed 100644
--- a/sub-government-affairs-service/src/apis/land.js
+++ b/sub-government-affairs-service/src/apis/land.js
@@ -13,6 +13,13 @@ export function saveLand(params = {}) {
params,
});
}
+export function exportLands(params = {}) {
+ return request('/land-resource/landManage/export', {
+ method: 'GET',
+ params,
+ responseType: 'blob',
+ });
+}
export function getAnnualList(params = {}) {
return request('land-resource/annualManage/page', {
diff --git a/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue b/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue
index 8b486aa..9b7c608 100644
--- a/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue
+++ b/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue
@@ -76,7 +76,7 @@ import { reactive, ref, watch } from 'vue';
import LandClassificationType from '@/components/LandClassificationType.vue';
import CustomSelect from '@/components/CustomSelect.vue';
import LandIsTranfer from '@/components/LandIsTranfer.vue';
-import { lnadSave, exportLands } from '@/apis/land';
+import { saveLand } from '@/apis/land';
import { ElMessage } from 'element-plus';
import { CommonUpload } from '@/apis';
@@ -85,6 +85,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
+ landType: {
+ type: String,
+ default: '0',
+ },
});
const emit = defineEmits(['close']);
/* --------------- data --------------- */
@@ -155,11 +159,12 @@ async function handleSubmit() {
...baseInfo,
...propertyInfo,
isDraftsSave: 0,
+ landType: props.landType,
};
let ids = '';
propertyInfo.propertyCertificateUrl.map((item) => (ids += item.id));
data.propertyCertificateUrl = ids;
- const res = await lnadSave(data);
+ const res = await saveLand(data);
if (res.code == 200) {
ElMessage.success('保存成功');
resFrom();
diff --git a/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue b/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue
index e97a103..4c538dd 100644
--- a/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue
+++ b/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue
@@ -1,6 +1,6 @@
-
+
{{ item.label }}
@@ -29,7 +29,7 @@
-
+
{{ item.label }}
@@ -53,19 +53,25 @@
{{ !row.isUpload ? '是' : '否' }}
-
+
+
+ 编辑
+ 详情
+ 删除
+
+
handlePaginaChange(v, true)" @size-hange="(v) => handlePaginaChange(v)" />
-
+
From 15932fe654d1309fec564f0fcc6e0cc696ceafac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E6=83=B3?= <826276471@qq.com>
Date: Fri, 28 Feb 2025 16:45:42 +0800
Subject: [PATCH 2/2] =?UTF-8?q?feat:=E5=9C=9F=E5=9C=B0=E8=BF=9D=E6=B3=95?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=90=AD=E5=BB=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components.d.ts | 2 +-
.../{CustCard.vue => CustomCard.vue} | 0
.../src/components/LandClassificationType.vue | 4 +-
.../{LandIsTranfer.vue => LandIsTransfer.vue} | 4 +-
.../src/components/LandType.vue | 4 +-
.../component/annualPlans/index.vue | 6 +-
.../illegalHandle/common/Register.vue | 112 ++++++++++
.../component/illegalHandle/index.vue | 196 +++++++++++++++++-
.../landsManage/common/CreateLand.vue | 53 ++++-
.../component/landsManage/index.vue | 17 +-
.../landManage/component/plantPlan/index.vue | 6 +-
.../src/views/trace/breeding/coding/index.vue | 14 --
12 files changed, 372 insertions(+), 46 deletions(-)
rename sub-government-affairs-service/src/components/{CustCard.vue => CustomCard.vue} (100%)
rename sub-government-affairs-service/src/components/{LandIsTranfer.vue => LandIsTransfer.vue} (89%)
create mode 100644 sub-government-affairs-service/src/views/landManage/component/illegalHandle/common/Register.vue
diff --git a/sub-government-affairs-service/components.d.ts b/sub-government-affairs-service/components.d.ts
index 478bab3..d581204 100644
--- a/sub-government-affairs-service/components.d.ts
+++ b/sub-government-affairs-service/components.d.ts
@@ -7,7 +7,7 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
- CustCard: typeof import('./src/components/CustCard.vue')['default']
+ CustomCard: typeof import('./src/components/CustomCard.vue')['default']
GridSelect: typeof import('./src/components/GridSelect.vue')['default']
LandType: typeof import('./src/components/LandType.vue')['default']
Pagina: typeof import('./src/components/Pagina.vue')['default']
diff --git a/sub-government-affairs-service/src/components/CustCard.vue b/sub-government-affairs-service/src/components/CustomCard.vue
similarity index 100%
rename from sub-government-affairs-service/src/components/CustCard.vue
rename to sub-government-affairs-service/src/components/CustomCard.vue
diff --git a/sub-government-affairs-service/src/components/LandClassificationType.vue b/sub-government-affairs-service/src/components/LandClassificationType.vue
index d919b65..b9e669c 100644
--- a/sub-government-affairs-service/src/components/LandClassificationType.vue
+++ b/sub-government-affairs-service/src/components/LandClassificationType.vue
@@ -12,7 +12,7 @@ import { ref, watch } from 'vue';
const props = defineProps({
// 父组件传过来的值
value: {
- type: String || null,
+ type: String || Number || null,
default: null,
},
placeholder: {
@@ -28,7 +28,7 @@ const val = ref(null);
watch(
() => props.value,
() => {
- val.value = props.value;
+ val.value = props.value || props.value == 0 ? String(props.value) : null;
},
{
deep: true,
diff --git a/sub-government-affairs-service/src/components/LandIsTranfer.vue b/sub-government-affairs-service/src/components/LandIsTransfer.vue
similarity index 89%
rename from sub-government-affairs-service/src/components/LandIsTranfer.vue
rename to sub-government-affairs-service/src/components/LandIsTransfer.vue
index dcc58bd..cb7febe 100644
--- a/sub-government-affairs-service/src/components/LandIsTranfer.vue
+++ b/sub-government-affairs-service/src/components/LandIsTransfer.vue
@@ -12,7 +12,7 @@ import { ref, watch } from 'vue';
const props = defineProps({
// 父组件传过来的值
value: {
- type: String || null,
+ type: String || Number || null,
default: null,
},
placeholder: {
@@ -28,7 +28,7 @@ const val = ref(null);
watch(
() => props.value,
() => {
- val.value = props.value;
+ val.value = props.value || props.value == 0 ? String(props.value) : null;
},
{
deep: true,
diff --git a/sub-government-affairs-service/src/components/LandType.vue b/sub-government-affairs-service/src/components/LandType.vue
index 495dd93..26bae46 100644
--- a/sub-government-affairs-service/src/components/LandType.vue
+++ b/sub-government-affairs-service/src/components/LandType.vue
@@ -12,7 +12,7 @@ import { ref, watch } from 'vue';
const props = defineProps({
// 父组件传过来的值
value: {
- type: String || null,
+ type: String || Number || null,
default: null,
},
placeholder: {
@@ -28,7 +28,7 @@ const val = ref(null);
watch(
() => props.value,
() => {
- val.value = props.value;
+ val.value = props.value || props.value == 0 ? String(props.value) : null;
},
{
deep: true,
diff --git a/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue b/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue
index 216ee62..c85edb3 100644
--- a/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue
+++ b/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -117,13 +117,13 @@
-
+
+
+
diff --git a/sub-government-affairs-service/src/views/landManage/component/illegalHandle/index.vue b/sub-government-affairs-service/src/views/landManage/component/illegalHandle/index.vue
index 690a9aa..cdf3ec2 100644
--- a/sub-government-affairs-service/src/views/landManage/component/illegalHandle/index.vue
+++ b/sub-government-affairs-service/src/views/landManage/component/illegalHandle/index.vue
@@ -1,18 +1,206 @@
-
+
+
+
+ 登记处理
+
+
+
+
-
diff --git a/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue b/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue
index 9b7c608..65a4dfd 100644
--- a/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue
+++ b/sub-government-affairs-service/src/views/landManage/component/landsManage/common/CreateLand.vue
@@ -2,7 +2,7 @@
基础信息
-
+
@@ -26,7 +26,7 @@
-
+
@@ -42,7 +42,7 @@
土地产权信息
-
+
@@ -64,8 +64,8 @@
- 保存并提交审核
- 保存草稿
+ 保存并提交审核
+
取消
@@ -75,7 +75,7 @@
import { reactive, ref, watch } from 'vue';
import LandClassificationType from '@/components/LandClassificationType.vue';
import CustomSelect from '@/components/CustomSelect.vue';
-import LandIsTranfer from '@/components/LandIsTranfer.vue';
+import LandIsTransfer from '@/components/LandIsTransfer.vue';
import { saveLand } from '@/apis/land';
import { ElMessage } from 'element-plus';
import { CommonUpload } from '@/apis';
@@ -89,18 +89,23 @@ const props = defineProps({
type: String,
default: '0',
},
+ rowData: {
+ type: Object,
+ default: () => {},
+ },
});
const emit = defineEmits(['close']);
/* --------------- data --------------- */
// #region
const _visible = ref(false);
+const editId = ref(null);
const baseInfo = reactive({
landName: '',
gridId: '',
landClassificationType: '',
villageCode: '',
- isTransfer: '',
+ isTransfer: '1',
area: '',
owner: '',
soilType: '',
@@ -115,6 +120,26 @@ watch(
() => props.visible,
() => {
_visible.value = props.visible;
+ if (!props.rowData.id) {
+ editId.value = props.rowData.id;
+ } else {
+ for (let key in baseInfo) {
+ baseInfo[key] = props.rowData[key];
+ }
+ baseInfo.isTransfer = props.rowData.landTransfer || '0';
+ for (let key in propertyInfo) {
+ propertyInfo[key] = props.rowData[key];
+ }
+ if (propertyInfo.propertyCertificateUrl) {
+ propertyInfo.propertyCertificateUrl = props.rowData.propertyCertificateUrl.map((item, i) => {
+ return {
+ url: item.url,
+ id: `id_${i}_${Date.now()}`,
+ name: item.name || `name_${i}_${Date.now()}`,
+ };
+ });
+ }
+ }
}
);
watch(
@@ -161,9 +186,10 @@ async function handleSubmit() {
isDraftsSave: 0,
landType: props.landType,
};
- let ids = '';
- propertyInfo.propertyCertificateUrl.map((item) => (ids += item.id));
- data.propertyCertificateUrl = ids;
+ let ids = [];
+ propertyInfo.propertyCertificateUrl.map((item) => ids.push(item.url));
+ data.propertyCertificateUrl = ids.join();
+ editId.value && (data.id = editId.value);
const res = await saveLand(data);
if (res.code == 200) {
ElMessage.success('保存成功');
@@ -178,6 +204,13 @@ function handleClose() {
function resFrom() {
baseForm.value.resetFields();
propertyForm.value.resetFields();
+ for (let key in baseInfo) {
+ baseInfo[key] = '';
+ }
+ for (let key in propertyInfo) {
+ propertyInfo[key] = '';
+ }
+ propertyInfo.propertyCertificateUrl = [];
}
// #endregion
diff --git a/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue b/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue
index 4c538dd..c247468 100644
--- a/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue
+++ b/sub-government-affairs-service/src/views/landManage/component/landsManage/index.vue
@@ -1,5 +1,5 @@
-
+
{{ item.label }}
@@ -56,21 +56,21 @@
编辑
- 详情
+ 详情
删除
handlePaginaChange(v, true)" @size-hange="(v) => handlePaginaChange(v)" />
-
+
diff --git a/sub-government-affairs-service/src/views/landManage/component/plantPlan/index.vue b/sub-government-affairs-service/src/views/landManage/component/plantPlan/index.vue
index c4a094c..c4a2a8c 100644
--- a/sub-government-affairs-service/src/views/landManage/component/plantPlan/index.vue
+++ b/sub-government-affairs-service/src/views/landManage/component/plantPlan/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -139,13 +139,13 @@
-
+