feat
This commit is contained in:
parent
1b2b03352a
commit
0269e6f355
@ -4,7 +4,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { GetEntityList } from '@/apis/coding';
|
||||
import { GetEntityList } from '@/apis/grid.js';
|
||||
const emit = defineEmits(['update:value']);
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -2,12 +2,22 @@
|
||||
<el-drawer v-model="_visible" title="土地信息" :size="800" @close="handleClose">
|
||||
<el-card>
|
||||
<div class="title_">基础信息</div>
|
||||
<el-form :model="baseInfo" class="base_form" label-width="120px">
|
||||
<el-form ref="baseForm" :model="baseInfo" class="base_form" label-width="120px">
|
||||
<el-form-item label="土地名称" prop="landName">
|
||||
<el-input v-model="baseInfo.landName" placeholder="请输入名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属网格" prop="gridName" placeholder="请选择所属网格">
|
||||
<GridSelect />
|
||||
<el-form-item label="所属网格" prop="gridId">
|
||||
<CustomSelect
|
||||
v-model:value="baseInfo.gridId"
|
||||
:set="{
|
||||
url: '/land-resource/gridManage/page',
|
||||
props: {
|
||||
value: 'id',
|
||||
label: 'gridName',
|
||||
},
|
||||
}"
|
||||
placeholder="请选择所属网格"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用地分类" prop="LandType">
|
||||
<LandClassificationType v-model:value="baseInfo.landClassificationType" placeholder="请选择用地分类" />
|
||||
@ -22,17 +32,17 @@
|
||||
<el-input v-model="baseInfo.area" placeholder="请输入面积"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="产权人" prop="owner">
|
||||
<el-input v-model="baseInfo.owner" placeholder="请输入"></el-input>
|
||||
<el-input v-model="baseInfo.owner" placeholder="请输入产权人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="土壤类型">
|
||||
<LandType v-model:value="baseInfo.landType" placeholder="请选择土壤类型" />
|
||||
<el-input v-model="baseInfo.soilType" placeholder="请输入土壤类型"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<br />
|
||||
<el-card>
|
||||
<div class="title_">土地产权信息</div>
|
||||
<el-form :model="propertyInfo" class="property_form" label-width="120px">
|
||||
<el-form ref="propertyForm" :model="propertyInfo" class="property_form" label-width="120px">
|
||||
<el-form-item label="产权人姓名" prop="propertyName">
|
||||
<el-input v-model="propertyInfo.propertyName" placeholder="请输入联系人"></el-input>
|
||||
</el-form-item>
|
||||
@ -42,6 +52,11 @@
|
||||
<el-form-item label="产权编号" prop="landCode">
|
||||
<el-input v-model="propertyInfo.landCode" placeholder="请输入联系人"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产权证书" prop="propertyCertificateUrl">
|
||||
<el-upload class="custom-form__uploader" action="#" :show-file-list="false" accept="image/*" :limit="20" :http-request="rowUploadPicture">
|
||||
<el-icon class="custom-form__uploader__icon"><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</el-card>
|
||||
<section class="btns">
|
||||
@ -55,11 +70,11 @@
|
||||
<script setup>
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import LandClassificationType from '@/components/LandClassificationType.vue';
|
||||
import GridSelect from '@/components/GridSelect.vue';
|
||||
import CustomSelect from '@/components/CustomSelect.vue';
|
||||
import LandIsTranfer from '@/components/LandIsTranfer.vue';
|
||||
import LandType from '@/components/LandType.vue';
|
||||
import { lnadSave } from '@/apis/land';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { CommonUpload } from '@/apis';
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -74,13 +89,13 @@ const emit = defineEmits(['close']);
|
||||
const _visible = ref(false);
|
||||
const baseInfo = reactive({
|
||||
landName: '',
|
||||
gridName: '',
|
||||
landClassificationType: '1',
|
||||
gridId: '',
|
||||
landClassificationType: '',
|
||||
villageCode: '',
|
||||
isTransfer: '1',
|
||||
isTransfer: '',
|
||||
area: '',
|
||||
owner: '',
|
||||
landType: '0',
|
||||
soilType: '',
|
||||
});
|
||||
const propertyInfo = reactive({
|
||||
propertyName: '',
|
||||
@ -100,21 +115,44 @@ watch(
|
||||
console.log('---', baseInfo);
|
||||
}
|
||||
);
|
||||
const baseForm = ref();
|
||||
const propertyForm = ref();
|
||||
// #endregion
|
||||
|
||||
/* --------------- methods --------------- */
|
||||
// #region
|
||||
const rowUploadPicture = async ({ file }) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await CommonUpload(formData);
|
||||
if (res.code === 200) {
|
||||
console.log('---', res);
|
||||
// state.form.productUrl = res.data.url;
|
||||
// const base64 = await imageToBase64(file);
|
||||
// state.form.base64 = base64;
|
||||
}
|
||||
};
|
||||
async function handleSubmit() {
|
||||
const data = {
|
||||
...baseInfo,
|
||||
...propertyInfo,
|
||||
isDraftsSave: 0,
|
||||
};
|
||||
const res = await lnadSave(data);
|
||||
if (res.code == 200) ElMessage.success('保存成功');
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('保存成功');
|
||||
resFrom();
|
||||
}
|
||||
}
|
||||
function handleClose() {
|
||||
resFrom();
|
||||
emit('close');
|
||||
}
|
||||
function resFrom() {
|
||||
baseForm.value.resetFields();
|
||||
propertyForm.value.resetFields();
|
||||
}
|
||||
|
||||
// #endregion
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user